mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-28 16:06:06 +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
@@ -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