summaryrefslogtreecommitdiff
path: root/src/main/java/lv/enes/mc/eris_alchemy/menu/AlchemicalChestMenu.java
diff options
context:
space:
mode:
authorGravatar Uko Kokņevičs2024-01-10 17:41:07 +0100
committerGravatar Uko Kokņevičs2024-01-10 17:41:07 +0100
commit000b84e87eaedb94fb87ccb11e376c51f99a1d07 (patch)
treedd9519e7dadf613a71e01b04cac7be9c121a9f18 /src/main/java/lv/enes/mc/eris_alchemy/menu/AlchemicalChestMenu.java
parentMove out common chest logic to separate files also in client code (diff)
downloadmc-eris-alchemy-000b84e87eaedb94fb87ccb11e376c51f99a1d07.tar.gz
mc-eris-alchemy-000b84e87eaedb94fb87ccb11e376c51f99a1d07.tar.xz
mc-eris-alchemy-000b84e87eaedb94fb87ccb11e376c51f99a1d07.zip
Added Energy Condenser
Diffstat (limited to 'src/main/java/lv/enes/mc/eris_alchemy/menu/AlchemicalChestMenu.java')
-rw-r--r--src/main/java/lv/enes/mc/eris_alchemy/menu/AlchemicalChestMenu.java20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/main/java/lv/enes/mc/eris_alchemy/menu/AlchemicalChestMenu.java b/src/main/java/lv/enes/mc/eris_alchemy/menu/AlchemicalChestMenu.java
index 1dc3364..35db476 100644
--- a/src/main/java/lv/enes/mc/eris_alchemy/menu/AlchemicalChestMenu.java
+++ b/src/main/java/lv/enes/mc/eris_alchemy/menu/AlchemicalChestMenu.java
@@ -6,7 +6,7 @@ import net.minecraft.world.SimpleContainer;
6import net.minecraft.world.entity.player.Inventory; 6import net.minecraft.world.entity.player.Inventory;
7import net.minecraft.world.inventory.Slot; 7import net.minecraft.world.inventory.Slot;
8 8
9public class AlchemicalChestMenu extends ChestLikeBlockMenu { 9public class AlchemicalChestMenu extends ChestLikeMenu {
10 private static final int WIDTH = 13; 10 private static final int WIDTH = 13;
11 private static final int HEIGHT = 8; 11 private static final int HEIGHT = 8;
12 12
@@ -24,25 +24,13 @@ public class AlchemicalChestMenu extends ChestLikeBlockMenu {
24 var y_off = 8; 24 var y_off = 8;
25 25
26 for (var y = 0; y < HEIGHT; y++) { 26 for (var y = 0; y < HEIGHT; y++) {
27 for (var x = 0; x < WIDTH; x++ ) { 27 for (var x = 0; x < WIDTH; x++) {
28 addSlot(new Slot(container, y * WIDTH + x, x_off + x * 18, y_off + y * 18)); 28 addSlot(new Slot(container, y * WIDTH + x, x_off + x * 18, y_off + y * 18));
29 } 29 }
30 } 30 }
31 31
32 x_off = 44; 32 addPlayerInventorySlots(playerInventory, 44, 155);
33 y_off = 155; 33 addPlayerHotbarSlots(playerInventory, 44, 213);
34
35 for (var y = 0; y < 3; y++) {
36 for (var x = 0; x < 9; x++) {
37 addSlot(new Slot(playerInventory, y * 9 + x + 9, x_off + x * 18, y_off + y * 18));
38 }
39 }
40
41 y_off = 213;
42
43 for (var x = 0; x < 9; x++) {
44 addSlot(new Slot(playerInventory, x, x_off + x * 18, y_off));
45 }
46 } 34 }
47 35
48 @Override 36 @Override