Search in sources :

Example 1 with RenderSkeleton

use of net.minecraft.client.renderer.entity.RenderSkeleton in project Armourers-Workshop by RiskyKen.

the class SkinnableEntitySkeletonRenderer method renderEquipmentType.

private void renderEquipmentType(EntityLivingBase entity, RendererLivingEntity renderer, ISkinType skinType, IEntityEquipment equipmentData) {
    float scale = 0.0625F;
    if (renderer instanceof RenderSkeleton) {
        RenderSkeleton rs = (RenderSkeleton) renderer;
        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();
        model.render(entity, rs.modelBipedMain, skin, false, skinPointer.getSkinDye(), null, false, 0, false);
        GL11.glPopMatrix();
    }
}
Also used : RenderSkeleton(net.minecraft.client.renderer.entity.RenderSkeleton) AbstractModelSkin(riskyken.armourersWorkshop.client.model.skin.AbstractModelSkin) Skin(riskyken.armourersWorkshop.common.skin.data.Skin) AbstractModelSkin(riskyken.armourersWorkshop.client.model.skin.AbstractModelSkin) ISkinPointer(riskyken.armourersWorkshop.api.common.skin.data.ISkinPointer)

Aggregations

RenderSkeleton (net.minecraft.client.renderer.entity.RenderSkeleton)1 ISkinPointer (riskyken.armourersWorkshop.api.common.skin.data.ISkinPointer)1 AbstractModelSkin (riskyken.armourersWorkshop.client.model.skin.AbstractModelSkin)1 Skin (riskyken.armourersWorkshop.common.skin.data.Skin)1