Class BlockTicker

java.lang.Object
me.mrCookieSlime.Slimefun.Objects.handlers.BlockTicker
All Implemented Interfaces:
ItemHandler
Direct Known Subclasses:
RainbowTickHandler

public abstract class BlockTicker extends Object implements ItemHandler
  • 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: ItemHandler
      This method is used to check whether a given SlimefunItem is compatible with this ItemHandler, it will return an IncompatibleItemHandlerException if the items are not compatible.
      Specified by:
      validate in interface ItemHandler
      Parameters:
      item - The SlimefunItem to validate
      Returns:
      An Optional describing the result, it will contain an IncompatibleItemHandlerException should 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

      public void tick(org.bukkit.block.Block b, SlimefunItem item, SlimefunBlockData data)
      This method is called every tick for every block
      Parameters:
      b - The Block that was ticked
      item - The corresponding SlimefunItem
      data - The data stored in this Block
    • tick

      public void tick(org.bukkit.block.Block b, SlimefunItem item, SlimefunUniversalData data)
      This method is called every tick for every block
      Parameters:
      b - The Block that was ticked
      item - The corresponding SlimefunItem
      data - The data stored in this Block
    • tick

      @Deprecated public void tick(org.bukkit.block.Block b, SlimefunItem item, Config data)
      Deprecated.
    • uniqueTick

      public void uniqueTick()
      This method is called every tick but not per-block and only once.
    • getIdentifier

      public Class<? extends ItemHandler> getIdentifier()
      Description copied from interface: ItemHandler
      This method returns the identifier for this ItemHandler. We use a Class identifier to group Item Handlers together.
      Specified by:
      getIdentifier in interface ItemHandler
      Returns:
      The Class identifier for this ItemHandler
    • startNewTick

      public void startNewTick()
      This method resets the 'unique' flag for uniqueTick()