Minecraft is a game filled with dozens of entities and features that make it exciting and immersive. One such mechanic is the command block, a special utility tool designed to execute otherwise complex actions in the game with relative ease. These blocks can be operated using certain prompts and can be used for purposes ranging from summoning mobs to granting XP and much more.
With that in mind, here are the seven best ways to use command blocks in Minecraft.
7 cool commands for Minecraft's command blocks
1) Kill command
Chart New Territories with the ultimate Minecraft Seed Generator!
The Kill command, as the name suggests, kills anyone instantly. One must approach the command block and enter the username of the target. Players can also use special arguments, which include the following:
- kill @a kills everyone
- kill @r kills a random individual
- kill @p kills the closest individual
- kill @e eliminates all entities
2) Summon command
The summon command can be used to call entities and objects. These can range from hostile mobs like zombies and skeletons to other friendly creatures like villagers, allays, and even special bosses like the Ender Dragon.
One can also summon mobs with specific gear and weapons. For example, players can spawn a zombie with diamond armor and a netherite sword. The command requires entering “summon” followed by the name of the entity.
3) Clear command
One can use the clear command on the command block to quickly empty their inventory as well as that of other players. This is especially helpful when players have been loading their inventory with unwanted items and must quickly toss a bunch of stuff before setting out for an adventure. The commands for the same include the following:
- clear @p clears the inventory of the players closest in proximity
- clear @a clears everyone’s inventory
- clear @r clears the inventory of a random player
4) Grant XP
The command block can grant XP points to targeted players in the game by entering a specific prompt, which goes: “xp <amount> <player>. Entering this command adds a specified amount of XP to the mentioned player.
If capital L is added to the end of the <amount>, it grants levels instead of XP points.
5) Grappling hook
This command enables players to use the fishing rod in the game as a grappling hook to cover distances. It allows players to quickly get out of difficult situations and makes traveling in the vast world of the game easier. Add the following command lines in the order mentioned below:
- execute at @p[nbt={SelectedItem:{id:"minecraft:fishing_rod",Count:1b,tag:{display:{Name:'{"text":"Grappling Hook"}'}}}}] anchored feet unless block ^ ^1 ^1 air run kill @e[type=fishing_bobber,distance=..40,sort=nearest,limit=1]
- execute at @p[nbt={SelectedItem:{id:"minecraft:fishing_rod",Count:1b,tag:{display:{Name:'{"text":"Grappling Hook"}'}}}}] run kill @e[type=fishing_bobber,distance=..1.1,sort=nearest,limit=1]
- execute at @a[nbt={SelectedItem:{id:"minecraft:fishing_rod",Count:1b,tag:{display:{Name:'{"text":"Grappling Hook"}'}}}}] if entity @e[type=minecraft:fishing_bobber,distance=..1.1] run tp @p ~ ~1 ~ facing ^ ^-1 ^1
- execute at @e[type=minecraft:fishing_bobber] unless block ~ ~-.5 ~ air at @p anchored feet if block ^ ^1 ^1 air run tp @p[nbt={SelectedItem:{id:"minecraft:fishing_rod",Count:1b,tag:{display:{Name:'{"text":"Grappling Hook"}'}}}}] ^ ^ ^1 facing entity @e[type=fishing_bobber,limit=1,sort=nearest]
Adding all these commands in order will assign all the presets necessary to convert the fishing rod into a well-functioning grappling hook.
6) Snowball overpowered
While the command block offers tons of flexibility to explore in the game, one of its most unique attributes is the ability to change the physics and behavior of items.
Using this feature, one can convert a harmless snowball into an explosive. Alternatively, players can also convert snowballs into a summoning item. The commands are as follows:
- “execute at @e[type=snowball] unless block ~ ~-1 ~ air run summon tnt” – Grants the snowball an explosive effect.
- “execute at @e[type=snowball] unless block ~ ~-1 ~ air run summon <entity>” – Grants the ability to summon the specified entity.
7) Realistic tree farming
Breaking trees in the game has always been a hassle. This is because, after you break a few blocks, the remaining blocks begin to float in the air. Using this command, players can now break one log and obtain the remaining ones from that particular tree. The command is as follows:
- execute at @e[type=item,nbt={Item:{id:"minecraft:oak_log"}}] if block ~ ~1 ~ oak_log run setblock ~ ~1 ~ air destroy execute at @e[type=item,nbt={Item:{id:"minecraft:tnt"},PickupDelay:0s}] run summon tnt
This command adds a realistic touch to tree farming without the addition of any mods.
Uncover new worlds with our Minecraft Seed Generator!