mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2026-11-04 21:44:27 +00:00
In the 1.21.4 update (9277aa33e9), we removed our DirectVertexBuffer class, and switched to vanilla's VertexBuffer. This forced us to use MeshData and thus ByteBufferBuilder instead of allocating the ByteBuffer ourselves. One thing I'd missed with this is that Iris's text vertex sink API requires us to allocate the whole buffer up-front and so the resulting buffer has a limit of the *maximum* number of vertices rendered, not the actual one. This wasn't an issue on 1.21.4, as we didn't check this (I guess we just silently rendered junk??), but for the 1.21.5 update (a1df196673) we added some extra assertions here, which now fail on Iris. Typically, the whole original change was is now entirely redundant, as Vanilla has removed VertexBuffer entirely, and so we can/should work in terms of raw ByteBuffers again. Fixes #2219.