Available Triggers
Below is the comprehensive list of available trigger types. Each trigger includes a description, its properties with explanations, and an example usage in Kotlin.
allayDropItemOnBlock
Description:
Triggers when an allay drops an item on a block.
Properties:
location
: The location where the item is dropped.
Example:
anyBlockUse
Description:
Triggers when a player uses any block.
Properties:
None.
Example:
avoidVibrations
Description:
Triggers when a player avoids vibrations.
Properties:
location
: The location where vibrations are avoided.
Example:
beeNestDestroyed
Description:
Triggers when a bee nest is destroyed.
Properties:
block
: The type of block that was destroyed.item
: The item involved in the destruction.numBeesInside
: The number of bees that were inside the nest.
Example:
bredAnimals
Description:
Triggers when animals are bred.
Properties:
child
: The child animal resulting from the breeding.parent
: One of the parent animals.partner
: The other parent animal.
Example:
changedDimension
Description:
Triggers when a player changes dimension.
Properties:
from
: The original dimension.to
: The new dimension.
Example:
channeledLightning
Description:
Triggers when lightning is channeled.
Properties:
victims
: A list of entities affected by the lightning.
Example:
constructBeacon
Description:
Triggers when a beacon is constructed.
Properties:
level
: The level of the beacon.
Example:
consumeItem
Description:
Triggers when an item is consumed.
Properties:
item
: The item that was consumed.
Example:
crafterRecipeCrafted
Description:
Triggers when a recipe is crafted.
Properties:
recipeId
: The ID of the crafted recipe.ingredients
: The ingredients used in the recipe.
Example:
curedZombieVillager
Description:
Triggers when a zombie villager is cured.
Properties:
villager
: The villager involved in the curing.zombie
: The zombie involved in the curing.
Example:
defaultBlockUse
Description:
Triggers when a block is used with default interaction.
Properties:
None.
Example:
effectsChanged
Description:
Triggers when a player's effects change.
Properties:
effects
: The effects that have changed.source
: The source of the effect changes.
Example:
enchantedItem
Description:
Triggers when an item is enchanted.
Properties:
item
: The item that was enchanted.levels
: The levels of enchantment applied.
Example:
enterBlock
Description:
Triggers when a player enters a specific block.
Properties:
block
: The block being entered.states
: The state properties of the block.
Example:
entityHurtPlayer
Description:
Triggers when an entity hurts a player.
Properties:
damage
: Details about the damage inflicted.
Example:
entityKilledPlayer
Description:
Triggers when an entity kills a player.
Properties:
entity
: The entity that killed the player.killingBlow
: Details about the killing blow.
Example: Not provided in the original examples.
fallAfterExplosion
Description:
Triggers after falling from an explosion.
Properties:
startPosition
: The starting position of the fall.distance
: The distance fallen.cause
: The cause of the fall.
Example:
fallFromHeight
Description:
Triggers when falling from a height.
Properties:
startPosition
: The starting position of the fall.distance
: The distance fallen.
Example:
filledBucket
Description:
Triggers when a bucket is filled.
Properties:
item
: The bucket item that was filled.
Example:
fishingRodHooked
Description:
Triggers when a fishing rod hooks something.
Properties:
entity
: The entity hooked by the fishing rod.item
: The item used as the fishing rod.rod
: Details about the fishing rod.
Example:
heroOfTheVillage
Description:
Triggers when becoming a hero of the village.
Properties:
None.
Example:
impossible
Description:
Prevents the advancement from being achieved. Useful for creating advancements that should only trigger functions.
Properties:
None.
Example:
inventoryChanged
Description:
Triggers when inventory contents change.
Properties:
items
: The items involved in the inventory change.slots
: The inventory slots affected.
Example:
itemDurabilityChanged
Description:
Triggers when item durability changes.
Properties:
delta
: The change in durability.durability
: The current durability of the item.item
: The item whose durability changed.
Example:
itemUsedOnBlock
Description:
Triggers when an item is used on a block.
Properties:
location
: The location where the item was used.
Example:
killedByArrow
Description:
Triggers when killed by a crossbow.
Properties:
firedFromWeapon
: The weapon used to fire the arrow.uniqueEntityTypes
: The number of unique entity types involved.victims
: The entities that were killed.
Example:
killMobNearSculkCatalyst
Description:
Triggers when a mob is killed near a sculk catalyst.
Properties:
entity
: The entity that was killed.killingBlow
: Details about the killing blow.
Example:
levitation
Description:
Triggers during levitation.
Properties:
distance
: The distance of levitation.duration
: The duration of levitation.
Example:
lightningStrike
Description:
Triggers on a lightning strike.
Properties:
bystander
: The bystanders affected by the lightning.lightning
: Details about the lightning strike.
Example:
location
Description:
Triggers every second based on location conditions.
Properties:
location
: The specific location conditions for the trigger.
Example:
netherTravel
Description:
Triggers when a player enters or exits the Nether.
Properties:
distance
: The distance traveled during the dimension change.startPosition
: The starting position before the change.
Example:
placedBlock
Description:
Triggers when a block is placed.
Properties:
location
: The location where the block was placed.
Example:
playerGeneratesContainerLoot
Description:
Triggers when container loot is generated.
Properties:
lootTable
: The loot table used to generate the container loot.
Example:
playerHurtEntity
Description:
Triggers when a player hurts an entity.
Properties:
damage
: Details about the damage inflicted.entity
: The entity that was hurt.
Example:
playerKilledEntity
Description:
Triggers when a player kills an entity.
Properties:
entity
: The entity that was killed.killingBlow
: Details about the killing blow.
Example:
recipeCrafted
Description:
Triggers when a recipe is crafted.
Properties:
recipeId
: The ID of the crafted recipe.ingredients
: The ingredients used in the recipe.
Example:
recipeUnlocked
Description:
Triggers when a recipe is unlocked.
Properties:
recipe
: The recipe that was unlocked.
Example:
rideEntityInLava
Description:
Triggers when riding an entity in lava.
Properties:
distance
: The distance traveled while riding in lava.startPosition
: The starting position before riding.
Example:
shotCrossbow
Description:
Triggers when shooting a crossbow.
Properties:
item
: The crossbow item that was shot.
Example:
sleptInBed
Description:
Triggers when a player sleeps in a bed.
Properties:
None.
Example:
slideDownBlock
Description:
Triggers when sliding down a block.
Properties:
block
: The block being slid down.
Example:
startedRiding
Description:
Triggers when a player starts riding an entity.
Properties:
None.
Example:
summonedEntity
Description:
Triggers when an entity is summoned.
Properties:
entity
: The entity that was summoned.
Example:
tameAnimal
Description:
Triggers when an animal is tamed.
Properties:
entity
: The animal that was tamed.
Example:
targetHit
Description:
Triggers when a target block is hit.
Properties:
signalStrength
: The strength of the signal when the target is hit.projectile
: The projectile used to hit the target.
Example:
thrownItemPickedUpByEntity
Description:
Triggers when a thrown item is picked up by an entity.
Properties:
entity
: The entity that picked up the item.item
: The item that was picked up.
Example:
thrownItemPickedUpByPlayer
Description:
Triggers when a thrown item is picked up by a player.
Properties:
entity
: The entity that picked up the item.item
: The item that was picked up.
Example:
tick
Description:
Triggers every tick (20 times per second).
Properties:
conditions
: Conditions that must be met for the trigger to activate.
Example:
usedEnderEye
Description:
Triggers when an ender eye is used.
Properties:
distance
: The distance traveled using the ender eye.
Example:
usedTotem
Description:
Triggers when a totem is used.
Properties:
item
: The totem item that was used.
Example:
usingItem
Description:
Triggers while using an item.
Properties:
item
: The item being used.
Example:
villagerTrade
Description:
Triggers when a villager trades.
Properties:
item
: The item involved in the trade.villager
: The villager involved in the trade.
Example:
voluntaryExile
Description:
Triggers when a player causes a raid in a village.
Properties:
location
: The location where the raid occurred.
Example:
Each trigger example demonstrates the basic usage with common properties and conditions. You can customize these triggers by adding more conditions and requirements to suit your specific advancement needs.