mc-beta-server/server/blocks/IBlockBehaviour.ts
Holly d82b86546a
All checks were successful
Node.js Build / build (20.x) (push) Successful in 5m18s
implement tile entity add + remove, and make loading more robust.
2024-11-25 22:28:33 +00:00

17 lines
No EOL
681 B
TypeScript

import AABB from "../AABB";
import Block from "./Block";
import Random from "../Random";
import World from "../World";
export default interface IBlockBehaviour {
block:Block,
placed(world:World, x:number, y:number, z:number): void,
destroyed(world:World, x:number, y:number, z:number): void,
neighborBlockChange(world:World, x:number, y:number, z:number, blockId:number): void,
droppedItem: (blockId:number) => number,
droppedCount: (blockId:number) => number,
getBoundingBox: (x:number, y:number, z:number) => AABB,
randomTick: (world:World, x:number, y:number, z:number, random:Random) => void,
canPlaceBlockAt: (world:World, x:number, y:number, z:number) => boolean
}