public interface IScreenAddon
| Modifier and Type | Method and Description |
|---|---|
void |
drawBackgroundLayer(com.mojang.blaze3d.matrix.MatrixStack stack,
net.minecraft.client.gui.screen.Screen screen,
IAssetProvider provider,
int guiX,
int guiY,
int mouseX,
int mouseY,
float partialTicks)
Draws the component in the background layer
|
void |
drawForegroundLayer(com.mojang.blaze3d.matrix.MatrixStack stack,
net.minecraft.client.gui.screen.Screen screen,
IAssetProvider provider,
int guiX,
int guiY,
int mouseX,
int mouseY)
Draws the component in the foreground layer
|
default java.util.List<net.minecraft.util.text.ITextComponent> |
getTooltipLines()
A list of strings that will be drawn as a tooltip when `isInside` returns true
|
default void |
init(int screenX,
int screenY)
Called when init is called in the screen.
|
default boolean |
isBackground() |
boolean |
isInside(net.minecraft.client.gui.screen.Screen screen,
double mouseX,
double mouseY)
A check to know if the mouse is inside of the component to draw the tooltip lines
|
default boolean |
keyPressed(int key,
int scan,
int modifiers)
Called when a key is pressed
|
void drawBackgroundLayer(com.mojang.blaze3d.matrix.MatrixStack stack,
net.minecraft.client.gui.screen.Screen screen,
IAssetProvider provider,
int guiX,
int guiY,
int mouseX,
int mouseY,
float partialTicks)
screen - The current open screenprovider - The current asset provider used in the GUIguiX - The gui X in the top left cornerguiY - The gui Y in the top left cornermouseX - The current mouse XmouseY - The current mouse YpartialTicks - Partial ticksvoid drawForegroundLayer(com.mojang.blaze3d.matrix.MatrixStack stack,
net.minecraft.client.gui.screen.Screen screen,
IAssetProvider provider,
int guiX,
int guiY,
int mouseX,
int mouseY)
screen - The current open screenprovider - The current asset provider used in the GUIguiX - The gui X in the top left cornerguiY - The gui Y in the top left cornermouseX - The current mouse XmouseY - The current mouse Ydefault java.util.List<net.minecraft.util.text.ITextComponent> getTooltipLines()
boolean isInside(net.minecraft.client.gui.screen.Screen screen,
double mouseX,
double mouseY)
screen - The current open screenmouseX - The current mouse XmouseY - The current mouse Ydefault boolean keyPressed(int key,
int scan,
int modifiers)
key - The key pressedscan - ??modifiers - ??default void init(int screenX,
int screenY)
screenX - the left point of the ScreenscreenY - the top point of the Screendefault boolean isBackground()