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

Version: 1.20.6
Forge: 50.0.26

current code:

public static Holder<StructureTemplatePool> getTemplatePoolHolder(final ServerLevel level, final ResourceLocation resourceLocation) {
        if (level==null) {
            return null;
        }

        RegistryAccess registryaccess = level.registryAccess();

        Registry<StructureTemplatePool> registry = registryaccess.registryOrThrow(Registries.TEMPLATE_POOL);

        Logger logger = TheDungeon.LOGGER;

        logger.info("searcing for {} in {}", resourceLocation, registry);

        //Holder<StructureTemplatePool> holder = registry.getHolder(resourceLocation).orElse(null);

        StructureTemplatePool pool = registry.get(resourceLocation);
        Holder<StructureTemplatePool> holder = null;
        if (pool!=null) holder = Holder.direct(pool);
        return holder;
    }

unfortunately it seems like either i am getting the Registry wrong or the ResourceKey

this is the resource location it is trying to find: new ResourceLocation(TheDungeon.MOD_ID, "goblin_caves/spawns")

where the file is located resources > data > the_dungeon > worldgen > template_pool > goblin_caves > spawns.json

it does generate randomly when i create a structureSet

Maybe try “worldgen/template_pool/goblin_caves/spawns.json”

Or look into which path you should supply 

  • Author

ok so I figured out that what i was doing here worked

i apparently did not supply a starting jigsaw to the generate method, although now i get this error
No starting jigsaw the_dungeon:goblin_caves/spawns found in start pool the_dungeon:goblin_caves/spawns

this is the json file

{
  "name": "the_dungeon:goblin_caves/spawns",
  "fallback": "minecraft:empty",
  "elements": [
    {
      "weight": 1,
      "element": {
        "location": "the_dungeon:goblin_caves/spawns/stone_cave_spawn",
        "processors": "minecraft:empty",
        "projection": "rigid",
        "element_type": "minecraft:single_pool_element"
      }
    }
  ]
}

 

Edited by Just_EmSee

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.