-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed an issue with timing of injecting into possibleBiomes
- Loading branch information
Showing
2 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
Common/src/main/java/terrablender/mixin/MixinChunkGenerator.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters