diff options
author | makamys <makamys@outlook.com> | 2021-05-08 23:24:33 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2021-05-08 23:24:33 +0200 |
commit | aa4d8716468bd6ce2744bb071bcc2b1da347bc12 (patch) | |
tree | 259266678aedc245ab5c421cdbbd46f9c410a76e /src | |
parent | 61f710863c52d3cb5aeeaab7600a060af49a5024 (diff) | |
download | Neodymium-aa4d8716468bd6ce2744bb071bcc2b1da347bc12.tar.gz Neodymium-aa4d8716468bd6ce2744bb071bcc2b1da347bc12.tar.bz2 Neodymium-aa4d8716468bd6ce2744bb071bcc2b1da347bc12.zip |
Make far plane distance changeable on the fly
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/makamys/lodmod/mixin/MixinEntityRenderer.java | 2 | ||||
-rw-r--r-- | src/main/java/makamys/lodmod/renderer/LODRenderer.java | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/mixin/MixinEntityRenderer.java b/src/main/java/makamys/lodmod/mixin/MixinEntityRenderer.java index 67be1e6..dcfcbac 100644 --- a/src/main/java/makamys/lodmod/mixin/MixinEntityRenderer.java +++ b/src/main/java/makamys/lodmod/mixin/MixinEntityRenderer.java @@ -24,7 +24,7 @@ abstract class MixinEntityRenderer { @Inject(method = "setupCameraTransform", at = @At(value = "FIELD", target = "Lnet/minecraft/client/renderer/EntityRenderer;farPlaneDistance:F", shift = At.Shift.AFTER, args = "log=true", ordinal = 0)) private void onConstructed(CallbackInfo ci) { if(LODMod.isActive()) { - farPlaneDistance *= 4; + farPlaneDistance *= LODMod.renderer.getFarPlaneDistanceMultiplier(); } } diff --git a/src/main/java/makamys/lodmod/renderer/LODRenderer.java b/src/main/java/makamys/lodmod/renderer/LODRenderer.java index 6aac74a..5454352 100644 --- a/src/main/java/makamys/lodmod/renderer/LODRenderer.java +++ b/src/main/java/makamys/lodmod/renderer/LODRenderer.java @@ -143,6 +143,10 @@ public class LODRenderer { } } } + + public int getFarPlaneDistanceMultiplier() { + return 4; + } private void handleKeyboard() { if(Keyboard.isKeyDown(Keyboard.KEY_F) && !wasDown[Keyboard.KEY_F]) { |