Mojira Archive
MC-202654

A living entity can go thru cobwebs faster if next to sweet berry bushes in an increased axis

The Bug:

When a living entity is falling next to a berry bush and a cobweb, the block that has the higher position in certain axes will be the one to change the velocity multiplier. This can cause an entity to fall quicker thru a cobweb than it normally should. The block that has the slower velocity multiplier should take priority rather than by position. Watch video for a better example than the setup below.

Steps:

1) Create a world.

2) Create the following setup:

3) Fall on the different sides to see how the velocity differs.

Code analysis:

Using Yarn mapping 1.16.3:

In the CobwebBlock, it used the entity.slowMovement method.

public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
    entity.slowMovement(state, new Vec3d(0.25, 0.05f, 0.25));
}

In the SweetBerryBushBlock, it uses the same thing.

public void onEntityCollision(BlockState state, World world, BlockPos pos, Entity entity) {
//removed code
    entity.slowMovement(state, new Vec3d(0.8f, 0.75, 0.8f));
//removed code
}

As they are both using the same call, the one that is called last will change the velocity. 

Video:

https://youtu.be/-2uqQVb_8aA

Duplicate

Kyle Weber

2020-10-23, 03:43 PM

2023-10-30, 07:26 PM

2023-10-30, 07:26 PM

21

11

Community Consensus

Low

Gameplay

Entities

1.16.3 - 1.191.16.3, 1.16.4 Pre-release 2, 1.16.4, 20w45a, 20w46a, 20w48a, 20w49a, 20w51a, 21w03a, 1.16.5, 21w05b, 21w06a, 21w08b, 21w11a, 21w15a, 1.18.1, 1.19

-