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

implement basic crafting

This commit is contained in:
p2r3
2025-08-12 17:08:17 +03:00
parent 0404fa2cbb
commit 1fc0f75ed7
5 changed files with 116 additions and 4 deletions

View File

@@ -186,6 +186,14 @@ uint8_t clientSlotToServerSlot (uint8_t slot) {
if (slot >= 9 && slot <= 35) return slot;
if (slot == 45) return 40;
if (slot >= 5 && slot <= 8) return 4 - (slot - 5) + 36;
// map inventory crafting slots to player data crafting grid (semi-hack)
// this abuses the fact that the buffers are adjacent in player data
if (slot == 1) return 41;
if (slot == 2) return 42;
if (slot == 3) return 44;
if (slot == 4) return 45;
return 255;
}