Skip to content

Commit

Permalink
Pushed wrong class.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander committed Feb 7, 2014
1 parent 73c397f commit 0d2a868
Showing 1 changed file with 15 additions and 49 deletions.
64 changes: 15 additions & 49 deletions src/main/java/tconstruct/library/tools/ToolCore.java
Expand Up @@ -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;
Expand Down Expand Up @@ -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 = "";
Expand Down Expand Up @@ -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);
}
Expand Down Expand Up @@ -840,7 +821,6 @@ public int getItemMaxDamageFromStack (ItemStack stack)
{
return 0;
}

if (tags.hasKey("Energy"))
{
int energy = tags.getInteger("Energy");
Expand All @@ -857,7 +837,6 @@ public int getItemDamageFromStackForDisplay (ItemStack stack)
{
return 0;
}

if (tags.hasKey("Energy"))
{
int energy = tags.getInteger("Energy");
Expand All @@ -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)
Expand All @@ -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;
Expand Down Expand Up @@ -996,6 +961,7 @@ public int getEnergyStored (ItemStack container)
}
return tags.getInteger("Energy");
}

@Override
public int getMaxEnergyStored (ItemStack container)
{
Expand Down

0 comments on commit 0d2a868

Please sign in to comment.