Block Previews and Dissolve Shaders when not active

Issue #13 resolved
FenixFyreX created an issue

I noticed in the current master branch code, that when you activate any build mode, place blocks (and the shaders activate etc) then turn the mode off, the shaders and effects still happen, and can cause quite the interesting bugs. I actually got the game rendering a texture atlas over the entire screen on placing a block in the middle of the mirror axis!

To replicate: - Turn on mirror build mode. - Place a block or two. - Turn off mirror build mode. - Place block in the middle of the axis mirror was enabled on. - Bugz.

This is using your base code, none of my edits for compatibility. I would assume there are no checks happening to ensure the build modes are still active or not. Just thought I'd share the issue.

I got a crash from this a couple times with my edits in BlockPreviewRenderer, due to an IndexOutOfBoundsException (line 225), but I can't get it to crash without my edits. This would be a non-issue if checks were issued to ensure these previews / renders weren't happening if all modes were off.

Another way is simply checking if all lists were same size right before the loop, would fix this.

Comments (2)

  1. Requios repo owner

    Normally I'd say its of little use to report on stuff that is in full development (maybe i should develop in another branch), but this is a bug i havent found myself yet. I fixed it by checking if the build mode and modifiers are on. I dont think I would have found it otherwise, so thank you.

  2. Log in to comment