Enum Entity

Source
pub enum Entity {
Show 151 variants AcaciaBoat(Boat), AcaciaChestBoat(ChestBoat), Allay(Allay), AreaEffectCloud(AreaEffectCloud), Armadillo(Armadillo), ArmorStand(ArmorStand), Arrow(Arrow), Axolotl(Axolotl), BambooChestRaft(ChestRaft), BambooRaft(Raft), Bat(Bat), Bee(Bee), BirchBoat(Boat), BirchChestBoat(ChestBoat), Blaze(Blaze), BlockDisplay(BlockDisplay), Bogged(Bogged), Breeze(Breeze), BreezeWindCharge(BreezeWindCharge), Camel(Camel), Cat(Cat), CaveSpider(CaveSpider), CherryBoat(Boat), CherryChestBoat(ChestBoat), ChestMinecart(MinecartChest), Chicken(Chicken), Cod(Cod), CommandBlockMinecart(MinecartCommandBlock), Cow(Cow), Creaking(Creaking), Creeper(Creeper), DarkOakBoat(Boat), DarkOakChestBoat(ChestBoat), Dolphin(Dolphin), Donkey(Donkey), DragonFireball(DragonFireball), Drowned(Drowned), Egg(ThrownEgg), ElderGuardian(ElderGuardian), EndCrystal(EndCrystal), EnderDragon(EnderDragon), EnderPearl(ThrownEnderpearl), Enderman(EnderMan), Endermite(Endermite), Evoker(Evoker), EvokerFangs(EvokerFangs), ExperienceBottle(ThrownExperienceBottle), ExperienceOrb(ExperienceOrb), EyeOfEnder(EyeOfEnder), FallingBlock(FallingBlockEntity), Fireball(LargeFireball), FireworkRocket(FireworkRocketEntity), FishingBobber(FishingHook), Fox(Fox), Frog(Frog), FurnaceMinecart(MinecartFurnace), Ghast(Ghast), Giant(Giant), GlowItemFrame(GlowItemFrame), GlowSquid(GlowSquid), Goat(Goat), Guardian(Guardian), HappyGhast(HappyGhast), Hoglin(Hoglin), HopperMinecart(MinecartHopper), Horse(Horse), Husk(Husk), Illusioner(Illusioner), Interaction(Interaction), IronGolem(IronGolem), Item(ItemEntity), ItemDisplay(ItemDisplay), ItemFrame(ItemFrame), JungleBoat(Boat), JungleChestBoat(ChestBoat), LeashKnot(LeashFenceKnotEntity), LightningBolt(LightningBolt), LingeringPotion(ThrownLingeringPotion), Llama(Llama), LlamaSpit(LlamaSpit), MagmaCube(MagmaCube), MangroveBoat(Boat), MangroveChestBoat(ChestBoat), Marker(Marker), Minecart(Minecart), Mooshroom(MushroomCow), Mule(Mule), OakBoat(Boat), OakChestBoat(ChestBoat), Ocelot(Ocelot), OminousItemSpawner(OminousItemSpawner), Painting(Painting), PaleOakBoat(Boat), PaleOakChestBoat(ChestBoat), Panda(Panda), Parrot(Parrot), Phantom(Phantom), Pig(Pig), Piglin(Piglin), PiglinBrute(PiglinBrute), Pillager(Pillager), PolarBear(PolarBear), Pufferfish(Pufferfish), Rabbit(Rabbit), Ravager(Ravager), Salmon(Salmon), Sheep(Sheep), Shulker(Shulker), ShulkerBullet(ShulkerBullet), Silverfish(Silverfish), Skeleton(Skeleton), SkeletonHorse(SkeletonHorse), Slime(Slime), SmallFireball(SmallFireball), Sniffer(Sniffer), SnowGolem(SnowGolem), Snowball(Snowball), SpawnerMinecart(MinecartSpawner), SpectralArrow(SpectralArrow), Spider(Spider), SplashPotion(ThrownSplashPotion), SpruceBoat(Boat), SpruceChestBoat(ChestBoat), Squid(Squid), Stray(Stray), Strider(Strider), Tadpole(Tadpole), TextDisplay(TextDisplay), Tnt(PrimedTnt), TntMinecart(MinecartTNT), TraderLlama(TraderLlama), Trident(ThrownTrident), TropicalFish(TropicalFish), Turtle(Turtle), Vex(Vex), Villager(Villager), Vindicator(Vindicator), WanderingTrader(WanderingTrader), Warden(Warden), WindCharge(WindCharge), Witch(Witch), Wither(WitherBoss), WitherSkeleton(WitherSkeleton), WitherSkull(WitherSkull), Wolf(Wolf), Zoglin(Zoglin), Zombie(Zombie), ZombieHorse(ZombieHorse), ZombieVillager(ZombieVillager), ZombifiedPiglin(ZombifiedPiglin), Other(GenericEntity),
}
Available on crate features 1.21.7 and entities and latest only.
Expand description

A typed entity for Minecraft 1.21.7.

Variants§

§

AcaciaBoat(Boat)

minecraft:acacia_boat

§

AcaciaChestBoat(ChestBoat)

minecraft:acacia_chest_boat

§

Allay(Allay)

minecraft:allay

§

AreaEffectCloud(AreaEffectCloud)

minecraft:area_effect_cloud

§

Armadillo(Armadillo)

minecraft:armadillo

§

ArmorStand(ArmorStand)

minecraft:armor_stand

§

Arrow(Arrow)

minecraft:arrow

§

Axolotl(Axolotl)

minecraft:axolotl

§

BambooChestRaft(ChestRaft)

minecraft:bamboo_chest_raft

§

BambooRaft(Raft)

minecraft:bamboo_raft

§

Bat(Bat)

minecraft:bat

§

Bee(Bee)

minecraft:bee

§

BirchBoat(Boat)

minecraft:birch_boat

§

BirchChestBoat(ChestBoat)

minecraft:birch_chest_boat

§

Blaze(Blaze)

minecraft:blaze

§

BlockDisplay(BlockDisplay)

minecraft:block_display

§

Bogged(Bogged)

minecraft:bogged

§

Breeze(Breeze)

minecraft:breeze

§

BreezeWindCharge(BreezeWindCharge)

minecraft:breeze_wind_charge

§

Camel(Camel)

minecraft:camel

§

Cat(Cat)

minecraft:cat

§

CaveSpider(CaveSpider)

minecraft:cave_spider

§

CherryBoat(Boat)

minecraft:cherry_boat

§

CherryChestBoat(ChestBoat)

minecraft:cherry_chest_boat

§

ChestMinecart(MinecartChest)

minecraft:chest_minecart

§

Chicken(Chicken)

minecraft:chicken

§

Cod(Cod)

minecraft:cod

§

CommandBlockMinecart(MinecartCommandBlock)

minecraft:command_block_minecart

§

Cow(Cow)

minecraft:cow

§

Creaking(Creaking)

minecraft:creaking

§

Creeper(Creeper)

minecraft:creeper

§

DarkOakBoat(Boat)

minecraft:dark_oak_boat

§

DarkOakChestBoat(ChestBoat)

minecraft:dark_oak_chest_boat

§

Dolphin(Dolphin)

minecraft:dolphin

§

Donkey(Donkey)

minecraft:donkey

§

DragonFireball(DragonFireball)

minecraft:dragon_fireball

§

Drowned(Drowned)

minecraft:drowned

§

Egg(ThrownEgg)

minecraft:egg

§

ElderGuardian(ElderGuardian)

minecraft:elder_guardian

§

EndCrystal(EndCrystal)

minecraft:end_crystal

§

EnderDragon(EnderDragon)

minecraft:ender_dragon

§

EnderPearl(ThrownEnderpearl)

minecraft:ender_pearl

§

Enderman(EnderMan)

minecraft:enderman

§

Endermite(Endermite)

minecraft:endermite

§

Evoker(Evoker)

minecraft:evoker

§

EvokerFangs(EvokerFangs)

minecraft:evoker_fangs

§

ExperienceBottle(ThrownExperienceBottle)

minecraft:experience_bottle

§

ExperienceOrb(ExperienceOrb)

minecraft:experience_orb

§

EyeOfEnder(EyeOfEnder)

minecraft:eye_of_ender

§

FallingBlock(FallingBlockEntity)

minecraft:falling_block

§

Fireball(LargeFireball)

minecraft:fireball

§

FireworkRocket(FireworkRocketEntity)

minecraft:firework_rocket

§

FishingBobber(FishingHook)

minecraft:fishing_bobber

§

Fox(Fox)

minecraft:fox

§

Frog(Frog)

minecraft:frog

§

FurnaceMinecart(MinecartFurnace)

minecraft:furnace_minecart

§

Ghast(Ghast)

minecraft:ghast

§

Giant(Giant)

minecraft:giant

§

GlowItemFrame(GlowItemFrame)

minecraft:glow_item_frame

§

GlowSquid(GlowSquid)

minecraft:glow_squid

§

Goat(Goat)

minecraft:goat

§

Guardian(Guardian)

minecraft:guardian

§

HappyGhast(HappyGhast)

minecraft:happy_ghast

§

Hoglin(Hoglin)

minecraft:hoglin

§

HopperMinecart(MinecartHopper)

minecraft:hopper_minecart

§

Horse(Horse)

minecraft:horse

§

Husk(Husk)

minecraft:husk

§

Illusioner(Illusioner)

minecraft:illusioner

§

Interaction(Interaction)

minecraft:interaction

§

IronGolem(IronGolem)

minecraft:iron_golem

§

Item(ItemEntity)

minecraft:item

§

ItemDisplay(ItemDisplay)

minecraft:item_display

§

ItemFrame(ItemFrame)

minecraft:item_frame

§

JungleBoat(Boat)

minecraft:jungle_boat

§

JungleChestBoat(ChestBoat)

minecraft:jungle_chest_boat

§

LeashKnot(LeashFenceKnotEntity)

minecraft:leash_knot

§

LightningBolt(LightningBolt)

minecraft:lightning_bolt

§

LingeringPotion(ThrownLingeringPotion)

minecraft:lingering_potion

§

Llama(Llama)

minecraft:llama

§

LlamaSpit(LlamaSpit)

minecraft:llama_spit

§

MagmaCube(MagmaCube)

minecraft:magma_cube

§

MangroveBoat(Boat)

minecraft:mangrove_boat

§

MangroveChestBoat(ChestBoat)

minecraft:mangrove_chest_boat

§

Marker(Marker)

minecraft:marker

§

Minecart(Minecart)

minecraft:minecart

§

Mooshroom(MushroomCow)

minecraft:mooshroom

§

Mule(Mule)

minecraft:mule

§

OakBoat(Boat)

minecraft:oak_boat

§

OakChestBoat(ChestBoat)

minecraft:oak_chest_boat

§

Ocelot(Ocelot)

minecraft:ocelot

§

OminousItemSpawner(OminousItemSpawner)

minecraft:ominous_item_spawner

§

Painting(Painting)

minecraft:painting

§

PaleOakBoat(Boat)

minecraft:pale_oak_boat

§

PaleOakChestBoat(ChestBoat)

minecraft:pale_oak_chest_boat

§

Panda(Panda)

minecraft:panda

§

Parrot(Parrot)

minecraft:parrot

§

Phantom(Phantom)

minecraft:phantom

§

Pig(Pig)

minecraft:pig

§

Piglin(Piglin)

minecraft:piglin

§

PiglinBrute(PiglinBrute)

minecraft:piglin_brute

§

Pillager(Pillager)

minecraft:pillager

§

PolarBear(PolarBear)

minecraft:polar_bear

§

Pufferfish(Pufferfish)

minecraft:pufferfish

§

Rabbit(Rabbit)

minecraft:rabbit

§

Ravager(Ravager)

minecraft:ravager

§

Salmon(Salmon)

minecraft:salmon

§

Sheep(Sheep)

minecraft:sheep

§

Shulker(Shulker)

minecraft:shulker

§

ShulkerBullet(ShulkerBullet)

minecraft:shulker_bullet

§

Silverfish(Silverfish)

minecraft:silverfish

§

Skeleton(Skeleton)

minecraft:skeleton

§

SkeletonHorse(SkeletonHorse)

minecraft:skeleton_horse

§

Slime(Slime)

minecraft:slime

§

SmallFireball(SmallFireball)

minecraft:small_fireball

§

Sniffer(Sniffer)

minecraft:sniffer

§

SnowGolem(SnowGolem)

minecraft:snow_golem

§

Snowball(Snowball)

minecraft:snowball

§

SpawnerMinecart(MinecartSpawner)

minecraft:spawner_minecart

§

SpectralArrow(SpectralArrow)

minecraft:spectral_arrow

§

Spider(Spider)

minecraft:spider

§

SplashPotion(ThrownSplashPotion)

minecraft:splash_potion

§

SpruceBoat(Boat)

minecraft:spruce_boat

§

SpruceChestBoat(ChestBoat)

minecraft:spruce_chest_boat

§

Squid(Squid)

minecraft:squid

§

Stray(Stray)

minecraft:stray

§

Strider(Strider)

minecraft:strider

§

Tadpole(Tadpole)

minecraft:tadpole

§

TextDisplay(TextDisplay)

minecraft:text_display

§

Tnt(PrimedTnt)

minecraft:tnt

§

TntMinecart(MinecartTNT)

minecraft:tnt_minecart

§

TraderLlama(TraderLlama)

minecraft:trader_llama

§

Trident(ThrownTrident)

minecraft:trident

§

TropicalFish(TropicalFish)

minecraft:tropical_fish

§

Turtle(Turtle)

minecraft:turtle

§

Vex(Vex)

minecraft:vex

§

Villager(Villager)

minecraft:villager

§

Vindicator(Vindicator)

minecraft:vindicator

§

WanderingTrader(WanderingTrader)

minecraft:wandering_trader

§

Warden(Warden)

minecraft:warden

§

WindCharge(WindCharge)

minecraft:wind_charge

§

Witch(Witch)

minecraft:witch

§

Wither(WitherBoss)

minecraft:wither

§

WitherSkeleton(WitherSkeleton)

minecraft:wither_skeleton

§

WitherSkull(WitherSkull)

minecraft:wither_skull

§

Wolf(Wolf)

minecraft:wolf

§

Zoglin(Zoglin)

minecraft:zoglin

§

Zombie(Zombie)

minecraft:zombie

§

ZombieHorse(ZombieHorse)

minecraft:zombie_horse

§

ZombieVillager(ZombieVillager)

minecraft:zombie_villager

§

ZombifiedPiglin(ZombifiedPiglin)

minecraft:zombified_piglin

§

Other(GenericEntity)

Any other unrecognized (possibly invalid) entity.

Implementations§

Source§

impl Entity

Source

pub fn as_generic(&self) -> GenericEntity

Available on crate feature serde only.

Turn this entity into a GenericEntity.

This internally allocates new strings. It is used for implementing equality, as the same entity can be represented by both a known variant and the Self::Other variant.

Trait Implementations§

Source§

impl Clone for Entity

Source§

fn clone(&self) -> Entity

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Entity

Source§

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

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

impl<'de> Deserialize<'de> for Entity

Available on crate feature serde only.
Source§

fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>
where D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for Entity

Available on crate feature serde only.
Source§

fn eq(&self, other: &Self) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for Entity

Available on crate feature serde only.
Source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Entity for Entity

Auto Trait Implementations§

§

impl Freeze for Entity

§

impl RefUnwindSafe for Entity

§

impl Send for Entity

§

impl Sync for Entity

§

impl Unpin for Entity

§

impl UnwindSafe for Entity

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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 more
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,