Developers

Game events

65 events and what they hold, for goals made from anything the game tells add-ons.

The Any game event and Any player state goals (game_event and player_state, BedrockAdvancements 2.0.14) can make a goal from anything Minecraft tells add-ons, so goals no other trigger covers don't have to wait for a new version. This page lists every event and what it holds.

Checks

Each check is one line: what, a test and a value. What is a path into the event (or, for a player state, the player): names joined with dots, like damageSource.cause or target.location.y. All of a goal's checks must pass.

TestPasses whenExample
isits id is one of these (ids, #tags, family:s, separated by commas)target is villager_v2, wandering_trader
notits id is none of them, or there's nothing theredamageSource.damagingEntity not family:undead
= !=equal, or not: a number, true/false, or text (capitals and minecraft: don't matter)damageSource.cause = fall
< <= > >=compares numbersdamage >= 10
exists missingthere is something there, or there isn'titemStack exists

Besides the names below, a path can take component:id (a mob's or item's component, e.g. target.component:variant.value for a villager's job, component:health.currentValue), property:id, tag:name (true or false), state:name (a block state: block.state:age) and effect:id (effect:speed.amplifier). Reading a path never changes anything in the game.

Who earns it

Usually the player in the event (player, or source, entity or damageSource.damagingEntity when that's a player). When it's somewhere else, say where in Who earns it: hurtEntity for the one hurt in entityHurt. When the event is about a mob or a block, Or the nearest player within gives it to the nearest player instead: entitySpawn with entity and 16 blocks is whoever is close when a mob is born.

Examples

{ "trigger": "game_event", "event": "entityHurt", "player": "hurtEntity", "where": ["damageSource.cause = fall", "damage >= 10"] }
{ "trigger": "game_event", "event": "playerInteractWithEntity", "where": ["target is villager_v2", "target.component:variant.value = 9"] }
{ "trigger": "game_event", "event": "entitySpawn", "player": "entity", "radius": 16, "where": ["entity is villager_v2", "cause = Born"] }
{ "trigger": "player_state", "where": ["isSneaking = true", "location.y < 0"] }

The creator checks every path against this list as you type, and warns about anything Minecraft's events don't have. An event that a later Minecraft adds works as soon as the game has it, even before this list does.

Events

blockContainerClosed

PathWhat it is
blockBlock
dimensionDimension
closeSourceContainerAccessSource

blockContainerOpened

PathWhat it is
blockBlock
dimensionDimension
openSourceContainerAccessSource

blockExplode

PathWhat it is
blockBlock
dimensionDimension
explodedBlockPermutationBlockPermutation
sourceEntity (may be missing)

buttonPush

PathWhat it is
blockBlock
dimensionDimension
sourceEntity

dataDrivenEntityTrigger

PathWhat it is
entityEntity
eventIdstring

effectAdd

PathWhat it is
effectEffect
entityEntity

entityContainerClosed

PathWhat it is
closeSourceContainerAccessSource
entityEntity

entityContainerOpened

PathWhat it is
entityEntity
openSourceContainerAccessSource

entityDie

PathWhat it is
damageSourceEntityDamageSource
deadEntityEntity

entityHeal

PathWhat it is
healedEntityEntity
healingnumber
healSourceEntityHealSource

entityHealthChanged

PathWhat it is
entityEntity
newValuenumber
oldValuenumber

entityHitBlock

PathWhat it is
blockFaceDirection: Down East North South Up West
damagingEntityEntity
hitBlockBlock
hitBlockPermutationBlockPermutation

entityHitEntity

PathWhat it is
damagingEntityEntity
hitEntityEntity

entityHurt

PathWhat it is
damagenumber
damageSourceEntityDamageSource
hurtEntityEntity

entityItemDrop

PathWhat it is
entityEntity
itemslist of Entity (.0, .1...)

entityItemPickup

PathWhat it is
entityEntity
itemslist of ItemStack (.0, .1...)

entityLoad

PathWhat it is
entityEntity

entityRemove

PathWhat it is
removedEntityIdstring
typeIdstring

entitySpawn

PathWhat it is
causeEntityInitializationCause: Born Event Loaded Spawned Transformed
entityEntity

entityStartSneaking

PathWhat it is
entityEntity

entityStopSneaking

PathWhat it is
entityEntity

entityTamed

PathWhat it is
entityEntity
tamingEntityEntity

entityUpgrade

PathWhat it is
entityEntity
upgradeIdstring

explosion

PathWhat it is
dimensionDimension
sourceEntity (may be missing)

gameRuleChange

PathWhat it is
ruleGameRule: commandBlockOutput commandBlocksEnabled doDayLightCycle doEntityDrops doFireTick doImmediateRespawn doInsomnia doLimitedCrafting doMobLoot doMobSpawning doTileDrops doWeatherCycle drowningDamage fallDamage fireDamage freezeDamage functionCommandLimit keepInventory maxCommandChainLength mobGriefing naturalRegeneration playersSleepingPercentage projectilesCanBreakBlocks pvp randomTickSpeed recipesUnlock respawnBlocksExplode sendCommandFeedback showBorderEffect showCoordinates showDaysPlayed showDeathMessages showRecipeMessages showTags spawnRadius tntExplodes tntExplosionDropDecay
valuevariant

itemCompleteUse

PathWhat it is
itemStackItemStack
sourcePlayer
useDurationnumber

itemReleaseUse

PathWhat it is
itemStackItemStack (may be missing)
sourcePlayer
useDurationnumber

itemStartUse

PathWhat it is
itemStackItemStack
sourcePlayer
useDurationnumber

itemStartUseOn

PathWhat it is
blockBlock
blockFaceDirection: Down East North South Up West
itemStackItemStack (may be missing)
sourcePlayer

itemStopUse

PathWhat it is
itemStackItemStack (may be missing)
sourcePlayer
useDurationnumber

itemStopUseOn

PathWhat it is
blockBlock
itemStackItemStack (may be missing)
sourcePlayer

itemUse

PathWhat it is
itemStackItemStack
sourcePlayer

leverAction

PathWhat it is
blockBlock
dimensionDimension
isPoweredboolean
playerPlayer

pistonActivate

PathWhat it is
blockBlock
dimensionDimension
isExpandingboolean
pistonBlockPistonComponent

playerBreakBlock

PathWhat it is
blockBlock
dimensionDimension
brokenBlockPermutationBlockPermutation
itemStackAfterBreakItemStack (may be missing)
itemStackBeforeBreakItemStack (may be missing)
playerPlayer

playerButtonInput

PathWhat it is
buttonInputButton: Jump Sneak
newButtonStateButtonState: Pressed Released
playerPlayer

playerCancelBreakingBlock

PathWhat it is
blockBlock
dimensionDimension
blockPermutationBlockPermutation
breakProgressnumber
faceDirection: Down East North South Up West
heldItemStackItemStack (may be missing)
playerPlayer

playerDimensionChange

PathWhat it is
fromDimensionDimension
fromLocationVector3
playerPlayer
toDimensionDimension
toLocationVector3

playerEmote

PathWhat it is
personaPieceIdstring
playerPlayer

playerGameModeChange

PathWhat it is
fromGameModeGameMode: Adventure Creative Spectator Survival
playerPlayer
toGameModeGameMode: Adventure Creative Spectator Survival

playerHotbarSelectedSlotChange

PathWhat it is
itemStackItemStack (may be missing)
newSlotSelectednumber
playerPlayer
previousSlotSelectednumber

playerInputModeChange

PathWhat it is
newInputModeUsedInputMode: Gamepad KeyboardAndMouse MotionController Touch
playerPlayer
previousInputModeUsedInputMode: Gamepad KeyboardAndMouse MotionController Touch

playerInputPermissionCategoryChange

PathWhat it is
categoryInputPermissionCategory: 1 8 6 4 7 10 9 11 2 12 5
enabledboolean
playerPlayer

playerInteractWithBlock

PathWhat it is
beforeItemStackItemStack (may be missing)
blockBlock
blockFaceDirection: Down East North South Up West
faceLocationVector3
isFirstEventboolean
itemStackItemStack (may be missing)
playerPlayer

playerInteractWithEntity

PathWhat it is
beforeItemStackItemStack (may be missing)
itemStackItemStack (may be missing)
playerPlayer
targetEntity

playerInventoryItemChange

PathWhat it is
beforeItemStackItemStack (may be missing)
inventoryTypePlayerInventoryType: Hotbar Inventory
itemStackItemStack (may be missing)
playerPlayer
slotnumber

playerJoin

PathWhat it is
playerIdstring
playerNamestring

playerLeave

PathWhat it is
playerIdstring
playerNamestring

playerPlaceBlock

PathWhat it is
blockBlock
dimensionDimension
playerPlayer

playerSpawn

PathWhat it is
initialSpawnboolean
playerPlayer

playerStartBreakingBlock

PathWhat it is
blockBlock
dimensionDimension
blockPermutationBlockPermutation
faceDirection: Down East North South Up West
heldItemStackItemStack (may be missing)
playerPlayer

playerSwingStart

PathWhat it is
heldItemStackItemStack (may be missing)
playerPlayer
swingSourceEntitySwingSource: Attack Build DropItem Event Interact Mine None ThrowItem UseItem

pressurePlatePop

PathWhat it is
blockBlock
dimensionDimension
previousRedstonePowernumber
redstonePowernumber

pressurePlatePush

PathWhat it is
blockBlock
dimensionDimension
previousRedstonePowernumber
redstonePowernumber
sourceEntity

projectileHitBlock

PathWhat it is
dimensionDimension
hitVectorVector3
locationVector3
projectileEntity
sourceEntity (may be missing)

projectileHitEntity

PathWhat it is
dimensionDimension
hitVectorVector3
locationVector3
projectileEntity
sourceEntity (may be missing)

soundCompleted

PathWhat it is
soundInstanceIdstring

targetBlockHit

PathWhat it is
blockBlock
dimensionDimension
hitVectorVector3
previousRedstonePowernumber
redstonePowernumber
sourceEntity

tripWireTrip

PathWhat it is
blockBlock
dimensionDimension
isPoweredboolean
sourceslist of Entity (.0, .1...)

weatherChange

PathWhat it is
dimensionstring
newWeatherWeatherType: Clear Rain Thunder
previousWeatherWeatherType: Clear Rain Thunder

worldClockOnPaused

PathWhat it is
clockWorldClock

worldClockOnResumed

PathWhat it is
clockWorldClock

worldClockOnTimeMarker

PathWhat it is
clockWorldClock
timeMarkerTimeMarker

worldClockOnTimeModified

PathWhat it is
clockWorldClock

worldLoad

PathWhat it is

What they hold

The things events lead to, and what a path can read from each. A player is an entity too, so it has everything listed for Entity as well.

Block

PathWhat it is
dimensionDimension
isAirboolean
isLiquidboolean
isValidboolean
isWaterloggedboolean
localizationKeystring
locationVector3
permutationBlockPermutation
typeBlockType
typeIdstring
xnumber
ynumber
znumber

BlockPermutation

PathWhat it is
localizationKeystring
typeBlockType

BlockPistonComponent

PathWhat it is
isValidboolean
typeIdstring
blockBlock
isMovingboolean
stateBlockPistonState: Expanded Expanding Retracted Retracting

BlockType

PathWhat it is
idstring
localizationKeystring

ContainerAccessSource

PathWhat it is
entityEntity (may be missing)

Effect

PathWhat it is
amplifiernumber
displayNamestring
durationnumber
isValidboolean
typeIdstring

Entity

PathWhat it is
dimensionDimension
idstring
isClimbingboolean
isFallingboolean
isInWaterboolean
isOnGroundboolean
isSleepingboolean
isSneakingboolean
isSprintingboolean
isSwimmingboolean
isValidboolean
localizationKeystring
locationVector3
nameplateDepthTestedboolean
nameplateRenderDistancenumber
nameTagstring
scoreboardIdentityScoreboardIdentity (may be missing)
typeIdstring

EntityDamageSource

PathWhat it is
causeEntityDamageCause: anvil blockExplosion campfire charging contact drowning entityAttack entityExplosion fall fallingBlock fire fireTick fireworks flyIntoWall freezing lava lightning maceSmash magic magma none override piston projectile ramAttack selfDestruct sonicBoom soulCampfire stalactite stalagmite starve suffocation temperature thorns void wither
damagingEntityEntity (may be missing)
damagingProjectileEntity (may be missing)

EntityHealSource

PathWhat it is
causeEntityHealCause: Heal Regeneration SelfHeal TotemOfUndying

ItemStack

PathWhat it is
amountnumber
isStackableboolean
keepOnDeathboolean
localizationKeystring
lockModeItemLockMode: inventory none slot
maxAmountnumber
nameTagstring (may be missing)
typeItemType
typeIdstring
weightnumber

ItemType

PathWhat it is
idstring
localizationKeystring

Player

PathWhat it is
dimensionDimension
idstring
isClimbingboolean
isFallingboolean
isInWaterboolean
isOnGroundboolean
isSleepingboolean
isSneakingboolean
isSprintingboolean
isSwimmingboolean
isValidboolean
localizationKeystring
locationVector3
nameplateDepthTestedboolean
nameplateRenderDistancenumber
nameTagstring
scoreboardIdentityScoreboardIdentity (may be missing)
typeIdstring
cameraCamera
clientSystemInfoClientSystemInfo
commandPermissionLevelCommandPermissionLevel: 2 0 1 3 4
fogSettingsFogSettings
graphicsModeGraphicsMode: Deferred Fancy RayTraced Simple
inputInfoInputInfo
inputPermissionsPlayerInputPermissions
isEmotingboolean
isFlyingboolean
isGlidingboolean
isJumpingboolean
levelnumber
locatorBarLocatorBar
namestring
onScreenDisplayScreenDisplay
playerPermissionLevelPlayerPermissionLevel: 3 1 2 0
selectedSlotIndexnumber
totalXpNeededForNextLevelnumber
xpEarnedAtCurrentLevelnumber

TimeMarker

PathWhat it is
namestring
periodnumber (may be missing)
timenumber

Vector3

PathWhat it is
xnumber
ynumber
znumber

WorldClock

PathWhat it is
isPausedboolean
namestring
timenumber
timeMarkerslist of TimeMarker (.0, .1...)

From Minecraft's Script API metadata, @minecraft/server 2.11.0.