001package net.minecraft.util; 002 003public class Direction 004{ 005 public static final int[] offsetX = new int[] {0, -1, 0, 1}; 006 public static final int[] offsetZ = new int[] {1, 0, -1, 0}; 007 public static final String[] directions = new String[] {"SOUTH", "WEST", "NORTH", "EAST"}; 008 public static final int[] headInvisibleFace = new int[] {3, 4, 2, 5}; 009 public static final int[] vineGrowth = new int[] { -1, -1, 2, 0, 1, 3}; 010 public static final int[] footInvisibleFaceRemap = new int[] {2, 3, 0, 1}; 011 public static final int[] enderEyeMetaToDirection = new int[] {1, 2, 3, 0}; 012 public static final int[] field_71578_g = new int[] {3, 0, 1, 2}; 013 public static final int[][] bedDirection = new int[][] {{1, 0, 3, 2, 5, 4}, {1, 0, 5, 4, 2, 3}, {1, 0, 2, 3, 4, 5}, {1, 0, 4, 5, 3, 2}}; 014 015 /** 016 * Returns the movement direction from a velocity vector. 017 */ 018 public static int getMovementDirection(double par0, double par2) 019 { 020 return MathHelper.abs((float)par0) > MathHelper.abs((float)par2) ? (par0 > 0.0D ? 1 : 3) : (par2 > 0.0D ? 2 : 0); 021 } 022}