emilyploszaj / emi

A featureful and accessible item and recipe viewer
MIT License
220 stars 46 forks source link

Allow the batching renderer to be used with new enough Sodium versions #479

Closed embeddedt closed 3 months ago

embeddedt commented 3 months ago

Modern versions of Sodium (0.5.4+) correctly fall back to using VertexConsumer even if it doesn't implement the VertexBufferWriter interface. Therefore, hard-disabling the batcher should no longer be required. This PR adjusts the detection logic to detect the specific version(s) of Sodium that would have this problem and only disables the batcher for those specific versions.

I've tested that the batcher does work fine with Sodium 0.5.8 on MC 1.20.4, unfortunately there is no Sodium 0.4 version to test with on this Minecraft version.

emilyploszaj commented 3 months ago

Could you merge this commit onto an older version branch locally to verify this behaves correctly? There should be no merge conflicts.

embeddedt commented 3 months ago

Sure. Checked on 1.20.1, it correctly disables the batching renderer when running alongside Sodium 0.4.10.