Weather
Package: com.hypixel.hytale.builtin.weather
Weather is per-world, tied to the time system, and driven by environment forecasts — each environment defines hourly weighted-random weather selections. You can override this with a forced weather that locks the entire world to a specific weather type.
Weather types are asset-based, not a fixed enum. The base game ships 70+ weather types across different zones (e.g. Zone1_Rain, Zone2_Sand_Storm, Zone3_Snow_Heavy).
How Weather Works
Section titled “How Weather Works”Each world has a WeatherResource that tracks the current weather state. Every in-game hour, the system picks a new weather for each environment using weighted random selection from the environment’s forecast table.
Players see different weather depending on which environment they’re standing in — unless the world has a forced weather set, which overrides everything.
Weather updates are sent to players every 1 second. On first entering a world, the transition is 0.5 seconds. Subsequent weather changes use a 10-second transition for smooth blending.
Forcing Weather
Section titled “Forcing Weather”Lock a world to a specific weather type:
Store<EntityStore> store = world.getEntityStore().getStore();WeatherResource weather = store.getResource(WeatherResource.getResourceType());
// force a weather typeweather.setForcedWeather("Zone1_Storm");
// persist to world config so it survives restartsworld.getWorldConfig().setForcedWeather("Zone1_Storm");world.getWorldConfig().markChanged();Clear the lock to resume natural environment-based forecasts:
weather.setForcedWeather(null);world.getWorldConfig().setForcedWeather(null);world.getWorldConfig().markChanged();The weather name is resolved to an index via Weather.getAssetMap().getIndex(name). Index 0 is reserved as the empty/unknown weather.
You can also set ForcedWeather directly in the WorldConfig JSON without code.
Reading Weather
Section titled “Reading Weather”Current Weather for a Player
Section titled “Current Weather for a Player”Each player has a WeatherTracker component that tracks what weather they’re currently seeing:
WeatherTracker tracker = store.getComponent(playerRef, WeatherTracker.getComponentType());int weatherIndex = tracker.getWeatherIndex();Weather weather = Weather.getAssetMap().getAsset(weatherIndex);String weatherId = weather.getId(); // e.g. "Zone1_Rain"Current Weather for an Environment
Section titled “Current Weather for an Environment”Read what weather is active for a specific environment in the world:
WeatherResource resource = store.getResource(WeatherResource.getResourceType());
// check forced weather firstint forcedIndex = resource.getForcedWeatherIndex();if (forcedIndex != 0) { // world has forced weather Weather forced = Weather.getAssetMap().getAsset(forcedIndex);}
// get weather for a specific environmentint environmentIndex = /* from BlockChunk.getEnvironment(x, y, z) */;int weatherIndex = resource.getWeatherIndexForEnvironment(environmentIndex);Weather in Other Systems
Section titled “Weather in Other Systems”Several game systems react to weather state:
Farming — Growth modifiers can require specific weather types. WaterGrowthModifierAsset checks if the current weather matches configured “rain” weathers, and whether the crop is unobstructed above.
NPC AI — NPCs can sense weather via SensorWeather, matching weather names with glob patterns (e.g. "Zone1_*" matches all Zone 1 weathers).
Objectives — WeatherTriggerCondition lets objective triggers require specific weather states.
Ambience FX — Ambient effects can be conditioned on weather types or weather tags.
Void Events — Portal void event stages can force weather per stage, clearing it when the stage ends.
Weather Assets
Section titled “Weather Assets”Weather types are JSON assets loaded from Server/Weathers/. Each defines the full visual environment — sky colors, fog, clouds, particles, lighting, and screen effects, all keyed by time of day.
Key Fields
Section titled “Key Fields”| Field | Type | Description |
|---|---|---|
FogDistance | double[2] | [near, far] fog distances (default [-96, 1024]) |
FogOptions | object | Advanced fog: IgnoreFogLimits, EffectiveViewDistanceMultiplier, FogHeightCameraFixed, FogHeightCameraOffset |
Particle | object | Weather particle system: SystemId, Color, Scale, OvergroundOnly, PositionOffsetMultiplier |
Stars | String | Sky star texture path |
ScreenEffect | String | Screen overlay texture (e.g. ScreenEffects/Poison.png) |
Clouds | Cloud[] | Cloud layers with texture, colors, speeds (all by hour) |
Moons | DayTexture[] | Moon textures per day of cycle |
Time-of-Day Properties
Section titled “Time-of-Day Properties”These fields are arrays of {hour, value} entries (hours 0-24) that blend throughout the day:
| Field | Value Type | Description |
|---|---|---|
SkyTopColors | ColorAlpha | Sky gradient top |
SkyBottomColors | ColorAlpha | Sky gradient bottom |
SkySunsetColors | ColorAlpha | Sunset sky tint |
FogColors | Color | Fog color |
FogDensities | float | Fog density |
FogHeightFalloffs | float | Fog height falloff |
SunColors | Color | Sun disc color |
SunScales | float | Sun size |
SunGlowColors | ColorAlpha | Sun glow |
SunlightColors | Color | Sunlight tint |
SunlightDampingMultipliers | float | Sunlight damping |
MoonColors | ColorAlpha | Moon color |
MoonScales | float | Moon size |
MoonGlowColors | ColorAlpha | Moon glow |
WaterTints | Color | Water tint |
ColorFilters | Color | Post-processing color filter |
ScreenEffectColors | ColorAlpha | Screen effect tint |
Weather assets support inheritance — a weather type can extend another and override specific fields.
Built-in Weather Types
Section titled “Built-in Weather Types”The base game includes 70+ weather types organized by zone:
| Zone | Examples |
|---|---|
| Zone 1 (Emerald Grove) | Zone1_Sunny, Zone1_Rain, Zone1_Rain_Light, Zone1_Storm, Zone1_Cloudy_Medium, Zone1_Foggy_Light, Zone1_Swamp, Zone1_Azurewood_Fireflies |
| Zone 2 (Desert) | Zone2_Sunny, Zone2_Sand_Storm, Zone2_Thunder_Storm, Zone2_Desert_Haze, Zone2_Blazing_Light |
| Zone 3 (Boreal) | Zone3_Snow, Zone3_Snow_Storm, Zone3_Snow_Heavy, Zone3_Rain, Zone3_Northern_Lights |
| Zone 4 (Devastated) | Zone4_Storm, Zone4_Swamp_Storm, Zone4_Wastes, Zone4_AshWastes, Zone4_Lava_Fields, Zone4_GhostForest |
| Special | Blood_Moon, Void, Creative_Hub, various cave and dungeon weathers |
Environment Forecasts
Section titled “Environment Forecasts”Each environment defines a WeatherForecasts map: hour (0-23) to a weighted pool of weather types.
{ "WeatherForecasts": { "0": [{ "WeatherId": "Zone1_Sunny", "Weight": 3.0 }, { "WeatherId": "Zone1_Rain", "Weight": 1.0 }], "6": [{ "WeatherId": "Zone1_Sunny", "Weight": 5.0 }, { "WeatherId": "Zone1_Cloudy_Medium", "Weight": 2.0 }], ... }}Undefined hours fall back to a default forecast (unknown weather). Each hour, the system picks a weather from the pool using the weights. Higher weight = more likely.
Commands
Section titled “Commands”| Command | Description |
|---|---|
/weather set <weather> | Force a weather type for the current world |
/weather get | Show the current forced weather (or “not locked”) |
/weather reset | Clear the forced weather, resume natural forecasts |
All commands accept an optional world argument. See Weather Commands for details.
Events
Section titled “Events”There is no dedicated weather change event. The weather system uses internal state flags (consumeForcedWeatherChange()) rather than the event bus.
The only weather-related event is AssetEditorUpdateWeatherPreviewLockEvent, fired when the weather preview lock is toggled in the asset editor.
Packets
Section titled “Packets”Weather state is sent via UpdateWeather. Editor weather previews use UpdateEditorWeatherOverride. Weather asset definitions are synced to clients via UpdateWeathers.