Fusion (Connected Textures)

Fusion (Connected Textures)

11M Downloads

[Crash] Rendering connected glowstone

phit opened this issue ยท 2 comments

commented

Version Info

  • Minecraft, 1.20.1
  • Fusion, 1.1.0 Forge

Are you using OptiFine: no

Steps to Reproduce

not sure had these glowstone blocks with connected textures in my base for weeks without issues, now i "randomly" get these crashes when I'm in that area, modpack is all the mods 9

also crashes every time when i try to copy paste an area with them using building gadgets (second log)

edit: it crashes every time i look directly at a block with connected textures

Crash report (~/logs/latest.log)
https://gist.github.com/phit/27c4afbff09671b3894b2653c308eb98
https://gist.github.com/phit/9ea073b2435d2cd61d14d8d19fb67cba

commented

patched it for me locally with a null check, no clue if that's a proper fix, all this rendering stuff is way over my head

diff --git a/src/main/java/com/supermartijn642/fusion/model/types/connecting/ConnectingBakedModel.java b/src/main/java/com/supermartijn642/fusion/model/types/connecting/ConnectingBakedModel.java
index 7b3e682..dcc8203 100644
--- a/src/main/java/com/supermartijn642/fusion/model/types/connecting/ConnectingBakedModel.java
+++ b/src/main/java/com/supermartijn642/fusion/model/types/connecting/ConnectingBakedModel.java
@@ -70,7 +70,7 @@ public class ConnectingBakedModel extends WrappedBakedModel {
 
         // Compute the quads if they don't exist yet
         if(quads == null){
-            boolean isOriginalRenderType = state == null || super.getRenderTypes(state, random, modelData).contains(renderType);
+            boolean isOriginalRenderType = state == null || (renderType != null && super.getRenderTypes(state, random, modelData).contains(renderType));
             quads = this.remapQuads(this.original.getQuads(state, side, random, modelData, renderType), data, renderType, isOriginalRenderType);        
             synchronized(this.quadCache){
                 this.mutableKey.update(hashCode, side, renderType);
commented

Ah I had assumed ChunkRenderTypeSet#contains behaved the same as for regular sets and I guess I never ran into this during testing.
I fixed it now in Fusion version 1.1.0a.
Thank you for reporting the issue and looking into it!