#Need help

1 messages · Page 1 of 1 (latest)

zenith jay
#
                "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"
                    }
                }
            }```
zenith jay
#

Here's the part of the code that doesn't work

jade coyote
zenith jay
#

@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?

jade coyote
zenith jay
#

@jade coyote Here's the code

jade coyote
zenith jay
#

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

jade coyote
zenith jay
#

Wow, it works, thank you

#

And what was the mistake?

jade coyote
#

You added minecraft:on_interact to each permutation and also added 4 events, so you only needed 1 event and 1 minecraft:on_interact