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 replacing rendered blockstates on chunk build #2704

Open
enjarai opened this issue Aug 23, 2024 · 1 comment
Open

API for replacing rendered blockstates on chunk build #2704

enjarai opened this issue Aug 23, 2024 · 1 comment
Labels
S-needs-triage Status: Needs triage T-enhancement Type: Enhancement

Comments

@enjarai
Copy link

enjarai commented Aug 23, 2024

Request Description

I've recently been working on a mod that has a feature that lets users disguise any block in the world as another block visually. When implementing this, it required me to make a mixin into Sodium for compatibility with its rendering, as is to be expected.

This has however been completely broken by sodium 0.6.0, and, since your update post mentioned you plan to implement new APIs for mod developers, I thought I'd raise my issue here. Concretely, I'd like an event that I can add a listener to which receives a specific position and world or chunk instance, and uses it to modify the blockstate rendered at that position.

If this is too niche a usecase to make an API for, I at least hope you'll be able to point me to the right place to move my mixin to. Thanks for your consideration.

@enjarai enjarai added S-needs-triage Status: Needs triage T-enhancement Type: Enhancement labels Aug 23, 2024
@Octol1ttle
Copy link
Contributor

Octol1ttle commented Aug 23, 2024

A mod that I'm a member of, Splatcraft, can also benefit from this API when we upgrade to 1.21+. One of the mechanics is being able to ink any block in the world, and inked blocks retain all of their usual properties. When a block is inked, we want to replace its texture with our own inked block texture with the ink's color. Ink can also be either "glowing" (a different texture + it emits light) and "clear" (the original texture is tinted to the ink's color)

I would want the API to provide a Level/Chunk + BlockPos (as outlined in OP's comment) and in addition be able to accept changes to the texture and color (we can't put all of our ink type + color combinations in BlockStates, as ink colors can be any hex colors). If a separate issue is needed for this usecase, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-needs-triage Status: Needs triage T-enhancement Type: Enhancement
Projects
None yet
Development

No branches or pull requests

2 participants