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 ARMADILLO: 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 BOGGED: EntityKind
pub const BREEZE: EntityKind
pub const BREEZE_WIND_CHARGE: 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 CHEST_RAFT: EntityKind
pub const CHICKEN: EntityKind
pub const COD: EntityKind
pub const COMMAND_BLOCK_MINECART: EntityKind
pub const COW: EntityKind
pub const CREAKING: 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 LINGERING_POTION: 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 OMINOUS_ITEM_SPAWNER: 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 PUFFERFISH: EntityKind
pub const RABBIT: EntityKind
pub const RAFT: 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 SPLASH_POTION: 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 WIND_CHARGE: 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 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 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.
Source§type Mutability = Mutable
type Mutability = Mutable
A marker type to assist Bevy with determining if this component is
mutable, or immutable. Mutable components will have [
Component<Mutability = Mutable>],
while immutable components will instead have [Component<Mutability = Immutable>]. Read moreSource§fn register_required_components(
_requiree: ComponentId,
required_components: &mut RequiredComponentsRegistrator<'_, '_>,
)
fn register_required_components( _requiree: ComponentId, required_components: &mut RequiredComponentsRegistrator<'_, '_>, )
Registers required components. Read more
Source§fn clone_behavior() -> ComponentCloneBehavior
fn clone_behavior() -> ComponentCloneBehavior
Called when registering this component, allowing to override clone function (or disable cloning altogether) for this component. Read more
Source§fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
fn relationship_accessor() -> Option<ComponentRelationshipAccessor<Self>>
Returns [
ComponentRelationshipAccessor] required for working with relationships in dynamic contexts. Read more§fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_add() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Gets the
on_add [ComponentHook] for this [Component] if one is defined.§fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_insert() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Gets the
on_insert [ComponentHook] for this [Component] if one is defined.§fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_discard() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Gets the
on_discard [ComponentHook] for this [Component] if one is defined.§fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_remove() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Gets the
on_remove [ComponentHook] for this [Component] if one is defined.§fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
fn on_despawn() -> Option<for<'w> fn(DeferredWorld<'w>, HookContext)>
Gets the
on_despawn [ComponentHook] for this [Component] if one is defined.§fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
fn map_entities<E>(_this: &mut Self, _mapper: &mut E)where
E: EntityMapper,
Maps the entities on this component using the given [
EntityMapper]. This is used to remap entities in contexts like scenes and entity cloning.
When deriving [Component], this is populated by annotating fields containing entities with #[entities] Read moreSource§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 (const: unstable) · 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§fn eq(&self, other: &EntityKind) -> bool
fn eq(&self, other: &EntityKind) -> bool
Tests for
self and other values to be equal, and is used by ==.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 UnsafeUnpin 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 ComponentsRegistrator<'_>, ) -> impl Iterator<Item = ComponentId> + use<C>
§fn get_component_ids(
components: &Components,
) -> impl Iterator<Item = Option<ComponentId>>
fn get_component_ids( components: &Components, ) -> impl Iterator<Item = Option<ComponentId>>
Return a iterator over this [
Bundle]’s component ids. This will be None if the component has not been registered.§impl<C> BundleFromComponents for Cwhere
C: Component,
impl<C> BundleFromComponents for Cwhere
C: Component,
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>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn 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>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which 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)
Converts
&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)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend 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,
§unsafe fn get_components(
ptr: MovingPtr<'_, C>,
func: &mut impl FnMut(StorageType, OwningPtr<'_>),
) -> <C as DynamicBundle>::Effect
unsafe fn get_components( ptr: MovingPtr<'_, C>, func: &mut impl FnMut(StorageType, OwningPtr<'_>), ) -> <C as DynamicBundle>::Effect
Moves the components out of the bundle. Read more
§unsafe fn apply_effect(
_ptr: MovingPtr<'_, MaybeUninit<C>>,
_entity: &mut EntityWorldMut<'_>,
)
unsafe fn apply_effect( _ptr: MovingPtr<'_, MaybeUninit<C>>, _entity: &mut EntityWorldMut<'_>, )
Applies the after-effects of spawning this bundle. 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<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<T> FromTemplate for T
impl<T> FromTemplate for T
§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 default().
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
§impl<T> Template for T
impl<T> Template for T
§fn build_template(
&self,
_context: &mut TemplateContext<'_, '_>,
) -> Result<<T as Template>::Output, BevyError>
fn build_template( &self, _context: &mut TemplateContext<'_, '_>, ) -> Result<<T as Template>::Output, BevyError>
Uses this template and the given
entity context to produce a [Template::Output].§fn clone_template(&self) -> T
fn clone_template(&self) -> T
Clones this template. See
Clone.§impl<T> TypeData for T
impl<T> TypeData for T
§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.