Package guideme.render
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 Summary
ConstructorDescriptionSimpleRenderContext
(LytRect viewport, net.minecraft.client.gui.GuiGraphics guiGraphics) SimpleRenderContext
(LytRect viewport, net.minecraft.client.gui.GuiGraphics guiGraphics, LightDarkMode lightDarkMode) Creates an instance of aSimpleRenderContext
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.void
fillRect
(LytRect rect, ColorValue topLeft, ColorValue topRight, ColorValue bottomRight, ColorValue bottomLeft) 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) void
fillTriangle
(net.minecraft.world.phys.Vec2 p1, net.minecraft.world.phys.Vec2 p2, net.minecraft.world.phys.Vec2 p3, ColorValue color) net.minecraft.client.gui.GuiGraphics
Returns the value of theguiGraphics
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thelightDarkMode
record component.void
renderItem
(net.minecraft.world.item.ItemStack stack, int x, int y, int z, float width, float height) int
resolveColor
(ColorValue ref) final String
toString()
Returns a string representation of this record class.viewport()
Returns the value of theviewport
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface guideme.render.RenderContext
beginBatch, drawIcon, drawIcon, drawIcon, endBatch, fillGradientHorizontal, fillGradientHorizontal, fillGradientVertical, fillGradientVertical, fillIcon, fillIcon, fillIcon, fillIcon, fillRect, fillRect, fillTexturedRect, fillTexturedRect, fillTexturedRect, fillTexturedRect, fillTexturedRect, fillTexturedRect, fillTexturedRect, fillTexturedRect, font, getAdvance, getWidth, isDarkMode, mutableColor, popScissor, poseStack, pushScissor, renderFluid, renderFluid, renderItem, renderPanel, renderText, renderTextCenteredIn, renderTextInBatch
-
Constructor Details
-
SimpleRenderContext
-
SimpleRenderContext
public SimpleRenderContext(LytRect viewport, net.minecraft.client.gui.GuiGraphics guiGraphics, LightDarkMode lightDarkMode) Creates an instance of aSimpleRenderContext
record class.- Parameters:
viewport
- the value for theviewport
record componentguiGraphics
- the value for theguiGraphics
record componentlightDarkMode
- the value for thelightDarkMode
record component
-
-
Method Details
-
resolveColor
- Specified by:
resolveColor
in interfaceRenderContext
-
fillRect
public void fillRect(LytRect rect, ColorValue topLeft, ColorValue topRight, ColorValue bottomRight, ColorValue bottomLeft) - Specified by:
fillRect
in interfaceRenderContext
-
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 interfaceRenderContext
-
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 interfaceRenderContext
-
renderItem
public void renderItem(net.minecraft.world.item.ItemStack stack, int x, int y, int z, float width, float height) - Specified by:
renderItem
in interfaceRenderContext
-
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. -
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. -
equals
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 withObjects::equals(Object,Object)
. -
viewport
Returns the value of theviewport
record component.- Specified by:
viewport
in interfaceRenderContext
- Returns:
- the value of the
viewport
record component
-
guiGraphics
public net.minecraft.client.gui.GuiGraphics guiGraphics()Returns the value of theguiGraphics
record component.- Specified by:
guiGraphics
in interfaceRenderContext
- Returns:
- the value of the
guiGraphics
record component
-
lightDarkMode
Returns the value of thelightDarkMode
record component.- Specified by:
lightDarkMode
in interfaceRenderContext
- Returns:
- the value of the
lightDarkMode
record component
-