pub struct WorldConfig {
pub storage: WorldStorageConfig,
pub level_data_path: Option<String>,
pub generator: Arc<ChunkGeneratorType>,
pub generation_settings: WorldGenerationSettings,
pub view_distance: u8,
pub simulation_distance: u8,
pub max_chained_neighbor_updates: i32,
pub compression: Option<CompressionInfo>,
pub is_flat: bool,
pub sea_level: i32,
pub default_gamemode: GameType,
pub difficulty: Difficulty,
}Expand description
Configuration for creating a new world.
Fields§
§storage: WorldStorageConfigStorage configuration for chunk persistence.
level_data_path: Option<String>Directory for level data. None means level data is ephemeral.
generator: Arc<ChunkGeneratorType>World generator.
generation_settings: WorldGenerationSettingsGenerator metadata persisted for startup compatibility checks.
view_distance: u8Server view distance (maximum chunk radius).
simulation_distance: u8Server simulation distance.
max_chained_neighbor_updates: i32Maximum queued neighbor-update tasks in one chained run; negative means unlimited.
compression: Option<CompressionInfo>Compression settings for encoding broadcast packets.
is_flat: boolWhether the world should be marked as flat in login/respawn packets.
sea_level: i32Sea level sent in login/respawn packets.
default_gamemode: GameTypeDefault game mode for first-visit player data.
difficulty: DifficultyDifficulty used when creating new level data.
Trait Implementations§
Source§impl Clone for WorldConfig
impl Clone for WorldConfig
Source§fn clone(&self) -> WorldConfig
fn clone(&self) -> WorldConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl !RefUnwindSafe for WorldConfig
impl !UnwindSafe for WorldConfig
impl Freeze for WorldConfig
impl Send for WorldConfig
impl Sync for WorldConfig
impl Unpin for WorldConfig
impl UnsafeUnpin for WorldConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreWraps this value in an
Arc<SyncMutex<>>