Bugfixes 6 fix: Removed commented code
This commit is contained in:
parent
e85097319b
commit
f94313e9b1
11 changed files with 140 additions and 167 deletions
|
@ -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);
|
||||
|
|
|
@ -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*/Math.abs(tTransfer - aAmount) < .0000001) {
|
||||
if (Math.abs(tTransfer - aAmount) < .0000001) {
|
||||
discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false);
|
||||
chargeFromArmor(aStack, aPlayer);
|
||||
return true;
|
||||
|
|
|
@ -159,13 +159,11 @@ 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 (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
||||
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
||||
mTickTimer = 0;
|
||||
mID = aID;
|
||||
return true;
|
||||
//}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
@ -182,10 +180,8 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
|||
long tTime = System.currentTimeMillis();
|
||||
int tCode = 0;
|
||||
|
||||
try { for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
|
||||
//replace switch in if
|
||||
//switch (tCode) {
|
||||
//case 0:
|
||||
try {
|
||||
for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
|
||||
if (tCode == 0) {
|
||||
tCode++;
|
||||
if (mTickTimer++ == 0) {
|
||||
|
@ -199,8 +195,8 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
|||
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
|
||||
mMetaTileEntity.onFirstTick(this);
|
||||
if (!hasValidMetaTileEntity()) return;
|
||||
}}
|
||||
//case 1:
|
||||
}
|
||||
}
|
||||
if (tCode == 1) {
|
||||
tCode++;
|
||||
if (isClientSide()) {
|
||||
|
@ -214,13 +210,8 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
|||
//worldObj.func_147479_m(xCoord, yCoord, zCoord);
|
||||
mNeedsUpdate = false;
|
||||
}
|
||||
}}
|
||||
/*case 2:
|
||||
case 3:
|
||||
case 4:
|
||||
case 5:
|
||||
case 6:
|
||||
case 7:*/
|
||||
}
|
||||
}
|
||||
if (tCode >= 2 && tCode <= 7) {
|
||||
if (isServerSide() && mTickTimer > 10) {
|
||||
for (byte i = (byte) (tCode - 2); i < 6; i++)
|
||||
|
@ -237,13 +228,12 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
|||
if ((mConnections & -64) == 64 && getRandomNumber(1000) == 0) {
|
||||
mConnections = (byte) ((mConnections & ~64) | -128);
|
||||
}
|
||||
}}
|
||||
//case 8:
|
||||
}
|
||||
}
|
||||
if (tCode == 8) {
|
||||
tCode = 9;
|
||||
mMetaTileEntity.onPreTick(this, mTickTimer);
|
||||
if (!hasValidMetaTileEntity()) return;}
|
||||
//case 9:
|
||||
if (tCode == 9) {
|
||||
tCode++;
|
||||
if (isServerSide()) {
|
||||
|
@ -260,13 +250,12 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
|||
issueClientUpdate();
|
||||
clearTileEntityBuffer();
|
||||
}
|
||||
}}
|
||||
//case 10:
|
||||
}
|
||||
}
|
||||
if (tCode == 10) {
|
||||
tCode++;
|
||||
mMetaTileEntity.onPostTick(this, mTickTimer);
|
||||
if (!hasValidMetaTileEntity()) return;}
|
||||
//case 11:
|
||||
if (tCode == 11) {
|
||||
tCode++;
|
||||
if (isServerSide()) {
|
||||
|
@ -290,13 +279,14 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
|||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
|
||||
mNeedsBlockUpdate = false;
|
||||
}
|
||||
}}
|
||||
//default:
|
||||
}
|
||||
}
|
||||
if (tCode > 11) {
|
||||
tCode = -1;
|
||||
break;}
|
||||
//}
|
||||
}} catch (Throwable e) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
} catch (Throwable e) {
|
||||
gregtech.api.util.GT_Log.err.println("Encountered Exception while ticking MetaTileEntity in Step " + (tCode - 1) + ". The Game should've crashed now, but I prevented that. Please report immidietly to GregTech Intergalactical!!!");
|
||||
e.printStackTrace(GT_Log.err);
|
||||
}
|
||||
|
|
|
@ -206,13 +206,11 @@ 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 (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
||||
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
||||
mTickTimer = 0;
|
||||
mID = aID;
|
||||
return true;
|
||||
//}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -33,12 +33,7 @@ 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 {
|
||||
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);
|
||||
temp.xCoord = 0;
|
||||
temp.yCoord = 0;
|
||||
|
@ -67,8 +62,6 @@ public class GT_Item_Machines
|
|||
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY);
|
||||
}
|
||||
}
|
||||
//}
|
||||
//}
|
||||
NBTTagCompound aNBT = aStack.getTagCompound();
|
||||
if (aNBT != null) {
|
||||
if (aNBT.getBoolean("mMuffler")) {
|
||||
|
|
|
@ -72,8 +72,6 @@ public class GT_Cover_Drain
|
|||
}
|
||||
|
||||
public boolean letsFluidIn(byte aSide, int aCoverID, int aCoverVariable, Fluid aFluid, ICoverable aTileEntity) {
|
||||
//if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
||||
//}
|
||||
return ((IMachineProgress) aTileEntity).isAllowedToWork() == aCoverVariable < 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -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()) {
|
||||
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()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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, (1) + this.mContainer.mProgressTime * 20 / (this.mContainer.mMaxProgressTime < 1 ? 1 : this.mContainer.mMaxProgressTime))), 11);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -97,8 +97,6 @@ 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)) {
|
||||
//}
|
||||
setCurrentIndex(aStack, -1);
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -23,8 +23,6 @@ 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())) {
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -86,8 +86,6 @@ 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)) {
|
||||
//}
|
||||
}
|
||||
}
|
||||
return sHeaviestElementMass;
|
||||
|
|
Loading…
Reference in a new issue