Use vanilla field to count number of chunk updates

Fixes D-Tools compat
This commit is contained in:
makamys authored and Jason Mitchell committed 2024-03-15 15:23:48 -07:00
1 parent 22d28abce6
commit 996b3df9cb
5 files changed
+2 -24

No files matched your search

@@ -25,11 +25,6 @@ public class MixinMinecraft {
}
}
@Redirect(method="runGameLoop", at=@At(value="FIELD", target="Lnet/minecraft/client/renderer/WorldRenderer;chunksUpdated:I", ordinal=0))
private int sodium$chunksUpdated() {
return ((IRenderGlobalExt)this.renderGlobal).getChunksSubmitted();
}
@Redirect(method = "runGameLoop", at = @At(value = "FIELD", target = "Lnet/minecraft/client/settings/GameSettings;fancyGraphics:Z"))
private boolean sodium$overrideFancyGrass(GameSettings gameSettings) {
return SodiumClientMod.options().quality.grassQuality.isFancy();
@@ -60,11 +60,6 @@ public class MixinRenderGlobal implements IRenderGlobalExt {
this.renderer.scheduleTerrainUpdate();
}
@Override
public int getChunksSubmitted() {
return this.renderer.getChunksSubmitted();
}
@Inject(method="<init>", at=@At("RETURN"))
private void sodium$initRenderer(Minecraft mc, CallbackInfo ci) {
this.renderer = SodiumWorldRenderer.create(mc);
@@ -2,6 +2,5 @@ package com.gtnewhorizons.angelica.mixins.interfaces;
public interface IRenderGlobalExt {
void scheduleTerrainUpdate();
int getChunksSubmitted();
}