mojira.dev
MC-254614

Shulkers at Y levels that are a multiple of 16 don't activate pressure plates or tripwire below them

Steps to Reproduce:

Spawn shulker at a Y level that is a multiple of 16 on the underside of a block
Place pressure plate one block below the shulker
Get the shulker to open (switch to survival)

Observed Results:
Pressure plate will fail to activate when the shulker opens.

Expected Results:
Pressure plate should activate when the shulker opens.

Notes:
I have tested at every Y level in 1.19 and for completeness the Y levels at which a shulker do no activate a pressure plate below them are; 304, 288, 272, 256, 240, 224, 208, 192, 176, 160, 144, 128, 112, 96, 80, 64, 48, 32, 16, 0, -16, -32, -48.

I have run some smaller scale tests that show 1.18.2 does not exhibit this behavior while 1.19.1_rc3 does.

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

Linked issues

Attachments

Comments 6

Code analysis:

The method EntitySectionStorage.forEachAccessibleNonEmptySection (mojmap) / SectionedEntityCache.forEachInBox (yarn mappings) looks for nearby entities by iterating through all sub-chunks considered "in range" of the pressure plate. In 1.18.2 this included sub-chunks within 2 blocks below the pressure plate and 2 blocks above the it. In 1.19 this has changed to 4 blocks below and 0 blocks above.

Presumably this was deemed ok since most mobs' position is always at the bottom of their hitbox. It's impossible for them to intersect a pressure plate if they're in a subchunk above it. Shulkers are a unique exception as their hitbox can extend below their position.

Same issue with string. Assuming its the same cause.

[media][media]

The issue with tripwire is tracked at MC-41631.

While I appreciate the similarity, given that MC-41631 effects versions prior to 1.19 and the code review by Daniel indicates this issue is linked to a change made in 1.19 code I am not sure they are actually related. This is further supported by the fact I can not reproduce this issue in 1.16.5 or 1.17 either. The attached world (

[media]

) exhibits the issue only when loaded in versions >=1.19.

Also confirmed this is still an issue in 1.19.2.

I can confirm the same problem in version 1.19.2 

Shulker at Y level 96, will not operate pressure plate on level 95 when open

Behavior of string has changed in 1.21.2. Now at levels that are a multiple of 16 string activates repetadly.  At levels that are a multiple of 16 preesure plates still do not activate.  

[media]

theDonkers

(Unassigned)

Confirmed

Platform

Normal

Collision, Entities, Redstone

1.19, 1.19.1 Release Candidate 3, 1.19.1, 1.19.2, 1.19.3 Pre-release 2, ..., 1.21, 1.21.1, 1.21.2, 1.21.3, 1.21.4

Retrieved