Posted December 27, 20213 yr Hello normally in 1.17.1 i call BiomeLoadingEvent for add some Structure from BiomeGenerationSettingsBuilder#getStructures() but when i modding on 1.18.1 getStructures() method is missing. Don't ask me what I want, you should know what I want. Edited December 27, 20213 yr by zlappedx3
December 27, 20213 yr you need to add your custom Structures to the StructureSettings.configuredStructures in FMLCommonSetupEvent, this requires an AT or you need to use Reflection, since it's a ImmutableMap and you need to replace the Map with a new ImmutableMap. Note: you need to copy the old Map into the new Map, if you don't do that, the vanilla structures won't be generated Edited December 27, 20213 yr by Luis_ST
December 28, 20213 yr Author If StructureSettings#configuredStructures is private variable how to add to the StructureSettings#configuredStructures ?
December 28, 20213 yr 10 hours ago, Luis_ST said: this requires an AT or you need to use Reflection Java Reflection: https://www.baeldung.com/java-reflection Access Transformer: https://forge.gemwire.uk/wiki/Access_Transformers AT: public-f net.minecraft.world.level.levelgen.StructureSettings f_189361_ # configuredStructures
December 28, 20213 yr Author @Luis_ST 2 Finally Quastion if i use StructureFeatures#registerStructures it's static method can it working ?, and the what is @mixin(something.class) and how to use it ? PS. Sorry now i'm so stupid but if you example about this i will thank you so mush. Edited December 28, 20213 yr by zlappedx3
December 28, 20213 yr 4 hours ago, zlappedx3 said: if i use StructureFeatures#registerStructures it's static method can it working ? with mixin/core modding yes, else no 4 hours ago, zlappedx3 said: and the what is @mixin(something.class) and how to use it ? mixin/core modding is not supported on this Forum, there are some use cases where you need mixin. but this case is possible without mixin, so you don't ge support. if you have a other use case for that you can ask on the Forge discord in the non-api-modding chanel, but only if this a true case
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.