TerraformersMC / Biolith

A biome placement mod focusing on configurability and consistent distribution of modded biomes
Other
9 stars 2 forks source link

Using Terrablender breaks surface rules #3

Closed Apollounknowndev closed 1 year ago

Apollounknowndev commented 1 year ago

Terrablender completely breaks Biolith surface rules, which makes it impossible to test surface rules in a dev instance as Terrablender is required to use Biolith as a dependency in a dev instance.

Here is the mod file (you have to extract it): mod.zip

2023-05-11_18 52 13

2023-05-11_18 53 38

This is the only used Java file in the mod:

public class Trails implements ModInitializer {
    public static final String MOD_ID = "trails";

    @Override
    public void onInitialize() {
        SurfaceGeneration.addOverworldSurfaceRules(Identifier.of(MOD_ID, "surface_rules"), block(Blocks.COAL_BLOCK.getDefaultState()));
    }
}
gniftygnome commented 1 year ago

Sadness I thought the TerraBlender folks had fixed this a while back. I'll see if I can come up with some defensive strategy against it.

gniftygnome commented 1 year ago

Meanwhile if you just want to not load TerraBlender, I think it should work fine to do something like this:

    include(modImplementation("com.terraformersmc:biolith:${biolith_version}")) {
        exclude(group: "com.github.glitchfiend")
    }

Although Loom 1.2 gets a bit whiny about something, maybe unrelated.

gniftygnome commented 1 year ago

I've done some testing and as far as I can tell, this problem only occurs in the dev environment. If I am wrong about that, please let me know how to reproduce it!

For the dev environment, I have moved TerraBlender to modCompileOnlyApi which should hopefully prevent it from getting automatically loaded during dev runs. I'll make new releases with this change in a bit.

gniftygnome commented 1 year ago

I figured out why my test cases weren't working and now I can reproduce this. Back to the drawing board.

gniftygnome commented 1 year ago

I've settled on also submitting our rules to TerraBlender if it's loaded. Their surface rule handling is so complex I think that's going to be the best way to make sure we are compatible. This change is in Biolith 0.0.1-beta.2 and 1.0.0-alpha.2 (both just released). With this, as far as I can tell, we are completely compatible with TerraBlender and it should work fine to mix the two if desired.

gniftygnome commented 1 year ago

Oops, that should have been #7.