#ProtocolLib sounds
1 messages · Page 1 of 1 (latest)
So
what i have so far is
Now i need to figure out how to get the data from the packet
?
Which essentially represent fields in the NMS packet class
lemme move it here
Oh btw not Named Sound Effect
That applies to sounds added by a resourcepack
Not sounds built into the game
Probably

Btw I should mention that there is no structure modifier for SoundEffect types
Although actually that doesn't really matter since SoundEffect is NMS and you probably don't wanna use it
Entity Sound's sound ID is the third field, although it's the first int field, so you'd use .getIntegers().read(0)
Also yes the index is relative to the field type
That fucked with me personally
oh wait
so now
i need to figure how to get the sound id dynamically
so it works in more versions
It will probably work for most versions
k ig
In order to get it dynamically you'd have to interface with Minecraft's registry
ohk
Actually wait no this is the ID of the entity that played the sound
So unfortunately you may have to use NMS
cuuuuz
Wellll
actually
You could use .getModifier().read(0)
Which would return an Object
which you could then reflect upon to get the ID
...if it stores the ID
Well shit
The other solution is to directly compare the object to SoundEffects.SPYGLASS_STOP_USING but that wouldn't work across versions all too well
So yeah either way you're gonna need to put a lot of effort into cross-version shit
Soz