Improve tools system
This commit is contained in:
+1
-1
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user