Skip to content

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).

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.

Lock a world to a specific weather type:

Store<EntityStore> store = world.getEntityStore().getStore();
WeatherResource weather = store.getResource(WeatherResource.getResourceType());
// force a weather type
weather.setForcedWeather("Zone1_Storm");
// persist to world config so it survives restarts
world.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.

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"

Read what weather is active for a specific environment in the world:

WeatherResource resource = store.getResource(WeatherResource.getResourceType());
// check forced weather first
int forcedIndex = resource.getForcedWeatherIndex();
if (forcedIndex != 0) {
// world has forced weather
Weather forced = Weather.getAssetMap().getAsset(forcedIndex);
}
// get weather for a specific environment
int environmentIndex = /* from BlockChunk.getEnvironment(x, y, z) */;
int weatherIndex = resource.getWeatherIndexForEnvironment(environmentIndex);

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).

ObjectivesWeatherTriggerCondition 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 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.

FieldTypeDescription
FogDistancedouble[2][near, far] fog distances (default [-96, 1024])
FogOptionsobjectAdvanced fog: IgnoreFogLimits, EffectiveViewDistanceMultiplier, FogHeightCameraFixed, FogHeightCameraOffset
ParticleobjectWeather particle system: SystemId, Color, Scale, OvergroundOnly, PositionOffsetMultiplier
StarsStringSky star texture path
ScreenEffectStringScreen overlay texture (e.g. ScreenEffects/Poison.png)
CloudsCloud[]Cloud layers with texture, colors, speeds (all by hour)
MoonsDayTexture[]Moon textures per day of cycle

These fields are arrays of {hour, value} entries (hours 0-24) that blend throughout the day:

FieldValue TypeDescription
SkyTopColorsColorAlphaSky gradient top
SkyBottomColorsColorAlphaSky gradient bottom
SkySunsetColorsColorAlphaSunset sky tint
FogColorsColorFog color
FogDensitiesfloatFog density
FogHeightFalloffsfloatFog height falloff
SunColorsColorSun disc color
SunScalesfloatSun size
SunGlowColorsColorAlphaSun glow
SunlightColorsColorSunlight tint
SunlightDampingMultipliersfloatSunlight damping
MoonColorsColorAlphaMoon color
MoonScalesfloatMoon size
MoonGlowColorsColorAlphaMoon glow
WaterTintsColorWater tint
ColorFiltersColorPost-processing color filter
ScreenEffectColorsColorAlphaScreen effect tint

Weather assets support inheritance — a weather type can extend another and override specific fields.

The base game includes 70+ weather types organized by zone:

ZoneExamples
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
SpecialBlood_Moon, Void, Creative_Hub, various cave and dungeon weathers

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.

CommandDescription
/weather set <weather>Force a weather type for the current world
/weather getShow the current forced weather (or “not locked”)
/weather resetClear the forced weather, resume natural forecasts

All commands accept an optional world argument. See Weather Commands for details.

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.

Weather state is sent via UpdateWeather. Editor weather previews use UpdateEditorWeatherOverride. Weather asset definitions are synced to clients via UpdateWeathers.