Class AnimatedMask

java.lang.Object
io.github.projectunified.craftux.mask.MultiMask<Mask>
io.github.projectunified.craftux.mask.AnimatedMask
All Implemented Interfaces:
Element, Mask

public class AnimatedMask extends MultiMask<Mask>
The animated mask with child masks as frames
  • Constructor Details

    • AnimatedMask

      public AnimatedMask()
  • Method Details

    • requireChildElements

      protected boolean requireChildElements()
      Description copied from class: MultiMask
      Whether this mask requires child elements
      Overrides:
      requireChildElements in class MultiMask<Mask>
      Returns:
      true if it requires child elements
    • setPeriodMillis

      public void setPeriodMillis(long periodMillis)
      Set the period of the animation
      Parameters:
      periodMillis - the period in milliseconds
    • stop

      public void stop()
      Description copied from interface: Element
      Stop the element. Should be called after removing from the GUI.
      Specified by:
      stop in interface Element
      Overrides:
      stop in class MultiMask<Mask>
    • apply

      @Nullable public @Nullable Map<Position,Consumer<ActionItem>> apply(@NotNull @NotNull UUID uuid)
      Description copied from interface: Mask
      Get a map of positions to action item consumers
      Parameters:
      uuid - the uuid of the player
      Returns:
      the map, or null if no items should be displayed. Can return null in a conditional case (e.g. predicate mask)