Skip to content

Rendering and jetpack fixes - #155

Open
beeeeeeeeean wants to merge 5 commits into
CosmonauticsTeam:mainfrom
beeeeeeeeean:atmospherics
Open

beeeeeeeeean wants to merge 5 commits into
CosmonauticsTeam:mainfrom
beeeeeeeeean:atmospherics

Conversation

@beeeeeeeeean

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread src/main/java/dev/devce/rocketnautics/content/items/JetpackItem.java Outdated
@beeeeeeeeean
beeeeeeeeean requested a review from M-W-K September 10, 2026 06:04
boolean renderUniverseInDimension = false;
if (planet != null) {
if (planet.linkedDimension() != null) {
renderUniverseInDimension = planet.linkedDimension().renderUniverseInDimension();

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be better as a single && chain when setting the renderUniverseInDimension variable, but this is non-blocking.

}

if (dimension == RocketDimensions.DEEP_SPACE || (Objects.requireNonNull(planet.linkedDimension()).renderUniverseInDimension() && planet.linkedDimension().key() != Level.OVERWORLD) || RocketConfig.CLIENT.enableCustomSky.get()) {
if (dimension == RocketDimensions.DEEP_SPACE || (renderUniverseInDimension && planet.linkedDimension().key() != Level.OVERWORLD) || RocketConfig.CLIENT.enableCustomSky.get()) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are ||ing with the config setting, we should remove the override to ignore the overworld, since our datapack by default does not have the universe render in the overworld. Alternatively, the config setting should have a check so that it only applies to the overworld, so we check the datapack for dimensions that are not the overworld and the config setting for the overworld.

if (exclude != null) {
if (pl.planet.id() == exclude.id()) continue;
PlanetDimensionData linkedDimension = exclude.linkedDimension();
if (!isDeepSpace && !RocketConfig.CLIENT.enableCustomSky.get() && linkedDimension != null && linkedDimension.renderUniverseInDimension()) continue;

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should not be doing this check in this method. If this method is called, we want to be rendering the universe, and this check will skip all planets if exclude fails to match it. This kind of check should come before this method is called, instead of making this method do effectively nothing if the planet passed as exclude is bad. Do not even check if we are in deep space; the only check we want to be doing in this method is skipping the exclude planet.

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.

2 participants