Jump to content

Custom Village JigsawPiece extremely rare


h3tR

Recommended Posts

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.

 

Link to comment
Share on other sites

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

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.