Minecraft Blogs / Article

/testfor command- explained + Mashal making [difficulty:easy]

  • 746 views, 1 today
  • 3
  • 0
  • 2
PyroCreative's Avatar PyroCreative
Level 34 : Artisan Nerd
9
Wonder what happened to the /testfor command in 1.11 ?
Just a slight change, x= , y= , z= ,etc.
This project, is a very short one I discovered today, while making a upcoming, huge map !
In this piece of text, you will be learning the mystery behind this change: PLUS KNOW HOW TO MAKE A
WORKING MASHAAL!
using commands, obviously!

First, take a repeating command block facing towards the whole contraption, [you will be about to be making].
Then place a comparator facing in the same direction, [understood?]
Then in the repeating command block, type.....................

WAIT ! , STOP!!!!!!!! [do not type this]
This solution is divided into :
RADIUS
X,Y,Z,R format
SelectedItem
So then, type=
/testfor @p[x=4,y=2,z=6,r=2]
I have just given random coordinates. While typing , give your real coordinates with the radius.
Typing r=1 will force the player to stay on the coordinates.
r=2 will take the radius of two from the x coordinate.
The x,y,z,r format is just the same command given above!

HOW TO MAKE A MASHAAL:
So first get yourself a torch/light emitting source, etc.
Then place a repeating command and type: {NOTE:If you are not aware about the depth in command blocks, please leave or learn.}

type:
/testfor @p [ r=80000] {SelectedItem:{id:"minecraft:torch"}}
NOW HERE:
r=80000 means the radius the player will be holding the torch in.
selecteditem will test for the player with the selected Item.

Now run a comparator and type this in:
/effect @p minecraft:night_vision 15 100
THATS IT!







Tags

Create an account or sign in to comment.

1
12/01/2016 12:01 pm
Level 57 : Grandmaster Hero
PxlHero
PxlHero's Avatar
I guess this should be a blog post and not a project.
1
12/01/2016 6:42 am
Level 34 : Artisan Nerd
PyroCreative
PyroCreative's Avatar
hee... I hope it helped, dont forget to diamond if it helped!
Planet Minecraft

Website

© 2010 - 2024
www.planetminecraft.com

Welcome