mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
quick fix : Redundant local variable
This commit is contained in:
1 parent
25522dae75
commit
d44b7ece32
16 files changed
+23
-55
No files matched your search
@@ -199,8 +199,7 @@ public class ArmorProxyClient extends ArmorProxyCommon {
|
||||
@Override
|
||||
public Object getClientGuiElement(int ID, EntityPlayer player, World world, int x, int y, int z) {
|
||||
if (ID == ArmorProxyCommon.inventoryGui) {
|
||||
GuiInventory inventory = new GuiInventory(player);
|
||||
return inventory;
|
||||
return new GuiInventory(player);
|
||||
}
|
||||
if (ID == ArmorProxyCommon.armorGuiID) {
|
||||
ArmorProxyClient.armorExtended.init(Minecraft.getMinecraft().thePlayer);
|
||||
|
||||
@@ -189,7 +189,7 @@ public class DryingRack extends InventoryBlock {
|
||||
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
String[] textureNames = {
|
||||
return new String[]{
|
||||
"castingtable_top",
|
||||
"castingtable_side",
|
||||
"castingtable_bottom",
|
||||
@@ -198,8 +198,6 @@ public class DryingRack extends InventoryBlock {
|
||||
"blockcast_side",
|
||||
"blockcast_bottom"
|
||||
};
|
||||
|
||||
return textureNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -101,9 +101,7 @@ public class DryingRackLogic extends InventoryLogic {
|
||||
@Override
|
||||
@SideOnly(Side.CLIENT)
|
||||
public AxisAlignedBB getRenderBoundingBox() {
|
||||
AxisAlignedBB cbb =
|
||||
AxisAlignedBB.getBoundingBox(xCoord, yCoord - 1, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
|
||||
return cbb;
|
||||
return AxisAlignedBB.getBoundingBox(xCoord, yCoord - 1, zCoord, xCoord + 1, yCoord + 1, zCoord + 1);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -45,8 +45,7 @@ public class Chisel extends ToolCore {
|
||||
}
|
||||
|
||||
boolean performDetailing(World world, int x, int y, int z, int blockID, int blockMeta) {
|
||||
boolean detailed = false;
|
||||
return detailed;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -618,8 +618,7 @@ public class TConstructRegistry {
|
||||
try {
|
||||
Class clazz = Class.forName("tconstruct.TConstruct");
|
||||
Method method = clazz.getMethod("getTableCasting");
|
||||
LiquidCasting lc = (LiquidCasting) method.invoke(this);
|
||||
return lc;
|
||||
return (LiquidCasting) method.invoke(this);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Could not find casting table recipes.");
|
||||
return null;
|
||||
@@ -634,8 +633,7 @@ public class TConstructRegistry {
|
||||
try {
|
||||
Class clazz = Class.forName("tconstruct.TConstruct");
|
||||
Method method = clazz.getMethod("getBasinCasting");
|
||||
LiquidCasting lc = (LiquidCasting) method.invoke(this);
|
||||
return lc;
|
||||
return (LiquidCasting) method.invoke(this);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Could not find casting basin recipes.");
|
||||
return null;
|
||||
@@ -650,8 +648,7 @@ public class TConstructRegistry {
|
||||
try {
|
||||
Class clazz = Class.forName("tconstruct.TConstruct");
|
||||
Method method = clazz.getMethod("getChiselDetailing");
|
||||
Detailing lc = (Detailing) method.invoke(this);
|
||||
return lc;
|
||||
return (Detailing) method.invoke(this);
|
||||
} catch (Exception e) {
|
||||
logger.warn("Could not find chisel detailing recipes.");
|
||||
return null;
|
||||
|
||||
@@ -180,9 +180,7 @@ public abstract class ArmorCore extends ItemArmor implements ISpecialArmor, IMod
|
||||
float ratio = currentDurability / maxDurability;
|
||||
double base = tags.getDouble("BaseDefense");
|
||||
double max = tags.getDouble("MaxDefense");
|
||||
double current = (max - base) * ratio + base;
|
||||
|
||||
return current;
|
||||
return (max - base) * ratio + base;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -12,7 +12,6 @@ public class Detailing {
|
||||
|
||||
public void addDetailing(Object input, int inputMeta, Object output, int outputMeta, ToolCore tool) {
|
||||
ItemStack iID, oID;
|
||||
int iMeta = inputMeta, oMeta = outputMeta;
|
||||
|
||||
if (input instanceof Block) iID = new ItemStack(((Block) input));
|
||||
else if (input instanceof Item) iID = new ItemStack(((Item) input));
|
||||
@@ -24,7 +23,7 @@ public class Detailing {
|
||||
else if (output instanceof ItemStack) oID = (ItemStack) output;
|
||||
else throw new RuntimeException("Invalid detail output!");
|
||||
|
||||
this.addDetailing(new DetailInput(iID, iMeta, oID, oMeta), tool);
|
||||
this.addDetailing(new DetailInput(iID, inputMeta, oID, outputMeta), tool);
|
||||
}
|
||||
|
||||
public void addDetailing(DetailInput details, ToolCore tool) {
|
||||
@@ -48,11 +47,10 @@ public class Detailing {
|
||||
|
||||
public void addShapelessToolRecipe(ItemStack par1ItemStack, Object... par2ArrayOfObj) {
|
||||
ArrayList arraylist = new ArrayList();
|
||||
Object[] aobject = par2ArrayOfObj;
|
||||
int i = par2ArrayOfObj.length;
|
||||
|
||||
for (int j = 0; j < i; ++j) {
|
||||
Object object1 = aobject[j];
|
||||
Object object1 = par2ArrayOfObj[j];
|
||||
|
||||
if (object1 instanceof ItemStack) {
|
||||
arraylist.add(((ItemStack) object1).copy());
|
||||
|
||||
@@ -31,7 +31,7 @@ public class CraftingSlab extends InventorySlab {
|
||||
/* Rendering */
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
String[] textureNames = {
|
||||
return new String[]{
|
||||
"craftingstation_top",
|
||||
"craftingstation_slab_side",
|
||||
"craftingstation_bottom",
|
||||
@@ -51,8 +51,6 @@ public class CraftingSlab extends InventorySlab {
|
||||
"toolforge_slab_side",
|
||||
"toolforge_top"
|
||||
};
|
||||
|
||||
return textureNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -30,9 +30,7 @@ public class CraftingStationBlock extends InventoryBlock {
|
||||
/* Rendering */
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
String[] textureNames = {"craftingstation_top", "craftingstation_side", "craftingstation_bottom"};
|
||||
|
||||
return textureNames;
|
||||
return new String[]{"craftingstation_top", "craftingstation_side", "craftingstation_bottom"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -44,9 +44,7 @@ public class FurnaceSlab extends InventorySlab {
|
||||
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
String[] textureNames = {"furnaceslab_front", "furnaceslab_front_active", "furnaceslab_side", "furnace_top"};
|
||||
|
||||
return textureNames;
|
||||
return new String[]{"furnaceslab_front", "furnaceslab_front_active", "furnaceslab_side", "furnace_top"};
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -35,7 +35,7 @@ public class ToolStationBlock extends InventoryBlock {
|
||||
/* Rendering */
|
||||
@Override
|
||||
public String[] getTextureNames() {
|
||||
String[] textureNames = {
|
||||
return new String[]{
|
||||
"toolstation_top",
|
||||
"toolstation_side",
|
||||
"toolstation_bottom",
|
||||
@@ -67,8 +67,6 @@ public class ToolStationBlock extends InventoryBlock {
|
||||
"stenciltable_jungle_side",
|
||||
"stenciltable_jungle_bottom"
|
||||
};
|
||||
|
||||
return textureNames;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -52,9 +52,8 @@ public class InventoryCraftingStationResult extends InventoryCraftResult {
|
||||
public ItemStack decrStackSize(int par1, int par2) {
|
||||
ItemStack stack = logic.getStackInSlot(0);
|
||||
if (stack != null) {
|
||||
ItemStack itemstack = stack;
|
||||
logic.setInventorySlotContents(0, null);
|
||||
return itemstack;
|
||||
return stack;
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -76,9 +76,7 @@ public class BattlesignLogic extends EquipLogic {
|
||||
public S35PacketUpdateTileEntity getDescriptionPacket() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
this.writeToNBT(compound);
|
||||
|
||||
S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, compound);
|
||||
return packet;
|
||||
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -53,9 +53,7 @@ public abstract class EquipLogic extends InventoryLogic {
|
||||
public S35PacketUpdateTileEntity getDescriptionPacket() {
|
||||
NBTTagCompound compound = new NBTTagCompound();
|
||||
this.writeToNBT(compound);
|
||||
|
||||
S35PacketUpdateTileEntity packet = new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, compound);
|
||||
return packet;
|
||||
return new S35PacketUpdateTileEntity(xCoord, yCoord, zCoord, 1, compound);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -164,9 +164,7 @@ public class Javelin extends AmmoWeapon {
|
||||
@Override
|
||||
protected Entity createProjectile(ItemStack reference, World world, EntityPlayer player, float accuracy, int time) {
|
||||
reference.getTagCompound().getCompoundTag("InfiTool").removeTag("Throwing"); // needed so the NBTs are equal
|
||||
JavelinEntity entity = new JavelinEntity(world, player, getProjectileSpeed(), accuracy, reference);
|
||||
|
||||
return entity;
|
||||
return new JavelinEntity(world, player, getProjectileSpeed(), accuracy, reference);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -60,10 +60,9 @@ public class MiningExplosion extends Explosion {
|
||||
Block k1 = this.world.getBlock(l, i1, j1);
|
||||
|
||||
if (k1 != Blocks.air) {
|
||||
Block block = k1;
|
||||
float f3 = this.exploder != null
|
||||
? this.exploder.func_145772_a(this, this.world, l, i1, j1, block)
|
||||
: block.getExplosionResistance(
|
||||
? this.exploder.func_145772_a(this, this.world, l, i1, j1, k1)
|
||||
: k1.getExplosionResistance(
|
||||
this.exploder, world, l, i1, j1, explosionX, explosionY, explosionZ);
|
||||
f1 -= (f3 + 0.8F) * f2 * 0.25f;
|
||||
}
|
||||
@@ -196,14 +195,11 @@ public class MiningExplosion extends Explosion {
|
||||
}
|
||||
|
||||
if (l != Blocks.air) {
|
||||
Block block = l;
|
||||
|
||||
if (block.canDropFromExplosion(this)) {
|
||||
block.dropBlockAsItemWithChance(
|
||||
if (l.canDropFromExplosion(this)) {
|
||||
l.dropBlockAsItemWithChance(
|
||||
this.world, i, j, k, this.world.getBlockMetadata(i, j, k), 1.0F, 0);
|
||||
}
|
||||
|
||||
block.onBlockExploded(this.world, i, j, k, this);
|
||||
l.onBlockExploded(this.world, i, j, k, this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user