pub struct EntityKind(/* private fields */);
Expand description
Identifies the type of an entity. As a component, the entity kind should not be modified.
Implementations§
Source§impl EntityKind
impl EntityKind
pub const ALLAY: EntityKind
pub const AREA_EFFECT_CLOUD: EntityKind
pub const ARMOR_STAND: EntityKind
pub const ARROW: EntityKind
pub const AXOLOTL: EntityKind
pub const BAT: EntityKind
pub const BEE: EntityKind
pub const BLAZE: EntityKind
pub const BLOCK_DISPLAY: EntityKind
pub const BOAT: EntityKind
pub const CAMEL: EntityKind
pub const CAT: EntityKind
pub const CAVE_SPIDER: EntityKind
pub const CHEST_BOAT: EntityKind
pub const CHEST_MINECART: EntityKind
pub const CHICKEN: EntityKind
pub const COD: EntityKind
pub const COMMAND_BLOCK_MINECART: EntityKind
pub const COW: EntityKind
pub const CREEPER: EntityKind
pub const DOLPHIN: EntityKind
pub const DONKEY: EntityKind
pub const DRAGON_FIREBALL: EntityKind
pub const DROWNED: EntityKind
pub const EGG: EntityKind
pub const ELDER_GUARDIAN: EntityKind
pub const END_CRYSTAL: EntityKind
pub const ENDER_DRAGON: EntityKind
pub const ENDER_PEARL: EntityKind
pub const ENDERMAN: EntityKind
pub const ENDERMITE: EntityKind
pub const EVOKER: EntityKind
pub const EVOKER_FANGS: EntityKind
pub const EXPERIENCE_BOTTLE: EntityKind
pub const EXPERIENCE_ORB: EntityKind
pub const EYE_OF_ENDER: EntityKind
pub const FALLING_BLOCK: EntityKind
pub const FIREBALL: EntityKind
pub const FIREWORK_ROCKET: EntityKind
pub const FISHING_BOBBER: EntityKind
pub const FOX: EntityKind
pub const FROG: EntityKind
pub const FURNACE_MINECART: EntityKind
pub const GHAST: EntityKind
pub const GIANT: EntityKind
pub const GLOW_ITEM_FRAME: EntityKind
pub const GLOW_SQUID: EntityKind
pub const GOAT: EntityKind
pub const GUARDIAN: EntityKind
pub const HOGLIN: EntityKind
pub const HOPPER_MINECART: EntityKind
pub const HORSE: EntityKind
pub const HUSK: EntityKind
pub const ILLUSIONER: EntityKind
pub const INTERACTION: EntityKind
pub const IRON_GOLEM: EntityKind
pub const ITEM_DISPLAY: EntityKind
pub const ITEM: EntityKind
pub const ITEM_FRAME: EntityKind
pub const LEASH_KNOT: EntityKind
pub const LIGHTNING: EntityKind
pub const LLAMA: EntityKind
pub const LLAMA_SPIT: EntityKind
pub const MAGMA_CUBE: EntityKind
pub const MARKER: EntityKind
pub const MINECART: EntityKind
pub const MOOSHROOM: EntityKind
pub const MULE: EntityKind
pub const OCELOT: EntityKind
pub const PAINTING: EntityKind
pub const PANDA: EntityKind
pub const PARROT: EntityKind
pub const PHANTOM: EntityKind
pub const PIG: EntityKind
pub const PIGLIN_BRUTE: EntityKind
pub const PIGLIN: EntityKind
pub const PILLAGER: EntityKind
pub const PLAYER: EntityKind
pub const POLAR_BEAR: EntityKind
pub const POTION: EntityKind
pub const PUFFERFISH: EntityKind
pub const RABBIT: EntityKind
pub const RAVAGER: EntityKind
pub const SALMON: EntityKind
pub const SHEEP: EntityKind
pub const SHULKER_BULLET: EntityKind
pub const SHULKER: EntityKind
pub const SILVERFISH: EntityKind
pub const SKELETON: EntityKind
pub const SKELETON_HORSE: EntityKind
pub const SLIME: EntityKind
pub const SMALL_FIREBALL: EntityKind
pub const SNIFFER: EntityKind
pub const SNOW_GOLEM: EntityKind
pub const SNOWBALL: EntityKind
pub const SPAWNER_MINECART: EntityKind
pub const SPECTRAL_ARROW: EntityKind
pub const SPIDER: EntityKind
pub const SQUID: EntityKind
pub const STRAY: EntityKind
pub const STRIDER: EntityKind
pub const TADPOLE: EntityKind
pub const TEXT_DISPLAY: EntityKind
pub const TNT: EntityKind
pub const TNT_MINECART: EntityKind
pub const TRADER_LLAMA: EntityKind
pub const TRIDENT: EntityKind
pub const TROPICAL_FISH: EntityKind
pub const TURTLE: EntityKind
pub const VEX: EntityKind
pub const VILLAGER: EntityKind
pub const VINDICATOR: EntityKind
pub const WANDERING_TRADER: EntityKind
pub const WARDEN: EntityKind
pub const WITCH: EntityKind
pub const WITHER: EntityKind
pub const WITHER_SKELETON: EntityKind
pub const WITHER_SKULL: EntityKind
pub const WOLF: EntityKind
pub const ZOGLIN: EntityKind
pub const ZOMBIE: EntityKind
pub const ZOMBIE_HORSE: EntityKind
pub const ZOMBIE_VILLAGER: EntityKind
pub const ZOMBIFIED_PIGLIN: EntityKind
pub const fn new(inner: i32) -> Self
pub const fn get(self) -> i32
pub const fn translation_key(self) -> Option<&'static str>
Trait Implementations§
Source§impl Clone for EntityKind
impl Clone for EntityKind
Source§fn clone(&self) -> EntityKind
fn clone(&self) -> EntityKind
Returns a copy 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 Component for EntityKind
impl Component for EntityKind
Source§const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
const STORAGE_TYPE: StorageType = bevy_ecs::component::StorageType::Table
A constant indicating the storage type used for this component.
§fn register_component_hooks(_hooks: &mut ComponentHooks)
fn register_component_hooks(_hooks: &mut ComponentHooks)
Called when registering this component, allowing mutable access to its [
ComponentHooks
].Source§impl Debug for EntityKind
impl Debug for EntityKind
Source§impl Default for EntityKind
impl Default for EntityKind
Source§fn default() -> EntityKind
fn default() -> EntityKind
Returns the “default value” for a type. Read more
Source§impl Deref for EntityKind
impl Deref for EntityKind
Source§impl Hash for EntityKind
impl Hash for EntityKind
Source§impl Ord for EntityKind
impl Ord for EntityKind
Source§fn cmp(&self, other: &EntityKind) -> Ordering
fn cmp(&self, other: &EntityKind) -> Ordering
1.21.0 · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
Source§impl PartialEq for EntityKind
impl PartialEq for EntityKind
Source§impl PartialOrd for EntityKind
impl PartialOrd for EntityKind
impl Copy for EntityKind
impl Eq for EntityKind
impl StructuralPartialEq for EntityKind
Auto Trait Implementations§
impl Freeze for EntityKind
impl RefUnwindSafe for EntityKind
impl Send for EntityKind
impl Sync for EntityKind
impl Unpin for EntityKind
impl UnwindSafe for EntityKind
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<C> Bundle for Cwhere
C: Component,
impl<C> Bundle for Cwhere
C: Component,
fn component_ids( components: &mut Components, storages: &mut Storages, ids: &mut impl FnMut(ComponentId), )
unsafe fn from_components<T, F>(ctx: &mut T, func: &mut F) -> C
§fn get_component_ids(
components: &Components,
ids: &mut impl FnMut(Option<ComponentId>),
)
fn get_component_ids( components: &Components, ids: &mut impl FnMut(Option<ComponentId>), )
Gets this [
Bundle
]’s component ids. This will be None
if the component has not been registered.Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Comparable<K> for Q
impl<Q, K> Comparable<K> for Q
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DynEq for T
impl<T> DynEq for T
§impl<C> DynamicBundle for Cwhere
C: Component,
impl<C> DynamicBundle for Cwhere
C: Component,
fn get_components(self, func: &mut impl FnMut(StorageType, OwningPtr<'_>))
§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
Checks if this value is equivalent to the given key. Read more
§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
Compare self to
key
and return true
if they are equal.§impl<T> FromWorld for Twhere
T: Default,
impl<T> FromWorld for Twhere
T: Default,
§fn from_world(_world: &mut World) -> T
fn from_world(_world: &mut World) -> T
Creates
Self
using data from the given [World
].