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 BlockBehaviour from "./BlockBehaviour";
|
|
|
|
import World from "../World";
|
2023-08-20 01:17:05 +01:00
|
|
|
|
2024-10-26 14:24:38 +01:00
|
|
|
export default class BlockBehaviourFlower extends BlockBehaviour {
|
2023-08-20 01:17:05 +01:00
|
|
|
public neighborBlockChange(world:World, x:number, y:number, z:number, blockId:number) {
|
|
|
|
const block = world.getBlockId(x, y - 1, z);
|
|
|
|
if (block !== Block.grass.blockId && block !== Block.dirt.blockId) {
|
|
|
|
world.setBlockWithNotify(x, y, z, 0);
|
|
|
|
}
|
|
|
|
}
|
2023-11-09 16:30:40 +00:00
|
|
|
|
|
|
|
public getBoundingBox() {
|
|
|
|
return AABB.getAABB(0, 0, 0, 0, 0, 0);
|
|
|
|
}
|
2023-08-20 01:17:05 +01:00
|
|
|
}
|