From c4346e481260e2e35b828dc78fd8e2366d68a53d Mon Sep 17 00:00:00 2001 From: Matthew Messinger Date: Sat, 21 May 2016 02:01:01 -0400 Subject: [PATCH] make playermodel entity show wears. Maybe release tomorrow. --- .../voxelmodpack/hdskins/gui/RenderPlayerModel.java | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java b/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java index bfc61d6e..e3e09e27 100644 --- a/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java +++ b/src/hdskins/java/com/voxelmodpack/hdskins/gui/RenderPlayerModel.java @@ -2,12 +2,15 @@ package com.voxelmodpack.hdskins.gui; import static net.minecraft.client.renderer.GlStateManager.*; +import java.util.Set; + import org.lwjgl.opengl.GL11; import net.minecraft.client.Minecraft; import net.minecraft.client.model.ModelPlayer; import net.minecraft.client.renderer.entity.RenderLivingBase; import net.minecraft.client.renderer.entity.RenderManager; +import net.minecraft.entity.player.EnumPlayerModelParts; import net.minecraft.util.ResourceLocation; public class RenderPlayerModel extends RenderLivingBase { @@ -49,6 +52,16 @@ public class RenderPlayerModel extends RenderLiving this.mainModel = FAT; } + ModelPlayer player = (ModelPlayer) this.getMainModel(); + + Set parts = Minecraft.getMinecraft().gameSettings.getModelParts(); + player.bipedHeadwear.isHidden = !parts.contains(EnumPlayerModelParts.HAT); + player.bipedBodyWear.isHidden = !parts.contains(EnumPlayerModelParts.JACKET); + player.bipedLeftLegwear.isHidden = !parts.contains(EnumPlayerModelParts.LEFT_PANTS_LEG); + player.bipedRightLegwear.isHidden = !parts.contains(EnumPlayerModelParts.RIGHT_PANTS_LEG); + player.bipedLeftArmwear.isHidden = !parts.contains(EnumPlayerModelParts.LEFT_SLEEVE); + player.bipedRightArmwear.isHidden = !parts.contains(EnumPlayerModelParts.RIGHT_SLEEVE); + GL11.glPushAttrib(GL11.GL_ALL_ATTRIB_BITS); super.doRender(par1Entity, par2, par4, par6, par8, par9); popAttrib();