Posted May 4, 20205 yr For a while, I`m trying to add a custom villager house to a village house pool, so it could be generated in villages as vanilla houses do. I looked through a vanilla code, this forum, googled it, checked some other mod sources, and actually all I've found about that is to: (copy+paste+renaming from net.minecraft.world.gen.feature.structure.PlainsVillagePools) JigsawManager.REGISTRY.register(new JigsawPattern( new ResourceLocation("village/plains/houses"), new ResourceLocation("village/plains/terminators"), ImmutableList.of( new Pair<>(new SingleJigsawPiece("testmod:test_structure"), 10) //10 is to increase probabillity, as I've understood related code ), PlacementBehaviour.RIGID )); , invoked within setupWorldGen: (actually, in a static initializer of a class, whose method is called in setupWorldGen; I`m sure the code is executed, due to my special log message sent) @SubscribeEvent public static void commonSetup(final FMLCommonSetupEvent event) { DeferredWorkQueue.runLater( ()-> setupWorldGen()); } with valid NBT structure file stored at data/testmod/structures. But I couldn't find my house within newly-generated villages. This structure includes single Jigsaw block, configured as one in vanilla structure village/plains/houses/plains_small_house_1 except "Turns into" value, which i left as minecraft:air. Structure file is definitely valid, because I succeed it`s generation as a ScatteredStructure randomly in the world. Actually, the question is: what is actually done to properly add JigsawPiece to a pool? I'd be graceful for any help here or useful links to guides, documentations, etc. Sadly, provision of a full source code would be very uncultured, because It`s my first mod, so a source code looks like hell. (But if You want to check it out - here it is) I`m sorry for any misunderstanding and mistakes, due to I`m very new to forge. Thanks again for help. Edited May 5, 20205 yr by Dzuchun (repaired link) Everything said above may be absolutely wrong. No rights reserved.
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.