#Is it possible to add a custom disc?
1 messages · Page 1 of 1 (latest)
Yes and no.
There is the record component but that only allows for vanilla sounds. You can use scriptapi to detect when you right click a jukebox to play your music
really? only vanilla?
I'm looking at bridge that allows me to put the name of any sound, and in case it doesn't work I could put the sound in sounds.json in the "individual_event_sounds" part
Correct, unfortunately
Likewise, that component in an item only works as a horn, it will not work as a music disc. XD
It must be assumed that the only option is to use script
It works as a music disc IDK what you mean
I thought it only served as a horn, I have to try it
👀
So it's just a matter of making a normal item and then writing a script so that when we put that item on the jukebox, music starts playing?
But how can we reference the music with the script? Or is it not necessary to do that?
You just define it in the proper json file then use playsound to play it. Check #1072983602821861426 for some examples
const svallMusicDisc = [
'legacies_and_legends:music_disc_svall'
];
world.beforeEvents.itemUseOn.subscribe(evd => {
const { source: player, itemStack, block } = evd;
// This returns if the interacted block is not a Jukebox
if (!block.permutation.matches('minecraft:jukebox')) return;
if (itemStack) {
if (svallMusicDisc.includes(itemStack.typeId)) {
system.run(function () {
world.playSound("record.svall", block.location)
})
return;
}
}
system.run(function () {
player.runCommand(`stopsound @a record.svall`);
})
})
world.afterEvents.playerBreakBlock.subscribe(evd => {
const { player, brokenBlockPermutation } = evd;
// This returns if the broken block is not a Jukebox
if (!brokenBlockPermutation.matches('minecraft:jukebox')) return;
player.runCommand(`stopsound @a record.svall`);
})```
Will this script still work?
.
as what other people said only vanilla sounds are valid, if you're planning to just use it on bedrock edition i guess you can probably use education edition sounds, it work for me but idk if it still does today :)
Is this resolved? Because i askee the same question in items category XD
According to I don't know
Why can't no one make custom discs 😭
I want it too but nobody knows 😭
Ill research a bit and if i find out ill get back to you
THANK YOU, that would be very helpful ^^
Whats still confusing?
.
Record in script?
So with that, all we have to do is add our disk with the music we want and that's it? Wow.
Smokey helpin
Bro is the god with helping in this stuff 🤣
Welp i got what i need
😁
Xd
hey did it work in the end for you?
I haven't tried it, I'm in exam week at university 😭
Oof
I've already checked the file and it turns out that it's outdated, so it doesn't work on the new versions
😦
Now it doesn't work
Dang ill find one myselt after collage
For that file to at least work you need scripts but I'm not an expert in that and I need someone urgent who knows about it (it's for my addon)
Give me time
ohhhh
Sorry i lost the post i found an addon that gives discs textures and interact with the block enter the block and there is music but it doesn't go off i think theres a fix but there also isn't any actionbar nor particles which could be fixed
Ima try fixing it rn and testing
Well the idea is to add custom music discs without modifying the existing ones.
Thats what it does its does yet idk if its replaced other sfx with the music
Every music disc is there including the custom ones yet idk if the custom playsounds replace regular sounds
What version is the addon for?
Its funky it says 1.2.2 yet it semi functions on most recent
I might be able to make it work but its unlikely as i don't do it 🤣
Pass addon to be able to see it
I'm going to see
Mk just note frn it doesn't play the music yet it shows up has a texture and it can enter the music block
If I noticed that
Well, since you can't enter custom music, maybe that's why it doesn't work
Where did you get the addon to see what it contains and also see what comment the creator left
No no the custom music works it just doesn't play on the music block
Couple commands and it ran the exact same
it would take alot to add your own music into the custom music but it should be possible
and i bet with some little tweaks you could make the addon work alone without commands
i wonder if its using education edition sfx
it is records.etc btw not something weird like step.etc
:0
Ohh
And you can't use functions?
The folder in which you can execute commands in the world
Maybe ¯_(ツ)_/¯ commands is my expertise not addon creation
as shown i can make it in commands 🤣
I heard you can get commands to work through the functions folder, but I don't know how that works.
the playsounds would have to be relative to the player or raycasted to go onto the jukebox which idk if you can do that with just commands
In the Microsoft documentation there is information about the functions and implementing a say command in each tick of the game
How many commands did you use to get it working?
4
One to particle effect one to playsound one to actionbar and one inverted one to stopsound all with comparitors
Oh
I don't know how to make the commands run at a defined time, does anyone in the commands section know how to implement or use the functions folder?
¯_(ツ)_/¯ probably
Could you pass all the commands you used to make the disk work? I'm going to try to make it work