mojira.dev
MC-211096

Entities in cobwebs clipping though pistons

The bug:

The entity is moved up ~0.05 blocks (established using carpets mod's tick freeze) and becomes stuck in the piston head. On versions 1.2.1-1.19.4, when the piston is retracted, the entity clips into the piston body and sinks through the cobweb.

Expected Result:

The piston to push the entity up a full block and the entity to sink through the cobweb.

Steps to Reproduce:

  1. Place piston, facing upwards

  2. Place rail on top of piston

  3. Place cobweb to the top and left of the piston

  4. Place minecraft on the rail and break the rail

  5. Nudge the minecart into the cobweb

  6. Ensure there are no block underneath the cobweb

  7. Power and de-power the piston (slowly)

See the video and photos for more information on how to setup this glitch.

Responses:

Now tested for all spawn egg mobs (in response to Marty Mcfly):

  • Doesn't affect Spiders / Cave spiders, as these mobs are not slowed by cobwebs.

  • Doesn't affect flying mobs (Bees, Bats, Ghasts, Phantoms) or mobs summoned with

    /summon minecraft:creeper ~ ~ ~ {NoGravity:1b}

Now tested for short duration pulses (in response to Gnamf Jojo):

  • Works for all pulses, down to 0-tick pulses (make sure there's no block under the cobweb)

Updates:

When a player is pushed within the cobweb, they are put into swim mode.

This glitch also affects Minecarts that are still on rails.

Code analysis

Code analysis by @unknown can be found in this comment.
 

Related issues

Attachments

Comments

migrated
[media][media][media][media]
migrated
[media][media][media][media]
migrated

Can confirm.
Affects 21w05b

migrated

Can confirm.
Affects 21w05b

migrated

This seems to affect all entities.

migrated

This seems to affect all entities.

migrated

Agree. Affects all entities. Can reproduce. Does not work if using an impules to power piston

migrated

Agree. Affects all entities. Can reproduce. Does not work if using an impules to power piston

Avoma

Can confirm in 21w13a.

haykam

Can confirm in Minecraft 1.19.4. It also affects powder snow (when moving horizontally) and sweet berry bushes.

Code analysis (Yarn mappings)

Cobwebs, powder snow, and sweet berry bushes use the Entity#slowMovement method as well to affect movement. This method sets a multiplier field which is used to multiply the movement distance when the Entity#move method is called. Typically, this allows a multiplier to be set for when the entity updates its position in the next tick.

However, additional movement can be applied from other sources, such as pistons and shulkers. In these cases, the movement multiplier affects the external source of movement rather than the entity's own movement.

To fix this issue, the Entity#move method should simply check the MovementType before applying the movement multiplier.

haykam

This behavior still exists in Minecraft snapshot 23w14a.

migrated

Can confirm in 24w45a.

This bug is related to this bug report too: MC-278182

It is crucial to fix this bug for proper, consistent behavior from item entities when moved by pistons

@unknown's bug solution would be valid, as explained here: MC-278255

Furthermore, powder snow can cause the same bug too (1.17+ as the block was introduced back then)

migrated

Can confirm in 24w45a.

This bug is related to this bug report too: MC-278182

It is crucial to fix this bug for proper, consistent behavior from item entities when moved by pistons

@unknown's bug solution would be valid, as explained here: MC-278255

Furthermore, powder snow can cause the same bug too (1.17+ as the block was introduced back then)

migrated

(Unassigned)

Confirmed

Collision, Entities

cobweb, entity, piston, piston-extension

1.16.4, 1.16.5, 21w05b, 21w13a, 1.19.4, 23w14a, 1.21.3, 24w45a

Retrieved