aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/container/Container_ModularNuclearReactor.java
diff options
context:
space:
mode:
authorkekzdealer <kekzdealer@gmail.com>2019-10-09 02:43:07 +0200
committerkekzdealer <kekzdealer@gmail.com>2019-10-09 02:43:07 +0200
commit820ca984d2dea005a126ef585661503f8cc992f5 (patch)
treebca38b81b17c435e493bf8030fad31ffe5d6d9bc /src/main/java/container/Container_ModularNuclearReactor.java
parent187fbf985078ee89f12a287a6754f2023c5e16be (diff)
downloadGT5-Unofficial-820ca984d2dea005a126ef585661503f8cc992f5.tar.gz
GT5-Unofficial-820ca984d2dea005a126ef585661503f8cc992f5.tar.bz2
GT5-Unofficial-820ca984d2dea005a126ef585661503f8cc992f5.zip
improved T.F.F.T code; Prepared for MultiHatch
Diffstat (limited to 'src/main/java/container/Container_ModularNuclearReactor.java')
-rw-r--r--src/main/java/container/Container_ModularNuclearReactor.java140
1 files changed, 70 insertions, 70 deletions
diff --git a/src/main/java/container/Container_ModularNuclearReactor.java b/src/main/java/container/Container_ModularNuclearReactor.java
index 41b686c901..a8fdd5f25a 100644
--- a/src/main/java/container/Container_ModularNuclearReactor.java
+++ b/src/main/java/container/Container_ModularNuclearReactor.java
@@ -1,70 +1,70 @@
-package container;
-
-import gregtech.api.gui.GT_Container_MultiMachine;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.IInventory;
-import net.minecraft.inventory.Slot;
-import reactor.ButtonSlot;
-import tileentities.GTMTE_ModularNuclearReactor;
-
-public class Container_ModularNuclearReactor extends GT_Container_MultiMachine {
-
- private final GTMTE_ModularNuclearReactor REACTOR_TILE;
- private final IInventory PLAYER_INVENTORY;
-
- private int nextSlotID = 0;
- private final Slot[] REACTOR_SLOTS = new Slot[54];
- private final Slot SLOT_CONFIGURATION;
- private final Slot BUTTON_EU_MODE;
- private final Slot BUTTON_FLUID_MODE;
- private final Slot BUTTON_CONDITION;
- private final Slot BUTTON_CONFIGURE;
- private final Slot BUTTON_RESET;
-
-
- public Container_ModularNuclearReactor(InventoryPlayer inventoryPlayer, IGregTechTileEntity reactorTile) {
-
- super(inventoryPlayer, reactorTile);
-
- this.REACTOR_TILE = (GTMTE_ModularNuclearReactor) reactorTile;
- this.PLAYER_INVENTORY = inventoryPlayer;
-
- // Add the reactor chamber
- for(int x = 0; x < 9; x++) {
- for(int y = 0; y < 6; y++){
- REACTOR_SLOTS[nextSlotID] = super.addSlotToContainer(new Slot(PLAYER_INVENTORY, getNextSlotID(), (16 + 67 * x), (16 + 67 * y)));
- }
- }
- // Add the configuration slot
- SLOT_CONFIGURATION = super.addSlotToContainer(new Slot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
-
- // Add buttons (they're also slots)
- BUTTON_EU_MODE = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
- BUTTON_FLUID_MODE = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
- BUTTON_CONDITION = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
- BUTTON_CONFIGURE = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
- BUTTON_RESET = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
-
- }
-
- private int getNextSlotID() {
- nextSlotID++;
- return nextSlotID - 1;
- }
-
- @Override
- public boolean canInteractWith(EntityPlayer p_75145_1_) {
- return true;
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (REACTOR_TILE.getBaseMetaTileEntity().isServerSide() == false) {
- return;
- }
- }
-
-}
+package container;
+
+import gregtech.api.gui.GT_Container_MultiMachine;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.IInventory;
+import net.minecraft.inventory.Slot;
+import reactor.ButtonSlot;
+import tileentities.GTMTE_ModularNuclearReactor;
+
+public class Container_ModularNuclearReactor extends GT_Container_MultiMachine {
+
+ private final GTMTE_ModularNuclearReactor REACTOR_TILE;
+ private final IInventory PLAYER_INVENTORY;
+
+ private int nextSlotID = 0;
+ private final Slot[] REACTOR_SLOTS = new Slot[54];
+ private final Slot SLOT_CONFIGURATION;
+ private final Slot BUTTON_EU_MODE;
+ private final Slot BUTTON_FLUID_MODE;
+ private final Slot BUTTON_CONDITION;
+ private final Slot BUTTON_CONFIGURE;
+ private final Slot BUTTON_RESET;
+
+
+ public Container_ModularNuclearReactor(InventoryPlayer inventoryPlayer, IGregTechTileEntity reactorTile) {
+
+ super(inventoryPlayer, reactorTile);
+
+ this.REACTOR_TILE = (GTMTE_ModularNuclearReactor) reactorTile;
+ this.PLAYER_INVENTORY = inventoryPlayer;
+
+ // Add the reactor chamber
+ for(int x = 0; x < 9; x++) {
+ for(int y = 0; y < 6; y++){
+ REACTOR_SLOTS[nextSlotID] = super.addSlotToContainer(new Slot(PLAYER_INVENTORY, getNextSlotID(), (16 + 67 * x), (16 + 67 * y)));
+ }
+ }
+ // Add the configuration slot
+ SLOT_CONFIGURATION = super.addSlotToContainer(new Slot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
+
+ // Add buttons (they're also slots)
+ BUTTON_EU_MODE = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
+ BUTTON_FLUID_MODE = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
+ BUTTON_CONDITION = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
+ BUTTON_CONFIGURE = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
+ BUTTON_RESET = super.addSlotToContainer(new ButtonSlot(PLAYER_INVENTORY, getNextSlotID(), 0, 0));
+
+ }
+
+ private int getNextSlotID() {
+ nextSlotID++;
+ return nextSlotID - 1;
+ }
+
+ @Override
+ public boolean canInteractWith(EntityPlayer p_75145_1_) {
+ return true;
+ }
+
+ @Override
+ public void detectAndSendChanges() {
+ super.detectAndSendChanges();
+ if (REACTOR_TILE.getBaseMetaTileEntity().isServerSide() == false) {
+ return;
+ }
+ }
+
+}