diff --git a/client/src/components/ControlPanel.jsx b/client/src/components/ControlPanel.jsx index 423ccbf..51ad803 100644 --- a/client/src/components/ControlPanel.jsx +++ b/client/src/components/ControlPanel.jsx @@ -235,16 +235,43 @@ function TurtleDetails({ turtle }) { {turtle.inventory && turtle.inventory.length > 0 && (

Inventory ({turtle.inventoryCount || turtle.inventory.length}/16)

-
- {turtle.inventory.map((item, index) => ( -
- 📦 - - {item.name.replace('minecraft:', '').replace(/_/g, ' ')} - - ×{item.count} -
- ))} +
+ {Array.from({ length: 16 }, (_, slotIndex) => { + const item = turtle.inventory[slotIndex]; + return ( +
+ {item ? ( + <> +
+ + {item.name.includes('diamond') ? '💎' : + item.name.includes('gold') ? '�' : + item.name.includes('iron') ? '⚪' : + item.name.includes('coal') ? '⚫' : + item.name.includes('emerald') ? '🟢' : + item.name.includes('redstone') ? '🔴' : + item.name.includes('lapis') ? '🔵' : + item.name.includes('stone') ? '🗿' : + item.name.includes('dirt') ? '🟤' : + item.name.includes('wood') || item.name.includes('log') ? '🪵' : + item.name.includes('cobble') ? '🪨' : '�📦'} + + {item.count} +
+
+ {item.name.replace('minecraft:', '').replace(/_/g, ' ').split(' ').slice(0, 2).join(' ')} +
+ + ) : ( + {slotIndex + 1} + )} +
+ ); + })}
)}