pub struct SoundEventDefinition {
pub sound: Ident<String>,
pub range: Option<f32>,
}Expand description
Defines a sound event, either by referencing the registry or defining it on the fly.
Fields§
§sound: Ident<String>The identifier of the sound (e.g., “minecraft:entity.pig.ambient”).
range: Option<f32>A fixed range (in blocks) for the sound. If None, uses the default.
Trait Implementations§
Source§impl Clone for SoundEventDefinition
impl Clone for SoundEventDefinition
Source§fn clone(&self) -> SoundEventDefinition
fn clone(&self) -> SoundEventDefinition
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SoundEventDefinition
impl Debug for SoundEventDefinition
Source§impl<'a> Decode<'a> for SoundEventDefinition
impl<'a> Decode<'a> for SoundEventDefinition
Source§impl Encode for SoundEventDefinition
impl Encode for SoundEventDefinition
Source§impl PartialEq for SoundEventDefinition
impl PartialEq for SoundEventDefinition
impl StructuralPartialEq for SoundEventDefinition
Auto Trait Implementations§
impl Freeze for SoundEventDefinition
impl RefUnwindSafe for SoundEventDefinition
impl Send for SoundEventDefinition
impl Sync for SoundEventDefinition
impl Unpin for SoundEventDefinition
impl UnwindSafe for SoundEventDefinition
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