pub struct ClientboundAddEntity {
pub id: MinecraftEntityId,
pub uuid: Uuid,
pub entity_type: EntityKind,
pub position: Vec3,
pub x_rot: i8,
pub y_rot: i8,
pub y_head_rot: i8,
pub data: u32,
pub velocity: PositionDelta8,
}
Fields§
§id: MinecraftEntityId
The numeric ID of the entity being added to the world.
uuid: Uuid
§entity_type: EntityKind
§position: Vec3
§x_rot: i8
§y_rot: i8
§y_head_rot: i8
§data: u32
The entity’s “object data”. This is unused for most entities.
Projectiles and fishing hooks treat this as an entity ID, which you’re
encouraged to use MinecraftEntityId::from
for. Other entities may
treat it as a block state or enum variant.
See the wiki for more information about this field.
velocity: PositionDelta8
Implementations§
Source§impl ClientboundAddEntity
impl ClientboundAddEntity
Sourcepub fn as_entity_bundle(&self, world_name: ResourceLocation) -> EntityBundle
pub fn as_entity_bundle(&self, world_name: ResourceLocation) -> EntityBundle
Make the entity into a bundle that can be inserted into the ECS. You
must apply the metadata after inserting the bundle with
Self::apply_metadata
.
Sourcepub fn apply_metadata(&self, entity: &mut EntityCommands<'_>)
pub fn apply_metadata(&self, entity: &mut EntityCommands<'_>)
Apply the default metadata for the given entity.
Trait Implementations§
Source§impl AzaleaRead for ClientboundAddEntity
impl AzaleaRead for ClientboundAddEntity
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError>
Source§impl AzaleaWrite for ClientboundAddEntity
impl AzaleaWrite for ClientboundAddEntity
Source§impl Clone for ClientboundAddEntity
impl Clone for ClientboundAddEntity
Source§fn clone(&self) -> ClientboundAddEntity
fn clone(&self) -> ClientboundAddEntity
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 Debug for ClientboundAddEntity
impl Debug for ClientboundAddEntity
Source§impl Packet<ClientboundGamePacket> for ClientboundAddEntity
impl Packet<ClientboundGamePacket> for ClientboundAddEntity
fn into_variant(self) -> ClientboundGamePacket
Auto Trait Implementations§
impl Freeze for ClientboundAddEntity
impl RefUnwindSafe for ClientboundAddEntity
impl Send for ClientboundAddEntity
impl Sync for ClientboundAddEntity
impl Unpin for ClientboundAddEntity
impl UnwindSafe for ClientboundAddEntity
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§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.