diff --git a/Common/src/main/java/terrablender/mixin/MixinChunkGenerator.java b/Common/src/main/java/terrablender/mixin/MixinChunkGenerator.java new file mode 100644 index 0000000..94fa346 --- /dev/null +++ b/Common/src/main/java/terrablender/mixin/MixinChunkGenerator.java @@ -0,0 +1,23 @@ +/******************************************************************************* + * Copyright 2024, the Glitchfiend Team. + * All rights reserved. + ******************************************************************************/ +package terrablender.mixin; + +import net.minecraft.world.level.chunk.ChunkGenerator; +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +@Mixin(ChunkGenerator.class) +public class MixinChunkGenerator +{ + @Inject(method = "validate", at = @At("HEAD"), cancellable = true) + public void validate(CallbackInfo ci) + { + // Do not perform validation - this causes featuresPerStep to be resolved before modded biomes have been + // injected. + ci.cancel(); + } +} diff --git a/Common/src/main/resources/terrablender.mixins.json b/Common/src/main/resources/terrablender.mixins.json index 135d086..defa3b1 100644 --- a/Common/src/main/resources/terrablender.mixins.json +++ b/Common/src/main/resources/terrablender.mixins.json @@ -6,6 +6,7 @@ "mixins": [ "MixinBiomeSource", "MixinBuiltInRegistries", + "MixinChunkGenerator", "MixinMultiNoiseBiomeSource", "MixinNoiseGeneratorSettings", "MixinParameterList",