Dagger of Sacrifice should not work for FakePlayers
This commit is contained in:
parent
32668f70ca
commit
c4f92708b1
|
@ -12,6 +12,7 @@ import net.minecraft.item.Item;
|
|||
import net.minecraft.item.ItemStack;
|
||||
import net.minecraft.util.SoundCategory;
|
||||
|
||||
import net.minecraftforge.common.util.FakePlayer;
|
||||
import org.apache.commons.lang3.tuple.ImmutablePair;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
|
@ -37,6 +38,9 @@ public class ItemDaggerOfSacrifice extends Item implements IVariantProvider
|
|||
@Override
|
||||
public boolean hitEntity(ItemStack stack, EntityLivingBase target, EntityLivingBase attacker)
|
||||
{
|
||||
if (attacker instanceof FakePlayer)
|
||||
return false;
|
||||
|
||||
if (target == null || attacker == null || attacker.getEntityWorld().isRemote || (attacker instanceof EntityPlayer && !(attacker instanceof EntityPlayerMP)))
|
||||
return false;
|
||||
|
||||
|
|
Loading…
Reference in a new issue