Merge branch 'master' of https://github.com/WayofTime/BloodMagic
This commit is contained in:
commit
436ba63fc8
3 changed files with 12 additions and 12 deletions
|
@ -227,13 +227,13 @@ public class BoundAxe extends ItemAxe implements IBindable
|
||||||
|
|
||||||
public boolean getActivated(ItemStack par1ItemStack)
|
public boolean getActivated(ItemStack par1ItemStack)
|
||||||
{
|
{
|
||||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
if (!par1ItemStack.hasTagCompound())
|
||||||
|
|
||||||
if (itemTag == null)
|
|
||||||
{
|
{
|
||||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||||
|
|
||||||
return itemTag.getBoolean("isActive");
|
return itemTag.getBoolean("isActive");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -321,7 +321,7 @@ public class BoundAxe extends ItemAxe implements IBindable
|
||||||
@Override
|
@Override
|
||||||
public int getHarvestLevel(ItemStack stack, String toolClass)
|
public int getHarvestLevel(ItemStack stack, String toolClass)
|
||||||
{
|
{
|
||||||
if ("axe".equals(toolClass))
|
if (getActivated(stack) && "axe".equals(toolClass))
|
||||||
{
|
{
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -235,13 +235,13 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
||||||
|
|
||||||
public boolean getActivated(ItemStack par1ItemStack)
|
public boolean getActivated(ItemStack par1ItemStack)
|
||||||
{
|
{
|
||||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
if (!par1ItemStack.hasTagCompound())
|
||||||
|
|
||||||
if (itemTag == null)
|
|
||||||
{
|
{
|
||||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||||
|
|
||||||
return itemTag.getBoolean("isActive");
|
return itemTag.getBoolean("isActive");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -331,7 +331,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
|
||||||
@Override
|
@Override
|
||||||
public int getHarvestLevel(ItemStack stack, String toolClass)
|
public int getHarvestLevel(ItemStack stack, String toolClass)
|
||||||
{
|
{
|
||||||
if ("pickaxe".equals(toolClass))
|
if (getActivated(stack) && "pickaxe".equals(toolClass))
|
||||||
{
|
{
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
|
@ -233,13 +233,13 @@ public class BoundShovel extends ItemSpade implements IBindable
|
||||||
|
|
||||||
public boolean getActivated(ItemStack par1ItemStack)
|
public boolean getActivated(ItemStack par1ItemStack)
|
||||||
{
|
{
|
||||||
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
if (!par1ItemStack.hasTagCompound())
|
||||||
|
|
||||||
if (itemTag == null)
|
|
||||||
{
|
{
|
||||||
par1ItemStack.setTagCompound(new NBTTagCompound());
|
par1ItemStack.setTagCompound(new NBTTagCompound());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
NBTTagCompound itemTag = par1ItemStack.getTagCompound();
|
||||||
|
|
||||||
return itemTag.getBoolean("isActive");
|
return itemTag.getBoolean("isActive");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -330,7 +330,7 @@ public class BoundShovel extends ItemSpade implements IBindable
|
||||||
@Override
|
@Override
|
||||||
public int getHarvestLevel(ItemStack stack, String toolClass)
|
public int getHarvestLevel(ItemStack stack, String toolClass)
|
||||||
{
|
{
|
||||||
if ("shovel".equals(toolClass))
|
if (getActivated(stack) && "shovel".equals(toolClass))
|
||||||
{
|
{
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue