net.minecraft.util.EnumFacing.AxisDirection Java Examples

The following examples show how to use net.minecraft.util.EnumFacing.AxisDirection. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: TankRenderer.java    From GregTech with GNU Lesser General Public License v3.0 5 votes vote down vote up
private static Cuboid6 createFullOffsetCuboid(int connectionMask) {
    Cuboid6 cuboid6 = new Cuboid6();
    for (EnumFacing side : EnumFacing.VALUES) {
        double offset = offset(side, connectionMask);
        double value = side.getAxisDirection() == AxisDirection.POSITIVE ? 1.0 - offset : offset;
        cuboid6.setSide(side, value);
    }
    return cuboid6;
}
 
Example #2
Source File: ItemBuildersWand.java    From enderutilities with GNU Lesser General Public License v3.0 5 votes vote down vote up
public Area3D adjustArea(EnumFacing facing, int amount)
{
    if (facing.getAxisDirection() == AxisDirection.POSITIVE)
    {
        this.pos.move(facing, amount);
        this.clampBounds(this.pos);
    }
    else
    {
        this.neg.move(facing, -amount);
        this.clampBounds(this.neg);
    }

    return this;
}