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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user