public class GuiRenderer extends MalisisRenderer
MalisisGui.| Modifier and Type | Field and Description |
|---|---|
UIComponent |
currentComponent
Current component being drawn.
|
static net.minecraft.client.renderer.entity.RenderItem |
itemRenderer
RenderItem used to draw itemStacks.
|
int |
mouseX
Current X position of the mouse.
|
int |
mouseY
Current Y position of the mouse.
|
baseBrightness, block, blockMetadata, damagedIcons, destroyBlockProgress, drawMode, face, getBlockDamage, isShifted, itemRenderType, itemStack, overrideTexture, params, partialTick, renderBlocks, renderGlobal, renderId, renderType, rp, shape, t, tileEntity, vertexDrawn, world, x, y, z| Constructor and Description |
|---|
GuiRenderer()
Instantiates a new
GuiRenderer. |
| Modifier and Type | Method and Description |
|---|---|
void |
applyTexture(Shape shape,
RenderParameters parameters)
Applies the texture the
Shape. |
void |
bindDefaultTexture()
Reset the texture to its
defaultGuiTexture. |
void |
bindTexture(GuiTexture texture)
Bind a new texture for rendering.
|
void |
clean()
Cleans the current renderer state.
|
void |
drawItemStack(net.minecraft.item.ItemStack itemStack)
Draws an itemStack to the GUI.
|
void |
drawItemStack(net.minecraft.item.ItemStack itemStack,
int x,
int y)
Draws an itemStack to the GUI at the specified coordinates.
|
void |
drawItemStack(net.minecraft.item.ItemStack itemStack,
int x,
int y,
net.minecraft.util.EnumChatFormatting format)
Draws an itemStack to the GUI at the specified coordinates with a custom format for the label.
|
void |
drawItemStack(net.minecraft.item.ItemStack itemStack,
int x,
int y,
java.lang.String label)
Draws an itemStack to the GUI at the specified coordinates with a custom label.
|
void |
drawItemStack(net.minecraft.item.ItemStack itemStack,
int x,
int y,
java.lang.String label,
net.minecraft.util.EnumChatFormatting format,
boolean relative)
Draws itemStack to the GUI at the specified coordinates with a custom formatted label.
|
void |
drawRectangle(float x,
float y,
float z,
float width,
float height,
int color,
int alpha,
boolean relative) |
void |
drawRectangle(int x,
int y,
int z,
int width,
int height,
int color,
int alpha) |
void |
drawScreen(UIContainer container,
int mouseX,
int mouseY,
float partialTick)
Draws the component to the screen.
|
void |
drawShape(GuiShape s,
RenderParameters params)
Draws a
Shape to the GUI with the specified RenderParameters. |
void |
drawText(MalisisFont font,
java.lang.String text,
float x,
float y,
float z,
FontRenderOptions fro)
Draws text with specified
MalisisFont with FontRenderOptions at the coordinates relative to currentComponent |
void |
drawText(MalisisFont font,
java.lang.String text,
float x,
float y,
float z,
FontRenderOptions fro,
boolean relative)
Draws text with specified
MalisisFont with FontRenderOptions at the coordinatesp passed. |
void |
drawText(MalisisFont font,
java.lang.String text,
FontRenderOptions fro)
Draw text with specified
MalisisFont with FontRenderOptions. |
void |
drawText(java.lang.String text)
Draws text with default
MalisisFont and FontRenderOptions. |
void |
drawText(java.lang.String text,
float x,
float y,
float z)
Draws text with default
MalisisFont and FontRenderOptions at the coordinates relative to currentComponent. |
void |
drawTooltip(UITooltip tooltip)
Draws a
UITooltip to the screen. |
void |
endClipping(ClipArea area)
Ends the clipping.
|
GuiTexture |
getDefaultTexture()
Gets the default
GuiTexture. |
int |
getScaleFactor()
Gets the scale factor used for this
GuiRenderer. |
boolean |
isIgnoreScale()
Checks if Minecraft GUI scale is ignored
|
void |
next()
Next.
|
void |
prepare(RenderType renderType,
double... data)
Prepares the
Tessellator and the GL states for the renderType. |
void |
renderPickedItemStack(net.minecraft.item.ItemStack itemStack)
Render the picked up itemStack at the cursor position.
|
void |
set(int mouseX,
int mouseY,
float partialTicks)
Sets the mouse position and the partial tick.
|
void |
setDefaultTexture(GuiTexture texture)
Sets the default
GuiTexture to use for this GuiRenderer. |
void |
setIgnoreScale(boolean ignore)
Sets whether to ignore default Minecraft GUI scale factor.
|
void |
setScaleFactor(int factor)
Sets the scale factor to use for this
GuiRenderer. |
void |
startClipping(ClipArea area)
Starts clipping an area to prevent drawing outside of it.
|
_initialize, applyTexture, bindTexture, calcVertexBrightness, calcVertexColor, calcVertexesPosition, disableTextures, draw, drawFace, drawFace, drawShape, drawShape, drawVertex, drawVertexes, enableBlending, enableTextures, getAoBrightness, getBaseBrightness, getBlockAmbientOcclusion, getBlockDestroyProgress, getDamagedBlocks, getIcon, getMixedBrightnessForBlock, getPartialTick, getRenderBounds, getRenderId, handleRenderType, initialize, isCurrentBlockDestroyProgress, isDrawing, next, registerFor, registerFor, registerForRenderWorldLast, render, renderDestroyProgress, renderInventoryBlock, renderItem, renderStandard, renderStandard, renderTileEntityAt, renderWorldBlock, renderWorldLastEvent, reset, set, set, set, set, set, set, set, set, shouldRender, shouldRender3DInInventory, shouldRenderFace, shouldSetViewportPosition, shouldUseRenderHelper, startDrawing, startDrawing, tessellatorShift, tessellatorUnshiftpublic static net.minecraft.client.renderer.entity.RenderItem itemRenderer
public UIComponent currentComponent
public int mouseX
public int mouseY
public GuiRenderer()
GuiRenderer.public GuiTexture getDefaultTexture()
GuiTexture.public void setDefaultTexture(GuiTexture texture)
GuiTexture to use for this GuiRenderer.texture - the new default texturepublic void setScaleFactor(int factor)
GuiRenderer.factor - the new scale factorpublic int getScaleFactor()
GuiRenderer.public void setIgnoreScale(boolean ignore)
ignore - the new ignore scalepublic boolean isIgnoreScale()
public void set(int mouseX,
int mouseY,
float partialTicks)
mouseX - the mouse xmouseY - the mouse ypartialTicks - the partial tickspublic void prepare(RenderType renderType, double... data)
MalisisRendererTessellator and the GL states for the renderType. data is only used for TESR and IRWL.prepare in class MalisisRendererrenderType - the render typedata - the datapublic void clean()
MalisisRendererclean in class MalisisRendererpublic void next()
next in class MalisisRendererpublic void bindTexture(GuiTexture texture)
texture - the texturepublic void bindDefaultTexture()
defaultGuiTexture.public void applyTexture(Shape shape, RenderParameters parameters)
Shape.applyTexture in class MalisisRenderershape - the shapeparameters - the parameterspublic void drawScreen(UIContainer container, int mouseX, int mouseY, float partialTick)
container - the containermouseX - the mouse xmouseY - the mouse ypartialTick - the partial tickpublic void drawShape(GuiShape s, RenderParameters params)
Shape to the GUI with the specified RenderParameters.s - the sparams - the paramspublic void drawRectangle(int x,
int y,
int z,
int width,
int height,
int color,
int alpha)
public void drawRectangle(float x,
float y,
float z,
float width,
float height,
int color,
int alpha,
boolean relative)
public void drawTooltip(UITooltip tooltip)
UITooltip to the screen.tooltip - the tooltippublic void drawText(java.lang.String text)
MalisisFont and FontRenderOptions.text - the textpublic void drawText(java.lang.String text,
float x,
float y,
float z)
MalisisFont and FontRenderOptions at the coordinates relative to currentComponent.text - the textx - the xy - the yz - the zpublic void drawText(MalisisFont font, java.lang.String text, FontRenderOptions fro)
MalisisFont with FontRenderOptions.font - the fonttext - the textfro - the fropublic void drawText(MalisisFont font, java.lang.String text, float x, float y, float z, FontRenderOptions fro)
MalisisFont with FontRenderOptions at the coordinates relative to currentComponentdrawText in class MalisisRendererfont - the fonttext - the textx - the xy - the yz - the zfro - the fropublic void drawText(MalisisFont font, java.lang.String text, float x, float y, float z, FontRenderOptions fro, boolean relative)
MalisisFont with FontRenderOptions at the coordinatesp passed.font - the fonttext - the textx - the xy - the yz - the zfro - the frorelative - true if the coordinates are relative to current componentpublic void drawItemStack(net.minecraft.item.ItemStack itemStack)
itemStack - the item stackpublic void drawItemStack(net.minecraft.item.ItemStack itemStack,
int x,
int y)
itemStack - the item stackx - the xy - the ypublic void drawItemStack(net.minecraft.item.ItemStack itemStack,
int x,
int y,
net.minecraft.util.EnumChatFormatting format)
itemStack - the item stackx - the xy - the yformat - the formatpublic void drawItemStack(net.minecraft.item.ItemStack itemStack,
int x,
int y,
java.lang.String label)
itemStack - the item stackx - the xy - the ylabel - the labelpublic void drawItemStack(net.minecraft.item.ItemStack itemStack,
int x,
int y,
java.lang.String label,
net.minecraft.util.EnumChatFormatting format,
boolean relative)
itemStack - the item stackx - the xy - the ylabel - the label to display, if null display the stack sizeformat - the formatrelative - if true, coordinates are relative to current componentpublic void renderPickedItemStack(net.minecraft.item.ItemStack itemStack)
itemStack - the item stackpublic void startClipping(ClipArea area)
area - the areapublic void endClipping(ClipArea area)
area - the area