Exemplo n.º 1
0
  public int getBlockTexture(IBlockAccess iblockaccess, int i, int j, int k, int l) {
    int i1 = iblockaccess.getData(i, j, k);

    if (l == 0) {
      return this.textureId + 16;
    } else if (l == 1) {
      if (this.b) {
        return this.textureId + 18;
      } else {
        return this.textureId + 2;
      }
    }

    if (l == i1) {
      if (this.b) {
        return this.textureId + 17;
      } else {
        return this.textureId + 1;
      }
    } else if (l == MhoDilandau.getOrientationFromSide((byte) i1, (byte) 2)) {
      return this.textureId + 16;
    } else {
      return this.textureId;
    }
  }
Exemplo n.º 2
0
  public void updateShape(IBlockAccess var1, BlockPosition var2) {
    EnumDirection.EnumAxis var3 = (EnumDirection.EnumAxis) var1.getType(var2).get(AXIS);
    float var4 = 0.125F;
    float var5 = 0.125F;
    if (var3 == EnumDirection.EnumAxis.X) {
      var4 = 0.5F;
    }

    if (var3 == EnumDirection.EnumAxis.Z) {
      var5 = 0.5F;
    }

    this.a(0.5F - var4, 0.0F, 0.5F - var5, 0.5F + var4, 1.0F, 0.5F + var5);
  }
Exemplo n.º 3
0
 public static boolean checkPipesConnections(
     IBlockAccess var0, int var1, int var2, int var3, int var4, int var5, int var6) {
   Block var7 = Block.byId[var0.getTypeId(var1, var2, var3)];
   Block var8 = Block.byId[var0.getTypeId(var4, var5, var6)];
   return !(var7 instanceof IPipeConnection) && !(var8 instanceof IPipeConnection)
       ? false
       : (var7 instanceof IPipeConnection
               && !((IPipeConnection) var7)
                   .isPipeConnected(var0, var1, var2, var3, var4, var5, var6)
           ? false
           : !(var8 instanceof IPipeConnection)
               || ((IPipeConnection) var8)
                   .isPipeConnected(var0, var4, var5, var6, var1, var2, var3));
 }
Exemplo n.º 4
0
  @Override
  public void setBlockBoundsBasedOnState(IBlockAccess access, int i, int j, int k) {
    int dir = access.getBlockMetadata(i, j, k);

    if (dir == 0) {
      this.setBlockBounds(0.0F, 0F, 0.85F, 1F, 1F, 1F);
    } else if (dir == 1) {
      this.setBlockBounds(0.0F, 0F, 0.0F, 0.15F, 1F, 1F);
    } else if (dir == 2) {
      this.setBlockBounds(0.0F, 0F, 0.00F, 1F, 1F, 0.15F);
    } else if (dir == 3) {
      this.setBlockBounds(0.85F, 0F, 0.0F, 1F, 1F, 1F);
    }
  }