Skip to content

Commit

Permalink
Fixed an issue with timing of injecting into possibleBiomes
Browse files Browse the repository at this point in the history
  • Loading branch information
Adubbz committed May 13, 2024
1 parent f591271 commit dac7cf6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Common/src/main/java/terrablender/mixin/MixinChunkGenerator.java
Original file line number Diff line number Diff line change
@@ -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();
}
}
1 change: 1 addition & 0 deletions Common/src/main/resources/terrablender.mixins.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
"mixins": [
"MixinBiomeSource",
"MixinBuiltInRegistries",
"MixinChunkGenerator",
"MixinMultiNoiseBiomeSource",
"MixinNoiseGeneratorSettings",
"MixinParameterList",
Expand Down

0 comments on commit dac7cf6

Please sign in to comment.