Fix missing imports for MC 1.19 and below
This commit is contained in:
@@ -53,6 +53,7 @@ import net.minecraft.client.gui.screens.TitleScreen;
|
||||
import java.nio.FloatBuffer;
|
||||
#endif
|
||||
import java.util.HashSet;
|
||||
import java.util.concurrent.ThreadPoolExecutor;
|
||||
|
||||
import net.minecraft.client.multiplayer.ClientLevel;
|
||||
import net.minecraft.world.InteractionResult;
|
||||
@@ -132,7 +133,7 @@ public class FabricClientProxy implements AbstractModInitializer.IEventProxy
|
||||
// executor to prevent locking up the render/event thread
|
||||
// if the getChunk() takes longer than expected
|
||||
// (which can be caused by certain mods)
|
||||
var executor = ThreadPoolUtil.getFileHandlerExecutor();
|
||||
ThreadPoolExecutor executor = ThreadPoolUtil.getFileHandlerExecutor();
|
||||
if (executor != null)
|
||||
{
|
||||
executor.execute(() ->
|
||||
@@ -172,7 +173,7 @@ public class FabricClientProxy implements AbstractModInitializer.IEventProxy
|
||||
// executor to prevent locking up the render/event thread
|
||||
// if the getChunk() takes longer than expected
|
||||
// (which can be caused by certain mods)
|
||||
var executor = ThreadPoolUtil.getFileHandlerExecutor();
|
||||
ThreadPoolExecutor executor = ThreadPoolUtil.getFileHandlerExecutor();
|
||||
if (executor != null)
|
||||
{
|
||||
executor.execute(() ->
|
||||
|
||||
+2
-1
@@ -22,6 +22,7 @@ package com.seibel.distanthorizons.fabric.mixins.client;
|
||||
import com.mojang.blaze3d.vertex.PoseStack;
|
||||
#if MC_VER < MC_1_19_4
|
||||
import com.mojang.math.Matrix4f;
|
||||
import org.lwjgl.opengl.GL32;
|
||||
#else
|
||||
import org.joml.Matrix4f;
|
||||
#endif
|
||||
@@ -93,7 +94,7 @@ public class MixinLevelRenderer
|
||||
#if MC_VER == MC_1_16_5
|
||||
// get the matrices from the OpenGL fixed pipeline
|
||||
float[] mcProjMatrixRaw = new float[16];
|
||||
GL15.glGetFloatv(GL15.GL_PROJECTION_MATRIX, mcProjMatrixRaw);
|
||||
GL32.glGetFloatv(GL32.GL_PROJECTION_MATRIX, mcProjMatrixRaw);
|
||||
Mat4f mcProjectionMatrix = new Mat4f(mcProjMatrixRaw);
|
||||
mcProjectionMatrix.transpose();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user