RenderContext

@ApiStatus.NonExtendable()
@NullMarked()
public interface RenderContext(source)

Types

Link copied to clipboard
public class DrawTextureBuilder
Link copied to clipboard
public enum ScissorBehaviour

Functions

Link copied to clipboard
public abstract void assertNoScissors()
Link copied to clipboard
public abstract void clearScissor()
Link copied to clipboard
public abstract void drawColoredRect(float left, float top, float right, float bottom, int color)
Link copied to clipboard
public void drawColoredTriangles(int colour, Array<float> coordinates)
Renders a list of triangles.
Link copied to clipboard
public abstract void drawColouredQuads(int colour, Array<float> coordinates)
Link copied to clipboard
public void drawComplexTexture(MyResourceLocation texture, float x, float y, float width, float height, Consumer<RenderContext.DrawTextureBuilder> block)
Link copied to clipboard
public void drawDarkRect(int x, int y, int width, int height)
public abstract void drawDarkRect(int x, int y, int width, int height, boolean shadow)
Link copied to clipboard
public abstract void drawGradientRect(int left, int top, int right, int bottom, int startColor, int endColor)
Link copied to clipboard
public void drawHorizontalLine(int y, int startX, int endX, int color)
Link copied to clipboard
public void drawNinePatch(NinePatch<MyResourceLocation> patch, float x, float y, int width, int height)
Link copied to clipboard
public abstract void drawOnTop(Layer layer, RenderContext.ScissorBehaviour escapeScissors, Consumer<RenderContext> later)
draws more content that should be laid on top of other later render calls.
Link copied to clipboard
public void drawOpenCloseTriangle(boolean isOpen, float x, float y, float width, float height, int color)
Link copied to clipboard
public abstract void drawString(IFontRenderer fontRenderer, StructuredText text, int x, int y, int color, boolean shadow)
Link copied to clipboard
public void drawStringCenteredScaledMaxWidth(StructuredText text, IFontRenderer fr, float x, float y, boolean shadow, int length, int color)
public final static Unit drawStringCenteredScalingDownWithMaxWidth(StructuredText text, Int centerX, Int centerY, Int maxWidth, Int color, Boolean shadow, IFontRenderer fr)
Link copied to clipboard
public void drawStringScaledMaxWidth(StructuredText text, IFontRenderer fontRenderer, int x, int y, boolean shadow, int width, int color)
Link copied to clipboard
public void drawTexturedRect(MyResourceLocation texture, float x, float y, float width, float height)
Link copied to clipboard
public abstract void drawTexturedTintedRect(MyResourceLocation texture, float x, float y, float width, float height, float u1, float v1, float u2, float v2, int color, TextureFilter filter)
Link copied to clipboard
public abstract void drawTooltipNow(int x, int y, List<StructuredText> tooltipLines)
Link copied to clipboard
public void drawVerticalLine(int x, int startY, int endY, int color)
Link copied to clipboard
Link copied to clipboard
public abstract void invertedRect(float left, float top, float right, float bottom, int additiveColor)
Link copied to clipboard
public boolean isCmdDown()
Link copied to clipboard
public boolean isKeyboardKeyDown(int keyboardKey)
Link copied to clipboard
public boolean isLogicalCtrlDown()
Returns whether the control key is held down on Windows and Linux, and for macOS checks if the command key is held down.
Link copied to clipboard
public boolean isMouseButtonDown(int mouseButton)
Link copied to clipboard
public boolean isPhysicalCtrlDown()
Link copied to clipboard
public boolean isShiftDown()
Link copied to clipboard
public abstract void popMatrix()
Link copied to clipboard
public abstract void popScissor()
Link copied to clipboard
public abstract void pushMatrix()
Link copied to clipboard
public abstract void pushRawScissor(int left, int top, int right, int bottom)
push a raw scissor rectangle.
Link copied to clipboard
public abstract void pushScissor(int left, int top, int right, int bottom)
push a scissor rectangle, clamped to the current scissor rectangle, relative to the current render position.
Link copied to clipboard
public abstract void renderExtraLayers()
Must be called only by the implementor after all rendering is done.
Link copied to clipboard
public abstract void renderItemStack(IItemStack itemStack, int x, int y, @Nullable() @Nullable() StructuredText overlayText)
Link copied to clipboard
public void scale(float scalar)
public abstract void scale(float x, float y)
Link copied to clipboard
public void scheduleDrawTooltip(int x, int y, List<StructuredText> tooltipLines)
Link copied to clipboard
public abstract void translate(float x, float y)