AstralOrdana / Spelunkery

The Spelunkery mod for Minecraft
GNU Lesser General Public License v3.0
42 stars 19 forks source link

[1.20.1 Forge] Nephrite Geode and other features are not generation safe #190

Open TelepathicGrunt opened 4 months ago

TelepathicGrunt commented 4 months ago

The Nephrite Geode is using the same Geode feature as vanilla's along with a square processor. This is problematic because the geode now will extend into side chunks where the side chunk can either be fully generated with all features or fully empty as it hasn't started any feature generation. This leads to a problem where other modded features or structures can spawn and chop off the geode and lead to floating geode pieces like this: image image

In the case of Repurposed Structures's Underground Bastion, it is using the Jigsaw System just like vanilla where it spawns the structure chunk by chunk. So in a chunk where the Nephrite Geode spawns first, it can extend into a side chunk that already spawned part of my structure's room, placing these parts of the geode in midair. Then my structure generates in the main chunk, eating the main part of the geode to place the room's air. But because the geode went into the side chunk that was already fully generated, it has now left behind the chopped of geode. This can happen with any structure or feature that is placing large amounts of air for a large part of the chunk on a chunk-by-chunk basis.

A quick bootleg solution would be to swap this { "type": "minecraft:in_square" } entry here https://github.com/AstralOrdana/Spelunkery/blob/d06910226eab5086462138baf81f38abeb8893bd/common/src/main/resources/data/spelunkery/worldgen/placed_feature/nephrite_geode.json#L8-L10 with this:

    {
      "type": "minecraft:random_offset",
      "xz_spread": 7,
      "y_spread": 0
    },

What this will do is stick the geode in the center of the chunk always. Making it harder for it to extend into the side chunks and helps to eliminate or significantly reduce this issue. Players won't be able to tell that the geode is always in center of chunk anyway due to how spread out and rare the geode is and how well it meshes with land.

Also, this does impact your wall attaching mushrooms too. If your mushroom spawns in center chunk but attaches to a side solid stone block from the side chunk before a modded structure or feature removes that solid block in side chunk, it can lead to the mushrooms floating in midair. A solution I found for this was to simply not have wall attaching blocks be able to attach to a block that is in a different chunk than the chunk I am spawning the mushroom in. The mushrooms I saw affected were conk_fungus, mushgloom, and phosphor_fungus

TelepathicGrunt commented 4 months ago

Example of Spelunkery mushrooms attaching to side chunk's blocks before side chunk generated its feature that would remove the solid blocks. Leaving floating mushrooms image

AstralOrdana commented 4 months ago

oh wow, thank you so much, i will fix those as soon as I am able! It will probably be a few days before I can get an update together so if you're thinking about a datapack as a temp fix, that may be worth it. (genuinely the best bug report ive ever gotten, damn)