mojira.dev
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:

[media]

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

Linked issues

Attachments

Comments 7

Isn't that MC-1133, or is the model still centered on the cobweb?

@Galaxy_2Alex It works when the player block position is even over the cobweb, as can be done with anvils instead of wall block for alignment. (Just takes the values it finds last in collision)

I can confirm for 1.16.3

Can confirm in 1.19.

We're resolving and linking this ticket forward as a duplicate of MC-262496, as that ticket contains more detailed information and/or has already been triaged by Mojang.

Kyle Weber

(Unassigned)

Community Consensus

Gameplay

Low

Entities

1.16.3, 1.16.4 Pre-release 2, 1.16.4, 20w45a, 20w46a, ..., 21w08b, 21w11a, 21w15a, 1.18.1, 1.19

Retrieved