Skip to main content

StructurePiecePlacer

Struct StructurePiecePlacer 

Source
pub(crate) struct StructurePiecePlacer;

Implementations§

Source§

impl StructurePiecePlacer

Source§

impl StructurePiecePlacer

Source

pub(super) fn place_desert_pyramid_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, bounding_box: &mut BoundingBox, orientation: Option<Direction>, data: &mut DesertPyramidPieceData, clip: BoundingBox, random: &mut WorldgenRandom, ) -> bool

Source

pub(super) fn after_place_desert_pyramid( region: &mut WorldGenRegion<'_>, pieces: &mut [StructurePiece], clip: BoundingBox, )

Source

fn place_desert_pyramid_suspicious_sand( region: &mut WorldGenRegion<'_>, clip: BoundingBox, pos: BlockPos, )

Source

fn compare_vec3i(left: &BlockPos, right: &BlockPos) -> Ordering

Source

fn shuffle_block_positions(positions: &mut [BlockPos], random: &mut impl Random)

Source§

impl StructurePiecePlacer

Source

pub(super) fn place_nether_fortress_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, bounding_box: BoundingBox, orientation: Option<Direction>, data: &mut FortressPieceData, clip: BoundingBox, random: &mut WorldgenRandom, ) -> bool

Source§

impl StructurePiecePlacer

Source

pub(super) fn place_jungle_temple_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, bounding_box: &mut BoundingBox, orientation: Option<Direction>, data: &mut JungleTemplePieceData, clip: BoundingBox, random: &mut WorldgenRandom, ) -> bool

Source§

impl StructurePiecePlacer

Source

pub(super) fn place_mineshaft_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, bounding_box: BoundingBox, orientation: Option<Direction>, data: &mut MineshaftPiecePayload, clip: BoundingBox, random: &mut WorldgenRandom, biome_zoom_seed: i64, ) -> bool

Source§

impl StructurePiecePlacer

Source

pub(super) fn place_ocean_monument_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, bounding_box: BoundingBox, orientation: Option<Direction>, data: &mut OceanMonumentPieceData, clip: BoundingBox, random: &mut WorldgenRandom, ) -> bool

Source§

impl StructurePiecePlacer

Source

pub(super) fn place_pool_element( region: &mut WorldGenRegion<'_>, registry: &Registry, element: &PoolElement, position: BlockPos, reference_pos: BlockPos, rotation: Rotation, clip: BoundingBox, random: &mut WorldgenRandom, liquid_settings: LiquidSettingsData, biome_zoom_seed: i64, ) -> bool

Source

fn place_single_pool_element( region: &mut WorldGenRegion<'_>, registry: &Registry, location: &Identifier, processors: &ProcessorList, projection: Projection, block_ignore: StructureBlockIgnore, late_block_ignore: StructureBlockIgnore, position: BlockPos, reference_pos: BlockPos, rotation: Rotation, clip: BoundingBox, random: &mut WorldgenRandom, liquid_settings: LiquidSettingsData, ) -> bool

Source

fn pool_processors<'a>( registry: &'a Registry, processors: &'a ProcessorList, ) -> &'a [StructureProcessorKind]

Source§

impl StructurePiecePlacer

Source

pub(super) fn post_process_ruined_portal( region: &mut WorldGenRegion<'_>, vertical_placement: RuinedPortalPlacementData, properties: RuinedPortalProperties, portal_box: BoundingBox, random: &mut WorldgenRandom, )

Source

fn maybe_add_ruined_portal_vines( region: &mut WorldGenRegion<'_>, pos: BlockPos, random: &mut WorldgenRandom, )

Source

fn maybe_add_ruined_portal_leaves( region: &mut WorldGenRegion<'_>, pos: BlockPos, random: &mut WorldgenRandom, )

Source

fn add_ruined_portal_netherrack_drip_columns( region: &mut WorldGenRegion<'_>, properties: RuinedPortalProperties, portal_box: BoundingBox, random: &mut WorldgenRandom, )

Source

fn add_ruined_portal_netherrack_drip_column( region: &mut WorldGenRegion<'_>, properties: RuinedPortalProperties, pos: BlockPos, random: &mut WorldgenRandom, )

Source

fn spread_ruined_portal_netherrack( region: &mut WorldGenRegion<'_>, vertical_placement: RuinedPortalPlacementData, properties: RuinedPortalProperties, portal_box: BoundingBox, random: &mut WorldgenRandom, )

Source

fn can_replace_with_ruined_portal_netherrack_or_magma( region: &WorldGenRegion<'_>, vertical_placement: RuinedPortalPlacementData, pos: BlockPos, ) -> bool

Source

fn can_block_be_replaced_with_ruined_portal_netherrack_or_magma( vertical_placement: RuinedPortalPlacementData, block: BlockRef, ) -> bool

Source

fn place_ruined_portal_netherrack_or_magma( region: &mut WorldGenRegion<'_>, properties: RuinedPortalProperties, pos: BlockPos, random: &mut WorldgenRandom, )

Source

fn ruined_portal_surface_y( region: &WorldGenRegion<'_>, vertical_placement: RuinedPortalPlacementData, x: i32, z: i32, ) -> i32

Source

fn random_ruined_portal_horizontal_direction( random: &mut WorldgenRandom, ) -> Direction

Source

const fn vine_face_property(direction: Direction) -> &'static BoolProperty

Source§

impl StructurePiecePlacer

Source

pub(super) fn place_stronghold_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, bounding_box: BoundingBox, orientation: Option<Direction>, data: &mut StrongholdPieceData, clip: BoundingBox, random: &mut WorldgenRandom, ) -> bool

Source§

impl StructurePiecePlacer

Source

pub(super) fn place_swamp_hut_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, bounding_box: &mut BoundingBox, orientation: Option<Direction>, data: &mut SwampHutPieceData, clip: BoundingBox, _random: &mut WorldgenRandom, ) -> bool

Source§

impl StructurePiecePlacer

Source

pub(super) fn place_template_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, data: &mut TemplatePieceData, piece_bounding_box: &mut BoundingBox, reference_pos: BlockPos, clip: BoundingBox, random: &mut WorldgenRandom, ) -> bool

Source

fn adjusted_template_position( region: &WorldGenRegion<'_>, template: &StructureTemplate, data: &mut TemplatePieceData, random: &mut WorldgenRandom, ) -> BlockPos

Source

const fn shipwreck_is_too_big_to_fit(template: &StructureTemplate) -> bool

Source

fn adjusted_shipwreck_y( region: &WorldGenRegion<'_>, template: &StructureTemplate, position: IVec3, is_beached: bool, random: &mut WorldgenRandom, ) -> i32

Source

fn adjusted_igloo_position( region: &WorldGenRegion<'_>, position: IVec3, mirror: StructureMirror, rotation: Rotation, pivot: BlockPos, template_offset: IVec3, ) -> BlockPos

Source

fn adjusted_ocean_ruin_position( region: &WorldGenRegion<'_>, template: &StructureTemplate, data: &mut TemplatePieceData, ) -> BlockPos

Source

fn adjusted_ocean_ruin_height( region: &WorldGenRegion<'_>, base: BlockPos, corner: BlockPos, ) -> i32

Source

fn is_water_state(state: BlockStateId) -> bool

Source

fn handle_template_data_markers( region: &mut WorldGenRegion<'_>, registry: &Registry, template: &StructureTemplate, marker_handling: TemplateMarkerHandling, position: BlockPos, settings: &StructurePlaceSettings<'_>, random: &mut WorldgenRandom, ) -> bool

Source

fn handle_ocean_ruin_marker( region: &mut WorldGenRegion<'_>, is_large: bool, marker: &StructureDataMarker, random: &mut WorldgenRandom, )

Source

fn place_ocean_ruin_marker_chest( region: &mut WorldGenRegion<'_>, is_large: bool, pos: BlockPos, random: &mut WorldgenRandom, )

Source

fn spawn_ocean_ruin_drowned(region: &mut WorldGenRegion<'_>, pos: BlockPos)

Source

fn handle_shipwreck_marker( region: &mut WorldGenRegion<'_>, marker: &StructureDataMarker, random: &mut WorldgenRandom, )

Source

fn handle_igloo_marker( region: &mut WorldGenRegion<'_>, marker: &StructureDataMarker, random: &mut WorldgenRandom, )

Source

fn handle_end_city_marker( region: &mut WorldGenRegion<'_>, settings: &StructurePlaceSettings<'_>, marker: &StructureDataMarker, random: &mut WorldgenRandom, )

Source

fn place_end_city_marker_chest( region: &mut WorldGenRegion<'_>, chest_pos: BlockPos, random: &mut WorldgenRandom, )

Source

fn spawn_end_city_shulker(region: &mut WorldGenRegion<'_>, pos: BlockPos)

Source

fn spawn_end_city_elytra_frame( region: &mut WorldGenRegion<'_>, pos: BlockPos, direction: Direction, )

Source

fn handle_mansion_marker( region: &mut WorldGenRegion<'_>, settings: &StructurePlaceSettings<'_>, marker: &StructureDataMarker, random: &mut WorldgenRandom, )

Source

fn mansion_marker_chest_state(rotation: Rotation, marker: &str) -> BlockStateId

Source

fn place_mansion_marker_chest( region: &mut WorldGenRegion<'_>, pos: BlockPos, state: BlockStateId, random: &mut WorldgenRandom, )

Source

fn spawn_mansion_marker_mob( region: &mut WorldGenRegion<'_>, pos: BlockPos, entity_type: EntityTypeRef, )

Source

fn loot_table_nbt(loot_table: &'static str, seed: i64) -> NbtCompound

Source

fn template_placement_clip( placement_clip: TemplatePlacementClip, center_clip: BoundingBox, template_box: BoundingBox, ) -> Option<BoundingBox>

Source

fn post_process_template_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, post_process: TemplatePostProcess, processors: &TemplateProcessorList, position: BlockPos, settings: &StructurePlaceSettings<'_>, template_box: BoundingBox, placement_clip: BoundingBox, random: &mut WorldgenRandom, )

Source

fn post_process_igloo_top( region: &mut WorldGenRegion<'_>, position: BlockPos, settings: &StructurePlaceSettings<'_>, )

Source

fn place_nether_fossil_dried_ghast( region: &mut WorldGenRegion<'_>, registry: &Registry, fossil_box: BoundingBox, placement_clip: BoundingBox, )

Source

fn dried_ghast_state(registry: &Registry, rotation: Rotation) -> BlockStateId

Source§

impl StructurePiecePlacer

Source

pub(super) fn template_processors<'a>( registry: &'a Registry, processors: &'a TemplateProcessorList, hardcoded_processors: &'a mut Vec<StructureProcessorKind>, ) -> &'a [StructureProcessorKind]

Source

fn ocean_ruin_processors( biome_temp: OceanRuinBiomeTempData, integrity: f32, ) -> Vec<StructureProcessorKind>

Source

fn ruined_portal_processors( vertical_placement: RuinedPortalPlacementData, properties: RuinedPortalProperties, ) -> Vec<StructureProcessorKind>

Source

fn ruined_portal_lava_rule( vertical_placement: RuinedPortalPlacementData, properties: RuinedPortalProperties, ) -> ProcessorRuleData

Source

const fn block_replace_rule( source: &'static str, target: &'static str, ) -> ProcessorRuleData

Source

const fn random_block_replace_rule( source: &'static str, probability: f32, target: &'static str, ) -> ProcessorRuleData

Source

const fn append_loot_replace_rule( source: &'static str, target: &'static str, loot_table: Identifier, ) -> ProcessorRuleData

Source

const fn block_state_data(block: &'static str) -> BlockStateData

Source§

impl StructurePiecePlacer

Source

pub(crate) const JIGSAW_UPDATE_FLAGS: UpdateFlags

Vanilla jigsaw pool-element placement flags: UPDATE_CLIENTS | UPDATE_KNOWN_SHAPE.

Source

pub(crate) const TEMPLATE_UPDATE_FLAGS: UpdateFlags = UpdateFlags::UPDATE_CLIENTS

Vanilla template-piece placement flags: UPDATE_CLIENTS.

Source

const VANILLA_HORIZONTAL_DIRECTIONS: [Direction; 4]

Source

fn create_mob( entity_type: EntityTypeRef, position: DVec3, world: Weak<World>, persistence_required: bool, ) -> Option<SharedEntity>

Creates a structure mob when Steel implements its concrete type.

Unsupported types are skipped instead of leaving behaviorless entities in generated chunks. Completed structure placement does not retry these skipped spawns. Structure spawn finalization remains tracked in SteelMC issue #564.

Source

pub(crate) fn place_piece( region: &mut WorldGenRegion<'_>, registry: &Registry, piece: &mut StructurePiece, reference_pos: BlockPos, clip: BoundingBox, random: &mut WorldgenRandom, biome_zoom_seed: i64, ) -> bool

Places one already-clipped structure piece.

Returns whether the vanilla placement call succeeded. Later milestones must implement each remaining payload variant completely before it can return true.

Source

pub(crate) fn after_place_structure( region: &mut WorldGenRegion<'_>, structure: StructureRef, pieces: &mut [StructurePiece], clip: BoundingBox, )

Source

pub(super) fn reorient_chest( region: &WorldGenRegion<'_>, pos: BlockPos, state: BlockStateId, ) -> BlockStateId

Source

pub(super) fn create_loot_chest( region: &mut WorldGenRegion<'_>, clip: BoundingBox, random: &mut WorldgenRandom, pos: BlockPos, loot_table: &'static str, ) -> bool

Source

pub(super) fn set_loot_table_block_entity( region: &WorldGenRegion<'_>, pos: BlockPos, block_entity_type: BlockEntityTypeRef, state: BlockStateId, loot_table: &'static str, seed: i64, ) -> bool

Source

pub(super) fn set_spawner_entity( region: &WorldGenRegion<'_>, pos: BlockPos, state: BlockStateId, entity_id: &'static str, ) -> bool

Source

pub(super) fn set_brushable_loot_table( region: &WorldGenRegion<'_>, pos: BlockPos, state: BlockStateId, loot_table: &'static str, ) -> bool

Source

pub(super) const fn orientation_transform( orientation: Option<Direction>, ) -> (StructureMirror, Rotation)

Source

pub(super) fn needs_structure_shape_postprocessing(state: BlockStateId) -> bool

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self> ⓘ

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self> ⓘ

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
where F: FnOnce(&Self) -> bool,

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 more
Source§

impl<T> IntoShared for T

Source§

fn into_shared(self) -> Arc<Mutex<RawMutex, Self>> ⓘ

Wraps this value in an Arc<SyncMutex<>>
§

impl<T> Pointable for T

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
§

impl<T> PolicyExt for T
where T: ?Sized,

§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] only if self and other return Action::Follow. Read more
§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns [Action::Follow] if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> ⓘ
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self> ⓘ

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more