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
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
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.