mojira.dev
MC-90191

Armorstands, silverfish and endermites in boats spin rapidly

Expectation: Armor stand would just chill in the back.
Reality: https://www.youtube.com/watch?v=a617KVNG-LI

No, I did not have a teleport command running to rotate it or anything. Yes, this world was created in the version used.

Steps to reproduce are in the video, but also below

/summon Boat ~ ~ ~ {Passengers:[{id:"Skeleton"},{id:"ArmorStand"}]}

Armor Stands only start to spin once the boat is rotated. The more the boat is rotated from the south direction, the more it spins, plus the more you wait, the faster it spins. It seems to just rapidly switch from south to its correct rotation. Something about the armor stand's direction not correctly updating according to the boat's rotation.


Code analysis by @unknown can be found in this comment.

Linked issues

Comments 26

Confirmed for

  • 15w41b When you ride the boat with an ArmorStand as second passenger and then dismount, the boat spins.

[Mod] redstonehelper

Marcono1234: You're thinking of MC-90148.

@unknown: You mean MC-90148

No I was really talking about the fact that the boat (not only the paddles) spins

How did you get the armour stand in the boat?

16 more comments

@unknown made changes - 29/Feb/16 4:27 PM
Affects Version/s Minecraft 1.9

@unknown added a comment - 3 minutes ago
Confirmed for 1.9

Hm...

Confirmed for

  • 1.9.1-pre3

Please link to this comment in the description

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.

In general it looks like this is caused by wrong values for the fields net.minecraft.entity.EntityLivingBase.prevRenderYawOffset and net.minecraft.entity.EntityLivingBase.renderYawOffset. As I am not very familiar with how the rendering exactly works the following is only an assumption and observation of what happens when you change something. The changes mentioned might only fix the symptoms of the bug, but not the bug itself.

ArmorStands

If net.minecraft.entity.item.EntityArmorStand.updateDistance(float, float) does not update the field net.minecraft.entity.EntityLivingBase.prevRenderYawOffset anymore, the method net.minecraft.entity.EntityLivingBase.onUpdate() adds 360f to it and no rendering bug occurs.

Silverfish and Endermites

The methods net.minecraft.entity.monster.EntitySilverfish.onUpdate() (Silverfish) and net.minecraft.entity.monster.EntityEndermite.onUpdate() (Endermite) set a value for the field net.minecraft.entity.EntityLivingBase.renderYawOffset. Removing this code prevents the rendering bug from occurring.

Shulkers

Shulkers are still not completely fixed because they rotate slightly while rotating a boat.

Preventing the methods net.minecraft.entity.monster.EntityShulker.onUpdate() and net.minecraft.entity.monster.EntityShulker.onLivingUpdate() from setting values for the fields net.minecraft.entity.EntityLivingBase.renderYawOffset and net.minecraft.entity.EntityLivingBase.prevRenderYawOffset prevents this bug from happening.

Keep in mind that these changes are no fix suggestions

Affects 1.9.4.

Jens Bergensten

Thanks for the help Marcono1234, though I fixed it by making sure that the endermite/silverfish updates all rotations

Mike Dueck

Jens Bergensten

Confirmed

Minecraft 15w41b, Minecraft 15w43b, Minecraft 15w47a, Minecraft 16w03a, Minecraft 16w04a, ..., Minecraft 1.9, Minecraft 1.9.1 Pre-Release 1, Minecraft 1.9.1 Pre-Release 2, Minecraft 1.9.1 Pre-Release 3, Minecraft 1.9.4

Minecraft 16w04a, Minecraft 16w32a

Retrieved