#[repr(u32)]pub enum TriggerKind {
Show 56 variants
Impossible = 0,
PlayerKilledEntity = 1,
EntityKilledPlayer = 2,
EnterBlock = 3,
InventoryChanged = 4,
RecipeUnlocked = 5,
PlayerHurtEntity = 6,
EntityHurtPlayer = 7,
EnchantedItem = 8,
FilledBucket = 9,
BrewedPotion = 10,
ConstructBeacon = 11,
UsedEnderEye = 12,
SummonedEntity = 13,
BredAnimals = 14,
Location = 15,
SleptInBed = 16,
CuredZombieVillager = 17,
VillagerTrade = 18,
ItemDurabilityChanged = 19,
Levitation = 20,
ChangedDimension = 21,
Tick = 22,
TameAnimal = 23,
PlacedBlock = 24,
ConsumeItem = 25,
EffectsChanged = 26,
UsedTotem = 27,
NetherTravel = 28,
FishingRodHooked = 29,
ChanneledLightning = 30,
ShotCrossbow = 31,
KilledByArrow = 32,
HeroOfTheVillage = 33,
VoluntaryExile = 34,
SlideDownBlock = 35,
BeeNestDestroyed = 36,
TargetHit = 37,
ItemUsedOnBlock = 38,
DefaultBlockUse = 39,
AnyBlockUse = 40,
PlayerGeneratesContainerLoot = 41,
ThrownItemPickedUpByEntity = 42,
ThrownItemPickedUpByPlayer = 43,
PlayerInteractedWithEntity = 44,
StartedRiding = 45,
LightningStrike = 46,
UsingItem = 47,
FallFromHeight = 48,
RideEntityInLava = 49,
KillMobNearSculkCatalyst = 50,
AllayDropItemOnBlock = 51,
AvoidVibration = 52,
RecipeCrafted = 53,
CrafterRecipeCrafted = 54,
FallAfterExplosion = 55,
}
Variants§
Impossible = 0
PlayerKilledEntity = 1
EntityKilledPlayer = 2
EnterBlock = 3
InventoryChanged = 4
RecipeUnlocked = 5
PlayerHurtEntity = 6
EntityHurtPlayer = 7
EnchantedItem = 8
FilledBucket = 9
BrewedPotion = 10
ConstructBeacon = 11
UsedEnderEye = 12
SummonedEntity = 13
BredAnimals = 14
Location = 15
SleptInBed = 16
CuredZombieVillager = 17
VillagerTrade = 18
ItemDurabilityChanged = 19
Levitation = 20
ChangedDimension = 21
Tick = 22
TameAnimal = 23
PlacedBlock = 24
ConsumeItem = 25
EffectsChanged = 26
UsedTotem = 27
NetherTravel = 28
FishingRodHooked = 29
ChanneledLightning = 30
ShotCrossbow = 31
KilledByArrow = 32
HeroOfTheVillage = 33
VoluntaryExile = 34
SlideDownBlock = 35
BeeNestDestroyed = 36
TargetHit = 37
ItemUsedOnBlock = 38
DefaultBlockUse = 39
AnyBlockUse = 40
PlayerGeneratesContainerLoot = 41
ThrownItemPickedUpByEntity = 42
ThrownItemPickedUpByPlayer = 43
PlayerInteractedWithEntity = 44
StartedRiding = 45
LightningStrike = 46
UsingItem = 47
FallFromHeight = 48
RideEntityInLava = 49
KillMobNearSculkCatalyst = 50
AllayDropItemOnBlock = 51
AvoidVibration = 52
RecipeCrafted = 53
CrafterRecipeCrafted = 54
FallAfterExplosion = 55
Implementations§
Source§impl TriggerKind
impl TriggerKind
pub fn read_from_id( buf: &mut Cursor<&[u8]>, id: u32, ) -> Result<Self, BufReadError>
Source§impl TriggerKind
impl TriggerKind
Sourcepub unsafe fn from_u32_unchecked(id: u32) -> Self
pub unsafe fn from_u32_unchecked(id: u32) -> Self
pub fn is_valid_id(id: u32) -> bool
Trait Implementations§
Source§impl Clone for TriggerKind
impl Clone for TriggerKind
Source§fn clone(&self) -> TriggerKind
fn clone(&self) -> TriggerKind
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 TriggerKind
impl Debug for TriggerKind
Source§impl<'de> Deserialize<'de> for TriggerKind
impl<'de> Deserialize<'de> for TriggerKind
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 Display for TriggerKind
impl Display for TriggerKind
Source§impl FromNbtTag for TriggerKind
impl FromNbtTag for TriggerKind
fn from_nbt_tag(tag: NbtTag<'_, '_>) -> Option<Self>
fn from_optional_nbt_tag( tag: Option<NbtTag<'_, '_>>, ) -> Result<Option<Self>, DeserializeError>
Source§impl FromStr for TriggerKind
impl FromStr for TriggerKind
Source§impl Hash for TriggerKind
impl Hash for TriggerKind
Source§impl McBufReadable for TriggerKind
impl McBufReadable for TriggerKind
Source§impl McBufWritable for TriggerKind
impl McBufWritable for TriggerKind
Source§impl PartialEq for TriggerKind
impl PartialEq for TriggerKind
Source§impl Registry for TriggerKind
impl Registry for TriggerKind
Source§impl Serialize for TriggerKind
impl Serialize for TriggerKind
Source§impl ToNbtTag for TriggerKind
impl ToNbtTag for TriggerKind
fn to_nbt_tag(self) -> NbtTag
fn to_optional_nbt_tag(self) -> Option<NbtTag>
Source§impl TryFrom<u32> for TriggerKind
impl TryFrom<u32> for TriggerKind
impl Copy for TriggerKind
impl Eq for TriggerKind
impl StructuralPartialEq for TriggerKind
Auto Trait Implementations§
impl Freeze for TriggerKind
impl RefUnwindSafe for TriggerKind
impl Send for TriggerKind
impl Sync for TriggerKind
impl Unpin for TriggerKind
impl UnwindSafe for TriggerKind
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§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)