Posted September 3, 20241 yr 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
September 3, 20241 yr Maybe try “worldgen/template_pool/goblin_caves/spawns.json” Or look into which path you should supply
September 4, 20241 yr 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 September 5, 20241 yr 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.