Bugfixes 3/2/1 fix: Remove commented code
This commit is contained in:
parent
30b7a0d7e8
commit
5eb2857389
10 changed files with 13 additions and 37 deletions
|
@ -29,8 +29,7 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer {
|
||||||
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
|
||||||
if (GregTech_API.sColoredGUI && mContainer != null && mContainer.mTileEntity != null) {
|
if (GregTech_API.sColoredGUI && mContainer != null && mContainer.mTileEntity != null) {
|
||||||
int tColor = mContainer.mTileEntity.getColorization() & 15;
|
int tColor = mContainer.mTileEntity.getColorization() & 15;
|
||||||
/* Bug kind and pattern: INT - INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE */
|
if (tColor < ItemDye.field_150922_c.length) {
|
||||||
if (/*tColor >= 0 && */tColor < ItemDye.field_150922_c.length) {
|
|
||||||
tColor = ItemDye.field_150922_c[tColor];
|
tColor = ItemDye.field_150922_c[tColor];
|
||||||
GL11.glColor4f(((tColor >> 16) & 255) / 255.0F, ((tColor >> 8) & 255) / 255.0F, (tColor & 255) / 255.0F, 1.0F);
|
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);
|
} else GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
|
||||||
|
|
|
@ -112,10 +112,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
|
||||||
}
|
}
|
||||||
if (mSolderingTool && aPlayer instanceof EntityPlayerMP) {
|
if (mSolderingTool && aPlayer instanceof EntityPlayerMP) {
|
||||||
EntityPlayerMP tPlayer = (EntityPlayerMP) aPlayer;
|
EntityPlayerMP tPlayer = (EntityPlayerMP) aPlayer;
|
||||||
//try {
|
GT_Mod.instance.achievements.issueAchievement(tPlayer, "maintainance");
|
||||||
GT_Mod.instance.achievements.issueAchievement(tPlayer, "maintainance");
|
|
||||||
//} catch (Exception e) {
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -238,10 +238,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
|
||||||
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
|
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
|
||||||
if (mOutputItems != null) for (ItemStack tStack : mOutputItems)
|
if (mOutputItems != null) for (ItemStack tStack : mOutputItems)
|
||||||
if (tStack != null) {
|
if (tStack != null) {
|
||||||
//try {
|
GT_Mod.instance.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);
|
||||||
GT_Mod.instance.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);
|
|
||||||
//} catch (Exception e) {
|
|
||||||
//}
|
|
||||||
addOutput(tStack);
|
addOutput(tStack);
|
||||||
}
|
}
|
||||||
if (mOutputFluids != null && mOutputFluids.length == 1) {
|
if (mOutputFluids != null && mOutputFluids.length == 1) {
|
||||||
|
|
|
@ -18,7 +18,6 @@ public class ElementStack implements Cloneable {
|
||||||
@Override
|
@Override
|
||||||
public ElementStack clone() {
|
public ElementStack clone() {
|
||||||
try { Object cloneES = super.clone();
|
try { Object cloneES = super.clone();
|
||||||
//return new ElementStack(mElement, mAmount);
|
|
||||||
return (ElementStack) cloneES; } catch (Exception e) { return new ElementStack(mElement, mAmount); }
|
return (ElementStack) cloneES; } catch (Exception e) { return new ElementStack(mElement, mAmount); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,6 @@ public class MaterialStack implements Cloneable {
|
||||||
@Override
|
@Override
|
||||||
public MaterialStack clone() {
|
public MaterialStack clone() {
|
||||||
try { Object cloneMS = super.clone();
|
try { Object cloneMS = super.clone();
|
||||||
//return new MaterialStack(mMaterial, mAmount);
|
|
||||||
return (MaterialStack) cloneMS;} catch (Exception e) { return new MaterialStack(mMaterial, mAmount); }
|
return (MaterialStack) cloneMS;} catch (Exception e) { return new MaterialStack(mMaterial, mAmount); }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -201,10 +201,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace
|
||||||
this.mOutputItem2 = null;
|
this.mOutputItem2 = null;
|
||||||
this.mProgresstime = 0;
|
this.mProgresstime = 0;
|
||||||
this.mMaxProgresstime = 0;
|
this.mMaxProgresstime = 0;
|
||||||
//try {
|
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
|
||||||
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
|
|
||||||
//} catch (Exception e) {
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
} else if (aBaseMetaTileEntity.isAllowedToWork()) {
|
} else if (aBaseMetaTileEntity.isAllowedToWork()) {
|
||||||
checkRecipe();
|
checkRecipe();
|
||||||
|
|
|
@ -151,10 +151,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
|
||||||
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
|
||||||
if (mProgresstime > 0 && firstRun) {
|
if (mProgresstime > 0 && firstRun) {
|
||||||
firstRun = false;
|
firstRun = false;
|
||||||
//try {
|
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure");
|
||||||
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure");
|
|
||||||
//} catch (Exception e) {
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
super.onPostTick(aBaseMetaTileEntity, aTick);
|
super.onPostTick(aBaseMetaTileEntity, aTick);
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,10 +86,7 @@ public class GT_MetaTileEntity_LargeTurbine_HPSteam extends GT_MetaTileEntity_La
|
||||||
remainingFlow -= flow; // track amount we're allowed to keep depleting from hatches
|
remainingFlow -= flow; // track amount we're allowed to keep depleting from hatches
|
||||||
totalFlow += flow; // track total used
|
totalFlow += flow; // track total used
|
||||||
if (!achievement) {
|
if (!achievement) {
|
||||||
//try {
|
GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam");
|
||||||
GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam");
|
|
||||||
//} catch (Exception e) {
|
|
||||||
//}
|
|
||||||
achievement = true;
|
achievement = true;
|
||||||
}
|
}
|
||||||
}else if(fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")){
|
}else if(fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")){
|
||||||
|
|
|
@ -95,10 +95,7 @@ public class GT_MetaTileEntity_LargeTurbine_Steam extends GT_MetaTileEntity_Larg
|
||||||
remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches
|
remainingFlow -= flow; // track amount we're allowed to continue depleting from hatches
|
||||||
totalFlow += flow; // track total input used
|
totalFlow += flow; // track total input used
|
||||||
if (!achievement) {
|
if (!achievement) {
|
||||||
//try {
|
GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam");
|
||||||
GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam");
|
|
||||||
//} catch (Exception e) {
|
|
||||||
//}
|
|
||||||
achievement = true;
|
achievement = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -238,15 +238,12 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
|
||||||
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
|
||||||
List<ItemStack> overStacks = new ArrayList<ItemStack>();
|
List<ItemStack> overStacks = new ArrayList<ItemStack>();
|
||||||
for (int f = 0; f < tOut.length; f++) {
|
for (int f = 0; f < tOut.length; f++) {
|
||||||
/* FindBugs: Bug kind and pattern: RpC - RpC_REPEATED_CONDITIONAL_TEST */
|
while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
|
||||||
//if (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
|
ItemStack tmp = tOut[f].copy();
|
||||||
while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
|
tmp.stackSize = tmp.getMaxStackSize();
|
||||||
ItemStack tmp = tOut[f].copy();
|
tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
|
||||||
tmp.stackSize = tmp.getMaxStackSize();
|
overStacks.add(tmp);
|
||||||
tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
|
}
|
||||||
overStacks.add(tmp);
|
|
||||||
}
|
|
||||||
//}
|
|
||||||
}
|
}
|
||||||
if (overStacks.size() > 0) {
|
if (overStacks.size() > 0) {
|
||||||
ItemStack[] tmp = new ItemStack[overStacks.size()];
|
ItemStack[] tmp = new ItemStack[overStacks.size()];
|
||||||
|
|
Loading…
Reference in a new issue