Interface ITickAction<T extends net.minecraft.world.level.block.entity.BlockEntity>

Type Parameters:
T - Subclass of TileEntity
All Known Implementing Classes:
AccumulateItemTickAction, BloodInfuserTickAction, BoxCookTickAction, BulkRepairItemTickAction, EmptyFluidContainerInTankTickAction, EmptyInTankTickAction, FluidContainerItemTickAction, InfuseItemTickAction, ReanimateTickAction, RepairItemTickAction

public interface ITickAction<T extends net.minecraft.world.level.block.entity.BlockEntity>
An action that can be given to TickComponents which are used inside BlockEntityTickingTankInventory
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canTick(T tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick)
    If this action can tick for the given conditions.
    float
    getRequiredTicks(T tile, int slot, int tick)
    Get the required conditions for the given conditions.
    void
    onTick(T tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick)
    Add one tick.
  • Method Details

    • canTick

      boolean canTick(T tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick)
      If this action can tick for the given conditions.
      Parameters:
      tile - The tile entity that ticks.
      itemStack - The ItemStack that is in the slot for which this ticker runs.
      slot - The slot ID for the ticker.
      tick - The current tick.
      Returns:
      If the action can tick for the given parameters.
    • onTick

      void onTick(T tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick)
      Add one tick.
      Parameters:
      tile - The tile entity that ticks.
      itemStack - The ItemStack that is in the slot for which this ticker runs.
      slot - The slot ID for the ticker.
      tick - The current tick.
    • getRequiredTicks

      float getRequiredTicks(T tile, int slot, int tick)
      Get the required conditions for the given conditions.
      Parameters:
      tile - The tile entity that ticks.
      slot - The slot ID for the ticker.
      tick - The current tick.
      Returns:
      Get the required ticks for the given slot for the given tile.