Record Class SimpleRenderContext

java.lang.Object
java.lang.Record
guideme.render.SimpleRenderContext
All Implemented Interfaces:
RenderContext

public record SimpleRenderContext(LytRect viewport, net.minecraft.client.gui.GuiGraphics guiGraphics, LightDarkMode lightDarkMode) extends Record implements RenderContext
  • Constructor Details

    • SimpleRenderContext

      public SimpleRenderContext(LytRect viewport, net.minecraft.client.gui.GuiGraphics guiGraphics)
    • SimpleRenderContext

      public SimpleRenderContext(LytRect viewport, net.minecraft.client.gui.GuiGraphics guiGraphics, LightDarkMode lightDarkMode)
      Creates an instance of a SimpleRenderContext record class.
      Parameters:
      viewport - the value for the viewport record component
      guiGraphics - the value for the guiGraphics record component
      lightDarkMode - the value for the lightDarkMode record component
  • Method Details

    • resolveColor

      public int resolveColor(ColorValue ref)
      Specified by:
      resolveColor in interface RenderContext
    • fillRect

      public void fillRect(LytRect rect, ColorValue topLeft, ColorValue topRight, ColorValue bottomRight, ColorValue bottomLeft)
      Specified by:
      fillRect in interface RenderContext
    • fillTexturedRect

      public void fillTexturedRect(LytRect rect, net.minecraft.client.renderer.texture.AbstractTexture texture, ColorValue topLeft, ColorValue topRight, ColorValue bottomRight, ColorValue bottomLeft, float u0, float v0, float u1, float v1)
      Specified by:
      fillTexturedRect in interface RenderContext
    • fillTriangle

      public void fillTriangle(net.minecraft.world.phys.Vec2 p1, net.minecraft.world.phys.Vec2 p2, net.minecraft.world.phys.Vec2 p3, ColorValue color)
      Specified by:
      fillTriangle in interface RenderContext
    • renderItem

      public void renderItem(net.minecraft.world.item.ItemStack stack, int x, int y, int z, float width, float height)
      Specified by:
      renderItem in interface RenderContext
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • viewport

      public LytRect viewport()
      Returns the value of the viewport record component.
      Specified by:
      viewport in interface RenderContext
      Returns:
      the value of the viewport record component
    • guiGraphics

      public net.minecraft.client.gui.GuiGraphics guiGraphics()
      Returns the value of the guiGraphics record component.
      Specified by:
      guiGraphics in interface RenderContext
      Returns:
      the value of the guiGraphics record component
    • lightDarkMode

      public LightDarkMode lightDarkMode()
      Returns the value of the lightDarkMode record component.
      Specified by:
      lightDarkMode in interface RenderContext
      Returns:
      the value of the lightDarkMode record component