package hmggirlfront.biome;

import java.util.Random;

import net.minecraft.block.BlockStaticLiquid;
import net.minecraft.block.material.Material;
import net.minecraft.block.state.IBlockState;
import net.minecraft.init.Blocks;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.gen.feature.WorldGenerator;

public class WorldGenDeadTree extends WorldGenerator
{
    public boolean generate(World worldIn, Random rand, BlockPos position)
    {
    	int par1 = position.getX();
    	int par2 = position.getY();
    	int par3 = position.getZ();
    	if(worldIn.getBlockState(new BlockPos(par1, par2-1, par3)).getBlock() instanceof BlockStaticLiquid) {
    		return false;
    	}else {
    		worldIn.setBlockState(new BlockPos(par1, par2 + 0, par3), Blocks.LOG.getDefaultState(), 2);
    		worldIn.setBlockState(new BlockPos(par1, par2 + 1, par3), Blocks.LOG.getDefaultState(), 2);
    		worldIn.setBlockState(new BlockPos(par1, par2 + 2, par3), Blocks.LOG.getDefaultState(), 2);
        return true;
    	}
    }
}