diff options
author | makamys <makamys@outlook.com> | 2021-05-06 14:47:04 +0200 |
---|---|---|
committer | makamys <makamys@outlook.com> | 2021-05-06 15:25:00 +0200 |
commit | 2e5e9784206b8f49a7d95442fd41847284f2cf59 (patch) | |
tree | 69875aa4829dbe9cac1bae7cb9942e98b51e4f49 /src | |
parent | 02a6aa4a24662815664ad86cb81d2a3f167775d7 (diff) | |
download | Neodymium-2e5e9784206b8f49a7d95442fd41847284f2cf59.tar.gz Neodymium-2e5e9784206b8f49a7d95442fd41847284f2cf59.tar.bz2 Neodymium-2e5e9784206b8f49a7d95442fd41847284f2cf59.zip |
Print farPlaneDistance in setupCameraTransform
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/makamys/lodmod/mixin/MixinEntityRenderer.java | 23 | ||||
-rw-r--r-- | src/main/resources/lodmod.mixin.json | 1 |
2 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/makamys/lodmod/mixin/MixinEntityRenderer.java b/src/main/java/makamys/lodmod/mixin/MixinEntityRenderer.java new file mode 100644 index 0000000..16ea13c --- /dev/null +++ b/src/main/java/makamys/lodmod/mixin/MixinEntityRenderer.java @@ -0,0 +1,23 @@ +package makamys.lodmod.mixin; + +import org.spongepowered.asm.mixin.Mixin; +import org.spongepowered.asm.mixin.Shadow; +import org.spongepowered.asm.mixin.injection.At; +import org.spongepowered.asm.mixin.injection.Inject; +import org.spongepowered.asm.mixin.injection.callback.CallbackInfo; + +import net.minecraft.client.renderer.EntityRenderer; + +@Mixin(EntityRenderer.class) +abstract class MixinEntityRenderer { + + @Shadow + private float farPlaneDistance; + + @Inject(method = "setupCameraTransform", at = @At(value = "FIELD", target = "Lnet/minecraft/client/settings/GameSettings;renderDistanceChunks:I", shift = At.Shift.AFTER)) + private void onConstructed(CallbackInfo ci) { + System.out.println("it's " + farPlaneDistance); + } + + +} diff --git a/src/main/resources/lodmod.mixin.json b/src/main/resources/lodmod.mixin.json index d8455bf..8ded54d 100644 --- a/src/main/resources/lodmod.mixin.json +++ b/src/main/resources/lodmod.mixin.json @@ -6,6 +6,7 @@ "compatibilityLevel": "JAVA_8", "mixins": [ "MixinSoundManager", + "MixinEntityRenderer", "IRenderGlobal" ] } |