Jump to content

Recommended Posts

Posted (edited)

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 by zlappedx3
Posted (edited)

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 by Luis_ST
Posted (edited)

@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 by zlappedx3
Posted
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

  • Like 1

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.