use of de.sanandrew.mods.sanlib.lib.ColorObj in project ClaySoldiersMod by SanAndreasP.
the class LayerLeatherArmor method doRenderLayer.
@Override
public void doRenderLayer(EntityCreature creature, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, float scale) {
if (!(creature instanceof ISoldier)) {
return;
}
ISoldier soldier = (ISoldier) creature;
if (soldier.hasUpgrade(Upgrades.MC_LEATHER, EnumUpgradeType.MISC)) {
this.renderModel(this.modelLeatherArmor, scale);
} else if (soldier.hasUpgrade(Upgrades.MC_RABBITHIDE, EnumUpgradeType.MISC)) {
this.renderModel(this.modelRabbitHide, scale);
}
ISoldierUpgradeInst woolInst = soldier.getUpgradeInstance(Upgrades.EM_WOOL, EnumUpgradeType.ENHANCEMENT);
if (woolInst != null) {
ColorObj cObj = new ColorObj(EnumDyeColor.byMetadata(woolInst.getNbtData().getInteger("color")).getColorValue());
GlStateManager.color(cObj.fRed(), cObj.fGreen(), cObj.fBlue());
this.renderModel(this.modelPadding, scale);
GlStateManager.color(1.0F, 1.0F, 1.0F);
}
}
Aggregations