#[1.21] (Blockutis) stop_sound for individual sounds

76 messages · Page 1 of 1 (latest)

steel parrot
#

I can't seem to get the stop_sound mechanism to work with stopping an individual sound. If i set it to "BLOCKS", it works, but not for the sound "minecraft:block.glass.break"
I've tried all of the following:

- adjust <player> stop_sound:BLOCK_GLASS_BREAK
- adjust <player> stop_sound:MINECRAFT_BLOCK_GLASS_BREAK
- adjust <player> stop_sound:minecraft:block.glass.break
- adjust <player> stop_sound:minecraft<&co>block.glass.break
- adjust <player> stop_sound:<element[minecraft:block.glass.break]>
- adjust <player> stop_sound:<element[minecraft<&co>block.glass.break]>

what is the proper format for this? or is this a bug?

echo hullBOT
#

(Blockutis) stop_sound for individual sounds

echo hullBOT
#

Hi I'm AutoThreadBot! Don't mind me, I'll just be adding the helper team to this thread so they can see it. A human will get to you soon.

prime escarp
#

!m stop_sound

sweet bronzeBOT
# prime escarp !m stop_sound

Stops all sounds of the specified type for the player.
Valid types are AMBIENT, BLOCKS, HOSTILE, MASTER, MUSIC, NEUTRAL, PLAYERS, RECORDS, VOICE, and WEATHER
Instead of a type, you can specify a full sound key, which usually has the 'minecraft:' prefix.
If no sound type is specified, all types will be stopped.

Object

PlayerTag

Input

ElementTag

steel parrot
#

i know, thats what im using

prime escarp
#

That was for me

steel parrot
#

oh

prime escarp
#

You have not tried minecraft:BLOCK_GLASS_BREAK yet

steel parrot
#

ill try it, 1 sec

#

nope

prime escarp
#

!e entity hears sound

sweet bronzeBOT
#
Possible Confusion

Did you mean to search for entity heals because cause?

prime escarp
#

!e hears

sweet bronzeBOT
# prime escarp !e hears
Cannot Specify Searched Event

Multiple possible events: player hears sound, block shears entity, player shears entity.

prime escarp
#

!e player hears sound

sweet bronzeBOT
# prime escarp !e player hears sound
Group

Player

Event Lines

player hears sound

Switches

key:<sound_key> to only process the event if the sound matches the modern Minecraft sound key.

Triggers

when a player receives a sound packet from the server.

Has Player

Always. - this adds switches flagged:<flag name> + permission:<node>, in addition to the <player> link.

Context

<context.sound_key> returns an ElementTag of the modern Minecraft sound key.
<context.sound_name> returns an ElementTag of the sound's Bukkit name.
<context.category> returns the name of the category the sound is from.
<context.is_custom> returns 'true' if the sound is custom, otherwise false.
<context.source_entity> returns the entity this sound came from (if any).
<context.location> returns the location the sound will play at.
<context.volume> returns the volume level.
<context.pitch> returns the pitch.

Has Known Location

True - this adds switches in:<area> + location_flagged:<flag name>.

Cancellable

True - this adds <context.cancelled> and determines cancelled + cancelled:false.

prime escarp
#

You could also try that real quick

steel parrot
#

it doesn't work with block placing/breaking sounds

prime escarp
#

narrate the <context.sound_key>

steel parrot
#

i think they're client side or something, cause denizen doesnt detect it

prime escarp
#

What version are you on?

steel parrot
#

1.21, let me get exact version information

prime escarp
#

Can you test on 1.20.4?

steel parrot
#

paper 1.21-124-master@df3b654
denizen 1.3.1-SNAPSHOT (build 7057-DEV)

steel parrot
prime escarp
#

If it's working on 1.20.4 it's an 1.20.6/1.21 issue

steel parrot
#

Yeah, it works on 1.20.4

#

but it's broken on 1.21

prime escarp
#

Mind sharing a debug of it

#

on 1.21

mossy hatchBOT
#
Changed to Bug

Thread is now a Bug thread. This indicates a core code bug that a developer must resolved, not an error message or other support topic. Please do not misuse the Bug label. Use </helpthread:1028674284870180883> to switch the thread back to a normal help thread if you are not 100% confident it is a code bug.

prime escarp
#

[1.21] (Blockutis) stop_sound for individual sounds

steel parrot
#

net.minecraft.ResourceLocationException: Non [a-z0-9/._-] character in path of location: minecraft:minecraft:block.glass.break

#

okay

#

i broke 2 glass blocks

prime escarp
#

02:14:12 Additional Error Info: Exception! Enable '/denizen debug -s' for the nitty-gritty. never seen this message lmao

steel parrot
#

might be my fault

#

I forgot the command to submit it

#

so i tried -s

#

and it said it disabled extra details

prime escarp
#

oh can you activate

steel parrot
#

so i re-enabled it

#

Wait no

#

i re-enabled it

#

but then re-disabled it lmao

#

1 sec

#

Okay i have it working now

#

The ONE variation i didnt try, ended up being correct lol

#

stop_sound:block.glass.break

#

you can't include the "minecraft:" part

#

Although, on 1.20.4, you actually can

prime escarp
#

Yeah it's also yelling at the Titlecase

steel parrot
#

?

prime escarp
#

Does BLOCK.GLASS.BREAK work?

steel parrot
#

no

prime escarp
#

but block.glass.break does?

steel parrot
#

yes

#

i actually thought denizen didnt care about case

#

but i guess that is only with certain things, like comparing element tags

prime escarp
#

the error does not come from denizen

steel parrot
#

oh

prime escarp
#

minecraft's yelling at it

steel parrot
#

i wonder why it was fine in 1.20.4

prime escarp
#

I suppose you could add a toLowerCase() in code to make sure it's always lowercase, so it wont break all scripts that used the uppercase name

steel parrot
#

yeah

#

i guess mojang changed something that caused this?

prime escarp
#

ye, that mech relies on NMS

sleek merlin
#

Sorry forgot to mention it here, but fixed ref #commit-log message

mossy hatchBOT
#
Thread Closing Reminder

Has your issue been resolved, or your question been answered?
If so, please use the </resolved:1028673926114594866> command to close your thread.
Or </invalid:1028673926898909185> if it's not possible to resolve.

If not yet resolved, please reply below to tell us what you still need.

(Note that if there is no reply for a few days, this thread will eventually close itself.)

#

@steel parrot

steel parrot
#

oh, nice!