Mojira Archive
MC-27485

Painting / Item frame spawners crash the game, regardless of data provided

Please don't close this bug as a duplicate of an unrelated report just because it's a spawner crash bug. Not all spawner crashes are caused by invalid EntityIDs - this one has a unique cause unrelated to that.

If a spawner has an EntityID of "Painting", regardless of the provided SpawnData/SpawnPotentials, it will crash the game. This is due to an NBT loading issue, where the game recognizes "Painting" as a valid ID, but attempts to create one with a null world (spawners do this for the entity spinning in the spawner cage).

Unlike the majority of entities, paintings will crash when loading their NBT if their world is null, and there is no workaround to this (not even having an entity ride the painting will fix it).

Steps to Reproduce:

  1. Import the attached schematic into your world.
  2. Observe that you immediately crash when approaching the chunk containing it.
    MC-81578 / 1.8.7
    java.lang.NullPointerException: Saving entity NBT
    	at un.b(SourceFile:187)
    	at uo.b(SourceFile:168)
    	at pk.e(SourceFile:1180)
    	at pk.d(SourceFile:1150)
    	at add.a(SourceFile:129)
    	at add.a(SourceFile:265)
    	at bhh.a(SourceFile:19)
    	at bhh.a(SourceFile:14)
    	at bhh.a(SourceFile:9)
    	at bhc.a(SourceFile:114)
    	at bhc.a(SourceFile:102)
    	at bfr.a(SourceFile:615)