Christmas Presents
execute @e[name=prsBr] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[c=1]
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
And finally, this command kills the entity that we used until now.
kill @e[tag=prsCr]
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
This command simply kills the item.
execute @e[tag=prsCr] ~ ~ ~ summon AreaEffectCloud ~ ~ ~ {Particle:take,Radius:0.2f,Duration:2147483647,CustomName:"prsBr"}
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
This command summons at every presents dropped an AreaEffectCloud entity which is invisible (you can't see the "take" particle) and it has an almost infinite duration, so it won't disappear. The final TAG sets a custom name to the entity, so we can track it later.
execute @e[tag=prsCr] ~ ~ ~ setblock ~ ~ ~ skull 1 replace {ExtraType:MHF_Present1,SkullType:3}
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
This command sets a skull block at every presents item on the ground.
You can replace the number "1" in the "ExtraType" tag with "2" to change the color of the present.
scoreboard players tag @e add prsCr {OnGround:1b,Item:{id:"minecraft:skull",Damage:3s,tag:{display:{Name:"Present"},SkullOwner:{Name:"MHF_Present1"}}}}
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
This is the first command that needs to be executed. It sets a tag named "prsCr" to every item on ground which is a present head named "Present".
A list of all particular heads can be found here:
execute @e[name=prsBr] ~ ~ ~ detect ~ ~ ~ air 0 kill @e[type=Item,r=0]
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
Every command on this chain first detects if the player breaks the present. (using the "execute detect" command which looks for air at the coordinates of the AreaEffectCloud entity that we summoned before)
This command kills any item in a radius of 0 blocks, so if the player is in survival, he won't get a head.
execute @e[name=prsBr] ~ ~ ~ detect ~ ~ ~ air 0 summon Item ~ ~ ~ {Item:{id:golden_apple,Count:3},Motion:[0.0,0.5,0.05],PickupDelay:40}
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
This command summons a golden apple item (you can replace the ID to whatever block you want) with a specific motion and a pickup delay of 2 seconds (aka 40 ticks. 1 sec = 20 ticks), so the player won't pick the item up immediately and will be able to see the item "popping out" (effect that is given by the motion tag)
execute @e[name=prsBr] ~ ~ ~ detect ~ ~ ~ air 0 summon Item ~ ~ ~ {Item:{id:diamond,Count:2},Motion:[0.05,0.6,0.0],PickupDelay:40}
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
execute @e[name=prsBr] ~ ~ ~ detect ~ ~ ~ air 0 kill @r[type=Item,r=0]
TIP: In order to copy the command selct it and than press Ctrl + C or CMD + C.
This is a very important step.
The two commands beneath summon 2 different items, right? Than this command block randomly chose one of the two different items and it kills it. And at the end, we'll have only an item. This is a way to randomize actions in minecraft.
© Cimap. All Rights Reserved
This website is not endorsed, associated or affiliated with Mojang AB.