Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

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.

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

  • Author

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.

  • Author

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.