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

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

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.