diff --git a/src/main/java/tconstruct/library/tools/ToolCore.java b/src/main/java/tconstruct/library/tools/ToolCore.java index 537912fa708..1623ff57012 100644 --- a/src/main/java/tconstruct/library/tools/ToolCore.java +++ b/src/main/java/tconstruct/library/tools/ToolCore.java @@ -58,7 +58,7 @@ public abstract class ToolCore extends Item implements IEnergyContainerItem, IBattlegearWeapon { - //TE power constants -- TODO grab these from the + //TE power constants -- TODO grab these from the items added protected int capacity = 400000; protected int maxReceive = 75; protected int maxExtract = 75; @@ -337,25 +337,6 @@ public void addInformation (ItemStack stack, EntityPlayer player, List list, boo return; NBTTagCompound tags = stack.getTagCompound(); - if (tags.hasKey("charge")) - { - String color = ""; - //double joules = this.getJoules(stack); - int power = tags.getInteger("charge"); - - if (power != 0) - { - if (power <= this.getMaxEnergyStored(stack) / 3) - color = "\u00a74"; - else if (power > this.getMaxEnergyStored(stack) * 2 / 3) - color = "\u00a72"; - else - color = "\u00a76"; - } - - String charge = new StringBuilder().append(color).append(tags.getInteger("charge")).append("/").append(getMaxEnergyStored(stack)).append(" EU").toString(); - list.add(charge); - } if (tags.hasKey("Energy")) { String color = ""; @@ -565,7 +546,7 @@ public void buildTool (int id, String name, List list) boolean supress = false; try { - clazz = Class.forName("tconstruct.common.TContent"); //TODO: Make sure this is still working in 1.7. + clazz = Class.forName("tconstruct.common.TRepo"); //TODO: Make sure this is still working in 1.7. fld = clazz.getField("supressMissingToolLogs"); supress = fld.getBoolean(fld); } @@ -840,7 +821,6 @@ public int getItemMaxDamageFromStack (ItemStack stack) { return 0; } - if (tags.hasKey("Energy")) { int energy = tags.getInteger("Energy"); @@ -857,7 +837,6 @@ public int getItemDamageFromStackForDisplay (ItemStack stack) { return 0; } - if (tags.hasKey("Energy")) { int energy = tags.getInteger("Energy"); @@ -868,44 +847,30 @@ public int getItemDamageFromStackForDisplay (ItemStack stack) } /* Battlegear support, IBattlegearWeapon */ - // 1.6.4 start - public boolean allowOffhand(ItemStack mainhand, ItemStack offhand) + + @Override + public boolean willAllowOffhandWeapon () { return true; } - public boolean isOffhandHandDual(ItemStack off) + @Override + public boolean willAllowShield () { return true; } - public boolean sheatheOnBack(ItemStack item) - { - return false; - } - //1.6.4 end - - //1.6.2 start - public boolean willAllowOffhandWeapon() + @Override + public boolean isOffhandHandDualWeapon () { - return true; + return true; } - public boolean willAllowShield() - { - return true; - } - - public boolean isOffhandHandDualWeapon() - { - return true; - } - - public boolean sheatheOnBack() + @Override + public boolean sheatheOnBack () { - return false; + return false; } - //1.6.2 end @Override public boolean offhandAttackEntity (OffhandAttackEvent event, ItemStack mainhandItem, ItemStack offhandItem) @@ -919,7 +884,7 @@ public boolean offhandClickAir (PlayerInteractEvent event, ItemStack mainhandIte return true; } - @Override + @Override public boolean offhandClickBlock (PlayerInteractEvent event, ItemStack mainhandItem, ItemStack offhandItem) { return true; @@ -996,6 +961,7 @@ public int getEnergyStored (ItemStack container) } return tags.getInteger("Energy"); } + @Override public int getMaxEnergyStored (ItemStack container) {