pub struct EntityType {Show 21 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 allowed_in_peaceful: bool,
pub can_spawn_far_from_player: bool,
pub can_serialize: bool,
pub only_op_can_set_nbt: bool,
pub is_abstract_boat: bool,
pub is_abstract_minecart: bool,
pub is_projectile: bool,
pub is_abstract_arrow: bool,
pub is_abstract_horse: bool,
pub is_abstract_nautilus: bool,
pub flags: EntityFlags,
pub default_attributes: &'static [(&'static str, f64)],
}Fields§
§key: Identifier§client_tracking_range: i32§update_interval: i32§track_deltas: boolWhether vanilla ServerEntity tracks velocity deltas for this type.
dimensions: EntityDimensionsDefault entity dimensions.
fixed: boolIf true, dimensions cannot be scaled.
mob_category: MobCategoryMob category for spawn classification.
fire_immune: boolWhether this entity is immune to fire damage.
summonable: boolWhether this entity can be summoned via commands.
allowed_in_peaceful: boolWhether this entity type is allowed to exist in Peaceful difficulty.
can_spawn_far_from_player: boolWhether this entity can spawn far from players.
can_serialize: boolWhether this entity type can be serialized to disk. Set to false for transient entities (lightning, fishing hooks, players).
only_op_can_set_nbt: boolWhether only server operators may set this entity’s data via a spawn
item’s ENTITY_DATA component. Mirrors vanilla EntityType.onlyOpCanSetNbt.
is_abstract_boat: boolWhether vanilla class hierarchy makes this entity an AbstractBoat.
is_abstract_minecart: boolWhether vanilla class hierarchy makes this entity an AbstractMinecart.
is_projectile: boolWhether vanilla class hierarchy makes this entity a Projectile.
is_abstract_arrow: boolWhether vanilla class hierarchy makes this entity an AbstractArrow.
is_abstract_horse: boolWhether vanilla class hierarchy makes this entity an AbstractHorse.
is_abstract_nautilus: boolWhether vanilla class hierarchy makes this entity an AbstractNautilus.
flags: EntityFlagsBehavioral 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
impl Debug for EntityType
impl Eq for EntityType
Source§impl PartialEq for EntityType
impl PartialEq for EntityType
Source§impl RegistryEntry for EntityType
impl RegistryEntry for EntityType
Source§impl RegistryHolderSetEntry for EntityType
impl RegistryHolderSetEntry for EntityType
Source§const REGISTRY_NAME: &'static str = "entity type"
const REGISTRY_NAME: &'static str = "entity type"
Source§fn holder_set_by_id(id: usize) -> Option<&'static Self>
fn holder_set_by_id(id: usize) -> Option<&'static Self>
Source§fn holder_set_by_key(key: &Identifier) -> Option<&'static Self>
fn holder_set_by_key(key: &Identifier) -> Option<&'static Self>
Source§fn holder_set_tag_exists(tag: &Identifier) -> bool
fn holder_set_tag_exists(tag: &Identifier) -> bool
Source§fn holder_set_tag_contains(entry: &'static Self, tag: &Identifier) -> bool
fn holder_set_tag_contains(entry: &'static Self, tag: &Identifier) -> bool
Auto Trait Implementations§
impl Freeze for EntityType
impl RefUnwindSafe for EntityType
impl Send for EntityType
impl Sync for EntityType
impl Unpin for EntityType
impl UnsafeUnpin for EntityType
impl UnwindSafe for EntityType
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
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§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> ⓘ
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> ⓘ
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 moreArc<SyncMutex<>>