Skip to content

Add player head renderer#1

Merged
camdencove merged 4 commits intoimaginefun:mainfrom
weikengchen:main
Jan 20, 2026
Merged

Add player head renderer#1
camdencove merged 4 commits intoimaginefun:mainfrom
weikengchen:main

Conversation

@weikengchen
Copy link
Contributor

This PR uses mixins to change how SkullBlockRenderer works --- specifically, it would now detect if an image is the special IF format (with RGB (2,1,3) in a specific location), if so, it would extract the control bits and rescale the image to the proper size and render it.

To obtain the texture identifier from RenderType, it uses reflection to get RenderSetup$TextureBinding. The method name comp_5228 is an intermediary name for "location", which is the desired identifier.

Note that some images are given in RGB format and uses (2,1,3) to represent the transparent background. To correctly render them, the mod reformats those images, registers them with TextureManager, and uses them instead for rendering.

TODO: decide the directory structure, at this moment the mixins is directly in net.imaginefun.mixins (without a client subbranch).

@weikengchen weikengchen changed the title Add player head rendered Add player head renderer Jan 20, 2026
Copy link
Member

@camdencove camdencove left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks so much for submitting this!

@camdencove camdencove merged commit fbd6797 into imaginefun:main Jan 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants