public class NinePatchRenderer
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected int |
cellSize |
protected net.minecraft.util.ResourceLocation |
patchLocation |
protected int |
u |
protected int |
v |
Constructor and Description |
---|
NinePatchRenderer(int U,
int V,
int size,
net.minecraft.util.ResourceLocation texture)
Creates a renderer with given options
Texture must be in the following pattern.
|
Modifier and Type | Method and Description |
---|---|
void |
render(net.minecraft.client.gui.screen.Screen gui,
int x,
int y,
int width,
int height) |
void |
render(net.minecraft.client.gui.screen.Screen gui,
int x,
int y,
int width,
int height,
java.awt.Color color)
Main render call.
|
protected void |
renderBackground(net.minecraft.client.gui.screen.Screen gui,
int width,
int height) |
protected void |
renderBottomEdge(net.minecraft.client.gui.screen.Screen gui,
int width,
int height) |
protected void |
renderBottomLeftCorner(net.minecraft.client.gui.screen.Screen gui,
int height) |
protected void |
renderBottomRightCorner(net.minecraft.client.gui.screen.Screen gui,
int width,
int height) |
protected void |
renderLeftEdge(net.minecraft.client.gui.screen.Screen gui,
int height) |
protected void |
renderRightEdge(net.minecraft.client.gui.screen.Screen gui,
int width,
int height) |
protected void |
renderTopEdge(net.minecraft.client.gui.screen.Screen gui,
int width) |
protected void |
renderTopLeftCorner(net.minecraft.client.gui.screen.Screen gui)
Partial Rendering Code
This can be overwritten in a new INSTANCE of the class to disable certain parts from rendering or to give them a
different behavior.
|
protected void |
renderTopRightCorner(net.minecraft.client.gui.screen.Screen gui,
int width) |
protected int u
protected int v
protected int cellSize
protected net.minecraft.util.ResourceLocation patchLocation
public NinePatchRenderer(int U, int V, int size, net.minecraft.util.ResourceLocation texture)
U
- The texture U locationV
- The texture V locationsize
- The cell sizetexture
- The texture locationprotected void renderTopLeftCorner(net.minecraft.client.gui.screen.Screen gui)
protected void renderTopRightCorner(net.minecraft.client.gui.screen.Screen gui, int width)
protected void renderBottomLeftCorner(net.minecraft.client.gui.screen.Screen gui, int height)
protected void renderBottomRightCorner(net.minecraft.client.gui.screen.Screen gui, int width, int height)
protected void renderTopEdge(net.minecraft.client.gui.screen.Screen gui, int width)
protected void renderBottomEdge(net.minecraft.client.gui.screen.Screen gui, int width, int height)
protected void renderLeftEdge(net.minecraft.client.gui.screen.Screen gui, int height)
protected void renderRightEdge(net.minecraft.client.gui.screen.Screen gui, int width, int height)
protected void renderBackground(net.minecraft.client.gui.screen.Screen gui, int width, int height)
public void render(net.minecraft.client.gui.screen.Screen gui, int x, int y, int width, int height)
public void render(net.minecraft.client.gui.screen.Screen gui, int x, int y, int width, int height, java.awt.Color color)
gui
- The screen being rendered ontox
- Screen X Positiony
- Screen Y Positionwidth
- Widthheight
- Heightcolor
- Color to render