mojira.dev
MC-16948

Mob Spawners with ActiveEffects (Potion Effects on Mobs) crash the game

Mob spawners which worked in previous versions now crash the game when loaded. The crash is only caused if the ActiveEffects tag is present in a mob's SpawnData. This tag applys status effects to mobs, and the recent changes with the Attributes system have broken the loading of ActiveEffects.

Steps to Reproduce:

  1. Import the below schematic into a world

  2. Load that world in 13w22a

  3. Observe that the game crashes, producing the below crash report.

  4. Observe that on earlier versions, such as 1.5.2, the game does not crash.

Note that the NBT is formatted exactly as it should be - even the code does not suggest that anything is malformatted. Attributes and ActiveEffects are both meant to be optional, as the code will explicitly not attempt to read them if it cannot find them.

This may be related to MC-16290, as I have a feeling it's happening thanks to Attributes. However, the code causing the crash is the part that loads ActiveEffects for a mob, and the crash is a NullPointerException with an entirely different cause than MC-16290's UnsupportedOperationException.

Linked issues

Attachments

Comments 2

Duplicate of MC-16191.

This is not a duplicate of that report.

You have an effect ID on a mob that doesn't exist in the game.

The spawners work perfectly fine in Vanilla Minecraft for versions prior to this. This bug occurs for any Effect ID.

WolfieMario

(Unassigned)

Unconfirmed

Snapshot 13w22a

Retrieved