Added code for more DLC skin geometry

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
This commit is contained in:
Langtanium 2026-04-09 17:59:13 -07:00
parent bb5fa50615
commit fd2fd65908
9 changed files with 248 additions and 16 deletions

View file

@ -55,7 +55,7 @@ static unsigned int nametagColorForIndex(int index)
ResourceLocation PlayerRenderer::DEFAULT_LOCATION = ResourceLocation(TN_MOB_CHAR);
PlayerRenderer::PlayerRenderer() : LivingEntityRenderer( new HumanoidModel(0), 0.5f, true, true )
PlayerRenderer::PlayerRenderer() : LivingEntityRenderer( new HumanoidModel(0), 0.5f, true )
{
humanoidModel = static_cast<HumanoidModel *>(model);
humanoidModelClassic = static_cast<HumanoidModel *>(modelClassic);
@ -557,7 +557,7 @@ void PlayerRenderer::renderHand()
resModel->sleeve0->render(1 / 16.0f,true);
//Render custom skin boxes on viewmodel - Botch
vector<ModelPart*>* additionalModelParts = Minecraft::GetInstance()->player->GetAdditionalModelParts();
vector<ModelPart*>* additionalModelParts = player->GetAdditionalModelParts();
if (!additionalModelParts) return; //If there are no custom boxes, return. This fixes bug where the game will crash if you select a skin with no additional boxes.
std::unordered_set<ModelPart*> additionalModelPartSet(additionalModelParts->begin(), additionalModelParts->end());
vector<ModelPart*> armchildren = resModel->arm0->children;