mc-beta-server/server/blocks/IBlockBehaviour.ts

18 lines
707 B
TypeScript
Raw Normal View History

import AABB from "../AABB";
import Block from "./Block";
2024-10-18 21:47:03 +01:00
import Random from "../Random";
import World from "../World";
2023-08-20 01:17:05 +01:00
export default interface IBlockBehaviour {
2024-10-18 21:47:03 +01:00
block:Block,
placed(world:World, x:number, y:number, z:number): void,
destroyed(world:World, x:number, y:number, z:number): void,
interactable(): boolean,
2023-11-02 08:31:43 +00:00
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,
2024-10-18 21:47:03 +01:00
randomTick: (world:World, x:number, y:number, z:number, random:Random) => void,
canPlaceBlockAt: (world:World, x:number, y:number, z:number) => boolean
2023-08-20 01:17:05 +01:00
}