Player heads render incorrectly
kumquat-ir opened this issue ยท 2 comments
ended up writing a patch to fix this, in a separate mod since i have no idea how to work with this codebase, so here it is, for reference
there's already an instance of a ModelSkeletonHead
with correct texture dimensions (at least in 1.7, since the zombie texture is 64x64), so use that instead of the 64x32 one
@Patch.Class("net.minecraft.client.renderer.tileentity.TileEntitySkullRenderer")
public class TileEntitySkullRendererTransformer extends MiniTransformer {
@Patch.Method("func_152674_a(FFFIFILcom/mojang/authlib/GameProfile;)V")
public void patchRender(PatchContext ctx) {
ctx.jumpToStart();
ctx.search(ASTORE(9)).jumpAfter(); // first line of player head branch
ctx.add( // set skull renderer to the version with correct texture coords for 64x64 textures
ALOAD(0),
GETFIELD("net/minecraft/client/renderer/tileentity/TileEntitySkullRenderer", "field_147538_h", "Lnet/minecraft/client/model/ModelSkeletonHead;"),
ASTORE(8)
);
}
}