pub enum CombatEvent {
Enter,
End(CombatEndSpec),
EntityDead(CombatEntityDeadSpec),
}
Variants§
Implementations§
Source§impl CombatEvent
impl CombatEvent
pub const fn variant_count() -> usize
pub fn deserialize_with_id<'a>( id: VarInt, data: &'a [u8], ) -> DeserializeResult<'a, Self>
pub fn name(&self) -> &str
pub fn id(&self) -> VarInt
pub fn serialize_body<S: Serializer>(&self, to: &mut S) -> SerializeResult
Trait Implementations§
Source§impl Clone for CombatEvent
impl Clone for CombatEvent
Source§fn clone(&self) -> CombatEvent
fn clone(&self) -> CombatEvent
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 CombatEvent
impl Debug for CombatEvent
Source§impl Deserialize for CombatEvent
impl Deserialize for CombatEvent
fn mc_deserialize(data: &[u8]) -> DeserializeResult<'_, Self>
Source§impl From<CombatEvent> for PlayCombatEventSpec
impl From<CombatEvent> for PlayCombatEventSpec
Source§fn from(other: CombatEvent) -> Self
fn from(other: CombatEvent) -> Self
Converts to this type from the input type.
Source§impl From<PlayCombatEventSpec> for CombatEvent
impl From<PlayCombatEventSpec> for CombatEvent
Source§fn from(other: PlayCombatEventSpec) -> Self
fn from(other: PlayCombatEventSpec) -> Self
Converts to this type from the input type.
Source§impl PartialEq for CombatEvent
impl PartialEq for CombatEvent
Source§impl Serialize for CombatEvent
impl Serialize for CombatEvent
fn mc_serialize<S: Serializer>(&self, to: &mut S) -> SerializeResult
impl StructuralPartialEq for CombatEvent
Auto Trait Implementations§
impl Freeze for CombatEvent
impl RefUnwindSafe for CombatEvent
impl Send for CombatEvent
impl Sync for CombatEvent
impl Unpin for CombatEvent
impl UnwindSafe for CombatEvent
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