Posted April 7, 201411 yr I don't know what went wrong, but a couple of versions back (1024), the sounds were working perfectly. Now, they don't. I call the sounds like this: worldObj.playSoundAtEntity(player, "realmoffera:coinBag.pickUp", 0.1F, 0.5F * ((UtilRF.RANDOM.nextFloat() - UtilRF.RANDOM.nextFloat()) * 0.7F + 1.8F)); I get this in the console: [10:58:31] [Client thread/WARN]: Unable to play unknown soundEvent: realmoffera:coinBag.pickUp Here are my folders: Finally, here's my sounds.json file: { "mob.mummy.say": { "category": "hostile", "sounds": [ "name": "mob/mummy/say" ] }, "mob.mummy.death": { "category": "hostile", "sounds": [ "name": "mob/mummy/death" ] }, "mob.mummy.hurt": { "category": "hostile", "sounds": [ "name": "mob/mummy/hurt" ] }, "mob.paladin.death": { "category": "hostile", "sounds": [ "name": "mob/paladin/death" ] }, "mob.paladin.hurt": { "category": "hostile", "sounds": [ "name": "mob/paladin/hurt" ] }, "coinBag.pickUp": { "category": "player", "sounds": [ "name": "coinBag/pickUp1", "coinBag/pickUp2", "coinBag/pickUp3" ] } } Kain
April 7, 201411 yr Author I was just scrolling through my console, and I found this: [11:16:42] [Client thread/WARN]: Invalid sounds.json com.google.gson.JsonSyntaxException: com.google.gson.stream.MalformedJsonException: Unterminated array at line 5 column 11 at com.google.gson.internal.Streams.parse(Streams.java:56) ~[streams.class:?] at com.google.gson.TreeTypeAdapter.read(TreeTypeAdapter.java:54) ~[TreeTypeAdapter.class:?] at com.google.gson.internal.bind.TypeAdapterRuntimeTypeWrapper.read(TypeAdapterRuntimeTypeWrapper.java:40) ~[TypeAdapterRuntimeTypeWrapper.class:?] at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:187) ~[MapTypeAdapterFactory$Adapter.class:?] at com.google.gson.internal.bind.MapTypeAdapterFactory$Adapter.read(MapTypeAdapterFactory.java:145) ~[MapTypeAdapterFactory$Adapter.class:?] at com.google.gson.Gson.fromJson(Gson.java:803) ~[Gson.class:?] at com.google.gson.Gson.fromJson(Gson.java:768) ~[Gson.class:?] at net.minecraft.client.audio.SoundHandler.onResourceManagerReload(SoundHandler.java:83) [soundHandler.class:?] at net.minecraft.client.resources.SimpleReloadableResourceManager.registerReloadListener(SimpleReloadableResourceManager.java:124) [simpleReloadableResourceManager.class:?] at net.minecraft.client.Minecraft.startGame(Minecraft.java:527) [Minecraft.class:?] at net.minecraft.client.Minecraft.run(Minecraft.java:892) [Minecraft.class:?] at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_51] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[?:1.7.0_51] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.7.0_51] at java.lang.reflect.Method.invoke(Method.java:606) ~[?:1.7.0_51] at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?] at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?] Caused by: com.google.gson.stream.MalformedJsonException: Unterminated array at line 5 column 11 at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1505) ~[JsonReader.class:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:465) ~[JsonReader.class:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:403) ~[JsonReader.class:?] at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:658) ~[TypeAdapters$25.class:?] at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:667) ~[TypeAdapters$25.class:?] at com.google.gson.internal.bind.TypeAdapters$25.read(TypeAdapters.java:642) ~[TypeAdapters$25.class:?] at com.google.gson.internal.Streams.parse(Streams.java:44) ~[streams.class:?] ... 17 more I know something is wrong with line 5 at column 11 (I don't know how to count columns?), but it doesn't seem like anything is wrong. Kain
April 7, 201411 yr Rows and column : http://www.gitta.info/DataCompress/en/image/column_row.jpg So that would be the 11th symbol/character on that line Aka. re-check the file, try a different file/simpler one to check that it's the file and not something else If you guys dont get it.. then well ya.. try harder...
April 7, 201411 yr I don't think a name : value is allowed inside an array. {"name1": "value", "name2": 3} <- is object form ["value1", "value2", "value3"] <- is array form [{"name": "value here"}, {"name": "another value"}] <- objects inside array are allowed -S- (if I helped, please click Thank and applaud) http://6upnqa.dm2301.livefilestore.com/y2mtf-vG7Tqq1TiiVpIm53KWj7294NDPoHfSHHb4PzZiMAUfRCfK0UY0MwOu7Q3zTBNVTKqWjr2-xgBfFRpQT5p-QivtvknPpoABMNUw9br9WuZcBFkjePhnAbW500gVm-P/sequiturian.png[/img]
April 7, 201411 yr Author Mazetar: Does a tab count as a character? sequituri: Nope, { "mob.mummy.say": { "category": "hostile", "sounds": [{ "mob/mummy/say" }] }, "mob.mummy.death": { "category": "hostile", "sounds": [{ "name": "mob/mummy/death" }] }, "mob.mummy.hurt": { "category": "hostile", "sounds": [{ "name": "mob/mummy/hurt" }] }, "mob.paladin.death": { "category": "hostile", "sounds": [{ "name": "mob/paladin/death" }] }, "mob.paladin.hurt": { "category": "hostile", "sounds": [{ "name": "mob/paladin/hurt" }] }, "coinBag.pickUp": { "category": "player", "sounds": [{ "name": "coinBag/pickUp1", "coinBag/pickUp2", "coinBag/pickUp3" }] } } Edit: I got it to work, but I had to cut the amout of sounds in 1 name to 1. { "mob.mummy.say": { "category": "hostile", "sounds": [{ "name": "mob/mummy/say" }] }, "mob.mummy.death": { "category": "hostile", "sounds": [{ "name": "mob/mummy/death" }] }, "mob.mummy.hurt": { "category": "hostile", "sounds": [{ "name": "mob/mummy/hurt" }] }, "mob.paladin.death": { "category": "hostile", "sounds": [{ "name": "mob/paladin/death" }] }, "mob.paladin.hurt": { "category": "hostile", "sounds": [{ "name": "mob/paladin/hurt" }] }, "coinBag.pickUp": { "category": "player", "sounds": [{ "name": "coinBag/pickUp1" }] } } Kain
April 8, 201411 yr You shouldn't need to cut the number of sounds down to one; try removing "name", as that may be setting some flag that indicates there is only one sound. EDIT: Curly brackets within the array brackets is neither required nor correct: [ -sounds- ] is just fine, [{ -sounds- }] breaks the json file format for multiple sound names, though it seemingly works for single sounds. Here is what part of my sounds.json file looks like: "break_jar": {"category": "block","sounds":["block/ceramic1","block/ceramic2","block/ceramic3","block/ceramic4"]}, "hit_peg": {"category": "block","sounds":["block/hit_peg1","block/hit_peg2","block/hit_peg3","block/hit_peg4"]}, "hit_rusty": {"category": "block","sounds":["block/hit_rusty1","block/hit_rusty2","block/hit_rusty3"]}, "lock_chest": {"category": "block","sounds":["block/lock_chest"]}, "lock_door": {"category": "block","sounds":["block/lock_door"]}, etc. http://i.imgur.com/NdrFdld.png[/img]
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.