Block's chance to react to a living entity falling on it. @param fallDistance The distance the entity has fallen before landing
(World worldIn, BlockPos pos, Entity entityIn, float fallDistance)
| 28 | * @param fallDistance The distance the entity has fallen before landing |
| 29 | */ |
| 30 | public void onFallenUpon(World worldIn, BlockPos pos, Entity entityIn, float fallDistance) |
| 31 | { |
| 32 | if (entityIn.isSneaking()) |
| 33 | { |
| 34 | super.onFallenUpon(worldIn, pos, entityIn, fallDistance); |
| 35 | } |
| 36 | else |
| 37 | { |
| 38 | entityIn.fall(fallDistance, 0.0F); |
| 39 | } |
| 40 | } |
| 41 | |
| 42 | /** |
| 43 | * Called when an Entity lands on this Block. This method *must* update motionY because the entity will not do that |
nothing calls this directly
no test coverage detected