Started by
Bill_Clinton
on
Topic category: Help with Minecraft modding (Java Edition)
I'm creating a mod where you build an army, and part of this is Voluntary Soldiers and Conscripts. The basic idea is unemployed villagers can start working at a job block to become the Recruit Profession. From here, you initiate a trade with them, which upon completion turns them into Infantry, which is a separate mob (it would spawn the infantry and despawn the villager)
I got the job block, the recruit profession, villagers turn into the recruit profession, but I cant find out a way to get the villager to turn into the Infantry.
Is there a way that I can make the trade itself turn them into another mob?
Additionally, I found a piece of code that CAN change vanilla villager professions into the mob, through this text:
((Villager) entity).getVillagerData().getProfession() == VillagerProfession.PROFESSIONNAME
however, this doesnt translate onto modded professions.