mojira.dev
MC-269145

Wool item entities created when shearing a sheep stutter while flying

When shearing a sheep, the wool items created will stutter while flying. This is not the case when shearing mooshrooms or performing other actions which create item entities.

The specific problem is that in net.minecraft.world.entity.animal.Sheep#shear, both the client and server generate random numbers for the velocities of the spawned items. This can be compared with net.minecraft.world.entity.animal.MushroomCow#shear and net.minecraft.world.entity.monster.Bogged#spawnShearedMushrooms, neither of which use locally generated random numbers on either side.

Linked issues

Attachments

Comments 6

I can replicate this problem in version 1.20.4 as well.

This also seems to affect 1.20.5 pre-release. I also noticed that it depends on the color, sometimes it may not stutter, and sometimes it does.

Seems fixed in 24w44a.

Although I can confirm the issue seems to be gone in 24w44a, there didn't appear to be any changes to the sheep code in that version, so the code analysis ostensibly still holds. I wonder if anyone has any insight as to why the issue no longer manifests itself?

It's worth noting that this is my first attempt at code analysis so it may be that there's something I didn't understand- if so I'd appreciate if someone would clarify things

clamlol

(Unassigned)

Community Consensus

Platform

Low

Items, Rendering

networking

1.20.4, 24w10a, 1.20.5 Release Candidate 2, 1.20.6, 1.21, 1.21.1, 24w33a, 24w34a, 24w38a

24w44a

Retrieved