示例#1
0
 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;
 }
示例#2
0
 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;
   }
 }
示例#3
0
 @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;
   }
 }
示例#4
0
 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;
 }