Class BlockTicker
java.lang.Object
me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker
- All Implemented Interfaces:
ItemHandler
- Direct Known Subclasses:
RainbowTickHandler
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<? extends ItemHandler> This method returns the identifier for thisItemHandler.abstract booleanThis method must be overridden to define whether a Block needs to be run on the main server thread (World Manipulation requires that)voidThis method resets the 'unique' flag foruniqueTick()voidtick(org.bukkit.block.Block b, SlimefunItem item, SlimefunBlockData data) This method is called every tick for every blockvoidtick(org.bukkit.block.Block b, SlimefunItem item, SlimefunUniversalData data) This method is called every tick for every blockvoidtick(org.bukkit.block.Block b, SlimefunItem item, Config data) Deprecated.voidThis method is called every tick but not per-block and only once.voidupdate()刷新当前 ticker 执行状态validate(SlimefunItem item) This method is used to check whether a givenSlimefunItemis compatible with thisItemHandler, it will return anIncompatibleItemHandlerExceptionif the items are not compatible.
-
Field Details
-
unique
protected boolean unique
-
-
Constructor Details
-
BlockTicker
public BlockTicker() -
BlockTicker
public BlockTicker(boolean universal)
-
-
Method Details
-
update
public void update()刷新当前 ticker 执行状态 -
validate
Description copied from interface:ItemHandlerThis method is used to check whether a givenSlimefunItemis compatible with thisItemHandler, it will return anIncompatibleItemHandlerExceptionif the items are not compatible.- Specified by:
validatein interfaceItemHandler- Parameters:
item- TheSlimefunItemto validate- Returns:
- An
Optionaldescribing the result, it will contain anIncompatibleItemHandlerExceptionshould there be an issue
-
isSynchronized
public abstract 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)- Returns:
- Whether this task should run on the main server thread
-
tick
This method is called every tick for every block- Parameters:
b- TheBlockthat was tickeditem- The correspondingSlimefunItemdata- The data stored in thisBlock
-
tick
This method is called every tick for every block- Parameters:
b- TheBlockthat was tickeditem- The correspondingSlimefunItemdata- The data stored in thisBlock
-
tick
Deprecated. -
uniqueTick
public void uniqueTick()This method is called every tick but not per-block and only once. -
getIdentifier
Description copied from interface:ItemHandlerThis method returns the identifier for thisItemHandler. We use aClassidentifier to group Item Handlers together.- Specified by:
getIdentifierin interfaceItemHandler- Returns:
- The
Classidentifier for thisItemHandler
-
startNewTick
public void startNewTick()This method resets the 'unique' flag foruniqueTick()
-