Skip to main content

EntityType

Struct EntityType 

Source
pub struct EntityType {
Show 15 fields pub key: Identifier, pub client_tracking_range: i32, pub update_interval: i32, pub track_deltas: bool, pub dimensions: EntityDimensions, pub fixed: bool, pub mob_category: MobCategory, pub fire_immune: bool, pub summonable: bool, pub can_spawn_far_from_player: bool, pub can_serialize: bool, pub is_abstract_boat: bool, pub is_abstract_minecart: bool, pub flags: EntityFlags, pub default_attributes: &'static [(&'static str, f64)],
}

Fields§

§key: Identifier§client_tracking_range: i32§update_interval: i32§track_deltas: bool

Whether vanilla ServerEntity tracks velocity deltas for this type.

§dimensions: EntityDimensions

Default entity dimensions.

§fixed: bool

If true, dimensions cannot be scaled.

§mob_category: MobCategory

Mob category for spawn classification.

§fire_immune: bool

Whether this entity is immune to fire damage.

§summonable: bool

Whether this entity can be summoned via commands.

§can_spawn_far_from_player: bool

Whether this entity can spawn far from players.

§can_serialize: bool

Whether this entity type can be serialized to disk. Set to false for transient entities (lightning, fishing hooks, players).

§is_abstract_boat: bool

Whether vanilla class hierarchy makes this entity an AbstractBoat.

§is_abstract_minecart: bool

Whether vanilla class hierarchy makes this entity an AbstractMinecart.

§flags: EntityFlags

Behavioral flags for collision and interaction.

§default_attributes: &'static [(&'static str, f64)]

Default attribute base values for this entity type Empty for entities that don’t have attributes (projectiles, items, displays, etc.)

Trait Implementations§

Source§

impl Debug for EntityType

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl RegistryEntry for EntityType

Source§

fn key(&self) -> &Identifier

Source§

fn try_id(&self) -> Option<usize>

Source§

fn id(&self) -> usize

Panics Read more

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, 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