Struct SpawnPlacementRule
pub struct SpawnPlacementRule {
pub placement: SpawnPlacementType,
pub heightmap: Heightmap,
pub spawnable_on: Option<String>,
pub light: SpawnLight,
pub biome_tag: Option<String>,
}Expand description
A mod entity type’s spawn rule, declared with
Registrar::declare_spawn_placement:
the arguments of NeoForge’s RegisterSpawnPlacementsEvent.register as data, so one
rule serves native and wasm mods. Every field must hold for a spawn to pass; a trial
spawner ignores light, as for vanilla types.
Fields§
§placement: SpawnPlacementTypeWhere the type stands (SpawnPlacementType).
heightmap: HeightmapThe heightmap natural spawning and chunk generation find the surface with.
spawnable_on: Option<String>A block tag (minecraft:animals_spawnable_on, no #) the block below must be in.
light: SpawnLightHow bright the spot must be.
biome_tag: Option<String>A biome tag (no #) the spot’s biome must be in.
Trait Implementations§
§impl Clone for SpawnPlacementRule
impl Clone for SpawnPlacementRule
§fn clone(&self) -> SpawnPlacementRule
fn clone(&self) -> SpawnPlacementRule
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 more§impl Debug for SpawnPlacementRule
impl Debug for SpawnPlacementRule
§impl PartialEq for SpawnPlacementRule
impl PartialEq for SpawnPlacementRule
impl StructuralPartialEq for SpawnPlacementRule
Auto Trait Implementations§
impl Freeze for SpawnPlacementRule
impl RefUnwindSafe for SpawnPlacementRule
impl Send for SpawnPlacementRule
impl Sync for SpawnPlacementRule
impl Unpin for SpawnPlacementRule
impl UnsafeUnpin for SpawnPlacementRule
impl UnwindSafe for SpawnPlacementRule
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