public abstract class ArmorLayer<T extends LivingEntity,M extends BipedModel<T>,A extends BipedModel<T>> extends LayerRenderer<T,M>
| Modifier and Type | Field and Description |
|---|---|
private static java.util.Map<java.lang.String,ResourceLocation> |
ARMOR_TEXTURE_RES_MAP |
protected A |
modelArmor |
protected A |
modelLeggings |
| Modifier | Constructor and Description |
|---|---|
protected |
ArmorLayer(IEntityRenderer<T,M> entityRendererIn,
A modelLeggingsIn,
A modelArmorIn) |
| Modifier and Type | Method and Description |
|---|---|
protected A |
getArmorModelHook(T entity,
ItemStack itemStack,
EquipmentSlotType slot,
A model)
Hook to allow item-sensitive armor model.
|
private ResourceLocation |
getArmorResource(ArmorItem armor,
boolean legSlotIn,
java.lang.String suffixOverlayIn)
Deprecated.
|
ResourceLocation |
getArmorResource(Entity entity,
ItemStack stack,
EquipmentSlotType slot,
java.lang.String type)
More generic ForgeHook version of the above function, it allows for Items to have more control over what texture they provide.
|
A |
getModelFromSlot(EquipmentSlotType slotIn) |
private boolean |
isLegSlot(EquipmentSlotType slotIn) |
void |
render(MatrixStack matrixStackIn,
IRenderTypeBuffer bufferIn,
int packedLightIn,
T entitylivingbaseIn,
float limbSwing,
float limbSwingAmount,
float partialTicks,
float ageInTicks,
float netHeadYaw,
float headPitch) |
private void |
renderArmor(MatrixStack matrixStackIn,
IRenderTypeBuffer bufferIn,
int packedLightIn,
boolean glintIn,
A modelIn,
float red,
float green,
float blue,
ResourceLocation armorResource) |
private void |
renderArmorPart(MatrixStack matrixStackIn,
IRenderTypeBuffer bufferIn,
T entityLivingBaseIn,
float limbSwing,
float limbSwingAmount,
float partialTicks,
float ageInTicks,
float netHeadYaw,
float headPitch,
EquipmentSlotType slotIn,
int packedLightIn) |
private void |
renderModel(MatrixStack matrixStackIn,
IRenderTypeBuffer bufferIn,
int packedLightIn,
ArmorItem armorItemIn,
boolean glintIn,
A modelIn,
boolean legSlotIn,
float red,
float green,
float blue,
java.lang.String overlayIn) |
protected abstract void |
setModelSlotVisible(A modelIn,
EquipmentSlotType slotIn) |
protected abstract void |
setModelVisible(A model) |
getEntityModel, getEntityTexture, renderCopyCutoutModel, renderCutoutModelprotected final A extends BipedModel<T> modelLeggings
protected final A extends BipedModel<T> modelArmor
private static final java.util.Map<java.lang.String,ResourceLocation> ARMOR_TEXTURE_RES_MAP
protected ArmorLayer(IEntityRenderer<T,M> entityRendererIn, A modelLeggingsIn, A modelArmorIn)
public void render(MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn, T entitylivingbaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch)
render in class LayerRenderer<T extends LivingEntity,M extends BipedModel<T>>private void renderArmorPart(MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, T entityLivingBaseIn, float limbSwing, float limbSwingAmount, float partialTicks, float ageInTicks, float netHeadYaw, float headPitch, EquipmentSlotType slotIn, int packedLightIn)
private void renderModel(MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn, ArmorItem armorItemIn, boolean glintIn, A modelIn, boolean legSlotIn, float red, float green, float blue, @Nullable java.lang.String overlayIn)
private void renderArmor(MatrixStack matrixStackIn, IRenderTypeBuffer bufferIn, int packedLightIn, boolean glintIn, A modelIn, float red, float green, float blue, ResourceLocation armorResource)
public A getModelFromSlot(EquipmentSlotType slotIn)
private boolean isLegSlot(EquipmentSlotType slotIn)
@Deprecated private ResourceLocation getArmorResource(ArmorItem armor, boolean legSlotIn, @Nullable java.lang.String suffixOverlayIn)
protected abstract void setModelSlotVisible(A modelIn, EquipmentSlotType slotIn)
protected abstract void setModelVisible(A model)
protected A getArmorModelHook(T entity, ItemStack itemStack, EquipmentSlotType slot, A model)
public ResourceLocation getArmorResource(Entity entity, ItemStack stack, EquipmentSlotType slot, @Nullable java.lang.String type)
entity - Entity wearing the armorstack - ItemStack for the armorslot - Slot ID that the item is intype - Subtype, can be null or "overlay"