use of net.minecraft.client.renderer.entity.RenderZombie in project Armourers-Workshop by RiskyKen.
the class SkinnableEntityZombieRenderer method renderEquipmentType.
private void renderEquipmentType(EntityLivingBase entity, RendererLivingEntity renderer, ISkinType skinType, IEntityEquipment equipmentData) {
float scale = 0.0625F;
if (renderer instanceof RenderZombie) {
RenderZombie rz = (RenderZombie) renderer;
boolean isZombieVillager = false;
isZombieVillager = rz.modelBipedMain instanceof ModelZombieVillager;
if (!equipmentData.haveEquipment(skinType, 0)) {
return;
}
ISkinPointer skinPointer = equipmentData.getSkinPointer(skinType, 0);
Skin skin = ClientSkinCache.INSTANCE.getSkin(skinPointer);
if (skin == null) {
return;
}
AbstractModelSkin model = SkinModelRenderer.INSTANCE.getModelForEquipmentType(skinType);
GL11.glPushMatrix();
if (isZombieVillager & skinType == SkinTypeRegistry.skinHead) {
GL11.glTranslated(0, -2.0F * scale, 0);
}
if (skinType == SkinTypeRegistry.skinLegs | skinType == SkinTypeRegistry.skinFeet) {
GL11.glTranslated(0, 0, 0.1F * scale);
}
// GL11.glEnable(GL11.GL_POLYGON_OFFSET_FILL);
// GL11.glPolygonOffset(-1F, -1F);
model.render(entity, rz.modelBipedMain, skin, false, skinPointer.getSkinDye(), null, false, 0, false);
// GL11.glDisable(GL11.GL_POLYGON_OFFSET_FILL);
GL11.glPopMatrix();
}
}
Aggregations