Class Slot

All Implemented Interfaces:
Comparable<GUIComponent>
Direct Known Subclasses:
InputSlot, OutputSlot

public abstract class Slot extends GUIComponent
  • Field Details

    • color

      public Color color
    • id

      public int id
    • disablePickup

      public LogicProcedure disablePickup
    • dropItemsWhenNotBound

      public boolean dropItemsWhenNotBound
    • onSlotChanged

      public Procedure onSlotChanged
    • onTakenFromSlot

      public Procedure onTakenFromSlot
    • onStackTransfer

      public Procedure onStackTransfer
  • Constructor Details

  • Method Details

    • getWeight

      public int getWeight()
      Description copied from class: GUIComponent
      Returns the priority for when this component should be drawn in the UI, to represent how Minecraft draws components in the game.
      Specified by:
      getWeight in class GUIComponent
      Returns:
      The priority of the component (lower means it will be rendered closer to the screen and higher means it will "sink" more behind other components)
    • getWidth

      public final int getWidth(Workspace workspace)
      Specified by:
      getWidth in class GUIComponent
    • getHeight

      public final int getHeight(Workspace workspace)
      Specified by:
      getHeight in class GUIComponent
    • paintComponent

      public void paintComponent(int cx, int cy, WYSIWYGEditor wysiwygEditor, Graphics2D g)
      Specified by:
      paintComponent in class GUIComponent