Class EmptyFluidContainerInTankTickAction<T extends BlockEntityTickingTankInventory<T>>

java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.EmptyInTankTickAction<T>
org.cyclops.evilcraft.blockentity.tickaction.EmptyFluidContainerInTankTickAction<T>
Type Parameters:
T - BlockEntityTickingTankInventory to drain to.
All Implemented Interfaces:
ITickAction<T>

public class EmptyFluidContainerInTankTickAction<T extends BlockEntityTickingTankInventory<T>> extends EmptyInTankTickAction<T>
ITickAction for emptying fluid containers in a tank.
  • Constructor Details

    • EmptyFluidContainerInTankTickAction

      public EmptyFluidContainerInTankTickAction()
  • Method Details

    • onTick

      public void onTick(T tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick)
      Description copied from interface: ITickAction
      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

      public float getRequiredTicks(T tile, int slot, int tick)
      Description copied from interface: ITickAction
      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.
    • getRequiredTicks

      public static int getRequiredTicks(BlockEntityTankInventory tile, net.minecraft.world.item.ItemStack itemStack)
      Get the required ticks for a given item.
      Parameters:
      tile - The BlockEntity to drain to.
      itemStack - The item to get the required ticks for.
      Returns:
      The required ticks.
    • canTick

      public boolean canTick(T tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick)
      Description copied from interface: ITickAction
      If this action can tick for the given conditions.
      Specified by:
      canTick in interface ITickAction<T extends BlockEntityTickingTankInventory<T>>
      Overrides:
      canTick in class EmptyInTankTickAction<T extends BlockEntityTickingTankInventory<T>>
      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.