[2.40] 1.19.2 - Effortless building with Framed Blocks Crashes

Issue #145 resolved
Former user created an issue

When using any Effortless Building Modes with any Framed Block Mods Framed Blocks the game immedietly crashes.

Survival mode and creative mode both crash performing the same action. Having a Framed Block in hand and changing Effortless Building Mode causes the crash. Having Effortless Building Mode on with normal blocks or empty hand is fine until you scroll to a Framed Blocks mod block.

Comments (3)

  1. Dennis C

    I have received an issue about this as well now (https://github.com/XFactHD/FramedBlocks/issues/278) and found that this is an issue with the way Effortless Building renders the placement preview. Specifically, the RenderType passed to ModelBlockRenderer#renderModel() must be a “chunk render type” as it is directly given to the BakedModel which expects to only operate on chunk render types (a chunk render type being any render type found in the RenderType.chunkBufferLayers() list). In this case the one being passed in is a custom render type though: https://bitbucket.org/Requios/effortless-building/src/ee235d0689067113215eb1bba42889b9cf0f53e0/src/main/java/nl/requios/effortlessbuilding/render/RenderHandler.java#lines-99. I can see two simple options to fix this:

    1. Pass null to the RenderType parameter of ModelBlockRenderer#renderModel()which will by contract of IForgeBakedModel#getQuads() render all quads regardless of render type
    2. Switch to BlockRenderDispatcher#renderSingleBlock() and pass in your custom RenderType to have it use that as the buffer type while passing the correct RenderType(s) to the model

    Using or replicating the latter would be the cleaner option in my opinion but both will do the trick.

  2. Log in to comment