{
"format_version": "1.20.60",
"minecraft:item": {
"description": {
"identifier": "custom:wood_wizard",
"menu_category": {
"group": "custom:wizards",
"category": "equipment"
}
},
"components": {
"minecraft:max_stack_size": 1,
"minecraft:enchantable": {
"value": 10,
"slot": "bow"
},
"minecraft:shooter": {
"ammunition": [
{
"item": "minecraft:arrow",
"use_offhand": true,
"search_inventory": true,
"use_in_creative": true
},
{
"item":"minecraft:wind_charge",
"use_offhand": false,
"search_inventory": true,
"use_in_creative": true
}
],
"max_draw_duration": 0.1,
"scale_power_by_draw_duration": true,
"charge_on_draw": false
},
"minecraft:display_name": {
"value": "item.wood_wizard.name"
},
"minecraft:icon": {
"textures": {"default":"wood_wizard"}
},
"minecraft:durability": {
"max_durability": 120,
"damage_chance": {
"min": 50,
"max": 100
}
},
"minecraft:repairable": {
"repair_items": [
{
"items": [
"custom:wood_wizard"
],
"repair_amount": "context.other->query.remaining_durability + 0.2 * context.other->query.max_durability"
},
{
"items":[
"emerald"
],
"repair_amount": 30
}
]
},
"minecraft:hand_equipped": true,
"minecraft:can_destroy_in_creative": false,
"minecraft:use_animation": "bow",
"minecraft:use_modifiers": {
"use_duration": 0.5,
"movement_modifier": 1.0
}
}
}
}
Through the code, we can use “wood_wizard” to shoot arrows and wind charges. The arrows are allowed to be consumed when it’s in the offhand slot while the wind charges are not.(actually wind charge cannot be equipped in offhand slot)
And “wood_wizard” can be enchanted with bow-type enchants, which involves “infinity”. So, when it is enchanted with “infinity”, it can shoot arrows as soon as there are arrows in your inventory.
[Note] Following “pick up” means approach the projectile entity, but not the item entity.
Arrows in inventory slots: When you shoot them on the ground, it doesn’t consume the arrows. But when try to pick them up, you will see the quantity of arrows increases. We know the arrows should disappear and no quantity increase.
Arrows in offhand slot: When you shoot them on the ground, it consumes the arrows. And you can’t move the arrows in the offhand slot until you pick up arrows you shot. But when you deplete all the arrows in offhand slot, you’ll unable to pick them up(though the arrows disappear, the arrows won’t back into your offhand or inventory).
Wind Charges: I thought it won’t be affected by the enchant “infinity”. But in fact, it won’t consume wind charge while you shoot them. And of course you can’t pick up wind charges. So it doesn’t matter.
Plus, “wood_wizard” can consume all kinds of arrows, but only shoot normal arrows. I don’t know if it is caused by the same issue.
Please attach a complete mcpack file that we can import to test the issue.