@SubscribeEvent public void livingUpdate(LivingUpdateEvent event) { ModEnchantments.onLivingUpdate(event.entityLiving); if (EtFuturum.enableVillagerZombies) if (!event.entityLiving.worldObj.isRemote && event.entityLiving.getClass() == EntityZombie.class) { EntityZombie zombie = (EntityZombie) event.entityLiving; if (zombie.isVillager()) { EntityZombieVillager villagerZombie = new EntityZombieVillager(zombie.worldObj); villagerZombie.copyLocationAndAnglesFrom(zombie); villagerZombie.onSpawnWithEgg(null); villagerZombie.worldObj.spawnEntityInWorld(villagerZombie); zombie.setDead(); } } }
@SubscribeEvent public void onPlayerPickXP(PlayerPickupXpEvent event) { ModEnchantments.onPlayerPickupXP(event); }