ItemBindable static methods now look for IBindable
This commit is contained in:
parent
58e51b9d51
commit
8f453f6e1e
|
@ -51,10 +51,10 @@ public class ItemBindable extends Item implements IBindable
|
||||||
|
|
||||||
if (!player.worldObj.isRemote)
|
if (!player.worldObj.isRemote)
|
||||||
{
|
{
|
||||||
if (stack != null && stack.getItem() instanceof ItemBindable)
|
if (stack != null && stack.getItem() instanceof IBindable)
|
||||||
{
|
{
|
||||||
ItemBindable itemBindable = (ItemBindable) stack.getItem();
|
IBindable itemBindable = (IBindable) stack.getItem();
|
||||||
String owner = itemBindable.getBindableOwner(stack);
|
String owner = itemBindable.getOwnerUUID(stack);
|
||||||
SoulNetwork network = NetworkHelper.getSoulNetwork(owner);
|
SoulNetwork network = NetworkHelper.getSoulNetwork(owner);
|
||||||
return NetworkHelper.syphonAndDamage(network, player, lpUsed);
|
return NetworkHelper.syphonAndDamage(network, player, lpUsed);
|
||||||
}
|
}
|
||||||
|
@ -85,10 +85,10 @@ public class ItemBindable extends Item implements IBindable
|
||||||
*/
|
*/
|
||||||
public static boolean syphonNetwork(ItemStack stack, int lpUsed)
|
public static boolean syphonNetwork(ItemStack stack, int lpUsed)
|
||||||
{
|
{
|
||||||
if (stack.getItem() instanceof ItemBindable)
|
if (stack.getItem() instanceof IBindable)
|
||||||
{
|
{
|
||||||
ItemBindable itemBindable = (ItemBindable) stack.getItem();
|
IBindable bindable = (IBindable) stack.getItem();
|
||||||
return !Strings.isNullOrEmpty(itemBindable.getBindableOwner(stack)) && NetworkHelper.syphonFromContainer(stack, lpUsed);
|
return !Strings.isNullOrEmpty(bindable.getOwnerUUID(stack)) && NetworkHelper.syphonFromContainer(stack, lpUsed);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -96,10 +96,10 @@ public class ItemBindable extends Item implements IBindable
|
||||||
|
|
||||||
public static boolean canSyphonFromNetwork(ItemStack stack, int lpRequested)
|
public static boolean canSyphonFromNetwork(ItemStack stack, int lpRequested)
|
||||||
{
|
{
|
||||||
if (stack.getItem() instanceof ItemBindable)
|
if (stack.getItem() instanceof IBindable)
|
||||||
{
|
{
|
||||||
ItemBindable itemBindable = (ItemBindable) stack.getItem();
|
IBindable bindable = (IBindable) stack.getItem();
|
||||||
return !Strings.isNullOrEmpty(itemBindable.getBindableOwner(stack)) && NetworkHelper.canSyphonFromContainer(stack, lpRequested);
|
return !Strings.isNullOrEmpty(bindable.getOwnerUUID(stack)) && NetworkHelper.canSyphonFromContainer(stack, lpRequested);
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in a new issue