Mojira Archive
MC-154239

NPE server crash when painting entities spawned with mob spawn eggs are saved

The bug

NPE crash occurs when a save is called on an EntityHanging and the direction (EnumDirection) is null.

To reproduce

  1. Get a painting mob spawn egg:
    /give @p minecraft:pig_spawn_egg{EntityTag:{id:"minecraft:painting"}} 1
  2. Place egg in dispenser
  3. Dispensing will cause the NPE server crash

Crash report

Description: Saving entity NBT

java.lang.NullPointerException: Saving entity NBT
	at ate.b(SourceFile:196)
	at ati.b(SourceFile:71)
	at aii.e(SourceFile:1427)
	at aim.a(SourceFile:366)
	at aim.b(SourceFile:337)
	at aim.a(SourceFile:295)
	at aim.a(SourceFile:286)
	at fv$20.a(SourceFile:179)
	at fu.dispense(SourceFile:15)
	at bnw.a(SourceFile:92)
	at bnw.b(SourceFile:116)
	at bvk.a(SourceFile:262)
	at vg.b(SourceFile:562)
	at bhv.a(SourceFile:87)
	at vg.a(SourceFile:314)
	at net.minecraft.server.MinecraftServer.b(SourceFile:827)
	at ug.b(SourceFile:343)
	at net.minecraft.server.MinecraftServer.a(SourceFile:764)
	at net.minecraft.server.MinecraftServer.run(SourceFile:632)
	at java.lang.Thread.run(Thread.java:748)

Fixed

user-c60ef

Maria Lemón

2019-06-09, 06:18 PM

2019-06-13, 04:12 PM

2019-06-13, 04:12 PM

1

1

Confirmed

Important

Crash

Minecraft 1.14.2, Minecraft 1.14.3 Pre-Release 2

Minecraft 1.14.3 Pre-Release 3