Smithing table

This commit is contained in:
2026-09-25 23:48:29 -03:00
parent 9237152aa1
commit 8f32a59bd6
15 changed files with 279 additions and 13 deletions
+6
View File
@@ -258,6 +258,12 @@ function right_click(container: Container, index: number, cursor: Cursor) {
slot.amount = half;
}
// whether take_output would take it
export function can_take_output(item: ItemStack, cursor: Cursor): boolean {
const holding = cursor.item;
return !holding || (holding.type_id === item.type_id && holding.max_amount - holding.amount >= item.amount);
}
// output slots (furnace result, crafting result) can only be taken from, all at once
// returns whether it was taken
export function take_output(item: ItemStack, cursor: Cursor): boolean {