BlockSoulSand: Difference between revisions
Content added Content deleted
mNo edit summary |
mNo edit summary |
||
Line 9: | Line 9: | ||
super(Material.sand, MapColor.brownColor); |
super(Material.sand, MapColor.brownColor); |
||
} |
} |
||
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state) |
|||
{ |
|||
return new AxisAlignedBB(pos.getX(), pos.getY(), pos.getZ(), pos.getX()+1.0, (float)(pos.getY()+0.875), pos.getZ()+1.0); |
|||
} |
|||
/* called from Entity.doBlockCollisions() */ |
/* called from Entity.doBlockCollisions() */ |
Revision as of 15:21, 28 March 2020
package net.minecraft.block;
public class BlockSoulSand extends Block
{
public BlockSoulSand()
{
super(Material.sand, MapColor.brownColor);
}
public AxisAlignedBB getCollisionBoundingBox(World worldIn, BlockPos pos, IBlockState state)
{
return new AxisAlignedBB(pos.getX(), pos.getY(), pos.getZ(), pos.getX()+1.0, (float)(pos.getY()+0.875), pos.getZ()+1.0);
}
/* called from Entity.doBlockCollisions() */
public void onEntityCollidedWithBlock(World worldIn, BlockPos pos, IBlockState state, Entity entityIn)
{
entityIn.motionX *= 0.4D;
entityIn.motionZ *= 0.4D;
}
}