1

Command block summonings

GamerKid_Weekly •6/1/16 4:12 am
•
257
•
6/1/2016 10:21 am
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
Posted by
GamerKid_Weekly
Level 1 : New Miner
0

  Have something to say?

Join • Sign in

6

GamerKid_Weekly
• 06/01/2016 10:21 am
• Level 1 : New Miner
ok thx
1
Lexxer
• 06/01/2016 10:02 am
• Level 29 : Expert Caveman
So the player has to mine the block?

Create a scoreboard objective with the block, the player has to mine
/scoreboard objectives add mine stat.mineBlock.minecraft.id

Test, 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 0
1
GamerKid_Weekly
• 06/01/2016 9:41 am
• Level 1 : New Miner
lol 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
1
Lexxer
• 06/01/2016 9:13 am
• Level 29 : Expert Caveman
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
scoreboard objectives add drop stat.drop.minecraft.glass_bottle

Execute 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 0
1
GamerKid_Weekly
• 06/01/2016 8:22 am
• Level 1 : New Miner
i 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 ==========
1
Lexxer
• 06/01/2016 7:35 am
• Level 29 : Expert Caveman
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:
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.


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.


Now the part to play your sound in Minecraft:

/playsound custom.soundName block @a

You can further customise the play sound command now like you wish.
1

Welcome