Seasons api
This commit is contained in:
@@ -70,6 +70,8 @@ export interface EntityLevel {
|
||||
// the liquid there and how high it is, for liquids pushing things along
|
||||
liquid_at(x: number, y: number, z: number): LiquidInCell | undefined;
|
||||
get_block_info(x: number, y: number, z: number): BlockRegistry | undefined;
|
||||
// the column's biome, like "bworld:plains"
|
||||
biome_at(x: number, z: number): string;
|
||||
add_entity(entity: Entity): void;
|
||||
get_entity(id: string): Entity | undefined;
|
||||
// entities whose feet are within the box around x, y, z
|
||||
|
||||
@@ -104,6 +104,10 @@ export class EntityManager implements EntityLevel {
|
||||
return this.#host.world.get_block_info(x, y, z);
|
||||
}
|
||||
|
||||
biome_at(x: number, z: number) {
|
||||
return this.#host.world.biome_at(x, z);
|
||||
}
|
||||
|
||||
liquid_at(x: number, y: number, z: number) {
|
||||
const world = this.#host.world;
|
||||
return liquid_in_cell(world.get_block_value(x, y, z), world.get_block_info(x, y, z));
|
||||
|
||||
Reference in New Issue
Block a user