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

Hi everyone,

I have this custom village building in my mod (1.18.2) that I have implemented (as far as I know) in the same way as the folks from Immersive Engineering have done it.

It works but I have only found around 5 or 6 cases where it did spawn even if I have set the weight of the piece to the max value (which is 150).

I have done some testing but unfortunately I have no clue what is causing it. 
Here are some things I have discovered.

  • I added this line of code after adding the pieces to their respective pools.
    TEMPLATE_POOL.get(new ResourceLocation("village/desert/houses")).getShuffledTemplates(new Random(0)).forEach(e->LogUtils.getLogger().debug(e.toString()));

    This showed the weights like they should be (150) .
     

  • When using jigsaw blocks to spawn the jigsaw pieces the pieces were almost always my custom building so I assume that also works with my given weight.
     

  • In a world with the exact same seed when I have disabled the piece being added any village has way less buildings than whenever I do add the pieces.

  • Adding the piece multiple time to the village Pools does not change anything.

I know this is quite niche and not many people might know what the issue is or even how to solve it.

My theory is that maybe somehow the piece I added has a lot of criteria for the terrain or something (if that is a thing) that are almost never met

or that no matter the weight I set for the piece I add, when it gets naturally generated it uses weight 1 for some reason.

I could be dead wrong but I think those are the most likely.

Every bit of help is appreciated.

Thanks a lot!

 

P.S. If you want me to show some code, feel free to ask.

 

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.