[MC-117718] Breeding animals without LoveCause set cause crash Created: 19/May/17  Updated: 22/May/17  Resolved: 22/May/17

Status: Resolved
Project: Minecraft: Java Edition
Component/s: None
Affects Version/s: Minecraft 1.12 Pre-Release 5
Fix Version/s: Minecraft 1.12 Pre-Release 6

Type: Bug
Reporter: [Mod] Marcono1234 Assignee: [Mojang] Maria Lemón
Resolution: Fixed Votes: 3
Labels: advancement-trigger, animal, breeding, crash

Attachments: Text File crash-2017-05-19_18.57.20-server.txt    
Issue Links:
relates to MC-116616 "bred_animals" trigger doesn't work w... Resolved
relates to MC-117584 Converting zombie villager without Co... Resolved
Confirmation Status: Confirmed


The bug

The server crashes when animals which have no LoveCauseLeast and LoveCauseMost value set breed.

Description: Ticking entity

java.lang.NullPointerException: Ticking entity
	at amr.b(SourceFile:2627)
	at zt.do(SourceFile:162)
	at wt.i(SourceFile:86)
	at wt.e(SourceFile:63)
	at xd.a(SourceFile:129)
	at vo.cy(SourceFile:641)
	at vn.n(SourceFile:1887)
	at vo.n(SourceFile:501)
	at vb.n(SourceFile:144)
	at zt.n(SourceFile:43)
	at aae.n(SourceFile:120)
	at vn.B_(SourceFile:1742)
	at vo.B_(SourceFile:281)
	at amr.a(SourceFile:1514)
	at om.a(SourceFile:714)
	at amr.h(SourceFile:1499)
	at amr.k(SourceFile:1382)
	at om.k(SourceFile:547)
	at net.minecraft.server.MinecraftServer.D(SourceFile:634)
	at net.minecraft.server.MinecraftServer.C(SourceFile:562)
	at cgx.C(SourceFile:154)
	at net.minecraft.server.MinecraftServer.run(SourceFile:466)
	at java.lang.Thread.run(Unknown Source)

How to reproduce

Warning: Every time you re-enter the world the animals will try to breed again. It is therefore recommended to try reproducing this in a seperate world.

Summon two animals with only InLove set

/summon sheep ~ ~ ~ {InLove:1000}

Generated at Fri Feb 15 15:09:30 CST 2019 using Jira 7.11.2#711002-sha1:fdc329dee91471a641faabfe39b5ff8c0a5b3f66.