Re-add FakePlayer check to sigils (#970)

whar did dey go?
This commit is contained in:
Nicholas Ignoffo 2016-11-11 16:57:50 -08:00
parent 1f31268669
commit b0007a1d36
25 changed files with 121 additions and 4 deletions

View file

@ -1,10 +1,13 @@
package WayofTime.bloodmagic.item.sigil;
import WayofTime.bloodmagic.api.Constants;
import WayofTime.bloodmagic.api.util.helper.PlayerHelper;
import WayofTime.bloodmagic.registry.ModPotions;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.ItemStack;
import net.minecraft.potion.PotionEffect;
import net.minecraft.util.ActionResult;
import net.minecraft.util.EnumActionResult;
import net.minecraft.world.World;
public class ItemSigilWhirlwind extends ItemSigilToggleableBase
@ -17,6 +20,9 @@ public class ItemSigilWhirlwind extends ItemSigilToggleableBase
@Override
public void onSigilUpdate(ItemStack stack, World world, EntityPlayer player, int itemSlot, boolean isSelected)
{
if (PlayerHelper.isFakePlayer(player))
return;
player.addPotionEffect(new PotionEffect(ModPotions.whirlwind, 2, 0, true, false));
}
}