Esempio n. 1
0
 /*     */ public void onPlace(World var1, int var2, int var3, int var4) /*     */ {
   /* 186 */ super.onPlace(var1, var2, var3, var4);
   /* 187 */ TileEE var5 = (TileEE) EEProxy.getTileEntity(var1, var2, var3, var4, TileEE.class);
   /*     */
   /* 189 */ if (var5 != null)
   /*     */ {
     /* 191 */ var5.setDefaultDirection();
     /*     */ }
   /*     */ }
Esempio n. 2
0
 /*     */ public void remove(World var1, int var2, int var3, int var4) /*     */ {
   /* 172 */ TileEE var5 = (TileEE) EEProxy.getTileEntity(var1, var2, var3, var4, TileEE.class);
   /*     */
   /* 174 */ if (var5 != null)
   /*     */ {
     /* 176 */ var5.onBlockRemoval();
     /* 177 */ super.remove(var1, var2, var3, var4);
     /*     */ }
   /*     */ }
 public void postPlace(
     World var1, BlockPosition var2, IBlockData var3, EntityLiving var4, ItemStack var5) {
   super.postPlace(var1, var2, var3, var4, var5);
   if (var5.hasDisplayName()) {
     TileEntity var6 = var1.getTileEntity(var2);
     if (var6 instanceof TileEntityEnchantTable) {
       ((TileEntityEnchantTable) var6).a(var5.getDisplayName());
     }
   }
 }
Esempio n. 4
0
  /** Called whenever the block is removed. */
  @Override
  public void remove(World par1World, int par2, int par3, int par4) {
    if (!c) {
      TileEntityIronFurnace tileentityfurnace =
          (TileEntityIronFurnace) par1World.getTileEntity(par2, par3, par4);

      if (tileentityfurnace != null) {
        label0:
        for (int i = 0; i < tileentityfurnace.getSize(); i++) {
          ItemStack itemstack = tileentityfurnace.getItem(i);

          if (itemstack == null) {
            continue;
          }

          float f = a.nextFloat() * 0.8F + 0.1F;
          float f1 = a.nextFloat() * 0.8F + 0.1F;
          float f2 = a.nextFloat() * 0.8F + 0.1F;

          do {
            if (itemstack.count <= 0) {
              continue label0;
            }

            int j = a.nextInt(21) + 10;

            if (j > itemstack.count) {
              j = itemstack.count;
            }

            itemstack.count -= j;
            EntityItem entityitem =
                new EntityItem(
                    par1World,
                    par2 + f,
                    par3 + f1,
                    par4 + f2,
                    new ItemStack(itemstack.id, j, itemstack.getData()));

            if (itemstack.hasTag()) {
              entityitem.itemStack.setTag((NBTTagCompound) itemstack.getTag().clone());
            }

            float f3 = 0.05F;
            entityitem.motX = (float) a.nextGaussian() * f3;
            entityitem.motY = (float) a.nextGaussian() * f3 + 0.2F;
            entityitem.motZ = (float) a.nextGaussian() * f3;
            par1World.addEntity(entityitem);
          } while (true);
        }
      }
    }

    super.remove(par1World, par2, par3, par4);
  }
Esempio n. 5
0
 /** Called whenever the block is added into the world. Args: world, x, y, z */
 @Override
 public void onPlace(World par1World, int par2, int par3, int par4) {
   super.onPlace(par1World, par2, par3, par4);
   g(par1World, par2, par3, par4);
 }