
ForgeHooksClient.putQuadColor() not compatible with Optifine shaders (causes crash)
Drakonas opened this issue ยท 2 comments
I decided to enable shaders as I normally do today, and normally with our chosen mods we don't have an issue, but I immediately had a crash when enabling the shader, and found that it crashed when attempting to render a botania:pylon. Since my friend on the server had been messing around with Botania some more, this time around it crashed because the botania:pylon was existent.
I made an issue in the Optifine Issue tracker, and the developer responded, explaining that ForgeHooksClient.putQuadColor() is not compatible with shaders. this was fixed with Forge 1.9, but we want a 1.8.9 pack. lol.
Here is the specific exception he was talking about:
java.lang.IndexOutOfBoundsException
at java.nio.Buffer.checkIndex(Buffer.java:540)
at java.nio.DirectIntBufferU.put(DirectIntBufferU.java:306)
at net.minecraft.client.renderer.WorldRenderer.func_178972_a(WorldRenderer.java:466)
at net.minecraftforge.client.ForgeHooksClient.putQuadColor(ForgeHooksClient.java:521)
at net.minecraftforge.client.model.pipeline.LightUtil.renderQuadColor(LightUtil.java:285)
at vazkii.botania.client.model.ModelPylon.renderQuads(ModelPylon.java:146)
Quote from the Optifine Dev:
The ModelPylon is calling ForgeHooksClient.putQuadColor() which is not compatible with shaders. It uses a fixed vertex size of 7 instead of "vertexData.length / 4" or from the VertexFormat. This was fixed to work properly in Forge 1.9.
Here is the link to Optifine issue submission. You can find full logs there.
Is there a way to use a different function in this instance for the same purpose? Or possibly detect the use of shaders and disable the coloring feature?
unfortunately not, I don't make that method call, that's called from Forge's generic model rendering call, so it's out of my control :/ sorry