YUNG-GANG / YUNGs-API

API for my Minecraft mods
GNU Lesser General Public License v3.0
22 stars 12 forks source link

How to make one necessary room in the Woodland Mansion always appear with Yung's API? #64

Closed 256smash closed 5 months ago

256smash commented 6 months ago

Hello. I used "is_priority" and "max_count" to make a room in a mansion such as a church of cobblestones in it always appear naturally only one, but nothing has worked out. The room doesn't seem to appear. I wanted to experiment with my datapack.

This is the code:

{ "fallback": "minecraft:empty", "elements": [ { "weight": 1, "element": { "location": "example:mansions/oak/1x2_d1", "processors": "minecraft:empty", "projection": "rigid", "element_type": "minecraft:single_pool_element" } }, { "weight": 1, "element": { "location": "example:mansions/oak/1x2_d2", "processors": "minecraft:empty", "projection": "rigid", "element_type": "minecraft:single_pool_element" } }, { "weight": 1, "element": { "location": "example:mansions/oak/1x2_d3", "processors": "minecraft:empty", "projection": "rigid", "max_count": 1, "is_priority": true, "element_type": "yungsapi:yung_single_element" } }, { "weight": 1, "element": { "location": "example:mansions/oak/1x2_d4", "processors": "minecraft:empty", "projection": "rigid", "element_type": "minecraft:single_pool_element" } }, { "weight": 1, "element": { "location": "example:mansions/oak/1x2_d5", "processors": "minecraft:empty", "projection": "rigid", "element_type": "minecraft:single_pool_element" } } ] }

256smash commented 6 months ago

It would have worked just like the Portal Room (Template Pool) in the Stronghold.

yungnickyoung commented 5 months ago

If you remove the is_priority and max_count lines, does the room show up at all? It could be an issue with your jigsaw blocks

256smash commented 5 months ago

I don't think they were jigsaws. But if I had studied the documentation of API usage, then it would be different. Or is it that the structure that has the mansion type in the json file is not very compatible with the components from the API? I usually used Repurposed Structures, which has mansions from different biomes (and which have a modded type "repurposed_structures:mansion_structure"). I think this should be fixed if possible, I think so.

yungnickyoung commented 5 months ago

Oh, in order to be able to use the yungsapi:yung_single_element element type your structure must have "type": "yungsapi:yung_jigsaw" in the structure json

256smash commented 5 months ago

Now I understand. Thanks for letting me know.