Search in sources :

Example 1 with IEquipmentModel

use of riskyken.armourersWorkshop.client.model.skin.IEquipmentModel in project Armourers-Workshop by RiskyKen.

the class SkinItemRenderHelper method renderSkinWithHelper.

public static void renderSkinWithHelper(Skin skin, ISkinPointer skinPointer, boolean showSkinPaint, boolean doLodLoading) {
    ISkinType skinType = skinPointer.getIdentifier().getSkinType();
    if (skinType == null) {
        skinType = skin.getSkinType();
    }
    IEquipmentModel targetModel = SkinModelRenderer.INSTANCE.getModelForEquipmentType(skinType);
    if (targetModel == null) {
        renderSkinWithoutHelper(skinPointer, doLodLoading);
        return;
    }
    targetModel.render(null, null, skin, showSkinPaint, skinPointer.getSkinDye(), null, true, 0, doLodLoading);
}
Also used : ISkinType(riskyken.armourersWorkshop.api.common.skin.type.ISkinType) IEquipmentModel(riskyken.armourersWorkshop.client.model.skin.IEquipmentModel)

Example 2 with IEquipmentModel

use of riskyken.armourersWorkshop.client.model.skin.IEquipmentModel in project Armourers-Workshop by RiskyKen.

the class SkinModelRenderer method renderEquipmentPart.

public boolean renderEquipmentPart(Entity entity, ModelBiped modelBiped, Skin data, ISkinDye skinDye, byte[] extraColours, double distance, boolean doLodLoading) {
    if (data == null) {
        return false;
    }
    IEquipmentModel model = getModelForEquipmentType(data.getSkinType());
    if (model == null) {
        return false;
    }
    GL11.glEnable(GL11.GL_CULL_FACE);
    GL11.glBlendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA);
    GL11.glEnable(GL11.GL_BLEND);
    model.render(entity, modelBiped, data, false, skinDye, extraColours, false, distance, doLodLoading);
    GL11.glDisable(GL11.GL_BLEND);
    GL11.glDisable(GL11.GL_CULL_FACE);
    return true;
}
Also used : IEquipmentModel(riskyken.armourersWorkshop.client.model.skin.IEquipmentModel)

Example 3 with IEquipmentModel

use of riskyken.armourersWorkshop.client.model.skin.IEquipmentModel in project Armourers-Workshop by RiskyKen.

the class SkinModelRenderer method renderEquipmentPartRotated.

private boolean renderEquipmentPartRotated(Entity entity, Skin data, float limb1, float limb2, float limb3, float headY, float headX) {
    if (data == null) {
        return false;
    }
    IEquipmentModel model = getModelForEquipmentType(data.getSkinType());
    if (model == null) {
        return false;
    }
    model.render(entity, data, limb1, limb2, limb3, headY, headX);
    return true;
}
Also used : IEquipmentModel(riskyken.armourersWorkshop.client.model.skin.IEquipmentModel)

Example 4 with IEquipmentModel

use of riskyken.armourersWorkshop.client.model.skin.IEquipmentModel in project Armourers-Workshop by RiskyKen.

the class ItemStackRenderHelper method renderSkinWithHelper.

public static void renderSkinWithHelper(Skin skin, ISkinPointer skinPointer, boolean showSkinPaint, boolean doLodLoading) {
    ISkinType skinType = skinPointer.getIdentifier().getSkinType();
    if (skinType == null) {
        skinType = skin.getSkinType();
    }
    IEquipmentModel targetModel = SkinModelRenderer.INSTANCE.getModelForEquipmentType(skinType);
    if (targetModel == null) {
        renderSkinWithoutHelper(skinPointer, doLodLoading);
        return;
    }
    targetModel.render(null, null, skin, showSkinPaint, skinPointer.getSkinDye(), null, true, 0, doLodLoading);
}
Also used : ISkinType(riskyken.armourersWorkshop.api.common.skin.type.ISkinType) IEquipmentModel(riskyken.armourersWorkshop.client.model.skin.IEquipmentModel)

Aggregations

IEquipmentModel (riskyken.armourersWorkshop.client.model.skin.IEquipmentModel)4 ISkinType (riskyken.armourersWorkshop.api.common.skin.type.ISkinType)2