Class ElytraLayer<T extends LivingEntity,M extends EntityModel<T>>
- java.lang.Object
-
- net.minecraft.client.renderer.entity.layers.LayerRenderer<T,M>
-
- net.minecraft.client.renderer.entity.layers.ElytraLayer<T,M>
-
- Direct Known Subclasses:
CustomElytraTest.CustomElytraLayer
public class ElytraLayer<T extends LivingEntity,M extends EntityModel<T>> extends LayerRenderer<T,M>
-
-
Field Summary
Fields Modifier and Type Field Description private ElytraModel<T>
elytraModel
private static ResourceLocation
WINGS_LOCATION
-
Constructor Summary
Constructors Constructor Description ElytraLayer(IEntityRenderer<T,M> p_i50942_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ResourceLocation
getElytraTexture(ItemStack stack, T entity)
Gets the texture to use with this ElytraLayer.void
render(MatrixStack p_225628_1_, IRenderTypeBuffer p_225628_2_, int p_225628_3_, T p_225628_4_, float p_225628_5_, float p_225628_6_, float p_225628_7_, float p_225628_8_, float p_225628_9_, float p_225628_10_)
boolean
shouldRender(ItemStack stack, T entity)
Determines if the ElytraLayer should render.-
Methods inherited from class net.minecraft.client.renderer.entity.layers.LayerRenderer
coloredCutoutModelCopyLayerRender, getParentModel, getTextureLocation, renderColoredCutoutModel
-
-
-
-
Field Detail
-
WINGS_LOCATION
private static final ResourceLocation WINGS_LOCATION
-
elytraModel
private final ElytraModel<T extends LivingEntity> elytraModel
-
-
Constructor Detail
-
ElytraLayer
public ElytraLayer(IEntityRenderer<T,M> p_i50942_1_)
-
-
Method Detail
-
render
public void render(MatrixStack p_225628_1_, IRenderTypeBuffer p_225628_2_, int p_225628_3_, T p_225628_4_, float p_225628_5_, float p_225628_6_, float p_225628_7_, float p_225628_8_, float p_225628_9_, float p_225628_10_)
- Specified by:
render
in classLayerRenderer<T extends LivingEntity,M extends EntityModel<T>>
-
shouldRender
public boolean shouldRender(ItemStack stack, T entity)
Determines if the ElytraLayer should render. ItemStack and Entity are provided for modder convenience, For example, using the same ElytraLayer for multiple custom Elytra.- Parameters:
stack
- The Elytra ItemStackentity
- The entity being rendered.- Returns:
- If the ElytraLayer should render.
-
getElytraTexture
public ResourceLocation getElytraTexture(ItemStack stack, T entity)
Gets the texture to use with this ElytraLayer. This assumes the vanilla Elytra model.- Parameters:
stack
- The Elytra ItemStack.entity
- The entity being rendered.- Returns:
- The texture.
-
-