Chisels & Bits - For Fabric

Chisels & Bits - For Fabric

2M Downloads

Optifine Incompatibility

EmperorCookie opened this issue ยท 5 comments

commented

When the complexity of a sculptures hits a certain threshold, which is quite low, the structure doesn't render anymore when using any shader pack. It works properly using the internal shader pack or no shaders at all. The collisions are still working and the chisel tool still works on the expected model, it's really just the rendering that's affected.

Steps to reproduce:
Chisels bits out of a block and eventually it will stop rendering.

Minecraft v1.8.9, Forge v11.15.1.1761, Optifine v1.8.9 HD U H3.

commented

This happens when the C&B block switches over to a more efficient render mode (it's more efficient when the shape is very complex, but fairly inefficient when it's simple). It goes from rendering only when the chunk updates to doing so every tick, so this not working is probably an issue on Optifine's end (probably not supporting Forge's custom way of rendering blocks every tick).
I'd suggest reporting it to the Optifine dev(s) so they can add support for it because I don't think there's anything Algo can do on his end for it to work, other than using a less eficient method for rendering complex blocks only when Optifine is installed.

commented

I would like to go and report the bug to the Optifine devs but unfortunately I don't understand the source of the problem enough to explain it. To me right now this seems to be an incompatibility between Forge and Optifine the way you're describing it.

Just an update, after playing a while it ended up working. I don't know if that could give you more insight or something.

commented

When I tested it I get hundreds of errors,

Caused by: net.minecraft.util.ReportedException: Tesselating block model
at net.minecraft.client.renderer.BlockModelRenderer.func_178267_a(BlockModelRenderer.java:74) ~[bgf.class:?]
at net.minecraft.client.renderer.BlockModelRenderer.func_178259_a(BlockModelRenderer.java:52) ~[bgf.class:?]
at mod.chiselsandbits.render.chiseledblock.tesr.ChisledBlockBackgroundRender.call(ChisledBlockBackgroundRender.java:137) ~[ChisledBlockBackgroundRender.class:?]
at mod.chiselsandbits.render.chiseledblock.tesr.ChisledBlockBackgroundRender.call(ChisledBlockBackgroundRender.java:29) ~[ChisledBlockBackgroundRender.class:?]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_25]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_25]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_25]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_25]
at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_25]
Caused by: java.lang.ArrayIndexOutOfBoundsException

This only occurs with optifine, so its probably related to something optifine changes.

Workaround

Also as a work around you can increase "Max faces for static render" in the config gui to an enormous number, 999999 for instance to prevent C&B from triggering its multi-threaded renderer which is not compatible with optifine.

However doing so will reduce performance during block updates, and potentially cause the game to have large lag spikes if detailed C&B blocks are around things like redstone, or other blocks that cause block render updates.

commented

Thank you for taking time to investigate the issue and providing a workaround!

commented

Little more info, newest Optifine (U D2), that compatible with Forge 2099 still causing C&B block's textures bug.
Maybe Standard/Smooth version (w/o multithread support) is good?