5

Custom Music Disc Add-on?

Garfieldwxg55's Avatar Garfieldwxg558/7/20 10:13 pm
5 emeralds 5.3k 15
2/2/2023 4:23 pm
Clothier's Avatar Clothier
Hello there, for some reason, I've always wanted custom music discs which add extra music discs to the game without replacing the original discs. Thankfully, data packs and plugins for Java edition have filled this desire for me. But this is only Java edition, and although I am primarily a Java user, I have a friend who uses Bedrock edition, not to mention that I do use Bedrock edition, especially on my phone while I'm out. I have done research, and I can't find anything similar for Bedrock. Does anyone know whether this would be possible to achieve? And if so, where would I start?
Any feedback is appreciated!
Posted by Garfieldwxg55's Avatar
Garfieldwxg55
Level 2 : Apprentice Miner
1

Create an account or sign in to comment.

15

WillyW0nka
06/28/2021 2:20 pm
Level 1 : New Miner
WillyW0nka's Avatar
Sorry. Its been a year since you have posted this thread lol, I can try to download the resource pack to see if it will work, did either of you find a solution?
3
Garfieldwxg55
07/05/2021 12:16 am
Level 2 : Apprentice Miner
Garfieldwxg55's Avatar
Sadly not yet, do you know how it might work?
1
BlazeDrake
08/08/2020 9:44 am
Level 12 : Journeyman Button Pusher
history
BlazeDrake's Avatar
I don't think you can do custom music discs, but you could make an item that plays a sound whenever you use it. You'd do this by adding a custom item with a use time set at an arbitrarily large number in a behavior pack. You'd also add an animation controller in the behavior pack, which goes into a state if you're using an item & holding the custom item. In the on_entry section, you'd need to use a playsound command, playing a custom sound(I'll get into on how to add that later). Here's an example of what it would look like with multiple custom sound items:
"controller.animation.player.music_disk":{
"initial_state":"none",
"states":{
"none":{
"transitions":[
{ "use":"query.is_using_item==1.0"}
]
},
"use":{
"transitions":[
{
"none":"query.is_using_item==0.0"
},
{
"disk_1":"query.get_equipped_item_name=='new_song_1'"
},
{
disk_2":"query.get_equipped_item_name=='new_song_2'"
}
]
},
"disk_1":{
"on_entry":[
"/playsound custom.sound1 @a ~~~ 1 1 1"
],
"transitions":[
{
"none":"query.get_equipped_item_name!='new_song_1'"
}
]
},
"disk_2":{
"on_entry":[
"/playsound custom.sound2 @a ~~~ 1 1 1"
],
"transitions":[
{
"none":"query.get_equipped_item_name!='new_song_2'"
}
]
}
}
},
You'd have to define it in the player.json file in the description, and put it under animate."description": {
"identifier": "minecraft:player",
"is_spawnable": false,
"is_summonable": false,
"is_experimental": false,
"animations": {
"music": "controller.animation.player.music_disk"
},
"scripts": {
"initialize": [],
"pre_animation": [],
"animate": [ "music"]
}
},
That's all you need to do for the behavior pack. Now you'll need to make a resource pack for the rest of this.</p><p>The first thing to do would be to add a sound file. Then, you'd need to define it in sound_definitions.json. Here's an example for one sound, assuming the file is in the folder custom."custom.sound1" : {
"__use_legacy_max_distance" : "true",
"category" : "neutral",
"sounds" : [
            "sounds/custom/sound1"
            ]
      },
Next, you'd have to go into the .lang file for your language(in the texts folder, look at languages.json to see the file name). Assuming you made the item identifier custom:sound_item1, you'd put the following line into the language file to make it show up as Custom Disc 1 when held:item.custom:sound_item1.name=Custom Disc 1After this, create a folder in the root of the resource pack called items, and create a .json file(name should be similar to the items identifier). This is to make it so you can define a texture for it. Here's an example for custom:sound_item1:"format_version": "1.14.0",
"minecraft:item": {
"description": {
"identifier": "custom:sound_item1",
"category": "food"<
},
"components": {
"minecraft:icon": "sound_item1"
}
}</code>
The last thing to do would be to add a texture to the items folder inside of the textures folder, and add the following code to item_texture.json(assuming the file name is custom_disc1) "sound_item1": {
"textures": "textures/items/custom_disc1"
}
3
Clothier
02/02/2023 4:23 pm
Level 1 : New Miner
Clothier's Avatar
I think ther is a mod that has done the thing you are trying to do (I think IDK) mcpedl.com/mo-music-discs-addon/
1
Garfieldwxg55
08/08/2020 9:29 pm
Level 2 : Apprentice Miner
Garfieldwxg55's Avatar
Thank you! I'm very new to Add-Ons though, (I mostly mess around with Datapacks), and which files exactly do I put into each text documents? Many thanks!
1
BlazeDrake
08/10/2020 9:33 am
Level 12 : Journeyman Button Pusher
BlazeDrake's Avatar
The animation controller gets added into a file named player.animation_controllers.json in the animation_controllers folder. The description replaces the player description for player.json under entities(you'd have to copy it from the default behavior pack, which can be found at https://minecraft.gamepedia.com/addon). The custom sound definition goes into sound_definitions.json, and the sound file would go into a custom folder in sounds in the resource pack. The display name definition goes into the .lang file of your preference in the texts file(I'd suggest looking at langauges.json to see the file name). The sound_item1.json file(second to last one) goes into the items folder of the resource pack. The final block of code gets added to item_textures.json
2
Garfieldwxg55
08/11/2020 4:46 am
Level 2 : Apprentice Miner
Garfieldwxg55's Avatar
Well, I tried, still don't have much Bedrock experience though, will this work (assuming I add the .mcpack extension to both files)?
https://www.dropbox.com/s/817clh862nra5xv/Custom%20Music%20Disc%20Add-On.zip?dl=0
Many thanks!
1
BlazeDrake
08/11/2020 10:48 am
Level 12 : Journeyman Button Pusher
history
BlazeDrake's Avatar
Bedrock packs have a different file structure than the one you used, and the .dsstore files are unneeded. Other than that, it looks good, but it might not compile without a pack_icon, it might be fine and just give a default icon too though. Here's a version with the correct file structure:https://1drv.ms/u/s!AhXxC8XJb7k-isg-_vSLr3M300PTBQ?e=iJkjRd(onedrive link)
2
Garfieldwxg55
08/12/2020 3:51 am
Level 2 : Apprentice Miner
Garfieldwxg55's Avatar
I've installed the add-on and resource pack, but when I make a world it comes up with the following error:
"The world you are trying to enter requires your device to run scripts. Your device doesn't support scripting at this time, so you can't join from this device."
I am playing on a iPad, if I play on a different device, will that fix the problem, or do I need to fix something?
1
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome