Class RainbowTickHandler
java.lang.Object
me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker
io.github.thebusybiscuit.slimefun4.core.handlers.RainbowTickHandler
- All Implemented Interfaces:
ItemHandler
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:
-
Field Summary
Fields inherited from class me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker
unique
-
Constructor Summary
ConstructorDescriptionRainbowTickHandler
(ColoredMaterial material) RainbowTickHandler
(List<Material> materials) RainbowTickHandler
(Material... materials) -
Method Summary
Modifier and TypeMethodDescriptionboolean
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, Config data) This method is called every tick for every blockvoid
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, validate
-
Constructor Details
-
RainbowTickHandler
-
RainbowTickHandler
-
RainbowTickHandler
-
-
Method Details
-
tick
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
-