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

[1.15.2] Custom Point of Interest For Villigers


Recommended Posts

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?

Link to post
Share on other sites
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.

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

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.



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.