pub(crate) struct BlockStateProviderEvaluator;Expand description
Evaluates blockstate providers against a readonly level
Implementations§
Source§impl BlockStateProviderEvaluator
impl BlockStateProviderEvaluator
pub(crate) fn test_block_predicate( level: &dyn LevelReader, registry: &Registry, predicate: &BlockPredicate, origin: BlockPos, ) -> bool
pub(crate) fn offset(origin: BlockPos, offset: &IVec3) -> BlockPos
Source§impl BlockStateProviderEvaluator
impl BlockStateProviderEvaluator
pub(crate) fn sample_block_state_provider_optional( level: &dyn LevelReader, registry: &Registry, random: &mut impl Random, provider: &BlockStateProviderKind, pos: BlockPos, ) -> Option<BlockStateId>
pub(crate) fn sample_block_state_provider( level: &dyn LevelReader, registry: &Registry, random: &mut impl Random, provider: &BlockStateProviderKind, pos: BlockPos, ) -> BlockStateId
fn sample_random_block( registry: &Registry, random: &mut impl Random, blocks: &BlockHolderSet, ) -> Option<BlockStateId>
pub(crate) fn set_int_property_by_name( registry: &Registry, state: BlockStateId, property: &str, value: i32, ) -> BlockStateId
pub(crate) fn sample_noise_provider( registry: &Registry, provider: &NoiseProvider, pos: BlockPos, ) -> BlockStateId
pub(crate) fn sample_noise_threshold_provider( registry: &Registry, random: &mut impl Random, provider: &NoiseThresholdProvider, pos: BlockPos, ) -> BlockStateId
pub(crate) fn sample_dual_noise_provider( registry: &Registry, provider: &DualNoiseProvider, pos: BlockPos, ) -> BlockStateId
pub(crate) fn normal_noise( parameters: &FeatureNoiseParameters, seed: i64, ) -> NormalNoise
pub(crate) fn noise_value<S: NoiseScale>( noise: &NormalNoise, pos: BlockPos, scale: S, ) -> f64
pub(crate) fn noise_state_by_value( registry: &Registry, states: &[BlockStateData], noise_value: f64, ) -> BlockStateId
pub(crate) fn noise_state_by_resolved_value( states: &[BlockStateId], noise_value: f64, ) -> BlockStateId
pub(crate) fn noise_state_index(state_count: usize, noise_value: f64) -> usize
pub(crate) fn random_block_state_from_data_list( registry: &Registry, random: &mut impl Random, states: &[BlockStateData], ) -> BlockStateId
Source§impl BlockStateProviderEvaluator
impl BlockStateProviderEvaluator
pub(crate) fn block_state_from_data( registry: &Registry, data: &BlockStateData, ) -> BlockStateId
Auto Trait Implementations§
impl Freeze for BlockStateProviderEvaluator
impl RefUnwindSafe for BlockStateProviderEvaluator
impl Send for BlockStateProviderEvaluator
impl Sync for BlockStateProviderEvaluator
impl Unpin for BlockStateProviderEvaluator
impl UnsafeUnpin for BlockStateProviderEvaluator
impl UnwindSafe for BlockStateProviderEvaluator
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
§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<>>