gt: 					this.adjacentTreeBlocks = new int[var9 * var9 * var9];
context: package TFC.Blocks;
  
  import java.util.Random;
  
  import net.minecraft.block.material.Material;
  import net.minecraft.client.renderer.texture.IconRegister;
  import net.minecraft.entity.Entity;
  import net.minecraft.entity.player.EntityPlayer;
  import net.minecraft.util.AxisAlignedBB;
  import net.minecraft.util.Icon;
  import net.minecraft.world.IBlockAccess;
  import net.minecraft.world.World;
  import TFC.TFCBlocks;
  import TFC.TerraFirmaCraft;
  import TFC.Core.TFC_Climate;
  import TFC.Core.TFC_Settings;
  import TFC.Core.TFC_Time;
  import TFC.Food.FloraIndex;
  import TFC.Food.FloraManager;
  
  public class BlockFruitLeaves extends BlockTerra
  {
  	int adjacentTreeBlocks[];
  	
  	Icon[] icons = new Icon[16];
  	Icon[] iconsDead = new Icon[16];
  	public static Icon[] iconsFruit = new Icon[16];
  	Icon[] iconsOpaque = new Icon[16];
  	Icon[] iconsDeadOpaque = new Icon[16];
  	public static Icon[] iconsFlowers = new Icon[16];
  	
  	int Offset = 0;
  	
  	public BlockFruitLeaves(int i, int offset) 
  	{
  		super(i, Material.leaves);
  		this.setTickRandomly(true);
  		Offset = offset;
  	}
  
  	@Override
  	public int colorMultiplier(IBlockAccess par1IBlockAccess, int par2, int par3, int par4)
  	{
  		return TerraFirmaCraft.proxy.foliageColorMultiplier(par1IBlockAccess, par2, par3, par4);
  	}
  	@Override
  	public int getRenderType()
  	{
  		return TFCBlocks.leavesFruitRenderId;
  	}
  	@Override
  	public boolean isOpaqueCube()
  	{
  		return false;
  	}
  	@Override
  	public boolean renderAsNormalBlock()
  	{
  		return false;
  	}
  	@Override
  	public Icon getIcon(int i, int meta)
  	{
  		if (TerraFirmaCraft.proxy.getGraphicsLevel())
  		{
  			return icons[(meta & 7)];
  		}
  		else
  		{
  			return iconsOpaque[(meta & 7)];
  		}
  	}
  	
  	String[] WoodNames = {"Red Apple","Banana","Orange","Green Apple","Lemon","Olive","Cherry","Peach","Plum"};
  	
  	@Override
  	public void registerIcons(IconRegister iconRegisterer)
      {
  		for(int i = 0; i < 9; i++)
  		{
  			icons[i] = iconRegisterer.registerIcon("wood/fruit trees/" + WoodNames[i] + " Leaves");
  			iconsOpaque[i] = iconRegisterer.registerIcon("wood/fruit trees/" + WoodNames[i] + " Leaves Opaque");
  			iconsDead[i] = iconRegisterer.registerIcon("wood/fruit trees/" + WoodNames[i] + " Leaves");
  			iconsDeadOpaque[i] = iconRegisterer.registerIcon("wood/fruit trees/" + WoodNames[i] + " Leaves Opaque");
  			iconsFruit[i] = iconRegisterer.registerIcon("wood/fruit trees/" + WoodNames[i] + " Fruit");
  			iconsFlowers[i] = iconRegisterer.registerIcon("wood/fruit trees/" + WoodNames[i] + " Flowers");
  		}
      }
  
  	@Override
  	public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
  	{
  		return null;
  	}
  	@Override
  	public boolean shouldSideBeRendered(IBlockAccess iblockaccess, int i, int j, int k, int l)
  	{
  		return TFC_Settings.enableInnerGrassFix;
  	}
  	@Override
  	public void updateTick(World world, int i, int j, int k, Random rand)
  	{
  		if(!world.isRemote)
  		{
  			if(!canStay(world,i,j,k,blockID))
  			{
  				world.setBlockToAir(i, j, k);
  				return;
  			}
  
  			int meta = world.getBlockMetadata(i, j, k);
  			int m = meta - 8;
  
  			FloraManager manager = FloraManager.getInstance();
  			FloraIndex fi = FloraManager.getInstance().findMatchingIndex(getType(blockID, m));
  			FloraIndex fi2 = FloraManager.getInstance().findMatchingIndex(getType(blockID, meta));
  			
  			float temp = TFC_Climate.getHeightAdjustedTemp(i, j, k);
  			
  			if(fi2 != null)
  			{
  				if(temp >= fi2.minTemp && temp < fi2.maxTemp)
  				{
  					if(fi2.inHarvest(TFC_Time.currentMonth))
  					{
  						if(rand.nextInt(50) == 0)
  						{
  							if(meta < 8)
  							{
  								meta += 8;
  							}
  							world.setBlockMetadataWithNotify(i, j, k, meta, 0x2); 
  						}
  					}
  				}
  				else
  				{
  					if(meta >= 8 && rand.nextInt(10) == 0)
  					{
  						world.setBlockMetadataWithNotify(i, j, k, meta-8, 0x2); 
  					}
  				}
  			}
  			if(fi != null)
  			{
  				if(!fi.inHarvest(TFC_Time.currentMonth))
  				{
  					if(world.getBlockMetadata(i, j, k) >= 8)
  					{
  						world.setBlockMetadataWithNotify(i, j, k, meta-8, 0x2); 
  					}
  				}
  			}
  			if(rand.nextInt(100) > 50)
  				world.markBlockForUpdate(i, j, k);
  		}
  		return;
  	}
  
  	public static boolean canStay(World world, int i, int j, int k, int id)
  	{
  		if((world.getBlockId(i, j+1, k) != 0 && world.getBlockId(i, j+2, k) != 0 && world.getBlockId(i, j+2, k) == id) ||
  				world.getBlockId(i, j+1, k) == TFCBlocks.fruitTreeWood.blockID || 
  				world.getBlockId(i, j+2, k) == TFCBlocks.fruitTreeWood.blockID)
  		{
  			return false;
  		}
  		return true;
  	}
  
  	public static String getType(int id, int meta)
  	{
  		if(id == TFCBlocks.fruitTreeLeaves.blockID)
  		{
  			switch(meta)
  			{
  			case 0:
  			{
  				return "red apple";
  			}
  			case 1:
  			{
  				return "banana";
  			}
  			case 2:
  			{
  				return "orange";
  			}
  			case 3:
  			{
  				return "green apple";
  			}
  			case 4:
  			{
  				return "lemon";
  			}
  			case 5:
  			{
  				return "olive";
  			}
  			case 6:
  			{
  				return "cherry";
  			}
  			case 7:
  			{
  				return "peach";
  			}
  			}
  		}
  		else
  		{
  			switch(meta)
  			{
  			case 0:
  			{
  				return "plum";
  			}
  			case 1:
  			{
  				return "cacao";
  			}
  			}
  		}
  		return "";
  	}
  
  	@Override
  	public void onNeighborBlockChange(World par1World, int par2, int par3, int par4, int l)
  	{
  		Random R = new Random();
  		if (!par1World.isRemote)
  		{
  			int var6 = par1World.getBlockMetadata(par2, par3, par4);
  
  			if (true)
  			{
  				byte var7 = 1;
  				int var8 = var7 + 1;
  				byte var9 = 32;
  				int var10 = var9 * var9;
  				int var11 = var9 / 2;
  				adjacentTreeBlocks = null;
  				if (this.adjacentTreeBlocks == null)
  				{
  