    001package net.minecraft.util;
    002
    003public enum EnumFacing
    004{
    005    DOWN(0, 1, 0, -1, 0),
    006    UP(1, 0, 0, 1, 0),
    007    NORTH(2, 3, 0, 0, -1),
    008    SOUTH(3, 2, 0, 0, 1),
    009    EAST(4, 5, -1, 0, 0),
    010    WEST(5, 4, 1, 0, 0);
    011    private final int field_82603_g;
    012    private final int field_82613_h;
    013    private final int frontOffsetX;
    014    private final int frontOffsetY;
    015    private final int frontOffsetZ;
    016    private static final EnumFacing[] field_82609_l = new EnumFacing[6];
    017
    018    private EnumFacing(int par3, int par4, int par5, int par6, int par7)
    019    {
    020        this.field_82603_g = par3;
    021        this.field_82613_h = par4;
    022        this.frontOffsetX = par5;
    023        this.frontOffsetY = par6;
    024        this.frontOffsetZ = par7;
    025    }
    026
    027    /**
    028     * Returns a offset that addresses the block in front of this facing.
    029     */
    030    public int getFrontOffsetX()
    031    {
    032        return this.frontOffsetX;
    033    }
    034
    035    /**
    036     * Returns a offset that addresses the block in front of this facing.
    037     */
    038    public int getFrontOffsetZ()
    039    {
    040        return this.frontOffsetZ;
    041    }
    042
    043    /**
    044     * Returns the facing that represents the block in front of it.
    045     */
    046    public static EnumFacing getFront(int par0)
    047    {
    048        return field_82609_l[par0 % field_82609_l.length];
    049    }
    050
    051    static {
    052        EnumFacing[] var0 = values();
    053        int var1 = var0.length;
    054
    055        for (int var2 = 0; var2 < var1; ++var2)
    056        {
    057            EnumFacing var3 = var0[var2];
    058            field_82609_l[var3.field_82603_g] = var3;
    059        }
    060    }
    061}