pub(in worldgen::feature) enum BlockStateProviderKind {
Reference(&'static BlockStateProvider),
Simple {
state: BlockStateData,
},
Weighted {
entries: Vec<WeightedBlockState>,
},
RotatedBlock {
state: Box<BlockStateProviderKind>,
direction: Option<Direction>,
},
RandomizedInt {
property: String,
source: Box<BlockStateProviderKind>,
values: IntProvider,
},
RuleBased {
fallback: Option<Box<BlockStateProviderKind>>,
rules: Vec<RuleBasedStateProviderRule>,
},
Noise(NoiseProvider),
NoiseThreshold(NoiseThresholdProvider),
DualNoise(DualNoiseProvider),
CopyProperties {
source: Box<BlockStateProviderKind>,
},
RandomBlock {
blocks: BlockHolderSet,
},
}Expand description
Block-state provider used by features.
Variants§
Reference(&'static BlockStateProvider)
Registry-backed block-state provider.
Simple
Fields
§
state: BlockStateDataWeighted
Fields
§
entries: Vec<WeightedBlockState>RotatedBlock
RandomizedInt
RuleBased
Noise(NoiseProvider)
NoiseThreshold(NoiseThresholdProvider)
DualNoise(DualNoiseProvider)
CopyProperties
Copies the properties of the block being replaced onto the sourced state.
Fields
§
source: Box<BlockStateProviderKind>RandomBlock
Picks a random block from a holder set (default state, no properties).
Fields
§
blocks: BlockHolderSetTrait Implementations§
Source§impl Clone for BlockStateProviderKind
impl Clone for BlockStateProviderKind
Source§fn clone(&self) -> BlockStateProviderKind
fn clone(&self) -> BlockStateProviderKind
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 BlockStateProviderKind
impl !UnwindSafe for BlockStateProviderKind
impl Freeze for BlockStateProviderKind
impl Send for BlockStateProviderKind
impl Sync for BlockStateProviderKind
impl Unpin for BlockStateProviderKind
impl UnsafeUnpin for BlockStateProviderKind
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<>>