Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.