BlockWeb: Difference between revisions
Content added Content deleted
(created page) |
mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
[[SourceCode|Back to SourceCode]] |
[[SourceCode|Back to SourceCode]] |
||
<syntaxhighlight lang="java" line="1"> |
|||
package net.minecraft.block; |
package net.minecraft.block; |
||
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();
}
}