Hardware Reference
In-Depth Information
FIGURE.2-9 Now that you have the coordinates of the corners of the field, it is
ready for geo-fencing.
Depending on where your player is standing in the Minecraft world, some of
the coordinates might be negative (e.g. x=-5 , y=0 , z=-2 ), which can make
these calculations a little tricky. You might find it easier to move to a place in the
Minecraft world where all three parts of the coordinate are positive (e.g. x=5 ,
y=2 , z=4 ) first. You can check the coordinates where your player is standing
by looking at the top left corner of the Minecraft screen on the Raspberry Pi, or
pressing F3 on the PC/Mac.
Next you need to work out the smallest and biggest z coordinates. In the example, the
smallest z is 10 and the biggest z is 20. I have called the smallest z coordinate Z1 and
the biggest z coordinate Z2 :
X1 = 10
Z1 = 10
X2 = 20
Z2 = 20
Number your biggest and smallest coordinates in the same way, as you will need them
in the next step—writing the program.
 
Search WWH ::




Custom Search