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

Add render sky event #3611

Open
wants to merge 1 commit into
base: 1.20.4
Choose a base branch
from
Open

Conversation

AlphaMode
Copy link
Contributor

Currently I would like to use such a event in galacticraft for overriding vanillas skybox above a certain height

@modmuss50
Copy link
Member

Would the existing DimensionRenderingRegistry.registerSkyRenderer handle your use case? Its not totally clear to me why we also need this event.

@AlphaMode
Copy link
Contributor Author

Would the existing DimensionRenderingRegistry.registerSkyRenderer handle your use case? Its not totally clear to me why we also need this event.

No it doesn't since I want to override the existing skybox in a dimension. Also DimensionRenderingRegistry.registerSkyRenderer doesn't pass the fog callback.
I'd also think it might be useful for the SkyRenderer to return a boolean whether to cancel vanilla rendering (for forge parity mostly but I haven't really seen a clear usecase for that yet.)
Here's a old image of my use case
image

@modmuss50
Copy link
Member

No it doesn't since I want to override the existing skybox in a dimension.

registerSkyRenderer can be used to override, assuming there isnt an existing one. Happy to maybe change the API if needed.

DimensionRenderingRegistry.registerSkyRenderer doesn't pass the fog callback.

This could be added to WorldRenderContext

@AlphaMode
Copy link
Contributor Author

No it doesn't since I want to override the existing skybox in a dimension.

registerSkyRenderer can be used to override, assuming there isnt an existing one. Happy to maybe change the API if needed.

DimensionRenderingRegistry.registerSkyRenderer doesn't pass the fog callback.

This could be added to WorldRenderContext

Is it possible to unregister it once I'm done?

@modmuss50
Copy link
Member

Is it possible to unregister it once I'm done?

Do you mean you want to temporarily change the sky rendering? 🤔 I havent looked at the code but you might be able to get the exisitng/default sky renderer before registering yours, you can then choose to fall back to that if you dont want to use yours?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants