java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.spiritreanimator.ReanimateTickAction
All Implemented Interfaces:
ITickAction<BlockEntitySpiritReanimator>

public class ReanimateTickAction extends Object implements ITickAction<BlockEntitySpiritReanimator>
ITickAction that is able to reanimate boxes with spirits.
  • Constructor Details

    • ReanimateTickAction

      public ReanimateTickAction()
  • Method Details

    • canTick

      public boolean canTick(BlockEntitySpiritReanimator 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<BlockEntitySpiritReanimator>
      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

      public void onTick(BlockEntitySpiritReanimator tile, net.minecraft.world.item.ItemStack itemStack, int slot, int tick)
      Description copied from interface: ITickAction
      Add one tick.
      Specified by:
      onTick in interface ITickAction<BlockEntitySpiritReanimator>
      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.
    • getRequiredMb

      protected int getRequiredMb(BlockEntitySpiritReanimator tile, int tick)
    • getRequiredTicks

      public float getRequiredTicks(BlockEntitySpiritReanimator tile, int slot, int tick)
      Description copied from interface: ITickAction
      Get the required conditions for the given conditions.
      Specified by:
      getRequiredTicks in interface ITickAction<BlockEntitySpiritReanimator>
      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.
    • addToProduceSlot

      public boolean addToProduceSlot(BlockEntitySpiritReanimator tile, net.minecraft.world.item.ItemStack itemStack)
      Try to add the given item to the production slot.
      Parameters:
      tile - The tile where reanimation happened.
      itemStack - The item to try to put in the output slot.
      Returns:
      If the item could be added or joined in the output slot.