mirror of
https://github.com/GTNewHorizons/Angelica.git
synced 2026-11-13 00:47:40 +00:00
Use instanceof instead of direct cast to protect against scenarios where mods like FMB use the same rendering code for world, inventory and preview, where the two latter happens in passes that are not rendered using a CapturingTesselator
This commit is contained in:
1 parent
45fb120223
commit
3d76cb3073
1 file changed
+4
-4
@@ -668,14 +668,14 @@ public class Iris {
|
||||
|
||||
int blockId = getShaderMaterialOverrideId(block, meta);
|
||||
|
||||
CapturingTessellator tess = (CapturingTessellator) TessellatorManager.get();
|
||||
tess.setShaderBlockId(blockId);
|
||||
if (TessellatorManager.get() instanceof CapturingTessellator tess)
|
||||
tess.setShaderBlockId(blockId);
|
||||
}
|
||||
|
||||
public static void resetShaderMaterialOverride() {
|
||||
if (!AngelicaConfig.enableIris)
|
||||
return;
|
||||
CapturingTessellator tess = (CapturingTessellator) TessellatorManager.get();
|
||||
tess.setShaderBlockId(-1);
|
||||
if (TessellatorManager.get() instanceof CapturingTessellator tess)
|
||||
tess.setShaderBlockId(-1);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user