Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

[1.10.2] Custom Zombie Villager


Adversarius13293
 Share

Recommended Posts

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)?

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

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