Перейти к содержимому
Mineforgian

Itematic

A mod that adds data-driven items to the game, and much more!

Загрузки
1K
Подписчики
39
Обновлён
3 августа 2026 г.
Лицензия
Apache-2.0

Опубликован 7 мая 2025 г.

Itematic

The mod that adds data-driven items. You can easily add your own items to your world! Just define an item in your data pack and resource pack and you're all set! Features include:

  • Custom items
  • Customisable Creative inventory item stacks
  • Item events
  • Villager trades
  • Actions to use in various contexts

Tools and Examples

These are tools to help create your own items and more:

This is a repository with examples: https://github.com/ErrorCraft/Itematic-Examples

Ченджлог

0.7.0+1.21.11Релиз1.21.11 · 3 августа 2026 г.

The final version for 1.21! This means I can finally move to 26.x and leave this mess of a versioning system and much more behind! 🎉🎉🎉 This version expands melee weapon items significantly.

A new roadmap has been made alongside this version showing what to expect and how I will migrate to 26.x as quickly as possible. For a few more details regarding the new future you can look at the roadmap to 26.x!

Changes

Item Behaviour Components

minecraft:useable

  • Added an optional effects field.
    • Its format is the same as the minecraft:use_effects data component.
    • Provides the minecraft:use_effects data component.

minecraft:weapon

  • Added the types field, which is a map of melee weapon components.
    • See the Melee Weapons section for more information.
  • Replaced the may_smash field with more possibilities in the new minecraft:smashing melee weapon component.
  • Moved the disable_blocking_for_seconds field to the new minecraft:disables_blocking melee weapon component.

So if you had this:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 5.0,
      "rules": []
    },
    "attack_speed": 0.15,
    "may_smash": true
  }
}

You now have to use this instead:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 5.0,
      "rules": []
    },
    "attack_speed": 0.15,
    "types": {
      "minecraft:smashing": {
        "heavy_smash_attack_fall_distance": 5.0,
        "hit_sounds": {
          "in_air": "minecraft:item.mace.smash_air",
          "on_ground_large_fall_distance": "minecraft:item.mace.smash_ground_heavy",
          "on_ground_small_fall_distance": "minecraft:item.mace.smash_ground"
        },
        "knockback_power": 0.699999988079071,
        "smash_attack_fall_distance": 1.5
      }
    }
  }
}

Example from the Iron Spear:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 2.0,
      "rules": []
    },
    "attack_range": {
      "hitbox_margin": 0.125,
      "max_creative_reach": 6.5,
      "max_reach": 4.5,
      "min_creative_reach": 2.0,
      "min_reach": 2.0,
      "mob_factor": 0.5
    },
    "attack_speed": 0.2631579041481018,
    "damage_type": "minecraft:spear",
    "minimum_attack_charge": 1.0,
    "swing_animation": {
      "type": "stab",
      "duration": 19
    },
    "types": {
      "minecraft:kinetic": {
        "damage_conditions": {
          "max_duration_ticks": 225,
          "min_relative_speed": 4.6
        },
        "damage_multiplier": 0.95,
        "delay_ticks": 12,
        "dismount_conditions": {
          "max_duration_ticks": 50,
          "min_speed": 8.0
        },
        "forward_movement": 0.38,
        "hit_sound": "minecraft:item.spear.hit",
        "knockback_conditions": {
          "max_duration_ticks": 135,
          "min_speed": 5.1
        },
        "sound": "minecraft:item.spear.use"
      },
      "minecraft:piercing": {
        "hit_sound": "minecraft:item.spear.hit",
        "sound": "minecraft:item.spear.attack"
      }
    }
  }
}
  • Added an optional attack_range field.
    • Determines the attack range and hitbox margin when trying to attack entities.
    • Its format is the same as the minecraft:attack_range data component.
    • Provides the minecraft:attack_range data component.
  • Added an optional damage_type field.
    • Specifies the damage type the weapon deals.
    • Its format is an id pointing to a damage type.
    • Provides the minecraft:damage_type data component.
  • Added an optional minimum_attack_charge field.
    • Specifies the minimum attack charge on the attack indicator required to attack with the weapon.
    • Its format is a float ranging from 0 to 1 inclusive.
    • Provides the minecraft:minimum_attack_charge data component.
  • Added an optional swing_animation field.
    • Allows a different animation to be used when attacking.
    • Its format is the same as the minecraft:swing_animation data component.
    • Provides the minecraft:swing_animation data component.

Melee Weapons

Allows a melee weapon to be used in a specific way. Its value is a component map with melee weapon components.

minecraft:disables_blocking

  • Provides a way to disable an attack blocking item that is being used.
  • Fields:
    • seconds: A non-negative float. The amount of seconds to disable the attack blocking item for.
  • The disable_blocking_for_seconds in the minecraft:weapon data component is still present and used to keep compatibility with existing data components.

Example:

{
  "minecraft:disables_blocking": {
    "seconds": 5.0
  }
}

minecraft:kinetic

  • Allows this weapon to have a charging attack when using the item.
  • Its format is the same as the minecraft:kinetic_weapon data component.

Example:

{
  "minecraft:kinetic": {
    "damage_conditions": {
      "max_duration_ticks": 225,
      "min_relative_speed": 4.6
    },
    "damage_multiplier": 0.95,
    "delay_ticks": 12,
    "dismount_conditions": {
      "max_duration_ticks": 50,
      "min_speed": 8.0
    },
    "forward_movement": 0.38,
    "hit_sound": "minecraft:item.spear.hit",
    "knockback_conditions": {
      "max_duration_ticks": 135,
      "min_speed": 5.1
    },
    "sound": "minecraft:item.spear.use"
  }
}

minecraft:piercing

  • Allows this weapon to damage multiple entities along a ray instead of a single entity.
  • Its format is the same as the minecraft:piercing_weapon data component.

Example:

{
  "minecraft:piercing": {
    "hit_sound": "minecraft:item.spear.hit",
    "sound": "minecraft:item.spear.attack"
  }
}

minecraft:smashing

  • Allows this weapon to attack entities by falling on them.
  • Fields:
    • hit_sounds: A map with sounds. The sounds to play when hitting entities with a smashing attack.
      • in_air: A sound event. The sound to play when airborne.
      • on_ground_small_fall_distance: A sound event. The sound to play when dealing a regular smashing attack.
      • on_ground_large_fall_distance: A sound event. The sound to play when dealing a heavy smashing attack.
    • smash_attack_fall_distance: A positive double. The minimum distance required to fall to deal a smashing attack.
    • heavy_smash_attack_fall_distance: A positive double. The minimum distance required to fall to deal a heavy smashing attack.
    • knockback_power: A positive double. The maximum knockback power to deal to nearby entities when dealing a smashing attack.

Example:

{
  "minecraft:smashing": {
    "heavy_smash_attack_fall_distance": 5.0,
    "hit_sounds": {
      "in_air": "minecraft:item.mace.smash_air",
      "on_ground_large_fall_distance": "minecraft:item.mace.smash_ground_heavy",
      "on_ground_small_fall_distance": "minecraft:item.mace.smash_ground"
    },
    "knockback_power": 0.699999988079071,
    "smash_attack_fall_distance": 1.5
  }
}

Data Components

  • Added the following data components:
    • minecraft:smashing_weapon

minecraft:smashing_weapon

  • Specified and used by the minecraft:smashing melee weapon component in the minecraft:weapon behaviour component.
  • If removed, no smash attack will be applied.
  • Its value is the same as the one specified in the minecraft:smashing melee weapon component.

Example:

{
  "heavy_smash_attack_fall_distance": 5.0,
  "hit_sounds": {
    "in_air": "minecraft:item.mace.smash_air",
    "on_ground_large_fall_distance": "minecraft:item.mace.smash_ground_heavy",
    "on_ground_small_fall_distance": "minecraft:item.mace.smash_ground"
  },
  "knockback_power": 0.699999988079071,
  "smash_attack_fall_distance": 1.5
}

Predicates

Item Predicates

  • Removed the data_components field in favour of vanilla's component predicates.

So if you had this:

{
  "data_components": [
    "minecraft:bees"
  ]
}

You now have to use this instead:

{
  "predicates": {
    "minecraft:bees": {}
  }
}

Fixes

  • Skeleton-like entities can now use any direct shooter instead of just Bows.
  • Piglins and Pillagers can now use any chargeable shooter instead of just Crossbows.
  • Melee weapons now correctly do not apply item damage when attacking an entity in creative mode.
  • The correct sounds are now played when using a smashing weapon.
0.7.0-preview.3+1.21.11Бета1.21.11 · 2 августа 2026 г.

This preview version comes with a new melee weapon component and a fix for smashing weapons.

For a few more details regarding the new future you can look at the roadmap to 26.x!

Changes

Item Behaviour Components

minecraft:weapon

  • Moved the disable_blocking_for_seconds field to the new minecraft:disables_blocking melee weapon component.

So if you had this:

{
  "attack_damage": {
    "default_damage": 9.0,
    "rules": []
  },
  "attack_speed": 0.225,
  "disable_blocking_for_seconds": 5.0,
  "item_damage_per_attack": 2
}

You now have to use this instead:

{
  "attack_damage": {
    "default_damage": 9.0,
    "rules": []
  },
  "attack_speed": 0.225,
  "item_damage_per_attack": 2,
  "types": {
    "minecraft:disables_blocking": {
      "seconds": 5.0
    }
  }
}

Melee Weapons

minecraft:disables_blocking

  • Provides a way to disable an attack blocking item that is being used.
  • Fields:
    • seconds: A non-negative float. The amount of seconds to disable the attack blocking item for.
  • The disable_blocking_for_seconds in the minecraft:weapon data component is still present and used to keep compatibility with existing data components.

Example:

{
  "minecraft:disables_blocking": {
    "seconds": 5.0
  }
}

Fixes

  • The correct sounds are now played when using a smashing weapon.
0.7.0-preview.2+1.21.11Бета1.21.11 · 24 июля 2026 г.

This preview version comes with some extensions to smashing weapons!

For a few more details regarding the new future you can look at the roadmap to 26.x!

Changes

Item Behaviour Components

minecraft:weapon

  • Added fields to the minecraft:smashing melee weapon component.
  • See the Melee Weapons section for more information.

Melee Weapons

minecraft:smashing

  • Now has fields that configure the way the smash attack behaves.
  • Fields:
    • hit_sounds: A map with sounds. The sounds to play when hitting entities with a smashing attack.
      • in_air: A sound event. The sound to play when airborne.
      • on_ground_small_fall_distance: A sound event. The sound to play when dealing a regular smashing attack.
      • on_ground_large_fall_distance: A sound event. The sound to play when dealing a heavy smashing attack.
    • smash_attack_fall_distance: A positive double. The minimum distance required to fall to deal a smashing attack.
    • heavy_smash_attack_fall_distance: A positive double. The minimum distance required to fall to deal a heavy smashing attack.
    • knockback_power: A positive double. The maximum knockback power to deal to nearby entities when dealing a smashing attack.

Example:

{
  "minecraft:smashing": {
    "heavy_smash_attack_fall_distance": 5.0,
    "hit_sounds": {
      "in_air": "minecraft:item.mace.smash_air",
      "on_ground_large_fall_distance": "minecraft:item.mace.smash_ground_heavy",
      "on_ground_small_fall_distance": "minecraft:item.mace.smash_ground"
    },
    "knockback_power": 0.699999988079071,
    "smash_attack_fall_distance": 1.5
  }
}

Data Components

  • Added the following data components:
    • minecraft:smashing_weapon

minecraft:smashing_weapon

  • Specified and used by the minecraft:smashing melee weapon component in the minecraft:weapon behaviour component.
  • If removed, no smash attack will be applied.
  • Its value is the same as the one specified in the minecraft:smashing melee weapon component.

Example:

{
  "heavy_smash_attack_fall_distance": 5.0,
  "hit_sounds": {
    "in_air": "minecraft:item.mace.smash_air",
    "on_ground_large_fall_distance": "minecraft:item.mace.smash_ground_heavy",
    "on_ground_small_fall_distance": "minecraft:item.mace.smash_ground"
  },
  "knockback_power": 0.699999988079071,
  "smash_attack_fall_distance": 1.5
}

Fixes

  • Melee weapons now correctly do not apply item damage when attacking an entity in creative mode.
0.7.0-preview.1+1.21.11Бета1.21.11 · 19 июля 2026 г.

We're moving all the way to the end of Minecraft 1.21 with the first preview version for 0.7.0! This preview expands melee weapon items significantly.

A new roadmap has been made alongside this preview showing what to expect and how I will migrate to 26.x as quickly as possible. For a few more details regarding the new future you can look at the roadmap to 26.x!

Changes

Item Behaviour Components

minecraft:useable

  • Added an optional effects field.
    • Its format is the same as the minecraft:use_effects data component.
    • Provides the minecraft:use_effects data component.

minecraft:weapon

  • Replaced the may_smash field with more possibilities in the types field.
    • Its value is a map with melee weapon types and values.
    • See the Melee Weapons section for more information.

So if you had this:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 5.0,
      "rules": []
    },
    "attack_speed": 0.15,
    "may_smash": true
  }
}

You now have to use this instead:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 5.0,
      "rules": []
    },
    "attack_speed": 0.15,
    "types": {
      "minecraft:smashing": {}
    }
  }
}

Example from the Iron Spear:

{
  "minecraft:weapon": {
    "attack_damage": {
      "default_damage": 2.0,
      "rules": []
    },
    "attack_range": {
      "hitbox_margin": 0.125,
      "max_creative_reach": 6.5,
      "max_reach": 4.5,
      "min_creative_reach": 2.0,
      "min_reach": 2.0,
      "mob_factor": 0.5
    },
    "attack_speed": 0.2631579041481018,
    "damage_type": "minecraft:spear",
    "minimum_attack_charge": 1.0,
    "swing_animation": {
      "type": "stab",
      "duration": 19
    },
    "types": {
      "minecraft:kinetic": {
        "damage_conditions": {
          "max_duration_ticks": 225,
          "min_relative_speed": 4.6
        },
        "damage_multiplier": 0.95,
        "delay_ticks": 12,
        "dismount_conditions": {
          "max_duration_ticks": 50,
          "min_speed": 8.0
        },
        "forward_movement": 0.38,
        "hit_sound": "minecraft:item.spear.hit",
        "knockback_conditions": {
          "max_duration_ticks": 135,
          "min_speed": 5.1
        },
        "sound": "minecraft:item.spear.use"
      },
      "minecraft:piercing": {
        "hit_sound": "minecraft:item.spear.hit",
        "sound": "minecraft:item.spear.attack"
      }
    }
  }
}
  • Added an optional attack_range field.
    • Determines the attack range and hitbox margin when trying to attack entities.
    • Its format is the same as the minecraft:attack_range data component.
    • Provides the minecraft:attack_range data component.
  • Added an optional damage_type field.
    • Specifies the damage type the weapon deals.
    • Its format is an id pointing to a damage type.
    • Provides the minecraft:damage_type data component.
  • Added an optional minimum_attack_charge field.
    • Specifies the minimum attack charge on the attack indicator required to attack with the weapon.
    • Its format is a float ranging from 0 to 1 inclusive.
    • Provides the minecraft:minimum_attack_charge data component.
  • Added an optional swing_animation field.
    • Allows a different animation to be used when attacking.
    • Its format is the same as the minecraft:swing_animation data component.
    • Provides the minecraft:swing_animation data component.

Melee Weapons

Allows a melee weapon to be used in a specific way. Its value is a component map with melee weapon components.

minecraft:kinetic

  • Allows this weapon to have a charging attack when using the item.
  • Its format is the same as the minecraft:kinetic_weapon data component.

Example:

{
  "minecraft:kinetic": {
    "damage_conditions": {
      "max_duration_ticks": 225,
      "min_relative_speed": 4.6
    },
    "damage_multiplier": 0.95,
    "delay_ticks": 12,
    "dismount_conditions": {
      "max_duration_ticks": 50,
      "min_speed": 8.0
    },
    "forward_movement": 0.38,
    "hit_sound": "minecraft:item.spear.hit",
    "knockback_conditions": {
      "max_duration_ticks": 135,
      "min_speed": 5.1
    },
    "sound": "minecraft:item.spear.use"
  }
}

minecraft:piercing

  • Allows this weapon to damage multiple entities along a ray instead of a single entity.
  • Its format is the same as the minecraft:piercing_weapon data component.

Example:

{
  "minecraft:piercing": {
    "hit_sound": "minecraft:item.spear.hit",
    "sound": "minecraft:item.spear.attack"
  }
}

minecraft:smashing

  • Allows this weapon to attack entities by falling on them.
  • Its format is an empty map.

Example:

{
  "minecraft:smashing": {}
}

Predicates

Item Predicates

  • Removed the data_components field in favour of vanilla's component predicates.

So if you had this:

{
  "data_components": [
    "minecraft:bees"
  ]
}

You now have to use this instead:

{
  "predicates": {
    "minecraft:bees": {}
  }
}

Fixes

  • Skeleton-like entities can now use any direct shooter instead of just Bows.
  • Piglins and Pillagers can now use any chargeable shooter instead of just Crossbows.
0.6.0+1.21.5Релиз1.21.5 · 30 июня 2026 г.

There's no version for 1.21.1 this time because I want to be up-to-date during 26.x updates before the end of the year (ergo before 27.1 happens). This version overhauls the action context parameter system by using the vanilla context instead. It also introduces entity spawn rules, unifies spawn-related fields in item behaviour components that involve placing entities and changes the way buckets are defined.

For a few more details regarding the split and future you can look at the roadmap to 1.21! However, expect a small update on this sooner or later.

Changes

  • Removed smithing templates.
    • This only provided the tooltip and textures, of which the former has been extracted from the behaviour entirely.

Items

  • Removed #minecraft:prevent_mining_in_creative
    • Its functionality is now part of minecraft:tool.

Item Behaviour Components

  • Replaced usages of entity initialisers with entity types directly.

  • Removed the following item behaviour components:

    • minecraft:pointable
      • This should now be replicated with item assets in resource packs.
      • Setting the item pointer location should now be replicated with actions instead.
    • minecraft:saddle
      • This has been replaced entirely by minecraft:equipment.
    • minecraft:tinted
      • This should now be replicated with item assets in resource packs.
  • Renamed minecraft:smithing_template to minecraft:smithing_template_provider.

    • It now only references the type, which was previously present in smithing templates.
    • Now only determines the textures used in a Smithing Table.
    • The tooltip is also no longer provided by the behaviour and must be placed in the item display instead.

So if you had this:

{
  "minecraft:smithing_template": {
    "template": "minecraft:bolt_pattern"
  }
}

You now have to use this:

{
  "minecraft:smithing_template_provider": "minecraft:trim_pattern"
}

minecraft:attack_blocking

  • Blocks attacks when used.
  • The fields are the same as the minecraft:blocks_attacks data component.

Example:

{
  "minecraft:attack_blocking": {
    "block_delay_seconds": 0.25,
    "block_sound": "minecraft:item.shield.block",
    "bypassed_by": "#minecraft:bypasses_shield",
    "disabled_sound": "minecraft:item.shield.break",
    "item_damage": {
      "base": 1.0,
      "factor": 1.0,
      "threshold": 3.0
    }
  }
}

minecraft:bucket

  • Unified block and fluid placement for buckets.
  • The fluid, block and transforms_into fields have been replaced with world modifications in the new modification field.
    • This means that the previously hardcoded behaviour of the minecraft:empty fluid draining a fluid instead has been removed.
Previously set field World modification
Fluid minecraft:empty minecraft:drain_fluid
Any other fluid minecraft:place_fluid with the specified fluid
Any block minecraft:place_block with the specified block
  • Moved the placed entity up a level by replacing it with an entity spawner.
    • This means that the optional require_other_successful_placement field has been removed and now always requires a successful placement.
    • The field itself is still optional.

So if you had this:

{
  "minecraft:bucket": {
    "emptying_sound_event": "minecraft:item.bucket.empty_fish",
    "entity": {
      "entity": {
        "type": "minecraft:pufferfish"
      },
      "require_other_successful_placement": true
    },
    "fluid": "minecraft:water",
    "transforms_into": "minecraft:bucket"
  }
}

You now have to use this:

{
  "minecraft:bucket": {
    "entity": {
      "entity": "minecraft:pufferfish"
    },
    "modification": {
      "type": "minecraft:place_fluid",
      "fluid": "minecraft:water",
      "place_sound": "minecraft:item.bucket.empty_fish",
      "transforms_into": "minecraft:bucket"
    }
  }
}

minecraft:entity

  • Merged the entity and allow_item_data fields into a single entity field by using an entity spawner.
  • Added allow_spawner_modification.
    • Its value is an optional boolean defaulting to false.
    • Determines whether the item can modify a Spawner's entity type.

So if you had this:

{
  "minecraft:entity": {
    "allow_item_data": true,
    "entity": {
      "type": "minecraft:pig"
    },
    "passes": [
      "block",
      "fluid"
    ]
  }
}

You now have to use this:

{
  "minecraft:entity": {
    "allow_spawner_modification": true,
    "entity": {
      "allow_item_data": true,
      "entity": "minecraft:pig"
    },
    "passes": [
      "block",
      "fluid"
    ]
  }
}

minecraft:playable

  • Renamed instruments to default_instrument and now only accepts one instrument.

minecraft:projectile

  • The entity field now only accepts an entity type instead of an entity initialiser by making the entire component an entity spawner.
  • This means it also gains the other optional fields. So if you had this:
{
  "minecraft:projectile": {
    "entity": {
      "type": "minecraft:trident"
    }
  }
}

You now have to use this instead:

{
  "minecraft:projectile": {
    "entity": "minecraft:trident"
  }
}

Example using data components:

{
  "minecraft:projectile": {
    "components": {
      "minecraft:chicken/variant": "minecraft:cold"
    },
    "entity": "minecraft:egg"
  }
}

minecraft:spawn_egg

  • Is no longer required for Spawner entity type modification.
    • This field has instead been moved to the minecraft:entity item behaviour component.
  • The behaviour component is still used for spawning children when used on the specified entity type.

So if you had this:

{
  "minecraft:entity": {
    "allow_item_data": true,
    "entity": "minecraft:pig",
    "passes": [
      "block",
      "fluid"
    ]
  },
  "minecraft:spawn_egg": {}
}

You now have to use this:

{
  "minecraft:entity": {
    "allow_spawner_modification": true,
    "entity": {
      "allow_item_data": true,
      "entity": "minecraft:pig"
    },
    "passes": [
      "block",
      "fluid"
    ]
  },
  "minecraft:spawn_egg": {}
}

minecraft:text_holder

  • Now opens a book on use directly instead of needing an action.

minecraft:trim_material_provider

  • Provides a trim material for use in recipes.
  • Its value is an id pointing to a trim material.
  • This value can be changed for individual item stacks in the new minecraft:provides_trim_material data component.

Example:

{
  "minecraft:trim_material_provider": "minecraft:diamond"
}

minecraft:weapon

  • Renamed the damage_per_attack field to item_damage_per_attack.
  • Added the disable_blocking_for_seconds field.
    • Disables blocking when used on a target wielding an item that is attack blocking.
    • Its value is a non-negative float.

Actions

  • Removed action context parameters in favour of entity targets and new position targets.
    • These values need to be updated accordingly.
    • There is more information on this in the Entity Targets section below.

So if you had this:

{
  "type": "minecraft:play_sound",
  "category": "neutral",
  "pitch": 1.0,
  "position": "this",
  "sound": "minecraft:item.bottle.fill",
  "volume": 1.0
}

You now have to use this instead:

{
  "type": "minecraft:play_sound",
  "category": "neutral",
  "pitch": 1.0,
  "position": "origin",
  "sound": "minecraft:item.bottle.fill",
  "volume": 1.0
}
  • Various actions gained fields for entity targets.
  • Exchanging stacks now works in more places and in more contexts.
  • Simplified action requirements to only take a predicate due to the migration towards context parameters.

So if you had this:

{
  "requirements": {
    "conditions": {
      "condition": "minecraft:location_check",
      "predicate": {
        "block": {
          "blocks": "minecraft:respawn_anchor"
        }
      }
    },
    "context": {
      "entity": "this",
      "position": "target"
    }
  }
}

You now have to use this instead:

{
  "requirements": {
    "condition": "minecraft:location_check",
    "position": "interacted",
    "predicate": {
      "block": {
        "blocks": "minecraft:respawn_anchor"
      }
    }
  }
}
  • Removed the following actions:
    • minecraft:open_book_from_item
      • This is now part of the minecraft:text_holder item behaviour component.
    • minecraft:saddle_entity_at_position
      • This has been replaced by equipment and minecraft:equip_entity_at_position should be used instead.
    • minecraft:set_item_pointer_location
      • This has been moved to an item modifier.

minecraft:attach_leashed_entities_on_block

  • Added a new field called position:
    • Its value is a position target and determines the position the leashed entities will be attached to.

minecraft:damage_item

  • Removed the ignore_game_mode field.
    • The action now always takes the game mode into account.

minecraft:drop_item_from_block

  • Changed the item field to take an item stack instead of an item.

minecraft:exchange_item

  • Changed the item field to take an item stack instead of an item.
  • Removed the components field.
    • The components are now defined in the item field instead.

So if you had this:

{
  "type": "minecraft:exchange_item",
  "components": {
    "minecraft:potion_contents": {
      "potion": "minecraft:water"
    }
  },
  "item": "minecraft:potion"
}

You now have to use this instead:

{
  "type": "minecraft:exchange_item",
  "item": {
    "id": "minecraft:potion",
    "components": {
      "minecraft:potion_contents": {
        "potion": "minecraft:water"
      }
    },
    "count": 1
  }
}

minecraft:fertilize

  • Added a new field called position:
    • Its value is a position target and determines the position to fertilize.

minecraft:modify_item

  • Removed the context field.
    • The item modifier now uses the exact same context as the action.
    • Added the stack field, which is an item stack target to use a specific item stack from the context.

minecraft:place_block

  • Removed the decrement_count field.
    • This should be replaced by a sequence with a minecraft:decrement_item action.

So if you had this:

{
  "type": "minecraft:place_block",
  "block": "minecraft:fire",
  "decrement_count": true,
  "position": "interacted"
}

You now have to use this instead:

{
  "type": "minecraft:sequence",
  "handler": "minecraft:passing",
  "entries": [
    {
      "type": "minecraft:place_block",
      "block": "minecraft:fire",
      "position": "interacted"
    },
    {
      "type": "minecraft:decrement_item",
      "amount": 1
    }
  ]
}
  • Added an optional place_sound field.
    • When specified, this sound will be played instead of the normal block place sound.

minecraft:prime_tnt

  • Does not prime tnt when the tntExplodes game rule is disabled.
  • Turns any block into primed TNT now instead of just TNT.
    • The block that is primed is used for the display.
  • Checking for the TNT block must be done in the action requirements now.

So if you had this:

{
  "action": {
    "type": "minecraft:prime_tnt",
    "position": "target"
  }
}

You now have to use this instead:

{
  "action": {
    "type": "minecraft:prime_tnt",
    "position": "interacted"
  },
  "requirements": {
    "condition": "minecraft:location_check",
    "position": "interacted",
    "predicate": {
      "block": {
        "blocks": "minecraft:tnt"
      }
    }
  }
}

minecraft:run_function

  • Moved the entity and position fields up due to the removal of action context parameters.

So if you had this:

{
  "type": "minecraft:run_function",
  "function": "example:function",
  "context": {
    "entity": "this",
    "position": "this"
  }
}

You now have to use this instead:

{
  "type": "minecraft:run_function",
  "function": "example:function",
  "entity": "this",
  "position": "origin"
}
  • Both fields are optional now and will never try to pass the parameter if not specified.

So if you only want the position context you can use this:

{
  "type": "minecraft:run_function",
  "function": "example:function",
  "position": "origin"
}

minecraft:sequence

  • Now no longer incorrectly reports duplicate actions defined in the same sequence as recursive.

minecraft:swing_hand

  • Added a new field called entity:
    • Its value is an entity target and determines whose hand to swing.

World Modifications

Can modify the world by adding or removing something from it.

minecraft:drain_fluid

  • Drains a fluid from the world.
  • Has no additional fields.
  • Leaves an item stack specified by the drained fluid.

minecraft:place_fluid

  • Places a fluid in the world.
  • Fields:
    • fluid: A fluid. The fluid to place.
    • place_sound: A sound event. The sound to play when placed.
    • transforms_into: An item. The item to leave when successfully placed.
  • Leaves the item stack specified in the transforms_into field.

minecraft:place_block

  • Places a block in the world.
  • Fields:
    • block: A block picker. The block to place.
    • place_sound: A sound event. The sound to play when placed.
    • transforms_into: An item. The item to leave when successfully placed.
  • Leaves the item stack specified in the transforms_into field.

Entity Spawners

  • Spawns an entity using the specified rules.
  • Fields:
    • entity: An entity type. The entity type to spawn.
      • If allow_item_data is set to true, the entity type may additionally be determined via the minecraft:entity_data data component from the used item stack, which takes precedence over the entity field.
    • spawn_rules: An optional list of spawn rules. The spawn rules to apply in the specified order.
    • components: An optional set of components. The components to apply to the spawned entity.
    • spawn_sound: An optional sound event. The sound to play when the entity is spawned.
    • allow_item_data: An optional boolean defaulting to false. Whether to allow item data from the minecraft:entity_data data component from the used item stack.

Entity Spawn Rules

  • Determines whether to place the entity or not and if so, its position and rotation.
  • Rules are applied when the condition passes or when no condition is specified.
  • Common fields:
    • condition: An optional predicate. Determines whether to apply the rule or not.

minecraft:align_yaw

  • Aligns the entity's yaw based on the placer's own yaw using the specified amount of steps.
  • Fields:
    • step: An integer ranging from 2 to 360. The amount of steps.
      • For example, a value of 8 rounds to the nearest 45 degree as 360 / 8 = 45.

Example:

{
  "type": "minecraft:align_yaw",
  "steps": 8
}

minecraft:discard

  • Discards the entity entirely.
  • Has no additional fields.

Example:

{
  "type": "minecraft:discard",
  "condition": {
    "condition": "minecraft:side_check",
    "sides": [
      "down"
    ]
  }
}

minecraft:fits_in_volume

  • Checks whether the specified hitbox or otherwise entity's default hitbox fits in the specified volume.
  • The hitbox to check for is centred around the entity spawner's current spawn position.
  • Fields:
    • blocks: An optional boolean. Defaults to true. Whether to check if the entity fits inside the surrounding blocks.
    • entities: An optional boolean. Defaults to true. Whether to check if the entity fits inside the surrounding entities.
    • volume: An optional list of three doubles. The volume to use instead of the entity's hitbox.

Example:

{
  "type": "minecraft:fits_in_volume",
  "blocks": false,
  "volume": [
    1.0,
    2.0,
    1.0
  ]
}

minecraft:offset_spawn_position

  • Offsets the entity's spawn position by the specified amount.
  • Fields:
    • offset: A list of three doubles. The position offset.
{
  "type": "minecraft:offset_spawn_position",
  "offset": [
    0.0,
    0.0625,
    0.0
  ]
}

Predicates

  • Added a minecraft:villager entity sub-predicate, which is a temporary solution that will be removed once a component predicate for a Villager's type has been added (alongside data-driven trades as those will be part of vanilla by then)
    • Fields:
      • variant, which is a Villager variant, list of Villager variants or hash-prefixed Villager variant tag and the Villager's variant must match in order to pass.

Example:

{
  "type": "minecraft:villager",
  "variant": [
    "minecraft:swamp",
    "minecraft:snow",
    "minecraft:plains"
  ]
}

minecraft:location_check

  • Added a new optional field called position:
    • Its value is a position target and is the position to retrieve to use for the check.
    • Its default value is "origin" to match existing behaviour.
    • Fails if the position defined is not present in the context.

Example:

{
  "condition": "minecraft:location_check",
  "position": "interacted",
  "predicate": {
    "block": {
      "blocks": "minecraft:tnt"
    }
  }
}

Item Modifiers

minecraft:set_item_pointer_location

  • Sets the minecraft:lodestone_tracker data component to the provided position.
  • Fields:
    • position, which is a position target to use as the item pointer location.

Example:

{
  "function": "minecraft:set_item_pointer_location",
  "position": "interacted"
},

minecraft:split

  • Splits the item stack into the original and one with the provided count.
  • Fields:
    • count, which is a number provider to split the item stack into one with the provided new count.

Example:

{
  "count": 1.0,
  "function": "minecraft:split"
}

Context Parameters

Added the following context parameters from the migration:

  • minecraft:side, which is the side of a block that was interacted with.
    • Passed in the minecraft:bucket item behaviour.
    • Passed in the minecraft:entity item behaviour.
    • Used in dispense behaviour to interact with the Dispenser's facing direction.
    • Used in the minecraft:side_check predicate.
    • Used in the minecraft:drop_item_from_block action.
    • Used in the minecraft:fertilize action.
    • Used in the minecraft:use_bucket action.
  • minecraft:interacted_position, which is the position that the user interacted with.
    • Passed and used in various item behaviour.
    • Used in dispense behaviour to interact with the Dispenser's output position.
  • minecraft:equipment_slot, which is used when an item is broken.
  • minecraft:hand, which is the hand used to execute an action.
    • Passed to various item events when an item is being used.
    • Used in the minecraft:swing_hand action to swing the hand.
    • Used in the minecraft:open_book_from_item action to get the book from the executing entity.
  • minecraft:target_entity, which is the entity that was interacted with.
    • Used in the minecraft:entity and minecraft:throwable item behaviour for the spawned entities.
    • Passed to the minecraft:hit_entity and minecraft:use_weapon item events for the attacked entity.
    • Passed to the minecraft:use_on_entity item event for the interacted entity.

Action context parameters were replaced with new targets to be consistent with vanilla. This means that all parameters are now passed to loot tables, item modifiers and predicates instead of having to select specific ones using action context parameters, which were removed as well. This also means that you may need to update the value of certain fields. All changes are visible below.

Entity Targets

Old New Context Parameter
"this" "this" minecraft:this_entity
"target" "target_entity" minecraft:target_entity

So if you had this:

{
  "type": "minecraft:set_entity_name_from_item",
  "entity": "target"
}

You now have to use this instead:

{
  "type": "minecraft:set_entity_name_from_item",
  "entity": "target_entity"
}

Position Targets

Old New Context Parameter
"this" "origin" minecraft:origin
"target" "interacted" minecraft:interacted_position

So if you had this:

{
  "type": "minecraft:set_block_state",
  "position": "target",
  "state": {
    "Name": "minecraft:farmland",
    "Properties": {
      "moisture": "0"
    }
  }
}

You now have to use this instead:

{
  "type": "minecraft:set_block_state",
  "position": "interacted",
  "state": {
    "Name": "minecraft:farmland",
    "Properties": {
      "moisture": "0"
    }
  }
}

Item Stack Targets

These are new and point to item stacks to use from the context. Currently the only available value is tool, which points to the minecraft:tool context parameter.

Trades

  • Added an optional merchant_predicate field, which is a predicate that must pass in order for the trade to be considered of a merchant's trade set.

Fixes

  • The minecraft:charge_type property now works correctly again on item assets.
  • Exchanging item stacks now works correctly again by dropping the exchanged item stack instead of the current item stack.
  • Fixed the world modification type registry name.
0.6.0-preview.3+1.21.5Бета1.21.5 · 23 июня 2026 г.

This preview introduces entity spawn rules and unifies the spawn-related fields in item behaviour components that involve placing entities.

For a few more details regarding the split and future you can look at the roadmap to 1.21!

Changes

Item Behaviour Components

minecraft:bucket

  • Replaced the entity field with an entity spawner instead of just the entity type.

So if you had this:

{
  "minecraft:bucket": {
    "entity": "minecraft:pufferfish",
    "modification": {
      "type": "minecraft:place_fluid",
      "fluid": "minecraft:water",
      "place_sound": "minecraft:item.bucket.empty_fish",
      "transforms_into": "minecraft:bucket"
    }
  }
}

You now have to use this:

{
  "minecraft:bucket": {
    "entity": {
      "entity": "minecraft:pufferfish"
    },
    "modification": {
      "type": "minecraft:place_fluid",
      "fluid": "minecraft:water",
      "place_sound": "minecraft:item.bucket.empty_fish",
      "transforms_into": "minecraft:bucket"
    }
  }
}

minecraft:entity

  • Merged the entity and allow_item_data fields into a single entity field by using an entity spawner.
  • Added allow_spawner_modification.
    • Its value is an optional boolean defaulting to false.
    • Determines whether the item can modify a Spawner's entity type.

So if you had this:

{
  "minecraft:entity": {
    "allow_item_data": true,
    "entity": "minecraft:pig",
    "passes": [
      "block",
      "fluid"
    ]
  }
}

You now have to use this:

{
  "minecraft:entity": {
    "allow_spawner_modification": true,
    "entity": {
      "allow_item_data": true,
      "entity": "minecraft:pig"
    },
    "passes": [
      "block",
      "fluid"
    ]
  }
}

minecraft:projectile

  • Expanded the entity field by adding optional spawn rules, an optional spawn sound and whether to allow item data or not.

minecraft:spawn_egg

  • Is no longer required for Spawner entity type modification.
    • This field has instead been moved to the minecraft:entity item behaviour component.
  • The behaviour component is still used for spawning children when used on the specified entity type.

So if you had this:

{
  "minecraft:entity": {
    "allow_item_data": true,
    "entity": "minecraft:pig",
    "passes": [
      "block",
      "fluid"
    ]
  },
  "minecraft:spawn_egg": {}
}

You now have to use this:

{
  "minecraft:entity": {
    "allow_spawner_modification": true,
    "entity": {
      "allow_item_data": true,
      "entity": "minecraft:pig"
    },
    "passes": [
      "block",
      "fluid"
    ]
  },
  "minecraft:spawn_egg": {}
}

Entity Spawners

  • Spawns an entity using the specified rules.
  • Fields:
    • entity: An entity type. The entity type to spawn.
      • If allow_item_data is set to true, the entity type may additionally be determined via the minecraft:entity_data data component from the used item stack, which takes precedence over the entity field.
    • spawn_rules: An optional list of spawn rules. The spawn rules to apply in the specified order.
    • components: An optional set of components. The components to apply to the spawned entity.
    • spawn_sound: An optional sound event. The sound to play when the entity is spawned.
    • allow_item_data: An optional boolean defaulting to false. Whether to allow item data from the minecraft:entity_data data component from the used item stack.

Entity Spawn Rules

  • Determines whether to place the entity or not and if so, its position and rotation.
  • Rules are applied when the condition passes or when no condition is specified.
  • Common fields:
    • condition: An optional predicate. Determines whether to apply the rule or not.

minecraft:align_yaw

  • Aligns the entity's yaw based on the placer's own yaw using the specified amount of steps.
  • Fields:
    • step: An integer ranging from 2 to 360. The amount of steps.
      • For example, a value of 8 rounds to the nearest 45 degree as 360 / 8 = 45.

Example:

{
  "type": "minecraft:align_yaw",
  "steps": 8
}

minecraft:discard

  • Discards the entity entirely.
  • Has no additional fields.

Example:

{
  "type": "minecraft:discard",
  "condition": {
    "condition": "minecraft:side_check",
    "sides": [
      "down"
    ]
  }
}

minecraft:fits_in_volume

  • Checks whether the specified hitbox or otherwise entity's default hitbox fits in the specified volume.
  • The hitbox to check for is centred around the entity spawner's current spawn position.
  • Fields:
    • blocks: An optional boolean. Defaults to true. Whether to check if the entity fits inside the surrounding blocks.
    • entities: An optional boolean. Defaults to true. Whether to check if the entity fits inside the surrounding entities.
    • volume: An optional list of three doubles. The volume to use instead of the entity's hitbox.

Example:

{
  "type": "minecraft:fits_in_volume",
  "blocks": false,
  "volume": [
    1.0,
    2.0,
    1.0
  ]
}

minecraft:offset_spawn_position

  • Offsets the entity's spawn position by the specified amount.
  • Fields:
    • offset: A list of three doubles. The position offset.
{
  "type": "minecraft:offset_spawn_position",
  "offset": [
    0.0,
    0.0625,
    0.0
  ]
}

Fixes

  • Fixed the world modification type registry name.
0.6.0-preview.2+1.21.5Бета1.21.5 · 26 мая 2026 г.

It's been a bit, but here's a new preview! This preview changes the way buckets are defined with some minor action changes.

For a few more details regarding the split and future you can look at the roadmap to 1.21!

Changes

Item Behaviour Components

minecraft:bucket

  • Unified block and fluid placement for buckets.
  • The fluid, block and transforms_into fields have been replaced with world modifications in the new modification field.
    • This means that the previously hardcoded behaviour of the minecraft:empty fluid draining a fluid instead has been removed.
Previously set field World modification
Fluid minecraft:empty minecraft:drain_fluid
Any other fluid minecraft:place_fluid with the specified fluid
Any block minecraft:place_block with the specified block
  • Moved the placed entity up a level by only specifying the entity type.
    • This means that the optional require_other_successful_placement field has been removed and now always requires a successful placement.
    • The field itself is still optional.

So if you had this:

{
  "minecraft:bucket": {
    "emptying_sound_event": "minecraft:item.bucket.empty_fish",
    "entity": {
      "entity": "minecraft:pufferfish",
      "require_other_successful_placement": true
    },
    "fluid": "minecraft:water",
    "transforms_into": "minecraft:bucket"
  }
}

You now have to use this instead:

{
  "minecraft:bucket": {
    "entity": "minecraft:pufferfish",
    "modification": {
      "type": "minecraft:place_fluid",
      "fluid": "minecraft:water",
      "place_sound": "minecraft:item.bucket.empty_fish",
      "transforms_into": "minecraft:bucket"
    }
  }
}

Actions

minecraft:place_block

  • Removed the decrement_count field.
    • This should be replaced by a sequence with a minecraft:decrement_item action.

So if you had this:

{
  "type": "minecraft:place_block",
  "block": "minecraft:fire",
  "decrement_count": true,
  "position": "interacted"
}

You now have to use this instead:

{
  "type": "minecraft:sequence",
  "handler": "minecraft:passing",
  "entries": [
    {
      "type": "minecraft:place_block",
      "block": "minecraft:fire",
      "position": "interacted"
    },
    {
      "type": "minecraft:decrement_item",
      "amount": 1
    }
  ]
}
  • Added an optional place_sound field.
    • When specified, this sound will be played instead of the normal block place sound.

World Modifications

Can modify the world by adding or removing something from it.

minecraft:drain_fluid

  • Drains a fluid from the world.
  • Has no additional fields.
  • Leaves an item stack specified by the drained fluid.

minecraft:place_fluid

  • Places a fluid in the world.
  • Fields:
    • fluid: A fluid. The fluid to place.
    • place_sound: A sound event. The sound to play when placed.
    • transforms_into: An item. The item to leave when successfully placed.
  • Leaves the item stack specified in the transforms_into field.

minecraft:place_block

  • Places a block in the world.
  • Fields:
    • block: A block picker. The block to place.
    • place_sound: A sound event. The sound to play when placed.
    • transforms_into: An item. The item to leave when successfully placed.
  • Leaves the item stack specified in the transforms_into field.

Fixes

  • Exchanging item stacks now works correctly again by dropping the exchanged item stack instead of the current item stack.
0.6.0-preview.1+1.21.5Бета1.21.5 · 14 апреля 2026 г.

We're skipping an entire Minecraft drop and ended up on 1.21.5! This preview overhauls the action context parameter system by using the vanilla context instead. This version took a second because of some additional changes in Minecraft.

For a few more details regarding the split and future you can look at the roadmap to 1.21!

Changes

  • Removed smithing templates.
    • This only provided the tooltip and textures, of which the former has been extracted from the behaviour entirely.

Items

  • Removed #minecraft:prevent_mining_in_creative
    • Its functionality is now part of minecraft:tool.

Item Behaviour Components

  • Replaced usages of entity initialisers with entity types directly.

  • Removed the following item behaviour components:

    • minecraft:pointable
      • This should now be replicated with item assets in resource packs.
      • Setting the item pointer location should now be replicated with actions instead.
    • minecraft:saddle
      • This has been replaced entirely by minecraft:equipment.
    • minecraft:tinted
      • This should now be replicated with item assets in resource packs.
  • Renamed minecraft:smithing_template to minecraft:smithing_template_provider.

    • It now only references the type, which was previously present in smithing templates.
    • Now only determines the textures used in a Smithing Table.
    • The tooltip is also no longer provided by the behaviour and must be placed in the item display instead.

So if you had this:

{
  "minecraft:smithing_template": {
    "template": "minecraft:bolt_pattern"
  }
}

You now have to use this:

{
  "minecraft:smithing_template_provider": "minecraft:trim_pattern"
}

minecraft:attack_blocking

  • Blocks attacks when used.
  • The fields are the same as the minecraft:blocks_attacks data component.

Example:

{
  "minecraft:attack_blocking": {
    "block_delay_seconds": 0.25,
    "block_sound": "minecraft:item.shield.block",
    "bypassed_by": "#minecraft:bypasses_shield",
    "disabled_sound": "minecraft:item.shield.break",
    "item_damage": {
      "base": 1.0,
      "factor": 1.0,
      "threshold": 3.0
    }
  }
}

minecraft:bucket

  • The entity target in the entity field now only accepts an entity type instead of an entity initialiser.

So if you had this:

{
  "minecraft:bucket": {
    "emptying_sound_event": "minecraft:item.bucket.empty_fish",
    "entity": {
      "entity": {
        "type": "minecraft:pufferfish"
      },
      "require_other_successful_placement": true
    },
    "fluid": "minecraft:water",
    "transforms_into": "minecraft:bucket"
  }
}

You now have to use this instead:

{
  "minecraft:bucket": {
    "emptying_sound_event": "minecraft:item.bucket.empty_fish",
    "entity": {
      "entity": "minecraft:pufferfish",
      "require_other_successful_placement": true
    },
    "fluid": "minecraft:water",
    "transforms_into": "minecraft:bucket"
  }
}

minecraft:entity

  • The entity field now only accepts an entity type instead of an entity initialiser.

So if you had this:

{
  "minecraft:entity": {
    "entity": {
      "type": "minecraft:oak_boat"
    }
  }
}

You now have to use this instead:

{
  "minecraft:entity": {
    "entity": "minecraft:oak_boat"
  }
}

minecraft:playable

  • Renamed instruments to default_instrument and now only accepts one instrument.

minecraft:projectile

  • The entity field now only accepts an entity type instead of an entity initialiser.

So if you had this:

{
  "minecraft:projectile": {
    "entity": {
      "type": "minecraft:trident"
    }
  }
}

You now have to use this instead:

{
  "minecraft:projectile": {
    "entity": "minecraft:trident"
  }
}
  • Added an optional components field, which is a set of components to apply to the spawned entity.

Example:

{
  "minecraft:projectile": {
    "components": {
      "minecraft:chicken/variant": "minecraft:cold"
    },
    "entity": "minecraft:egg"
  }
}

minecraft:text_holder

  • Now opens a book on use directly instead of needing an action.

minecraft:trim_material_provider

  • Provides a trim material for use in recipes.
  • Its value is an id pointing to a trim material.
  • This value can be changed for individual item stacks in the new minecraft:provides_trim_material data component.

Example:

{
  "minecraft:trim_material_provider": "minecraft:diamond"
}

minecraft:weapon

  • Renamed the damage_per_attack field to item_damage_per_attack.
  • Added the disable_blocking_for_seconds field.
    • Disables blocking when used on a target wielding an item that is attack blocking.
    • Its value is a non-negative float.

Actions

  • Removed action context parameters in favour of entity targets and new position targets.
    • These values need to be updated accordingly.
    • There is more information on this in the Entity Targets section below.

So if you had this:

{
  "type": "minecraft:play_sound",
  "category": "neutral",
  "pitch": 1.0,
  "position": "this",
  "sound": "minecraft:item.bottle.fill",
  "volume": 1.0
}

You now have to use this instead:

{
  "type": "minecraft:play_sound",
  "category": "neutral",
  "pitch": 1.0,
  "position": "origin",
  "sound": "minecraft:item.bottle.fill",
  "volume": 1.0
}
  • Various actions gained fields for entity targets.
  • Exchanging stacks now works in more places and in more contexts.
  • Simplified action requirements to only take a predicate due to the migration towards context parameters.

So if you had this:

{
  "requirements": {
    "conditions": {
      "condition": "minecraft:location_check",
      "predicate": {
        "block": {
          "blocks": "minecraft:respawn_anchor"
        }
      }
    },
    "context": {
      "entity": "this",
      "position": "target"
    }
  }
}

You now have to use this instead:

{
  "requirements": {
    "condition": "minecraft:location_check",
    "position": "interacted",
    "predicate": {
      "block": {
        "blocks": "minecraft:respawn_anchor"
      }
    }
  }
}
  • Removed the following actions:
    • minecraft:open_book_from_item
      • This is now part of the minecraft:text_holder item behaviour component.
    • minecraft:saddle_entity_at_position
      • This has been replaced by equipment and minecraft:equip_entity_at_position should be used instead.
    • minecraft:set_item_pointer_location
      • This has been moved to an item modifier.

minecraft:attach_leashed_entities_on_block

  • Added a new field called position:
    • Its value is a position target and determines the position the leashed entities will be attached to.

minecraft:damage_item

  • Removed the ignore_game_mode field.
    • The action now always takes the game mode into account.

minecraft:drop_item_from_block

  • Changed the item field to take an item stack instead of an item.

minecraft:exchange_item

  • Changed the item field to take an item stack instead of an item.
  • Removed the components field.
    • The components are now defined in the item field instead.

So if you had this:

{
  "type": "minecraft:exchange_item",
  "components": {
    "minecraft:potion_contents": {
      "potion": "minecraft:water"
    }
  },
  "item": "minecraft:potion"
}

You now have to use this instead:

{
  "type": "minecraft:exchange_item",
  "item": {
    "id": "minecraft:potion",
    "components": {
      "minecraft:potion_contents": {
        "potion": "minecraft:water"
      }
    },
    "count": 1
  }
}

minecraft:fertilize

  • Added a new field called position:
    • Its value is a position target and determines the position to fertilize.

minecraft:modify_item

  • Removed the context field.
    • The item modifier now uses the exact same context as the action.
    • Added the stack field, which is an item stack target to use a specific item stack from the context.

minecraft:prime_tnt

  • Does not prime tnt when the tntExplodes game rule is disabled.
  • Turns any block into primed TNT now instead of just TNT.
    • The block that is primed is used for the display.
  • Checking for the TNT block must be done in the action requirements now.

So if you had this:

{
  "action": {
    "type": "minecraft:prime_tnt",
    "position": "target"
  }
}

You now have to use this instead:

{
  "action": {
    "type": "minecraft:prime_tnt",
    "position": "interacted"
  },
  "requirements": {
    "condition": "minecraft:location_check",
    "position": "interacted",
    "predicate": {
      "block": {
        "blocks": "minecraft:tnt"
      }
    }
  }
}

minecraft:run_function

  • Moved the entity and position fields up due to the removal of action context parameters.

So if you had this:

{
  "type": "minecraft:run_function",
  "function": "example:function",
  "context": {
    "entity": "this",
    "position": "this"
  }
}

You now have to use this instead:

{
  "type": "minecraft:run_function",
  "function": "example:function",
  "entity": "this",
  "position": "origin"
}
  • Both fields are optional now and will never try to pass the parameter if not specified.

So if you only want the position context you can use this:

{
  "type": "minecraft:run_function",
  "function": "example:function",
  "position": "origin"
}

minecraft:sequence

  • Now no longer incorrectly reports duplicate actions defined in the same sequence as recursive.

minecraft:swing_hand

  • Added a new field called entity:
    • Its value is an entity target and determines whose hand to swing.

Predicates

  • Added a minecraft:villager entity sub-predicate, which is a temporary solution that will be removed once a component predicate for a Villager's type has been added (alongside data-driven trades as those will be part of vanilla by then)
    • Fields:
      • variant, which is a Villager variant, list of Villager variants or hash-prefixed Villager variant tag and the Villager's variant must match in order to pass.

Example:

{
  "type": "minecraft:villager",
  "variant": [
    "minecraft:swamp",
    "minecraft:snow",
    "minecraft:plains"
  ]
}

minecraft:location_check

  • Added a new optional field called position:
    • Its value is a position target and is the position to retrieve to use for the check.
    • Its default value is "origin" to match existing behaviour.
    • Fails if the position defined is not present in the context.

Example:

{
  "condition": "minecraft:location_check",
  "position": "interacted",
  "predicate": {
    "block": {
      "blocks": "minecraft:tnt"
    }
  }
}

Item Modifiers

minecraft:set_item_pointer_location

  • Sets the minecraft:lodestone_tracker data component to the provided position.
  • Fields:
    • position, which is a position target to use as the item pointer location.

Example:

{
  "function": "minecraft:set_item_pointer_location",
  "position": "interacted"
},

minecraft:split

  • Splits the item stack into the original and one with the provided count.
  • Fields:
    • count, which is a number provider to split the item stack into one with the provided new count.

Example:

{
  "count": 1.0,
  "function": "minecraft:split"
}

Context Parameters

Added the following context parameters from the migration:

  • minecraft:side, which is the side of a block that was interacted with.
    • Passed in the minecraft:bucket item behaviour.
    • Passed in the minecraft:entity item behaviour.
    • Used in dispense behaviour to interact with the Dispenser's facing direction.
    • Used in the minecraft:side_check predicate.
    • Used in the minecraft:drop_item_from_block action.
    • Used in the minecraft:fertilize action.
    • Used in the minecraft:use_bucket action.
  • minecraft:interacted_position, which is the position that the user interacted with.
    • Passed and used in various item behaviour.
    • Used in dispense behaviour to interact with the Dispenser's output position.
  • minecraft:equipment_slot, which is used when an item is broken.
  • minecraft:hand, which is the hand used to execute an action.
    • Passed to various item events when an item is being used.
    • Used in the minecraft:swing_hand action to swing the hand.
    • Used in the minecraft:open_book_from_item action to get the book from the executing entity.
  • minecraft:target_entity, which is the entity that was interacted with.
    • Used in the minecraft:entity and minecraft:throwable item behaviour for the spawned entities.
    • Passed to the minecraft:hit_entity and minecraft:use_weapon item events for the attacked entity.
    • Passed to the minecraft:use_on_entity item event for the interacted entity.

Action context parameters were replaced with new targets to be consistent with vanilla. This means that all parameters are now passed to loot tables, item modifiers and predicates instead of having to select specific ones using action context parameters, which were removed as well. This also means that you may need to update the value of certain fields. All changes are visible below.

Entity Targets

Old New Context Parameter
"this" "this" minecraft:this_entity
"target" "target_entity" minecraft:target_entity

So if you had this:

{
  "type": "minecraft:set_entity_name_from_item",
  "entity": "target"
}

You now have to use this instead:

{
  "type": "minecraft:set_entity_name_from_item",
  "entity": "target_entity"
}

Position Targets

Old New Context Parameter
"this" "origin" minecraft:origin
"target" "interacted" minecraft:interacted_position

So if you had this:

{
  "type": "minecraft:set_block_state",
  "position": "target",
  "state": {
    "Name": "minecraft:farmland",
    "Properties": {
      "moisture": "0"
    }
  }
}

You now have to use this instead:

{
  "type": "minecraft:set_block_state",
  "position": "interacted",
  "state": {
    "Name": "minecraft:farmland",
    "Properties": {
      "moisture": "0"
    }
  }
}

Item Stack Targets

These are new and point to item stacks to use from the context. Currently the only available value is tool, which points to the minecraft:tool context parameter.

Trades

  • Added an optional merchant_predicate field, which is a predicate that must pass in order for the trade to be considered of a merchant's trade set.

Fixes

  • The minecraft:charge_type property now works correctly again on item assets.

Комментарии

Загружаем…