Skip to content

Modify Item

Applies an item modifier to an item stack.

Type ID: kaya:modify_item

Format

Field Type Default Description
modifier Identifier The ID of the item modifier.
slot Slot Provider The slot of the item that will be modified.
position Vec3 Provider optional If specified, this position will be passed as the minecraft:origin vanilla context parameter for the item modifier.
entity Entity Provider optional If specified, this entity will be used as the minecraft:this_entity vanilla context parameter for the item modifier.

Example

{
    "type": "kaya:modify_item",
    "modifier": "example:smelt_item"/*(1)!*/,
    "slot": "used_item_slot"
}
  1. The location of the file is data/example/item_modifier/smelt_item.json with the following as its contents:

    {
        "function": "minecraft:furnace_smelt"
    }
    

This example will essentially smelt the item provided by the kaya:used_item_slot context parameter.

History

Minecraft Mod Changelog
1.21.5 0.1.0 Added the type.