Class AnimatedMask
java.lang.Object
io.github.projectunified.craftux.mask.MultiMask<Mask>
io.github.projectunified.craftux.mask.AnimatedMask
The animated mask with child masks as frames
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable Map
<Position, Consumer<ActionItem>> Get a map of positions to action item consumersvoid
setPeriodMillis
(long periodMillis) Set the period of the animationvoid
stop()
Stop the element.Methods inherited from class io.github.projectunified.craftux.mask.MultiMask
add, add, getElements, init
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.github.projectunified.craftux.common.Mask
getActionMap
-
Constructor Details
-
AnimatedMask
public AnimatedMask()
-
-
Method Details
-
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. -
apply
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)
-