Improve tools system

This commit is contained in:
2026-09-29 17:54:17 -03:00
parent ad7f34a99e
commit 8fe581ea93
39 changed files with 225 additions and 49 deletions
+1 -1
View File
@@ -21,7 +21,7 @@ export class ItemStack<T = unknown | undefined> {
const item_info = EverythingRegistry.get<ItemRegistry>("items", type_id);
this.type_id = type_id;
this.amount = amount;
this.max_amount = max_amount ?? item_info?.max_stack ?? 64;
this.max_amount = max_amount ?? item_info?.max_stack ?? (item_info?.tool ? 1 : 64);
this.data = undefined;
if (item_info?.on_create) {
item_info.on_create(this);