diff --git a/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinChunkBuilder_BuiltChunk.java b/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinChunkBuilder_BuiltChunk.java index b221ea30d..81f333bca 100644 --- a/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinChunkBuilder_BuiltChunk.java +++ b/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinChunkBuilder_BuiltChunk.java @@ -19,4 +19,13 @@ private void allowEdgeChunksToRender(BlockPos pos, CallbackInfoReturnable cir) + { + if (FeatureToggle.TWEAK_RENDER_EDGE_CHUNKS.getBooleanValue()) + { + cir.setReturnValue(true); + } + } } diff --git a/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinWorldRenderer.java b/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinWorldRenderer.java index 668415b8e..26f34e16f 100644 --- a/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinWorldRenderer.java +++ b/src/main/java/fi/dy/masa/tweakeroo/mixin/MixinWorldRenderer.java @@ -1,5 +1,6 @@ package fi.dy.masa.tweakeroo.mixin; +import net.minecraft.client.option.GameOptions; import org.joml.Matrix4f; import org.objectweb.asm.Opcodes; import org.spongepowered.asm.mixin.Mixin; @@ -110,4 +111,14 @@ private void rebuildChunksAroundCamera2( // Could send this to ServuX in the future } } + + @Redirect( + method = "*", + require = 0, + at = @At(value = "INVOKE", target = "Lnet/minecraft/client/option/GameOptions;getClampedViewDistance()I") + ) + private int getViewDistance(GameOptions options) + { + return options.getClampedViewDistance() + 8; + } }