pub(crate) struct StructurePiecePlacer;Implementations§
Source§impl StructurePiecePlacer
impl StructurePiecePlacer
pub(super) fn place_buried_treasure_piece( region: &mut WorldGenRegion<'_>, bounding_box: &mut BoundingBox, clip: BoundingBox, random: &mut WorldgenRandom, ) -> bool
fn is_buried_treasure_base(state: BlockStateId) -> bool
fn is_buried_treasure_liquid(state: BlockStateId) -> bool
fn create_buried_treasure_chest( region: &mut WorldGenRegion<'_>, clip: BoundingBox, random: &mut WorldgenRandom, pos: BlockPos, ) -> bool
Source§impl StructurePiecePlacer
impl StructurePiecePlacer
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
pub(super) fn after_place_desert_pyramid( region: &mut WorldGenRegion<'_>, pieces: &mut [StructurePiece], clip: BoundingBox, )
fn place_desert_pyramid_suspicious_sand( region: &mut WorldGenRegion<'_>, clip: BoundingBox, pos: BlockPos, )
fn compare_vec3i(left: &BlockPos, right: &BlockPos) -> Ordering
fn shuffle_block_positions(positions: &mut [BlockPos], random: &mut impl Random)
Source§impl StructurePiecePlacer
impl StructurePiecePlacer
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
impl StructurePiecePlacer
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
impl StructurePiecePlacer
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
impl StructurePiecePlacer
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
impl StructurePiecePlacer
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
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
fn pool_processors<'a>( registry: &'a Registry, processors: &'a ProcessorList, ) -> &'a [StructureProcessorKind]
Source§impl StructurePiecePlacer
impl StructurePiecePlacer
pub(super) fn post_process_ruined_portal( region: &mut WorldGenRegion<'_>, vertical_placement: RuinedPortalPlacementData, properties: RuinedPortalProperties, portal_box: BoundingBox, random: &mut WorldgenRandom, )
fn maybe_add_ruined_portal_vines( region: &mut WorldGenRegion<'_>, pos: BlockPos, random: &mut WorldgenRandom, )
fn maybe_add_ruined_portal_leaves( region: &mut WorldGenRegion<'_>, pos: BlockPos, random: &mut WorldgenRandom, )
fn add_ruined_portal_netherrack_drip_columns( region: &mut WorldGenRegion<'_>, properties: RuinedPortalProperties, portal_box: BoundingBox, random: &mut WorldgenRandom, )
fn add_ruined_portal_netherrack_drip_column( region: &mut WorldGenRegion<'_>, properties: RuinedPortalProperties, pos: BlockPos, random: &mut WorldgenRandom, )
fn spread_ruined_portal_netherrack( region: &mut WorldGenRegion<'_>, vertical_placement: RuinedPortalPlacementData, properties: RuinedPortalProperties, portal_box: BoundingBox, random: &mut WorldgenRandom, )
fn can_replace_with_ruined_portal_netherrack_or_magma( region: &WorldGenRegion<'_>, vertical_placement: RuinedPortalPlacementData, pos: BlockPos, ) -> bool
fn can_block_be_replaced_with_ruined_portal_netherrack_or_magma( vertical_placement: RuinedPortalPlacementData, block: BlockRef, ) -> bool
fn place_ruined_portal_netherrack_or_magma( region: &mut WorldGenRegion<'_>, properties: RuinedPortalProperties, pos: BlockPos, random: &mut WorldgenRandom, )
fn ruined_portal_surface_y( region: &WorldGenRegion<'_>, vertical_placement: RuinedPortalPlacementData, x: i32, z: i32, ) -> i32
fn random_ruined_portal_horizontal_direction( random: &mut WorldgenRandom, ) -> Direction
const fn vine_face_property(direction: Direction) -> &'static BoolProperty
Source§impl StructurePiecePlacer
impl StructurePiecePlacer
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
impl StructurePiecePlacer
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
impl StructurePiecePlacer
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
fn adjusted_template_position( region: &WorldGenRegion<'_>, template: &StructureTemplate, data: &mut TemplatePieceData, random: &mut WorldgenRandom, ) -> BlockPos
const fn shipwreck_is_too_big_to_fit(template: &StructureTemplate) -> bool
fn adjusted_shipwreck_y( region: &WorldGenRegion<'_>, template: &StructureTemplate, position: IVec3, is_beached: bool, random: &mut WorldgenRandom, ) -> i32
fn adjusted_igloo_position( region: &WorldGenRegion<'_>, position: IVec3, mirror: StructureMirror, rotation: Rotation, pivot: BlockPos, template_offset: IVec3, ) -> BlockPos
fn adjusted_ocean_ruin_position( region: &WorldGenRegion<'_>, template: &StructureTemplate, data: &mut TemplatePieceData, ) -> BlockPos
fn adjusted_ocean_ruin_height( region: &WorldGenRegion<'_>, base: BlockPos, corner: BlockPos, ) -> i32
fn is_water_state(state: BlockStateId) -> bool
fn handle_template_data_markers( region: &mut WorldGenRegion<'_>, registry: &Registry, template: &StructureTemplate, marker_handling: TemplateMarkerHandling, position: BlockPos, settings: &StructurePlaceSettings<'_>, random: &mut WorldgenRandom, ) -> bool
fn handle_ocean_ruin_marker( region: &mut WorldGenRegion<'_>, is_large: bool, marker: &StructureDataMarker, random: &mut WorldgenRandom, )
fn place_ocean_ruin_marker_chest( region: &mut WorldGenRegion<'_>, is_large: bool, pos: BlockPos, random: &mut WorldgenRandom, )
fn spawn_ocean_ruin_drowned(region: &mut WorldGenRegion<'_>, pos: BlockPos)
fn handle_shipwreck_marker( region: &mut WorldGenRegion<'_>, marker: &StructureDataMarker, random: &mut WorldgenRandom, )
fn handle_igloo_marker( region: &mut WorldGenRegion<'_>, marker: &StructureDataMarker, random: &mut WorldgenRandom, )
fn handle_end_city_marker( region: &mut WorldGenRegion<'_>, settings: &StructurePlaceSettings<'_>, marker: &StructureDataMarker, random: &mut WorldgenRandom, )
fn place_end_city_marker_chest( region: &mut WorldGenRegion<'_>, chest_pos: BlockPos, random: &mut WorldgenRandom, )
fn spawn_end_city_shulker(region: &mut WorldGenRegion<'_>, pos: BlockPos)
fn spawn_end_city_elytra_frame( region: &mut WorldGenRegion<'_>, pos: BlockPos, direction: Direction, )
fn handle_mansion_marker( region: &mut WorldGenRegion<'_>, settings: &StructurePlaceSettings<'_>, marker: &StructureDataMarker, random: &mut WorldgenRandom, )
fn mansion_marker_chest_state(rotation: Rotation, marker: &str) -> BlockStateId
fn place_mansion_marker_chest( region: &mut WorldGenRegion<'_>, pos: BlockPos, state: BlockStateId, random: &mut WorldgenRandom, )
fn spawn_mansion_marker_mob( region: &mut WorldGenRegion<'_>, pos: BlockPos, entity_type: EntityTypeRef, )
fn loot_table_nbt(loot_table: &'static str, seed: i64) -> NbtCompound
const fn is_in_spawnable_bounds(pos: BlockPos) -> bool
fn template_placement_clip( placement_clip: TemplatePlacementClip, center_clip: BoundingBox, template_box: BoundingBox, ) -> Option<BoundingBox>
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, )
fn post_process_igloo_top( region: &mut WorldGenRegion<'_>, position: BlockPos, settings: &StructurePlaceSettings<'_>, )
fn place_nether_fossil_dried_ghast( region: &mut WorldGenRegion<'_>, registry: &Registry, fossil_box: BoundingBox, placement_clip: BoundingBox, )
fn dried_ghast_state(registry: &Registry, rotation: Rotation) -> BlockStateId
Source§impl StructurePiecePlacer
impl StructurePiecePlacer
pub(super) fn template_processors<'a>( registry: &'a Registry, processors: &'a TemplateProcessorList, hardcoded_processors: &'a mut Vec<StructureProcessorKind>, ) -> &'a [StructureProcessorKind]
fn ocean_ruin_processors( biome_temp: OceanRuinBiomeTempData, integrity: f32, ) -> Vec<StructureProcessorKind>
fn ruined_portal_processors( vertical_placement: RuinedPortalPlacementData, properties: RuinedPortalProperties, ) -> Vec<StructureProcessorKind>
fn ruined_portal_lava_rule( vertical_placement: RuinedPortalPlacementData, properties: RuinedPortalProperties, ) -> ProcessorRuleData
const fn block_replace_rule( source: &'static str, target: &'static str, ) -> ProcessorRuleData
const fn random_block_replace_rule( source: &'static str, probability: f32, target: &'static str, ) -> ProcessorRuleData
const fn append_loot_replace_rule( source: &'static str, target: &'static str, loot_table: Identifier, ) -> ProcessorRuleData
const fn block_state_data(block: &'static str) -> BlockStateData
Source§impl StructurePiecePlacer
impl StructurePiecePlacer
Sourcepub(crate) const JIGSAW_UPDATE_FLAGS: UpdateFlags
pub(crate) const JIGSAW_UPDATE_FLAGS: UpdateFlags
Vanilla jigsaw pool-element placement flags: UPDATE_CLIENTS | UPDATE_KNOWN_SHAPE.
Sourcepub(crate) const TEMPLATE_UPDATE_FLAGS: UpdateFlags = UpdateFlags::UPDATE_CLIENTS
pub(crate) const TEMPLATE_UPDATE_FLAGS: UpdateFlags = UpdateFlags::UPDATE_CLIENTS
Vanilla template-piece placement flags: UPDATE_CLIENTS.
const VANILLA_HORIZONTAL_DIRECTIONS: [Direction; 4]
Sourcepub(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
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.
pub(crate) fn after_place_structure( region: &mut WorldGenRegion<'_>, structure: StructureRef, pieces: &mut [StructurePiece], clip: BoundingBox, )
pub(super) fn reorient_chest( region: &WorldGenRegion<'_>, pos: BlockPos, state: BlockStateId, ) -> BlockStateId
pub(super) fn create_loot_chest( region: &mut WorldGenRegion<'_>, clip: BoundingBox, random: &mut WorldgenRandom, pos: BlockPos, loot_table: &'static str, ) -> bool
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
pub(super) fn set_spawner_entity( region: &WorldGenRegion<'_>, pos: BlockPos, state: BlockStateId, entity_id: &'static str, ) -> bool
pub(super) fn set_brushable_loot_table( region: &WorldGenRegion<'_>, pos: BlockPos, state: BlockStateId, loot_table: &'static str, ) -> bool
pub(super) const fn orientation_transform( orientation: Option<Direction>, ) -> (StructureMirror, Rotation)
pub(super) fn needs_structure_shape_postprocessing(state: BlockStateId) -> bool
Auto Trait Implementations§
impl Freeze for StructurePiecePlacer
impl RefUnwindSafe for StructurePiecePlacer
impl Send for StructurePiecePlacer
impl Sync for StructurePiecePlacer
impl Unpin for StructurePiecePlacer
impl UnsafeUnpin for StructurePiecePlacer
impl UnwindSafe for StructurePiecePlacer
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<>>