From 597b6590267db25f77e2f3381709989dc2d8aa00 Mon Sep 17 00:00:00 2001 From: James Seibel Date: Thu, 5 Feb 2026 18:09:39 -0600 Subject: [PATCH] fix magic numbers for lightmap binding --- .../common/wrappers/misc/LightMapWrapper.java | 20 ++++++++++++++++--- coreSubProjects | 2 +- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/LightMapWrapper.java b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/LightMapWrapper.java index 8ed914f54..5569a5006 100644 --- a/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/LightMapWrapper.java +++ b/common/src/main/java/com/seibel/distanthorizons/common/wrappers/misc/LightMapWrapper.java @@ -27,7 +27,10 @@ import com.seibel.distanthorizons.core.wrapperInterfaces.misc.ILightMapWrapper; import com.seibel.distanthorizons.core.logging.DhLogger; import org.lwjgl.opengl.GL32; +#if MC_VER < MC_1_21_3 import java.nio.ByteBuffer; +#else +#endif public class LightMapWrapper implements ILightMapWrapper { @@ -41,14 +44,18 @@ public class LightMapWrapper implements ILightMapWrapper //==============// // constructors // //==============// + //region public LightMapWrapper() { } + //endregion + //==================// // lightmap syncing // //==================// + //region public void uploadLightmap(NativeImage image) { @@ -86,27 +93,34 @@ public class LightMapWrapper implements ILightMapWrapper #endif } - public void setLightmapId(int minecraftLightmapTetxureId) + public void setLightmapId(int minecraftLightmapTextureId) { // just use the MC texture ID - this.textureId = minecraftLightmapTetxureId; + this.textureId = minecraftLightmapTextureId; } + //endregion + //==============// // lightmap use // //==============// + //region @Override public void bind() { - GLMC.glActiveTexture(GL32.GL_TEXTURE0); + GLMC.glActiveTexture(GL32.GL_TEXTURE0 + ILightMapWrapper.BOUND_INDEX); GLMC.glBindTexture(this.textureId); } @Override public void unbind() { GLMC.glBindTexture(0); } + //endregion + + + } diff --git a/coreSubProjects b/coreSubProjects index 35d3614c8..4a256683a 160000 --- a/coreSubProjects +++ b/coreSubProjects @@ -1 +1 @@ -Subproject commit 35d3614c881f4d2f1c257e27583b77ae5b0542a2 +Subproject commit 4a256683ab61501b342b1e13bc3020e7f12c5085