ItemsAdderAdditionsItemsAdderAdditions
Advancements

Player Predicates

Add player-state requirements to custom advancement criteria.

Since v1.0.9

Player predicates let you add extra requirements to a criterion beyond the trigger itself. Put them under conditions.player. The trigger must fire first, then the player predicate is checked immediately before the criterion is awarded.

criteria:
  sneaky_sleep:
    trigger: slept_in_bed
    conditions:
      player:
        flags:
          is_sneaking: true

conditions.player works with runtime triggers. The impossible trigger ignores player predicates because it can only be awarded manually.

Object and list formats

Use a single object when you only need one predicate. All keys inside the object must match.

conditions:
  player:
    type: minecraft:player
    flags:
      is_sneaking: true
    type_specific:
      type: minecraft:player
      gamemode: survival

You can also use a list. Every entry in the list must match. This is useful if you prefer vanilla-style predicate wrappers.

conditions:
  player:
    - condition: minecraft:entity_properties
      predicate:
        flags:
          is_sneaking: true
    - condition: minecraft:entity_properties
      predicate:
        type_specific:
          type: minecraft:player
          gamemode: survival

Range syntax

Numeric values accept either an exact number or a min/max object.

level: 10

level:
  min: 10
  max: 30

This syntax is used by player level, food level, movement speed, potion duration, enchantment level, item count, durability, light level, and other numeric checks.

Common player checks

conditions:
  player:
    flags:
      is_sneaking: true
      is_sprinting: false
    type_specific:
      type: minecraft:player
      gamemode: adventure
      level:
        min: 10
      food:
        level:
          min: 16
        saturation:
          min: 4.0
KeyTypeDescription
flags.is_babybooleanMatch baby/adult state when the entity supports it.
flags.is_on_firebooleanRequire the player to be on fire or not on fire.
flags.is_sneakingbooleanRequire sneaking state.
flags.is_sprintingbooleanRequire sprinting state.
flags.is_swimmingbooleanRequire swimming state.
flags.is_on_groundbooleanRequire on-ground state.
flags.is_flyingbooleanMatches creative flight or gliding.
flags.is_fall_flyingbooleanRequire elytra gliding state.
type_specific.gamemodestring or listMatch one or more gamemodes: survival, creative, adventure, or spectator.
type_specific.levelnumber or rangeMatch the player's XP level.
type_specific.food.levelnumber or rangeMatch food level.
type_specific.food.saturationnumber or rangeMatch saturation.

gamemode, level, food, advancements, recipes, stats, input, and looking_at can also be placed directly inside player, but type_specific is clearer and closer to vanilla predicate structure.

Input checks

Input predicates can check the player's current movement inputs when the server exposes that information. sneak and sprint fall back to Bukkit's player state when direct input data is unavailable.

conditions:
  player:
    type_specific:
      type: minecraft:player
      input:
        forward: true
        jump: true
        sneak: false
        sprint: true
KeyTypeDescription
input.forwardbooleanRequire the forward key state.
input.backwardbooleanRequire the backward key state.
input.leftbooleanRequire the left key state.
input.rightbooleanRequire the right key state.
input.jumpbooleanRequire the jump key state.
input.sneakbooleanRequire sneak input or sneaking state.
input.sprintbooleanRequire sprint input or sprinting state.

Location checks

conditions:
  player:
    location:
      dimension: minecraft:overworld
      world: world
      biomes:
        - minecraft:plains
        - minecraft:forest
      position:
        x:
          min: 100
          max: 200
        y:
          min: 60
        z: 0
      block:
        blocks: minecraft:grass_block
      light:
        min: 8
      can_see_sky: true
KeyTypeDescription
location.dimension / dimensionsstring or listMatch the world environment, such as minecraft:overworld, minecraft:the_nether, or minecraft:the_end.
location.worldstringMatch the Bukkit world name.
location.biome / biomesstring or listMatch biome keys.
location.position.xnumber or rangeMatch X coordinate.
location.position.ynumber or rangeMatch Y coordinate.
location.position.znumber or rangeMatch Z coordinate.
location.blockblock predicateMatch the block at the location.
location.lightnumber or rangeMatch block light level.
location.can_see_skybooleanRequire sky visibility.

location.structure and location.structures are not supported. If you configure them, the predicate will not match.

Block predicates

Block predicates are used by location.block, stepping_on, and movement_affected_by.

conditions:
  player:
    stepping_on:
      block:
        blocks: minecraft:stone
        state:
          axis: y
KeyTypeDescription
blockstring or sectionShorthand for a single block, or a full block predicate section.
blocks / idstring or listBlock IDs to match.
state.<name>string or rangeMatch a block-state value exactly, or with min/max.

ItemsAdderAdditions custom block tags are resolved first. If no custom tag exists, block tag syntax such as #minecraft:logs is resolved against vanilla block tags. Vanilla tags match vanilla blocks only.

Item and equipment predicates

Item predicates can be used in equipment, slots, and nested entity predicates. They accept ItemsAdder IDs, MMOItems IDs, vanilla item IDs, and vanilla item tags such as #minecraft:planks. See IDs.

conditions:
  player:
    equipment:
      mainhand:
        items: my_pack:ruby_sword
        count: 1
        durability:
          min: 100
        components:
          minecraft:custom_model_data: 123
        enchantments:
          - enchantment: minecraft:sharpness
            levels:
              min: 3
KeyTypeDescription
item / itemsstring or listItem IDs to match. A plain string can be used as shorthand for one item.
countnumber or rangeMatch stack amount.
durabilitynumber or rangeMatch remaining durability.
components.minecraft:custom_model_dataintegerMatch custom model data.
components.minecraft:custom_namestringMatch the item's display name.
components.minecraft:damageintegerMatch item damage.
enchantments[].enchantment / idstringEnchantment key.
enchantments[].levelsnumber or rangeRequired enchantment level.

ItemsAdderAdditions custom item tags are resolved first. If no custom tag exists, vanilla item tags are resolved against the vanilla item registry. Item predicates sections are still unsupported and make the item predicate fail closed instead of matching accidentally.

Slots

Use slots when you need to check the player's inventory instead of only equipped items.

conditions:
  player:
    slots:
      weapon.mainhand:
        items: minecraft:diamond_sword
      inventory.0:
        items: minecraft:apple
        count: 2
      hotbar.2:
        items: my_pack:ruby_staff
Slot keyDescription
mainhand or weapon.mainhandMain hand item.
offhand or weapon.offhandOff-hand item.
head or armor.headHelmet slot.
chest or armor.chestChestplate slot.
legs or armor.legsLeggings slot.
feet or armor.feetBoots slot.
*, inventory.*, container.*Any player inventory slot.
hotbar.<slot>Hotbar slot, from 0 to 8.
inventory.<slot> or inventory.<start>-<end>Main inventory slots, offset after the hotbar.
container.<slot> or container.<start>-<end>Raw container slot numbers.

Potion effects

conditions:
  player:
    effects:
      minecraft:speed:
        amplifier:
          min: 1
        duration:
          min: 100
        ambient: false
        visible: true
KeyTypeDescription
effects.<effect>.amplifiernumber or rangeMatch potion amplifier.
effects.<effect>.durationnumber or rangeMatch remaining duration in ticks.
effects.<effect>.ambientbooleanMatch ambient flag.
effects.<effect>.visiblebooleanMatch particle visibility.

Progress, recipes, and statistics

conditions:
  player:
    type_specific:
      type: minecraft:player
      advancements:
        minecraft:story/mine_stone: true
        my_pack:custom_root:
          root_trigger: true
      recipes:
        minecraft:diamond_sword: true
      stats:
        - type: minecraft:custom
          stat: minecraft:jump
          value:
            min: 50
KeyTypeDescription
advancements.<id>boolean or sectionRequire another advancement to be done or not done. A section checks named criteria.
recipes.<id>booleanRequire a recipe to be discovered or undiscovered.
stats[].typestringStatistic group, such as minecraft:custom, minecraft:mined, minecraft:used, minecraft:killed, or minecraft:killed_by.
stats[].statstringStatistic key, material key, or entity key depending on the statistic type.
stats[].valuenumber or rangeRequired statistic value.

Nested entity checks

The same entity predicate system can be used for related entities.

conditions:
  player:
    type_specific:
      type: minecraft:player
      looking_at:
        type: minecraft:zombie
        distance:
          absolute:
            max: 12
    vehicle:
      type: minecraft:horse
KeyTypeDescription
passengerentity predicateMatch one of the player's passengers.
vehicleentity predicateMatch the entity the player is riding.
targeted_entityentity predicateFor mobs, match their current target.
type_specific.looking_atentity predicateFor players, match the entity they are looking at within 100 blocks.
distancesectionMatch distance from the player to the related entity. Supports absolute, horizontal, x, y, and z.

Other type-specific predicates

Nested entity predicates can also use a few entity-specific checks.

TypeKeysDescription
minecraft:sheepshearedMatch whether the sheep is sheared.
minecraft:slime, minecraft:magma_cube, minecraft:cube_mobsizeMatch slime size with a number or range.
minecraft:raideris_captain, has_raidMatch raider patrol captain and raid state when available.
minecraft:fishing_hookin_open_waterMatch fishing-hook open-water state when available.

Limitations

  • Entity type tags are accepted syntactically but are not resolved. Vanilla item and block tags are resolved where item/block predicates are supported.
  • Entity-level components and predicates sections are not supported and will make the predicate fail closed.
  • Location structures are not supported.
  • NBT matching is intentionally limited; it only supports simple scoreboard tag checks inside an nbt string.

On this page