diff options
Diffstat (limited to 'src/main/java/gregtech/api/gui')
3 files changed, 6 insertions, 6 deletions
diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java index 614d459cb9..d939307971 100644 --- a/src/main/java/gregtech/api/gui/GT_Container.java +++ b/src/main/java/gregtech/api/gui/GT_Container.java @@ -124,7 +124,7 @@ public class GT_Container extends Container { if ((aShifthold == 0 || aShifthold == 1) && (aMouseclick == 0 || aMouseclick == 1)) { if (aSlotIndex == -999) { - if (aPlayerInventory.getItemStack() != null && aSlotIndex == -999) { + if (aPlayerInventory.getItemStack() != null) { if (aMouseclick == 0) { aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack(), true); aPlayerInventory.setItemStack(null); @@ -228,11 +228,11 @@ public class GT_Container extends Container { var9 |= tTempStackSize > -1; } - if (aSlot.getHasStack() && var9) { + if (var9 && aSlot.getHasStack()) { aHoldStack = aSlot.getStack(); aPlayerInventory.setInventorySlotContents(aMouseclick, aHoldStack); - if ((aSlot.inventory != aPlayerInventory || !aSlot.isItemValid(tTempStack)) && tTempStack != null) { + if (tTempStack != null && (aSlot.inventory != aPlayerInventory || !aSlot.isItemValid(tTempStack))) { if (tTempStackSize > -1) { aPlayerInventory.addItemStackToInventory(tTempStack); aSlot.decrStackSize(aHoldStack.stackSize); @@ -244,7 +244,7 @@ public class GT_Container extends Container { aSlot.putStack(tTempStack); aSlot.onPickupFromSlot(aPlayer, aHoldStack); } - } else if (!aSlot.getHasStack() && tTempStack != null && aSlot.isItemValid(tTempStack)) { + } else if (tTempStack != null && !aSlot.getHasStack() && aSlot.isItemValid(tTempStack)) { aPlayerInventory.setInventorySlotContents(aMouseclick, (ItemStack) null); aSlot.putStack(tTempStack); } diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java index 4c20715e68..b9cae3e0b3 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainerMetaTile_Machine.java @@ -29,7 +29,7 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer { super.drawGuiContainerBackgroundLayer(par1, par2, par3); if (GregTech_API.sColoredGUI && mContainer != null && mContainer.mTileEntity != null) { int tColor = mContainer.mTileEntity.getColorization() & 15; - if (tColor >= 0 && tColor < ItemDye.field_150922_c.length) { + if (tColor < ItemDye.field_150922_c.length) { tColor = ItemDye.field_150922_c[tColor]; GL11.glColor4f(((tColor >> 16) & 255) / 255.0F, ((tColor >> 8) & 255) / 255.0F, (tColor & 255) / 255.0F, 1.0F); } else GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F); diff --git a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java index 2980cd9c1d..5f3a7e1bf2 100644 --- a/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java +++ b/src/main/java/gregtech/api/gui/GT_GUIContainer_MultiMachine.java @@ -25,7 +25,7 @@ public class GT_GUIContainer_MultiMachine extends GT_GUIContainerMetaTile_Machin protected void drawGuiContainerForegroundLayer(int par1, int par2) { fontRendererObj.drawString(mName, 10, 8, 16448255); - if (mContainer != null) { + if (mContainer != null) {//(mWrench ? 0 : 1) | (mScrewdriver ? 0 : 2) | (mSoftHammer ? 0 : 4) | (mHardHammer ? 0 : 8) | (mSolderingTool ? 0 : 16) | (mCrowbar ? 0 : 32) | (mMachine ? 0 : 64)); if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 1) != 0) fontRendererObj.drawString("Pipe is loose.", 10, 16, 16448255); if ((((GT_Container_MultiMachine) mContainer).mDisplayErrorCode & 2) != 0) |