Class ArmorFeatureRendererMixin<T extends net.minecraft.entity.LivingEntity,M extends net.minecraft.client.render.entity.model.BipedEntityModel<T>,A extends net.minecraft.client.render.entity.model.BipedEntityModel<T>>

java.lang.Object
net.minecraft.client.render.entity.feature.FeatureRenderer<T,M>
dev.jaxydog.astral.mixin.client.ArmorFeatureRendererMixin<T,M,A>

@Environment(CLIENT) public abstract class ArmorFeatureRendererMixin<T extends net.minecraft.entity.LivingEntity,M extends net.minecraft.client.render.entity.model.BipedEntityModel<T>,A extends net.minecraft.client.render.entity.model.BipedEntityModel<T>> extends net.minecraft.client.render.entity.feature.FeatureRenderer<T,M>
Implements multiple texture layers and coloring for custom armor items.
Since:
1.0.0
  • Constructor Summary

    Constructors
    Constructor
    Description
    ArmorFeatureRendererMixin(net.minecraft.client.render.entity.feature.FeatureRendererContext<T,M> context)
    Creates a new instance of this mixin.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected abstract void
    renderArmorParts(net.minecraft.client.util.math.MatrixStack matrices, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, int light, net.minecraft.item.ArmorItem item, A model, boolean secondTextureLayer, float red, float green, float blue, @Nullable String overlay)
    Renders each part of a piece of armor.
    protected abstract void
    renderGlint(net.minecraft.client.util.math.MatrixStack matrices, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, int light, A model)
    Renders the armor's glint.
    protected abstract void
    renderTrim(net.minecraft.item.ArmorMaterial material, net.minecraft.client.util.math.MatrixStack matrices, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, int light, net.minecraft.item.trim.ArmorTrim trim, A model, boolean leggings)
    Renders trim over a piece of armor.
    protected abstract void
    setVisible(A bipedModel, net.minecraft.entity.EquipmentSlot slot)
    Sets a given model to be visible.
    protected abstract boolean
    usesInnerModel(net.minecraft.entity.EquipmentSlot slot)
    Returns whether the armor in the given slot should use an inner texture model.

    Methods inherited from class net.minecraft.client.render.entity.feature.FeatureRenderer

    getContextModel, getTexture, render, render, renderModel

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ArmorFeatureRendererMixin

      public ArmorFeatureRendererMixin(net.minecraft.client.render.entity.feature.FeatureRendererContext<T,M> context)
      Creates a new instance of this mixin.
      Parameters:
      context - The rendering context.
      Since:
      1.0.0
  • Method Details

    • usesInnerModel

      protected abstract boolean usesInnerModel(net.minecraft.entity.EquipmentSlot slot)
      Returns whether the armor in the given slot should use an inner texture model.
      Parameters:
      slot - The armor slot.
      Returns:
      Whether the armor in the given slot should use an inner texture model.
      Since:
      1.0.0
    • renderArmorParts

      protected abstract void renderArmorParts(net.minecraft.client.util.math.MatrixStack matrices, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, int light, net.minecraft.item.ArmorItem item, A model, boolean secondTextureLayer, float red, float green, float blue, @Nullable @Nullable String overlay)
      Renders each part of a piece of armor.
      Parameters:
      matrices - The rendering matrices.
      vertexConsumers - The vertex consumers.
      light - The light level.
      item - The item.
      model - The armor model.
      secondTextureLayer - Whether this uses an inner layer.
      red - The red percentage.
      green - The green percentage.
      blue - The blue percentage.
      overlay - The overlay layer name.
      Since:
      1.0.0
    • renderTrim

      protected abstract void renderTrim(net.minecraft.item.ArmorMaterial material, net.minecraft.client.util.math.MatrixStack matrices, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, int light, net.minecraft.item.trim.ArmorTrim trim, A model, boolean leggings)
      Renders trim over a piece of armor.
      Parameters:
      material - The armor material.
      matrices - The rendering matrices.
      vertexConsumers - The vertex consumers.
      light - The light level.
      trim - The trim instance.
      model - The armor model.
      leggings - Whether this uses an inner layer.
      Since:
      1.6.0
    • renderGlint

      protected abstract void renderGlint(net.minecraft.client.util.math.MatrixStack matrices, net.minecraft.client.render.VertexConsumerProvider vertexConsumers, int light, A model)
      Renders the armor's glint.
      Parameters:
      matrices - The rendering matrices.
      vertexConsumers - The vertex consumers.
      light - The light level.
      model - The armor model.
      Since:
      1.0.0
    • setVisible

      protected abstract void setVisible(A bipedModel, net.minecraft.entity.EquipmentSlot slot)
      Sets a given model to be visible.
      Parameters:
      bipedModel - The model.
      slot - The equipment slot.
      Since:
      1.0.0