Add overload of syphonAndDamageFromNetwork that takes a String
Accepts a String instead of an ItemStack, as I have just encountered a situation where I have access to the Owner's name, but not the ItemStack being used
This commit is contained in:
parent
dc1357739b
commit
49ccf2a36e
|
@ -86,6 +86,20 @@ public class SoulNetworkHandler
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static boolean syphonAndDamageFromNetwork(String ownerName, EntityPlayer player, int damageToBeDone)
|
||||||
|
{
|
||||||
|
if (player.worldObj.isRemote)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
int amount = SoulNetworkHandler.syphonFromNetwork(ownerName, damageToBeDone);
|
||||||
|
|
||||||
|
hurtPlayer(player, damageToBeDone - amount);
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
public static boolean canSyphonFromOnlyNetwork(ItemStack ist, int damageToBeDone)
|
public static boolean canSyphonFromOnlyNetwork(ItemStack ist, int damageToBeDone)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue