Skip to content

Commit

Permalink
Revert "fix: tweakRenderEdgeChunks (#81)"
Browse files Browse the repository at this point in the history
This reverts commit 87ecd46.
  • Loading branch information
sakura-ryoko committed Dec 7, 2024
1 parent 17f0d1e commit 2deacec
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,4 @@ private void allowEdgeChunksToRender(BlockPos pos, CallbackInfoReturnable<Boolea
cir.setReturnValue(true);
}
}

@Inject(method = "shouldBuild", at = @At("HEAD"), cancellable = true)
private void shouldBuild(CallbackInfoReturnable<Boolean> cir)
{
if (FeatureToggle.TWEAK_RENDER_EDGE_CHUNKS.getBooleanValue())
{
cir.setReturnValue(true);
}
}
}
20 changes: 0 additions & 20 deletions src/main/java/fi/dy/masa/tweakeroo/mixin/MixinFrustum.java

This file was deleted.

21 changes: 0 additions & 21 deletions src/main/java/fi/dy/masa/tweakeroo/mixin/MixinWorldRenderer.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
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;
Expand Down Expand Up @@ -111,24 +110,4 @@ 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)
{
if (FeatureToggle.TWEAK_RENDER_EDGE_CHUNKS.getBooleanValue())
{
// In this way, the edge chunk is always rendered even if:
// + the chunks are outside the view distance
// + the camera is outside the view distance
return options.getClampedViewDistance() + 8;
}
else
{
return options.getClampedViewDistance();
}
}
}
1 change: 0 additions & 1 deletion src/main/resources/mixins.tweakeroo.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
"MixinEntityRenderDispatcher",
"MixinExplosion",
"MixinFillCommand",
"MixinFrustum",
"MixinGameRenderer",
"MixinGameRenderer_ViewBob",
"MixinHeldItemRenderer",
Expand Down

0 comments on commit 2deacec

Please sign in to comment.