Jump to content

Recommended Posts

Posted

Anyone know how these work? I've been poking at the code and trying a few things, and while I have gotten the game to call hasStartAt(...) (and a bit further, such as having MyStructure.Start get init'd), I haven't been able to determine that any blocks are actually placed in the world.

 

I'm trying to work out how the system functions so I can help Lawremi update Custom Ore Generation, which relies on being able to place ore blocks from code (not structure files) as its has its own systems for determining what goes where, but at the moment I'd be happy to just get any of these structure functions that have a reference to World (addComponentParts, handleDataMarker, whatever) get called at all.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted (edited)

I've been experimenting myself... to no luck however (this is my registry file, works, but still don't know how to get the structure to spawn or how to add it to the locate command)

@ObjectHolder(VisionaryMod.modid)

public class VisionaryStructures {

    public static final Structure<NoFeatureConfig> INFERNALFORTRESS = new InfernalFortressStructure(NoFeatureConfig::deserialize);

 

    @SubscribeEvent

    public static void registerStructures(IForgeRegistry<Feature<?>> event) {

        VisionaryUtil.basic(event)

                .add("infernal_fortress", INFERNALFORTRESS);

    }

}

Edited by A-Game
Posted (edited)

Yeah, I've gotten that much myself.

Though I'll note that Structure<?> and Feature<?> work just fine for the object holder annotation (and as far as I can tell, both use the same registry; i.e. RegistryEvent.Register<Feature<?>>).

 

I've also gotten features working just fine, eg:

https://github.com/Draco18s/ReasonableRealism/blob/1.14.4/src/main/java/com/draco18s/harderores/HarderOres.java#L117

Edited by Draco18s

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Posted

Ah ha, I figured something out.

 

Structures need to be sent to biomes as both a structure and a feature or they won't generate. Still more work to do, but that part finally starts making sense.

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

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.