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 ((aShifthold == 0 || aShifthold == 1) && (aMouseclick == 0 || aMouseclick == 1)) {
|
||||||
if (aSlotIndex == -999) {
|
if (aSlotIndex == -999) {
|
||||||
if (aPlayerInventory.getItemStack() != null/* && aSlotIndex == -999*/) {
|
if (aPlayerInventory.getItemStack() != null) {
|
||||||
if (aMouseclick == 0) {
|
if (aMouseclick == 0) {
|
||||||
aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack(), true);
|
aPlayer.dropPlayerItemWithRandomChoice(aPlayerInventory.getItemStack(), true);
|
||||||
aPlayerInventory.setItemStack(null);
|
aPlayerInventory.setItemStack(null);
|
||||||
|
|
|
@ -294,7 +294,7 @@ public abstract class GT_MetaBase_Item extends GT_Generic_Item implements ISpeci
|
||||||
chargeFromArmor(aStack, aPlayer);
|
chargeFromArmor(aStack, aPlayer);
|
||||||
if (aPlayer instanceof EntityPlayer && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) return true;
|
if (aPlayer instanceof EntityPlayer && ((EntityPlayer) aPlayer).capabilities.isCreativeMode) return true;
|
||||||
double tTransfer = discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, 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);
|
discharge(aStack, aAmount, Integer.MAX_VALUE, true, false, false);
|
||||||
chargeFromArmor(aStack, aPlayer);
|
chargeFromArmor(aStack, aPlayer);
|
||||||
return true;
|
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) {
|
if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
|
||||||
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
|
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
|
||||||
} else {
|
} else {
|
||||||
//if (aID != 0) {
|
if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
||||||
if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
||||||
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
mTickTimer = 0;
|
||||||
mTickTimer = 0;
|
mID = aID;
|
||||||
mID = aID;
|
return true;
|
||||||
return true;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -182,121 +180,113 @@ public class BaseMetaPipeEntity extends BaseTileEntity implements IGregTechTileE
|
||||||
long tTime = System.currentTimeMillis();
|
long tTime = System.currentTimeMillis();
|
||||||
int tCode = 0;
|
int tCode = 0;
|
||||||
|
|
||||||
try { for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
|
try {
|
||||||
//replace switch in if
|
for (tCode = 0; hasValidMetaTileEntity() && tCode >= 0; ) {
|
||||||
//switch (tCode) {
|
if (tCode == 0) {
|
||||||
//case 0:
|
tCode++;
|
||||||
if (tCode == 0) {
|
if (mTickTimer++ == 0) {
|
||||||
tCode++;
|
|
||||||
if (mTickTimer++ == 0) {
|
|
||||||
oX = xCoord;
|
|
||||||
oY = yCoord;
|
|
||||||
oZ = zCoord;
|
|
||||||
if (isServerSide()) for (byte i = 0; i < 6; i++)
|
|
||||||
if (getCoverIDAtSide(i) != 0)
|
|
||||||
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
|
|
||||||
dropCover(i, i, true);
|
|
||||||
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
|
|
||||||
mMetaTileEntity.onFirstTick(this);
|
|
||||||
if (!hasValidMetaTileEntity()) return;
|
|
||||||
}}
|
|
||||||
//case 1:
|
|
||||||
if (tCode == 1) {
|
|
||||||
tCode++;
|
|
||||||
if (isClientSide()) {
|
|
||||||
if (mColor != oColor) {
|
|
||||||
mMetaTileEntity.onColorChangeClient(oColor = mColor);
|
|
||||||
issueTextureUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (mNeedsUpdate) {
|
|
||||||
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
|
||||||
//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++)
|
|
||||||
if (getCoverIDAtSide(i) != 0) {
|
|
||||||
tCode++;
|
|
||||||
GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
|
|
||||||
int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
|
|
||||||
if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
|
|
||||||
mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
|
|
||||||
if (!hasValidMetaTileEntity()) return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
mConnections = (byte) (mMetaTileEntity.mConnections | (mConnections & ~63));
|
|
||||||
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()) {
|
|
||||||
if (mTickTimer == 10) {
|
|
||||||
for (byte i = 0; i < 6; i++)
|
|
||||||
mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
|
|
||||||
issueBlockUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xCoord != oX || yCoord != oY || zCoord != oZ) {
|
|
||||||
oX = xCoord;
|
oX = xCoord;
|
||||||
oY = yCoord;
|
oY = yCoord;
|
||||||
oZ = zCoord;
|
oZ = zCoord;
|
||||||
issueClientUpdate();
|
if (isServerSide()) for (byte i = 0; i < 6; i++)
|
||||||
clearTileEntityBuffer();
|
if (getCoverIDAtSide(i) != 0)
|
||||||
|
if (!mMetaTileEntity.allowCoverOnSide(i, new GT_ItemStack(getCoverIDAtSide(i))))
|
||||||
|
dropCover(i, i, true);
|
||||||
|
worldObj.markTileEntityChunkModified(xCoord, yCoord, zCoord, this);
|
||||||
|
mMetaTileEntity.onFirstTick(this);
|
||||||
|
if (!hasValidMetaTileEntity()) return;
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
//case 10:
|
if (tCode == 1) {
|
||||||
if (tCode == 10) {
|
tCode++;
|
||||||
tCode++;
|
if (isClientSide()) {
|
||||||
mMetaTileEntity.onPostTick(this, mTickTimer);
|
if (mColor != oColor) {
|
||||||
if (!hasValidMetaTileEntity()) return;}
|
mMetaTileEntity.onColorChangeClient(oColor = mColor);
|
||||||
//case 11:
|
issueTextureUpdate();
|
||||||
if (tCode == 11) {
|
}
|
||||||
tCode++;
|
|
||||||
if (isServerSide()) {
|
if (mNeedsUpdate) {
|
||||||
if (mTickTimer % 10 == 0) {
|
worldObj.markBlockForUpdate(xCoord, yCoord, zCoord);
|
||||||
if (mSendClientData) {
|
//worldObj.func_147479_m(xCoord, yCoord, zCoord);
|
||||||
NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = mConnections, oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
|
mNeedsUpdate = false;
|
||||||
mSendClientData = false;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (mTickTimer > 10) {
|
if (tCode >= 2 && tCode <= 7) {
|
||||||
if (mConnections != oTextureData) sendBlockEvent((byte) 0, oTextureData = mConnections);
|
if (isServerSide() && mTickTimer > 10) {
|
||||||
byte tData = mMetaTileEntity.getUpdateData();
|
for (byte i = (byte) (tCode - 2); i < 6; i++)
|
||||||
if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
|
if (getCoverIDAtSide(i) != 0) {
|
||||||
if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
|
tCode++;
|
||||||
tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
|
GT_CoverBehavior tCover = getCoverBehaviorAtSide(i);
|
||||||
if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
|
int tCoverTickRate = tCover.getTickRate(i, getCoverIDAtSide(i), mCoverData[i], this);
|
||||||
|
if (tCoverTickRate > 0 && mTickTimer % tCoverTickRate == 0) {
|
||||||
|
mCoverData[i] = tCover.doCoverThings(i, getInputRedstoneSignal(i), getCoverIDAtSide(i), mCoverData[i], this, mTickTimer);
|
||||||
|
if (!hasValidMetaTileEntity()) return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
mConnections = (byte) (mMetaTileEntity.mConnections | (mConnections & ~63));
|
||||||
|
if ((mConnections & -64) == 64 && getRandomNumber(1000) == 0) {
|
||||||
|
mConnections = (byte) ((mConnections & ~64) | -128);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
if (tCode == 8) {
|
||||||
|
tCode = 9;
|
||||||
|
mMetaTileEntity.onPreTick(this, mTickTimer);
|
||||||
|
if (!hasValidMetaTileEntity()) return;}
|
||||||
|
if (tCode == 9) {
|
||||||
|
tCode++;
|
||||||
|
if (isServerSide()) {
|
||||||
|
if (mTickTimer == 10) {
|
||||||
|
for (byte i = 0; i < 6; i++)
|
||||||
|
mCoverBehaviors[i] = GregTech_API.getCoverBehavior(mCoverSides[i]);
|
||||||
|
issueBlockUpdate();
|
||||||
|
}
|
||||||
|
|
||||||
if (mNeedsBlockUpdate) {
|
if (xCoord != oX || yCoord != oY || zCoord != oZ) {
|
||||||
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
|
oX = xCoord;
|
||||||
mNeedsBlockUpdate = false;
|
oY = yCoord;
|
||||||
|
oZ = zCoord;
|
||||||
|
issueClientUpdate();
|
||||||
|
clearTileEntityBuffer();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}}
|
}
|
||||||
//default:
|
if (tCode == 10) {
|
||||||
if (tCode > 11) {
|
tCode++;
|
||||||
tCode = -1;
|
mMetaTileEntity.onPostTick(this, mTickTimer);
|
||||||
break;}
|
if (!hasValidMetaTileEntity()) return;}
|
||||||
//}
|
if (tCode == 11) {
|
||||||
}} catch (Throwable e) {
|
tCode++;
|
||||||
|
if (isServerSide()) {
|
||||||
|
if (mTickTimer % 10 == 0) {
|
||||||
|
if (mSendClientData) {
|
||||||
|
NW.sendPacketToAllPlayersInRange(worldObj, new GT_Packet_TileEntity(xCoord, (short) yCoord, zCoord, mID, mCoverSides[0], mCoverSides[1], mCoverSides[2], mCoverSides[3], mCoverSides[4], mCoverSides[5], oTextureData = mConnections, oUpdateData = hasValidMetaTileEntity() ? mMetaTileEntity.getUpdateData() : 0, oRedstoneData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0)), oColor = mColor), xCoord, zCoord);
|
||||||
|
mSendClientData = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mTickTimer > 10) {
|
||||||
|
if (mConnections != oTextureData) sendBlockEvent((byte) 0, oTextureData = mConnections);
|
||||||
|
byte tData = mMetaTileEntity.getUpdateData();
|
||||||
|
if (tData != oUpdateData) sendBlockEvent((byte) 1, oUpdateData = tData);
|
||||||
|
if (mColor != oColor) sendBlockEvent((byte) 2, oColor = mColor);
|
||||||
|
tData = (byte) (((mSidedRedstone[0] > 0) ? 1 : 0) | ((mSidedRedstone[1] > 0) ? 2 : 0) | ((mSidedRedstone[2] > 0) ? 4 : 0) | ((mSidedRedstone[3] > 0) ? 8 : 0) | ((mSidedRedstone[4] > 0) ? 16 : 0) | ((mSidedRedstone[5] > 0) ? 32 : 0));
|
||||||
|
if (tData != oRedstoneData) sendBlockEvent((byte) 3, oRedstoneData = tData);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mNeedsBlockUpdate) {
|
||||||
|
worldObj.notifyBlocksOfNeighborChange(xCoord, yCoord, zCoord, getBlockOffset(0, 0, 0));
|
||||||
|
mNeedsBlockUpdate = false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (tCode > 11) {
|
||||||
|
tCode = -1;
|
||||||
|
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!!!");
|
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);
|
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) {
|
if (aID <= 0 || aID >= GregTech_API.METATILEENTITIES.length || GregTech_API.METATILEENTITIES[aID] == null) {
|
||||||
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
|
GT_Log.err.println("MetaID " + aID + " not loadable => locking TileEntity!");
|
||||||
} else {
|
} else {
|
||||||
//if (aID != 0) {
|
if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
||||||
if (hasValidMetaTileEntity()) mMetaTileEntity.setBaseMetaTileEntity(null);
|
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
||||||
GregTech_API.METATILEENTITIES[aID].newMetaEntity(this).setBaseMetaTileEntity(this);
|
mTickTimer = 0;
|
||||||
mTickTimer = 0;
|
mID = aID;
|
||||||
mID = aID;
|
return true;
|
||||||
return true;
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,42 +33,35 @@ public class GT_Item_Machines
|
||||||
if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) {
|
if ((tDamage <= 0) || (tDamage >= GregTech_API.METATILEENTITIES.length)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//if (tDamage == 0) {
|
TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType());
|
||||||
//aList.add("WARNING, THE EXISTENCE OF THIS ITEM IS A BUG");
|
temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj);
|
||||||
//aList.add("IF YOU GOT IT IN SURVIVAL THEN PLEASE REPORT IT");
|
temp.xCoord = 0;
|
||||||
//} else {
|
temp.yCoord = 0;
|
||||||
TileEntity temp = GregTech_API.sBlockMachines.createTileEntity(aPlayer == null ? GT_Values.DW : aPlayer.worldObj, GregTech_API.METATILEENTITIES[tDamage] == null ? 0 : GregTech_API.METATILEENTITIES[tDamage].getTileEntityBaseType());
|
temp.zCoord = 0;
|
||||||
//if (temp != null) {
|
if ((temp instanceof IGregTechTileEntity)) {
|
||||||
temp.setWorldObj(aPlayer == null ? GT_Values.DW : aPlayer.worldObj);
|
IGregTechTileEntity tTileEntity = (IGregTechTileEntity) temp;
|
||||||
temp.xCoord = 0;
|
tTileEntity.setInitialValuesAsNBT(new NBTTagCompound(), (short) tDamage);
|
||||||
temp.yCoord = 0;
|
if (tTileEntity.getDescription() != null) {
|
||||||
temp.zCoord = 0;
|
int i = 0;
|
||||||
if ((temp instanceof IGregTechTileEntity)) {
|
for (String tDescription : tTileEntity.getDescription()) {
|
||||||
IGregTechTileEntity tTileEntity = (IGregTechTileEntity) temp;
|
if (GT_Utility.isStringValid(tDescription)) {
|
||||||
tTileEntity.setInitialValuesAsNBT(new NBTTagCompound(), (short) tDamage);
|
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished));
|
||||||
if (tTileEntity.getDescription() != null) {
|
|
||||||
int i = 0;
|
|
||||||
for (String tDescription : tTileEntity.getDescription()) {
|
|
||||||
if (GT_Utility.isStringValid(tDescription)) {
|
|
||||||
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_DESCRIPTION_" + tDamage + "_Index_" + i++, tDescription, !GregTech_API.sPostloadFinished));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (tTileEntity.getEUCapacity() > 0L) {
|
|
||||||
if (tTileEntity.getInputVoltage() > 0L) {
|
|
||||||
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY);
|
|
||||||
}
|
|
||||||
if (tTileEntity.getOutputVoltage() > 0L) {
|
|
||||||
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY);
|
|
||||||
}
|
|
||||||
if (tTileEntity.getOutputAmperage() > 1L) {
|
|
||||||
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY);
|
|
||||||
}
|
|
||||||
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//}
|
}
|
||||||
//}
|
if (tTileEntity.getEUCapacity() > 0L) {
|
||||||
|
if (tTileEntity.getInputVoltage() > 0L) {
|
||||||
|
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_IN", "Voltage IN: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + tTileEntity.getInputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getInputVoltage())] + ")" + EnumChatFormatting.GRAY);
|
||||||
|
}
|
||||||
|
if (tTileEntity.getOutputVoltage() > 0L) {
|
||||||
|
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_OUT", "Voltage OUT: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.GREEN + tTileEntity.getOutputVoltage() + " (" + GT_Values.VN[GT_Utility.getTier(tTileEntity.getOutputVoltage())] + ")" + EnumChatFormatting.GRAY);
|
||||||
|
}
|
||||||
|
if (tTileEntity.getOutputAmperage() > 1L) {
|
||||||
|
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_AMOUNT", "Amperage: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.YELLOW + tTileEntity.getOutputAmperage() + EnumChatFormatting.GRAY);
|
||||||
|
}
|
||||||
|
aList.add(GT_LanguageManager.addStringLocalization("TileEntity_EUp_STORE", "Capacity: ", !GregTech_API.sPostloadFinished) + EnumChatFormatting.BLUE + tTileEntity.getEUCapacity() + EnumChatFormatting.GRAY);
|
||||||
|
}
|
||||||
|
}
|
||||||
NBTTagCompound aNBT = aStack.getTagCompound();
|
NBTTagCompound aNBT = aStack.getTagCompound();
|
||||||
if (aNBT != null) {
|
if (aNBT != null) {
|
||||||
if (aNBT.getBoolean("mMuffler")) {
|
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) {
|
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;
|
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) {
|
public boolean letsEnergyIn(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
|
||||||
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
||||||
if (((IMachineProgress) aTileEntity).isAllowedToWork()/* != aCoverVariable < 2*/) {
|
if (((IMachineProgress) aTileEntity).isAllowedToWork()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,7 +42,7 @@ public class GT_Cover_EnergyOnly
|
||||||
|
|
||||||
public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
|
public boolean letsEnergyOut(byte aSide, int aCoverID, int aCoverVariable, ICoverable aTileEntity) {
|
||||||
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
if ((aCoverVariable > 1) && ((aTileEntity instanceof IMachineProgress))) {
|
||||||
if (((IMachineProgress) aTileEntity).isAllowedToWork()/* != aCoverVariable < 2*/) {
|
if (((IMachineProgress) aTileEntity).isAllowedToWork()) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class GT_GUIContainer_BronzeBlastFurnace
|
||||||
drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
|
drawTexturedModalRect(x, y, 0, 0, this.xSize, this.ySize);
|
||||||
if ((this.mContainer != null) &&
|
if ((this.mContainer != null) &&
|
||||||
(this.mContainer.mProgressTime > 0)) {
|
(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) {
|
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);
|
setCurrentIndex(aStack, -1);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,6 @@ public class GT_MetaGenerated_Item_Renderer
|
||||||
GT_MetaGenerated_Item tItem;
|
GT_MetaGenerated_Item tItem;
|
||||||
for (Iterator i$ = GT_MetaGenerated_Item.sInstances.values().iterator(); i$.hasNext(); MinecraftForgeClient.registerItemRenderer(tItem, this)) {
|
for (Iterator i$ = GT_MetaGenerated_Item.sInstances.values().iterator(); i$.hasNext(); MinecraftForgeClient.registerItemRenderer(tItem, this)) {
|
||||||
tItem = (GT_MetaGenerated_Item) i$.next();
|
tItem = (GT_MetaGenerated_Item) i$.next();
|
||||||
//if ((tItem == null) || (!tItem.useStandardMetaItemRenderer())) {
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,8 +86,6 @@ public class GT_MetaTileEntity_Replicator
|
||||||
Materials tMaterial;
|
Materials tMaterial;
|
||||||
for (Iterator i$ = Materials.VALUES.iterator(); i$.hasNext(); sHeaviestElementMass = Math.max(sHeaviestElementMass, (int) tMaterial.getMass())) {
|
for (Iterator i$ = Materials.VALUES.iterator(); i$.hasNext(); sHeaviestElementMass = Math.max(sHeaviestElementMass, (int) tMaterial.getMass())) {
|
||||||
tMaterial = (Materials) i$.next();
|
tMaterial = (Materials) i$.next();
|
||||||
//if ((tMaterial.mElement == null) || (tMaterial.mElement.mIsIsotope)) {
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return sHeaviestElementMass;
|
return sHeaviestElementMass;
|
||||||
|
|
Loading…
Reference in a new issue