Hello guys!
I am trying spawn Entity, when EntityPlayer isDead == true, but it is not working on server (on client is working)
Code:
@SubscribeEvent
public void onEntityPlayerDeath(LivingDeathEvent e) {
World world = e.entity.worldObj;
if(!world.isRemote) {
if(e.entity instanceof EntityPlayer) {
EntityZombie zombie = new EntityZombie(world);
zombie.setPosition(e.entity.posX, e.entity.posY, e.entity.posZ);
world.spawnEntityInWorld(zombie);
}
}
}
I don't see a problem :(