mojira.dev
MC-263080

The name tags of wardens are partly inside their models

The Bug:

The name tags of wardens are partly inside their models.

Steps to Reproduce:

  1. Summon a warden with a custom name by using the command provided below.

    /summon minecraft:warden ~2 ~ ~ {NoAI:1b,Silent:1b,Rotation:[90f,0f],CustomNameVisible:1b,CustomName:"{\"text\":\"Very Long Warden Name\"}"}
  2. Look at the positioning of the warden's name tag.

  3. Take note as to whether or not the name tags of wardens are partly inside their models.

Observed Behavior:

The name tags are partly inside the said entity model.

Expected Behavior:

The name tags would be above the said entity model.

Code Analysis:

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

Linked issues

Attachments

Comments 1

Fix:

No code analysis needed, a simple fix is to override the super method by using it's current name tag offset and then add 0.3F to the height. Then it'll correctly position the Warden's Nametag.

net.minecraft.world.entity.monster.warden.Warden.java // Updated

public class Warden extends Monster implements VibrationSystem {
    public float getNameTagOffsetY() {
        return super.getNameTagOffsetY() + 0.3F;
    }
}
[media]

Avoma

(Unassigned)

Confirmed

Platform

Low

Rendering

warden

1.19.4, 1.20 Pre-release 7, 1.20 Release Candidate 1, 1.20, 1.20.1, ..., 1.21, 24w36a, 1.21.4, 1.21.5, 25w21a

Retrieved