Conversation
Added code for 64x64 classic and slim skins. Also added the remaining default skins.
Corrected some code in DLCSkinFile.cpp for getting the DLC skin offsets was getting too many parameters that don't exist.
|
will test when you're ready, just mark as ready for review when you want me to test |
Fixed cape not rendering properly for 64x64 skin due to the renderer trying to using a 64x64 texture instead a of a 64x32 texture for the cape.
|
@sylvessa I fixed the cape not rendering properly with 64x64 skins. I want to implement skin offsets, used in the Mario skin pack, before marking this as ready for review. |
|
ok! take ur time 👍 |
|
Hey, I found an issue. If a player has a 64x64 slim skin, it's still treated as a 64x32 skin by other clients in multiplayer. The opposite happens with 64x64 classic skins though. |
|
@ZomkaDEV I have looked into the issue you have reported, but cannot recreate the issue you have. |
|
@ZomkaDEV send me your PCK to test because I also have my own custom PCK, but I find no problems with mine. |
Here you go. Perhaps the issue is with how I made my pck... |
One issue is with your pck, it incorrectly has the 64x64 Classic flag on the Jeb skin while the texture is 64x32. |
Oh, well, I didn't know that. I removed the ANIM flag and the jeb (64x32) skin is now rendering properly on both sides. Still experiencing issues with 64x64 skins though... |
|
Okay, I've done some testing. I was able to find that if both of the clients have the PCK file with the 64x64 skin, it is rendered correctly. If they don't, it is treated as a 64x32 skin. |
|
Aha, I figured out why! If the skin has no extra geometry, only the texture is being sent without all the other metadata like the ANIM value :) I fixed it in my fork, feel free to implement the same change. |
Added code to DLCSkinFile.cpp to store skin box scale value. Added code to HumanoidModel.cpp and HumanoidModel.h to handle skin boxes added to the armor layer of skin. Added another float value to SkinBox.h
Added code to hide skin boxes when wearing a helmet if bit for said functionality is present.
|
Is there anything major holding this back from merging? |
|
@codeHusky I want to implement the full functionality of DLC skins before marking this as ready. I'm working on the last feature I want to add of skin offsets used in the Toy Story skin pack and Mario skin pack. In a separate branch, I have added code to store the DLC skins' offsets, the code for the offsets modifies a significant amount of files which could be considered major. |
commit b40530f Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:59:46 2026 -0700 Implemented skin offsets in UI Added code to render skin offsets in the skin select UI. commit a8384d9 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 19:38:08 2026 -0700 Partially implemented offsets Added code that visually shifts the player's model parts, but only in game not in the skin select UI. commit 875100c Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Wed Apr 15 16:48:03 2026 -0700 Minor change Simplified redundant conditions in HumanoidModel.cpp commit 96f683d Merge: db685a7 24c74aa Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 16:37:30 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit db685a7 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 14 15:35:38 2026 -0700 Fixed skin offset data Fixed skin offsets so they now return the actual data instead of the defaults, added a few minor tweaks, and added code in PlayerRenderer.cpp to access offsets (Can read the offsets but can not apply them). commit aa769d5 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Sat Apr 11 19:36:52 2026 -0700 Fixed crashes Fixed code for offsets preventing crashes. The amount of offsets is correctly obtain, but lacks the actual data. commit f18ac12 Merge: 8e76763 fd2fd65 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 10 16:06:57 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit 8e76763 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 16:50:43 2026 -0700 Made more changes Made more changes in files to support skin offsets. The game still crashes when trying to load skins. commit 1a8f353 Merge: a1d9ae5 bb5fa50 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Tue Apr 7 13:12:39 2026 -0700 Merge branch 'feat/64x64-skins' into feat/skin-offsets commit a1d9ae5 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Fri Apr 3 21:50:42 2026 -0700 Added small additions Added more code referencing skin offsets. Still doesn't work correctly. commit d28a751 Merge: 3888de7 8bf0343 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:09:08 2026 -0700 Merge branch 'smartcmd:main' into feat/skin-offsets commit 3888de7 Author: Langtanium <94726057+Langtanium@users.noreply.github.com> Date: Thu Apr 2 17:07:48 2026 -0700 Added code for skin offsets Added code to the file which have the functionality to get skin boxes and duplicated the functionality for skin offsets. The code causes the game to crash when switching to third person. The error occurs with the skin offsets returning as an empty class object.










Description
Adds code to support DLC 64x64 classic and slim skins. Also adds the remaining default skins.
https://www.youtube.com/watch?v=lX_AaVbohZE
Changes
Previous Behavior
Skins and skin packs that were or had 64x64 dimension textures would not render properly or cause the game to crash. Also skin boxes would not be mirrored if the skin box had the mirror bit flag was set to true, were not scaled proper if the skin box had a scale value present, and wouldn't be hidden when wearing a helmet is the "hide when helmet is worn" bit flag was set to true.
Root Cause
Lack of 64x64 DLC skin support.
New Behavior
Skins and skin packs that are or have 64x64 dimension textures will render properly and mostly won't cause the game to crash. Skin boxes are properly mirrored when the mirror bit flag is present. Skin boxes with a scale value present will now be scaled properly Skin boxes with the "hide when helmet is worn" bit flag will not be rendered while wearing a helmet. Skin boxes attached to the second layer or armor layer of skin no longer cause the game to crash. Added code to handle DLC skin offset.
Fix Implementation
References to the added default skins texture were added to the files: Textures.cpp, Textures.h, Definitions.h, UIScene_SkinSelectMenu.cpp, and Player.cpp. In SkinBox.h more enums and floats were added. In ModelPart.cpp and ModelPart.h a boolean for that stores a bit flag, responsible for hiding a skin box when a helmet is worn, was added. In HumanoidModel.cpp and HumanoidModel.h code was added to handle whether the skin is 64x32 or 64x64, a Boolean was added to determine if it is slim or classic, and code was added to handle the skin box mirror bit flag and scale of skin box if attached to the second layer (jacket, sleeve0, sleeve1, pants0, pants1). In TextureAndGeometryPacket.cpp added code to handle the extra skin boxs' floats. A check was added to UIControl_PlayerSkinPreview.cpp and XUI_Ctrl_MinecraftSkinPreview.cpp to make the Alex skins use the 64x64 slim model, make the Developer Steve skin use the 64x64 classic model and any DLC skin use it declare model variant. A classic and slim model options were added to EntityRenderer.cpp and EntityRenderer.h, which will be empty if a mob is spawned instead of a player. PlayerRenderer.cpp and PlayerRenderer.h contain similar functionality as UIControl_PlayerSkinPreview.cpp, but for the first-person hand and similar features and uses the DLC skin files bit mask to determine whether to use the default model or the 64x64 variants. LivingEntityRenderer.cpp contains new functionality for rendering a player model in a third-person or second-person game and include the same functionality of using the DLC skin bit mask to determine the model type. The functionality works as follows: PlayerRenderer.cpp passes a parameter to LivingEntityRenderer.cpp which creates and renders the regular, classic and slim models, which are saved in the EntityRenderer.cpp and EntityRenderer.h scripts, these models are also used in the skin menu display script (UIControl_PlayerSkinPreview.cpp). Code was added to Console_App.cpp to make DLC skin boxes render on the 64x64 classic and slim models. Changed code in ClientConnection.cpp and PlayerConnection.cpp to always send DLC metadata.
An extra enum was added to DLCManager.cpp and DLCManager.h for DLC skin offsets. SkinOffset.h was created to store the DLC skin offset data in a class, like SkinBox.h, which includes body part, direction, and amount to move the part. Code was added to DLCSkinFile.cpp and DLCSkinFile.h to store the extra data values of skin boxes and store DLC skin offset data in a vector of SKIN_OFFSETs.
AI Use Disclosure
No AI was used in the writing of this code.
Some code was taken from ItzSonicFaner's pull request (#1183), but has more development.
Thanks to @ZomkaDEV for implementing code to fix DLC skin metadata not being sent in multiplayer.
Related Issues
Issues