Interface TickingRebarEntity
-
public interface TickingRebarEntityRepresents an entity that 'ticks' (does something at a fixed time interval).
-
-
Method Summary
Modifier and Type Method Description default voidsetTickInterval(Integer tickInterval)Sets how often the tick function should be called (in Minecraft ticks) default voidsetAsync(Boolean isAsync)Sets whether the tick function should be called asynchronously. voidtick()The function that should be called periodically. default IntegergetTickInterval()The interval at which the tick function is called. default BooleanisAsync()Whether the tick function should be called asynchronously. -
-
Method Detail
-
setTickInterval
default void setTickInterval(Integer tickInterval)
Sets how often the tick function should be called (in Minecraft ticks)
-
setAsync
default void setAsync(Boolean isAsync)
Sets whether the tick function should be called asynchronously.
WARNING: Setting an entity to tick asynchronously could have unintended consequences.
Only set this option if you understand what 'asynchronous' means, and note that you cannot interact with the world asynchronously.
-
tick
void tick()
The function that should be called periodically.
-
getTickInterval
default Integer getTickInterval()
The interval at which the tick function is called. You should generally use setTickInterval in your place constructor instead of overriding this.
-
-
-
-