package net.minecraft.block;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;
import java.util.List;
import net.minecraft.block.material.Material;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.Entity;
import net.minecraft.entity.item.EntityBoat;
import net.minecraft.init.Blocks;
import net.minecraft.util.AxisAlignedBB;
import net.minecraft.world.IBlockAccess;
import net.minecraft.world.World;
public class BlockLilyPad extends BlockBush
{
private static final String __OBFID = "CL_00000332";
protected BlockLilyPad()
{
float f = 0.5F;
float f1 = 0.015625F;
this.setBlockBounds(0.5F - f, 0.0F, 0.5F - f, 0.5F + f, f1, 0.5F + f);
this.setCreativeTab(CreativeTabs.tabDecorations);
}
/**
* The type of render function that is called for this block
*/
public int getRenderType()
{
return 23;
}
public void addCollisionBoxesToList(World worldIn, int x, int y, int z, AxisAlignedBB mask, List list, Entity collider)
{
if (collider == null || !(collider instanceof EntityBoat))
{
super.addCollisionBoxesToList(worldIn, x, y, z, mask, list, collider);
}
}
/**
* Returns a bounding box from the pool of bounding boxes (this means this box can change after the pool has been
* cleared to be reused)
*/
public AxisAlignedBB getCollisionBoundingBoxFromPool(World worldIn, int x, int y, int z)
{
return AxisAlignedBB.getBoundingBox((double)x + this.minX, (double)y + this.minY, (double)z + this.minZ, (double)x + this.maxX, (double)y + this.maxY, (double)z + this.maxZ);
}
/**
* is the block grass, dirt or farmland
*/
protected boolean canPlaceBlockOn(Block ground)
{
return ground == Blocks.water;
}
@SideOnly(Side.CLIENT)
public int getBlockColor()
{
return 2129968;
}
/**
* Returns the color this block should be rendered. Used by leaves.
*/
@SideOnly(Side.CLIENT)
public int getRenderColor(int meta)
{
return 2129968;
}
/**
* Returns a integer with hex for 0xrrggbb with this color multiplied against the blocks color. Note only called
* when first determining what to render.
*/
@SideOnly(Side.CLIENT)
public int colorMultiplier(IBlockAccess worldIn, int x, int y, int z)
{
return 2129968;
}
/**
* Can this block stay at this position. Similar to canPlaceBlockAt except gets checked often with plants.
*/
public boolean canBlockStay(World worldIn, int x, int y, int z)
{
return y >= 0 && y < 256 ? worldIn.getBlock(x, y - 1, z).getMaterial() == Material.water && worldIn.getBlockMetadata(x, y - 1, z) == 0 : false;
}
}