mojira.dev
MC-310747

Reading NBT from dying mannequins with custom enchantments with `tick` effects logs warnings

Summary
When a Custom Enchantment with a minecraft:tick effect executes a function on a Mannequin wearing enchanted armor, executing a command that reads the entity's NBT while the Mannequin is dying causes repeated server warnings.

The enchantment continues to function correctly, and gameplay is unaffected. The only issue is repeated warning messages in the server log.

Steps

  1. Create a Custom Enchantment with a minecraft:tick effect that runs a function.

  2. Apply the enchantment to a piece of armor.

  3. Equip the armor on a Mannequin.

  4. In the function, execute a command that reads the entity's NBT, for example:

    • data get entity @s

    • execute if data entity @s {Health:0f}

    • execute if predicate <namespace:predicate> (where the predicate reads entity NBT)

  5. Kill the Mannequin.

  6. Observe the server log while the Mannequin is in its dying animation.

Expected Result

The function should continue to execute normally while the Mannequin is dying, and reading the entity's NBT should not produce any serialization warnings.

Actual Result

During the dying animation, the server repeatedly logs:

[Server thread/WARN]: [net.minecraft.advancements.predicates.NbtPredicate] Serialization errors:
Mannequin['Mannequin'/19, l='ServerLevel[My World]', x=-504.52, y=-63.00, z=-460.30]: Failed to encode value 'DYING' to field 'pose': Invalid pose: dying

Additional Information

  • The issue does not occur if the function only performs scoreboard operations or entity selector checks (for example, if entity @s[tag=...]).

  • The warning appears only when the function executes a command that reads the entity's NBT, such as data get entity, execute if data, or execute if predicate.

  • The Custom Enchantment continues to function correctly while the Mannequin is dying.

  • No gameplay issues have been observed; only repeated warnings are written to the server log.

  • The issue is not that entity NBT can be read while the Mannequin is dying. That behavior appears to work correctly. The only issue is the repeated serialization warnings.

The warning originates from net.minecraft.advancements.predicates.NbtPredicate.


This may be related to MC-303558, which reports the same `Invalid pose: dying` warning during chunk serialization. However, this issue is reproducible without unloading chunks and appears to follow a different code path (net.minecraft.advancements.predicates.NbtPredicate rather than chunk serialization).

Linked issues

Attachments

Comments 1

I've attached a minimal datapack that reproduces the issue.

  1. /reload

  2. /function test:summon (Summons a Mannequin already wearing the enchanted armor.)

  3. Kill the Mannequin.

  4. Observe the server log.

[media]

Harusame

(Unassigned)

Confirmed

Platform HC

Normal

Data Packs, Entities

26.3 Snapshot 7

Retrieved