protected EnumFacing getOrientation(int x, int y, int z, EntityLivingBase entityLivingBase) { switch (getMetaUsage()) { case HORIZROTATION: return BlockTools.determineOrientationHoriz(entityLivingBase); case ROTATION: return BlockTools.determineOrientation(x, y, z, entityLivingBase); } return null; }
public Vector blockToWorldSpace(World world, BlockPos pos, Vector v) { switch (getMetaUsage()) { case HORIZROTATION: return BlockTools.blockToWorldSpaceHoriz(v, world.getBlockState(pos)); case ROTATION: return BlockTools.blockToWorldSpace(v, world.getBlockState(pos)); case NONE: default: return v; } }
@Override public EnumFacing worldToBlockSpace(World world, BlockPos pos, EnumFacing side) { switch (getMetaUsage()) { case HORIZROTATION: return BlockTools.worldToBlockSpaceHoriz(side, world.getBlockState(pos)); case ROTATION: return BlockTools.worldToBlockSpace(side, world.getBlockState(pos)); case NONE: default: return side; } }
public static EnumFacing getFrontDirection(MetaUsage metaUsage, IBlockState state) { EnumFacing orientation; switch (metaUsage) { case HORIZROTATION: orientation = BlockTools.getOrientationHoriz(state); break; case ROTATION: orientation = BlockTools.getOrientation(state); break; case NONE: default: orientation = EnumFacing.SOUTH; break; } return orientation; }