Jump to content

Recommended Posts

Posted

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 :(

Guest
This topic is now closed to further replies.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.