Sodium Reloaded (Unofficial)

Sodium Reloaded (Unofficial)

0 Downloads

API for Custom Chunk Transforms (Valkyrien Skies)

Rubydesic opened this issue ยท 2 comments

commented

Request Description

Valkyrien Skies is a mod that adds moveable ships with physics made of regular Minecraft chunks to the game. To do this, ships use chunks in the 'shipyard' with large chunk coordinates in the millions. Valkyrien Skies sends those chunks to the client. Then, we render those extra chunks by re-rendering the world for each ship with that ship's chunks and a custom view matrix.

Currently, Sodium compatibility is done with a series of invasive mixins that breaks every single time sodium updates. It would be great if we can get an API instead of doing this.

I'm willing to design this and make a PR, but I'm opening an issue first in case the Sodium team finds adding this API is objectionable or has any questions or recommendations.

commented

Why does Valkyrien Skies need these transforms? The best course of action would be for your mod to buffer the geometry and then render it as an entity using your own pipeline. It would not require any Sodium-specific compatibility code, and much of the existing terrain meshing code would still be usable (you'd just need to provide alternative World and VertexConsumer implementations and such to BlockRenderer.)

commented

Thank you for the suggestion - I am not very familiar with the rendering code, can you elaborate a little bit on how we should go about doing that?

I see that BlockRenderer is called in ChunkBuilderMeshingTask, but I'm not really sure how we're supposed to use that.