maruohon / litematica

A modern client-side schematic mod for Minecraft
GNU Lesser General Public License v3.0
720 stars 217 forks source link

Litematica preview not working with latest Optifine/Optifabric #238

Open MileyHollenberg opened 3 years ago

MileyHollenberg commented 3 years ago

Minecraft version 1.16.3

Mod version and malilib version

Description of the bug I just installed Litematica to get some schematics in my game and when following a tutorial I placed a preview that was not rendering as it should to say the least, check the screenshot. I already suspected Optifine to be the cause of this so I disabled that mod and as expected it started working like it should.

To Reproduce Simply install these versions of the different mods and try to load in a schematic. I also have 3 extra mods installed (borderless-mining, Xaeros Minimap and Xaeros WorldMap) but since these don't affect block rendering they are most likely not involved in this.

Screenshots 2020-10-04_09 33 03

vacla commented 3 years ago

Try disabling shaders

mrkalaspuff3 commented 3 years ago

it's the same for me, but I also tried the shaders thing to see if it helped but it didn't help at all. So I don't know what I can do to fix it.

0xfeeddeadbeef commented 3 years ago

In OptiFine settings:

Shaders needs to be disabled Render Regions needs to be disabled Fast Render might also need to be disabled if there are still some weird HUD/GUI rendering issues

also you have to restart the game after changing these options.

I had the same problem and following these steps helped me.

MileyHollenberg commented 3 years ago

Thanks, that fixed it :). I will be keeping this issue open though as a workaround does not mean that the actual bug is fixed

maruohon commented 3 years ago

One way to look at this is that it's not a bug as things work correctly in a "vanilla" setting, and only break after Optifine changes around rendering stuff when shaders are enabled.

However obviously it would be nice if both mods would work together. And the strange part is that in my 1.16.3 test instance I can use shaders without Litematica rendering breaking. But for quite a lot of people shaders seem to break the schematic rendering ever since 1.16.2 or even 1.16.1. I did some changes in 1.15.2 which at least at that time fixed the rendering with shaders, whereas before those changes it was always broken if you changed the shaders enabled state after starting the game (on -> off or vice versa). So I'm not sure what is going on with it, and Optifine being a closed source blob of problems it doesn't make it easy to figure out.

But I'll try to take a look at this once I do the next update from 1.12.2 to the later versions again, as I would like to do a bunch of schematic rendering related rewrites in general to clean up some stuff and fix some other issues as well.

axalox commented 3 years ago

I have the same problem on optifine and optifabric, minecraft 1.16.3

2020-10-13_13 41 47 I had to restart the game too

Maybe it's an Optifine problem