File tree Expand file tree Collapse file tree 1 file changed +3
-0
lines changed
headlessmc-lwjgl/src/main/java/me/earth/headlessmc/lwjgl/redirections Expand file tree Collapse file tree 1 file changed +3
-0
lines changed Original file line number Diff line number Diff line change 1515// TODO: redirect Keyboard and Mouse?
1616@ UtilityClass
1717public class LwjglRedirections {
18+ public static final int GL_TEXTURE_WIDTH = 4096 ;
1819 public static final int GL_TEXTURE_INTERNAL_FORMAT_CONST = 4099 ;
1920 public static final int GL_TEXTURE_INTERNAL_FORMAT = Integer .parseInt (
2021 System .getProperty (LwjglProperties .GL_TEXTURE_INTERNAL_FORMAT , "32856" )); //RGBA8
@@ -119,6 +120,8 @@ public static void register(RedirectionManager manager) {
119120 // Couldn't find a matching vanilla TextureFormat for OpenGL internal format id
120121 // com.mojang.blaze3d.opengl.GlDevice
121122 return GL_TEXTURE_INTERNAL_FORMAT ;
123+ } else if ((int ) args [2 ] == GL_TEXTURE_WIDTH && (int ) args [1 ]/*level*/ > 0 ) {
124+ return 0 ; // otherwise Neoforge 1.21.5 gets caught in an endless loop of checking width != 0; for higher levels
122125 }
123126
124127 return TEXTURE_SIZE ;
You can’t perform that action at this time.
0 commit comments