aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic
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/basic
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/basic')
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java168
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java326
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java118
-rw-r--r--src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java115
4 files changed, 362 insertions, 365 deletions
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java
index e4dc7835cb..373ba8ae08 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/CONTAINER_PollutionCleaner.java
@@ -1,22 +1,18 @@
package gtPlusPlus.xmod.gregtech.api.gui.basic;
-import java.util.Iterator;
-
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
-
-import net.minecraft.entity.player.EntityPlayer;
-import net.minecraft.entity.player.InventoryPlayer;
-import net.minecraft.inventory.ICrafting;
-import net.minecraft.inventory.Slot;
-import net.minecraft.item.ItemStack;
-
import gregtech.api.gui.*;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gregtech.api.metatileentity.implementations.GT_MetaTileEntity_BasicMachine;
import gtPlusPlus.api.objects.Logger;
import gtPlusPlus.core.slots.SlotPollutionScrubber;
import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaAtmosphericReconditioner;
+import java.util.Iterator;
+import net.minecraft.entity.player.EntityPlayer;
+import net.minecraft.entity.player.InventoryPlayer;
+import net.minecraft.inventory.ICrafting;
+import net.minecraft.item.ItemStack;
/**
* NEVER INCLUDE THIS FILE IN YOUR MOD!!!
@@ -25,82 +21,80 @@ import gtPlusPlus.xmod.gregtech.common.tileentities.machines.basic.GregtechMetaA
*/
public class CONTAINER_PollutionCleaner extends GT_Container_BasicTank {
- public boolean mFluidTransfer = false, mItemTransfer = false, mStuttering = false;
- public int mReduction = 0;
-
- public CONTAINER_PollutionCleaner(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- @Override
- public void addSlots(InventoryPlayer aInventoryPlayer) {
-
- int tStartIndex = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).getInputSlot();
- int aTier = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).mTier;
-
-
- //Add 2 Item Slots
- addSlotToContainer(new SlotPollutionScrubber(0, aTier, mTileEntity, tStartIndex++, 53, 25));
- addSlotToContainer(new SlotPollutionScrubber(1, aTier, mTileEntity, tStartIndex++, 107, 25));
- // Upgrade Slot
- addSlotToContainer(new SlotPollutionScrubber(2, aTier, mTileEntity, tStartIndex++, 125, 63));
-
- }
-
- @Override
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
- Logger.INFO("Clicked on slot "+aSlotIndex);
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
-
- Logger.INFO("TEST");
- mReduction = ((GregtechMetaAtmosphericReconditioner) mTileEntity.getMetaTileEntity()).mPollutionReduction;
-
- Iterator var2 = this.crafters.iterator();
- while (var2.hasNext()) {
- ICrafting var1 = (ICrafting) var2.next();
- var1.sendProgressBarUpdate(this, 105, mReduction);
- }
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 105:
- mReduction = (par2);
- break;
- }
- }
-
- @Override
- public int getSlotStartIndex() {
- return 0;
- }
-
- @Override
- public int getShiftClickStartIndex() {
- return 0;
- }
-
- @Override
- public int getSlotCount() {
- return getShiftClickSlotCount();
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 3;
- }
+ public boolean mFluidTransfer = false, mItemTransfer = false, mStuttering = false;
+ public int mReduction = 0;
+
+ public CONTAINER_PollutionCleaner(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
+ super(aInventoryPlayer, aTileEntity);
+ }
+
+ @Override
+ public void addSlots(InventoryPlayer aInventoryPlayer) {
+
+ int tStartIndex = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).getInputSlot();
+ int aTier = ((GT_MetaTileEntity_BasicMachine) mTileEntity.getMetaTileEntity()).mTier;
+
+ // Add 2 Item Slots
+ addSlotToContainer(new SlotPollutionScrubber(0, aTier, mTileEntity, tStartIndex++, 53, 25));
+ addSlotToContainer(new SlotPollutionScrubber(1, aTier, mTileEntity, tStartIndex++, 107, 25));
+ // Upgrade Slot
+ addSlotToContainer(new SlotPollutionScrubber(2, aTier, mTileEntity, tStartIndex++, 125, 63));
+ }
+
+ @Override
+ public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
+ Logger.INFO("Clicked on slot " + aSlotIndex);
+ return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
+ }
+
+ @Override
+ public void detectAndSendChanges() {
+ super.detectAndSendChanges();
+ if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) return;
+
+ Logger.INFO("TEST");
+ mReduction = ((GregtechMetaAtmosphericReconditioner) mTileEntity.getMetaTileEntity()).mPollutionReduction;
+
+ Iterator var2 = this.crafters.iterator();
+ while (var2.hasNext()) {
+ ICrafting var1 = (ICrafting) var2.next();
+ var1.sendProgressBarUpdate(this, 105, mReduction);
+ }
+ }
+
+ @Override
+ public void addCraftingToCrafters(ICrafting par1ICrafting) {
+ super.addCraftingToCrafters(par1ICrafting);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void updateProgressBar(int par1, int par2) {
+ super.updateProgressBar(par1, par2);
+ switch (par1) {
+ case 105:
+ mReduction = (par2);
+ break;
+ }
+ }
+
+ @Override
+ public int getSlotStartIndex() {
+ return 0;
+ }
+
+ @Override
+ public int getShiftClickStartIndex() {
+ return 0;
+ }
+
+ @Override
+ public int getSlotCount() {
+ return getShiftClickSlotCount();
+ }
+
+ @Override
+ public int getShiftClickSlotCount() {
+ return 3;
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java
index 9bca97de82..8380b2958f 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_Container_CropHarvestor.java
@@ -17,171 +17,163 @@ import net.minecraft.item.ItemStack;
public class GT_Container_CropHarvestor extends GT_ContainerMetaTile_Machine {
- public boolean mModeAlternative = false;
- public int mWaterAmount = 0;
- public int mWaterRealAmount = 0;
-
- public GT_Container_CropHarvestor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
- super(aInventoryPlayer, aTileEntity);
- }
-
- public void addSlots(InventoryPlayer aInventoryPlayer) {
-
-
- int aSlot = 1;
-
- addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 48, 64, false, true, 1));
- addSlotToContainer(new SlotWeedEx(mTileEntity, aSlot++, 8, 14));
- addSlotToContainer(new SlotWeedEx(mTileEntity, aSlot++, 26, 14));
- addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 8, 32));
- addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 26, 32));
- addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 8, 50));
- addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 26, 50));
-
-
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 61, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 79, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 97, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 115, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 133, 7));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 151, 7));
-
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 61, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 79, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 97, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 115, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 133, 25));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 151, 25));
-
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 61, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 79, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 97, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 115, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 133, 43));
- addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 151, 43));
-
-
- }
-
- public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
-
- GT_MetaTileEntity_CropHarvestor machine = (GT_MetaTileEntity_CropHarvestor) mTileEntity.getMetaTileEntity();
-
- if (aSlotIndex == 0) {
- machine.mModeAlternative = !machine.mModeAlternative;
- return null;
- }
-
- return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
- }
-
- @Override
- public int getSlotCount() {
- return 24;
- }
-
- @Override
- public int getSlotStartIndex() {
- return 1;
- }
-
- @Override
- public int getShiftClickSlotCount() {
- return 6;
- }
-
- @Override
- public void detectAndSendChanges() {
- super.detectAndSendChanges();
- if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) {
- return;
- }
-
- // GT_MetaTileEntity_Boiler.getCapacity() is used for both water and steam capacity.
- int capacity = ((GT_MetaTileEntity_CropHarvestor) this.mTileEntity.getMetaTileEntity()).getCapacity();
-
- mModeAlternative = ((GT_MetaTileEntity_CropHarvestor) mTileEntity.getMetaTileEntity()).mModeAlternative;
- mWaterRealAmount = ((GT_MetaTileEntity_CropHarvestor) mTileEntity.getMetaTileEntity()).getFluidAmount();
- this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterRealAmount * 54 / (capacity - 100)));
- for (Object crafter : this.crafters) {
- ICrafting var1 = (ICrafting) crafter;
- var1.sendProgressBarUpdate(this, 102, mModeAlternative ? 1 : 0);
- var1.sendProgressBarUpdate(this, 103, this.mWaterAmount);
- var1.sendProgressBarUpdate(this, 104, this.mWaterRealAmount);
- }
- }
-
- @Override
- public void addCraftingToCrafters(ICrafting par1ICrafting) {
- super.addCraftingToCrafters(par1ICrafting);
- }
-
- @Override
- @SideOnly(Side.CLIENT)
- public void updateProgressBar(int par1, int par2) {
- super.updateProgressBar(par1, par2);
- switch (par1) {
- case 102:
- mModeAlternative = (par2 != 0);
- break;
- case 103:
- this.mWaterAmount = par2;
- break;
- case 104:
- this.mWaterRealAmount = par2;
- break;
- }
- }
-
- public static class SlotWeedEx extends Slot {
-
- public SlotWeedEx(final IInventory inventory, final int slot, final int x, final int y) {
- super(inventory, slot, x, y);
-
- }
-
- @Override
- public synchronized boolean isItemValid(final ItemStack itemstack) {
- return isWeedEx(itemstack);
- }
-
- @Override
- public int getSlotStackLimit() {
- return 1;
- }
-
- private static boolean isWeedEx(ItemStack aStack) {
- if (aStack != null && aStack.getItem() instanceof ItemIC2) {
- if (aStack.getItem().getUnlocalizedName().equals("ic2.itemWeedEx")) {
- return true;
- }
- }
- return false;
- }
- }
-
- public class SlotFertilizer extends Slot {
-
- public SlotFertilizer(final IInventory inventory, final int slot, final int x, final int y) {
- super(inventory, slot, x, y);
-
- }
-
- @Override
- public synchronized boolean isItemValid(final ItemStack aStack) {
- if (aStack != null && aStack.getItem() instanceof ItemIC2) {
- if (aStack.getItem().getUnlocalizedName().equals("ic2.itemFertilizer")) {
- return true;
- }
- }
- return false;
- }
-
- @Override
- public int getSlotStackLimit() {
- return 64;
- }
-
- }
-
+ public boolean mModeAlternative = false;
+ public int mWaterAmount = 0;
+ public int mWaterRealAmount = 0;
+
+ public GT_Container_CropHarvestor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity) {
+ super(aInventoryPlayer, aTileEntity);
+ }
+
+ public void addSlots(InventoryPlayer aInventoryPlayer) {
+
+ int aSlot = 1;
+
+ addSlotToContainer(new GT_Slot_Holo(mTileEntity, 0, 48, 64, false, true, 1));
+ addSlotToContainer(new SlotWeedEx(mTileEntity, aSlot++, 8, 14));
+ addSlotToContainer(new SlotWeedEx(mTileEntity, aSlot++, 26, 14));
+ addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 8, 32));
+ addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 26, 32));
+ addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 8, 50));
+ addSlotToContainer(new SlotFertilizer(mTileEntity, aSlot++, 26, 50));
+
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 61, 7));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 79, 7));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 97, 7));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 115, 7));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 133, 7));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 151, 7));
+
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 61, 25));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 79, 25));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 97, 25));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 115, 25));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 133, 25));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 151, 25));
+
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 61, 43));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 79, 43));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 97, 43));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 115, 43));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 133, 43));
+ addSlotToContainer(new SlotNoInput(mTileEntity, aSlot++, 151, 43));
+ }
+
+ public ItemStack slotClick(int aSlotIndex, int aMouseclick, int aShifthold, EntityPlayer aPlayer) {
+
+ GT_MetaTileEntity_CropHarvestor machine = (GT_MetaTileEntity_CropHarvestor) mTileEntity.getMetaTileEntity();
+
+ if (aSlotIndex == 0) {
+ machine.mModeAlternative = !machine.mModeAlternative;
+ return null;
+ }
+
+ return super.slotClick(aSlotIndex, aMouseclick, aShifthold, aPlayer);
+ }
+
+ @Override
+ public int getSlotCount() {
+ return 24;
+ }
+
+ @Override
+ public int getSlotStartIndex() {
+ return 1;
+ }
+
+ @Override
+ public int getShiftClickSlotCount() {
+ return 6;
+ }
+
+ @Override
+ public void detectAndSendChanges() {
+ super.detectAndSendChanges();
+ if (mTileEntity.isClientSide() || mTileEntity.getMetaTileEntity() == null) {
+ return;
+ }
+
+ // GT_MetaTileEntity_Boiler.getCapacity() is used for both water and steam capacity.
+ int capacity = ((GT_MetaTileEntity_CropHarvestor) this.mTileEntity.getMetaTileEntity()).getCapacity();
+
+ mModeAlternative = ((GT_MetaTileEntity_CropHarvestor) mTileEntity.getMetaTileEntity()).mModeAlternative;
+ mWaterRealAmount = ((GT_MetaTileEntity_CropHarvestor) mTileEntity.getMetaTileEntity()).getFluidAmount();
+ this.mWaterAmount = Math.min(54, Math.max(0, this.mWaterRealAmount * 54 / (capacity - 100)));
+ for (Object crafter : this.crafters) {
+ ICrafting var1 = (ICrafting) crafter;
+ var1.sendProgressBarUpdate(this, 102, mModeAlternative ? 1 : 0);
+ var1.sendProgressBarUpdate(this, 103, this.mWaterAmount);
+ var1.sendProgressBarUpdate(this, 104, this.mWaterRealAmount);
+ }
+ }
+
+ @Override
+ public void addCraftingToCrafters(ICrafting par1ICrafting) {
+ super.addCraftingToCrafters(par1ICrafting);
+ }
+
+ @Override
+ @SideOnly(Side.CLIENT)
+ public void updateProgressBar(int par1, int par2) {
+ super.updateProgressBar(par1, par2);
+ switch (par1) {
+ case 102:
+ mModeAlternative = (par2 != 0);
+ break;
+ case 103:
+ this.mWaterAmount = par2;
+ break;
+ case 104:
+ this.mWaterRealAmount = par2;
+ break;
+ }
+ }
+
+ public static class SlotWeedEx extends Slot {
+
+ public SlotWeedEx(final IInventory inventory, final int slot, final int x, final int y) {
+ super(inventory, slot, x, y);
+ }
+
+ @Override
+ public synchronized boolean isItemValid(final ItemStack itemstack) {
+ return isWeedEx(itemstack);
+ }
+
+ @Override
+ public int getSlotStackLimit() {
+ return 1;
+ }
+
+ private static boolean isWeedEx(ItemStack aStack) {
+ if (aStack != null && aStack.getItem() instanceof ItemIC2) {
+ if (aStack.getItem().getUnlocalizedName().equals("ic2.itemWeedEx")) {
+ return true;
+ }
+ }
+ return false;
+ }
+ }
+
+ public class SlotFertilizer extends Slot {
+
+ public SlotFertilizer(final IInventory inventory, final int slot, final int x, final int y) {
+ super(inventory, slot, x, y);
+ }
+
+ @Override
+ public synchronized boolean isItemValid(final ItemStack aStack) {
+ if (aStack != null && aStack.getItem() instanceof ItemIC2) {
+ if (aStack.getItem().getUnlocalizedName().equals("ic2.itemFertilizer")) {
+ return true;
+ }
+ }
+ return false;
+ }
+
+ @Override
+ public int getSlotStackLimit() {
+ return 64;
+ }
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java
index 504ae61b4a..1b04ab15fe 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GT_GUIContainer_CropHarvestor.java
@@ -1,75 +1,77 @@
package gtPlusPlus.xmod.gregtech.api.gui.basic;
-import java.util.ArrayList;
-import java.util.List;
-
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
-import gregtech.common.gui.GT_Container_Boiler;
import gtPlusPlus.core.lib.CORE;
+import java.util.ArrayList;
+import java.util.List;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.entity.player.InventoryPlayer;
public class GT_GUIContainer_CropHarvestor extends GT_GUIContainerMetaTile_Machine {
- private final String mLocalName;
-
- public GT_GUIContainer_CropHarvestor(InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aLocalName) {
- super(new GT_Container_CropHarvestor(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "CropHarvestor.png");
- mLocalName = aLocalName;
- }
-
- @Override
- protected void drawGuiContainerForegroundLayer(int par1, int par2) {
- drawTooltip(par1, par2);
- //fontRendererObj.drawString("Crop Manager ("+this.mContainer.mTileEntity.getInputVoltage()+"v)", 8, 4, 4210752);
- //fontRendererObj.drawString(mLocalName, 70, 69, 4210752);
- }
+ private final String mLocalName;
- @Override
- protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- int x = (width - xSize) / 2;
- int y = (height - ySize) / 2;
- drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
+ public GT_GUIContainer_CropHarvestor(
+ InventoryPlayer aInventoryPlayer, IGregTechTileEntity aTileEntity, String aLocalName) {
+ super(new GT_Container_CropHarvestor(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "CropHarvestor.png");
+ mLocalName = aLocalName;
+ }
- if (((GT_Container_CropHarvestor) mContainer).mModeAlternative) {
- drawTexturedModalRect(x + 48, y + 64, 177, 37, 16, 16);
- }
+ @Override
+ protected void drawGuiContainerForegroundLayer(int par1, int par2) {
+ drawTooltip(par1, par2);
+ // fontRendererObj.drawString("Crop Manager ("+this.mContainer.mTileEntity.getInputVoltage()+"v)", 8, 4,
+ // 4210752);
+ // fontRendererObj.drawString(mLocalName, 70, 69, 4210752);
+ }
- int tScale = ((GT_Container_CropHarvestor) this.mContainer).mWaterAmount;
- if (tScale > 0) {
- drawTexturedModalRect(x + 47, y + 61 - tScale, 204, 54 - tScale, 10, tScale);
- };
+ @Override
+ protected void drawGuiContainerBackgroundLayer(float par1, int par2, int par3) {
+ super.drawGuiContainerBackgroundLayer(par1, par2, par3);
+ int x = (width - xSize) / 2;
+ int y = (height - ySize) / 2;
+ drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
- }
+ if (((GT_Container_CropHarvestor) mContainer).mModeAlternative) {
+ drawTexturedModalRect(x + 48, y + 64, 177, 37, 16, 16);
+ }
- private void drawTooltip(int x2, int y2) {
- int xStart = (width - xSize) / 2;
- int yStart = (height - ySize) / 2;
- int x = x2 - xStart;
- int y = y2 - yStart + 5;
- List<String> list = new ArrayList<>();
- if (y >= 68 && y <= 85) {
- if (x >= 47 && x <= 64) {
- if (((GT_Container_CropHarvestor) mContainer).mModeAlternative) {
- list.add("Disable Hydration/Fertilizing/Weed-EX");
- }
- else {
- list.add("Enable Hydration/Fertilizing/Weed-EX");
- }
- }
- }
- if (y >= 12 && y <= 66) {
- if (x >= 47 && x <= 56) {
- int aWater = ((GT_Container_CropHarvestor) mContainer).mWaterRealAmount;
- list.add("Water: "+aWater+"L / "+((GT_Container_CropHarvestor) mContainer).mTileEntity.getMetaTileEntity().getCapacity()+"L");
- }
- }
- if (!list.isEmpty()) {
- drawHoveringText(list, x, y, fontRendererObj);
- RenderHelper.enableGUIStandardItemLighting();
- }
- }
+ int tScale = ((GT_Container_CropHarvestor) this.mContainer).mWaterAmount;
+ if (tScale > 0) {
+ drawTexturedModalRect(x + 47, y + 61 - tScale, 204, 54 - tScale, 10, tScale);
+ }
+ ;
+ }
+ private void drawTooltip(int x2, int y2) {
+ int xStart = (width - xSize) / 2;
+ int yStart = (height - ySize) / 2;
+ int x = x2 - xStart;
+ int y = y2 - yStart + 5;
+ List<String> list = new ArrayList<>();
+ if (y >= 68 && y <= 85) {
+ if (x >= 47 && x <= 64) {
+ if (((GT_Container_CropHarvestor) mContainer).mModeAlternative) {
+ list.add("Disable Hydration/Fertilizing/Weed-EX");
+ } else {
+ list.add("Enable Hydration/Fertilizing/Weed-EX");
+ }
+ }
+ }
+ if (y >= 12 && y <= 66) {
+ if (x >= 47 && x <= 56) {
+ int aWater = ((GT_Container_CropHarvestor) mContainer).mWaterRealAmount;
+ list.add("Water: " + aWater + "L / "
+ + ((GT_Container_CropHarvestor) mContainer)
+ .mTileEntity
+ .getMetaTileEntity()
+ .getCapacity() + "L");
+ }
+ }
+ if (!list.isEmpty()) {
+ drawHoveringText(list, x, y, fontRendererObj);
+ RenderHelper.enableGUIStandardItemLighting();
+ }
+ }
}
diff --git a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java
index 96e8e362ef..3e4280f650 100644
--- a/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java
+++ b/src/main/java/gtPlusPlus/xmod/gregtech/api/gui/basic/GUI_PollutionCleaner.java
@@ -1,67 +1,76 @@
package gtPlusPlus.xmod.gregtech.api.gui.basic;
-import java.util.ArrayList;
-import java.util.List;
-
import gregtech.api.gui.GT_GUIContainerMetaTile_Machine;
import gregtech.api.interfaces.tileentity.IGregTechTileEntity;
import gtPlusPlus.core.lib.CORE;
+import java.util.ArrayList;
+import java.util.List;
import net.minecraft.client.renderer.RenderHelper;
import net.minecraft.entity.player.InventoryPlayer;
public class GUI_PollutionCleaner extends GT_GUIContainerMetaTile_Machine {
- public final String mName;
- public final String mNEI;
- public final byte mProgressBarDirection;
- public final byte mProgressBarAmount;
- public int mReduction;
+ public final String mName;
+ public final String mNEI;
+ public final byte mProgressBarDirection;
+ public final byte mProgressBarAmount;
+ public int mReduction;
- public GUI_PollutionCleaner(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity,
- final String aName, final String aTextureFile) {
- this(aInventoryPlayer, aTileEntity, aName, aTextureFile, "PollutionCleaner",(byte) 0, (byte) 1);
- }
+ public GUI_PollutionCleaner(
+ final InventoryPlayer aInventoryPlayer,
+ final IGregTechTileEntity aTileEntity,
+ final String aName,
+ final String aTextureFile) {
+ this(aInventoryPlayer, aTileEntity, aName, aTextureFile, "PollutionCleaner", (byte) 0, (byte) 1);
+ }
- public GUI_PollutionCleaner(final InventoryPlayer aInventoryPlayer, final IGregTechTileEntity aTileEntity,
- final String aName, final String aTextureFile, final String aNEI, final byte aProgressBarDirection,
- final byte aProgressBarAmount) {
- super(new CONTAINER_PollutionCleaner(aInventoryPlayer, aTileEntity), CORE.RES_PATH_GUI + "PollutionCleaner.png");
- this.mProgressBarDirection = aProgressBarDirection;
- this.mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount);
- this.mName = aName;
- this.mNEI = aNEI;
- }
+ public GUI_PollutionCleaner(
+ final InventoryPlayer aInventoryPlayer,
+ final IGregTechTileEntity aTileEntity,
+ final String aName,
+ final String aTextureFile,
+ final String aNEI,
+ final byte aProgressBarDirection,
+ final byte aProgressBarAmount) {
+ super(
+ new CONTAINER_PollutionCleaner(aInventoryPlayer, aTileEntity),
+ CORE.RES_PATH_GUI + "PollutionCleaner.png");
+ this.mProgressBarDirection = aProgressBarDirection;
+ this.mProgressBarAmount = (byte) Math.max(1, aProgressBarAmount);
+ this.mName = aName;
+ this.mNEI = aNEI;
+ }
- @Override
- protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
- this.fontRendererObj.drawString(this.mName, 8, 4, 4210752);
- this.drawTooltip(par1, par2);
- }
+ @Override
+ protected void drawGuiContainerForegroundLayer(final int par1, final int par2) {
+ this.fontRendererObj.drawString(this.mName, 8, 4, 4210752);
+ this.drawTooltip(par1, par2);
+ }
- private void drawTooltip(final int x2, final int y2) {
- final int xStart = (this.width - this.xSize) / 2;
- final int yStart = (this.height - this.ySize) / 2;
- final int x3 = x2 - xStart;
- final int y3 = y2 - yStart + 5;
- final List<String> list = new ArrayList<String>();
- if (y3 >= 67 && y3 <= 84) {
- if (x3 >= 77 && x3 <= 95) {
- //Do Dumb shit
- CONTAINER_PollutionCleaner aContainerCast = (CONTAINER_PollutionCleaner) this.mContainer;
- mReduction = aContainerCast.mReduction;
- list.add("Reduction: "+mReduction+"/s");
- }
- }
- if (!list.isEmpty()) {
- this.drawHoveringText(list, x3, y3, this.fontRendererObj);
- RenderHelper.enableGUIStandardItemLighting();
- }
- }
+ private void drawTooltip(final int x2, final int y2) {
+ final int xStart = (this.width - this.xSize) / 2;
+ final int yStart = (this.height - this.ySize) / 2;
+ final int x3 = x2 - xStart;
+ final int y3 = y2 - yStart + 5;
+ final List<String> list = new ArrayList<String>();
+ if (y3 >= 67 && y3 <= 84) {
+ if (x3 >= 77 && x3 <= 95) {
+ // Do Dumb shit
+ CONTAINER_PollutionCleaner aContainerCast = (CONTAINER_PollutionCleaner) this.mContainer;
+ mReduction = aContainerCast.mReduction;
+ list.add("Reduction: " + mReduction + "/s");
+ }
+ }
+ if (!list.isEmpty()) {
+ this.drawHoveringText(list, x3, y3, this.fontRendererObj);
+ RenderHelper.enableGUIStandardItemLighting();
+ }
+ }
- @Override
- protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
- super.drawGuiContainerBackgroundLayer(par1, par2, par3);
- final int x = (this.width - this.xSize) / 2;
- final int y = (this.height - this.ySize) / 2;
- this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
- }
-} \ No newline at end of file
+ @Override
+ protected void drawGuiContainerBackgroundLayer(final float par1, final int par2, final int par3) {
+ super.drawGuiContainerBackgroundLayer(par1, par2, par3);
+ final int x = (this.width - this.xSize) / 2;
+ final int y = (this.height - this.ySize) / 2;
+ this.drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
+ }
+}