mojira.dev
MC-271356

Unused pixels in fox_sleep.png and snow_fox_sleep.png

The textures for sleeping foxes contain pixels that go unused in-game. These sections are the two legs, which are not rendered at all when the entity has the sleeping model applied. Keeping these pixels in the texture incorrectly implies to resource pack creators that the legs should/could be retextured, when doing so will have no affect.

Unused Pixels

Highlighted in red:
Fox:

[media]

Snow Fox:

[media]

Fixes:

[media]

[media]

Code Analysis:

Here in the fox's model, you can see that the visibility of the fox's legs is set to false when the entity is sleeping, showing there is no need for the texture.

Package: net.minecraft.client.model / Class: FoxModel<T extends Fox> / Method: prepareMobModel()
. . .
      } else if (var1.isSleeping()) {
         this.body.zRot = -1.5707964F;
         this.body.setPos(0.0F, 21.0F, -6.0F);
         this.tail.xRot = -2.6179938F;
         if (this.young) {
            this.tail.xRot = -2.1816616F;
            this.body.setPos(0.0F, 21.0F, -2.0F);
         }
. . .
         this.rightHindLeg.visible = false;
         this.leftHindLeg.visible = false;
         this.rightFrontLeg.visible = false;
         this.leftFrontLeg.visible = false;
      }
. . .

Notes:

It is intentional that sleeping foxes do not render their legs per the resolution of MC-162360

Linked issues

Attachments

Comments 1

Can confirm:

[media]

[Mod] Jingy

(Unassigned)

Community Consensus

Textures and models

fox, snow_fox, texture, unused-pixels, uv-mapping

Minecraft 19w07a, 1.20.6, 24w19b, 24w20a

Retrieved