use of mekanism.common.item.interfaces.ISpecialGear in project Mekanism by mekanism.
the class MekanismArmorLayer method renderArmorPart.
private void renderArmorPart(MatrixStack matrix, IRenderTypeBuffer renderer, T entity, EquipmentSlotType slot, int light, float partialTicks) {
ItemStack stack = entity.getItemBySlot(slot);
Item item = stack.getItem();
if (item instanceof ISpecialGear && item instanceof ArmorItem) {
ArmorItem armorItem = (ArmorItem) item;
if (armorItem.getSlot() == slot) {
CustomArmor model = ((ISpecialGear) item).getGearModel();
getParentModel().copyPropertiesTo((BipedModel<T>) model);
setPartVisibility((A) model, slot);
model.render(matrix, renderer, light, OverlayTexture.NO_OVERLAY, partialTicks, stack.hasFoil(), entity, stack);
}
}
}
Aggregations