mojira.dev
MC-312256

Breaking an armor stand in one hit does not trigger sculk shriekers

Relates to MC-253023

In 26.4 Snapshot 2, new logic was added to SculkShriekerBlockEntity to handle getting a player associated to an entity in more cases using the entity’s last damage source (https://mcsrc.dev/2/diff/26.4-snapshot-1/26.4-snapshot-2/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity#R110 ). This also includes armor stands, but due to the lastDamageStamp field not being set by armor stands as part of their hurtServer method, LivingEntity#getLastDamageSource always returns null for them.

Steps to reproduce

  1. Place a sculk sensor & sculk shrieker next to eachother, and place an armor stand in range of them.

  2. Break the armor stand in one shot from a distance using a bow.

  3. Observe the sculk shrieker not being triggered, while it does trigger when repeating the steps with an item frame entity.

Expected result

The sculk shrieker is correctly triggered by the armor stand being broken, just as it is when it is placed down.

Actual result

The sculk shrieker is not triggered by the armor stand’s entity die game event.

Possible fix

Assign the lastDamageStamp field in the same spot where lastDamageSource is being set now (https://mcsrc.dev/2/diff/26.4-snapshot-1/26.4-snapshot-2/net/minecraft/world/entity/decoration/ArmorStand#R476 ).

Comments 0

No comments.

Warrior

bl4ckscor3

Confirmed

Platform HC

Normal

Game Events

26.4 Snapshot 2

26.4 Snapshot 4

Retrieved