API reference / @jsprismarine/items
@jsprismarine/items
The item definition and component runtime. It implements Java Edition 26.3's item data component system on top of @jsprismarine/content, and hands the result out under Bedrock item identifiers.
Two sentences describe the whole package. An item type is a Bedrock identifier carrying the Java default components of the Java item that maps onto it. An item stack is a reference to one of those types, a count, and a component patch layered over the type's defaults.
Why identity is Bedrock and properties are Java
The client decides identity. A Bedrock client knows an item by the identifier the server sends in ItemRegistryPacket, and it will not render or name an item it has no entry for, so the server's item table has to be Bedrock's. The server decides properties. Nothing in either Bedrock pack format publishes nutrition, durability, mining speed or burn time for vanilla items, while Mojang's Java data generator publishes all of them for all 1658 Java items. That is the plan's decision in sections 2 and 4, and this package is the join: 1658 Java items go in through @jsprismarine/mapping, 1605 Bedrock identifiers come out with components attached.
Nothing here knows that two editions exist at runtime. The join runs once in the generator and the committed table is Bedrock-keyed, so the mapping package is a development dependency rather than a runtime one.
The item loader also keeps Bedrock behavior pack data separate: ItemType.bedrockComponents holds the raw component bodies, and ItemType.tags plus hasTag(name) expose the active Bedrock tags. ItemStack.getTags() and ItemStack.hasTag(name) read the same tags from the stack's type. These do not replace or reinterpret Java's default components, and retaining a body does not imply that the server executes its behavior. Java datapack item memberships are available as ItemType.javaTags and hasJavaTag(name), and as ItemStack.getJavaTags() and hasJavaTag(name) on a stack.
The Java component model
Java 1.20.5 replaced the tag NBT blob with structured components, and 26.3 registers 122 of them in minecraft:data_component_type. The catalog in src/components/ implements all 122, split the way vanilla uses them, with each number measured from the pinned data generator output rather than chosen:
| Group | Count | File |
|---|---|---|
| A default on every one of the 1658 items | 13 | components/universal.ts |
| A default on some items | 56 | components/defaults.ts |
| Only ever on an individual stack | 53 | components/stackOnly.ts |
Each component is a ComponentFactory with a parser for its value, built from the combinators in schema.ts. The parsers are strict about the fields they know and lenient about fields they do not, because Mojang adds a field to a component within a release and a schema that rejected one would turn a data refresh into a load failure. Two components, minecraft:sulfur_cube_content and minecraft:waxed, have no vanilla default and appear in no vanilla data file, so their shape is unverified against the pinned sources; they are listed in UNVERIFIED_SHAPE_COMPONENTS.
26.3 also moved fuel, compost and brewing numbers behind the context_int_provider and context_float_provider registries, so minecraft:cooking_fuel on a boat reads {"burn_time": "minecraft:cooking/time_boats"} and that file is a division by a conditional over two more files. The generator copies the 30 definitions item components reach into the table, and numberProvider.ts evaluates one: minecraft:cooking/time_boats is 1200 ticks in a furnace and 600 in a smoker, and minecraft:compostable/low is 0.3, the expected value of its weighted list.
Item stacks and the component patch
An ItemStack is a content Instance: a holder for its type, a count, and a patch. Reading a component reads the patch first and the type's defaults second, which is Java's PatchedDataComponentMap. A patch entry can also remove a default, which is the !component marker Java's command grammar writes, and removal is a separate entry rather than an absence so it survives a round trip.
import { food, ItemStack, loadItemTypes } from '@jsprismarine/items';
const { registry } = loadItemTypes();
const apple = new ItemStack(registry.holder('minecraft:apple'), 16);
apple.params(food); // { nutrition: 4, saturation: 2.4 }, from the type
apple.remove('minecraft:food'); // now undefined, and the patch records the removalEquality follows from the patch, not from comparing NBT. sameItemSameComponents compares the item and then the patch, which is what ItemStack.isSameItemSameComponents does in the pinned 26.3 server jar: it calls Objects.equals on two PatchedDataComponentMaps, whose own equals compares the prototype and the patch map. One consequence is worth stating because it looks like a bug. Setting a component to the value the type already defaults to produces a stack that reads the same as an untouched one and does not stack with it. That is Java's behavior, verified by disassembly, and canStack and mergeStacks inherit it.
The hook seam
Item behavior does not live in this package. The seven hooks in hooks.ts are the seam the behavior families plug into, and they carry Mojang's ItemCustomComponent names unchanged so a future script host maps onto them one name at a time:
interface ItemHooks {
onUse: (event: ItemUseEvent) => ItemUseResult | undefined;
onUseOn: (event: ItemUseOnEvent) => ItemUseResult | undefined;
onMineBlock: (event: ItemMineBlockEvent) => void;
onHitEntity: (event: ItemHitEntityEvent) => void;
onBeforeDurabilityDamage: (event: ItemBeforeDurabilityDamageEvent) => number | undefined;
onCompleteUse: (event: ItemCompleteUseEvent) => ItemUseResult | undefined;
onConsume: (event: ItemConsumeEvent) => ItemUseResult | undefined;
}Two deliberate differences from Mojang's interface. Each event carries this package's ItemStack rather than a scripting handle, and the hooks a caller can cancel return a value instead of mutating the event, because HookTable.dispatchFirst decides who handled an interaction by the first result that is not undefined. The event types name the world with the smallest interfaces that work, ItemSource and BlockReference, so this package depends on no world implementation and a behavior that needs more narrows the value itself.
None of the 122 components declares a hook. Components are parsed data and behavior arrives as a Behavior attached by identifier or by tag, which is how one bucket behavior covers twelve buckets. Dispatch order is component order, then behaviors in attachment order, so the server's own code has the last word over what a pack declared.
The research counted roughly 30 item behaviors with no data expression in either edition, among them buckets, bows, crossbows, compasses, maps, leads, name tags, spyglasses, bone meal and fireworks. Those are the behavior agent's work; the components cover food, tools, weapons, armor, shields, gliders, totems, spears, fuel, compost and block transformation.
The Bedrock projection
projectItemToBedrock turns one resolved type into the component compound the Bedrock client needs. It does not send anything; ItemRegistryPacket belongs to the protocol package.
The two editions name the same facts differently, so every shape the projection writes is read off a Bedrock Dedicated Server 1.26.51.1 capture, the item_components.nbt golden in @jsprismarine/bedrock-data, rather than written from documentation. Java's max_damage becomes minecraft:durability.max_durability. Java's absolute food.saturation becomes Bedrock's saturation_modifier, the ratio it is computed from. Java has no enchanting category at all, so enchantableSlotOf derives one from the mineable/* tag in the item's tool rules, the equipment slot, or the spear, shield and glider components. The apple comes out with the same max_stack_size, use_duration, use_animation and food values the real server sends.
Keys with no Java source are left out rather than guessed, so the protocol layer can tell a derived value from a placeholder. BEDROCK_ONLY_ITEM_PROPERTIES lists the seven item_properties keys that come from the creative catalog, the resource pack or nothing at all. UNPROJECTED_BEDROCK_COMPONENTS remains as an explicit coverage list and is currently empty. The active Bedrock item definition's minecraft:block_placer body is also projected, including its block selector list and default behavior flags. Its explicit display name and icon, plus the type's resolved Bedrock tags, pass through as minecraft:display_name, minecraft:icon, and item_tags; Java minecraft:repairable item sets expand through the loaded Java item tags and map each member to its Bedrock identifier. Java minecraft:tool rules become Bedrock minecraft:digger rules: block tags expand through the loaded Java block tags, then each block maps to a Bedrock identifier. Bedrock documents digging speeds as integers, so the client projection rounds Java's fractional speeds and caps values above the signed integer range; server mining continues to use the original Java rules and speeds. Java tags are not emitted as Bedrock item_tags. The definition's scalar item components override the corresponding Java-derived registry values when present. The food remainder is available through an injected mapIdentifier.
Flattened facts
flattenItemFacts precomputes the five numbers a hot path reads into typed arrays indexed by the registry's dense item id: maximum stack size, maximum damage, whether the item is food, whether it is a tool, and the burn time in ticks. A furnace tick reads facts.burnTimeTicks[id] instead of walking a component list and evaluating a provider tree.
The exception list
Mapping 1658 Java items onto 1606 Bedrock identifiers loses rows two ways, and exceptions.ts accounts for both in nine reviewed rows covering 53 Java items.
Five rows are reviewed losses, the six items @jsprismarine/mapping already lists: the spectral arrow, the debug stick, the knowledge book, the furnace minecart and the two test blocks. A loss never contributes components, because writing the debug stick's properties onto the plain stick would give the fallback item the wrong behavior.
Four rows are merges, the 47 items that share a Bedrock identifier with another: 16 structure locator maps onto minecraft:filled_map, the tipped arrow onto minecraft:arrow, and 15 banner and 15 bed colors onto minecraft:banner and minecraft:bed. One Java item supplies each shared identifier's properties, picked by a deterministic rule: the item whose own identifier matches, then the lowest Bedrock damage value, then the first identifier alphabetically. The others are listed with the damage value that selects them, so nothing is dropped silently.
That leaves minecraft:unknown as the one Bedrock identifier of 1606 with no row, because the only Java items that reach it are the two test blocks.
The generator recomputes the set and refuses to emit when it disagrees with the file, so adding a row is how a maintainer accepts a new gap, and a row that stops matching fails the build.
Regenerating the table
src/tables/itemTypes.json is generated and committed. After a Java or Bedrock version bump:
pnpm --filter @jsprismarine/bedrock-data run fetch:sources
pnpm exec turbo run build --filter=@jsprismarine/mapping
pnpm --filter @jsprismarine/items run generate:item-typesThe generator runs Mojang's data generator against the hash-verified server jar when its reports are missing from the cache, which needs a JDK of at least version 25 (JAVA_HOME or JSP_JAVA_HOME). It refuses to emit when a Java item has neither a mapping nor a reviewed exception, when a component name is not in the pinned registry report, when a produced Bedrock identifier is missing from the captured item table, or when the computed exceptions disagree with src/exceptions.ts.
Tests
vitest run covers the catalog, the patch model, hook dispatch order, the generated table, the flattened facts and the projection against the documented Bedrock component names. One test is gated: setting JSP_JAVA_REPORTS to the absolute path of the data generator's generated directory reparses all 1658 real item component files and asserts zero parse errors. From the repository root:
JSP_JAVA_REPORTS="$PWD/node_modules/.cache/jsprismarine/java-reports/26.3/generated" \
pnpm --filter @jsprismarine/items exec vitest runClasses
Interfaces
BedrockBlockPlacerComponent
Defined in: packages/items/src/projection.ts:154
The resolved Bedrock block placement component sent to the client.
Properties
alignedPlacement
readonlyalignedPlacement:boolean
Defined in: packages/items/src/projection.ts:158
Whether placement follows the player's alignment while interacting.
block?
readonlyoptionalblock?:string
Defined in: packages/items/src/projection.ts:156
The block placed when this item is used.
canUseBlockAsIcon
readonlycanUseBlockAsIcon:boolean
Defined in: packages/items/src/projection.ts:160
Whether the block supplies the item icon when no icon is declared.
replaceBlockItem
readonlyreplaceBlockItem:boolean
Defined in: packages/items/src/projection.ts:162
Whether this item is the default item returned for its block.
useOn
readonlyuseOn: readonly (string|BedrockItemBlockDescriptor)[]
Defined in: packages/items/src/projection.ts:164
Blocks on which the item may be used. Empty means all blocks.
BedrockDiggerComponent
Defined in: packages/items/src/projection.ts:136
The Bedrock digging rules projected from Java's minecraft:tool.
Properties
destroySpeeds
readonlydestroySpeeds: readonlyBedrockDiggerRule[]
Defined in: packages/items/src/projection.ts:138
The ordered block speeds the item applies while mining.
useEfficiency
readonlyuseEfficiency:boolean
Defined in: packages/items/src/projection.ts:140
Whether Bedrock applies its Efficiency enchantment bonus to this item.
BedrockDiggerRule
Defined in: packages/items/src/projection.ts:128
One Bedrock digging speed, resolved to a block the client knows.
Properties
block
readonlyblock:string
Defined in: packages/items/src/projection.ts:130
The Bedrock block identifier this speed applies to.
speed
readonlyspeed:number
Defined in: packages/items/src/projection.ts:132
The integer speed multiplier Bedrock's item component accepts.
BedrockItemBlockDescriptor
Defined in: packages/items/src/projection.ts:144
One block selector accepted by minecraft:block_placer.use_on.
Properties
name?
readonlyoptionalname?:string
Defined in: packages/items/src/projection.ts:146
The block identifier, when the selector names one block.
states?
readonlyoptionalstates?:Readonly<Record<string,string|number|boolean>>
Defined in: packages/items/src/projection.ts:148
The block state values that further narrow the named block.
tags?
readonlyoptionaltags?:string
Defined in: packages/items/src/projection.ts:150
The Bedrock query that selects blocks by their tags.
BedrockItemComponents
Defined in: packages/items/src/projection.ts:80
The compound an item's Item Component Data carries, keyed the way Bedrock keys it.
Properties
item_properties
item_properties:
BedrockItemProperties
Defined in: packages/items/src/projection.ts:81
item_tags?
optionalitem_tags?: readonlystring[]
Defined in: packages/items/src/projection.ts:83
Bedrock's resolved item tag names, serialized separately from named components.
minecraft:block_placer?
optionalminecraft:block_placer?:BedrockBlockPlacerComponent
Defined in: packages/items/src/projection.ts:85
The block a Bedrock-defined item places, with its placement restrictions.
minecraft:compostable?
optionalminecraft:compostable?:object
Defined in: packages/items/src/projection.ts:108
composting_chance
composting_chance:
number
minecraft:cooldown?
optionalminecraft:cooldown?:object
Defined in: packages/items/src/projection.ts:111
category
category:
string
duration
duration:
number
type
type:
string
minecraft:damage?
optionalminecraft:damage?:object
Defined in: packages/items/src/projection.ts:91
value
value:
number
minecraft:digger?
optionalminecraft:digger?:BedrockDiggerComponent
Defined in: packages/items/src/projection.ts:106
Java's tool rules, expanded and mapped to Bedrock block identifiers.
minecraft:display_name?
optionalminecraft:display_name?:object
Defined in: packages/items/src/projection.ts:87
The explicit display name from the active Bedrock item definition.
value
value:
string
minecraft:durability?
optionalminecraft:durability?:object
Defined in: packages/items/src/projection.ts:92
damage_chance
damage_chance:
object
damage_chance.max
max:
number
damage_chance.min
min:
number
max_durability
max_durability:
number
minecraft:enchantable?
optionalminecraft:enchantable?:object
Defined in: packages/items/src/projection.ts:93
slot
slot:
string
value
value:
number
minecraft:fire_resistant?
optionalminecraft:fire_resistant?:object
Defined in: packages/items/src/projection.ts:109
value
value:
boolean
minecraft:food?
optionalminecraft:food?:object
Defined in: packages/items/src/projection.ts:94
can_always_eat
can_always_eat:
boolean
nutrition
nutrition:
number
saturation_modifier
saturation_modifier:
number
using_converts_to?
optionalusing_converts_to?:string
minecraft:fuel?
optionalminecraft:fuel?:object
Defined in: packages/items/src/projection.ts:107
duration
duration:
number
minecraft:hand_equipped?
optionalminecraft:hand_equipped?:object
Defined in: packages/items/src/projection.ts:110
value
value:
boolean
minecraft:icon?
optionalminecraft:icon?:object
Defined in: packages/items/src/projection.ts:89
Resource pack icon textures declared by the active Bedrock item definition.
textures
textures:
Readonly<Record<string,string>>
minecraft:max_stack_size?
optionalminecraft:max_stack_size?:object
Defined in: packages/items/src/projection.ts:90
value
value:
number
minecraft:repairable?
optionalminecraft:repairable?:BedrockRepairableComponent
Defined in: packages/items/src/projection.ts:104
Java's repair materials, expanded and mapped to Bedrock item identifiers.
minecraft:use_animation?
optionalminecraft:use_animation?:object
Defined in: packages/items/src/projection.ts:101
value
value:
string
minecraft:use_duration?
optionalminecraft:use_duration?:number
Defined in: packages/items/src/projection.ts:100
minecraft:use_modifiers?
optionalminecraft:use_modifiers?:object
Defined in: packages/items/src/projection.ts:102
movement_modifier
movement_modifier:
number
use_duration
use_duration:
number
minecraft:wearable?
optionalminecraft:wearable?:object
Defined in: packages/items/src/projection.ts:112
protection
protection:
number
slot
slot:
string
BedrockItemProperties
Defined in: packages/items/src/projection.ts:48
The flat item_properties compound, with the nineteen keys a Bedrock Dedicated Server writes for a data-driven item. Only the keys Java's components decide are produced here; see BEDROCK_ONLY_ITEM_PROPERTIES.
Properties
allow_off_hand?
optionalallow_off_hand?:boolean
Defined in: packages/items/src/projection.ts:72
Whether the item can be held in the off hand.
can_destroy_in_creative?
optionalcan_destroy_in_creative?:boolean
Defined in: packages/items/src/projection.ts:66
Whether the item breaks blocks in creative mode.
damage?
optionaldamage?:number
Defined in: packages/items/src/projection.ts:52
Attack damage the item adds, in half hearts.
enchantable_slot?
optionalenchantable_slot?:string
Defined in: packages/items/src/projection.ts:58
Which enchanting table category the item belongs to, none when it takes none.
enchantable_value?
optionalenchantable_value?:number
Defined in: packages/items/src/projection.ts:60
The enchanting power the item brings.
foil?
optionalfoil?:boolean
Defined in: packages/items/src/projection.ts:56
Whether the enchantment glint is drawn regardless of enchantments.
hand_equipped?
optionalhand_equipped?:boolean
Defined in: packages/items/src/projection.ts:54
Whether the item is held out in front, which tools and weapons are.
liquid_clipped?
optionalliquid_clipped?:boolean
Defined in: packages/items/src/projection.ts:68
Whether the item can be used while a liquid occupies the target.
max_stack_size?
optionalmax_stack_size?:number
Defined in: packages/items/src/projection.ts:50
How many fit in a slot.
mining_speed?
optionalmining_speed?:number
Defined in: packages/items/src/projection.ts:70
The base mining speed multiplier.
should_despawn?
optionalshould_despawn?:boolean
Defined in: packages/items/src/projection.ts:74
Whether a dropped item stack despawns.
stacked_by_data?
optionalstacked_by_data?:boolean
Defined in: packages/items/src/projection.ts:76
Whether stacks with different auxiliary values stay separate.
use_animation?
optionaluse_animation?:number
Defined in: packages/items/src/projection.ts:64
The use animation id; 0 is none and 1 is eating.
use_duration?
optionaluse_duration?:number
Defined in: packages/items/src/projection.ts:62
How long a held use runs, in ticks.
BedrockItemTags
Defined in: packages/items/src/bedrockTags.ts:13
The merged Bedrock item tags for one loaded item catalog.
Methods
has()
has(
tag):boolean
Defined in: packages/items/src/bedrockTags.ts:17
Whether the source defines a tag.
Parameters
tag
string
Returns
boolean
includes()
includes(
tag,identifier):boolean
Defined in: packages/items/src/bedrockTags.ts:21
Whether an item carries a tag.
Parameters
tag
string
identifier
string
Returns
boolean
members()
members(
tag): readonlystring[]
Defined in: packages/items/src/bedrockTags.ts:19
The item identifiers in a tag, in source order.
Parameters
tag
string
Returns
readonly string[]
names()
names(): readonly
string[]
Defined in: packages/items/src/bedrockTags.ts:15
Every tag name, including tags whose current member list is empty.
Returns
readonly string[]
tagsOf()
tagsOf(
identifier): readonlystring[]
Defined in: packages/items/src/bedrockTags.ts:23
The tags carried by an item, in source order.
Parameters
identifier
string
Returns
readonly string[]
BedrockRepairableComponent
Defined in: packages/items/src/projection.ts:122
The Bedrock repair rules projected from Java's minecraft:repairable.
Properties
repairItems
readonlyrepairItems: readonlyBedrockRepairableItem[]
Defined in: packages/items/src/projection.ts:124
Repair material groups accepted by Bedrock's anvil UI.
BedrockRepairableItem
Defined in: packages/items/src/projection.ts:116
One group of Bedrock items that can repair the item.
Properties
items
readonlyitems: readonlystring[]
Defined in: packages/items/src/projection.ts:118
Bedrock item identifiers accepted as repair materials.
BlockPosition
Defined in: packages/items/src/hooks.ts:11
A block position in world coordinates.
Declared here rather than imported so the item runtime depends on no world implementation; the server's own vector type is assignable to it.
Properties
x
x:
number
Defined in: packages/items/src/hooks.ts:12
y
y:
number
Defined in: packages/items/src/hooks.ts:13
z
z:
number
Defined in: packages/items/src/hooks.ts:14
BlockReference
Defined in: packages/items/src/hooks.ts:34
The block a hook acts on, named the way Bedrock names one.
Properties
identifier
readonlyidentifier:string
Defined in: packages/items/src/hooks.ts:36
The Bedrock block identifier, such as minecraft:grass_block.
position
readonlyposition:BlockPosition
Defined in: packages/items/src/hooks.ts:40
Where the block is.
states
readonlystates:Readonly<Record<string,string|number|boolean>>
Defined in: packages/items/src/hooks.ts:38
The block state values, keyed by Bedrock state name.
ItemBeforeDurabilityDamageEvent
Defined in: packages/items/src/hooks.ts:104
What ItemHooks.onBeforeDurabilityDamage receives.
Properties
durabilityDamage
readonlydurabilityDamage:number
Defined in: packages/items/src/hooks.ts:112
The damage the engine is about to apply.
hitEntity?
readonlyoptionalhitEntity?:ItemSource
Defined in: packages/items/src/hooks.ts:110
The entity the hit landed on, absent when the damage is not from an attack.
itemStack
readonlyitemStack:ItemStack
Defined in: packages/items/src/hooks.ts:106
The stack about to take durability damage.
source
readonlysource:ItemSource
Defined in: packages/items/src/hooks.ts:108
Who is using it.
ItemCompleteUseEvent
Defined in: packages/items/src/hooks.ts:116
What ItemHooks.onCompleteUse receives.
Extends
Properties
itemStack
readonlyitemStack:ItemStack
Defined in: packages/items/src/hooks.ts:64
The stack being used.
Inherited from
source
readonlysource:ItemSource
Defined in: packages/items/src/hooks.ts:66
Who is using it.
Inherited from
useDuration
readonlyuseDuration:number
Defined in: packages/items/src/hooks.ts:68
How long the use button has been held, in ticks. Zero on the first tick of a use.
Inherited from
ItemComponent
Defined in: packages/items/src/components/define.ts:18
One item data component type: a ComponentFactory that can add itself to a registry without its parameter type escaping.
ComponentRegistry.register is generic in the parameter type, so a list of factories with different parameter types cannot be registered in a loop: the inferred parameter would be a union, and a factory whose create takes a narrower type is not assignable to one that takes the union. Carrying the registration as a method on the factory closes over the real type instead, which keeps the catalog a plain array while every exported component still narrows TypeView.params.
Extends
Type Parameters
P
P = unknown
Properties
hooks
readonlyhooks: readonly ("onUse"|"onUseOn"|"onMineBlock"|"onHitEntity"|"onBeforeDurabilityDamage"|"onCompleteUse"|"onConsume")[]
Defined in: packages/content/src/components.ts:53
Every hook the component may implement. This is an upper bound: the parsed parameters may leave one out, and returning a hook that is not on the list is a registration error. Domains read the list to decide which types can ever reach a hook.
Inherited from
name
readonlyname:string
Defined in: packages/content/src/components.ts:46
The component name as a definition writes it, such as minecraft:destructible_by_mining.
Inherited from
schema
readonlyschema:ComponentSchema<P>
Defined in: packages/content/src/components.ts:55
Runs once per type at load, before ComponentFactory.create.
Inherited from
Methods
create()
create(
params,context):Partial<H>
Defined in: packages/content/src/components.ts:57
Turns parsed parameters into the handlers this component contributes.
Parameters
params
P
context
Returns
Partial<H>
Inherited from
register()
register(
registry):void
Defined in: packages/items/src/components/define.ts:20
Adds this component to a registry under its own name.
Parameters
registry
Returns
void
ItemConsumeEvent
Defined in: packages/items/src/hooks.ts:119
What ItemHooks.onConsume receives.
Properties
itemStack
readonlyitemStack:ItemStack
Defined in: packages/items/src/hooks.ts:121
The stack being eaten or drunk.
source
readonlysource:ItemSource
Defined in: packages/items/src/hooks.ts:123
Who consumed it.
ItemHitEntityEvent
Defined in: packages/items/src/hooks.ts:92
What ItemHooks.onHitEntity receives.
Properties
hadEffect
readonlyhadEffect:boolean
Defined in: packages/items/src/hooks.ts:100
Whether the hit dealt damage, false for a hit a target blocked or absorbed.
hitEntity
readonlyhitEntity:ItemSource
Defined in: packages/items/src/hooks.ts:98
Who was hit.
itemStack
readonlyitemStack:ItemStack
Defined in: packages/items/src/hooks.ts:94
The stack that landed the hit.
source
readonlysource:ItemSource
Defined in: packages/items/src/hooks.ts:96
Who attacked.
ItemHooks
Defined in: packages/items/src/hooks.ts:144
The hooks an item behavior implements, the seam between this package and the behavior families built on it.
The seven names are Mojang's ItemCustomComponent names, unchanged, so a script host that exposes Mojang's interface maps onto this table one name at a time. The signatures differ in two ways, both deliberate. Each hook takes one event object, as Mojang's do, but the event carries this package's own ItemStack rather than a scripting handle. And the hooks a caller can cancel return a value instead of mutating the event, because HookTable.dispatchFirst decides who handled an interaction by the first result that is not undefined.
Dispatch order is the component order of the item's definition, then behaviors in attachment order, so a behavior the server registers has the last word over a component a pack declared. A contribution marked override clears the handlers collected before it.
Properties
onBeforeDurabilityDamage
onBeforeDurabilityDamage: (
event) =>number|undefined
Defined in: packages/items/src/hooks.ts:159
Durability damage is about to apply.
Parameters
event
ItemBeforeDurabilityDamageEvent
Returns
number | undefined
The damage to apply instead, 0 to spend no durability, or undefined to leave the engine's figure alone.
onCompleteUse
onCompleteUse: (
event) =>ItemUseResult|undefined
Defined in: packages/items/src/hooks.ts:161
A held use ran to the end of its duration without being released early.
Parameters
event
Returns
ItemUseResult | undefined
onConsume
onConsume: (
event) =>ItemUseResult|undefined
Defined in: packages/items/src/hooks.ts:163
A consumable finished being eaten or drunk.
Parameters
event
Returns
ItemUseResult | undefined
onHitEntity
onHitEntity: (
event) =>void
Defined in: packages/items/src/hooks.ts:152
An attack with this item landed on an entity.
Parameters
event
Returns
void
onMineBlock
onMineBlock: (
event) =>void
Defined in: packages/items/src/hooks.ts:150
A block broke while this item was held.
Parameters
event
Returns
void
onUse
onUse: (
event) =>ItemUseResult|undefined
Defined in: packages/items/src/hooks.ts:146
Right-click in the air, or the first tick of a held use.
Parameters
event
Returns
ItemUseResult | undefined
onUseOn
onUseOn: (
event) =>ItemUseResult|undefined
Defined in: packages/items/src/hooks.ts:148
Right-click on a block. Runs before ItemHooks.onUse.
Parameters
event
Returns
ItemUseResult | undefined
ItemMineBlockEvent
Defined in: packages/items/src/hooks.ts:82
What ItemHooks.onMineBlock receives.
Properties
block
readonlyblock:BlockReference
Defined in: packages/items/src/hooks.ts:88
The block as it was before it broke.
itemStack
readonlyitemStack:ItemStack
Defined in: packages/items/src/hooks.ts:84
The stack that broke the block.
source
readonlysource:ItemSource
Defined in: packages/items/src/hooks.ts:86
Who swung it.
ItemSource
Defined in: packages/items/src/hooks.ts:24
The entity a hook acts for, usually the player holding the item.
The item runtime never reads past these two fields. A behavior that needs more narrows the value itself, which is the seam: widening this interface is a change to every behavior, narrowing inside one behavior is not.
Properties
identifier
readonlyidentifier:string
Defined in: packages/items/src/hooks.ts:26
The Bedrock entity identifier, such as minecraft:player.
position?
readonlyoptionalposition?:BlockPosition
Defined in: packages/items/src/hooks.ts:30
The entity's exact position in world coordinates, when the caller has it.
runtimeId
readonlyruntimeId:number
Defined in: packages/items/src/hooks.ts:28
The entity's runtime id, unique for the length of the session.
ItemStackState
Defined in: packages/items/src/ItemStack.ts:21
The per-stack state an ItemStack keeps: how many, and the patch.
Properties
count
count:
number
Defined in: packages/items/src/ItemStack.ts:23
How many items the stack holds. Zero means an empty stack.
patch
patch:
Map<string,PatchEntry>
Defined in: packages/items/src/ItemStack.ts:25
The component patch, keyed by component name.
ItemTableException
Defined in: packages/items/src/exceptions.ts:25
One reviewed reason a group of Java items carries no item type row.
Properties
bedrockId
readonlybedrockId:string
Defined in: packages/items/src/exceptions.ts:30
The Bedrock identifier they reach instead.
javaIds
readonlyjavaIds: readonlystring[]
Defined in: packages/items/src/exceptions.ts:28
The Java items this row accounts for.
kind
readonlykind:ItemExceptionKind
Defined in: packages/items/src/exceptions.ts:26
reason
readonlyreason:string
Defined in: packages/items/src/exceptions.ts:34
Why the gap is acceptable, and what recovers the lost identity where anything does.
reference
readonlyreference:string
Defined in: packages/items/src/exceptions.ts:35
supersededBy?
readonlyoptionalsupersededBy?:string
Defined in: packages/items/src/exceptions.ts:32
The Java item that supplies that identifier's components, absent for a loss onto an unused identifier.
ItemTableRow
Defined in: packages/items/src/tables.ts:9
One Bedrock item identifier's row of the item type table.
Properties
components
components:
Record<string,unknown>
Defined in: packages/items/src/tables.ts:17
The Java default components, verbatim, keyed by Java component name.
data?
optionaldata?:number
Defined in: packages/items/src/tables.ts:13
The Bedrock damage value that selects this item, present only where one does.
java
java:
string
Defined in: packages/items/src/tables.ts:11
The Java item the components came from.
merged?
optionalmerged?:object[]
Defined in: packages/items/src/tables.ts:15
Other Java items reaching this identifier, with the damage value that selects each.
data?
optionaldata?:number
java
java:
string
ItemType
Defined in: packages/items/src/hooks.ts:181
One resolved item type: a Bedrock identity with Java defaults and Bedrock data kept separate.
Extends
Properties
bedrockComponents
readonlybedrockComponents:ReadonlyMap<string,unknown>
Defined in: packages/items/src/hooks.ts:185
The raw Bedrock item components declared by the active behavior pack, by component name.
bedrockDefinition?
readonlyoptionalbedrockDefinition?:Definition
Defined in: packages/items/src/hooks.ts:183
The Bedrock item JSON used to build the client-facing part, when one was loaded.
behaviors
readonlybehaviors: readonlyBoundBehavior<ItemHooks>[]
Defined in: packages/content/src/types.ts:42
The behaviors that attached, in attachment order.
Inherited from
components
readonlycomponents: readonlyBoundComponent<ItemHooks>[]
Defined in: packages/content/src/types.ts:40
The components that bound, in declaration order; a rejected one is absent.
Inherited from
definition
readonlydefinition:Definition
Defined in: packages/content/src/types.ts:38
The definition the type came from.
Inherited from
flags
readonlyflags:Readonly<Record<F,boolean>>
Defined in: packages/content/src/types.ts:63
The flags the domain's FlagSpec computed, one pass at load.
Inherited from
hooks
Defined in: packages/content/src/types.ts:44
The dispatch table, built once here rather than per call.
Inherited from
identifier
readonlyidentifier:string
Defined in: packages/content/src/types.ts:36
The identifier the type is registered under.
Inherited from
javaTags
readonlyjavaTags: readonlystring[]
Defined in: packages/items/src/hooks.ts:191
The Java datapack tags attached to this Bedrock item identity.
tags
readonlytags: readonlystring[]
Defined in: packages/items/src/hooks.ts:187
The Bedrock tags attached to this item identity.
Methods
hasComponent()
hasComponent(
name):boolean
Defined in: packages/content/src/types.ts:53
Whether the type bound a component under the name.
Parameters
name
string
Returns
boolean
Inherited from
hasJavaTag()
hasJavaTag(
tag):boolean
Defined in: packages/items/src/hooks.ts:193
Whether a Java datapack tag includes this item identity.
Parameters
tag
string
Returns
boolean
hasTag()
hasTag(
tag):boolean
Defined in: packages/items/src/hooks.ts:189
Whether this item identity carries one of its Bedrock tags.
Parameters
tag
string
Returns
boolean
params()
params<
P>(factory):P|undefined
Defined in: packages/content/src/types.ts:51
The parsed parameters of one component, narrowed against the factory whose schema produced them.
Type Parameters
P
P
Parameters
factory
ComponentFactory<ItemHooks, P>
Returns
P | undefined
The parameters, or undefined when the type has no such component.
Inherited from
ItemTypesTable
Defined in: packages/items/src/tables.ts:21
The generated item type table: Bedrock identities carrying Java-sourced components.
Properties
bedrockVersion
bedrockVersion:
string
Defined in: packages/items/src/tables.ts:25
The pinned Bedrock Dedicated Server version the identifiers came from.
componentTypes
componentTypes:
string[]
Defined in: packages/items/src/tables.ts:27
Every minecraft:data_component_type the pinned Java registry report lists.
defaultCounts
defaultCounts:
Record<string,number>
Defined in: packages/items/src/tables.ts:29
How many of the Java items carry each component type as a default.
exceptedJavaItems
exceptedJavaItems:
string[]
Defined in: packages/items/src/tables.ts:33
The Java items the join dropped, which exceptions.ts accounts for.
items
items:
Record<string,ItemTableRow>
Defined in: packages/items/src/tables.ts:37
One row per Bedrock item identifier.
javaItemCount
javaItemCount:
number
Defined in: packages/items/src/tables.ts:31
How many items the Java item registry has.
javaVersion
javaVersion:
string
Defined in: packages/items/src/tables.ts:23
The pinned Java Edition version the components came from.
providers
providers:
Record<string,unknown>
Defined in: packages/items/src/tables.ts:35
The context_int_provider and context_float_provider definitions item components reference.
ItemUseEvent
Defined in: packages/items/src/hooks.ts:62
What ItemHooks.onUse receives.
Extended by
Properties
itemStack
readonlyitemStack:ItemStack
Defined in: packages/items/src/hooks.ts:64
The stack being used.
source
readonlysource:ItemSource
Defined in: packages/items/src/hooks.ts:66
Who is using it.
useDuration
readonlyuseDuration:number
Defined in: packages/items/src/hooks.ts:68
How long the use button has been held, in ticks. Zero on the first tick of a use.
ItemUseOnEvent
Defined in: packages/items/src/hooks.ts:72
What ItemHooks.onUseOn receives.
Extends
Properties
block
readonlyblock:BlockReference
Defined in: packages/items/src/hooks.ts:74
The block the use landed on.
blockFace
readonlyblockFace:BlockFace
Defined in: packages/items/src/hooks.ts:76
Which face of that block.
faceLocation
readonlyfaceLocation:BlockPosition
Defined in: packages/items/src/hooks.ts:78
Where on the face, each coordinate from 0 to 1.
itemStack
readonlyitemStack:ItemStack
Defined in: packages/items/src/hooks.ts:64
The stack being used.
Inherited from
source
readonlysource:ItemSource
Defined in: packages/items/src/hooks.ts:66
Who is using it.
Inherited from
useDuration
readonlyuseDuration:number
Defined in: packages/items/src/hooks.ts:68
How long the use button has been held, in ticks. Zero on the first tick of a use.
Inherited from
ItemUseResult
Defined in: packages/items/src/hooks.ts:54
What a use hook reports back.
Returning any result at all means the hook handled the interaction, because HookTable.dispatchFirst stops at the first handler that returns something other than undefined. A hook that declines returns undefined and the next handler, and then the engine's default action, runs.
Properties
cooldownTicks?
readonlyoptionalcooldownTicks?:number
Defined in: packages/items/src/hooks.ts:58
Ticks before the source may use this item again, or omitted for no cooldown.
stack?
readonlyoptionalstack?:ItemStack
Defined in: packages/items/src/hooks.ts:56
The stack to put back in the slot, or omitted to leave the slot alone.
LoadItemTypesOptions
Defined in: packages/items/src/itemTypes.ts:76
Options for loadItemTypes.
Properties
bedrockDefinitions?
optionalbedrockDefinitions?:Iterable<Definition,any,any>
Defined in: packages/items/src/itemTypes.ts:91
Bedrock item definition files from the behavior pack. Their component bodies stay separate from Java's default component types.
bedrockTags?
optionalbedrockTags?:Readonly<Record<string, readonlystring[]>>
Defined in: packages/items/src/itemTypes.ts:96
The captured Bedrock tag memberships, keyed by tag name. Item files with an explicit minecraft:tags component replace their own entries.
behaviors?
optionalbehaviors?:BehaviorRegistry<ItemHooks>
Defined in: packages/items/src/itemTypes.ts:80
The behavior families to attach, which is where item behavior lives.
components?
optionalcomponents?:ComponentRegistry<ItemHooks>
Defined in: packages/items/src/itemTypes.ts:78
The component names to resolve against, defaulting to all 122 Java types.
definitions?
optionaldefinitions?:Iterable<Definition,any,any>
Defined in: packages/items/src/itemTypes.ts:86
The definitions to resolve, defaulting to vanillaItemDefinitions. A later definition for an identifier the list already has replaces it, which is how a pack overrides a vanilla item.
javaTags?
optionaljavaTags?: (identifier) => readonlystring[]
Defined in: packages/items/src/itemTypes.ts:98
Java datapack tags mapped to each resolved Bedrock item identifier.
Parameters
identifier
string
Returns
readonly string[]
strict?
optionalstrict?:boolean
Defined in: packages/items/src/itemTypes.ts:100
Fail the load when any diagnostic is reported, which the test suites do.
LoadedItemTypes
Defined in: packages/items/src/itemTypes.ts:104
What loadItemTypes returns.
Properties
bedrockTags
bedrockTags:
BedrockItemTags
Defined in: packages/items/src/itemTypes.ts:110
Bedrock tags from the captured catalog plus loaded item definitions.
diagnostics
diagnostics: readonly
Diagnostic[]
Defined in: packages/items/src/itemTypes.ts:112
Everything the resolve reported, in the shape @jsprismarine/packs uses.
registry
registry:
ItemRegistry
Defined in: packages/items/src/itemTypes.ts:106
The registry, already rebuilt, ready to hand out holders.
types
types:
ReadonlyMap<string,ItemType>
Defined in: packages/items/src/itemTypes.ts:108
Identifier to resolved type, in definition order.
ProjectionOptions
Defined in: packages/items/src/projection.ts:370
Options for projectItemToBedrock.
Properties
mapBlockIdentifier?
optionalmapBlockIdentifier?: (javaId) =>string|undefined
Defined in: packages/items/src/projection.ts:381
Maps a Java block identifier to the Bedrock identifier the client knows.
Parameters
javaId
string
Returns
string | undefined
mapIdentifier?
optionalmapIdentifier?: (javaId) =>string|undefined
Defined in: packages/items/src/projection.ts:377
Maps a Java item identifier to the Bedrock one, for the few projected fields that name another item. Injected rather than imported so this package does not depend on @jsprismarine/mapping; without it, those fields are left out.
Parameters
javaId
string
Returns
string | undefined
providers?
optionalproviders?:ProviderContext
Defined in: packages/items/src/projection.ts:385
The cooking context fuel values resolve for, a normal furnace by default.
resolveBlockTag?
optionalresolveBlockTag?: (tag) => readonlystring[] |undefined
Defined in: packages/items/src/projection.ts:383
Resolves a Java block tag to its merged Java block identifiers.
Parameters
tag
string
Returns
readonly string[] | undefined
resolveItemTag?
optionalresolveItemTag?: (tag) => readonlystring[] |undefined
Defined in: packages/items/src/projection.ts:379
Resolves a Java item tag to its merged Java item identifiers.
Parameters
tag
string
Returns
readonly string[] | undefined
ProviderContext
Defined in: packages/items/src/numberProvider.ts:22
Which of the conditions a provider branches on hold.
Vanilla's item-reachable providers branch on exactly two things: whether the cooking block is a smoker or blast furnace (minecraft:block/fast_cooking), and whether a composter is empty, which only changes whether the first layer is guaranteed. Both default to false, which is a normal furnace and a composter with something already in it.
Properties
condition
condition: (
condition) =>boolean
Defined in: packages/items/src/numberProvider.ts:24
Decides one condition, named by its predicate id or given as the inline predicate object.
Parameters
condition
unknown
Returns
boolean
StackMerge
Defined in: packages/items/src/ItemStack.ts:235
What mergeStacks produced.
Properties
merged
readonlymerged:ItemStack
Defined in: packages/items/src/ItemStack.ts:237
The target stack after the merge.
remainder
readonlyremainder:ItemStack
Defined in: packages/items/src/ItemStack.ts:239
What did not fit, with a count of zero when everything did.
Type Aliases
BedrockItemTagOverrides
BedrockItemTagOverrides =
ReadonlyMap<string, readonlystring[]>
Defined in: packages/items/src/bedrockTags.ts:10
Item identifier to a replacement list of Bedrock tags.
BedrockItemTagSource
BedrockItemTagSource =
Readonly<Record<string, readonlystring[]>>
Defined in: packages/items/src/bedrockTags.ts:7
Tag name to the Bedrock item identifiers carrying it.
BlockFace
BlockFace =
"down"|"up"|"north"|"south"|"west"|"east"
Defined in: packages/items/src/hooks.ts:44
The face of a block an interaction landed on.
ComponentPatch
ComponentPatch =
ReadonlyMap<string,PatchEntry>
Defined in: packages/items/src/ItemStack.ts:18
A component patch: the changes one stack layers over its type's defaults.
HolderSet
HolderSet = {
kind:"tag";tag:string; } | {entries: readonlystring[];kind:"entries"; }
Defined in: packages/items/src/schema.ts:191
A set of registry entries the way Java 26.3 writes one: a #tag reference, a single identifier, or a list of identifiers.
ItemExceptionKind
ItemExceptionKind =
"loss"|"merge"
Defined in: packages/items/src/exceptions.ts:18
Why a Java item contributes no row of its own to the item type table.
ItemFacts
ItemFacts =
FlatTable<ReturnType<typeofitemFactColumns>>
Defined in: packages/items/src/facts.ts:45
The flattened item fact table: five typed arrays indexed by the registry's dense item id.
ItemFlag
ItemFlag =
"isFood"|"isTool"|"isWeapon"|"isDamageable"|"isEquippable"|"isFuel"
Defined in: packages/items/src/hooks.ts:178
The load-time flags an item type carries, computed once in resolveItemTypes.
ItemHookTable
Defined in: packages/items/src/hooks.ts:197
The dispatch table one item type binds at load.
ItemRegistry
Defined in: packages/items/src/itemTypes.ts:22
The registry of resolved item types, keyed by Bedrock item identifier.
NumberSource
NumberSource = {
kind:"inline";value:number; } | {id:string;kind:"reference"; } | {kind:"provider";provider:Readonly<Record<string,unknown>>; }
Defined in: packages/items/src/schema.ts:210
A number Java 26.3 writes either inline or as a reference into a context_int_provider or context_float_provider file, which is the indirection 26.3 moved fuel, compost and brewing values behind.
ObjectShape
ObjectShape<
R,O> ={ [K in keyof R]: Parsed<R[K]> }&{ [K in keyof O]?: Parsed<O[K]> }
Defined in: packages/items/src/schema.ts:106
The shape object builds from a required and an optional field map.
Type Parameters
R
R
O
O
Parsed
Parsed<
P> =PextendsParser<infer T> ?T:never
Defined in: packages/items/src/schema.ts:12
The value a parser produces.
Type Parameters
P
P
Parser
Parser<
T> =ComponentSchema<T>
Defined in: packages/items/src/schema.ts:9
A parser for one JSON value, which is what @jsprismarine/content calls a component schema. The combinators below compose into the parameter schema of every item component.
Type Parameters
T
T
PatchEntry
PatchEntry = {
kind:"set";value:unknown; } | {kind:"remove"; }
Defined in: packages/items/src/ItemStack.ts:15
One entry of a component patch.
Java's DataComponentPatch is a map from component type to Optional<value>, where the empty optional is the removal marker the command grammar writes as item_id[!minecraft:food]. This union is that optional, made explicit so a removal survives a round trip through JSON.
TextComponent
TextComponent =
string|Readonly<Record<string,unknown>> | readonlyunknown[]
Defined in: packages/items/src/schema.ts:230
A Java text component, which is a string, a translation or style object, or a list of either.
Variables
BEDROCK_ONLY_ITEM_PROPERTIES
constBEDROCK_ONLY_ITEM_PROPERTIES: readonly ["creative_category","creative_group","frame_count","hidden_in_commands","liquid_clipped","should_despawn","stacked_by_data"]
Defined in: packages/items/src/projection.ts:175
The item_properties keys with no Java item-property source, so the protocol layer supplies captured defaults unless an active Bedrock item component provides a value. creative_category and creative_group come from the creative item catalog, frame_count from the resource pack's icon animation, and the other three have no Java source at all.
DEFAULTED_COMPONENTS
constDEFAULTED_COMPONENTS: readonly [ItemComponent<ObjectShape<{ }, {hitbox_margin:Parser<number>;max_creative_reach:Parser<number>;max_reach:Parser<number>;min_creative_reach:Parser<number>;min_reach:Parser<number>;mob_factor:Parser<number>; }>>,ItemComponent<ObjectShape<{ }, {color:Parser<string>;pattern:Parser<string|Readonly<Record<string,unknown>>>; }>[]>,ItemComponent<ObjectShape<{ }, {entity_data:Parser<Readonly<Record<string,unknown>>>;min_ticks_in_hive:Parser<number>;ticks_in_hive:Parser<number>; }>[]>,ItemComponent<Record<string,string>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{ }, {block_delay_seconds:Parser<number>;block_sound:Parser<string>;bypassed_by:Parser<HolderSet>;damage_reductions:Parser<ObjectShape<{ }, {base:Parser<number>;factor:Parser<number>;horizontal_blocking_angle:Parser<number>;type:Parser<HolderSet>; }>[]>;disable_cooldown_scale:Parser<number>;disabled_sound:Parser<string>;item_damage:Parser<ObjectShape<{ }, {base:Parser<number>;factor:Parser<number>;threshold:Parser<number>; }>>; }>>,ItemComponent<ObjectShape<{ }, {speed_multiplier:Parser<NumberSource>;uses:Parser<NumberSource>; }>>,ItemComponent<Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>[]>,ItemComponent<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>[]>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{ }, {layers:Parser<NumberSource>; }>>,ItemComponent<ObjectShape<{ }, {animation:Parser<string>;consume_seconds:Parser<number>;has_consume_particles:Parser<boolean>;on_consume_effects:Parser<ObjectShape<{type:Parser<string>; }, {probability:Parser<number>; }>[]>;sound:Parser<string|Readonly<Record<string,unknown>>>; }>>,ItemComponent<ObjectShape<{ }, {item:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<..., ...>>>;count:Parser<number>; }>>;slot:Parser<number>; }>[]>,ItemComponent<ObjectShape<{ }, {burn_time:Parser<NumberSource>;speed_multiplier:Parser<NumberSource>; }>>,ItemComponent<string>,ItemComponent<number>,ItemComponent<ObjectShape<{types:Parser<HolderSet>; },Record<never,never>>>,ItemComponent<string>,ItemComponent<ObjectShape<{ }, {death_effects:Parser<ObjectShape<{type:Parser<string>; }, {probability:Parser<number>; }>[]>; }>>,ItemComponent<Readonly<Record<string,unknown>>>,ItemComponent<string>,ItemComponent<ObjectShape<{value:Parser<number>; },Record<never,never>>>,ItemComponent<boolean>,ItemComponent<Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{slot:Parser<"any"|"hand"|"mainhand"|"offhand"|"armor"|"head"|"chest"|"legs"|"feet"|"body"|"saddle">; }, {allowed_entities:Parser<HolderSet>;asset_id:Parser<string>;camera_overlay:Parser<string>;can_be_sheared:Parser<boolean>;damage_on_hurt:Parser<boolean>;dispensable:Parser<boolean>;equip_on_interact:Parser<boolean>;equip_sound:Parser<string|Readonly<Record<string,unknown>>>;shearing_sound:Parser<string|Readonly<Record<string,unknown>>>;swappable:Parser<boolean>; }>>,ItemComponent<ObjectShape<{ }, {explosions:Parser<ObjectShape<{shape:Parser<string>; }, {colors:Parser<number[]>;fade_colors:Parser<number[]>;has_trail:Parser<boolean>;has_twinkle:Parser<boolean>; }>[]>;flight_duration:Parser<number>; }>>,ItemComponent<ObjectShape<{nutrition:Parser<number>;saturation:Parser<number>; }, {can_always_eat:Parser<boolean>; }>>,ItemComponent<ObjectShape<{ },Record<never,never>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{ }, {damage_conditions:Parser<Readonly<Record<string,unknown>>>;damage_modifier:Parser<number>;damage_multiplier:Parser<number>;delay_ticks:Parser<number>;dismount_conditions:Parser<Readonly<Record<string,unknown>>>;forward_movement:Parser<number>;hit_sound:Parser<string|Readonly<Record<string,unknown>>>;knockback_conditions:Parser<Readonly<Record<string,unknown>>>; }>>,ItemComponent<Readonly<Record<string,unknown>>>,ItemComponent<number>,ItemComponent<number>,ItemComponent<ObjectShape<{ }, {targeting_entity_types:Parser<HolderSet>;visibility:Parser<number>; }>>,ItemComponent<number>,ItemComponent<ObjectShape<{ }, {hit_sound:Parser<string|Readonly<Record<string,unknown>>>;sound:Parser<string|Readonly<Record<string,unknown>>>; }>>,ItemComponent<string[] |ObjectShape<{ }, {back:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<..., ...>>>;count:Parser<number>; }>>;front:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<..., ...>>>;count:Parser<number>; }>>;left:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<..., ...>>>;count:Parser<number>; }>>;right:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<..., ...>>>;count:Parser<number>; }>>; }>>,ItemComponent<ObjectShape<{ }, {custom_color:Parser<number>;custom_effects:Parser<ObjectShape<{id:Parser<string>; }, {amplifier:Parser<number>;duration:Parser<number>;show_icon:Parser<boolean>; }>[]>;custom_name:Parser<string>;potion:Parser<string>; }>>,ItemComponent<number>,ItemComponent<HolderSet>,ItemComponent<string>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string[]>,ItemComponent<ObjectShape<{items:Parser<HolderSet>; },Record<never,never>>>,ItemComponent<ObjectShape<{ }, {color:Parser<string>;has_glowing_text:Parser<boolean>;messages:Parser<TextComponent[]>; }>>,ItemComponent<ObjectShape<{ }, {color:Parser<string>;has_glowing_text:Parser<boolean>;messages:Parser<TextComponent[]>; }>>,ItemComponent<Record<string,number>>,ItemComponent<ObjectShape<{id:Parser<string>; }, {duration:Parser<number>; }>[]>,ItemComponent<ObjectShape<{rules:Parser<ObjectShape<{blocks:Parser<HolderSet>; }, {correct_for_drops:Parser<boolean>;speed:Parser<number>; }>[]>; }, {can_destroy_blocks_in_creative:Parser<boolean>;damage_per_block:Parser<number>;default_mining_speed:Parser<number>; }>>,ItemComponent<ObjectShape<{seconds:Parser<number>; }, {cooldown_group:Parser<string>; }>>,ItemComponent<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>,ItemComponent<ObjectShape<{nutrition:Parser<number>; },Record<never,never>>>,ItemComponent<ObjectShape<{ }, {disable_blocking_for_seconds:Parser<number>;item_damage_per_attack:Parser<number>; }>>,ItemComponent<ObjectShape<{ }, {pages:Parser<(string|ObjectShape<{raw:Parser<string>; }, {filtered:Parser<string>; }>)[]>; }>>]
Defined in: packages/items/src/components/defaults.ts:347
The fifty-six types that are a default on some items, in alphabetical order.
DEFAULT_PROVIDER_CONTEXT
constDEFAULT_PROVIDER_CONTEXT:ProviderContext
Defined in: packages/items/src/numberProvider.ts:28
A normal furnace and a non-empty composter: every condition false.
EQUIPMENT_SLOTS
constEQUIPMENT_SLOTS: readonly ["any","hand","mainhand","offhand","armor","head","chest","legs","feet","body","saddle"]
Defined in: packages/items/src/components/values.ts:27
Where an attribute modifier or a piece of equipment sits.
EXCEPTED_JAVA_ITEMS
constEXCEPTED_JAVA_ITEMS: readonlystring[]
Defined in: packages/items/src/exceptions.ts:169
Every Java item id the exception list covers, flattened.
FAST_COOKING_CONTEXT
constFAST_COOKING_CONTEXT:ProviderContext
Defined in: packages/items/src/numberProvider.ts:31
A smoker or blast furnace: minecraft:block/fast_cooking holds.
ITEM_COMPONENTS
constITEM_COMPONENTS: readonlyItemComponent[]
Defined in: packages/items/src/components/catalog.ts:21
Every item data component type Java 26.3 registers, universal ones first.
ITEM_COMPONENT_NAMES
constITEM_COMPONENT_NAMES: readonlystring[]
Defined in: packages/items/src/components/catalog.ts:28
The name of every component in ITEM_COMPONENTS, in the same order.
ITEM_FLAGS
constITEM_FLAGS:object
Defined in: packages/items/src/itemTypes.ts:49
The load-time flags every item type carries.
Each is the presence of one Java component, which is the whole point of the component model: "is a tool" stopped being a class and became minecraft:tool. Numbers belong in the flattened table in facts.ts rather than here.
Type Declaration
isDamageable
isDamageable: (
type) =>boolean
Parameters
type
Returns
boolean
isEquippable
isEquippable: (
type) =>boolean
Parameters
type
Returns
boolean
isFood
isFood: (
type) =>boolean
Parameters
type
Returns
boolean
isFuel
isFuel: (
type) =>boolean
Parameters
type
Returns
boolean
isTool
isTool: (
type) =>boolean
Parameters
type
Returns
boolean
isWeapon
isWeapon: (
type) =>boolean
Parameters
type
Returns
boolean
ITEM_HOOKS
constITEM_HOOKS: readonly ["onUse","onUseOn","onMineBlock","onHitEntity","onBeforeDurabilityDamage","onCompleteUse","onConsume"]
Defined in: packages/items/src/hooks.ts:167
Every hook name ItemHooks declares, in Mojang's documented order.
ITEM_REGISTRY_NAME
constITEM_REGISTRY_NAME:"items"='items'
Defined in: packages/items/src/itemTypes.ts:19
The name the registry of item types is built under; it appears in holders and diagnostics.
ITEM_TABLE_EXCEPTIONS
constITEM_TABLE_EXCEPTIONS: readonly [{bedrockId:"minecraft:arrow";javaIds: readonly ["minecraft:spectral_arrow"];kind:"loss";reason:"Bedrock has no spectral arrow, so it arrives as a plain arrow and its glow does not recover.";reference:"docs/research/java-to-bedrock-translation.md section 3";supersededBy:"minecraft:arrow"; }, {bedrockId:"minecraft:stick";javaIds: readonly ["minecraft:debug_stick"];kind:"loss";reason:"Bedrock has no debug stick, so it arrives as a plain stick and does not recover.";reference:"docs/research/java-to-bedrock-translation.md section 3";supersededBy:"minecraft:stick"; }, {bedrockId:"minecraft:book";javaIds: readonly ["minecraft:knowledge_book"];kind:"loss";reason:"Bedrock has no knowledge book, so it arrives as a plain book and does not recover.";reference:"docs/research/java-to-bedrock-translation.md section 3";supersededBy:"minecraft:book"; }, {bedrockId:"minecraft:hopper_minecart";javaIds: readonly ["minecraft:furnace_minecart"];kind:"loss";reason:"Bedrock has no furnace minecart item, and the fallback does not recover it.";reference:"docs/research/java-to-bedrock-translation.md section 3";supersededBy:"minecraft:hopper_minecart"; }, {bedrockId:"minecraft:unknown";javaIds: readonly ["minecraft:test_block","minecraft:test_instance_block"];kind:"loss";reason:"Test blocks do not exist on Bedrock. Writing their components onto minecraft:unknown would give the fallback item real properties, so the identifier stays without a row.";reference:"docs/research/java-to-bedrock-translation.md section 3; GeyserMC/Geyser#6164"; }, {bedrockId:"minecraft:filled_map";javaIds: readonly ["minecraft:abandoned_camp_map","minecraft:buried_ancient_city_map","minecraft:buried_mineshaft_map","minecraft:buried_treasure_map","minecraft:buried_trial_chambers_map","minecraft:desert_pyramid_map","minecraft:desert_village_map","minecraft:jungle_pyramid_map","minecraft:ocean_monument_map","minecraft:plains_village_map","minecraft:savanna_village_map","minecraft:snowy_village_map","minecraft:swamp_hut_map","minecraft:taiga_village_map","minecraft:warm_ocean_ruins_map","minecraft:woodland_mansion_map"];kind:"merge";reason:"The 16 structure locator maps are one Bedrock item. They differ from a plain filled map only in their map decorations, which travel in the stack NBT.";reference:"docs/research/java-to-bedrock-translation.md section 3";supersededBy:"minecraft:filled_map"; }, {bedrockId:"minecraft:arrow";javaIds: readonly ["minecraft:tipped_arrow"];kind:"merge";reason:"A tipped arrow is a plain arrow with potion contents on the stack, and the potion recovers from the Bedrock aux value.";reference:"docs/research/java-to-bedrock-translation.md section 3";supersededBy:"minecraft:arrow"; }, {bedrockId:"minecraft:banner";javaIds: readonly ["minecraft:blue_banner","minecraft:brown_banner","minecraft:cyan_banner","minecraft:gray_banner","minecraft:green_banner","minecraft:light_blue_banner","minecraft:light_gray_banner","minecraft:lime_banner","minecraft:magenta_banner","minecraft:orange_banner","minecraft:pink_banner","minecraft:purple_banner","minecraft:red_banner","minecraft:white_banner","minecraft:yellow_banner"];kind:"merge";reason:"The 16 banner colors are one Bedrock item with a damage value. They differ only in name and model, and the color recovers from the Bedrock aux value.";reference:"docs/research/java-to-bedrock-translation.md section 3";supersededBy:"minecraft:black_banner"; }, {bedrockId:"minecraft:bed";javaIds: readonly ["minecraft:black_bed","minecraft:blue_bed","minecraft:brown_bed","minecraft:cyan_bed","minecraft:gray_bed","minecraft:green_bed","minecraft:light_blue_bed","minecraft:light_gray_bed","minecraft:lime_bed","minecraft:magenta_bed","minecraft:orange_bed","minecraft:pink_bed","minecraft:purple_bed","minecraft:red_bed","minecraft:yellow_bed"];kind:"merge";reason:"The 16 bed colors are one Bedrock item with a damage value. They differ only in name and model, and the color recovers from the Bedrock aux value.";reference:"docs/research/java-to-bedrock-translation.md section 3";supersededBy:"minecraft:white_bed"; }]
Defined in: packages/items/src/exceptions.ts:45
Every Java item the table drops, grouped by Bedrock identifier.
Each row documents a reviewed loss or merge. The generator computes the expected set from the mapping tables and refuses to emit when it disagrees with this file.
RARITIES
constRARITIES: readonly ["common","uncommon","rare","epic"]
Defined in: packages/items/src/components/universal.ts:14
The four rarities Java ranks an item by, which colors its name in the tooltip.
STACK_ONLY_COMPONENTS
constSTACK_ONLY_COMPONENTS: readonly [ItemComponent<Readonly<Record<string,unknown>> |ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string>,ItemComponent<Readonly<Record<string,unknown>>>,ItemComponent<Readonly<Record<string,unknown>> |Readonly<Record<string,unknown>>[]>,ItemComponent<Readonly<Record<string,unknown>> |Readonly<Record<string,unknown>>[]>,ItemComponent<string>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{loot_table:Parser<string>; }, {seed:Parser<number>; }>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{ },Record<never,never>>>,ItemComponent<Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{ }, {colors:Parser<number[]>;flags:Parser<boolean[]>;floats:Parser<number[]>;strings:Parser<string[]>; }>>,ItemComponent<TextComponent>,ItemComponent<number|ObjectShape<{rgb:Parser<number>; },Record<never,never>>>,ItemComponent<ObjectShape<{shape:Parser<string>; }, {colors:Parser<number[]>;fade_colors:Parser<number[]>;has_trail:Parser<boolean>;has_twinkle:Parser<boolean>; }>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{ },Record<never,never>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{ }, {target:Parser<ObjectShape<{dimension:Parser<string>;pos:Parser<number[]>; },Record<never,never>>>;tracked:Parser<boolean>; }>>,ItemComponent<number>,ItemComponent<string>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|ObjectShape<{ }, {id:Parser<number[]>;name:Parser<string>;properties:Parser<Readonly<Record<string,unknown>> |Readonly<Record<string,unknown>>[]>; }>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string>,ItemComponent<string>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string>,ItemComponent<ObjectShape<{material:Parser<string|Readonly<Record<string,unknown>>>;pattern:Parser<string|Readonly<Record<string,unknown>>>; },Record<never,never>>>,ItemComponent<string>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string>,ItemComponent<ObjectShape<{ },Record<never,never>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<boolean|ObjectShape<{ },Record<never,never>>>,ItemComponent<string>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<string|Readonly<Record<string,unknown>>>,ItemComponent<ObjectShape<{ }, {author:Parser<string>;generation:Parser<number>;pages:Parser<(TextComponent|ObjectShape<{raw:Parser<string>; }, {filtered:Parser<string>; }>)[]>;resolved:Parser<boolean>;title:Parser<string|ObjectShape<{raw:Parser<string>; }, {filtered:Parser<string>; }>>; }>>,ItemComponent<string|Readonly<Record<string,unknown>>>]
Defined in: packages/items/src/components/stackOnly.ts:233
The fifty-three types that are never a default, in alphabetical order.
UNIVERSAL_COMPONENTS
constUNIVERSAL_COMPONENTS: readonly [ItemComponent<ObjectShape<{ }, {duration:Parser<number>;type:Parser<string>; }>>,ItemComponent<ObjectShape<{amount:Parser<number>;id:Parser<string>;operation:Parser<"add_value"|"add_multiplied_base"|"add_multiplied_total">;type:Parser<string>; }, {display:Parser<Readonly<Record<string,unknown>>>;slot:Parser<"any"|"hand"|"mainhand"|"offhand"|"armor"|"head"|"chest"|"legs"|"feet"|"body"|"saddle">; }>[]>,ItemComponent<string>,ItemComponent<Record<string,number>>,ItemComponent<ObjectShape<{ }, {duration:Parser<number>;type:Parser<string>; }>>,ItemComponent<string>,ItemComponent<TextComponent>,ItemComponent<TextComponent[]>,ItemComponent<number>,ItemComponent<"common"|"uncommon"|"rare"|"epic">,ItemComponent<number>,ItemComponent<ObjectShape<{ }, {hidden_components:Parser<string[]>;hide_tooltip:Parser<boolean>; }>>,ItemComponent<ObjectShape<{ }, {can_sprint:Parser<boolean>;interact_vibrations:Parser<boolean>;sound:Parser<string>;speed_multiplier:Parser<number>; }>>]
Defined in: packages/items/src/components/universal.ts:65
The thirteen components every Java item carries, in the order the report writes them.
UNPROJECTED_BEDROCK_COMPONENTS
constUNPROJECTED_BEDROCK_COMPONENTS:object
Defined in: packages/items/src/projection.ts:188
Bedrock components this projection does not yet derive from Java item data.
UNVERIFIED_SHAPE_COMPONENTS
constUNVERIFIED_SHAPE_COMPONENTS: readonly ["minecraft:sulfur_cube_content","minecraft:waxed"]
Defined in: packages/items/src/components/stackOnly.ts:230
The components whose value shape no pinned source confirms, because no vanilla item default and no vanilla data file writes one. Their parsers are deliberately wide, and a later data refresh that starts writing one should tighten the parser and shorten this list.
additionalTradeCost
constadditionalTradeCost:ItemComponent<Readonly<Record<string,unknown>> |ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>
Defined in: packages/items/src/components/stackOnly.ts:23
minecraft:additional_trade_cost: an extra item a villager trade asks for.
animation
constanimation:Parser<ObjectShape<{ }, {duration:Parser<number>;type:Parser<string>; }>>
Defined in: packages/items/src/components/values.ts:70
A swing or interact animation: an animation name and how many ticks it runs.
attackAnimation
constattackAnimation:ItemComponent<ObjectShape<{ }, {duration:Parser<number>;type:Parser<string>; }>>
Defined in: packages/items/src/components/universal.ts:17
minecraft:attack_animation: the swing the client plays for an attack.
attackRange
constattackRange:ItemComponent<ObjectShape<{ }, {hitbox_margin:Parser<number>;max_creative_reach:Parser<number>;max_reach:Parser<number>;min_creative_reach:Parser<number>;min_reach:Parser<number>;mob_factor:Parser<number>; }>>
Defined in: packages/items/src/components/defaults.ts:40
minecraft:attack_range: the reach and hitbox margin an attack with the item uses.
attributeModifier
constattributeModifier:Parser<ObjectShape<{amount:Parser<number>;id:Parser<string>;operation:Parser<"add_value"|"add_multiplied_base"|"add_multiplied_total">;type:Parser<string>; }, {display:Parser<Readonly<Record<string,unknown>>>;slot:Parser<"any"|"hand"|"mainhand"|"offhand"|"armor"|"head"|"chest"|"legs"|"feet"|"body"|"saddle">; }>>
Defined in: packages/items/src/components/values.ts:48
One entry of minecraft:attribute_modifiers.
attributeModifiers
constattributeModifiers:ItemComponent<ObjectShape<{amount:Parser<number>;id:Parser<string>;operation:Parser<"add_value"|"add_multiplied_base"|"add_multiplied_total">;type:Parser<string>; }, {display:Parser<Readonly<Record<string,unknown>>>;slot:Parser<"any"|"hand"|"mainhand"|"offhand"|"armor"|"head"|"chest"|"legs"|"feet"|"body"|"saddle">; }>[]>
Defined in: packages/items/src/components/universal.ts:20
minecraft:attribute_modifiers: the attribute changes the item applies while held or worn.
attributeOperation
constattributeOperation:Parser<"add_value"|"add_multiplied_base"|"add_multiplied_total">
Defined in: packages/items/src/components/values.ts:45
How an attribute modifier combines with the base value.
axolotlVariant
constaxolotlVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:29
minecraft:axolotl/variant: the color of a bucketed axolotl.
bannerPatterns
constbannerPatterns:ItemComponent<ObjectShape<{ }, {color:Parser<string>;pattern:Parser<string|Readonly<Record<string,unknown>>>; }>[]>
Defined in: packages/items/src/components/defaults.ts:56
minecraft:banner_patterns: the layers a banner or shield draws, outermost last.
baseColor
constbaseColor:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:32
minecraft:base_color: the background color of a shield's banner.
bees
constbees:ItemComponent<ObjectShape<{ }, {entity_data:Parser<Readonly<Record<string,unknown>>>;min_ticks_in_hive:Parser<number>;ticks_in_hive:Parser<number>; }>[]>
Defined in: packages/items/src/components/defaults.ts:62
minecraft:bees: the bees inside a beehive or bee nest item.
blockEntityData
constblockEntityData:ItemComponent<Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:35
minecraft:block_entity_data: the block entity NBT a block item places with.
blockPos
constblockPos:Parser<number[]>
Defined in: packages/items/src/components/values.ts:103
A block position written as a three-number list.
blockState
constblockState:ItemComponent<Record<string,string>>
Defined in: packages/items/src/components/defaults.ts:68
minecraft:block_state: the block state values a block item places with.
blockTransformer
constblockTransformer:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/defaults.ts:71
minecraft:block_transformer: the transformation the item performs, such as stripping or tilling.
blocksAttacks
constblocksAttacks:ItemComponent<ObjectShape<{ }, {block_delay_seconds:Parser<number>;block_sound:Parser<string>;bypassed_by:Parser<HolderSet>;damage_reductions:Parser<ObjectShape<{ }, {base:Parser<number>;factor:Parser<number>;horizontal_blocking_angle:Parser<number>;type:Parser<HolderSet>; }>[]>;disable_cooldown_scale:Parser<number>;disabled_sound:Parser<string>;item_damage:Parser<ObjectShape<{ }, {base:Parser<number>;factor:Parser<number>;threshold:Parser<number>; }>>; }>>
Defined in: packages/items/src/components/defaults.ts:74
minecraft:blocks_attacks: the shield rules, from the block delay to what bypasses it.
bookPage
constbookPage:Parser<ObjectShape<{raw:Parser<string>; }, {filtered:Parser<string>; }>>
Defined in: packages/items/src/components/values.ts:97
A written or writable book page: raw text plus an optional filtered replacement.
bool
constbool:Parser<boolean>
Defined in: packages/items/src/schema.ts:21
Parses a JSON boolean.
breakSound
constbreakSound:ItemComponent<string>
Defined in: packages/items/src/components/universal.ts:23
minecraft:break_sound: the sound event for the item breaking from durability loss.
brewingFuel
constbrewingFuel:ItemComponent<ObjectShape<{ }, {speed_multiplier:Parser<NumberSource>;uses:Parser<NumberSource>; }>>
Defined in: packages/items/src/components/defaults.ts:91
minecraft:brewing_fuel: how many brews the item powers and how fast.
bucketEntityData
constbucketEntityData:ItemComponent<Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/defaults.ts:97
minecraft:bucket_entity_data: the entity a filled bucket releases.
bundleContents
constbundleContents:ItemComponent<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>[]>
Defined in: packages/items/src/components/defaults.ts:100
minecraft:bundle_contents: the stacks inside a bundle, in insertion order.
canBreak
constcanBreak:ItemComponent<Readonly<Record<string,unknown>> |Readonly<Record<string,unknown>>[]>
Defined in: packages/items/src/components/stackOnly.ts:38
minecraft:can_break: the blocks the item may break in adventure mode.
canPlaceOn
constcanPlaceOn:ItemComponent<Readonly<Record<string,unknown>> |Readonly<Record<string,unknown>>[]>
Defined in: packages/items/src/components/stackOnly.ts:41
minecraft:can_place_on: the blocks the item may be placed against in adventure mode.
catCollar
constcatCollar:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:44
minecraft:cat/collar: the collar color of a cat the item references.
catSoundVariant
constcatSoundVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:47
minecraft:cat/sound_variant: the sound set of a cat the item references.
catVariant
constcatVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:50
minecraft:cat/variant: the breed of a cat the item references.
chargedProjectiles
constchargedProjectiles:ItemComponent<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>[]>
Defined in: packages/items/src/components/defaults.ts:103
minecraft:charged_projectiles: the projectiles a drawn crossbow holds.
chickenSoundVariant
constchickenSoundVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:53
minecraft:chicken/sound_variant: the sound set of a chicken the item references.
chickenVariant
constchickenVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/defaults.ts:106
minecraft:chicken/variant: the chicken an egg hatches.
compostable
constcompostable:ItemComponent<ObjectShape<{ }, {layers:Parser<NumberSource>; }>>
Defined in: packages/items/src/components/defaults.ts:109
minecraft:compostable: how many composter layers the item adds, by provider reference.
compound
constcompound:Parser<Readonly<Record<string,unknown>>>
Defined in: packages/items/src/schema.ts:177
Accepts any JSON object unchanged.
Used for the components whose value is an entity or block entity NBT compound, which this package carries to the world layer without reading.
consumable
constconsumable:ItemComponent<ObjectShape<{ }, {animation:Parser<string>;consume_seconds:Parser<number>;has_consume_particles:Parser<boolean>;on_consume_effects:Parser<ObjectShape<{type:Parser<string>; }, {probability:Parser<number>; }>[]>;sound:Parser<string|Readonly<Record<string,unknown>>>; }>>
Defined in: packages/items/src/components/defaults.ts:112
minecraft:consumable: how long eating or drinking takes and what it does at the end.
consumeEffect
constconsumeEffect:Parser<ObjectShape<{type:Parser<string>; }, {probability:Parser<number>; }>>
Defined in: packages/items/src/components/values.ts:64
One consume effect, the tagged union minecraft:consumable and minecraft:death_protection both carry.
Only the discriminator is parsed here. The five effect types are the behavior layer's to run, and parsing their fields in this package would put potion and teleport rules in the component that merely names them.
container
constcontainer:ItemComponent<ObjectShape<{ }, {item:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>;slot:Parser<number>; }>[]>
Defined in: packages/items/src/components/defaults.ts:127
minecraft:container: the stacks inside a shulker box or other container item.
containerLoot
constcontainerLoot:ItemComponent<ObjectShape<{loot_table:Parser<string>; }, {seed:Parser<number>; }>>
Defined in: packages/items/src/components/stackOnly.ts:56
minecraft:container_loot: the loot table a container item fills from when first opened.
cookingFuel
constcookingFuel:ItemComponent<ObjectShape<{ }, {burn_time:Parser<NumberSource>;speed_multiplier:Parser<NumberSource>; }>>
Defined in: packages/items/src/components/defaults.ts:133
minecraft:cooking_fuel: furnace burn time and speed, by provider reference.
cowSoundVariant
constcowSoundVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:62
minecraft:cow/sound_variant: the sound set of a cow the item references.
cowVariant
constcowVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:65
minecraft:cow/variant: the breed of a cow the item references.
creativeSlotLock
constcreativeSlotLock:ItemComponent<ObjectShape<{ },Record<never,never>>>
Defined in: packages/items/src/components/stackOnly.ts:68
minecraft:creative_slot_lock: the stack cannot be moved out of its creative slot.
cushionColor
constcushionColor:ItemComponent<string>
Defined in: packages/items/src/components/defaults.ts:139
minecraft:cushion/color: the dye color of a cushion item.
customData
constcustomData:ItemComponent<Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:71
minecraft:custom_data: arbitrary NBT a datapack attaches, never read by the game.
customModelData
constcustomModelData:ItemComponent<ObjectShape<{ }, {colors:Parser<number[]>;flags:Parser<boolean[]>;floats:Parser<number[]>;strings:Parser<string[]>; }>>
Defined in: packages/items/src/components/stackOnly.ts:74
minecraft:custom_model_data: the numbers, flags, strings and colors a resource pack reads.
customName
constcustomName:ItemComponent<TextComponent>
Defined in: packages/items/src/components/stackOnly.ts:80
minecraft:custom_name: the name an anvil or a command gave the stack.
damage
constdamage:ItemComponent<number>
Defined in: packages/items/src/components/defaults.ts:142
minecraft:damage: the durability already spent, counting up to max_damage.
damageReduction
constdamageReduction:Parser<ObjectShape<{ }, {base:Parser<number>;factor:Parser<number>;horizontal_blocking_angle:Parser<number>;type:Parser<HolderSet>; }>>
Defined in: packages/items/src/components/values.ts:79
One entry of minecraft:blocks_attacks's damage reduction list.
damageResistant
constdamageResistant:ItemComponent<ObjectShape<{types:Parser<HolderSet>; },Record<never,never>>>
Defined in: packages/items/src/components/defaults.ts:145
minecraft:damage_resistant: the damage types the item survives as a dropped entity.
damageType
constdamageType:ItemComponent<string>
Defined in: packages/items/src/components/defaults.ts:148
minecraft:damage_type: the damage type an attack with the item deals.
deathProtection
constdeathProtection:ItemComponent<ObjectShape<{ }, {death_effects:Parser<ObjectShape<{type:Parser<string>; }, {probability:Parser<number>; }>[]>; }>>
Defined in: packages/items/src/components/defaults.ts:151
minecraft:death_protection: the totem effect, as the effects applied on the save.
debugStickState
constdebugStickState:ItemComponent<Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/defaults.ts:157
minecraft:debug_stick_state: the property the debug stick currently edits per block.
dye
constdye:ItemComponent<string>
Defined in: packages/items/src/components/defaults.ts:160
minecraft:dye: the dye color the item applies.
dyedColor
constdyedColor:ItemComponent<number|ObjectShape<{rgb:Parser<number>; },Record<never,never>>>
Defined in: packages/items/src/components/stackOnly.ts:83
minecraft:dyed_color: the packed RGB color of dyed leather armor.
enchantable
constenchantable:ItemComponent<ObjectShape<{value:Parser<number>; },Record<never,never>>>
Defined in: packages/items/src/components/defaults.ts:163
minecraft:enchantable: the enchanting power the item brings to the table.
enchantmentGlintOverride
constenchantmentGlintOverride:ItemComponent<boolean>
Defined in: packages/items/src/components/defaults.ts:166
minecraft:enchantment_glint_override: forces the glint on or off regardless of enchantments.
enchantmentLevels
constenchantmentLevels:Parser<Record<string,number>>
Defined in: packages/items/src/components/values.ts:85
An enchantment level map, which is how 26.3 writes both enchantment components.
enchantments
constenchantments:ItemComponent<Record<string,number>>
Defined in: packages/items/src/components/universal.ts:26
minecraft:enchantments: the enchantments on the stack, as a level per enchantment id.
entityData
constentityData:ItemComponent<Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/defaults.ts:169
minecraft:entity_data: the entity a spawn egg spawns, with its own NBT.
equipmentSlot
constequipmentSlot:Parser<"any"|"hand"|"mainhand"|"offhand"|"armor"|"head"|"chest"|"legs"|"feet"|"body"|"saddle">
Defined in: packages/items/src/components/values.ts:42
One of EQUIPMENT_SLOTS.
equippable
constequippable:ItemComponent<ObjectShape<{slot:Parser<"any"|"hand"|"mainhand"|"offhand"|"armor"|"head"|"chest"|"legs"|"feet"|"body"|"saddle">; }, {allowed_entities:Parser<HolderSet>;asset_id:Parser<string>;camera_overlay:Parser<string>;can_be_sheared:Parser<boolean>;damage_on_hurt:Parser<boolean>;dispensable:Parser<boolean>;equip_on_interact:Parser<boolean>;equip_sound:Parser<string|Readonly<Record<string,unknown>>>;shearing_sound:Parser<string|Readonly<Record<string,unknown>>>;swappable:Parser<boolean>; }>>
Defined in: packages/items/src/components/defaults.ts:172
minecraft:equippable: the slot the item goes in and how it equips.
fireworkExplosion
constfireworkExplosion:Parser<ObjectShape<{shape:Parser<string>; }, {colors:Parser<number[]>;fade_colors:Parser<number[]>;has_trail:Parser<boolean>;has_twinkle:Parser<boolean>; }>>
Defined in: packages/items/src/components/values.ts:91
A firework explosion shape.
fireworkExplosionComponent
constfireworkExplosionComponent:ItemComponent<ObjectShape<{shape:Parser<string>; }, {colors:Parser<number[]>;fade_colors:Parser<number[]>;has_trail:Parser<boolean>;has_twinkle:Parser<boolean>; }>>
Defined in: packages/items/src/components/stackOnly.ts:86
minecraft:firework_explosion: the single explosion of a firework star.
fireworks
constfireworks:ItemComponent<ObjectShape<{ }, {explosions:Parser<ObjectShape<{shape:Parser<string>; }, {colors:Parser<number[]>;fade_colors:Parser<number[]>;has_trail:Parser<boolean>;has_twinkle:Parser<boolean>; }>[]>;flight_duration:Parser<number>; }>>
Defined in: packages/items/src/components/defaults.ts:192
minecraft:fireworks: the flight duration and explosions of a firework rocket.
float
constfloat:Parser<number>
Defined in: packages/items/src/schema.ts:25
Parses any JSON number, including a fractional one.
food
constfood:ItemComponent<ObjectShape<{nutrition:Parser<number>;saturation:Parser<number>; }, {can_always_eat:Parser<boolean>; }>>
Defined in: packages/items/src/components/defaults.ts:198
minecraft:food: the nutrition and saturation eating the item restores.
foxVariant
constfoxVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:89
minecraft:fox/variant: the coat of a fox the item references.
frogVariant
constfrogVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:92
minecraft:frog/variant: the color of a frog the item references.
glider
constglider:ItemComponent<ObjectShape<{ },Record<never,never>>>
Defined in: packages/items/src/components/defaults.ts:204
minecraft:glider: the item lets the wearer glide, which is the elytra's whole data side.
holderSet
Defined in: packages/items/src/schema.ts:195
Parses a holder set in all three of its written forms.
horseVariant
consthorseVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:95
minecraft:horse/variant: the coat of a horse the item references.
identifier
constidentifier:Parser<string>
Defined in: packages/items/src/schema.ts:57
Parses a namespaced identifier such as minecraft:stone.
An identifier with no namespace parses too, because Java's own reports write the bare form in a few places and its registries default the namespace to minecraft.
instrument
constinstrument:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/defaults.ts:207
minecraft:instrument: the goat horn sound the item plays.
intangibleProjectile
constintangibleProjectile:ItemComponent<ObjectShape<{ },Record<never,never>>>
Defined in: packages/items/src/components/stackOnly.ts:98
minecraft:intangible_projectile: the arrow cannot be picked up again.
interactAnimation
constinteractAnimation:ItemComponent<ObjectShape<{ }, {duration:Parser<number>;type:Parser<string>; }>>
Defined in: packages/items/src/components/universal.ts:29
minecraft:interact_animation: the swing the client plays for a non-attack interaction.
itemDamageFunction
constitemDamageFunction:Parser<ObjectShape<{ }, {base:Parser<number>;factor:Parser<number>;threshold:Parser<number>; }>>
Defined in: packages/items/src/components/values.ts:76
How much durability an action spends, as minecraft:blocks_attacks writes it.
itemModel
constitemModel:ItemComponent<string>
Defined in: packages/items/src/components/universal.ts:32
minecraft:item_model: the model id the client draws the item with.
itemName
constitemName:ItemComponent<TextComponent>
Defined in: packages/items/src/components/universal.ts:35
minecraft:item_name: the item's own name, below a custom_name when one is set.
itemStackReference
constitemStackReference:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>
Defined in: packages/items/src/components/values.ts:67
An item stack as a component writes one: an identifier, a count, and its own component patch.
itemTypesTable
constitemTypesTable:ItemTypesTable
Defined in: packages/items/src/tables.ts:43
The item type table instance.
json
constjson:Parser<unknown>
Defined in: packages/items/src/schema.ts:169
Accepts any JSON value unchanged, for a value this package keeps opaque.
jukeboxPlayable
constjukeboxPlayable:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/defaults.ts:210
minecraft:jukebox_playable: the song a jukebox plays for the item.
kineticWeapon
constkineticWeapon:ItemComponent<ObjectShape<{ }, {damage_conditions:Parser<Readonly<Record<string,unknown>>>;damage_modifier:Parser<number>;damage_multiplier:Parser<number>;delay_ticks:Parser<number>;dismount_conditions:Parser<Readonly<Record<string,unknown>>>;forward_movement:Parser<number>;hit_sound:Parser<string|Readonly<Record<string,unknown>>>;knockback_conditions:Parser<Readonly<Record<string,unknown>>>; }>>
Defined in: packages/items/src/components/defaults.ts:213
minecraft:kinetic_weapon: the mounted charge rules a spear uses.
llamaVariant
constllamaVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:101
minecraft:llama/variant: the coat of a llama the item references.
lock
constlock:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:104
minecraft:lock: the key predicate a locked container checks the held item against.
lodestoneTracker
constlodestoneTracker:ItemComponent<ObjectShape<{ }, {target:Parser<ObjectShape<{dimension:Parser<string>;pos:Parser<number[]>; },Record<never,never>>>;tracked:Parser<boolean>; }>>
Defined in: packages/items/src/components/stackOnly.ts:107
minecraft:lodestone_tracker: where a lodestone compass points and whether it still tracks.
lore
constlore:ItemComponent<TextComponent[]>
Defined in: packages/items/src/components/universal.ts:38
minecraft:lore: the extra tooltip lines below the name.
mapDecorations
constmapDecorations:ItemComponent<Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/defaults.ts:231
minecraft:map_decorations: the markers drawn on a filled map.
mapId
constmapId:ItemComponent<number>
Defined in: packages/items/src/components/stackOnly.ts:113
minecraft:map_id: which saved map the filled map shows.
mapPostProcessing
constmapPostProcessing:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:116
minecraft:map_post_processing: the lock or scale step applied the next time the map is used.
maxDamage
constmaxDamage:ItemComponent<number>
Defined in: packages/items/src/components/defaults.ts:234
minecraft:max_damage: the durability the item has before it breaks.
maxStackSize
constmaxStackSize:ItemComponent<number>
Defined in: packages/items/src/components/universal.ts:41
minecraft:max_stack_size: how many of the item one slot holds, 1 to 99.
minimumAttackCharge
constminimumAttackCharge:ItemComponent<number>
Defined in: packages/items/src/components/defaults.ts:237
minecraft:minimum_attack_charge: the fraction of the attack cooldown an attack needs.
mobVisibility
constmobVisibility:ItemComponent<ObjectShape<{ }, {targeting_entity_types:Parser<HolderSet>;visibility:Parser<number>; }>>
Defined in: packages/items/src/components/defaults.ts:240
minecraft:mob_visibility: how visible holding the item makes the holder to a mob.
mooshroomVariant
constmooshroomVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:119
minecraft:mooshroom/variant: the mushroom type of a mooshroom the item references.
noteBlockSound
constnoteBlockSound:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:122
minecraft:note_block_sound: the sound a note block plays with this head on top.
numberSource
constnumberSource:Parser<NumberSource>
Defined in: packages/items/src/schema.ts:216
Parses a number in all three of the forms 26.3's providers accept.
ominousBottleAmplifier
constominousBottleAmplifier:ItemComponent<number>
Defined in: packages/items/src/components/defaults.ts:246
minecraft:ominous_bottle_amplifier: the bad omen level the bottle gives.
opaque
constopaque:Parser<unknown> =json
Defined in: packages/items/src/components/values.ts:106
An opaque JSON value, for a component this package carries without reading.
paintingVariant
constpaintingVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:125
minecraft:painting/variant: which painting a painting item places.
parrotVariant
constparrotVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:128
minecraft:parrot/variant: the color of a parrot the item references.
piercingWeapon
constpiercingWeapon:ItemComponent<ObjectShape<{ }, {hit_sound:Parser<string|Readonly<Record<string,unknown>>>;sound:Parser<string|Readonly<Record<string,unknown>>>; }>>
Defined in: packages/items/src/components/defaults.ts:249
minecraft:piercing_weapon: the attack and hit sounds of a piercing weapon.
pigSoundVariant
constpigSoundVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:131
minecraft:pig/sound_variant: the sound set of a pig the item references.
pigVariant
constpigVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:134
minecraft:pig/variant: the breed of a pig the item references.
potDecorations
constpotDecorations:ItemComponent<string[] |ObjectShape<{ }, {back:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>;front:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>;left:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>;right:Parser<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>; }>>
Defined in: packages/items/src/components/defaults.ts:255
minecraft:pot_decorations: the four sherds of a decorated pot item.
potionContents
constpotionContents:ItemComponent<ObjectShape<{ }, {custom_color:Parser<number>;custom_effects:Parser<ObjectShape<{id:Parser<string>; }, {amplifier:Parser<number>;duration:Parser<number>;show_icon:Parser<boolean>; }>[]>;custom_name:Parser<string>;potion:Parser<string>; }>>
Defined in: packages/items/src/components/defaults.ts:267
minecraft:potion_contents: the potion, custom color and extra effects of a potion item.
potionDurationScale
constpotionDurationScale:ItemComponent<number>
Defined in: packages/items/src/components/defaults.ts:281
minecraft:potion_duration_scale: multiplies the duration of every effect the item applies.
profile
constprofile:ItemComponent<string|ObjectShape<{ }, {id:Parser<number[]>;name:Parser<string>;properties:Parser<Readonly<Record<string,unknown>> |Readonly<Record<string,unknown>>[]>; }>>
Defined in: packages/items/src/components/stackOnly.ts:137
minecraft:profile: the player a head shows, by name, uuid or stored textures.
providesBannerPatterns
constprovidesBannerPatterns:ItemComponent<HolderSet>
Defined in: packages/items/src/components/defaults.ts:284
minecraft:provides_banner_patterns: the banner patterns the item unlocks in a loom.
providesPotteryPattern
constprovidesPotteryPattern:ItemComponent<string>
Defined in: packages/items/src/components/defaults.ts:287
minecraft:provides_pottery_pattern: the sherd pattern the item contributes to a pot.
providesTrimMaterial
constprovidesTrimMaterial:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/defaults.ts:290
minecraft:provides_trim_material: the armor trim material the item provides.
rabbitVariant
constrabbitVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:143
minecraft:rabbit/variant: the coat of a rabbit the item references.
range
constrange:Parser<ObjectShape<{ }, {max:Parser<number>;min:Parser<number>; }>>
Defined in: packages/items/src/components/values.ts:73
An inclusive numeric range, written as a pair of bounds.
rarity
constrarity:ItemComponent<"common"|"uncommon"|"rare"|"epic">
Defined in: packages/items/src/components/universal.ts:44
minecraft:rarity: one of RARITIES.
readItemComponents
constreadItemComponents:ComponentReader
Defined in: packages/items/src/itemTypes.ts:34
Reads the component list out of an item definition.
An item definition's data is a plain components map, which is both the shape the generated table writes and the shape Java's own default component report uses. Items have no permutations and no component groups, so no entry sets override and the dispatch order is the order the definition lists its components in.
recipes
constrecipes:ItemComponent<string[]>
Defined in: packages/items/src/components/defaults.ts:293
minecraft:recipes: the recipes a recipe book item unlocks.
repairCost
constrepairCost:ItemComponent<number>
Defined in: packages/items/src/components/universal.ts:47
minecraft:repair_cost: the accumulated anvil cost, in levels.
repairable
constrepairable:ItemComponent<ObjectShape<{items:Parser<HolderSet>; },Record<never,never>>>
Defined in: packages/items/src/components/defaults.ts:296
minecraft:repairable: the items that repair this one on an anvil.
salmonSize
constsalmonSize:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:146
minecraft:salmon/size: the size of a bucketed salmon.
sheepColor
constsheepColor:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:149
minecraft:sheep/color: the wool color of a sheep the item references.
shulkerColor
constshulkerColor:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:152
minecraft:shulker/color: the color of a shulker the item references.
signText
constsignText:Parser<ObjectShape<{ }, {color:Parser<string>;has_glowing_text:Parser<boolean>;messages:Parser<TextComponent[]>; }>>
Defined in: packages/items/src/components/values.ts:100
The sign text one face of a sign item carries.
signTextBack
constsignTextBack:ItemComponent<ObjectShape<{ }, {color:Parser<string>;has_glowing_text:Parser<boolean>;messages:Parser<TextComponent[]>; }>>
Defined in: packages/items/src/components/defaults.ts:299
minecraft:sign_text_back: the text on the back face of a sign item.
signTextFront
constsignTextFront:ItemComponent<ObjectShape<{ }, {color:Parser<string>;has_glowing_text:Parser<boolean>;messages:Parser<TextComponent[]>; }>>
Defined in: packages/items/src/components/defaults.ts:302
minecraft:sign_text_front: the text on the front face of a sign item.
storedEnchantments
conststoredEnchantments:ItemComponent<Record<string,number>>
Defined in: packages/items/src/components/defaults.ts:305
minecraft:stored_enchantments: the enchantments an enchanted book carries without applying.
sulfurCubeContent
constsulfurCubeContent:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:162
minecraft:sulfur_cube_content: what a sulfur cube holds.
Added in 26.2 and carried by no vanilla item default and no vanilla data file, so the shape is unverified against the pinned sources and the parser accepts an identifier or a compound. It is listed in UNVERIFIED_SHAPE_COMPONENTS.
suspiciousStewEffects
constsuspiciousStewEffects:ItemComponent<ObjectShape<{id:Parser<string>; }, {duration:Parser<number>; }>[]>
Defined in: packages/items/src/components/defaults.ts:308
minecraft:suspicious_stew_effects: the effects eating the stew applies.
text
consttext:Parser<string>
Defined in: packages/items/src/schema.ts:47
Parses a JSON string.
textComponent
consttextComponent:Parser<TextComponent>
Defined in: packages/items/src/schema.ts:233
Parses a Java text component in each of its three written forms.
textComponentList
consttextComponentList:Parser<TextComponent[]>
Defined in: packages/items/src/components/values.ts:88
A list of text components, which is how minecraft:lore writes its lines.
tool
consttool:ItemComponent<ObjectShape<{rules:Parser<ObjectShape<{blocks:Parser<HolderSet>; }, {correct_for_drops:Parser<boolean>;speed:Parser<number>; }>[]>; }, {can_destroy_blocks_in_creative:Parser<boolean>;damage_per_block:Parser<number>;default_mining_speed:Parser<number>; }>>
Defined in: packages/items/src/components/defaults.ts:314
minecraft:tool: the mining rules, per block set, that make the item a tool.
toolRule
consttoolRule:Parser<ObjectShape<{blocks:Parser<HolderSet>; }, {correct_for_drops:Parser<boolean>;speed:Parser<number>; }>>
Defined in: packages/items/src/components/values.ts:54
One entry of minecraft:tool's rule list: a block set with a mining speed and a drop flag.
tooltipDisplay
consttooltipDisplay:ItemComponent<ObjectShape<{ }, {hidden_components:Parser<string[]>;hide_tooltip:Parser<boolean>; }>>
Defined in: packages/items/src/components/universal.ts:50
minecraft:tooltip_display: which parts of the tooltip the client hides.
tooltipStyle
consttooltipStyle:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:165
minecraft:tooltip_style: the resource pack tooltip frame the client draws.
trim
consttrim:ItemComponent<ObjectShape<{material:Parser<string|Readonly<Record<string,unknown>>>;pattern:Parser<string|Readonly<Record<string,unknown>>>; },Record<never,never>>>
Defined in: packages/items/src/components/stackOnly.ts:168
minecraft:trim: the armor trim material and pattern.
tropicalFishBaseColor
consttropicalFishBaseColor:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:174
minecraft:tropical_fish/base_color: the body color of a bucketed tropical fish.
tropicalFishPattern
consttropicalFishPattern:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:177
minecraft:tropical_fish/pattern: the pattern of a bucketed tropical fish.
tropicalFishPatternColor
consttropicalFishPatternColor:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:180
minecraft:tropical_fish/pattern_color: the pattern color of a bucketed tropical fish.
unbreakable
constunbreakable:ItemComponent<ObjectShape<{ },Record<never,never>>>
Defined in: packages/items/src/components/stackOnly.ts:183
minecraft:unbreakable: the item spends no durability.
useCooldown
constuseCooldown:ItemComponent<ObjectShape<{seconds:Parser<number>; }, {cooldown_group:Parser<string>; }>>
Defined in: packages/items/src/components/defaults.ts:323
minecraft:use_cooldown: the cooldown using the item starts, in seconds.
useEffects
constuseEffects:ItemComponent<ObjectShape<{ }, {can_sprint:Parser<boolean>;interact_vibrations:Parser<boolean>;sound:Parser<string>;speed_multiplier:Parser<number>; }>>
Defined in: packages/items/src/components/universal.ts:56
minecraft:use_effects: how using the item changes the holder's movement and vibrations.
useRemainder
constuseRemainder:ItemComponent<ObjectShape<{id:Parser<string>; }, {components:Parser<Readonly<Record<string,unknown>>>;count:Parser<number>; }>>
Defined in: packages/items/src/components/defaults.ts:329
minecraft:use_remainder: the item left behind after a use, such as a bowl or a bottle.
villagerFood
constvillagerFood:ItemComponent<ObjectShape<{nutrition:Parser<number>; },Record<never,never>>>
Defined in: packages/items/src/components/defaults.ts:332
minecraft:villager_food: how much feeding the item to a villager restores.
villagerVariant
constvillagerVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:186
minecraft:villager/variant: the biome outfit of a villager the item references.
waxed
constwaxed:ItemComponent<boolean|ObjectShape<{ },Record<never,never>>>
Defined in: packages/items/src/components/stackOnly.ts:195
minecraft:waxed: the item is waxed and no longer oxidizes.
Added in 26.3 and carried by no vanilla item default and no vanilla data file, so the shape is unverified; the parser accepts both the empty-unit form and a boolean. Listed in UNVERIFIED_SHAPE_COMPONENTS.
weapon
constweapon:ItemComponent<ObjectShape<{ }, {disable_blocking_for_seconds:Parser<number>;item_damage_per_attack:Parser<number>; }>>
Defined in: packages/items/src/components/defaults.ts:335
minecraft:weapon: the durability an attack spends and how long it disables blocking.
wolfCollar
constwolfCollar:ItemComponent<string>
Defined in: packages/items/src/components/stackOnly.ts:198
minecraft:wolf/collar: the collar color of a wolf the item references.
wolfSoundVariant
constwolfSoundVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:201
minecraft:wolf/sound_variant: the sound set of a wolf the item references.
wolfVariant
constwolfVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:204
minecraft:wolf/variant: the coat of a wolf the item references.
writableBookContent
constwritableBookContent:ItemComponent<ObjectShape<{ }, {pages:Parser<(string|ObjectShape<{raw:Parser<string>; }, {filtered:Parser<string>; }>)[]>; }>>
Defined in: packages/items/src/components/defaults.ts:341
minecraft:writable_book_content: the pages of a book and quill.
writtenBookContent
constwrittenBookContent:ItemComponent<ObjectShape<{ }, {author:Parser<string>;generation:Parser<number>;pages:Parser<(TextComponent|ObjectShape<{raw:Parser<string>; }, {filtered:Parser<string>; }>)[]>;resolved:Parser<boolean>;title:Parser<string|ObjectShape<{raw:Parser<string>; }, {filtered:Parser<string>; }>>; }>>
Defined in: packages/items/src/components/stackOnly.ts:207
minecraft:written_book_content: the title, author and pages of a signed book.
zombieNautilusVariant
constzombieNautilusVariant:ItemComponent<string|Readonly<Record<string,unknown>>>
Defined in: packages/items/src/components/stackOnly.ts:222
minecraft:zombie_nautilus/variant: the variant of a zombie nautilus the item references.
Functions
buildBedrockItemTags()
buildBedrockItemTags(
source?,overrides?):BedrockItemTags
Defined in: packages/items/src/bedrockTags.ts:33
Builds a Bedrock item tag index and applies tags declared by loaded item definitions over the captured vanilla membership.
Parameters
source?
BedrockItemTagSource = {}
Tag name to vanilla item identifiers.
overrides?
BedrockItemTagOverrides = ...
Item identifier to its explicit minecraft:tags list.
Returns
burnTimeOf()
burnTimeOf(
type,context?):number
Defined in: packages/items/src/facts.ts:21
The burn time of one item type in ticks, zero when the item is not a fuel.
26.3 writes a burn time as a reference into context_int_provider, so the number depends on the cooking block: minecraft:cooking/time_boats is 1200 in a furnace and 600 in a smoker. The default context is the furnace.
Parameters
type
context?
ProviderContext = DEFAULT_PROVIDER_CONTEXT
Which conditions the provider branches on hold.
Returns
number
canStack()
canStack(
left,right):boolean
Defined in: packages/items/src/ItemStack.ts:231
Whether two stacks can merge: the same item, the same components, and room for more than one.
Parameters
left
right
Returns
boolean
componentValuesEqual()
componentValuesEqual(
left,right):boolean
Defined in: packages/items/src/ItemStack.ts:35
Compares two parsed component values structurally.
Component values are parsed JSON, so this walks objects and lists rather than comparing serialized NBT. Object key order does not matter; list order does, because a list component such as minecraft:lore is ordered.
Parameters
left
unknown
right
unknown
Returns
boolean
createItemComponentRegistry()
createItemComponentRegistry(
extra?):ComponentRegistry<ItemHooks>
Defined in: packages/items/src/components/catalog.ts:37
Builds a registry holding all 122 component types.
Parameters
extra?
readonly ItemComponent<unknown>[] = []
Components a plugin adds, registered after the vanilla ones so a duplicate name fails loudly rather than replacing a vanilla type.
Returns
Throws
When extra repeats a name the catalog already has.
dataComponent()
dataComponent<
P>(name,schema):ItemComponent<P>
Defined in: packages/items/src/components/define.ts:41
Builds a component that only carries parsed data.
Most of Java's 122 data component types are exactly this: a validated value an item type holds, with the behavior that reads it living in a behavior family rather than in the component. A component that does implement a hook uses defineItemComponent and declares it.
Type Parameters
P
P
Parameters
name
string
The component name, as Java's registry writes it.
schema
Parser<P>
The parser for the component's value.
Returns
defineItemComponent()
defineItemComponent<
P>(factory):ItemComponent<P>
Defined in: packages/items/src/components/define.ts:24
Builds an ItemComponent from a factory, keeping its parameter type.
Type Parameters
P
P
Parameters
factory
ComponentFactory<ItemHooks, P>
Returns
either()
either<
A,B>(first,second):Parser<A|B>
Defined in: packages/items/src/schema.ts:159
Tries each parser in order and takes the first that accepts.
Type Parameters
A
A
B
B
Parameters
first
Parser<A>
second
Parser<B>
Returns
Parser<A | B>
The first accepted value, or a rejection naming every attempt.
enchantableSlotOf()
enchantableSlotOf(
type):string
Defined in: packages/items/src/projection.ts:313
Picks the Bedrock enchanting category for an item.
Java has no such field, so it is derived: the mineable/* tag in the item's tool rules names the tool, the equipment slot names the armor piece, and the spear components, shield rules and glider each name themselves.
Parameters
type
Returns
string
evaluateNumberProvider()
evaluateNumberProvider(
node,context?,providers?):number
Defined in: packages/items/src/numberProvider.ts:56
Evaluates one provider node or reference to a number.
A weighted list evaluates to its expected value, not a sample, because every caller here wants the probability a composter layer is added rather than one roll of it. minecraft:compostable/low therefore returns 0.3.
Parameters
node
unknown
A number, a provider id, or an inline provider definition.
context?
ProviderContext = DEFAULT_PROVIDER_CONTEXT
Decides the conditions the definition branches on.
providers?
Record<string, unknown> = itemTypesTable.providers
The definitions to resolve a reference against, defaulting to the ones the item type table carries.
Returns
number
Throws
On an unknown reference or an unknown node kind.
flattenItemFacts()
flattenItemFacts(
registry,context?):ItemFacts
Defined in: packages/items/src/facts.ts:60
Precomputes the item facts a hot path reads, indexed by the registry's dense id, so an inventory move or a furnace tick reads an array slot instead of walking a type's component list.
burnTimeTicks is capped by the u16 column, which the longest vanilla burn time, the lava bucket's 20000 ticks, fits inside.
Parameters
registry
A built registry; its ids are the table's indices.
context?
ProviderContext = DEFAULT_PROVIDER_CONTEXT
The cooking context burn times are resolved for, a normal furnace by default.
Returns
Throws
When a value does not fit its column.
int()
int(
min?,max?):Parser<number>
Defined in: packages/items/src/schema.ts:37
Parses a whole JSON number.
Parameters
min?
number = Number.MIN_SAFE_INTEGER
Smallest accepted value, inclusive.
max?
number = Number.MAX_SAFE_INTEGER
Largest accepted value, inclusive.
Returns
Parser<number>
itemDefinition()
itemDefinition(
identifier,components,pack?):Definition
Defined in: packages/items/src/definitions.ts:13
Builds one item definition from a plain component map, which is the shape the generated table and Mojang's own default component report both use.
Parameters
identifier
string
The Bedrock item identifier the type registers under.
components
Record<string, unknown>
Component name to raw value, in the order they bind.
pack?
string = 'overlay'
The pack name diagnostics report, overlay by default.
Returns
listOf()
listOf<
T>(element):Parser<T[]>
Defined in: packages/items/src/schema.ts:77
Parses a JSON list, every element through the same parser.
Type Parameters
T
T
Parameters
element
Parser<T>
Returns
Parser<T[]>
literalOf()
literalOf<
T>(values):Parser<T[number]>
Defined in: packages/items/src/schema.ts:64
Parses one of a fixed set of strings.
Type Parameters
T
T extends readonly string[]
Parameters
values
T
Returns
Parser<T[number]>
loadItemTypes()
loadItemTypes(
options?):LoadedItemTypes
Defined in: packages/items/src/itemTypes.ts:124
Resolves item definitions into types and builds the registry.
Parameters
options?
LoadItemTypesOptions = {}
Returns
Throws
In strict mode, when any diagnostic is reported.
mapOf()
mapOf<
T>(entry):Parser<Record<string,T>>
Defined in: packages/items/src/schema.ts:91
Parses a JSON object whose keys are free and whose values share a parser.
Type Parameters
T
T
Parameters
entry
Parser<T>
Returns
Parser<Record<string, T>>
maxStackSizeOf()
maxStackSizeOf(
stack):number
Defined in: packages/items/src/ItemStack.ts:228
How many of one item fit in a slot, from minecraft:max_stack_size.
Parameters
stack
Returns
number
mergeStacks()
mergeStacks(
into,from):StackMerge
Defined in: packages/items/src/ItemStack.ts:249
Moves as much of one stack into another as the slot limit allows.
Parameters
into
from
Returns
Both stacks as copies; neither argument is modified. When the two cannot stack, merged is the target unchanged and remainder is the whole source.
object()
object<
R,O>(required,optional?):Parser<ObjectShape<R,O>>
Defined in: packages/items/src/schema.ts:118
Parses a JSON object with named fields.
Unknown keys parse and are dropped rather than failing, because Mojang adds fields to a component within a release and a pinned schema that rejects them would turn a data refresh into a load failure.
Type Parameters
R
R extends Record<string, Parser<unknown>>
O
O extends Record<string, Parser<unknown>> = Record<never, never>
Parameters
required
R
Fields that must be present.
optional?
O
Fields that may be present.
Returns
Parser<ObjectShape<R, O>>
parsedOr()
parsedOr<
T>(result,fallback):T
Defined in: packages/items/src/schema.ts:240
Narrows a parse result to its value, for a parser used inside another one.
Type Parameters
T
T
Parameters
result
ParseResult<T>
fallback
T
Returns
T
patchesEqual()
patchesEqual(
left,right):boolean
Defined in: packages/items/src/ItemStack.ts:51
Compares two component patches, ignoring the order entries were added in.
Parameters
left
right
Returns
boolean
projectItemToBedrock()
projectItemToBedrock(
type,options?):BedrockItemComponents
Defined in: packages/items/src/projection.ts:446
Projects one resolved item type onto the Bedrock component compound the client needs in ItemRegistryPacket.
Only the facts Java's components decide are produced. Keys with no Java source are left out rather than guessed, so the protocol layer can merge its own without having to tell a derived value from a placeholder.
Parameters
type
options?
ProjectionOptions = {}
Returns
sameItemSameComponents()
sameItemSameComponents(
left,right):boolean
Defined in: packages/items/src/ItemStack.ts:221
Whether two stacks are the same item carrying the same components, which is Java's ItemStack.isSameItemSameComponents.
Java compares the item and then the whole PatchedDataComponentMap, whose equals compares the prototype and the patch, verified by disassembling PatchedDataComponentMap in the pinned 26.3 server jar. So a stack that sets a component to the value the type already defaults to is not equal to a stack with an empty patch, even though both read the same. The count is not part of the comparison, and two empty stacks of the same item are equal whatever their patches hold.
Parameters
left
right
Returns
boolean
vanillaItemDefinitions()
vanillaItemDefinitions():
Definition[]
Defined in: packages/items/src/itemTypes.ts:66
The vanilla item definitions, one per Bedrock item identifier, built from the generated table.
The identifier is Bedrock's and the components are Java's, which is the plan's split: the client has to recognize the item, and the server has to know what it does.