Skip to content

Help with Registering a Foliage Placer Type #2428

Discussion options

You must be logged in to vote

The constructor of FoliagerPlacerType is private, making it inaccessible to any code outside of FoliagerPlacerType.java.
There are 2 ways to get around this. Both are Fabric or Minecraft specific, so it's unsurprising you couldn't find them, search engines don't give great results for Minecraft modding.

Option 1 is creating a public Mixin invoker for the FoliagerPlacerType constructor.
https://fabricmc.net/wiki/tutorial:mixin_accessors
https://jenkins.liteloader.com/view/Other/job/Mixin/javadoc/org/spongepowered/asm/mixin/gen/Invoker.html

Option 2 is using Fabric's access wideners to change the access modifier of the constructor.
https://www.fabricmc.net/wiki/tutorial:accesswideners

I ap…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ReikanFurrow
Comment options

Answer selected by ReikanFurrow
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants