October 2014
Beginner to intermediate
285 pages
6h 24m
English
A Location stores three coordinates: x, y, and z, as the following figure shows.

The x value goes west (negative) to east (positive), the z-coordinate goes north (negative) to south (positive), and y goes down (negative) to up (positive), with a y value of 0 being the bottom layer of bedrock and 64 being sea level. That means that to make a player or other entity fly up in the air, you need to add some to the y value.
We’ll get each target’s current y value from loc and save it as y. Next we’ll change the value in loc by adding 50. Here’s the fun part: by calling target.teleportTo(loc) we tell the target to teleport ...
Read now
Unlock full access