This commit is contained in:
2026-11-16 23:49:42 -03:00
parent 94b0e3789c
commit eedaa955f6
13 changed files with 148 additions and 2 deletions
+6
View File
@@ -30,6 +30,8 @@ export interface EntityHost {
entity_loot?(entity: Entity, source: DamageSource): ItemStack[];
// see EntityLevel.stands_on
stands_on?(entity: Entity, x: number, y: number, z: number): void;
// see EntityLevel.inside_blocks
inside_blocks?(entity: Entity): void;
}
// what a client was last told about an entity, so only changes get sent
@@ -188,6 +190,10 @@ export class EntityManager implements EntityLevel {
this.#host.stands_on?.(entity, x, y, z);
}
inside_blocks(entity: Entity) {
this.#host.inside_blocks?.(entity);
}
// ticking
// every entity active says should move, with their passengers. entities removed along the way are forgotten