• 1/10/14 2:39 am
- 19.1k views • 0 today
- 15
- 9
- 12
385
Minecraft Command Blog
by Pepijn96
Blockdata, CanDestroy and @e
Blockdata
In Minecraft 1.7 you had to destroy and replace the chest when you wanted to add items to it. But in 1.8 you can just adjust the blockdata of the block by using /blockdata. It works like this, if you have a chest with 1 grass block in the first slot, you can add other items by using /blockdata x y z {Items:[{id:,Slot:,Count:}]}. For example:
/blockdata ~ ~1 ~ {Items:[{id:stone,Slot:1,Count:2}]}
We also can use the tag "Lock" in 1.8. This allows you to lock the chest. For example:
/blockdata ~ ~1 ~ {Lock:Secret}
This will lock the chest which can only be opened when the player holds a item with the name "Secret"
/blockdata ~ ~1 ~ {Lock:}
This will unlock the chest
CanDestroy
Formerly you were able to destroy blocks in adventure mode when you were given the right tool for it, so a shovel for dirt and an axe for wood. This feature has been removed now. But we can now use the tag CanDestroy. When you add {CanDestroy:[""]} to a datatag string of a tool, you can set what blocks you can destroy using that tool in adventure mode (so this does not effect you in creative and survival mode)! For example:
/give @p diamond_shovel 1 0 {CanDestroy:["minecraft:grass","minecraft:glass"]}
@e
Besides @p,@a and @r, we now can use @e! This allows you to teleport specific mobs and even other entities like FireBalls. You can even use it in /kill now. Be aware that Players are also entities
Some examples:
/tp @e ~ ~10 ~
this teleports every entity 10 blocks above its former position.
/tp @e[type=Spider] @p
This teleports every Spider it can find to the nearest player to the block.
/tp @e[type=PrimedTnt,c=-1] @e[type=SnowBall,c=-1]
This teleports the nearest PrimedTnt it can find to the nearest Trown SnowBall it can find :P.
/kill @e[r=5,type=Creeper]
This kills every Creeper within a radius of 5 blocks.
/clear
Yes, it's finally here! You can now use Datatags and amounts with the /clear command! This allows for specific Item removal, and even allows to check for items in a players inventory, because you can just set the amount to 0. For Example:
/give @p lever 1 0 {display:{Name:"Key"}}
and
/clear @p lever 0 0 {display:{Name:"Key"}}
Want more?
Do you want me to do more of these sort of updates? Let me know by commenting. Be aware of the fact that these command are still in beta, not everything will work properly yet! Check out my other blog about 1.8: www.planetminecraft.com/blog/minecraft-command-blogs-clone-fill-and-tp/
Pepijn96
by Pepijn96
Blockdata, CanDestroy and @e
Blockdata
In Minecraft 1.7 you had to destroy and replace the chest when you wanted to add items to it. But in 1.8 you can just adjust the blockdata of the block by using /blockdata. It works like this, if you have a chest with 1 grass block in the first slot, you can add other items by using /blockdata x y z {Items:[{id:,Slot:,Count:}]}. For example:
/blockdata ~ ~1 ~ {Items:[{id:stone,Slot:1,Count:2}]}
We also can use the tag "Lock" in 1.8. This allows you to lock the chest. For example:
/blockdata ~ ~1 ~ {Lock:Secret}
This will lock the chest which can only be opened when the player holds a item with the name "Secret"
/blockdata ~ ~1 ~ {Lock:}
This will unlock the chest
CanDestroy
Formerly you were able to destroy blocks in adventure mode when you were given the right tool for it, so a shovel for dirt and an axe for wood. This feature has been removed now. But we can now use the tag CanDestroy. When you add {CanDestroy:[""]} to a datatag string of a tool, you can set what blocks you can destroy using that tool in adventure mode (so this does not effect you in creative and survival mode)! For example:
/give @p diamond_shovel 1 0 {CanDestroy:["minecraft:grass","minecraft:glass"]}
@e
Besides @p,@a and @r, we now can use @e! This allows you to teleport specific mobs and even other entities like FireBalls. You can even use it in /kill now. Be aware that Players are also entities
Some examples:
/tp @e ~ ~10 ~
this teleports every entity 10 blocks above its former position.
/tp @e[type=Spider] @p
This teleports every Spider it can find to the nearest player to the block.
/tp @e[type=PrimedTnt,c=-1] @e[type=SnowBall,c=-1]
This teleports the nearest PrimedTnt it can find to the nearest Trown SnowBall it can find :P.
/kill @e[r=5,type=Creeper]
This kills every Creeper within a radius of 5 blocks.
/clear
Yes, it's finally here! You can now use Datatags and amounts with the /clear command! This allows for specific Item removal, and even allows to check for items in a players inventory, because you can just set the amount to 0. For Example:
/give @p lever 1 0 {display:{Name:"Key"}}
and
/clear @p lever 0 0 {display:{Name:"Key"}}
Want more?
Do you want me to do more of these sort of updates? Let me know by commenting. Be aware of the fact that these command are still in beta, not everything will work properly yet! Check out my other blog about 1.8: www.planetminecraft.com/blog/minecraft-command-blogs-clone-fill-and-tp/
Pepijn96
More like this
2684005
6


Have something to say?
What exactly does the data tag "c" do? I've seen it used in a lot of different places, but have personally not yet found a use for it. (No, I'm not a noob. You'd know that if you were to take one glance at my tutorial blogs.)
Why use it? Because it allows you to target just ONE consistant entity what prevents a lot of systems from messing up.