Bugfixes 3/2/1 fix: Remove commented code

This commit is contained in:
Muramasa 2016-08-14 07:40:20 +01:00
parent 30b7a0d7e8
commit 5eb2857389
10 changed files with 13 additions and 37 deletions

View file

@ -29,8 +29,7 @@ public class GT_GUIContainerMetaTile_Machine extends GT_GUIContainer {
super.drawGuiContainerBackgroundLayer(par1, par2, par3);
if (GregTech_API.sColoredGUI && mContainer != null && mContainer.mTileEntity != null) {
int tColor = mContainer.mTileEntity.getColorization() & 15;
/* Bug kind and pattern: INT - INT_BAD_COMPARISON_WITH_NONNEGATIVE_VALUE */
if (/*tColor >= 0 && */tColor < ItemDye.field_150922_c.length) {
if (tColor < ItemDye.field_150922_c.length) {
tColor = ItemDye.field_150922_c[tColor];
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);

View file

@ -112,10 +112,7 @@ public class GT_MetaTileEntity_Hatch_Maintenance extends GT_MetaTileEntity_Hatch
}
if (mSolderingTool && aPlayer instanceof EntityPlayerMP) {
EntityPlayerMP tPlayer = (EntityPlayerMP) aPlayer;
//try {
GT_Mod.instance.achievements.issueAchievement(tPlayer, "maintainance");
//} catch (Exception e) {
//}
}
}

View file

@ -238,10 +238,7 @@ public abstract class GT_MetaTileEntity_MultiBlockBase extends MetaTileEntity {
if (mMaxProgresstime > 0 && ++mProgresstime >= mMaxProgresstime) {
if (mOutputItems != null) for (ItemStack tStack : mOutputItems)
if (tStack != null) {
//try {
GT_Mod.instance.achievements.issueAchivementHatch(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), tStack);
//} catch (Exception e) {
//}
addOutput(tStack);
}
if (mOutputFluids != null && mOutputFluids.length == 1) {

View file

@ -18,7 +18,6 @@ public class ElementStack implements Cloneable {
@Override
public ElementStack clone() {
try { Object cloneES = super.clone();
//return new ElementStack(mElement, mAmount);
return (ElementStack) cloneES; } catch (Exception e) { return new ElementStack(mElement, mAmount); }
}

View file

@ -18,7 +18,6 @@ public class MaterialStack implements Cloneable {
@Override
public MaterialStack clone() {
try { Object cloneMS = super.clone();
//return new MaterialStack(mMaterial, mAmount);
return (MaterialStack) cloneMS;} catch (Exception e) { return new MaterialStack(mMaterial, mAmount); }
}

View file

@ -201,10 +201,7 @@ public class GT_MetaTileEntity_BronzeBlastFurnace
this.mOutputItem2 = null;
this.mProgresstime = 0;
this.mMaxProgresstime = 0;
//try {
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "steel");
//} catch (Exception e) {
//}
}
} else if (aBaseMetaTileEntity.isAllowedToWork()) {
checkRecipe();

View file

@ -151,10 +151,7 @@ public abstract class GT_MetaTileEntity_LargeBoiler
public void onPostTick(IGregTechTileEntity aBaseMetaTileEntity, long aTick) {
if (mProgresstime > 0 && firstRun) {
firstRun = false;
//try {
GT_Mod.instance.achievements.issueAchievement(aBaseMetaTileEntity.getWorld().getPlayerEntityByName(aBaseMetaTileEntity.getOwnerName()), "extremepressure");
//} catch (Exception e) {
//}
}
super.onPostTick(aBaseMetaTileEntity, aTick);
}

View file

@ -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
totalFlow += flow; // track total used
if (!achievement) {
//try {
GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "efficientsteam");
//} catch (Exception e) {
//}
achievement = true;
}
}else if(fluidName.equals("fluid.steam") || fluidName.equals("ic2.fluidSteam") || fluidName.equals("fluid.mfr.steam.still.name")){

View file

@ -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
totalFlow += flow; // track total input used
if (!achievement) {
//try {
GT_Mod.instance.achievements.issueAchievement(this.getBaseMetaTileEntity().getWorld().getPlayerEntityByName(this.getBaseMetaTileEntity().getOwnerName()), "muchsteam");
//} catch (Exception e) {
//}
achievement = true;
}
}

View file

@ -238,15 +238,12 @@ public class GT_MetaTileEntity_ProcessingArray extends GT_MetaTileEntity_MultiBl
this.mMaxProgresstime = Math.max(1, this.mMaxProgresstime);
List<ItemStack> overStacks = new ArrayList<ItemStack>();
for (int f = 0; f < tOut.length; f++) {
/* FindBugs: Bug kind and pattern: RpC - RpC_REPEATED_CONDITIONAL_TEST */
//if (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
while (tOut[f].getMaxStackSize() < tOut[f].stackSize) {
ItemStack tmp = tOut[f].copy();
tmp.stackSize = tmp.getMaxStackSize();
tOut[f].stackSize = tOut[f].stackSize - tOut[f].getMaxStackSize();
overStacks.add(tmp);
}
//}
}
if (overStacks.size() > 0) {
ItemStack[] tmp = new ItemStack[overStacks.size()];