Skip to content

WorldConfig

Package: com.hypixel.hytale.server.core.universe.world

public class WorldConfig

Comprehensive configuration for a single world, serialized via BuilderCodec (versioned, version 4). Controls world generation, chunk storage, spawn, ticking, PvP, weather, game mode, NPC spawning, day/night cycle, compass, saving behavior, and plugin configuration. Loaded from and saved to config.json (formerly config.bson).

FieldTypeValueDescription
VERSIONint4Current codec version.
INITIAL_GAME_DAY_START_HOURint5Default game-day start hour.
INITIAL_GAME_DAY_START_MINSint30Default game-day start minutes.
MethodReturn TypeCodec KeyDescription
getUuid()UUIDUUIDUnique world identifier.
getDisplayName()StringDisplayNamePlayer-facing world name.
getSeed()longSeedWorld generation seed.
getSpawnProvider()ISpawnProviderSpawnProviderSpawn location provider.
getWorldGenProvider()IWorldGenProviderWorldGenWorld generator provider.
getChunkStorageProvider()IChunkStorageProvider<?>ChunkStorageChunk persistence backend.
getChunkConfig()ChunkConfigChunkConfigPregenerate/keep-loaded region settings.
isTicking()booleanIsTickingWhether chunks tick in this world.
isBlockTicking()booleanIsBlockTickingWhether blocks tick.
isPvpEnabled()booleanIsPvpEnabledPvP toggle.
isFallDamageEnabled()booleanIsFallDamageEnabledFall damage toggle.
isGameTimePaused()booleanIsGameTimePausedWhether day/night cycle is paused.
getGameTime()InstantGameTimeCurrent in-game time of day.
getForcedWeather()StringForcedWeatherForced weather type, or null.
getClientEffects()ClientEffectWorldSettingsClientEffectsClient-side visual effect settings.
getGameMode()GameModeGameModeDefault game mode.
isSpawningNPC()booleanIsSpawningNPCNPC spawning toggle.
getGameplayConfig()StringGameplayConfigGameplay configuration asset ID.
canSaveChunks()booleanIsSavingChunksWhether chunk data can be saved.
canUnloadChunks()booleanIsUnloadingChunksWhether chunks can unload.
isDeleteOnRemove()booleanDeleteOnRemoveWhether to delete world data on removal.
MethodReturn TypeDescription
load(Path)CompletableFuture<WorldConfig>Loads config from a JSON file asynchronously.
save(Path, WorldConfig)CompletableFuture<Void>Saves config to a JSON file asynchronously.
formatDisplayName(String)StringFormats a camelCase/underscore name into a display string with spaces.

Nested configuration for chunk pregeneration and keep-loaded regions.

MethodReturn TypeDescription
getPregenerateRegion()Box2DRegion to pregenerate on world start, or null.
setPregenerateRegion(Box2D)voidSets the pregeneration region.
getKeepLoadedRegion()Box2DRegion that never unloads, or null.
setKeepLoadedRegion(Box2D)voidSets the keep-loaded region.
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.