BlockWeb: Difference between revisions
Content added Content deleted
mNo edit summary |
mNo edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 10: | Line 10: | ||
} |
} |
||
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) |
|||
{ |
|||
return null; //no solid collisions |
|||
} |
|||
/* called from Entity.doBlockCollisions() */ |
|||
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) |
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn) |
||
{ |
{ |
Latest revision as of 15:43, 28 March 2020
package net.minecraft.block;
public class BlockWeb extends Block
{
public BlockWeb()
{
super(Material.web);
}
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
{
return null; //no solid collisions
}
/* called from Entity.doBlockCollisions() */
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
{
entityIn.setInWeb();
}
}