Moar Omega, fixed Bound tool check to see if block is silk-touchable

This commit is contained in:
WayofTime 2015-01-14 17:26:14 -05:00
parent 6cb1e06306
commit ac5a20d5b2
10 changed files with 89 additions and 6 deletions

View file

@ -151,7 +151,7 @@ public class BoundAxe extends ItemAxe implements IBindable
if (str > 1.1f || block instanceof BlockLeavesBase && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k))
{
if (silkTouch)
if (silkTouch && block.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta))
{
ItemStack droppedItem = new ItemStack(block, 1, meta);

View file

@ -158,7 +158,7 @@ public class BoundPickaxe extends ItemPickaxe implements IBindable
if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k))
{
if (silkTouch)
if (silkTouch && block.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta))
{
ItemStack droppedItem = new ItemStack(block, 1, meta);

View file

@ -157,7 +157,7 @@ public class BoundShovel extends ItemSpade implements IBindable
if (str > 1.1f && par2World.canMineBlock(par3EntityPlayer, posX + i, posY + j, posZ + k))
{
if (silkTouch)
if (silkTouch && block.canSilkHarvest(par2World, par3EntityPlayer, posX + i, posY + j, posZ + k, meta))
{
ItemStack droppedItem = new ItemStack(block, 1, meta);

View file

@ -55,6 +55,11 @@ public abstract class OmegaArmour extends BoundArmour
public ItemStack getSubstituteStack(ItemStack boundStack)
{
ItemStack omegaStack = new ItemStack(this);
if(boundStack != null && boundStack.hasTagCompound())
{
NBTTagCompound tag = (NBTTagCompound) boundStack.getTagCompound().copy();
omegaStack.setTagCompound(tag);
}
this.setContainedArmourStack(omegaStack, boundStack);
SoulNetworkHandler.checkAndSetItemOwner(omegaStack, SoulNetworkHandler.getOwnerName(boundStack));
return omegaStack;