mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-26 15:03:01 +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,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);
|
||||
|
||||
Reference in new issue
Block a user