refactor: tidy
This commit is contained in:
parent
3b08a87f39
commit
cc8c78cb30
|
@ -154,13 +154,7 @@ export default function Ui({disconnected}) {
|
|||
if (update.Inventory) {
|
||||
const newHotbarSlots = emptySlots();
|
||||
for (let i = 1; i < 11; ++i) {
|
||||
if (entity.Inventory.slots[i]) {
|
||||
const {qty, source} = entity.Inventory.slots[i];
|
||||
newHotbarSlots[i - 1] = {
|
||||
image: source + '/icon.png',
|
||||
qty,
|
||||
};
|
||||
}
|
||||
newHotbarSlots[i - 1] = entity.Inventory.slots[i];
|
||||
}
|
||||
setHotbarSlots(newHotbarSlots);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user