Minecraft Blogs / Tutorial

Minecraft Command Blogs | Inventory, /execute, BlockEntityTag and a lot more!

  • 3,418 views, 2 today
  • 6
  • 1
Pepijn's Avatar Pepijn
Level 57 : Grandmaster Cyborg
382
Minecraft Command Blogs (snapshot 14w07a)
By Pepijn96
/execute, BlockEntityTag and a lot more!

/execute
/execute allows you to execute specified commands as they were being used by another entity. For example

/execute @p[name=Friend] ~ ~ ~ /say Hello

This will result into a chat message from your online friend named "Friend" saying Hello. You can also use this to summon specified things to entities like mobs and Snowballs. The format looks like this:

/execute [playerselector] x y z [command]

BlockEntityTag
adding this Tag to your old /give commands lets you give players items that already have datavalues, besides names and lores as that was already possible. For example:

/give @p minecraft:command_block {BlockEntityTag:{command:"/say hello"}}

This will give the nearest player a command block that looks just normal, but when you place it down it already has the command /say hello in it. This also works for chests, furnaces, hoppers, etc. The format is this:

/give [playerselector] [minecraft:] {BlockEntityTag:{ }}

Note that when you use the pickblockkey and ctrl on blocks like chests and commandblocks, it will also store their entity data now. So if you use the pickblockkey+ctrl on a chest with a diamondblock, the chest you will get in your inventory will also have a diamond block in it when you place it down.

/scoreboard stuff

Multiple things have been added to this command. "The command /scoreboard operation can apply arithmetic operation to scores (+ – * / %) and accumulate player scores" (Mojang.com). It looks like this:

/scoreboard players operation #teamscores redScore += @a[team=red] blueKills

It is pretty complicated, but you should try some things out on your own or watch a video to really begin understanding this, it's impossible to explain this with text.

"The command /scoreboard test can be used to test if a scoreboard value is between a min and a max value" (Mojang.com). Format is:

/scoreboard players test #global [Objectivename] [Min. Score] [Max. Score]

"Players in teams can now have a team based objective shown on the sidebar, depending on the team color" (Mojan.com). Format is:

[size=medium][color=rgb(153,0,0)]/scoreboard objectives setdisplay team.[color] [Objectivename][/color][/size]

[size=medium]Nametags for players in other teams can now be hidden with a team option:[/size]

[size=medium][color=rgb(153,0,0)]/scoreboard teams options teamcolor nametagVisibility hideForOtherTeam[/color][/size]

[b][size=large][color=rgb(102,102,102)]/tellraw[/color][/size][/b]
[size=medium]With /tellraw you can now insert scoreboard values into messages. It goes like this:[/size]

[size=medium][color=rgb(153,0,0)]/tellraw [playerselector] {text:"",extra[{score:{name:"",objective:""}}]}[/color][/size]

[b][size=large][color=rgb(102,102,102)]/testforblock[/color][/size][/b]
[size=medium]This can now be used to compare two areas of a map:[/size]

[size=medium][color=rgb(153,0,0)]/testforblocks [x1] [y1] [z1] [x2] [y2] [z2] [x3] [y3] [z3] masked[/color][/size]

[b][size=large][color=rgb(102,102,102)]/testfor[/color][/size][/b]
[size=medium]You can use this now to check for specified items in specified slots of players:[/size]

[size=medium][color=rgb(153,0,0)]/testfor @p {Inventory:[{Slot:,id:"minecraft:"}],SelectedItemSlot:}[/color][/size]

[b][size=large][color=rgb(102,102,102)]Want more?[/color][/size][/b]
[size=medium]Leave a diamond and favorite if this helped you. If you would want more leave a comment![/size]

[i][size=medium][color=rgb(102,102,102)]Pepijn96[/color][/size][/i]
Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome