Posted April 30, 20205 yr Hello, I am trying to add my own Villiager. In order to create its profession I also need to create its POI. However, the constructor for PointOfIntrestType is private. Infact, 99% of the class is private. While I can use the differed registry to order things correctly, it obv creates an error when I try to instantiate the private class. public static final RegistryObject<PointOfInterestType> MONEY_POI = POI.register("money_machine", // First #1 is the number of villigers who can use block at a time, () -> new PointOfInterestType("money_machine", getAllStates(MONEY_MACHINE.get()), 1, (SoundEvent) null, 1)); } Above is how they are created, but, new PointOfInterestType is private. Minecraft seems to create them with a function called func_226359_a_, however, this is also private. Has anyone got custom villagers working in 1.15.2?
April 30, 20205 yr Author 7 hours ago, Boy132 said: I guess you need to make the constructor public with an access transformer. Sounds great. No idea how it works tho, I've seen it work for private fields, but I have no idea how to make it work for constructiors.
April 30, 20205 yr 2 hours ago, IMleader said: Sounds great. No idea how it works tho, I've seen it work for private fields, but I have no idea how to make it work for constructiors. Also want to know this
May 3, 20205 yr I'm getting the same issue about PointOfInterestType and VillagerProfession. I wonder why the constructor modifier was changed to private in [1.15.2], there are some codes i saw in [1.14.*] that uses those constructors like they was public. I found this topic interesting: [1.14.4] Villagers Professions (Fix) & Trades
May 16, 20205 yr Following, I also have the same issue. Is there a designed way to make POIs or is AT the only way?
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.