These blocks were not strictly needed but helped readability. I didn't
mean for the reformatter to change them while dealing with the "this"
problem. It also removed some braces in switch statements but who cares.
Without the blocker layer even VBOs didn't work with shaders. So instead
I put the blocker back and made it mask both color and depth buffers,
which fixes the bug with chests and water drawing over monitors. Since
it now masks color I hoisted it up to be drawn before the terminal, and
made the terminal slightly offset to solve z-fighting with VBO renderer.
Somewhere along the line the gl state was being mangled and I'm still
not sure where! I moved the monitor blocks from the cutout render layer
to the default solid layer, which obviates the depth blocker. I don't
think the transparent front of the monitor blocks was ever visible so
this should be fine. Then the terminal quads are moved slightly outward
to prevent z-fighting with the now present block front.
Finally I noticed some chests were not rendering correctly around
monitors, so I paired an endDrawing() call with our sneaky hack of
calling startDrawing() to force the rendering state. This fixed the
chests. Hopefully we haven't messed up the render state in more ways :)
Replaces the jankson implementation with night-config. Night config is
what the forge api uses so it's easy to produce .toml files in the same
structure as CC:Tweaked.
All config options and comments from CC:Tweaked are implemented. Some
of these options are ignored in various bits of implementation but that
is another problem :)
Also splits the config into a client and server file. The server file is
saved per-world. Names and locations are consistent with CC:T.
I refactored the mixin package to be within a fabric package so other
fabric specific code could be kept nearby. But a mixin from a recent PR
got left behind in the merge. Github's empty merge conflict might have
been about this.
Made a top-level fabric package so mixins and their ancillary classes
can be grouped together. Also removed a stub duck interface that got
left behind somewhere along the line (MixedFirstPersonRenderer).
Forge's ITileEntity interface adds a onChunkUnloaded handler method into
block entities. The fabric port doesn't have a re-implementation of this
feature, which meant TileMonitors weren't releasing their buffers when
unloaded. This commit adds that handler method back into TileGeneric,
which all CC block entities inherit from. Handler logic for the four
block entities that use this feature were copied over from the forge
repo.
These buffers were being released on the server thread, causing the
logical server in a single player session to crash just before shutting
down. It seems the crash happened late enough to not cause world
corruption issues, and so went unnoticed. It was however causing a
memory leak when quitting/rejoining worlds, and it left the save file
lock in limbo.