Posted June 1, 20232 yr Hello, in 1.19.4-45.0.40, I'm using the RegistrySetBuilder class to add a method that has a parameter ConfiguredFeature<?, ?>>. However, I'm unable to add it successfully. But in version 45.0.39, I was able to do it without any problems. Do you happen to have any solutions to this issue?
June 2, 20232 yr Can you define method that has a parameter in this context? Do you mean your registry object holds a configured feature instance? If so, then your registry must be a datapack registry.
June 2, 20232 yr Author I have completed everything you mentioned, and here is an example from GitHub: https://github.com/Tutorials-By-Kaupenjoe/Forge-Tutorial-1.19.3/blob/7-treeGeneration I would like you to look at the two main classes as follows: ModConfiguredFeatures, located in the package net.kaupenjoe.tutorialmod.worldgen ModWorldGenProvider, located in the package net.kaupenjoe.tutorialmod.datagen If you're using version 1.19.4-45.0.39 without updating to 45.0.40, the mentioned code works fine. However, if you switch to version 45.0.40 and try to add the method ModConfiguredFeatures::bootstrap, there will be an immediate issue. It seems like it cannot accept a method with a parameter as an instance, but it can still work properly with an instance that doesn't have an instant parameter, such as BootstapContext<PlacedFeature>.
June 3, 20232 yr Author On 6/2/2023 at 7:50 PM, ChampionAsh5357 said: Can you define method that has a parameter in this context? Do you mean your registry object holds a configured feature instance? If so, then your registry must be a datapack registry. It seems like I made a slight mistake. Now I am able to use it properly. I didn't thoroughly check the data pack and it seems like there was a bug in the error checking of the IDE I was using. I don't blame anyone for this confusion. However, I can still build it even though the IDE is still indicating errors.
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.