1
0
mirror of https://github.com/p2r3/bareiron.git synced 2025-10-02 07:35:08 +02:00

implement furnaces and fix crafting

This commit is contained in:
p2r3
2025-08-17 01:06:35 +03:00
parent 0b94ce9f42
commit 982d260a92
6 changed files with 100 additions and 4 deletions

View File

@@ -225,6 +225,14 @@ uint8_t clientSlotToServerSlot (int window_id, uint8_t slot) {
// the rest of the slots are identical, just shifted by one
if (slot >= 10 && slot <= 45) return clientSlotToServerSlot(0, slot - 1);
} else if (window_id == 14) { // furnace
// move furnace items to the player's crafting grid
// this lets us put them back in the inventory once the window closes
if (slot >= 0 && slot <= 2) return 41 + slot;
// the rest of the slots are identical, just shifted by 6
if (slot >= 3 && slot <= 38) return clientSlotToServerSlot(0, slot + 6);
}
return 255;