Interface IScreenAddon
- All Known Implementing Classes:
ArrowButtonScreenAddon,AssetScreenAddon,BasicButtonAddon,BasicScreenAddon,ColorPickerAddon,DragPanelScreenAddon,EnergyBarScreenAddon,FacingHandlerScreenAddon,HuePickerAddon,ItemstackFilterScreenAddon,LockableOverlayAddon,ProgressBarScreenAddon,ShadePickerAddon,SlotsScreenAddon,StateButtonAddon,TankScreenAddon,TextFieldScreenAddon,TextScreenAddon
public interface IScreenAddon
-
Method Summary
Modifier and TypeMethodDescriptionvoiddrawBackgroundLayer(com.mojang.blaze3d.vertex.PoseStack stack, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks)Draws the component in the background layervoiddrawForegroundLayer(com.mojang.blaze3d.vertex.PoseStack stack, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY)Draws the component in the foreground layerdefault List<net.minecraft.network.chat.Component>A list of strings that will be drawn as a tooltip when `isInside` returns truedefault voidinit(int screenX, int screenY)Called when init is called in the screen.default booleanbooleanisInside(net.minecraft.client.gui.screens.Screen screen, double mouseX, double mouseY)A check to know if the mouse is inside of the component to draw the tooltip linesdefault booleankeyPressed(int key, int scan, int modifiers)Called when a key is pressed
-
Method Details
-
drawBackgroundLayer
void drawBackgroundLayer(com.mojang.blaze3d.vertex.PoseStack stack, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY, float partialTicks)Draws the component in the background layer- Parameters:
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 ticks
-
drawForegroundLayer
void drawForegroundLayer(com.mojang.blaze3d.vertex.PoseStack stack, net.minecraft.client.gui.screens.Screen screen, IAssetProvider provider, int guiX, int guiY, int mouseX, int mouseY)Draws the component in the foreground layer- Parameters:
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 Y
-
getTooltipLines
A list of strings that will be drawn as a tooltip when `isInside` returns true- Returns:
- A list of strings
-
isInside
boolean isInside(net.minecraft.client.gui.screens.Screen screen, double mouseX, double mouseY)A check to know if the mouse is inside of the component to draw the tooltip lines- Parameters:
screen- The current open screenmouseX- The current mouse XmouseY- The current mouse Y- Returns:
- True if the mouse is inside the component
-
keyPressed
default boolean keyPressed(int key, int scan, int modifiers)Called when a key is pressed- Parameters:
key- The key pressedscan- ??modifiers- ??- Returns:
- if something was done
-
init
default void init(int screenX, int screenY)Called when init is called in the screen.- Parameters:
screenX- the left point of the ScreenscreenY- the top point of the Screen
-
isBackground
default boolean isBackground()
-