Пример #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;
 }