#Is it possible to add a custom disc?

1 messages · Page 1 of 1 (latest)

cold shale
#

chat, is this possible?

young sail
# cold shale chat, is this possible?

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

tropic pivot
#

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

young sail
tropic pivot
#

It must be assumed that the only option is to use script

young sail
tropic pivot
cold shale
#

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?

young sail
cold shale
#

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`);
})```
cold shale
nimble birch
# cold shale chat, is this possible?

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 :)

exotic snow
#

Is this resolved? Because i askee the same question in items category XD

cold shale
exotic snow
#

Why can't no one make custom discs 😭

cold shale
exotic snow
#

Ill research a bit and if i find out ill get back to you

cold shale
young sail
#

Whats still confusing?

cold shale
exotic snow
#

I found something

#

Oh nvm lol

cold shale
#

So with that, all we have to do is add our disk with the music we want and that's it? Wow.

exotic snow
#

Smokey helpin

#

Bro is the god with helping in this stuff 🤣

#

Welp i got what i need

#

😁

cold shale
exotic snow
#

hey did it work in the end for you?

cold shale
exotic snow
#

Oof

cold shale
# exotic snow 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

exotic snow
#

Dang ill find one myselt after collage

cold shale
exotic snow
#

Give me time

cold shale
exotic snow
#

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

cold shale
exotic snow
#

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

exotic snow
#

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 🤣

cold shale
exotic snow
#

That should be it

cold shale
exotic snow
#

Mk just note frn it doesn't play the music yet it shows up has a texture and it can enter the music block

cold shale
#

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

exotic snow
#

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

cold shale
cold shale
#

And you can't use functions?

#

The folder in which you can execute commands in the world

exotic snow
#

Maybe ¯_(ツ)_/¯ commands is my expertise not addon creation

#

as shown i can make it in commands 🤣

cold shale
exotic snow
#

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

cold shale
#

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?

exotic snow
#

4

#

One to particle effect one to playsound one to actionbar and one inverted one to stopsound all with comparitors

cold shale
#

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?

exotic snow
#

¯_(ツ)_/¯ probably

cold shale