diff --git a/src/main/java/gregtech/api/gui/GT_Container.java b/src/main/java/gregtech/api/gui/GT_Container.java index 614d459c..304e215a 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/* && aSlotIndex == -999*/) { if (aMouseclick == 0) { aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack(), true); aPlayerInventory.setItemStack(null); diff --git a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java index 4e580198..ab11dbb6 100644 --- a/src/main/java/gregtech/api/items/GT_MetaBase_Item.java +++ b/src/main/java/gregtech/api/items/GT_MetaBase_Item.java @@ -207,7 +207,7 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci if (tStats[3] == -2 && tCharge <= 0) { aList.add(EnumChatFormatting.AQUA + "Empty. You should recycle it properly." + EnumChatFormatting.GRAY); } else { - aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharfge) + " / " + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] + EnumChatFormatting.GRAY); + aList.add(EnumChatFormatting.AQUA + "" + GT_Utility.formatNumbers(tCharge) + " / " + GT_Utility.formatNumbers(Math.abs(tStats[0])) + " EU - Voltage: " + V[(int) (tStats[2] >= 0 ? tStats[2] < V.length ? tStats[2] : V.length - 1 : 1)] + EnumChatFormatting.GRAY); } } } @@ -294,7 +294,7 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci chargeFromArmor(aStack, aPlayer); if (aPlayer instanceof EntityPlayer && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) return true; double tTransfer = discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, true); - if (tTransfer == aAmount) { + if (/*tTransfer == aAmount*/Math.abs(tTransfer - aAmount) < .0000001) { discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false); chargeFromArmor(aStack, aPlayer); return true; diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java index e2765861..fa66ae8c 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaPipeEntity.java @@ -159,13 +159,13 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) { GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!"); } else { - if (aID != 0) { + //if (aID != 0) { if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null); GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this); mTickTimer = 0; mID = aID; return true; - } + //} } return false; } diff --git a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java index ea2daf1b..1621a4a0 100644 --- a/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java +++ b/src/main/java/gregtech/api/metatileentity/BaseMetaTileEntity.java @@ -206,13 +206,13 @@ public class BaseMetaTileEntity extends BaseTileEntity implements IGregTechTileE if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) { GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!"); } else { - if (aID != 0) { + //if (aID != 0) { if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null); GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this); mTickTimer = 0; mID = aID; return true; - } + //} } return false; } diff --git a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java index 8fde8ab9..2679053e 100644 --- a/src/main/java/gregtech/api/util/GT_OreDictUnificator.java +++ b/src/main/java/gregtech/api/util/GT_OreDictUnificator.java @@ -261,10 +261,12 @@ public class GT_OreDictUnificator { ItemStack rStack = null; if (((aMaterialAmount >= M)/* || aMaterialAmount >= M * 32*/)) rStack = get(OrePrefixes.gem, aMaterial, aMaterialAmount / M); - if (rStack == null && (((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16)) - rStack = get(OrePrefixes.gemFlawed, aMaterial, (aMaterialAmount * 2) / M); - if (rStack == null && (((aMaterialAmount * 4) >= M))) - rStack = get(OrePrefixes.gemChipped, aMaterial, (aMaterialAmount * 4) / M); + if (rStack == null) { + if ((((aMaterialAmount * 2) % M == 0) || aMaterialAmount >= M * 16)) + rStack = get(OrePrefixes.gemFlawed, aMaterial, (aMaterialAmount * 2) / M); + if ((((aMaterialAmount * 4) >= M))) + rStack = get(OrePrefixes.gemChipped, aMaterial, (aMaterialAmount * 4) / M); + } return rStack; } diff --git a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java index 35ac55e1..e3992efc 100644 --- a/src/main/java/gregtech/common/blocks/GT_Item_Machines.java +++ b/src/main/java/gregtech/common/blocks/GT_Item_Machines.java @@ -33,10 +33,10 @@ public class GT_Item_Machines if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) { return; } - if (tDamage == 0) { - aList.add("WARNING, THE EXISTENCE OF THIS ITEM IS A BUG"); - aList.add("IF YOU GOT IT IN SURVIVAL THEN PLEASE REPORT IT"); - } else { + //if (tDamage == 0) { + //aList.add("WARNING, THE EXISTENCE OF THIS ITEM IS A BUG"); + //aList.add("IF YOU GOT IT IN SURVIVAL THEN PLEASE REPORT IT"); + //} else { TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType()); //if (temp != null) { temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj); @@ -68,7 +68,7 @@ public class GT_Item_Machines } } //} - } + //} NBTTagCompound aNBT = aStack.getTagCompound(); if (aNBT != null) { if (aNBT.getBoolean("mMuffler")) { diff --git a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java index 1a369dc2..eaf791e5 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_Drain.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_Drain.java @@ -72,8 +72,8 @@ public class GT_Cover_Drain } public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) { - if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { - } + //if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { + //} return ((IMachineProgress) aTileEntity).isAllowedToWork() == aCoverVariable < 2; } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java index 49d2e09a..d077e313 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_EnergyOnly.java @@ -33,7 +33,7 @@ public class GT_Cover_EnergyOnly public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { - if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable < 2) { + if (((IMachineProgress) aTileEntity).isAllowedToWork()/* != aCoverVariable < 2*/) { return false; } } @@ -42,7 +42,7 @@ public class GT_Cover_EnergyOnly public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) { if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) { - if (((IMachineProgress) aTileEntity).isAllowedToWork() != aCoverVariable < 2) { + if (((IMachineProgress) aTileEntity).isAllowedToWork()/* != aCoverVariable < 2*/) { return false; } } diff --git a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java index 7bca9a1d..d9aef685 100644 --- a/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java +++ b/src/main/java/gregtech/common/covers/GT_Cover_RedstoneWirelessBase.java @@ -15,7 +15,7 @@ public abstract class GT_Cover_RedstoneWirelessBase } public boolean onCoverRightclick(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity, EntityPlayer aPlayer, float aX, float aY, float aZ) { - if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && (((aY > 0.375D) && (aY < 0.625D)) || ((aSide < 2) && (((aZ > 0.375D) && (aZ < 0.625D)) || (aSide == 2) || (aSide == 3)))))) { + if (((aX > 0.375D) && (aX < 0.625D)) || ((aSide > 3) && /*(*/((aY > 0.375D) && (aY < 0.625D))/* || ((aSide < 2) && (((aZ > 0.375D) && (aZ < 0.625D)) || (aSide == 2) || (aSide == 3))))*/)) { GregTech_API.sWirelessRedstone.put(Integer.valueOf(aCoverVariable), Byte.valueOf((byte) 0)); aCoverVariable = GT_Utility.stackToInt(aPlayer.inventory.getCurrentItem()); aTileEntity.setCoverDataAtSide(aSide, aCoverVariable); diff --git a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java index 613c082b..2aa12d8e 100644 --- a/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/gui/GT_GUIContainer_BronzeBlastFurnace.java @@ -21,7 +21,7 @@ public class GT_GUIContainer_BronzeBlastFurnace drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize); if ((this.mContainer != null) && (this.mContainer.mProgressTime > 0)) { - drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (this.mContainer.mProgressTime > 0 ? 1 : 0) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11); + drawTexturedModalRect(x + 58, y + 28, 176, 0, Math.max(0, Math.min(20, (/*this.mContainer.mProgressTime > 0 ? */1/* : 0*/) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11); } } } diff --git a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java index 90daed57..6a0ab85b 100644 --- a/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java +++ b/src/main/java/gregtech/common/items/behaviors/Behaviour_Sonictron.java @@ -1,6 +1,5 @@ package gregtech.common.items.behaviors; -import gregtech.api.GregTech_API; import gregtech.api.enums.GT_Values; import gregtech.api.interfaces.IItemBehaviour; import gregtech.api.items.GT_MetaBase_Item; @@ -98,8 +97,8 @@ public class Behaviour_Sonictron } public boolean onItemUseFirst(GT_MetaBase_Item aItem, ItemStack aStack, EntityPlayer aPlayer, World aWorld, int aX, int aY, int aZ, int aSide, float hitX, float hitY, float hitZ) { - if ((!aWorld.isRemote) && (aWorld.getBlock(aX, aY, aZ) == GregTech_API.sBlockMachines) && (aWorld.getBlockMetadata(aX, aY, aZ) == 6)) { - } + //if ((!aWorld.isRemote) && (aWorld.getBlock(aX, aY, aZ) == GregTech_API.sBlockMachines) && (aWorld.getBlockMetadata(aX, aY, aZ) == 6)) { + //} setCurrentIndex(aStack, -1); return false; } diff --git a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java index 316b5542..152ac125 100644 --- a/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java +++ b/src/main/java/gregtech/common/render/GT_MetaGenerated_Item_Renderer.java @@ -23,8 +23,8 @@ public class GT_MetaGenerated_Item_Renderer GT_MetaGenerated_Item tItem; for (Iterator i$ = GT_MetaGenerated_Item.sInstances.values().iterator(); i$.hasNext(); MinecraftForgeClient.registerItemRenderer(tItem, this)) { tItem = (GT_MetaGenerated_Item) i$.next(); - if ((tItem == null) || (!tItem.useStandardMetaItemRenderer())) { - } + //if ((tItem == null) || (!tItem.useStandardMetaItemRenderer())) { + //} } } diff --git a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java index 6f3818b4..995022f4 100644 --- a/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java +++ b/src/main/java/gregtech/common/tileentities/machines/basic/GT_MetaTileEntity_Replicator.java @@ -86,8 +86,8 @@ public class GT_MetaTileEntity_Replicator Materials tMaterial; for (Iterator i$ = Materials.VALUES.iterator(); i$.hasNext(); sHeaviestElementMass = Math.max(sHeaviestElementMass, (int) tMaterial.getMass())) { tMaterial = (Materials) i$.next(); - if ((tMaterial.mElement == null) || (tMaterial.mElement.mIsIsotope)) { - } + //if ((tMaterial.mElement == null) || (tMaterial.mElement.mIsIsotope)) { + //} } } return sHeaviestElementMass; diff --git a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java index 281d6cc4..519cffcb 100644 --- a/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java +++ b/src/main/java/gregtech/common/tileentities/machines/multi/GT_MetaTileEntity_BronzeBlastFurnace.java @@ -340,8 +340,8 @@ public class GT_MetaTileEntity_BronzeBlastFurnace } public boolean allowPutStack(IGregTechTileEntity aBaseMetaTileEntity, int aIndex, byte aSide, ItemStack aStack) { - if (aIndex < 2) { - } + //if (aIndex < 2) { + //} return !GT_Utility.areStacksEqual(aStack, this.mInventory[0]); }