@Override
 public int getFlammability(
     IBlockAccess world, int x, int y, int z, int metadata, ForgeDirection face) {
   if (category == LeafCategory.CAT2 && metadata == 4) return 0;
   else {
     super.setBurnProperties(blockID, 30, 60);
     return blockFlammability[blockID];
   }
 }
 public void harvestBlock(World world, EntityPlayer entityplayer, int i, int j, int k, int l) {
   if (!world.isRemote
       && entityplayer.getCurrentEquippedItem() != null
       && entityplayer.getCurrentEquippedItem().itemID == Item.shears.itemID) {
     entityplayer.addStat(StatList.mineBlockStatArray[blockID], 1);
     dropBlockAsItem_do(world, i, j, k, new ItemStack(Block.leaves.blockID, 1, l & 3));
   } else {
     super.harvestBlock(world, entityplayer, i, j, k, l);
   }
 }
 @Override
 public void randomDisplayTick(World world, int x, int y, int z, Random random) {
   if ((world.canLightningStrikeAt(x, y + 1, z))
       && (!World.doesBlockHaveSolidTopSurface(world, x, y - 1, z))
       && (random.nextInt(15) == 1)) {
     double d0 = x + random.nextFloat();
     double d1 = y - 0.05D;
     double d2 = z + random.nextFloat();
     world.spawnParticle("dripWater", d0, d1, d2, 0.0D, 0.0D, 0.0D);
   }
   super.randomDisplayTick(world, x, y, z, random);
 }
Exemple #4
0
 public void func_149636_a(
     World p_149636_1_,
     EntityPlayer p_149636_2_,
     int p_149636_3_,
     int p_149636_4_,
     int p_149636_5_,
     int p_149636_6_) {
   if (!p_149636_1_.field_72995_K
       && p_149636_2_.func_71045_bC() != null
       && p_149636_2_.func_71045_bC().func_77973_b() == Items.field_151097_aZ) {
     p_149636_2_.func_71064_a(StatList.field_75934_C[Block.func_149682_b(this)], 1);
     this.func_149642_a(
         p_149636_1_,
         p_149636_3_,
         p_149636_4_,
         p_149636_5_,
         new ItemStack(Item.func_150898_a(this), 1, p_149636_6_ & 3));
   } else {
     super.func_149636_a(
         p_149636_1_, p_149636_2_, p_149636_3_, p_149636_4_, p_149636_5_, p_149636_6_);
   }
 }
 public void onEntityWalking(World world, int i, int j, int k, Entity entity) {
   super.onEntityWalking(world, i, j, k, entity);
 }
 @Override
 public void harvestBlock(
     World world, final EntityPlayer player, final int x, final int y, final int z, final int md) {
   super.harvestBlock(world, player, x, y, z, md);
 }
 /**
  * Called when the player destroys a block with an item that can harvest it. (i, j, k) are the
  * coordinates of the block and l is the block's subtype/damage.
  */
 public void harvestBlock(
     World par1World, EntityPlayer par2EntityPlayer, int par3, int par4, int par5, int par6) {
   super.harvestBlock(par1World, par2EntityPlayer, par3, par4, par5, par6);
 }