mc-beta-server/server/blocks/IBlockBehaviour.ts
2024-10-18 21:47:03 +01:00

15 lines
No EOL
562 B
TypeScript

import AABB from "../AABB";
import Random from "../Random";
import { World } from "../World";
import { Block } from "./Block";
export interface IBlockBehaviour {
block:Block,
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
}