The bug
In 1.8.8 and maybe later animals which can breed showed hearts the whole time they were able to breed.
Now the hearts are only shown once.
The reason
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens is because the client never receives the InLove
value from the server. In 1.8.9 and earlier the method net.minecraft.entity.EntityAgeable.getGrowingAge()
(MCP 9.10) returned for the client the stored value whether or not the animal is a child (for 1.8 entry 12 of the data watcher, for 1.9 net.minecraft.entity.EntityAgeable.field_184751_bv
). In 1.9 it returns -1
if the animal is a child, 1
if it is not. This breaks some logic for the net.minecraft.entity.passive.EntityAnimal
class.
Besides that the client should receive the InLove
value because neither in 1.8.9 nor in the latest versions summoning an animal with InLove
greater than 0 shows particles.
/summon pig ~ ~ ~ {InLove:2147483647}
Note: The server should not run the particle spawning code of the method net.minecraft.entity.passive.EntityAnimal.onLivingUpdate()
.
Related issues
is duplicated by
relates to
Attachments
Comments


Issue still exists up to latest version, Minecraft 1.9.1-pre3.

I do not quiet understand the reason that was given by Marcono1234. It was working in 1.8 and prior versions, why does it only occur since the 1.9 snapshots? Clients are using an internal server since 1.3, so the issue should have appeared back then already, but it did not. So why now in 1.9?

You are right, I kind of messed up yesterday. The reason seems to be that the client does not receive the InLove
value anymore, because in 1.8 the client had the correct InLove
value, in 1.9 it does not. I will update the report in a moment.

Still not fixed in 16w15a.

Still present in 1.9.3-pre2.

Present in 1.9.4 & 16w21b
Also might want to add MC-88230 as a related ticket.
Still here up through 16w42a.

Exists in 16w43a

1.12 is affected

Still an issue in 1.13.

Reproduced in 1.13.2

Confirmed in 19w04b, 19w05a and 19w06a.

Confirmed for 19w14b. Really hoping this is fixed soon since a lot of related bugs were taken care of very recently.

Confirmed in 19w38b.

Confirmed in 19w45a.

Confirmed in 19w45b.

Confirmed in 19w46b.

Confirmed 1.15.2 FIX THIS BUG please

Still in 20w09a

Affects 1.16-rc1
Can confirm in 20w51a.
Can confirm in 21w03a.
Can confirm in 21w05a.

Affects 1.17 Pre-release 1

In 1.17

Can confirm in 1.17.1.

Can confirm for 1.18 Pre-1

In 22w05a, actually was quite annoying in experience of trying to breed a blue Axolotl

In 1.19 Pre-1

Can confirm for 1.19 Pre-2

Affects 1.19 Pre-3

In 1.19 Pre-4

In 1.19 Pre-5

Still in 1,19.2.

In 22w44a

Can confirm for 22w46a

Can confirm in the 1.20.2 release candidate.

Can confirm in 24w19b and release 1.20.6

Affects 1.21

This is easily fixed
Using Mojmaps 1.20.1
In the aiStep method the code calls the addParticles method but as pointed out by other users the inLove ticks aren't sent client side.
if (this.inLove > 0) {
--this.inLove;
if (this.inLove % 10 == 0) {
double d0 = this.random.nextGaussian() * 0.02D;
double d1 = this.random.nextGaussian() * 0.02D;
double d2 = this.random.nextGaussian() * 0.02D;
this.level().addParticle(ParticleTypes.HEART, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), d0, d1, d2);
}
}
This can be fixed by checking if the code is running server side and then send the particles to clients
if (this.inLove > 0) {
--this.inLove;
if (this.inLove % 10 == 0) {
double d0 = this.random.nextGaussian() * 0.02D;
double d1 = this.random.nextGaussian() * 0.02D;
double d2 = this.random.nextGaussian() * 0.02D;
//Note, I didn't use the speed calculated above
if (this.level instanceof ServerLevel serverLevel)
serverLevel.sendParticles(ParticleTypes.HEART, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 1, 0, 0.1f);
}
}

Still in 1.21.5 and 1.21.6 snapshots.