Jump to content

Dekunutter

Members
  • Posts

    2
  • Joined

  • Last visited

Everything posted by Dekunutter

  1. Hi, My mod adds a new biome which can spawn a new type of village. I'm encountering an issue where I cant seem to associate any loot tables with the chests in my new village structures. Not even vanilla loot tables. Ideally I'd like to have some custom loot fillnig these chests but I can probably figure that out pretty easily if I can source out why vanilla loot tables don't seem to be applying to my village structures. For other structure types I did this in code via: ChestBlockEntity.setLootTable() But for villages I am using StructureTemplatePools like vanilla does and not actually adding any custom structure features so I dont have anywhere to manually pop a loot table onto a chest block in code. All my village structures are being generated by NBT files. Is there something I can do to alter the NBT data to add a loot table to a chests? I tried adding a lootTable entry to my structure's NBT but that doesnt seem to work either: Properties: waterlogged: "false" facing: "north" type: "single" lootTable: "minecraft:chests/abandoned_mineshaft" Name: "minecraft:chest" Any ideas?
  2. 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: A custom village pool with a jigsaw pattern to start the generation pool. I have confirmed that all pools register to the game correctly 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. A very basic understanding of structures + jigsaw blocks and how they combine structure files together into a larger construct 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.
×
×
  • Create New...

Important Information

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