Minecraft Blogs / Tutorial

How to use commands; Block Effects

  • 538 views, 3 today
  • 2
  • 0
Brodie The Nerd's Avatar Brodie The Nerd
Level 44 : Master Nerd
17
In a lot of maps created, including my own (download it here: http://www.minecraftworldmap.com/users/DaNerdyDude12#/-1351/64/-94/-1/0/1), there has been a function where standing on blocks give you a potion effect, or kill you, or set spawnpoint, or... I think you get the idea. There is a simple way to do this.

First, you need to create a command block clock, whoch all you have to do is place to command blocks, one above the other with a block space in between. In the top command block, type:
/setblock ~ ~-1 ~ redstone_block 0 destroy
...and in the bottom command block type:
/setblock ~ ~1 ~ air 0 replace
...and your command block clock is complete!

Next, you link redstone, which may appear off but if you put a redstone repeater in front of it you will see it is a repeated signal, to a command block with the following command (make sure you adjust the command to suit you!):
/execute @a ~ ~ ~ detect ~ ~-1 ~ [block id] /[output command type] @p[c=1] [command details (if necessary)]
...so, if you want to make a block of grass give you jump-boost level 100, do:
/execute @a ~ ~ ~ detect ~ ~-1 ~ grass /effect @p[c=1] jump_boost 0.1 100

And there you go. If you want block id's check out the website I use here: https://www.digminecraft.com/lists/item_id_list_pc.php
.
..or, if you want potion effect ids, check out this website:http://minecraft-helpandinfo.weebly.com/potion-effects-ids.html

Tags

Create an account or sign in to comment.

Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome