Daniel Jansson
- Volbla
- JIRAUSER704397
- Europe/Stockholm
- Yes
- No
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 Daniel Jansson can be found in this comment.

This bug still remains in 1.17.1 as well as 21e44a. The inconsistency is that when you input only one dragon's breath the bottle gets completely consumed, but when multiple dragon's breaths are in the ingredient slot a leftover bottle get spat out.
The problem is that the brewing stand's code decrements the ingredient before checking its recipe remainder. A single item becomes zero items after brewing is finished, and an empty stack has no remainder.
The code for preserving the bottles is already present in the game. There's just a mistake in its implementation. Furnaces handle the remainder correctly, although it doesn't try to spit it out since lava buckets can't stack anyway.
>> A shulker that is group aggravated and its target dies by other means, does not group aggravate against a different target
Why would you not want this to change? It doesn't make sense to reject new targets when the old target doesn't exist anymore. Any mob that "doesn't get the kill" would suddenly stop helping against new threats. Mobs are abandoning the group because the group succeeds. I don't see how that could possibly be intended behaviour.
Still the case in 1.18.1
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.
Code analysis:
Endermen are immune to damage of the type IndirectEntityDamageSource, with an exception made for splash water bottles. This didn't use to include explosions, but now any explosion with a living owner counts as an IndirectEntityDamageSource. This is defined in minecraft.world.damagesource.DamageSource.explosion and will include wither skull explosions (as long as they were fired by a Wither), TNT lit by a player or other mob, and creeper explosions.