Basic entity system

This commit is contained in:
2026-09-28 15:12:06 -03:00
parent 84a622c3f1
commit 52ef4e5ca6
17 changed files with 3330 additions and 246 deletions
+1 -1
View File
@@ -25,7 +25,7 @@ export class ItemEntity extends Entity {
#picked_up_by: Entity | undefined;
#pickup_age = 0;
constructor(level: ClientLevel, info: EntityInfo) {
constructor(level: ClientLevel, info: Extract<EntityInfo, { kind: "item" }>) {
super(level, info.id, 0.25, 0.25, 0.125);
this.item = ItemStack.from_data(info.item);
this.set_position(info.x, info.y, info.z);