From 5a5552cde7c60d2cdbbdf009aef9888f4a3e08f9 Mon Sep 17 00:00:00 2001 From: Alkalus <3060479+draknyte1@users.noreply.github.com> Date: Sat, 18 Aug 2018 18:03:04 +1000 Subject: + Added Forming Press mode to the Large Bending Machine. Closes #347. + Added a command to dump TC aspect information from all Items & Blocks. Use /DA or /DumpAspects to begin the process. $ Fixed PSS not accepting any tier Hatches. Closes #354, also fixes https://github.com/GTNewHorizons/NewHorizons/issues/3470. $ Fixed Hand-Pumps duping things, because other modders can't follow guidelines. Closes #353. $ Fixed a rare bug involving Hand-Pumps & EU items having getDisplayName() called on them. $ Fixed an issue where some Multiblocks had a bad GUI. $ Removed TC libs from my custom Railcraft build. --- .../gtPlusPlus/core/item/tool/misc/GregtechPump.java | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) (limited to 'src/Java/gtPlusPlus/core/item/tool') diff --git a/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java b/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java index bdddd26255..2943951734 100644 --- a/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java +++ b/src/Java/gtPlusPlus/core/item/tool/misc/GregtechPump.java @@ -686,7 +686,11 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri @Override public String getItemStackDisplayName(final ItemStack par1ItemStack) { - return this.itemName.get(par1ItemStack.getItemDamage() - this.mOffset).getValue(); + int keyValue = (par1ItemStack.getItemDamage() - this.mOffset); + if (keyValue < 0 || keyValue > 3) { + keyValue = 0; + } + return this.itemName.get(keyValue).getValue(); } /** @@ -938,12 +942,10 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri return false; } else { double aCharge = this.getCharge(aStack); - boolean didDrain; + boolean didDrain = false; if (aTier > 0 && aCharge > 0) { if (discharge(aStack, removal, aTier, true, true, false) > 0) { didDrain = true; - } else { - didDrain = false; } } else if (aTier == 0) { didDrain = true; @@ -954,9 +956,10 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri if (didDrain) { if ((tTileEntity instanceof IGregTechTileEntity)) { return this.drainTankGT(tTileEntity, aStack, aWorld, aPlayer, aX, aY, aZ); - } else if ((tTileEntity instanceof IFluidTank || tTileEntity instanceof IFluidHandler)) { + } + /*else if ((tTileEntity instanceof IFluidTank || tTileEntity instanceof IFluidHandler)) { return this.drainIFluidTank(tTileEntity, aStack, aWorld, aPlayer, aX, aY, aZ); - } + }*/ } } } @@ -1211,7 +1214,6 @@ public class GregtechPump extends Item implements ISpecialElectricItem, IElectri return false; } final IMetaTileEntity aMetaTileEntity = aTileEntity.getMetaTileEntity(); - ; if (aMetaTileEntity == null) { return false; } -- cgit