Crafting and chest

This commit is contained in:
2026-03-10 19:53:15 -03:00
parent 9e2b2bcb42
commit e9da307841
11 changed files with 234 additions and 21 deletions
+2 -2
View File
@@ -88,14 +88,14 @@ export class Container {
}
get_item(slot: number): ItemStack | undefined {
return this.#slots[slot].get_item();
return this.#slots[slot]?.get_item();
}
get_slot(slot: number): ContainerSlot {
return this.#slots[slot];
}
set_item(slot: number, item: ItemStack) {
set_item(slot: number, item: ItemStack | undefined) {
this.#slots[slot].set_item(item);
}
}