java.lang.Object
net.mcexpanded.fancytabsections.creativetab.IndexPanel

public final class IndexPanel extends Object
A collapsible jump-list along the left edge of the creative-mode inventory screen, showing one icon per registered Section of the currently selected tab. Clicking an icon smooth-scrolls the grid so that section's banner lands at the top.
Since:
6.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    active(List<Section<?>> sections)
     
    static boolean
    mouseClicked(net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen screen, List<Section<?>> sections, float scrollOffs, double mouseX, double mouseY, int button)
     
    static boolean
    mouseScrolled(net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen screen, List<Section<?>> sections, double mouseX, double mouseY, double scrollY)
     
    static void
    render(net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen screen, net.minecraft.client.gui.GuiGraphics g, List<Section<?>> sections, int mouseX, int mouseY)
     
    static float
    Progresses any in-flight jump-to-section animation.
    static int
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • active

      public static boolean active(List<Section<?>> sections)
    • titleX

      public static int titleX()
      Returns:
      the X offset (relative to guiLeft) the tab title should shift to when this panel's toggle is showing, so the two don't overlap. Applied via a mixin hook into renderLabels.
    • tick

      public static float tick()
      Progresses any in-flight jump-to-section animation.
      Returns:
      the scroll fraction (0..1) to apply this frame, or -1 if there's nothing to apply
    • render

      public static void render(net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen screen, net.minecraft.client.gui.GuiGraphics g, List<Section<?>> sections, int mouseX, int mouseY)
    • mouseClicked

      public static boolean mouseClicked(net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen screen, List<Section<?>> sections, float scrollOffs, double mouseX, double mouseY, int button)
    • mouseScrolled

      public static boolean mouseScrolled(net.minecraft.client.gui.screens.inventory.CreativeModeInventoryScreen screen, List<Section<?>> sections, double mouseX, double mouseY, double scrollY)