Player rendering in the inventory
This commit is contained in:
+3
-2
@@ -77,10 +77,11 @@ export function player_menu(inventories: ClientInventories): ClientMenu {
|
||||
const row = Math.floor(i / 9);
|
||||
slots.push(slot(inventories.inventory, i, 7 + (i % 9) * 18, i < 9 ? 141 : 83 + (row - 1) * 18));
|
||||
}
|
||||
// the crafting grid on the right, the player drawn left of it, see GuiPlayerInventory
|
||||
for (let i = 0; i < CRAFTING_RESULT_SLOT; i++) {
|
||||
slots.push(slot(inventories.crafting, i, 25 + (i % 3) * 18, 16 + Math.floor(i / 3) * 18));
|
||||
slots.push(slot(inventories.crafting, i, 79 + (i % 3) * 18, 16 + Math.floor(i / 3) * 18));
|
||||
}
|
||||
slots.push(slot(inventories.crafting, CRAFTING_RESULT_SLOT, 115, 34, true));
|
||||
slots.push(slot(inventories.crafting, CRAFTING_RESULT_SLOT, 151, 34, true));
|
||||
if (slots.length !== PLAYER_MENU_EXTRA) throw new Error("menu 0 has the wrong slots");
|
||||
for (const [i, info] of inventories.extra_slots.entries()) {
|
||||
slots.push({ ...slot(inventories.extra, i, info.x, info.y, info.output === true), icon: info.icon });
|
||||
|
||||
Reference in New Issue
Block a user