1
Command block summonings
so im trying to do a custome lucky block and im trying to get it so that when it gives you something it also plays an .ogg file...well i decided to give up on it somehow playing in the background and want to have it summon a command block as well, with the command in it to play the audio...i have everything set up but the command, so when you play normal minecraft what command do you enter to summon a command block with a command block active to play audio? if you know the command or link to a vid to just play the audio with the object being given plz tell me
6
ok thx
So the player has to mine the block?
Create a scoreboard objective with the block, the player has to mine
Test, if the block is destroyed and dropped the item and if, then play the sound
And the again, set the score to 0
Create a scoreboard objective with the block, the player has to mine
/scoreboard objectives add mine stat.mineBlock.minecraft.idTest, if the block is destroyed and dropped the item and if, then play the sound
/execute @a[score_mine_min=1] ~ ~ ~ execute @e[type=Item,r=2] ~ ~ ~ playsound custom.soundName block @a[score_mine_min=1]And the again, set the score to 0
/scoreboard player set @a[score_mine_min=1] mine 0lol no its for lucky blocks...i want the sound to play after the block is broken when a certain item is dropped from the block
So you want to play the sound when the player drops a specific item?
Create a scoreboard with the item, the player drops to play the sound
Execute the playsound command, when the ülayer drops the item:
And then reset the drop score
Create a scoreboard with the item, the player drops to play the sound
scoreboard objectives add drop stat.drop.minecraft.glass_bottleExecute the playsound command, when the ülayer drops the item:
/playsound custom.soundName block @a[score_drop_min=1]And then reset the drop score
/scoreboard players set @a[score_drop_min=1] drop 0i got all of that but what i need is how am i to put it in this...so that it will drop the glass bottle and also play the audio file...i already have my audio files i just need to know how to put it in so it all goes together this is what i have in the texts
>drops
/========== TOOLS & ARMOR ==========
/========== BLOCKS ==========
/========= ITEMS ==========
/========== GROUPS ==========
/rum and sound
group(ID=glass_bottle,NBTTag=(display=(Name="#4Rum"));playsound custome.whystherumgone (ID=sponge) @a)@luck=1
/========== ENTITIES ==========
/========== STRUCTURES ==========
/========== MONSTER APOCALYPSE ==========
/========== ENCHANTED ITEMS ==========
>drops
/========== TOOLS & ARMOR ==========
/========== BLOCKS ==========
/========= ITEMS ==========
/========== GROUPS ==========
/rum and sound
group(ID=glass_bottle,NBTTag=(display=(Name="#4Rum"));playsound custome.whystherumgone (ID=sponge) @a)@luck=1
/========== ENTITIES ==========
/========== STRUCTURES ==========
/========== MONSTER APOCALYPSE ==========
/========== ENCHANTED ITEMS ==========
I guess you want to play a custom sound?
In that case, you need to create a new resource pack.
Since I don't know, if you already have, I just assume you haven't.
If you already created one, just skip this part:
For your .ogg file:
Now the part to play your sound in Minecraft:
You can further customise the play sound command now like you wish.
In that case, you need to create a new resource pack.
Since I don't know, if you already have, I just assume you haven't.
If you already created one, just skip this part:
Click to reveal
First, create a new folder and call it whatever you want.
Create a new folder in it and call it 'assets', create a new folder in 'assets' and call it
'minecraft'.
Now create a folder sounds in your folder 'minecraft'
Finally, where your assets folder is, create a new pack.mcmeta file.
Create a new txt file and put in:
"{
"pack": {
"pack_format": 2,
"description": "Description"
},
"language": {}
}"
save the file as pack.mcmeta.
Create a new folder in it and call it 'assets', create a new folder in 'assets' and call it
'minecraft'.
Now create a folder sounds in your folder 'minecraft'
Finally, where your assets folder is, create a new pack.mcmeta file.
Create a new txt file and put in:
"{
"pack": {
"pack_format": 2,
"description": "Description"
},
"language": {}
}"
save the file as pack.mcmeta.
For your .ogg file:
Click to reveal
Put your .ogg file in your 'sounds/custom' folder, alternative you can put it in
any folder inside the 'sounds' folder.
Now you still need a .json file for your sound file.
Where your 'sounds' folder is located, create a new .txt file and name it 'sounds'
In your 'sounds.txt' file:
"{
"custom.soundName":{
"category": "block",
"sounds":[{
"name":"custom/soundName",
"stream":false
}]
}
}"
soundName is the name of your .ogg file, the category is, the category which Minecraft uses to play your sound.
If you have a long sound, background music for example, 'stream' should be true
otherwise, it can be false.
any folder inside the 'sounds' folder.
Now you still need a .json file for your sound file.
Where your 'sounds' folder is located, create a new .txt file and name it 'sounds'
In your 'sounds.txt' file:
"{
"custom.soundName":{
"category": "block",
"sounds":[{
"name":"custom/soundName",
"stream":false
}]
}
}"
soundName is the name of your .ogg file, the category is, the category which Minecraft uses to play your sound.
If you have a long sound, background music for example, 'stream' should be true
otherwise, it can be false.
Now the part to play your sound in Minecraft:
/playsound custom.soundName block @aYou can further customise the play sound command now like you wish.
