MCPcopy Create free account
hub / github.com/DGVPSH/SlackOpen / onFallenUpon

Method onFallenUpon

src/main/java/net/minecraft/block/BlockSlime.java:30–40  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

isSneakingMethod · 0.45
fallMethod · 0.45

Tested by

no test coverage detected