Class RainbowTicker

  • All Implemented Interfaces:
    ItemHandler


    public class RainbowTicker
    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:
    RainbowBlock
    • Constructor Detail

      • RainbowTicker

        public RainbowTicker​(Material... materials)
      • RainbowTicker

        public RainbowTicker​(io.github.thebusybiscuit.cscorelib2.materials.MaterialCollection collection)
    • Method Detail

      • tick

        public void tick​(Block b,
                         SlimefunItem item,
                         me.mrCookieSlime.CSCoreLibPlugin.Configuration.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