You need to create your own class that extends ItemRecord and overrides getRecordResource to return a ResourceLocation with your mod ID as the domain (the first argument of the ResourceLocation(String,String) constructor).
You'll also need to put the sound in assets//sounds/records and add it to your sounds.json file.
The example is for 1.7.10, but it should be the same for 1.8 apart from the setTextureName call in the ItemSolarisRecord constructor (which has been replaced by the JSON model system).
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
You need to create your own class that extends ",courier">ItemRecord and overrides ",courier">getRecordResource to return a ",courier">ResourceLocation with your mod ID as the domain (the first argument of the ",courier">ResourceLocation(String,String) constructor).
You'll also need to put the sound in assets//sounds/records and add it to your sounds.json file.
The example is for 1.7.10, but it should be the same for 1.8 apart from the ",courier">setTextureName call in the ",courier">ItemSolarisRecord constructor (which has been replaced by the JSON model system).
Thanks that Helped a lot!
now its giving me that little bit of colorful text when i play my record
but in the console its giving me an error:
[12:27:23] [Client thread/WARN]: Unable to play unknown soundEvent: potatopower:records.potato
this is my path for the sounds.json file src/main/resources/assets/potatopower/sounds/sounds.json
this is the path for my potato.ogg file (the sound file) src/main/resources/assets/potatopower/sounds/records/potato.ogg
sounds.json should be in assets/potatopower, not assets/potatopower/sounds.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
I did have some issues with Minecraft not loading any assets (including sounds.json) when run from IDEA, but this StackOverflow answer solved that.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
would you like me to credit you in my mod for your help?
I don't really mind.
Rollback Post to RevisionRollBack
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Hello this is superdextor aka President Potato
Im having a little problem trying to figure out how to create a music disc record in my minecraft 1.8 mod Potato Power Craft
fourm: http://www.minecraftforum.net/forums/mapping-and-modding/minecraft-mods/2395240-potato-power-craft
if any one knows any good place to get this kinda information or know how to make one your self please drop a comment below.
thanks for your help!
my try at creating a music disc
You need to create your own class that extends ItemRecord and overrides getRecordResource to return a ResourceLocation with your mod ID as the domain (the first argument of the ResourceLocation(String,String) constructor).
You'll also need to put the sound in assets//sounds/records and add it to your sounds.json file.
I wrote an example here: ItemRecord class, sounds.json
The example is for 1.7.10, but it should be the same for 1.8 apart from the setTextureName call in the ItemSolarisRecord constructor (which has been replaced by the JSON model system).
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thanks that Helped a lot!
now its giving me that little bit of colorful text when i play my record
but in the console its giving me an error:
[12:27:23] [Client thread/WARN]: Unable to play unknown soundEvent: potatopower:records.potato
this is my path for the sounds.json file
src/main/resources/assets/potatopower/sounds/sounds.json
this is the path for my potato.ogg file (the sound file)
src/main/resources/assets/potatopower/sounds/records/potato.ogg
and this is my sounds.json file
{
"records.potato": {
"category": "record",
"sounds": [
{
"name": "records/potato",
"stream": true
}
]
}
sounds.json should be in assets/potatopower, not assets/potatopower/sounds.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
strange im still geting that error
this is my ItemPotatoRecord.class file
I just copied the code into my 1.8 mod (item class, sounds.json) and it worked.
I did have some issues with Minecraft not loading any assets (including sounds.json) when run from IDEA, but this StackOverflow answer solved that.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.
Thank you
Its working now!
would you like me to credit you in my mod for your help?
I don't really mind.
Chisel Facades: For all your decorative pipe-hiding needs.
Please don't PM me to ask for help or to join your mod development team. Asking your question in a public thread preserves it for people who are having the same problem in the future. I'm not interested in developing mods with people.