mirror of
https://github.com/GTNewHorizons/BloodMagic.git
synced 2026-11-22 12:59:54 +00:00
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:
1 parent
dc1357739b
commit
49ccf2a36e
1 file changed
+14
@@ -86,6 +86,20 @@ public class SoulNetworkHandler
|
||||
|
||||
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)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user