Exemplo n.º 1
0
  /** Update which block ID the furnace is using depending on whether or not it is burning */
  public static void a(boolean par0, World par1World, int par2, int par3, int par4) {

    int i = par1World.getData(par2, par3, par4);
    TileEntity tileentity = par1World.getTileEntity(par2, par3, par4);
    c = true;

    if (par0) {
      par1World.setTypeId(par2, par3, par4, MhoDilandau.BlockIronFurnaceActive.id);
    } else {
      par1World.setTypeId(par2, par3, par4, MhoDilandau.BlockIronFurnaceIdle.id);
    }

    c = false;
    par1World.setData(par2, par3, par4, i);

    if (tileentity != null) {
      tileentity.m();
      par1World.setTileEntity(par2, par3, par4, tileentity);
    }
  }
Exemplo n.º 2
0
 /*     */ public void doPhysics(World var1, int var2, int var3, int var4, int var5) /*     */ {
   /*  68 */ TileEE var6 = (TileEE) EEProxy.getTileEntity(var1, var2, var3, var4, TileEE.class);
   /*     */
   /*  70 */ if (var6 == null)
   /*     */ {
     /*  72 */ var1.setTypeId(var2, var3, var4, 0);
     /*     */ }
   /*     */ else
   /*     */ {
     /*  76 */ var6.onNeighborBlockChange(var5);
     /*     */ }
   /*     */ }
Exemplo n.º 3
0
  public void scanBlockAndBreak(World var1, ItemStack var2, int var3, int var4, int var5) {
    int var6 = var1.getTypeId(var3, var4, var5);
    int var7 = var1.getData(var3, var4, var5);
    ArrayList var8 = Block.byId[var6].getBlockDropped(var1, var3, var4, var5, var7, 0);
    ItemStack var10;
    for (Iterator var9 = var8.iterator(); var9.hasNext(); addToDroplist(var2, var10))
      var10 = (ItemStack) var9.next();

    var1.setTypeId(var3, var4, var5, 0);
    if (var1.random.nextInt(8) == 0) var1.a("largesmoke", var3, var4, var5, 0.0D, 0.0D, 0.0D);
    if (var1.random.nextInt(8) == 0) var1.a("explode", var3, var4, var5, 0.0D, 0.0D, 0.0D);
  }
Exemplo n.º 4
0
  public boolean interactWith(
      ItemStack var1, EntityHuman var2, World var3, int var4, int var5, int var6, int var7) {
    if (EEProxy.isClient(var3)) return false;
    boolean var8 = true;
    if (chargeLevel(var1) > 0) {
      cleanDroplist(var1);
      var2.C_();
      var3.makeSound(var2, "flash", 0.8F, 1.5F);
      for (int var9 = -(chargeLevel(var1) * (var7 != 5 ? (byte) (var7 != 4 ? 1 : 0) : 2));
          var9 <= chargeLevel(var1) * (var7 != 5 ? var7 != 4 ? 1 : 2 : 0);
          var9++) {
        for (int var10 = -(chargeLevel(var1) * (var7 != 1 ? (byte) (var7 != 0 ? 1 : 0) : 2));
            var10 <= chargeLevel(var1) * (var7 != 1 ? var7 != 0 ? 1 : 2 : 0);
            var10++) {
          for (int var11 = -(chargeLevel(var1) * (var7 != 3 ? (byte) (var7 != 2 ? 1 : 0) : 2));
              var11 <= chargeLevel(var1) * (var7 != 3 ? var7 != 2 ? 1 : 2 : 0);
              var11++) {
            int var12 = var4 + var9;
            int var13 = var5 + var10;
            int var14 = var6 + var11;
            int var15 = var3.getTypeId(var12, var13, var14);
            int var16 = var3.getData(var12, var13, var14);
            if (canBreak(var15, var16) && attemptBreak(var2, var12, var13, var14)) {
              if (getFuelRemaining(var1) < 1) {
                ConsumeReagent(var1, var2, var8);
                var8 = false;
              }
              if (getFuelRemaining(var1) > 0) {
                ArrayList var17 =
                    Block.byId[var15].getBlockDropped(var3, var12, var13, var14, var16, 0);
                ItemStack var19;
                for (Iterator var18 = var17.iterator(); var18.hasNext(); addToDroplist(var1, var19))
                  var19 = (ItemStack) var18.next();

                var3.setTypeId(var12, var13, var14, 0);
                if (var3.random.nextInt(8) == 0)
                  var3.a("largesmoke", var12, var13, var14, 0.0D, 0.0D, 0.0D);
                if (var3.random.nextInt(8) == 0)
                  var3.a("explode", var12, var13, var14, 0.0D, 0.0D, 0.0D);
                setShort(var1, "fuelRemaining", getFuelRemaining(var1) - 1);
              }
            }
          }
        }
      }

      ejectDropList(var3, var1, var4, var5, var6);
    }
    return false;
  }
 protected final void checkFlowerChange(World var1, int var2, int var3, int var4) {
   if (!this.f(var1, var2, var3, var4)) {
     this.b(var1, var2, var3, var4, var1.getData(var2, var3, var4), 0);
     var1.setTypeId(var2, var3, var4, 0);
   }
 }