Esempio n. 1
0
 public static EnumLeverPosition a(EnumDirection enumdirection, EnumDirection enumdirection1) {
   switch (BlockLever.SyntheticClass_1.a[enumdirection.ordinal()]) {
     case 1:
       switch (BlockLever.SyntheticClass_1.c[enumdirection1.k().ordinal()]) {
         case 1:
           return DOWN_X;
         case 2:
           return DOWN_Z;
       }
       throw new IllegalArgumentException(
           "Invalid entityFacing " + enumdirection1 + " for facing " + enumdirection);
     case 2:
       switch (BlockLever.SyntheticClass_1.c[enumdirection1.k().ordinal()]) {
         case 1:
           return UP_X;
         case 2:
           return UP_Z;
       }
       throw new IllegalArgumentException(
           "Invalid entityFacing " + enumdirection1 + " for facing " + enumdirection);
     case 3:
       return NORTH;
     case 4:
       return SOUTH;
     case 5:
       return WEST;
     case 6:
       return EAST;
   }
   throw new IllegalArgumentException("Invalid facing: " + enumdirection);
 }
Esempio n. 2
0
  private void a(TileEntityIronChest tileentitychest, EnumDirection enumdirection) {
    if (tileentitychest.x()) {
      this.a = false;
    } else if (this.a) {
      switch (SwitchHelperTileEntityChest.a[enumdirection.ordinal()]) {
        case 1:
          if (this.f != tileentitychest) {
            this.a = false;
          }
          break;

        case 2:
          if (this.i != tileentitychest) {
            this.a = false;
          }
          break;

        case 3:
          if (this.g != tileentitychest) {
            this.a = false;
          }
          break;

        case 4:
          if (this.h != tileentitychest) {
            this.a = false;
          }
      }
    }
  }
Esempio n. 3
0
 public static int a(EnumDirection enumdirection) {
   switch (SyntheticClass_1.a[enumdirection.ordinal()]) {
     case 1:
       return 0;
     case 2:
       return 5;
     case 3:
       return 4;
     case 4:
       return 3;
     case 5:
       return 2;
     case 6:
       return 1;
   }
   return -1;
 }
 public void updateShape(IBlockAccess var1, BlockPosition var2) {
   EnumDirection var3 = (EnumDirection) var1.getType(var2).get(a);
   float var4 = 0.28125F;
   float var5 = 0.78125F;
   float var6 = 0.0F;
   float var7 = 1.0F;
   float var8 = 0.125F;
   this.setSizes(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);
   switch (BlockWallSign.SyntheticClass_1.a[var3.ordinal()]) {
     case 1:
       this.setSizes(var6, var4, 1.0F - var8, var7, var5, 1.0F);
       break;
     case 2:
       this.setSizes(var6, var4, 0.0F, var7, var5, var8);
       break;
     case 3:
       this.setSizes(1.0F - var8, var4, var6, 1.0F, var5, var7);
       break;
     case 4:
       this.setSizes(0.0F, var4, var6, var8, var5, var7);
   }
 }
  protected WorldGenMonumentPiece(
      int i,
      EnumDirection enumdirection,
      WorldGenMonumentStateTracker worldgenmonumentstatetracker,
      int j,
      int k,
      int l) {
    super(i);
    this.m = enumdirection;
    this.k = worldgenmonumentstatetracker;
    int i1 = worldgenmonumentstatetracker.a;
    int j1 = i1 % 5;
    int k1 = i1 / 5 % 5;
    int l1 = i1 / 25;

    if (enumdirection != EnumDirection.NORTH && enumdirection != EnumDirection.SOUTH) {
      this.l = new StructureBoundingBox(0, 0, 0, l * 8 - 1, k * 4 - 1, j * 8 - 1);
    } else {
      this.l = new StructureBoundingBox(0, 0, 0, j * 8 - 1, k * 4 - 1, l * 8 - 1);
    }

    switch (SwitchHelperDirection5.a[enumdirection.ordinal()]) {
      case 1:
        this.l.a(j1 * 8, l1 * 4, -(k1 + l) * 8 + 1);
        break;

      case 2:
        this.l.a(j1 * 8, l1 * 4, k1 * 8);
        break;

      case 3:
        this.l.a(-(k1 + l) * 8 + 1, l1 * 4, j1 * 8);
        break;

      default:
        this.l.a(k1 * 8, l1 * 4, j1 * 8);
    }
  }