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
ConstructorsConstructorDescriptionRainbowTickHandler(ColoredMaterial material) RainbowTickHandler(List<Material> materials) RainbowTickHandler(Material... materials) -
Method Summary
Modifier and TypeMethodDescriptionbooleanThis method must be overridden to define whether a Block needs to be run on the main server thread (World Manipulation requires that)voidtick(Block b, SlimefunItem item, Config data) This method is called every tick for every blockvoidThis 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:BlockTickerThis method is called every tick for every block- Specified by:
tickin classBlockTicker- Parameters:
b- TheBlockthat was tickeditem- The correspondingSlimefunItemdata- The data stored in thisBlock
-
uniqueTick
public void uniqueTick()Description copied from class:BlockTickerThis method is called every tick but not per-block and only once.- Overrides:
uniqueTickin classBlockTicker
-
isSynchronized
public boolean isSynchronized()Description copied from class:BlockTickerThis method must be overridden to define whether a Block needs to be run on the main server thread (World Manipulation requires that)- Specified by:
isSynchronizedin classBlockTicker- Returns:
- Whether this task should run on the main server thread
-