Fix 1.18.2 WorldRenderer renderSky() mixin falling

This commit is contained in:
TomTheFurry
2022-03-16 19:57:27 +08:00
parent 780d0ad9fb
commit 35bef76aeb
3 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -1 +1 @@
MC_VERSION_1_18_1=
MC_VERSION_1_18_2=
@@ -24,6 +24,7 @@ import com.mojang.math.Matrix4f;
import com.seibel.lod.common.wrappers.McObjectConverter;
import com.seibel.lod.core.api.ClientApi;
import com.seibel.lod.core.objects.math.Mat4f;
import net.minecraft.client.Camera;
import net.minecraft.client.renderer.LevelRenderer;
import net.minecraft.client.renderer.RenderType;
import org.spongepowered.asm.mixin.Mixin;
@@ -62,9 +63,10 @@ public class MixinWorldRenderer
// HEAD or RETURN
@Inject(at = @At("RETURN"),
method = "renderSky(Lcom/mojang/blaze3d/vertex/PoseStack;Lcom/mojang/math/Matrix4f;FLjava/lang/Runnable;)V",
method = "renderSky",
cancellable = true)
private void renderLod(PoseStack modelViewMatrixStack, Matrix4f projectionMatrix, float f, Runnable r, CallbackInfo callback) {
private void renderLod(PoseStack modelViewMatrixStack, Matrix4f projectionMatrix, float f,
#if MC_VERSION_1_18_2 Camera camera, boolean bl,#endif Runnable r, CallbackInfo callback) {
Mat4f mcModelViewMatrix = McObjectConverter.Convert(modelViewMatrixStack.last().pose());
Mat4f mcProjectionMatrix = McObjectConverter.Convert(projectionMatrix);
+1 -1
View File
@@ -18,4 +18,4 @@ toml_version=3.6.4
manifold_version=2022.1.5
##### FOR IDE SUPPORT AND TELL IDE TO USE CERTIAN MC VERSION: SWITCH THIS:
mcVer=1.18.1
mcVer=1.18.2