Class PlayerBadgeRenderer<T extends PlayerBadge>

java.lang.Object
io.github.thecsdev.tcdcommons.api.client.render.badge.PlayerBadgeRenderer<T>
Direct Known Subclasses:
PBTextureRenderer

public abstract class PlayerBadgeRenderer<T extends PlayerBadge> extends Object
A PlayerBadgeRenderer is a unique component that tells the game how a given PlayerBadge is supposed to be rendered.

Because PlayerBadges are present on both sides (client and server), and rendering is a client-side-only thing, the rendering has been separated into a separate component called PlayerBadgeRenderer.

See Also:
  • Field Details

  • Constructor Details

    • PlayerBadgeRenderer

      protected PlayerBadgeRenderer(Class<T> badgeType)
  • Method Details

    • getBadgeType

      public final Class<T> getBadgeType()
      Returns the Class representing the type of PlayerBadge this PlayerBadgeRenderer renders.
    • render

      public abstract void render(net.minecraft.client.gui.DrawContext pencil, int x, int y, int width, int height, int mouseX, int mouseY, float deltaTime)
      Renders this PlayerBadge on the client-side Screen.
      Parameters:
      pencil - The rendering DrawContext.
      x - The starting on-screen X position where to start drawing the badge.
      y - The starting on-screen Y position where to start drawing the badge.
      width - The width of the PlayerBadge on the screen.
      height - The height of the PlayerBadge on the screen.
      deltaTime - The time elapsed since the last frame was rendered.