Affects Version/s: Minecraft 1.7.4, Minecraft 14w07a, Minecraft 14w08a, Minecraft 1.7.5, Minecraft 14w11b
Read before closing: This ticket is related to
MC-36348, but I do not think it is a duplicate. MC-36348 was poorly worded, and did not really focus on the issue with "replace". Furthermore, Grum could not reproduce the issue it described, and it was closed as "Cannot Reproduce". Players requested for it to be re-opened, but it never was.
I'm making this ticket because I can unambiguously reproduce what I describe here. If you close this as a duplicate, please re-open
MC-36348 and update its title, description, and Affected Versions. I wouldn't be doing this if the issue had a proper, open ticket.
What I expected to happen:
As described by Dinnerbone here, the "replace" property in a sounds.json event should cause it to completely replace the event of the same name, if set to true. Otherwise, it should merge together with the existing event.
What actually happened:
The "replace" property has no effect whatsoever. The game deserializes it, and the code seems like it should work, but it does absolutely nothing. Regardless of its value, events of the same name will always be merged with vanilla and other lower-precedence resource packs, making it impossible to remove sounds from an event.
Among the consequences of this, it is impossible to have background music in music.game (survival overworld background music) without it also being transcluded to music.game.creative (creative background music).
Steps to Reproduce:
I've attached a simple resource pack exhibiting this bug. Its sounds.json (which is in the correct directory) contains the following:
- Enter the game, and select the "Sounds Replace Test.zip" resource pack.
- Make sure all of your volume sliders are on.
- Type the following command:
- Observe that it plays either a random cave sound, or a crunching sound. The cave sounds are far more common than the crunching sound.
- Repeat until you have heard it enough times.
- Acknowledge that cave sounds should not be playing at all (and only the crunching should be playing), because the resource pack is meant to remove them.
This issue applies whether or not the resource pack is zipped. The fact that a crunching sound sometimes plays indicates that the sounds.json is indeed read and the event is modified. The fact that the cave sounds still play indicate that despite the "replace" property, the event has been merged onto the underlying default event instead of replacing it.