Class RainbowTicker
- java.lang.Object
-
- me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker
-
- me.mrCookieSlime.Slimefun.Objects.handlers.RainbowTicker
-
- All Implemented Interfaces:
ItemHandler
public class RainbowTicker extends BlockTicker
This is aBlockTicker
that is exclusively used for Rainbow blocks. On every tick it cycles through theLoopIterator
and chooses the nextMaterial
and sets itself to that.- Author:
- TheBusyBiscuit
- See Also:
RainbowBlock
-
-
Field Summary
-
Fields inherited from class me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker
unique
-
-
Constructor Summary
Constructors Constructor Description RainbowTicker(io.github.thebusybiscuit.cscorelib2.materials.MaterialCollection collection)
RainbowTicker(Material... materials)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isSynchronized()
This method must be overridden to define whether a Block needs to be run on the main server thread (World Manipulation requires that)void
tick(Block b, SlimefunItem item, me.mrCookieSlime.CSCoreLibPlugin.Configuration.Config data)
This method is called every tick for every blockvoid
uniqueTick()
This method is called every tick but not per-block and only once.-
Methods inherited from class me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker
getIdentifier, startNewTick, update
-
Methods inherited from interface me.mrCookieSlime.Slimefun.Objects.handlers.ItemHandler
isPrivate
-
-
-
-
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 classBlockTicker
- Parameters:
b
- TheBlock
that was tickeditem
- The correspondingSlimefunItem
data
- The data stored in thisBlock
-
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 classBlockTicker
-
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 classBlockTicker
- Returns:
- Whether this task should run on the main server thread
-
-