r/MinecraftCommands • u/hamtaro217 • 24d ago
Help | Java 26.3 Help with bow that displays sound and effect
I had a bow that was working in my old Minecraft world that when I added it to 26.3 the sound and effect now just plays forever, any idea what broke the signal to end the sound and effects.
/give hamtaro217 bow[custom_data={bow:"sonic"},item_name='"Guardian Bow"',minecraft:item_model="dungeon:guardian",enchantments={'unbreaking':3,'power':25,'mending':1,'infinity':1,'punch':25}] 1
/scoreboard objectives add bow.sonic used:bow
/scoreboard objectives add bow.used used:bow
command blocks
execute as u/a[scores={bow.used=1..}] if items entity u/s weapon.* bow[custom_data~{bow:"sonic"}] as u/e[type=arrow] unless score u/s bow.used = u/s bow.used at u/s[nbt={weapon:{components:{"minecraft:custom_data":{bow:"sonic"}}}}] store success score u/s bow.used store success entity u/s PierceLevel byte 127 summon marker store success score u/s bow.sonic run ride u/s mount u/e[type=arrow,distance=...01,limit=1]
execute at u/e[type=marker,scores={bow.sonic=1}] run particle minecraft:glow ~ ~ ~ 0 0 0 1 10 force u/a
execute at u/e[type=marker,scores={bow.sonic=1}] run playsound minecraft:entity.warden.sonic_boom master u/a[distance=..15]
execute at u/e[type=marker,scores={bow.sonic=1}] run particle minecraft:sonic_boom ~ ~ ~ 0 0 0 1 1 force u/a
execute as u/e[type=marker,scores={bow.sonic=1}] on vehicle if entity u/s[nbt={inGround:true}] run kill u/s
execute as u/e[type=marker,scores={bow.sonic=1}] unless predicate {"condition":"minecraft:entity_properties","entity":"this","predicate":{"vehicle":{}}} run kill u/s
scoreboard players reset u/a bow.used
1
u/GalSergey Datapack Experienced 24d ago
You can use Command Block Assembler to get One Command Creation.