gt:         IBlockState state = world.getBlockState(pos);
context: package com.trinia.blocks;
  
  import java.util.Random;
  
  import net.minecraft.block.Block;
  import net.minecraft.block.BlockPlanks;
  import net.minecraft.block.material.Material;
  import net.minecraft.block.properties.PropertyBool;
  import net.minecraft.block.state.IBlockState;
  import net.minecraft.creativetab.CreativeTabs;
  import net.minecraft.init.Blocks;
  import net.minecraft.init.Items;
  import net.minecraft.item.Item;
  import net.minecraft.item.ItemStack;
  import net.minecraft.util.BlockPos;
  import net.minecraft.util.EnumParticleTypes;
  import net.minecraft.util.EnumWorldBlockLayer;
  import net.minecraft.world.ColorizerFoliage;
  import net.minecraft.world.IBlockAccess;
  import net.minecraft.world.World;
  import net.minecraft.world.biome.BiomeColorHelper;
  import net.minecraftforge.fml.relauncher.Side;
  import net.minecraftforge.fml.relauncher.SideOnly;
  
  public abstract class BlockTriniaLeaves extends BlockTriniaLeavesBase implements net.minecraftforge.common.IShearable
  {
      public static final PropertyBool DECAYABLE = PropertyBool.create("decayable");
      public static final PropertyBool CHECK_DECAY = PropertyBool.create("check_decay");
      int[] surroundings;
      @SideOnly(Side.CLIENT)
      protected int iconIndex;
      @SideOnly(Side.CLIENT)
      protected boolean isTransparent;
      private static final String __OBFID = "CL_00000263";
  
      public BlockTriniaLeaves()
      {
          super(Material.leaves, false);
          this.setTickRandomly(true);
          this.setHardness(0.2F);
          this.setLightOpacity(1);
          this.setStepSound(soundTypeGrass);
      }
  
      public void breakBlock(World worldIn, BlockPos pos, IBlockState state)
      {
          byte b0 = 1;
          int i = b0 + 1;
          int j = pos.getX();
          int k = pos.getY();
          int l = pos.getZ();
  
          if (worldIn.isAreaLoaded(new BlockPos(j - i, k - i, l - i), new BlockPos(j + i, k + i, l + i)))
          {
              for (int i1 = -b0; i1 <= b0; ++i1)
              {
                  for (int j1 = -b0; j1 <= b0; ++j1)
                  {
                      for (int k1 = -b0; k1 <= b0; ++k1)
                      {
                          BlockPos blockpos1 = pos.add(i1, j1, k1);
                          IBlockState iblockstate1 = worldIn.getBlockState(blockpos1);
  
                          if (iblockstate1.getBlock().isLeaves(worldIn, blockpos1))
                          {
                              iblockstate1.getBlock().beginLeavesDecay(worldIn, blockpos1);
                          }
                      }
                  }
              }
          }
      }
  
      public void updateTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
      {
          if (!worldIn.isRemote)
          {
              if (((Boolean)state.getValue(CHECK_DECAY)).booleanValue() && ((Boolean)state.getValue(DECAYABLE)).booleanValue())
              {
                  byte b0 = 4;
                  int i = b0 + 1;
                  int j = pos.getX();
                  int k = pos.getY();
                  int l = pos.getZ();
                  byte b1 = 32;
                  int i1 = b1 * b1;
                  int j1 = b1 / 2;
  
                  if (this.surroundings == null)
                  {
                      this.surroundings = new int[b1 * b1 * b1];
                  }
  
                  int k1;
  
                  if (worldIn.isAreaLoaded(new BlockPos(j - i, k - i, l - i), new BlockPos(j + i, k + i, l + i)))
                  {
                      int l1;
                      int i2;
  
                      for (k1 = -b0; k1 <= b0; ++k1)
                      {
                          for (l1 = -b0; l1 <= b0; ++l1)
                          {
                              for (i2 = -b0; i2 <= b0; ++i2)
                              {
                                  BlockPos tmp = new BlockPos(j + k1, k + l1, l + i2);
                                  Block block = worldIn.getBlockState(tmp).getBlock();
  
                                  if (!block.canSustainLeaves(worldIn, tmp))
                                  {
                                      if (block.isLeaves(worldIn, tmp))
                                      {
                                          this.surroundings[(k1 + j1) * i1 + (l1 + j1) * b1 + i2 + j1] = -2;
                                      }
                                      else
                                      {
                                          this.surroundings[(k1 + j1) * i1 + (l1 + j1) * b1 + i2 + j1] = -1;
                                      }
                                  }
                                  else
                                  {
                                      this.surroundings[(k1 + j1) * i1 + (l1 + j1) * b1 + i2 + j1] = 0;
                                  }
                              }
                          }
                      }
  
                      for (k1 = 1; k1 <= 4; ++k1)
                      {
                          for (l1 = -b0; l1 <= b0; ++l1)
                          {
                              for (i2 = -b0; i2 <= b0; ++i2)
                              {
                                  for (int j2 = -b0; j2 <= b0; ++j2)
                                  {
                                      if (this.surroundings[(l1 + j1) * i1 + (i2 + j1) * b1 + j2 + j1] == k1 - 1)
                                      {
                                          if (this.surroundings[(l1 + j1 - 1) * i1 + (i2 + j1) * b1 + j2 + j1] == -2)
                                          {
                                              this.surroundings[(l1 + j1 - 1) * i1 + (i2 + j1) * b1 + j2 + j1] = k1;
                                          }
  
                                          if (this.surroundings[(l1 + j1 + 1) * i1 + (i2 + j1) * b1 + j2 + j1] == -2)
                                          {
                                              this.surroundings[(l1 + j1 + 1) * i1 + (i2 + j1) * b1 + j2 + j1] = k1;
                                          }
  
                                          if (this.surroundings[(l1 + j1) * i1 + (i2 + j1 - 1) * b1 + j2 + j1] == -2)
                                          {
                                              this.surroundings[(l1 + j1) * i1 + (i2 + j1 - 1) * b1 + j2 + j1] = k1;
                                          }
  
                                          if (this.surroundings[(l1 + j1) * i1 + (i2 + j1 + 1) * b1 + j2 + j1] == -2)
                                          {
                                              this.surroundings[(l1 + j1) * i1 + (i2 + j1 + 1) * b1 + j2 + j1] = k1;
                                          }
  
                                          if (this.surroundings[(l1 + j1) * i1 + (i2 + j1) * b1 + (j2 + j1 - 1)] == -2)
                                          {
                                              this.surroundings[(l1 + j1) * i1 + (i2 + j1) * b1 + (j2 + j1 - 1)] = k1;
                                          }
  
                                          if (this.surroundings[(l1 + j1) * i1 + (i2 + j1) * b1 + j2 + j1 + 1] == -2)
                                          {
                                              this.surroundings[(l1 + j1) * i1 + (i2 + j1) * b1 + j2 + j1 + 1] = k1;
                                          }
                                      }
                                  }
                              }
                          }
                      }
                  }
  
                  k1 = this.surroundings[j1 * i1 + j1 * b1 + j1];
  
                  if (k1 >= 0)
                  {
                      worldIn.setBlockState(pos, state.withProperty(CHECK_DECAY, Boolean.valueOf(false)), 4);
                  }
                  else
                  {
                      this.destroy(worldIn, pos);
                  }
              }
          }
      }
  
      @SideOnly(Side.CLIENT)
      public void randomDisplayTick(World worldIn, BlockPos pos, IBlockState state, Random rand)
      {
          if (worldIn.canLightningStrike(pos.up()) && !World.doesBlockHaveSolidTopSurface(worldIn, pos.down()) && rand.nextInt(15) == 1)
          {
              double d0 = (double)((float)pos.getX() + rand.nextFloat());
              double d1 = (double)pos.getY() - 0.05D;
              double d2 = (double)((float)pos.getZ() + rand.nextFloat());
              worldIn.spawnParticle(EnumParticleTypes.DRIP_WATER, d0, d1, d2, 0.0D, 0.0D, 0.0D, new int[0]);
          }
      }
  
      private void destroy(World worldIn, BlockPos pos)
      {
          this.dropBlockAsItem(worldIn, pos, worldIn.getBlockState(pos), 0);
          worldIn.setBlockToAir(pos);
      }
  
      /**
       * Returns the quantity of items to drop on block destruction.
       */
      public int quantityDropped(Random random)
      {
          return 2;
      }
  
      /**
       * Get the Item that this Block should drop when harvested.
       *  
       * @param fortune the level of the Fortune enchantment on the player's tool
       */
      public Item getItemDropped(IBlockState state, Random rand, int fortune)
      {
          return Items.stick;
      }
  
      /**
       * Spawns this Block's drops into the World as EntityItems.
       *  
       * @param chance The chance that each Item is actually spawned (1.0 = always, 0.0 = never)
       * @param fortune The player's fortune level
       */
      
  
      public boolean isOpaqueCube()
      {
          return !this.fancyGraphics;
      }
  
      /**
       * Pass true to draw this block using fancy graphics, or false for fast graphics.
       */
      @SideOnly(Side.CLIENT)
      public void setGraphicsLevel(boolean fancy)
      {
          this.isTransparent = fancy;
          this.fancyGraphics = fancy;
          this.iconIndex = fancy ? 0 : 1;
      }
  
      @SideOnly(Side.CLIENT)
      public EnumWorldBlockLayer getBlockLayer()
      {
      	return EnumWorldBlockLayer.TRANSLUCENT;
      }
  
      public boolean isVisuallyOpaque()
      {
          return false;
      }
  
      public abstract BlockPlanks.EnumType getWoodType(int meta);
  
      @Override public boolean isShearable(ItemStack item, IBlockAccess world, BlockPos pos){ return true; }
      @Override public boolean isLeaves(IBlockAccess world, BlockPos pos){ return true; }
  
      @Override
      public void beginLeavesDecay(World world, BlockPos pos)
      {
  