public class GuiRenderer extends MalisisRenderer<net.minecraft.tileentity.TileEntity>
MalisisGui.IItemRenderer.DummyModel| Modifier and Type | Field and Description |
|---|---|
UIComponent<?> |
currentComponent
Current component being drawn.
|
static net.minecraft.client.renderer.RenderItem |
itemRenderer
RenderItem used to draw itemStacks.
|
int |
mouseX
Current X position of the mouse.
|
int |
mouseY
Current Y position of the mouse.
|
baseBrightness, batchedBuffer, block, blockState, buffer, destroyBlockProgress, drawMode, getBlockDamage, item, itemStack, malisisVertexFormat, partialTick, pos, posOffset, renderGlobal, renderType, tileEntity, tranformType, vertexDrawn, vertexFormat, world| Constructor and Description |
|---|
GuiRenderer()
Instantiates a new
GuiRenderer. |
| Modifier and Type | Method and Description |
|---|---|
void |
applyTexture(Face face,
RenderParameters params)
Applies the texture to the
Face with specified RenderParameters. |
void |
applyTexture(Shape shape,
RenderParameters params)
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,
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.text.Style format,
boolean relative)
Draws itemStack to the GUI at the specified coordinates with a custom formatted label.
|
void |
drawItemStack(net.minecraft.item.ItemStack itemStack,
int x,
int y,
net.minecraft.util.text.Style format)
Draws an itemStack to the GUI at the specified coordinates with a custom format for the label.
|
void |
drawRectangle(int x,
int y,
int z,
int width,
int height,
int color,
int alpha)
Draws an non-textured rectangle in the GUI at a position relative to
currentComponent. |
void |
drawRectangle(int x,
int y,
int z,
int width,
int height,
int color,
int alpha,
boolean relative)
Draws an non-textured rectangle in the GUI.
|
void |
drawScreen(UIContainer<?> container,
int mouseX,
int mouseY,
float partialTick)
Draws the component to the screen.
|
void |
drawShape(GuiShape shape,
RenderParameters params)
Draws a
Shape to the GUI with the specified RenderParameters. |
void |
drawShape(Shape shape)
Draws a
Shape without RenderParameters (default will be used). |
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. |
protected IIconProvider |
getIconProvider(RenderParameters params)
Gets the
IIconProvider either from parameters, the block or the item. |
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, colorMultiplier, disableBlending, disableTextures, draw, drawFace, drawFace, drawModel, drawShape, drawVertex, enableBlending, enableTextures, endBillboard, ensureBlock, getAoBrightness, getBaseBrightness, getBlockAmbientOcclusion, getBlockState, getIcon, getItemStack, getMixedBrightnessForBlock, getPartialTick, getPos, getRenderBounds, getRenderLayer, getRenderType, getTileEntity, getTransform, getWorldAccess, initialize, isBatched, isDrawing, isGui3d, next, next, next, registerFor, registerFor, registerFor, registerForRenderWorldLast, render, renderBlock, renderItem, renderStandard, renderTileEntityAt, renderWorldLastEvent, reset, set, set, set, set, set, set, set, set, setBatched, setBillboard, setTransformType, shouldRender, shouldRenderFace, shouldRotateIcon, shouldSetViewportPosition, smartCull, startDrawing, startDrawing, startDrawing, startDrawingpublic static net.minecraft.client.renderer.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 MalisisRenderer<net.minecraft.tileentity.TileEntity>renderType - the render typedata - the datapublic void clean()
MalisisRendererclean in class MalisisRenderer<net.minecraft.tileentity.TileEntity>public void next()
next in class MalisisRenderer<net.minecraft.tileentity.TileEntity>public void bindTexture(GuiTexture texture)
texture - the texturepublic void bindDefaultTexture()
defaultGuiTexture.public void applyTexture(Shape shape, RenderParameters params)
Shape.applyTexture in class MalisisRenderer<net.minecraft.tileentity.TileEntity>shape - the shapeparams - the parametersprotected IIconProvider getIconProvider(RenderParameters params)
MalisisRendererIIconProvider either from parameters, the block or the item.getIconProvider in class MalisisRenderer<net.minecraft.tileentity.TileEntity>public void applyTexture(Face face, RenderParameters params)
MalisisRendererapplyTexture in class MalisisRenderer<net.minecraft.tileentity.TileEntity>face - the faceparams - 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(Shape shape)
MalisisRendererShape without RenderParameters (default will be used).drawShape in class MalisisRenderer<net.minecraft.tileentity.TileEntity>shape - the shapepublic void drawShape(GuiShape shape, RenderParameters params)
Shape to the GUI with the specified RenderParameters.shape - the shapeparams - the paramspublic void drawRectangle(int x,
int y,
int z,
int width,
int height,
int color,
int alpha)
currentComponent.x - the xy - the yz - the zwidth - the widthheight - the heightcolor - the coloralpha - the alphapublic void drawRectangle(int x,
int y,
int z,
int width,
int height,
int color,
int alpha,
boolean relative)
x - the xy - the yz - the zwidth - the widthheight - the heightcolor - the coloralpha - the alpharelative - true if the position of the rectangle is relative to currentComponentpublic 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 MalisisRenderer<net.minecraft.tileentity.TileEntity>font - 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.text.Style 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.text.Style 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