Class RenderNameplateEvent


  • public class RenderNameplateEvent
    extends EntityEvent
    RenderNameplateEvent is fired whenever the entity renderer attempts to render a name plate/tag of an entity.
    nameplateContent contains the content being rendered on the name plate/tag. This can be changed by mods.
    originalContent contains the original content being rendered on the name plate/tag. This cannot be changed by mods.
    entityRenderer contains the entity renderer instance that renders the name plate/tag. This cannot be changed by mods.
    matrixStack contains the matrix stack instance involved in rendering the name plate/tag. This cannot be changed by mods.
    renderTypeBuffer contains the render type buffer instance involved in rendering the name plate/tag. This cannot be changed by mods.
    packedLight contains the sky and block light values used in rendering the name plate/tag.
    partialTicks contains the partial ticks used in rendering the name plate/tag. This cannot be changed by mods.

    This event has a result. Event.HasResult.
    ALLOW will force-render name plate/tag, DEFAULT will ignore the hook and continue using the vanilla check & DENY will prevent name plate/tag from rendering

    This event is fired on the MinecraftForge.EVENT_BUS.
    • Field Detail

      • packedLight

        private final int packedLight
      • partialTicks

        private final float partialTicks
    • Method Detail

      • setContent

        public void setContent​(ITextComponent contents)
        Sets the content that is to be rendered on the name plate/tag
      • getContent

        public ITextComponent getContent()
        The content being rendered on the name plate/tag
      • getOriginalContent

        public ITextComponent getOriginalContent()
        The original content being rendered on the name plate/tag
      • getEntityRenderer

        public EntityRenderer<?> getEntityRenderer()
        The entity renderer that renders the name plate/tag, if it was provided
      • getMatrixStack

        public MatrixStack getMatrixStack()
        The matrix stack used during the rendering of the name plate/tag
      • getRenderTypeBuffer

        public IRenderTypeBuffer getRenderTypeBuffer()
        The render type buffer used during the rendering of the name plate/tag
      • getPackedLight

        public int getPackedLight()
        The packed values of sky and block light used during the rendering of the name plate/tag
      • getPartialTicks

        public float getPartialTicks()
        The partial ticks used during the rendering of the name plate/tag