"condition": "q.block_state('df-v:colors')==15",
"components": {
"minecraft:material_instances": {
"*": {
"texture": "lamp_15",
"render_method": "alpha_test"
}
},
"minecraft:on_interact": {
"condition": "query.get_equipped_item_name=='stick'",
"event": "df-v:delete"
}
}
},
{
"condition": "q.block_state('df-v:light')==0",
"components": {
"minecraft:light_emission": 0,
"minecraft:on_interact": {
"condition": "query.get_equipped_item_name=='stick'",
"event": "df-v:on"
}
}
},
{
"condition": "q.block_state('df-v:light')==1",
"components": {
"minecraft:light_emission": 11,
"minecraft:on_interact": {
"condition": "query.get_equipped_item_name=='stick'",
"event": "df-v:off"
}
}
}```
#Need help
1 messages · Page 1 of 1 (latest)
Here's the part of the code that doesn't work
query.get_equipped_item_name is deprecated, you should use ```
query.is_item_name_any('slot.weapon.mainhand',0,'minecraft:stick')
@jade coyote And how do you make sure that when you press the stick, it ignores the parameter to change the light, so that only the texture changes?
What I said is just information, I'm not sure if this is the cause of the problem. If possible send the complete code
You are using properties instead of states, try this
Doesn't work
It is necessary that at the end, where the light changes, it is necessary that when you use a stick, it does not work
Using ! it didn't work either
!query.is_item_name_any('slot.weapon.mainhand',0,'stick')
It didn't work that way either
Try this one, I think it should work. If it doesn't work, say what's happening clearly, I can't understand exactly what you want to do.
Your events didn't seem right
You added minecraft:on_interact to each permutation and also added 4 events, so you only needed 1 event and 1 minecraft:on_interact