Posted December 17, 20168 yr I created a new VillagerProfession with its name, texture, and zombie texture, and I registered it at the VillagerRegistry. Then I also created a career for the profession. Randomly spawning my villager by using the normal villager spawn egg works just fine. I thought by defining the zombie villager texture, everything for the corresponding zombie villager would also work. But I cant spawn the zombie villager by zombie spawn eggs, and also can not convert my villager into zombie villager. They just turn into normal zombies. I dug a bit through the source code, and I am kind of confused how this should even work. There is a method EntityZombie.setZombieType(ZombieType) , but marked as deprecated. This method calls VillagerRegistry.onSetProfession(EntityZombie, ZombieType, int) which is not deprecated. But for custom villager types it then seems to call EntityZombie.setVillagerType(VillagerProfession). Then there is this EntityZombie.setVillagerType(VillagerProfession) which is not deprecated, and calls VillagerRegistry.onSetProfession(EntityZombie, VillagerProfession) which is marked as deprecated again. But the onSetProfession method only works for vanilla types. So, how do I get my ZombieVillager spawn naturally, and also convert correctly from villager to ZombieVillager (and reverse)?
December 21, 20168 yr Author I still can't find a solution. For now I can only get my villager through breeding other villagers
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.