Holly
63333a04aa
The items are fully functional apart from picking them up, they are commented out in the MPClient breakBlock function if you want to play with them.
17 lines
No EOL
534 B
TypeScript
17 lines
No EOL
534 B
TypeScript
import AABB from "../AABB";
|
|
import { World } from "../World";
|
|
import { Block } from "./Block";
|
|
import { BlockBehaviour } from "./BlockBehaviour";
|
|
|
|
export class BlockBehaviourFlower extends BlockBehaviour {
|
|
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);
|
|
}
|
|
}
|
|
|
|
public getBoundingBox() {
|
|
return AABB.getAABB(0, 0, 0, 0, 0, 0);
|
|
}
|
|
} |