Whenever there are two blocks of this on each other, I can walk into it and suffocate :S What am I missing/ho can I fix it?
package net.minecraft.src;
import java.util.Random;
public class GrBlockGrapeWood extends Block
{
protected GrBlockGrapeWood(int i, int j)
{
super(i, j, Material.wood);
setBlockBounds(0.25F, 0F, 0.25F, 0.75F, 1F, 0.75F);
}
public int quantityDropped(Random random)
{
return 1;
}
/**
* Is this block (a) opaque and (B) a full 1m cube? This determines whether or not to render the shared face of two
* adjacent blocks and also whether the player can attach torches, redstone wire, etc to this block.
*/
public boolean isOpaqueCube()
{
return false;
}
/**
* 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 par1World, int par2, int par3, int par4)
{
float f = 0.0625F;
return AxisAlignedBB.getBoundingBoxFromPool((float)par2 + f, par3, (float)par4 + f, (float)(par2 + 1) - f, (float)(par3 + 1) - f, (float)(par4 + 1) - f);
}
/**
* Returns the bounding box of the wired rectangular prism to render.
*/
public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
float f = 0.0625F;
return AxisAlignedBB.getBoundingBoxFromPool((float)par2 + f, par3, (float)par4 + f, (float)(par2 + 1) - f, par3 + 1, (float)(par4 + 1) - f);
}
public int idDropped(int i, Random random)
{
return mod_Greek.GrBlockGrapeWood.blockID;
}
public int getBlockTextureFromSide(int i)
{
if (i == 0)
{
return mod_Greek.GrapeWoodTop;
}
if (i == 1)
{
return mod_Greek.GrapeWoodTop;
}
else
{
return mod_Greek.GrapeWoodSide;
}
}
}
/**
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock()
{
return false;
}
try adding that to not suffocate, or to not enter change your block bounds
* If this block doesn't render as an ordinary block it will return False (examples: signs, buttons, stairs, etc)
*/
public boolean renderAsNormalBlock()
{
return false;
}
try adding that to not suffocate, or to not enter change your block bounds
[code]
public AxisAlignedBB getCollisionBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
float f = 0.0625F;
return AxisAlignedBB.getBoundingBoxFromPool((float)par2 + f, par3, (float)par4 + f, (float)(par2 + 1) - f, (float)(par3 + 1) - f, (float)(par4 + 1) - f);
}
/**
* Returns the bounding box of the wired rectangular prism to render.
*/
public AxisAlignedBB getSelectedBoundingBoxFromPool(World par1World, int par2, int par3, int par4)
{
float f = 0.0625F;
return AxisAlignedBB.getBoundingBoxFromPool((float)par2 + f, par3, (float)par4 + f, (float)(par2 + 1) - f, par3 + 1, (float)(par4 + 1) - f)