aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches
diff options
context:
space:
mode:
authorJakub <53441451+kuba6000@users.noreply.github.com>2022-08-29 16:04:28 +0200
committerGitHub <noreply@github.com>2022-08-29 16:04:28 +0200
commit7d1f51a8937e0a86486267437d444696e81e8aa0 (patch)
treea5b145e7271998f7b4b968a2212ed487e54a92b5 /src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches
parent5267969156d30b4bb5f4cb2279ebb49db6bd40e2 (diff)
downloadGT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.gz
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.tar.bz2
GT5-Unofficial-7d1f51a8937e0a86486267437d444696e81e8aa0.zip
Buildscript + Spotless (#318)
* Convert AES.java to readable class * Buildscript * Spotless
Diffstat (limited to 'src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java67
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java5
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java198
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java10
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java18
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java18
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java52
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java17
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java14
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java22
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java23
12 files changed, 237 insertions, 212 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java
index 606880d6e9..836e7198c3 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_1by1_Turbine.java
@@ -2,7 +2,6 @@ package gtPlusPlus.xmod.gregtech.api.gui.hatches;
import gregtech.api.gui.GT_Container_1by1;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.api.items.GT_MetaGenerated_Tool;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.multi.production.turbines.GregtechMetaTileEntity_LargerTurbineBase;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
@@ -21,37 +20,41 @@ public class CONTAINER_1by1_Turbine extends GT_Container_1by1 {
addSlotToContainer(new SlotTurbine(mTileEntity, 0, 80, 35));
}
- @Override
- public int getShiftClickSlotCount() {
- return 0;
- }
+ @Override
+ public int getShiftClickSlotCount() {
+ return 0;
+ }
+
+ @Override
+ public boolean canDragIntoSlot(Slot par1Slot) {
+ return false;
+ }
- @Override
- public boolean canDragIntoSlot(Slot par1Slot) {
- return false;
- }
-
public class SlotTurbine extends Slot {
- public SlotTurbine(final IInventory inventory, final int x, final int y, final int z) {
- super(inventory, x, y, z);
- }
- @Override
- public boolean isItemValid(final ItemStack itemstack) {
- return GregtechMetaTileEntity_LargerTurbineBase.isValidTurbine(itemstack);
- }
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
- @Override
- public boolean canTakeStack(EntityPlayer p_82869_1_) {
- return false;
- }
- @Override
- public void putStack(ItemStack aStack) {
- if (isItemValid(aStack)) {
- this.inventory.setInventorySlotContents(0, aStack);
- }
- }
- }
+ public SlotTurbine(final IInventory inventory, final int x, final int y, final int z) {
+ super(inventory, x, y, z);
+ }
+
+ @Override
+ public boolean isItemValid(final ItemStack itemstack) {
+ return GregtechMetaTileEntity_LargerTurbineBase.isValidTurbine(itemstack);
+ }
+
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+
+ @Override
+ public boolean canTakeStack(EntityPlayer p_82869_1_) {
+ return false;
+ }
+
+ @Override
+ public void putStack(ItemStack aStack) {
+ if (isItemValid(aStack)) {
+ this.inventory.setInventorySlotContents(0, aStack);
+ }
+ }
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java
index 1d396811c1..60106825a0 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_2by2.java
@@ -1,10 +1,9 @@
package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
import gregtech.api.gui.GT_ContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Slot;
public class CONTAINER_2by2 extends GT_ContainerMetaTile_Machine {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java
index 8efe60a06e..0c011f164b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_4by4.java
@@ -1,10 +1,9 @@
package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.Slot;
-
import gregtech.api.gui.GT_ContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.Slot;
public class CONTAINER_4by4 extends GT_ContainerMetaTile_Machine {
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java
index 9596d41387..9f3f42bb9b 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/CONTAINER_HatchNbtConsumable.java
@@ -1,13 +1,12 @@
package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-import java.util.Iterator;
-
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import gregtech.api.gui.GT_Container;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.util.GT_LanguageManager;
import gtPlusPlus.core.slots.SlotNoInput;
+import java.util.Iterator;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.entity.player.InventoryPlayer;
import net.minecraft.inventory.ICrafting;
@@ -17,18 +16,19 @@ import net.minecraft.item.ItemStack;
public class CONTAINER_HatchNbtConsumable extends GT_Container {
- public final int mInputslotCount;
- private final int mTotalSlotCount;
-
- public CONTAINER_HatchNbtConsumable(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aInputslotCount) {
+ public final int mInputslotCount;
+ private final int mTotalSlotCount;
+
+ public CONTAINER_HatchNbtConsumable(
+ InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, int aInputslotCount) {
super(aInventoryPlayer, aTileEntity);
- mInputslotCount = aInputslotCount;
- mTotalSlotCount = aInputslotCount*2;
+ mInputslotCount = aInputslotCount;
+ mTotalSlotCount = aInputslotCount * 2;
mTileEntity = aTileEntity;
if (mTileEntity != null && mTileEntity.getMetaTileEntity() != null) {
addSlots(aInventoryPlayer);
if (doesBindPlayerInventory()) {
- bindPlayerInventory(aInventoryPlayer);
+ bindPlayerInventory(aInventoryPlayer);
}
detectAndSendChanges();
} else {
@@ -38,63 +38,61 @@ public class CONTAINER_HatchNbtConsumable extends GT_Container {
@Override
public void addSlots(InventoryPlayer aInventoryPlayer) {
- if (mTotalSlotCount == 8) {
- final int aSlotYStart = 26;
- final int aSlotYFinish = aSlotYStart + (18*2);
- final int aSlotXStart1 = 26;
- final int aSlotXFinish1 = aSlotXStart1 + (18*2);
- final int aSlotXStart2 = 116;
- final int aSlotXFinish2 = aSlotXStart2 + (18*2);
- int aSlotID = 0;
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) {
- addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y));
- }
- }
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) {
- addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y));
- }
- }
- }
- else if (mTotalSlotCount == 18) {
- int aSlotYStart = 20;
- int aSlotYFinish = aSlotYStart + (18*3);
- int aSlotXStart1 = 26;
- int aSlotXFinish1 = aSlotXStart1 + (18*3);
- int aSlotXStart2 = 98;
- int aSlotXFinish2 = aSlotXStart2 + (18*3);
- int aSlotID = 0;
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) {
- addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y));
- }
- }
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) {
- addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y));
- }
- }
- }
- else if (mTotalSlotCount == 32) {
- int aSlotYStart = 8;
- int aSlotYFinish = aSlotYStart + (18*4);
- int aSlotXStart1 = 8;
- int aSlotXFinish1 = aSlotXStart1 + (18*4);
- int aSlotXStart2 = 97;
- int aSlotXFinish2 = aSlotXStart2 + (18*4);
- int aSlotID = 0;
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) {
- addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y));
- }
- }
- for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
- for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) {
- addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y));
- }
- }
- }
+ if (mTotalSlotCount == 8) {
+ final int aSlotYStart = 26;
+ final int aSlotYFinish = aSlotYStart + (18 * 2);
+ final int aSlotXStart1 = 26;
+ final int aSlotXFinish1 = aSlotXStart1 + (18 * 2);
+ final int aSlotXStart2 = 116;
+ final int aSlotXFinish2 = aSlotXStart2 + (18 * 2);
+ int aSlotID = 0;
+ for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
+ for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) {
+ addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y));
+ }
+ }
+ for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
+ for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) {
+ addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y));
+ }
+ }
+ } else if (mTotalSlotCount == 18) {
+ int aSlotYStart = 20;
+ int aSlotYFinish = aSlotYStart + (18 * 3);
+ int aSlotXStart1 = 26;
+ int aSlotXFinish1 = aSlotXStart1 + (18 * 3);
+ int aSlotXStart2 = 98;
+ int aSlotXFinish2 = aSlotXStart2 + (18 * 3);
+ int aSlotID = 0;
+ for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
+ for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) {
+ addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y));
+ }
+ }
+ for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
+ for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) {
+ addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y));
+ }
+ }
+ } else if (mTotalSlotCount == 32) {
+ int aSlotYStart = 8;
+ int aSlotYFinish = aSlotYStart + (18 * 4);
+ int aSlotXStart1 = 8;
+ int aSlotXFinish1 = aSlotXStart1 + (18 * 4);
+ int aSlotXStart2 = 97;
+ int aSlotXFinish2 = aSlotXStart2 + (18 * 4);
+ int aSlotID = 0;
+ for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
+ for (int x = aSlotXStart1; x < aSlotXFinish1; x += 18) {
+ addSlotToContainer(new Slot(mTileEntity, aSlotID++, x, y));
+ }
+ }
+ for (int y = aSlotYStart; y < aSlotYFinish; y += 18) {
+ for (int x = aSlotXStart2; x < aSlotXFinish2; x += 18) {
+ addSlotToContainer(new ViewingSlot(mTileEntity, aSlotID++, x, y));
+ }
+ }
+ }
}
@Override
@@ -106,16 +104,35 @@ public class CONTAINER_HatchNbtConsumable extends GT_Container {
public int getShiftClickSlotCount() {
return mInputslotCount;
}
-
+
/*
* Uselss stuff copied from GT
*/
-
- public int mActive = 0, mMaxProgressTime = 0, mProgressTime = 0, mEnergy = 0, mSteam = 0, mSteamStorage = 0, mStorage = 0, mOutput = 0, mInput = 0, mID = 0, mDisplayErrorCode = 0;
- private int oActive = 0, oMaxProgressTime = 0, oProgressTime = 0, oEnergy = 0, oSteam = 0, oSteamStorage = 0, oStorage = 0, oOutput = 0, oInput = 0, oID = 0, oDisplayErrorCode = 0, mTimer = 0;
+ public int mActive = 0,
+ mMaxProgressTime = 0,
+ mProgressTime = 0,
+ mEnergy = 0,
+ mSteam = 0,
+ mSteamStorage = 0,
+ mStorage = 0,
+ mOutput = 0,
+ mInput = 0,
+ mID = 0,
+ mDisplayErrorCode = 0;
+ private int oActive = 0,
+ oMaxProgressTime = 0,
+ oProgressTime = 0,
+ oEnergy = 0,
+ oSteam = 0,
+ oSteamStorage = 0,
+ oStorage = 0,
+ oOutput = 0,
+ oInput = 0,
+ oID = 0,
+ oDisplayErrorCode = 0,
+ mTimer = 0;
-
@Override
public void detectAndSendChanges() {
super.detectAndSendChanges();
@@ -252,31 +269,30 @@ public class CONTAINER_HatchNbtConsumable extends GT_Container {
public boolean canInteractWith(EntityPlayer player) {
return mTileEntity.isUseableByPlayer(player);
}
-
- public String trans(String aKey, String aEnglish){
- return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_"+aKey, aEnglish, false);
+
+ public String trans(String aKey, String aEnglish) {
+ return GT_LanguageManager.addStringLocalization("Interaction_DESCRIPTION_Index_" + aKey, aEnglish, false);
}
-
+
private static class ViewingSlot extends SlotNoInput {
- public ViewingSlot(IInventory inventory, int index, int x, int y) {
- super(inventory, index, x, y);
- }
+ public ViewingSlot(IInventory inventory, int index, int x, int y) {
+ super(inventory, index, x, y);
+ }
- @Override
- public boolean isItemValid(ItemStack itemstack) {
- return false;
- }
+ @Override
+ public boolean isItemValid(ItemStack itemstack) {
+ return false;
+ }
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
- @Override
- public boolean canTakeStack(EntityPlayer p_82869_1_) {
- return true;
- }
-
+ @Override
+ public boolean canTakeStack(EntityPlayer p_82869_1_) {
+ return true;
+ }
}
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java
index 5623f0e224..cd0381a1f1 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_1by1_Turbine.java
@@ -1,11 +1,10 @@
package gtPlusPlus.xmod.gregtech.api.gui.hatches;
-import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import net.minecraft.entity.player.InventoryPlayer;
-
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
+import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.entity.player.InventoryPlayer;
public class GUI_1by1_Turbine extends GT_GUIContainerMetaTile_Machine {
@@ -15,8 +14,9 @@ public class GUI_1by1_Turbine extends GT_GUIContainerMetaTile_Machine {
super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + "1by1.png");
mName = aName;
}
-
- public GUI_1by1_Turbine(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
+
+ public GUI_1by1_Turbine(
+ InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
super(new CONTAINER_1by1_Turbine(aInventoryPlayer, aTileEntity), RES_PATH_GUI + aBackground + "1by1.png");
mName = aName;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java
index b427a632f7..c31b74b0f8 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_2by2.java
@@ -2,21 +2,29 @@ package gtPlusPlus.xmod.gregtech.api.gui.hatches;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import net.minecraft.entity.player.InventoryPlayer;
-
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.entity.player.InventoryPlayer;
public class GUI_2by2 extends GT_GUIContainerMetaTile_Machine {
private final String mName;
- public GUI_2by2(CONTAINER_2by2 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
+ public GUI_2by2(
+ CONTAINER_2by2 containerType,
+ InventoryPlayer aInventoryPlayer,
+ IGregTechTileEntity aTileEntity,
+ String aName) {
super(containerType, RES_PATH_GUI + "2by2.png");
mName = aName;
}
-
- public GUI_2by2(CONTAINER_2by2 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
+
+ public GUI_2by2(
+ CONTAINER_2by2 containerType,
+ InventoryPlayer aInventoryPlayer,
+ IGregTechTileEntity aTileEntity,
+ String aName,
+ String aBackground) {
super(containerType, RES_PATH_GUI + aBackground + "2by2.png");
mName = aName;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java
index aced4342b3..379d1d7941 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_4by4.java
@@ -2,21 +2,29 @@ package gtPlusPlus.xmod.gregtech.api.gui.hatches;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import net.minecraft.entity.player.InventoryPlayer;
-
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
+import net.minecraft.entity.player.InventoryPlayer;
public class GUI_4by4 extends GT_GUIContainerMetaTile_Machine {
private final String mName;
- public GUI_4by4(CONTAINER_4by4 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
+ public GUI_4by4(
+ CONTAINER_4by4 containerType,
+ InventoryPlayer aInventoryPlayer,
+ IGregTechTileEntity aTileEntity,
+ String aName) {
super(containerType, RES_PATH_GUI + "4by4.png");
mName = aName;
}
-
- public GUI_4by4(CONTAINER_4by4 containerType, InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
+
+ public GUI_4by4(
+ CONTAINER_4by4 containerType,
+ InventoryPlayer aInventoryPlayer,
+ IGregTechTileEntity aTileEntity,
+ String aName,
+ String aBackground) {
super(containerType, RES_PATH_GUI + aBackground + "4by4.png");
mName = aName;
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java
index dd19571646..47d24764cc 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/GUI_HatchNbtConsumable.java
@@ -7,46 +7,42 @@ import gregtech.api.gui.GT_GUIContainer;
public class GUI_HatchNbtConsumable extends GT_GUIContainer {
private final String mName;
- private final int mTotalSlotCount;
+ private final int mTotalSlotCount;
public final CONTAINER_HatchNbtConsumable mContainer;
-
+
public GUI_HatchNbtConsumable(CONTAINER_HatchNbtConsumable aContainer, String aName) {
- super(aContainer, RES_PATH_GUI + getTextureForGUI(aContainer.mInputslotCount*2)+".png");
+ super(aContainer, RES_PATH_GUI + getTextureForGUI(aContainer.mInputslotCount * 2) + ".png");
mContainer = aContainer;
mName = aName;
- mTotalSlotCount = aContainer.mInputslotCount*2;
- }
-
- private static final String getTextureForGUI(int aTotalSlotCOunt) {
- if (aTotalSlotCOunt == 18) {
- return "HatchNbtConsumable_3By3";
- }
- else if (aTotalSlotCOunt == 32) {
- return "HatchNbtConsumable_4By4";
- }
- else {
- return "HatchNbtConsumable_2By2";
- }
+ mTotalSlotCount = aContainer.mInputslotCount * 2;
+ }
+
+ private static final String getTextureForGUI(int aTotalSlotCOunt) {
+ if (aTotalSlotCOunt == 18) {
+ return "HatchNbtConsumable_3By3";
+ } else if (aTotalSlotCOunt == 32) {
+ return "HatchNbtConsumable_4By4";
+ } else {
+ return "HatchNbtConsumable_2By2";
+ }
}
@Override
protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- if (mTotalSlotCount == 18) {
+ if (mTotalSlotCount == 18) {
fontRendererObj.drawString(mName, 8, 4, 4210752);
fontRendererObj.drawString("Stock", 25, 14, 4210752);
- fontRendererObj.drawString("Active", 115, 14, 4210752);
- }
- else if (mTotalSlotCount == 32) {
- //fontRendererObj.drawString("Slots: "+mTotalSlotCount, 8, 4, 4210752);
- //fontRendererObj.drawString(mName, 8, 4, 4210752);
- //fontRendererObj.drawString("Stock", 25, 16, 4210752);
- //fontRendererObj.drawString("Active", 115, 16, 4210752);
- }
- else {
+ fontRendererObj.drawString("Active", 115, 14, 4210752);
+ } else if (mTotalSlotCount == 32) {
+ // fontRendererObj.drawString("Slots: "+mTotalSlotCount, 8, 4, 4210752);
+ // fontRendererObj.drawString(mName, 8, 4, 4210752);
+ // fontRendererObj.drawString("Stock", 25, 16, 4210752);
+ // fontRendererObj.drawString("Active", 115, 16, 4210752);
+ } else {
fontRendererObj.drawString(mName, 8, 4, 4210752);
fontRendererObj.drawString("Stock", 25, 16, 4210752);
- fontRendererObj.drawString("Active", 115, 16, 4210752);
- }
+ fontRendererObj.drawString("Active", 115, 16, 4210752);
+ }
}
@Override
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java
index 00d022c481..52627305e2 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_2by2.java
@@ -1,24 +1,21 @@
package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge;
-import net.minecraft.entity.player.InventoryPlayer;
-
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
import gtPlusPlus.core.slots.SlotElectric;
import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_2by2;
+import net.minecraft.entity.player.InventoryPlayer;
-public class CONTAINER_Electric_2by2 extends CONTAINER_2by2{
+public class CONTAINER_Electric_2by2 extends CONTAINER_2by2 {
- public CONTAINER_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
+ public CONTAINER_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
+ super(aInventoryPlayer, aTileEntity);
+ }
+
+ @Override
public void addSlots(InventoryPlayer aInventoryPlayer) {
addSlotToContainer(new SlotElectric(mTileEntity, 0, 71, 26));
addSlotToContainer(new SlotElectric(mTileEntity, 1, 89, 26));
addSlotToContainer(new SlotElectric(mTileEntity, 2, 71, 44));
addSlotToContainer(new SlotElectric(mTileEntity, 3, 89, 44));
}
-
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java
index 1f833eb3cb..64f0f00fbd 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/CONTAINER_Electric_4by4.java
@@ -1,18 +1,15 @@
package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge;
-import net.minecraft.entity.player.InventoryPlayer;
-
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
import gtPlusPlus.core.slots.SlotElectric;
import gtPlusPlus.xmod.gregtech.api.gui.hatches.CONTAINER_4by4;
+import net.minecraft.entity.player.InventoryPlayer;
-public class CONTAINER_Electric_4by4 extends CONTAINER_4by4{
-
- public CONTAINER_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
+public class CONTAINER_Electric_4by4 extends CONTAINER_4by4 {
+ public CONTAINER_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
+ super(aInventoryPlayer, aTileEntity);
+ }
@Override
public void addSlots(InventoryPlayer aInventoryPlayer) {
@@ -33,5 +30,4 @@ public class CONTAINER_Electric_4by4 extends CONTAINER_4by4{
addSlotToContainer(new SlotElectric(mTileEntity, 14, 89, 62));
addSlotToContainer(new SlotElectric(mTileEntity, 15, 107, 62));
}
-
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java
index 9be7104bbc..de06a97aaa 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_2by2.java
@@ -2,20 +2,22 @@ package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import net.minecraft.entity.player.InventoryPlayer;
-
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_2by2;
+import net.minecraft.entity.player.InventoryPlayer;
-public class GUI_Electric_2by2 extends GUI_2by2{
+public class GUI_Electric_2by2 extends GUI_2by2 {
- public GUI_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName);
- }
-
- public GUI_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
- super(new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, RES_PATH_GUI + aBackground + "2by2.png");
+ public GUI_Electric_2by2(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
+ super(new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName);
}
+ public GUI_Electric_2by2(
+ InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
+ super(
+ new CONTAINER_Electric_2by2(aInventoryPlayer, aTileEntity),
+ aInventoryPlayer,
+ aTileEntity,
+ RES_PATH_GUI + aBackground + "2by2.png");
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java
index ed3fce5e2c..16b1a44fea 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/hatches/charge/GUI_Electric_4by4.java
@@ -2,21 +2,22 @@ package gtPlusPlus.xmod.gregtech.api.gui.hatches.charge;
import static gregtech.api.enums.GT_Values.RES_PATH_GUI;
-import net.minecraft.entity.player.InventoryPlayer;
-
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-
import gtPlusPlus.xmod.gregtech.api.gui.hatches.GUI_4by4;
+import net.minecraft.entity.player.InventoryPlayer;
-public class GUI_Electric_4by4 extends GUI_4by4{
-
- public GUI_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
- super(new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName);
- }
-
- public GUI_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
- super(new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, RES_PATH_GUI + aBackground + "4by4.png");
+public class GUI_Electric_4by4 extends GUI_4by4 {
+ public GUI_Electric_4by4(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName) {
+ super(new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity), aInventoryPlayer, aTileEntity, aName);
}
+ public GUI_Electric_4by4(
+ InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aName, String aBackground) {
+ super(
+ new CONTAINER_Electric_4by4(aInventoryPlayer, aTileEntity),
+ aInventoryPlayer,
+ aTileEntity,
+ RES_PATH_GUI + aBackground + "4by4.png");
+ }
}