Should fix the Sacrifice Pack fakeplayer lookup

This commit is contained in:
Nick 2016-01-22 16:06:48 -08:00
parent a769e9d0a7
commit 4b9eaa90d8

View file

@ -67,10 +67,13 @@ public class EventHandler
Random random = new Random(); Random random = new Random();
@SubscribeEvent @SubscribeEvent
public void onEntityDeath(LivingHurtEvent event) public void onEntityHurt(LivingHurtEvent event)
{ {
int chestIndex = 2; int chestIndex = 2;
if (event.entity.worldObj.isRemote)
return;
if (event.source.getEntity() instanceof EntityPlayer && !PlayerHelper.isFakePlayer((EntityPlayer) event.source.getEntity())) if (event.source.getEntity() instanceof EntityPlayer && !PlayerHelper.isFakePlayer((EntityPlayer) event.source.getEntity()))
{ {
EntityPlayer player = (EntityPlayer) event.source.getEntity(); EntityPlayer player = (EntityPlayer) event.source.getEntity();