mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-20 12:19:48 +00:00
quick fix : Unused assignment
This commit is contained in:
1 parent
6bf15fdfe3
commit
2b6b01314d
34 files changed
+54
-63
No files matched your search
@@ -8,7 +8,7 @@ import net.minecraft.world.World;
|
||||
import tconstruct.achievements.TAchievements;
|
||||
|
||||
public class CraftAchievementItem extends CraftingItem {
|
||||
public String grantedAchievement = "";
|
||||
public String grantedAchievement;
|
||||
|
||||
public CraftAchievementItem(
|
||||
String[] names,
|
||||
|
||||
@@ -43,8 +43,7 @@ public class TravelWings extends TravelGear {
|
||||
float terminalVelocity = -0.4f + (feather * 0.08f);
|
||||
if (terminalVelocity > -0.05f) terminalVelocity = -0.05f;
|
||||
if (player.isSneaking() && terminalVelocity > -0.8f) terminalVelocity = -0.8F;
|
||||
boolean flying = false;
|
||||
flying = player.capabilities.isFlying;
|
||||
boolean flying = player.capabilities.isFlying;
|
||||
if (!flying && player.motionY < terminalVelocity) {
|
||||
player.motionY = terminalVelocity;
|
||||
}
|
||||
|
||||
@@ -85,7 +85,7 @@ public class SlimeSapling extends BlockSapling {
|
||||
public void growTree(World world, int x, int y, int z, Random random) {
|
||||
int md = world.getBlockMetadata(x, y, z) % 8;
|
||||
world.setBlock(x, y, z, Blocks.air);
|
||||
WorldGenerator obj = null;
|
||||
WorldGenerator obj;
|
||||
|
||||
obj = new SlimeTreeGen(true, 5, 4, 1, 0);
|
||||
|
||||
|
||||
@@ -44,10 +44,10 @@ public class BlockSkinRenderHelper {
|
||||
IBlockAccess world) {
|
||||
render.enableAO = true;
|
||||
boolean flag = false;
|
||||
float f3 = 0.0F;
|
||||
float f4 = 0.0F;
|
||||
float f5 = 0.0F;
|
||||
float f6 = 0.0F;
|
||||
float f3;
|
||||
float f4;
|
||||
float f5;
|
||||
float f6;
|
||||
boolean flag1 = true;
|
||||
int l = block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos, zPos);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
@@ -1055,10 +1055,10 @@ public class BlockSkinRenderHelper {
|
||||
Block block = Blocks.stone;
|
||||
render.enableAO = true;
|
||||
boolean flag = false;
|
||||
float f3 = 0.0F;
|
||||
float f4 = 0.0F;
|
||||
float f5 = 0.0F;
|
||||
float f6 = 0.0F;
|
||||
float f3;
|
||||
float f4;
|
||||
float f5;
|
||||
float f6;
|
||||
boolean flag1 = true;
|
||||
int l = block.getMixedBrightnessForBlock(render.blockAccess, xPos, yPos, zPos);
|
||||
Tessellator tessellator = Tessellator.instance;
|
||||
|
||||
@@ -36,7 +36,7 @@ public class CustomBowRenderer implements IItemRenderer {
|
||||
public void renderItem(EntityLivingBase living, ItemStack stack, int renderPass, ItemRenderType type) {
|
||||
GL11.glPushMatrix();
|
||||
|
||||
IIcon icon = null;
|
||||
IIcon icon;
|
||||
if (living instanceof EntityPlayer) {
|
||||
EntityPlayer player = (EntityPlayer) living;
|
||||
if (player.getItemInUse() != null)
|
||||
|
||||
@@ -58,7 +58,7 @@ public class ArrowRender extends Render {
|
||||
float f6;
|
||||
int i;
|
||||
|
||||
Block block = null;
|
||||
Block block;
|
||||
block = BlockUtils.getBlockFromItem(itemstack.getItem());
|
||||
|
||||
if (itemstack.getItemSpriteNumber() == 0
|
||||
|
||||
@@ -64,7 +64,7 @@ public abstract class BowBase extends ToolCore {
|
||||
speedBase = flightSpeed;
|
||||
}
|
||||
|
||||
EntityArrow arrowEntity = null;
|
||||
EntityArrow arrowEntity;
|
||||
// if (tinkerArrow != null)
|
||||
if (slotID != -1 && (arrowID == -1 || slotID < arrowID)) {
|
||||
ItemStack arrowStack = tinkerArrow.copy();
|
||||
|
||||
@@ -8,8 +8,8 @@ public class DryingRackRecipes {
|
||||
public static ArrayList<DryingRecipe> recipes = new ArrayList<>();
|
||||
|
||||
public static void addDryingRecipe(Object input, int time, Object output) {
|
||||
ItemStack inputItem = null;
|
||||
ItemStack outputItem = null;
|
||||
ItemStack inputItem;
|
||||
ItemStack outputItem;
|
||||
|
||||
if (input instanceof ItemStack) inputItem = (ItemStack) input;
|
||||
else if (input instanceof Item) inputItem = new ItemStack((Item) input, 1, 0);
|
||||
|
||||
@@ -148,7 +148,7 @@ public class ToolBuilder {
|
||||
|
||||
if (item == null) return null;
|
||||
|
||||
ToolMaterial headMat = null, handleMat = null, accessoryMat = null, extraMat = null;
|
||||
ToolMaterial headMat, handleMat, accessoryMat = null, extraMat = null;
|
||||
headMat = TConstructRegistry.getMaterial(head);
|
||||
handleMat = TConstructRegistry.getMaterial(handle);
|
||||
|
||||
|
||||
@@ -323,7 +323,7 @@ public abstract class ProjectileBase extends EntityArrow implements IEntityAddit
|
||||
|
||||
// returns true if it was successful
|
||||
public boolean dealDamage(float damage, ToolCore ammo, NBTTagCompound tags, Entity entityHit) {
|
||||
boolean dealtDamage = false;
|
||||
boolean dealtDamage;
|
||||
|
||||
// deal regular damage
|
||||
DamageSource damagesource;
|
||||
|
||||
@@ -109,7 +109,7 @@ public class AbilityHelper {
|
||||
if (baseDamage > 0) damage = baseDamage;
|
||||
else damage = 1;
|
||||
}
|
||||
boolean causedDamage = false;
|
||||
boolean causedDamage;
|
||||
boolean isAlive = entity.isEntityAlive();
|
||||
|
||||
if (tool.pierceArmor() && !broken && entity instanceof EntityLivingBase) {
|
||||
@@ -346,7 +346,7 @@ public class AbilityHelper {
|
||||
return;
|
||||
|
||||
// calculate in reinforced/unbreaking
|
||||
int reinforced = 0;
|
||||
int reinforced;
|
||||
if (tags.hasKey("InfiTool") && dam > 0) // unbreaking only affects damage, not healing
|
||||
{
|
||||
NBTTagCompound toolTags = tags.getCompoundTag("InfiTool");
|
||||
|
||||
@@ -64,8 +64,8 @@ public class DynamicToolPart extends CraftingItem implements IToolPart {
|
||||
|
||||
@Override
|
||||
public String getItemStackDisplayName(ItemStack stack) {
|
||||
String material = "";
|
||||
String matName = "";
|
||||
String material;
|
||||
String matName;
|
||||
if (customMaterialClass == null) {
|
||||
tconstruct.library.tools.ToolMaterial toolmat = TConstructRegistry.getMaterial(getMaterialID(stack));
|
||||
if (toolmat == null) return super.getItemStackDisplayName(stack);
|
||||
@@ -79,7 +79,6 @@ public class DynamicToolPart extends CraftingItem implements IToolPart {
|
||||
TConstructRegistry.getCustomMaterial(getMaterialID(stack), customMaterialClass);
|
||||
if (customMaterial == null) return super.getItemStackDisplayName(stack);
|
||||
|
||||
material = "";
|
||||
if (customMaterial.input != null) {
|
||||
material = customMaterial.input.getUnlocalizedName();
|
||||
int firstPeriodIndex = material.indexOf('.');
|
||||
@@ -110,7 +109,7 @@ public class DynamicToolPart extends CraftingItem implements IToolPart {
|
||||
int id = getMaterialID(stack);
|
||||
if (id == -1) return getUnlocalizedName();
|
||||
|
||||
String material = "unknown";
|
||||
String material;
|
||||
if (customMaterialClass == null) {
|
||||
tconstruct.library.tools.ToolMaterial toolmat = TConstructRegistry.getMaterial(getMaterialID(stack));
|
||||
material = toolmat.materialName;
|
||||
|
||||
@@ -132,7 +132,7 @@ public abstract class HarvestTool extends ToolCore {
|
||||
boolean used = false;
|
||||
int hotbarSlot = player.inventory.currentItem;
|
||||
int itemSlot = hotbarSlot == 0 ? 8 : hotbarSlot + 1;
|
||||
ItemStack nearbyStack = null;
|
||||
ItemStack nearbyStack;
|
||||
|
||||
if (hotbarSlot < 8) {
|
||||
nearbyStack = player.inventory.getStackInSlot(itemSlot);
|
||||
|
||||
@@ -605,7 +605,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IEq
|
||||
boolean used = false;
|
||||
int hotbarSlot = player.inventory.currentItem;
|
||||
int itemSlot = hotbarSlot == 0 ? 8 : hotbarSlot + 1;
|
||||
ItemStack nearbyStack = null;
|
||||
ItemStack nearbyStack;
|
||||
|
||||
if (hotbarSlot < 8) {
|
||||
nearbyStack = player.inventory.getStackInSlot(itemSlot);
|
||||
|
||||
@@ -23,7 +23,7 @@ public class ItemBlockLandmine extends ItemBlock {
|
||||
|
||||
@Override
|
||||
public void addInformation(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, List par3List, boolean par4) {
|
||||
String interaction = null;
|
||||
String interaction;
|
||||
|
||||
switch (par1ItemStack.getItemDamage()) {
|
||||
case 0:
|
||||
|
||||
@@ -40,7 +40,6 @@ public class GloveSpeed extends ItemModTypeFilter {
|
||||
NBTTagCompound tags = getModifierTag(input);
|
||||
int[] keyPair;
|
||||
int increase = matchingAmount(modifiers);
|
||||
int current = 0;
|
||||
if (tags.hasKey(key)) {
|
||||
keyPair = tags.getIntArray(key);
|
||||
if (keyPair[0] % max == 0) {
|
||||
@@ -55,7 +54,6 @@ public class GloveSpeed extends ItemModTypeFilter {
|
||||
keyPair[0] += increase;
|
||||
tags.setIntArray(key, keyPair);
|
||||
}
|
||||
current = keyPair[0];
|
||||
updateModTag(input, keyPair);
|
||||
} else {
|
||||
int mods = tags.getInteger("Modifiers");
|
||||
@@ -64,7 +62,6 @@ public class GloveSpeed extends ItemModTypeFilter {
|
||||
String modName = "\u00a74Redstone (" + increase + "/" + max + ")";
|
||||
int tooltipIndex = addToolTip(input, tooltipName, modName);
|
||||
keyPair = new int[] {increase, max, tooltipIndex};
|
||||
current = keyPair[0];
|
||||
tags.setIntArray(key, keyPair);
|
||||
}
|
||||
|
||||
|
||||
@@ -40,7 +40,7 @@ public class ModRedstone extends ItemModTypeFilter {
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
int[] keyPair;
|
||||
int increase = matchingAmount(input);
|
||||
int current = 0;
|
||||
int current;
|
||||
if (tags.hasKey(key)) {
|
||||
keyPair = tags.getIntArray(key);
|
||||
if (keyPair[0] % max == 0) {
|
||||
|
||||
@@ -29,7 +29,7 @@ public class ModWindup extends ModRedstone {
|
||||
NBTTagCompound tags = tool.getTagCompound().getCompoundTag("InfiTool");
|
||||
int[] keyPair;
|
||||
int increase = matchingAmount(input);
|
||||
int current = 0;
|
||||
int current;
|
||||
if (tags.hasKey(key)) {
|
||||
keyPair = tags.getIntArray(key);
|
||||
if (keyPair[0] % max == 0) {
|
||||
|
||||
@@ -226,7 +226,7 @@ public abstract class RecipeHandlerBase extends TemplateRecipeHandler {
|
||||
if (this.fluid == null || this.fluid.getFluid() == null || this.fluid.amount <= 0) {
|
||||
return;
|
||||
}
|
||||
IIcon fluidIcon = null;
|
||||
IIcon fluidIcon;
|
||||
if (this.flowingTexture && this.fluid.getFluid().getFlowingIcon() != null) {
|
||||
fluidIcon = this.fluid.getFluid().getFlowingIcon();
|
||||
} else if (this.fluid.getFluid().getStillIcon() != null) {
|
||||
|
||||
@@ -16,7 +16,7 @@ public abstract class RecipeHandlerCastingBase extends RecipeHandlerBase {
|
||||
public class CachedCastingRecipe extends CachedBaseRecipe {
|
||||
private final List<PositionedStack> resources;
|
||||
private final FluidTankElement metal;
|
||||
private PositionedStack output = null;
|
||||
private PositionedStack output;
|
||||
|
||||
public CachedCastingRecipe(CastingRecipe recipe) {
|
||||
this.metal = new FluidTankElement(MOLTEN_FLOW, recipe.castingMetal.amount, recipe.castingMetal);
|
||||
|
||||
@@ -623,7 +623,7 @@ public class TinkerSmeltery {
|
||||
"dyeOrange",
|
||||
"dyeWhite"
|
||||
};
|
||||
String color = "";
|
||||
String color;
|
||||
for (int i = 0; i < 16; i++) {
|
||||
color = dyeTypes[15 - i];
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(
|
||||
@@ -1071,8 +1071,8 @@ public class TinkerSmeltery {
|
||||
int[] liquidDamage = new int[] {2, 13, 10, 11, 12, 14, 15, 6, 16, 18}; // ItemStack
|
||||
// damage
|
||||
// value
|
||||
int fluidAmount = 0;
|
||||
Fluid fs = null;
|
||||
int fluidAmount;
|
||||
Fluid fs;
|
||||
|
||||
for (int iter = 0; iter < TinkerTools.patternOutputs.length; iter++) {
|
||||
if (TinkerTools.patternOutputs[iter] != null) {
|
||||
|
||||
@@ -54,14 +54,10 @@ public class CastingChannelBlock extends BlockContainer {
|
||||
@Override
|
||||
public void setBlockBoundsBasedOnState(IBlockAccess world, int x, int y, int z) {
|
||||
CastingChannelLogic tile = (CastingChannelLogic) world.getTileEntity(x, y, z);
|
||||
float minX = 0.3125F;
|
||||
float maxX = 0.6875F;
|
||||
float minZ = 0.3125F;
|
||||
float maxZ = 0.6875F;
|
||||
minZ = 0F;
|
||||
maxZ = 1F;
|
||||
minX = 0F;
|
||||
maxX = 1F;
|
||||
float minZ = 0F;
|
||||
float maxZ = 1F;
|
||||
float minX = 0F;
|
||||
float maxX = 1F;
|
||||
this.setBlockBounds(minX, 0.375F, minZ, maxX, 0.625F, maxZ);
|
||||
}
|
||||
|
||||
|
||||
@@ -300,7 +300,7 @@ public class SmelteryGui extends ActiveContainerGui {
|
||||
}
|
||||
|
||||
// check if we have enough height to render everything
|
||||
int sum = 0;
|
||||
int sum;
|
||||
do {
|
||||
sum = 0;
|
||||
int biggest = -1;
|
||||
|
||||
@@ -46,10 +46,12 @@ public class CastingChannelLogic extends TileEntity implements IFluidHandler {
|
||||
public void updateEntity() {
|
||||
ticks++;
|
||||
|
||||
boolean flagActiveFaucet = false;
|
||||
//boolean flagActiveFaucet = false;
|
||||
|
||||
TileEntity possibleFaucet = worldObj.getTileEntity(xCoord, yCoord + 1, zCoord);
|
||||
if (possibleFaucet instanceof FaucetLogic) flagActiveFaucet = ((FaucetLogic) possibleFaucet).active;
|
||||
//if (possibleFaucet instanceof FaucetLogic) {
|
||||
// flagActiveFaucet = ((FaucetLogic) possibleFaucet).active;
|
||||
//}
|
||||
|
||||
if (ticks == 6) // && !flagActiveFaucet)
|
||||
this.distributeFluids();
|
||||
|
||||
@@ -189,7 +189,7 @@ public class ArrowEntity extends EntityArrow implements IEntityAdditionalSpawnDa
|
||||
damageInflicted += this.rand.nextInt(damageInflicted / 2 + 2);
|
||||
}
|
||||
|
||||
DamageSource damagesource = null;
|
||||
DamageSource damagesource;
|
||||
|
||||
if (this.shootingEntity == null) {
|
||||
damagesource = DamageSource.causeArrowDamage(this, this);
|
||||
|
||||
@@ -62,7 +62,7 @@ public class CraftingStationGui extends GuiContainer implements INEIGuiHandler {
|
||||
// Panel positions
|
||||
public String toolName;
|
||||
public GuiTextField text;
|
||||
public String title, body = "";
|
||||
public String title, body;
|
||||
CraftingStationLogic logic;
|
||||
|
||||
private int craftingLeft = 0;
|
||||
|
||||
@@ -95,7 +95,7 @@ public class CraftingStationContainer extends Container {
|
||||
? ((ISidedInventory) inv).getAccessibleSlotsFromSide(accessSide)
|
||||
: null;
|
||||
|
||||
int index = 0, curIndex = 0;
|
||||
int index = 0, curIndex;
|
||||
IInventory curInv;
|
||||
final int invSize = inv.getSizeInventory() * (secondInv != null ? 2 : 1);
|
||||
for (row = 0; row < logic.invRows; row++) {
|
||||
|
||||
@@ -48,7 +48,7 @@ public class CreativeModifier extends Item {
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4) {
|
||||
if (stack.hasTagCompound()) {
|
||||
String targetLock = "None";
|
||||
String targetLock;
|
||||
targetLock = stack.getTagCompound().getString("TargetLock");
|
||||
targetLock = StatCollector.translateToLocal("infitool." + targetLock.toLowerCase());
|
||||
list.add(StatCollector.translateToLocal("creativeModLock.tooltip") + targetLock);
|
||||
|
||||
@@ -25,7 +25,7 @@ public class ToolPart extends CraftingItem implements IToolPart {
|
||||
String material = "";
|
||||
if (par1ItemStack.getItemDamage() < toolTextureNames.length)
|
||||
material = toolTextureNames[par1ItemStack.getItemDamage()];
|
||||
String name = "";
|
||||
String name;
|
||||
|
||||
if (StatCollector.canTranslate("toolpart." + partName + "." + material)) {
|
||||
name = StatCollector.translateToLocal("toolpart." + partName + "." + material);
|
||||
|
||||
@@ -61,9 +61,7 @@ public class FancyItemRender extends Render {
|
||||
float f6;
|
||||
int i;
|
||||
|
||||
Block block = null;
|
||||
|
||||
block = Block.getBlockFromItem(itemstack.getItem());
|
||||
Block block = Block.getBlockFromItem(itemstack.getItem());
|
||||
|
||||
if (ForgeHooksClient.renderEntityItem(
|
||||
par1EntityItem, itemstack, f2, f3, random, renderManager.renderEngine, field_147909_c, 1)) {
|
||||
|
||||
@@ -160,14 +160,14 @@ public class WeaponryHandler {
|
||||
NBTTagCompound tags = event.toolTag.getCompoundTag("InfiTool");
|
||||
ProjectileWeapon weapon = (ProjectileWeapon) event.tool;
|
||||
|
||||
int drawSpeed = 0;
|
||||
float flightSpeed = 0;
|
||||
int drawSpeed;
|
||||
float flightSpeed;
|
||||
|
||||
BowMaterial top;
|
||||
BowMaterial bottom;
|
||||
BowstringMaterial string;
|
||||
|
||||
boolean enchanted = false;
|
||||
boolean enchanted;
|
||||
|
||||
if (event.tool instanceof BowBaseAmmo) {
|
||||
top = TConstructRegistry.getBowMaterial(tags.getInteger("Head"));
|
||||
|
||||
@@ -628,7 +628,7 @@ public class TinkerWorld {
|
||||
"dyeOrange",
|
||||
"dyeWhite"
|
||||
};
|
||||
String color = "";
|
||||
String color;
|
||||
for (int i = 0; i < 16; i++) {
|
||||
color = dyeTypes[15 - i];
|
||||
GameRegistry.addRecipe(new ShapedOreRecipe(
|
||||
|
||||
@@ -530,7 +530,7 @@ public class CartEntity extends Entity implements IInventory, IEntityAdditionalS
|
||||
}
|
||||
|
||||
int[][] var12 = matrix[var11];
|
||||
double var13 = 0.0D;
|
||||
double var13;
|
||||
double var15 = (double) var7 + 0.5D + (double) var12[0][0] * 0.5D;
|
||||
double var17 = (double) var8 + 0.5D + (double) var12[0][1] * 0.5D;
|
||||
double var19 = (double) var9 + 0.5D + (double) var12[0][2] * 0.5D;
|
||||
|
||||
@@ -12,7 +12,7 @@ public class SurfaceOreGen extends WorldGenerator {
|
||||
/** The block of the ore to be placed using this generator. */
|
||||
private final Block minableBlock;
|
||||
|
||||
private int minableBlockMeta = 0;
|
||||
private int minableBlockMeta;
|
||||
|
||||
/** The number of blocks to generate. */
|
||||
private final int numberOfBlocks;
|
||||
|
||||
Reference in new issue
Block a user