In this preview version the item holder behaviour was expanded and a new resource pack feature for item bars was added.
Changes
Assets
- Added textures for the item bar progress.
Items
- Added the optional
item_bar_stylefield to the item base.- Has a default value of
minecraft:damage. - Its value is an id referencing an item bar style in a resource pack.
- This value can be changed for individual item stacks in the new
minecraft:item_bar_styledata component.
- Has a default value of
Example:
{
"base": {
"item_bar_style": "minecraft:bundle",
"translation_key": "item.minecraft.bundle"
}
}
Item Behaviour Components
minecraft:item_holder
- Added a new field called
rules:- Its value is a list of item holder rules and determines whether an item stack can be added or not and decides how much room it takes.
- See the item holder rules section for more information.
- If no rule is picked, the inverse of its maximum stack size will be used instead.
- Its value for a specific item stack may be overwritten in the new
rulesfield in theminecraft:bundle_contentsdata component.
- Its value is a list of item holder rules and determines whether an item stack can be added or not and decides how much room it takes.
An example from the minecraft:bundle item:
[
{
"type": "minecraft:reject",
"condition": {
"items": "#minecraft:banned_bundle_items"
}
},
{
"type": "minecraft:fraction_with_occupancy_held_items",
"condition": {
"behavior": [
"minecraft:item_holder"
]
},
"fraction": {
"denominator": 16,
"numerator": 1
}
},
{
"type": "minecraft:fraction",
"condition": {
"data_components": [
"minecraft:bees"
]
},
"fraction": {
"denominator": 1,
"numerator": 1
}
}
]
- Made changes to the
capacityfield:- Its value is now a positive fraction that is capped at a value of 100 and determines how many 'full stacks' an item holder can hold.
- See the extras section for more information on fractions.
- Its value for a specific item stack may be overwritten with the new
minecraft:item_holder_capacitydata component.
- Its value is now a positive fraction that is capped at a value of 100 and determines how many 'full stacks' an item holder can hold.
Example:
{
"denominator": 4,
"numerator": 1
}
Data Components
- Added the following data components:
minecraft:item_bar_styleminecraft:item_holder_capacity
minecraft:bundle_contents
- Now has an expanded form to make room for the new item holder rules.
- This form will always be used when saved.
- Fields:
rules: A list of rules to apply to added item stacks. See the item holder rules section for more information.items: The same list of item stacks as before.
Example:
{
"rules": [
{
"type": "minecraft:reject",
"condition": {
"items": "#minecraft:banned_bundle_items"
}
}
],
"items": [
{
"item": "minecraft:stick",
"count": 4
},
{
"item": "minecraft:cobblestone",
"count": 6
}
]
}
minecraft:item_bar_style
- Specified and used by the item base.
- If removed, will not display an item bar style under any circumstances.
- Its value is an id referencing an item bar style in a resource pack.
minecraft:item_holder_capacity
- Specified and used by the
minecraft:item_holderbehaviour component. - If removed, the item holder behaviour will no longer work.
- Its value is a positive fraction that is capped at a value of 100 and determines how many 'full stacks' an item holder can hold.
- See the extras section for more information on fractions and its format.
Examples:
{"numerator": 1, "denominator": 1}(1/1) would be able to hold 64 item stacks of items stackable to 64.{"numerator": 2, "denominator": 1}(2/1) would be able to hold 128 item stacks of items stackable to 64.{"numerator": 1, "denominator": 2}(1/2) would be able to hold 32 item stacks of items stackable to 64.
Item Bar Styles
An item bar style determines the visuals for the item bar that is displayed on top of an item stack.
They are specified under the item_bar_style folder in a resource pack.
Format:
color: A colour provider. Determines the colour to apply over the texture based on its progress. See the colour providers section for more information.progress: A progress provider. Determines what texture to use from thetexturesfield. See the progress providers section for more information.textures: A non-empty list of ids pointing to textures in theminecraft:guiatlas. The textures to use for the item bar.- The texture used is determined by the
progressfield, with a value of 0 being the first element and a value of 1 being the last element in the list.
- The texture used is determined by the
Example:
{
"color": {
"type": "minecraft:hue_shift",
"end": 0,
"start": 120
},
"progress": "minecraft:damage",
"textures": [
"minecraft:item_bar/progress/13",
"minecraft:item_bar/progress/12",
"minecraft:item_bar/progress/11",
"minecraft:item_bar/progress/10",
"minecraft:item_bar/progress/9",
"minecraft:item_bar/progress/8",
"minecraft:item_bar/progress/7",
"minecraft:item_bar/progress/6",
"minecraft:item_bar/progress/5",
"minecraft:item_bar/progress/4",
"minecraft:item_bar/progress/3",
"minecraft:item_bar/progress/2",
"minecraft:item_bar/progress/1",
"minecraft:item_bar/progress/0"
]
}
Colour Providers
A colour provider determines the colour to apply over the texture.
Format: A map with fields determined by the type in the type field.
Example:
{
"type": "minecraft:hue_shift",
"end": 0,
"start": 120
}
minecraft:constant
- Always applies the specified colour over the texture.
- Fields:
color: An integer. The colour to use.
minecraft:hue_shift
- Linearly shifts the hue from
starttoenddepending on the progress. Always has a saturation and brightness of 100%. - Fields:
start: An integer ranging from 0 to 360. The start hue, used exactly when the progress is 0.end: An integer ranging from 0 to 360. The end hue, used exactly when the progress is 1.
Progress Providers
A progress provider determines whether to display the item bar and what value to use that determines its texture.
minecraft:damage
- Displays when the item stack is damaged.
- Its value is the damage of the item stack divided by its durability.
minecraft:item_holder_occupancy
- Displays when the item stack's item holder contents are occupied.
- Its value is the occupancy calculated by the item stack's item holder contents.
Item Holder Rules
An item holder rule determines whether an item stack can be added to an item holder or not and decides how much room it takes.
Its format is a map with fields determined by the type in the type field, as well as an optional condition field that is an item predicate.
All possible types are shown below.
Example:
{
"type": "minecraft:reject",
"condition": {
"items": "#minecraft:banned_bundle_items"
}
}
minecraft:fraction
- Uses the specified fraction as its occupancy.
- Fields:
fraction: A positive fraction that is capped at a value of 100. The fraction to use as its occupancy.
Example:
{
"type": "minecraft:fraction",
"condition": {
"data_components": [
"minecraft:bees"
]
},
"fraction": {
"denominator": 1,
"numerator": 1
}
}
minecraft:fraction_with_occupancy_held_items
- Uses the occupancy of the item stack's item holder item stacks with a penalty added on top of it.
- If the item stack does not have the
minecraft:item_holderbehaviour component or doesn't have theminecraft:bundle_contentsdata component, it will only add the penalty. - Fields:
fraction: A positive fraction that is capped at a value of 100. The penalty to add to the occupancy.
Example:
{
"type": "minecraft:fraction_with_occupancy_held_items",
"condition": {
"behavior": [
"minecraft:item_holder"
]
},
"fraction": {
"denominator": 16,
"numerator": 1
}
}
minecraft:reject
- Prevents the item stack from being added to the item holder altogether.
- Has no additional fields.
Example:
{
"type": "minecraft:reject",
"condition": {
"items": "#minecraft:banned_bundle_items"
}
}
Extras
Fractions
- A way of representing fractions to keep accuracy of numbers where this is necessary.
- Fields:
numerator: An integer used for the numerator of the fraction.denominator: An integer used for the denominator of the fraction.
- Fails to parse the denominator is 0.
Example:
{
"denominator": 4,
"numerator": 1
}
Item Predicates
- Added the following fields:
behavior: An optional list of behaviour component types. Checks whether the item has the specified item behaviour components.data_components: An optional list of data component types. Checks whether the item stack has the specified data components.- Note: this field is temporary and will be removed sometime in 1.21 in favour of component predicates!
The very first content release for Itematic! This version has a lot of changes regarding tools and weapons to expand their rules and ways to use them!
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
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. The tool behaviour was expanded to add more rules. On top of that, the weapon behaviour now also has similar rules.
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:tool
- Made changes to the tool rules:
- Added an optional
itemfield, which is an item predicate. - 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
}
]
}
}
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 below 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
}
}
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:shooter_ammunitionminecraft:shooter_held_ammunitionminecraft:use_animationminecraft:use_durationminecraft:weapon_attack_damageAlso made changes to some existing data components.
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: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:tool
- Has the same changes as the
minecraft:toolbehaviour component.
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
}
}
}
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.
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
}
}
}
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"
}
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.


