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