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 Type
    Method
    Description
    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
    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
    default List<net.minecraft.network.chat.Component>
    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
     
    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
    default boolean
    keyPressed​(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 screen
      provider - The current asset provider used in the GUI
      guiX - The gui X in the top left corner
      guiY - The gui Y in the top left corner
      mouseX - The current mouse X
      mouseY - The current mouse Y
      partialTicks - 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 screen
      provider - The current asset provider used in the GUI
      guiX - The gui X in the top left corner
      guiY - The gui Y in the top left corner
      mouseX - The current mouse X
      mouseY - The current mouse Y
    • getTooltipLines

      default List<net.minecraft.network.chat.Component> 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 screen
      mouseX - The current mouse X
      mouseY - 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 pressed
      scan - ??
      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 Screen
      screenY - the top point of the Screen
    • isBackground

      default boolean isBackground()