pub struct MinecraftEntityId(pub i32);Expand description
An entity ID used by Minecraft.
These IDs are picked by the server. Some server software (like Bungeecord) may pick entity IDs per-player, so you should avoid relying on them for identifying IDs (especially if you’re using a shared world – i.e. a swarm).
You might find Entity more useful, since that’s an ID decided by us that
is likely to be correct across shared worlds. You could also use the
EntityUuid from azalea_entity, that one is unlikely to change even
across server restarts.
This serializes as a i32. Usually it’s a VarInt in the protocol, but not
always. If you do need it to serialize as a VarInt, make sure to use use the
#[var] attribute.
Tuple Fields§
§0: i32Trait Implementations§
Source§impl AzBuf for MinecraftEntityId
impl AzBuf for MinecraftEntityId
fn azalea_read(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError>
fn azalea_write(&self, buf: &mut impl Write) -> Result<()>
Source§impl AzBufVar for MinecraftEntityId
impl AzBufVar for MinecraftEntityId
fn azalea_read_var(buf: &mut Cursor<&[u8]>) -> Result<Self, BufReadError>
fn azalea_write_var(&self, buf: &mut impl Write) -> Result<()>
Source§impl Clone for MinecraftEntityId
impl Clone for MinecraftEntityId
Source§fn clone(&self) -> MinecraftEntityId
fn clone(&self) -> MinecraftEntityId
Returns a duplicate 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 MinecraftEntityId
impl Debug for MinecraftEntityId
Source§impl Default for MinecraftEntityId
impl Default for MinecraftEntityId
Source§fn default() -> MinecraftEntityId
fn default() -> MinecraftEntityId
Returns the “default value” for a type. Read more
Source§impl Deref for MinecraftEntityId
impl Deref for MinecraftEntityId
Source§impl DerefMut for MinecraftEntityId
impl DerefMut for MinecraftEntityId
Source§impl Display for MinecraftEntityId
impl Display for MinecraftEntityId
Source§impl From<i32> for MinecraftEntityId
impl From<i32> for MinecraftEntityId
Source§impl From<u32> for MinecraftEntityId
impl From<u32> for MinecraftEntityId
Source§impl Hash for MinecraftEntityId
impl Hash for MinecraftEntityId
Source§impl PartialEq for MinecraftEntityId
impl PartialEq for MinecraftEntityId
impl Copy for MinecraftEntityId
impl Eq for MinecraftEntityId
impl IsEnabled for MinecraftEntityId
impl StructuralPartialEq for MinecraftEntityId
Auto Trait Implementations§
impl Freeze for MinecraftEntityId
impl RefUnwindSafe for MinecraftEntityId
impl Send for MinecraftEntityId
impl Sync for MinecraftEntityId
impl Unpin for MinecraftEntityId
impl UnsafeUnpin for MinecraftEntityId
impl UnwindSafe for MinecraftEntityId
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> ToCompactString for Twhere
T: Display,
impl<T> ToCompactString for Twhere
T: Display,
Source§fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
fn try_to_compact_string(&self) -> Result<CompactString, ToCompactStringError>
Fallible version of
ToCompactString::to_compact_string() Read moreSource§fn to_compact_string(&self) -> CompactString
fn to_compact_string(&self) -> CompactString
Converts the given value to a
CompactString. Read more