Class RainbowTickHandler

java.lang.Object
me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker
io.github.thebusybiscuit.slimefun4.core.handlers.RainbowTickHandler
All Implemented Interfaces:
ItemHandler

public class RainbowTickHandler extends BlockTicker
This is a BlockTicker that is exclusively used for Rainbow blocks. On every tick it cycles through the LoopIterator and chooses the next Material and sets itself to that.
Author:
TheBusyBiscuit
See Also:
  • Constructor Details

    • RainbowTickHandler

      public RainbowTickHandler(@Nonnull List<Material> materials)
    • RainbowTickHandler

      public RainbowTickHandler(@Nonnull Material... materials)
    • RainbowTickHandler

      public RainbowTickHandler(@Nonnull ColoredMaterial material)
  • Method Details

    • tick

      public void tick(Block b, SlimefunItem item, Config data)
      Description copied from class: BlockTicker
      This method is called every tick for every block
      Specified by:
      tick in class BlockTicker
      Parameters:
      b - The Block that was ticked
      item - The corresponding SlimefunItem
      data - The data stored in this Block
    • uniqueTick

      public void uniqueTick()
      Description copied from class: BlockTicker
      This method is called every tick but not per-block and only once.
      Overrides:
      uniqueTick in class BlockTicker
    • isSynchronized

      public boolean isSynchronized()
      Description copied from class: BlockTicker
      This method must be overridden to define whether a Block needs to be run on the main server thread (World Manipulation requires that)
      Specified by:
      isSynchronized in class BlockTicker
      Returns:
      Whether this task should run on the main server thread