Okay, here is what I have, cleaned up a bit. Essentially I just called the nms setProfession and setVillagerData. But then I issued a dispatchCommand to set the job_site, which I hear is a bad idea, but seems to be the only thing that works right now. I'm open to any ideas of cleanup or...
After a couple days of trying, it seems that something internal is being cached. I either don't know how to fix it, or don't know how to trigger NMS to recognize a change.
In addition to my last two posts, I have also found that there is a MemoryKey called POTENTIAL_JOB_SITE. When you place a...
Well, one "fix" is that I have added nmsVillager.setVillagerXp(1);. Turns out they WERE changing their profession, but for one cpu cycle (maybe tick?).
But as for setting the memory (job_site), I still have an issue.
Bukkit's Villager object has setMemory(MemoryKey.JOB_SITE, blockLocation)...
In a villager's NBT, they have Brain > memories > "minecraft:job_site"
They also have VillagerData > profession
I have attempted to call the Bukkit Villager setProfession(Profession.FARMER), as well as the NMS Villager to getVillagerData(), setProfession(VillagerProfession.FARMER), and then...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.