Planet weather depth: atmosphere gate, acid rain, real weather control#21
Open
StannisMod wants to merge 2 commits into
Open
Planet weather depth: atmosphere gate, acid rain, real weather control#21StannisMod wants to merge 2 commits into
StannisMod wants to merge 2 commits into
Conversation
… control - Gate planet rain/thunder on minAtmosphereDensityForRain config - Enforce thunder-requires-rain invariant in updateWeather - Fix canDoRainSnowIce density scale bug (ledger #8) - Weather Controller rain/dry modes now drive the planet rain marker - Add acidicRain planet flag with NBT + XML round-trip - Damage unprotected players under open acidic rain, config-gated - Add /ar planet weather command for profile + live state - Tests: acidicRain round-trips, atmosphere gate, thunder invariant
- Redirect renderRainSnow GL colour to a green tint on acidicRain planets - require=0 so OptiFine-rewritten renderRainSnow cannot abort the config - acidicRain flag reaches the client through PacketDimInfo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes logical gaps in how planet weather interacts with vanilla/AR mechanics — no brand-new weather mechanics (no dust/sand storms), only compatibility fixes plus acid rain.
minAtmosphereDensityForRain(default 75): thin/airless worlds stay clear regardless of weather markers. Fixes the inconsistency whererainMarker=1could "rain" on a vacuum moon.updateWeatherenforces that thunder can't exist without rain (vanilla couples them — lightning only strikes where it's raining, thunder strength is scaled by rain strength).thunderMarker=1+rainMarker=-1no longer leaves a dead storm flag.rain/drymodes now drive the planet's rain marker (rain → always, dry → clear) in addition to their existing water-flooding behaviour;floodleaves weather untouched. Marker is handed back when the controller is removed.acidicRainflag (XML + NBT + client sync viaPacketDimInfo). Unprotected players under open acidic rain take damage (acidRainDamage/acidRainDamageIntervalconfig); a full protective suit shields them, independent of breathability. Falling rain is tinted green client-side via anEntityRenderer.renderRainSnowmixin./ar planet weather [dim]prints the weather profile, atmosphere-gate status, current state and the tick countdown to the next change. (Profile values are also editable through the existing/ar planet get|set.)canDoRainSnowIcecompared the /100-normalized density against the literal75, so it was effectively always false — AR planets never accumulated rain/snow/ice through that gate. Now uses the raw 0..100 density vs the config threshold.Note on vanilla weather
Verified against decompiled MC: vanilla weather is a single global flag, filtered per-biome at the manifestation level (snow vs rain vs nothing) — it is not async-by-biome, so nothing was re-invented there. Vanilla has no "dry storm", so that idea was dropped in favour of the thunder-requires-rain invariant.
Test plan
testUnit+testIntegrationgreen — addedacidicRainNBT round-trip (DimensionPropertiesTest) and XML parse/default (XMLPlanetLoaderTest).testServer(filtered) 12/12 green — newPlanetWeatherGateTest(thin atmosphere suppresses rain despiterainMarker=1; thick allows it;thunderMarker=1+rainMarker=-1→ no thunder) + no regression in existing weather/atmosphere suites.MixinAcidRainRenderapplies intoEntityRendererat runtime with no injection error; client boots clean.Compatibility
require = 0so an OptiFine-rewrittenrenderRainSnowcannot abort the (required) mixin config — it silently skips the tint instead.acidicRainis additive and defaults to false.