diff options
author | Muramasa <haydenkilloh@gmail.com> | 2016-08-14 05:56:41 +0100 |
---|---|---|
committer | Muramasa <haydenkilloh@gmail.com> | 2016-08-14 05:56:41 +0100 |
commit | 19062e1d36700f9f0a7ed95daa80bc4c4578241f (patch) | |
tree | 5c0f53d7c08b61015a76ebd246886f3e076bdd82 /src | |
parent | bfccecf87bce3487bc72699782488ac64bc5623f (diff) | |
download | GT5-Unofficial-19062e1d36700f9f0a7ed95daa80bc4c4578241f.tar.gz GT5-Unofficial-19062e1d36700f9f0a7ed95daa80bc4c4578241f.tar.bz2 GT5-Unofficial-19062e1d36700f9f0a7ed95daa80bc4c4578241f.zip |
Bugfixes 6
Diffstat (limited to 'src')
14 files changed, 32 insertions, 31 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..304e215ad4 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 4e58019839..ab11dbb690 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 e2765861bd..fa66ae8c1d 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 ea2daf1b31..1621a4a04f 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 8fde8ab976..2679053ede 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 35ac55e1b7..e3992efce5 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 1a369dc2a2..eaf791e523 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 49d2e09ac9..d077e31389 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 7bca9a1d13..d9aef68506 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 613c082b34..2aa12d8edb 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 90daed57dd..6a0ab85b3d 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 316b5542a5..152ac12513 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 6f3818b47e..995022f45d 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 281d6cc4bc..519cffcb4f 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]);
}
|