Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

API for Custom Chunk Transforms (Valkyrien Skies) #2939

Open
Rubydesic opened this issue Dec 17, 2024 · 2 comments
Open

API for Custom Chunk Transforms (Valkyrien Skies) #2939

Rubydesic opened this issue Dec 17, 2024 · 2 comments
Labels
A-mods Area: Mod compatibility T-enhancement Type: Enhancement

Comments

@Rubydesic
Copy link

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.

@Rubydesic Rubydesic added S-needs-triage Status: Needs triage T-enhancement Type: Enhancement labels Dec 17, 2024
@jellysquid3
Copy link
Member

jellysquid3 commented Dec 17, 2024

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.)

@Rubydesic
Copy link
Author

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.

@jellysquid3 jellysquid3 added A-mods Area: Mod compatibility and removed S-needs-triage Status: Needs triage labels Dec 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mods Area: Mod compatibility T-enhancement Type: Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants