#cant get item to give effect in inventory

1 messages · Page 1 of 1 (latest)

green pine
#

{
"format_version": "1.10.0",
"animation_controllers": {
"controller.animation.flanged_mace.sword": {
"initial_state": "default",
"states": {
"default": {
"on_entry": [
"/scoreboard players remove @s curweight 3"
],
"transitions": [
{
"is_wearing": "query.is_item_name_any('slot.hotbar', 8, 'g4:flanged_mace')"
}
]
},
"is_immobile": {
"animations": [
"flanged_maced"
],
"transitions": [
{
"default": "!query.is_item_name_any('slot.hotbar', 0, 'g4:flanged_mace')"
}
]
}
}
}
}
}

#

im trying to get it to run a command when the item is in inventory

true sequoia
# green pine im trying to get it to run a command when the item is in inventory

if you want an item to give you an effect while holding it or just in your inventory in general, you can make a function with a command that uses the effect command with a selector that contains has item, and/or location arguments. you will have to put this function within tick.json or a script that triggers things on ticks in the same fashion.

#

if you use bridge, there's an extension that can help you with those commands called simple tools

green pine
#

@true sequoia my problem with that is I'm trying to tell it to do a scoreboard when item is in inventory but need the score board to set back to 0 when item leaves the inventory

true sequoia
green pine
true sequoia
#

ah, that's a problem.

#

maybe you can use tags with the scoreboard instead.

green pine
#

thank you tho for help didn't know you could do that with functions