2023-11-09 16:30:40 +00:00
|
|
|
import AABB from "../AABB";
|
2024-10-26 14:24:38 +01:00
|
|
|
import Block from "./Block";
|
|
|
|
import IBlockBehaviour from "./IBlockBehaviour";
|
2024-10-17 01:51:41 +01:00
|
|
|
import Random from "../Random";
|
2024-10-26 14:24:38 +01:00
|
|
|
import World from "../World";
|
2023-08-20 01:17:05 +01:00
|
|
|
|
2024-10-26 14:24:38 +01:00
|
|
|
export default class BlockBehaviour implements IBlockBehaviour {
|
2024-10-18 21:47:03 +01:00
|
|
|
public block!:Block;
|
|
|
|
|
2024-11-25 22:28:33 +00:00
|
|
|
public placed(world:World, x:number, y:number, z:number) {}
|
|
|
|
public destroyed(world:World, x:number, y:number, z:number) {}
|
2024-11-26 19:24:08 +00:00
|
|
|
public interactable() { return false; }
|
2023-08-20 01:17:05 +01:00
|
|
|
public neighborBlockChange(world:World, x:number, y:number, z:number, blockId:number) {}
|
2023-11-02 08:31:43 +00:00
|
|
|
public droppedItem(blockId:number) { return blockId; }
|
2023-12-24 17:47:20 +00:00
|
|
|
public droppedCount(blockId:number) { return 1; }
|
2023-11-09 16:30:40 +00:00
|
|
|
public getBoundingBox(x:number, y:number, z:number) { return AABB.getAABB(0 + x, 0 + y, 0 + z, 1 + x, 1 + y, 1 + z); }
|
2024-10-17 01:51:41 +01:00
|
|
|
public randomTick(world:World, x:number, y:number, z:number, random:Random) {}
|
2024-10-18 21:47:03 +01:00
|
|
|
public canPlaceBlockAt(world:World, x:number, y:number, z:number) { return true; }
|
2023-08-20 01:17:05 +01:00
|
|
|
}
|