In this preview version the weapon item behaviour was expanded significantly, with some changes to entity behaviour on top of it.
Changes
Entities
- Mobs that don't have a base attack damage of 1 will now deal less damage when using weapons.
- The only exception to this currently is for Piglins, Piglin Brutes and Zombified Piglins when they use one of the following items as a weapon:
- Golden Axe
- Golden Hoe
- Golden Pickaxe
- Golden Shovel
- Golden Sword
- The only exception to this currently is for Piglins, Piglin Brutes and Zombified Piglins when they use one of the following items as a weapon:
Item Behaviour Components
minecraft:weapon
- Made changes to the
attack_damagefield:- It now uses rules instead of a hard amount, similar to the mining speed rules in
minecraft:tool.- Format:
default_damage: A non-negative double. The default damage to deal to an entity. This value is absolute and thus consistent for all weapon users, unless specified so by the rules.rules: A list of weapon rules. See the weapon rules section below for more information.
- Its value for a specific item stack may be overwritten with the new
minecraft:weapon_attack_damagedata component.
- Format:
- It now uses rules instead of a hard amount, similar to the mining speed rules in
- Made changes to the
attack_speedfield:- It is now a multiplier instead of a relative amount.
- Format: A non-negative double.
- Its value for a specific item stack may be overwritten with the new
minecraft:attack_speed_multiplierdata component.
- Its value for a specific item stack may be overwritten with the new
- Note that while it can be set to 0, this does not prevent a Player from using the weapon altogether, just from loading the weapon to its full power. To prevent attacking, use an attack damage of 0 instead.
- Both of these fields are now taken into account separately and are no longer attribute modifiers.
An example based on the minecraft:golden_sword item that sets the damage to 0 when the durability is 1:
{
"minecraft:weapon": {
"attack_damage": {
"default_damage": 4.0,
"rules": [
{
"add_base": false,
"damage": 0.0,
"item": {
"predicates": {
"minecraft:damage": {
"durability": 1
}
}
}
},
{
"add_base": true,
"damage": 3.0,
"entities": "#minecraft:proficient_with_golden_weapons"
}
]
},
"attack_speed": 0.4
}
}
Data Components
- Added the following data components:
minecraft:attack_speed_multiplierminecraft:weapon_attack_damage
minecraft:attack_speed_multiplier
- Specified and used by the
minecraft:weaponbehaviour component. - If removed, a multiplier of 1 will be used instead.
- Its value is a non-negative double.
minecraft:weapon_attack_damage
- Specified and used by the
minecraft:weaponbehaviour component. - If removed, the base attack damage from its user will be used instead.
- Its value is the same as the
attack_damagefield from theminecraft:weaponbehaviour component.
Example:
{
"default_damage": 4.0,
"rules": [
{
"add_base": true,
"damage": 3.0,
"entities": "#minecraft:proficient_with_golden_weapons"
}
]
}
Weapon Rules
A weapon rule dictates what damage amount should be used and whether it should add the entity's base attack damage on top of the weapon's damage or not.
Fields
entities: An optional entity type, list of entity types or hash-prefixed entity type tag. When specified, has to be used by the entity types specified in order for the rule to be used.item: An optional item predicate. When specified, the item stack has to match the predicate in order for the rule to be used.damage: An optional non-negative double. When specified, will be used as the weapon's damage instead of the default amount.add_base: An optional boolean. When specified, determines whether to add its user's baseminecraft:generic.attack_damageattribute value to the weapon's damage.
Example
{
"add_base": true,
"damage": 3.0,
"entities": "#minecraft:proficient_with_golden_weapons"
}
Time for another content preview for Itematic. In this preview version the tool item behaviour was expanded slightly.
Changes
Item Behaviour Components
minecraft:tool
- Made changes to the tool rules:
- Added an optional
itemfield, which is an item predicate that checks the item stack that is used as a tool. - Made the
blocksfield optional. - Allowed 0 for the tool speed instead of it being strictly positive.
- Added an optional
- These changes were made in favour of expanding the behaviour of the
preserve_itemfield inminecraft:damageableas this can be controlled more precisely than a simple boolean and keeps the mining behaviour in this behaviour component.- Note that this behaviour can still be combined with the
preserve_itemfield to prevent the item from breaking and from being used as a tool altogether, which is likely preferred as an item stack may not necessarily be damaged by exactly one point.
- Note that this behaviour can still be combined with the
An example based on the minecraft:iron_pickaxe item that sets the mining speed to 0 when the durability is 1:
{
"minecraft:tool": {
"rules": [
{
"item": {
"predicates": {
"minecraft:damage": {
"durability": 1
}
}
},
"speed": 0.0
},
{
"blocks": "#minecraft:incorrect_for_iron_tool",
"correct_for_drops": false
},
{
"blocks": "#minecraft:mineable/pickaxe",
"correct_for_drops": true,
"speed": 6.0
}
]
}
}
Data Components
minecraft:tool
- Has the same changes as the
minecraft:toolbehaviour component.
The very first content preview for Itematic! In this preview version the useable item behaviour was unified.
Changes
Item Behaviour Components
The useable behaviour was merged together and removed from some other components. This makes it so other behaviour components no longer start using an item on their own.
minecraft:shooter
- This component no longer makes its user start using the item on its own and now requires
minecraft:useable.- An integer provider named
minecraft:shooterwas added that can be used in its place.
- An integer provider named
- Changed the
ammunitionandheld_ammunitionfields to be registry entry lists instead of tags.- This means that these entries now require an additional
#prefix to use a tag.- For example,
minecraft:bow_ammunitionshould now be#minecraft:bow_ammunition.
- For example,
- This data is modifiable on specific item stacks with the
minecraft:shooter_ammunitionandminecraft:shooter_held_ammunitiondata components respectively.
- This means that these entries now require an additional
So if you had this:
{
"minecraft:shooter": {
"ammunition": "minecraft:bow_ammunition",
"held_ammunition": "minecraft:bow_ammunition",
"range": 15
}
}
You now have to use this instead:
{
"minecraft:shooter": {
"ammunition": "#minecraft:bow_ammunition",
"held_ammunition": "#minecraft:bow_ammunition",
"range": 15
},
"minecraft:useable": {
"ticks": {
"type": "minecraft:shooter"
}
}
}
minecraft:throwable
- This component no longer makes its user start using the item on its own when
draw_durationis defined and now requiresminecraft:useable.- The
draw_durationfield is now only used to check whether its user has been using the item for the specified duration when they stop using the item. - An integer provider named
minecraft:tridentwas added that can be used in its place.
- The
- Removed the
use_riptide_checkfield as this is now part of an integer provider namedminecraft:tridentinstead, which can be used in its place inminecraft:useable.
So if you had this:
{
"minecraft:throwable": {
"angle_offset": 0.0,
"draw_duration": {
"min": 10
},
"speed": 2.5,
"use_riptide_check": true
}
}
You now have to use this instead:
{
"minecraft:throwable": {
"angle_offset": 0.0,
"draw_duration": {
"min": 10
},
"speed": 2.5
},
"minecraft:useable": {
"ticks": {
"type": "minecraft:trident"
}
}
}
minecraft:use_animation
- Removed this component as it was not behaviour.
- It is now a field inside the
minecraft:useablecomponent instead.
- It is now a field inside the
minecraft:useable
- Changed the
ticksfield to take a provider of a hard amount.- This allows for more dynamic use durations that may be context-dependent.
- The field is optional. When it is not specified, the item will be used indefinitely.
- The field still allows a direct constant amount, just like before.
- This data is modifiable on specific item stacks with the
minecraft:use_durationdata component. - See the Use Integer Providers section further down for more information.
- Moved the value from
minecraft:use_animationto this component in the optionalanimationfield.- Possible values:
blockbowbrushcrossbowdrinkeatnonespearspyglasstoot_horn
- If not specified, it will use
noneinstead. - This data is modifiable on specific item stacks with the
minecraft:use_animationdata component.
- Possible values:
- Added an optional
passesfield, which is a list of strings that allows its user to start using the item given a certain context.- The default value is
["normal"]. - Possible values:
normal: Allows the user to start using the item as-is.block: Allows the user to start using the item when used on a block.entity: Allows the user to start using the item when used on an entity.
- This behaviour is used for the Brush to only start brushing when used on a block.
- Example from
minecraft:brush:{ "minecraft:useable": { "passes": [ "block" ], "ticks": { "type": "minecraft:constant", "amount": 200 } } }
- The default value is
So if you had this:
{
"minecraft:use_animation": "eat",
"minecraft:useable": {
"ticks": 32
}
}
You now have to use this instead:
{
"minecraft:useable": {
"animation": "eat",
"ticks": 32
}
}
Data Components
- Added the following data components:
minecraft:shooter_ammunitionminecraft:shooter_held_ammunitionminecraft:use_animationminecraft:use_duration
minecraft:shooter_ammunition and minecraft:shooter_held_ammunition
- Specified and used by the
minecraft:shooterbehaviour component. - If removed, the
minecraft:shooterbehaviour will no longer work. - Its value is an item, list of items or hash-prefixed item tag.
Examples:
{
"minecraft:shooter_ammunition": "#minecraft:bow_ammunition"
}
{
"minecraft:shooter_held_ammunition": "#minecraft:crossbow_ammunition"
}
minecraft:use_animation
- Specified and used by the
minecraft:useablebehaviour component. - If removed, the
noneanimation will be used instead. - Its value is the same one as the one specified previously in the
minecraft:use_animationitem component and are also specified in theminecraft:useablebehaviour changes. Examples:
{
"minecraft:use_animation": "eat"
}
{
"minecraft:use_animation": "drink"
}
minecraft:use_duration
- Specified and used by the
minecraft:useablebehaviour component. - If removed, the
minecraft:useablebehaviour will no longer work. - The format is the same as the map specified in the
minecraft:useablebehaviour component, with one addition, that being that it allows for a single integer as another shorthand.
Examples:
- Constant duration, simplest form.
{
"minecraft:use_duration": 10
}
- Constant duration, expanded form.
{
"minecraft:use_duration": {
"ticks": 10
}
}
- Indefinite duration.
{
"minecraft:use_duration": {}
}
- Constant duration as a provider. See the Use Integer Providers section further down for more information.
{
"minecraft:use_duration": {
"ticks": {
"type": "minecraft:constant",
"amount": 10
}
}
}
Actions
- Removed
minecraft:start_using_item.- Its behaviour is moved entirely to
minecraft:useableand should be used in its place instead.
- Its behaviour is moved entirely to
Use Integer Providers
These providers are added so the use duration is not hardcoded for specific behaviour components by using different sources.
The integer provider type is determined by the type field and all types are shown below.
An integer provider may return an empty value, in which case the user will not start using the item.
minecraft:constant
Uses the item for a constant duration.
Fields
amount: A positive integer. How long to use the item for.
Example
{
"type": "minecraft:constant",
"amount": 32
}
minecraft:playable
Uses the minecraft:playable item behaviour component to get the use duration from the minecraft:instrument data component or from a default set of instruments as defined by minecraft:playable otherwise.
Has no additional fields.
Example
{
"type": "minecraft:playable"
}
minecraft:shooter
Uses the minecraft:shooter item behaviour component to use the item indefinitely if the user is either holding ammunition as defined by the minecraft:shooter_held_ammunition data component or has ammunition in their inventory as defined by the minecraft:shooter_ammunition data component.
Has no additional fields.
Example
{
"type": "minecraft:shooter"
}
minecraft:trident
Uses the item indefinitely if the item stack has the Riptide enchantment and is either not damageable or not in a broken state and if its user is touching water or rain. Has no additional fields.
Example
{
"type": "minecraft:trident"
}
minecraft:condition
Uses the item for the ticks specified in the amount field if the specified condition passes.
Fields
amount: An integer provider. How long to use the item for if the condition passes.condition: An item predicate. The condition to pass before its user can start using the item.
Example
{
"type": "minecraft:condition",
"amount": 100,
"condition": {
"count": {
"min": 3
}
}
}
Fixes the game crashing when opening the inventory.
Initial release.


