Created
January 27, 2021 22:50
-
-
Save Lemonszz/f39eeea3a85b68db7661668eb5f9200d to your computer and use it in GitHub Desktop.
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
@Mixin(LakeFeature.class) | |
public abstract class LakeFeatureMixin | |
{ | |
@Inject(at = @At(value = "INVOKE", target = "Lnet/minecraft/world/StructureWorldAccess;getStructures(Lnet/minecraft/util/math/ChunkSectionPos;Lnet/minecraft/world/gen/feature/StructureFeature;)Ljava/util/stream/Stream;"), method = "generate", cancellable = true) | |
private void generate(StructureWorldAccess world, ChunkGenerator generator, Random random, BlockPos blockPos, SingleStateFeatureConfig cfg, CallbackInfoReturnable<Boolean> cbi) | |
{ | |
if(world.getStructures(ChunkSectionPos.from(blockPos), BMStructures.GHOST_TOWN).findAny().isPresent() || world.getStructures(ChunkSectionPos.from(blockPos), BMStructures.MANSION).findAny().isPresent()) | |
{ | |
cbi.setReturnValue(false); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment