Interface TickingRebarEntity


  • 
    public interface TickingRebarEntity
    
                        

    Represents an entity that 'ticks' (does something at a fixed time interval).

    • Method Summary

      Modifier and Type Method Description
      default void setTickInterval(Integer tickInterval) Sets how often the tick function should be called (in Minecraft ticks)
      default void setAsync(Boolean isAsync) Sets whether the tick function should be called asynchronously.
      void tick() The function that should be called periodically.
      default Integer getTickInterval() The interval at which the tick function is called.
      default Boolean isAsync() Whether the tick function should be called asynchronously.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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.

      • isAsync

         default Boolean isAsync()

        Whether the tick function should be called asynchronously. You should generally use setAsync in your place constructor instead of overriding this.