Jump to content

[1.16.5] Problems generating structures in new village pool added to custom biome


Recommended Posts

Posted

Hi,

I've been working on a mod project for a while now and one of the last features I wanted to add was a new village pool to generate in the custom biome I had generated. I've managed to become completely stuck on this with village generation in general seeming a bit off and certain structures and jigsaw configs just refusing to generate. The village generation aspect of modding doesn't seem to be one commonly tackled or documented and I'm really struggling to find any resources on why I'm encountering some of these issues. I also find that unless there's a very clear issue in the village generation, there is nothing outputted to logs to help debug why things fail to spawn, and I'm not sure where the code that handles the generation lives.

To summarize my progress so far here's what I have:

  1. A custom village pool with a jigsaw pattern to start the generation pool. I have confirmed that all pools register to the game correctly
  2. A bunch of NBT structures stored under data/minecraft/structures/village/cherry_blossom_grotto/. For the case of this example the files are both under the town_centers sub-directory.
  3. A very basic understanding of structures + jigsaw blocks and how they combine structure files together into a larger construct
  4. I can generate basic village paths and some of my custom structures work just fine but additional jigsaw generation within structures does not work.

To summarize my main problem:

Some structures do not generate fully despite having correct jigsaw block connections. I basically want a town center (starting point for the village generation) with an underground component. Think of something very similar to well bottoms for a plains village well. The well should generate and then a jigsaw block within the well should cause a well bottom to spawn. Also, ideally I would like this generated pond bottom to not be off-center (I have seen this happen in well generation but I am not sure if there's any way to control it). I need to do this as a jigsaw structure since otherwise it raises the entire structure above the ground when generating.

 

A sample of my village pool code showing my town center object and the underground portion of the pond that I'm trying to generate:

public class CherryBlossomGrottoVillagePools {
    public static final JigsawPattern START = JigsawPatternRegistry.register(
        new JigsawPattern(
            new ResourceLocation( "village/cherry_blossom_grotto/town_centers"),
            new ResourceLocation("empty"),
            ImmutableList.of(
                    Pair.of(JigsawPiece.legacy("village/cherry_blossom_grotto/town_centers/koi_pond"), 50)
            ),
            JigsawPattern.PlacementBehaviour.RIGID
        )
    );
	
	public static void bootstrap() {

    }

	static {
      JigsawPatternRegistry.register(
              new JigsawPattern(
                  new ResourceLocation("village/cherry_blossom_grotto/koi_pond_bottoms"),
                  new ResourceLocation("empty"),
                  ImmutableList.of(
                      Pair.of(JigsawPiece.legacy("village/cherry_blossom_grotto/town_centers/koi_pond_bottom"), 1)
                  ),
                  JigsawPattern.PlacementBehaviour.RIGID
              )
          );
	}
}

 

Registration of my custom village pool, just in case its needed:

public static StructureFeature<VillageConfig, ? extends Structure<VillageConfig>> VILLAGE_CHERRY_BLOSSOM_GROTTO = Structure.VILLAGE.configured(new VillageConfig(() -> {
        return CherryBlossomGrottoVillagePools.START;
    }, 6));

 

Screenshots of the jigsaw block configs attaching the two pieces of the structure. Target names match and the first jigsaw block specifies the pool that I want to grab the pond bottom from. So it should work, right?

https://freeimage.host/i/ETZxLu
https://freeimage.host/i/ETZoXe

 

Thanks in advance for any pointers on this issue. I'm banging my head trying to get this project finished.

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.

Announcements



×
×
  • Create New...

Important Information

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