java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.spiritfurnace.BoxCookTickAction
All Implemented Interfaces:
ITickAction<BlockEntitySpiritFurnace>

public class BoxCookTickAction extends Object implements ITickAction<BlockEntitySpiritFurnace>
ITickAction that is able to cook boxes with spirits.
  • Field Details

    • MOBDROP_OVERRIDES

      public static final Map<Class<? extends net.minecraft.world.entity.LivingEntity>,List<org.cyclops.cyclopscore.item.WeightedItemStack>> MOBDROP_OVERRIDES
    • PLAYERDROP_OVERRIDES_INNER

      public static final Map<UUID,List<org.cyclops.cyclopscore.item.WeightedItemStack>> PLAYERDROP_OVERRIDES_INNER
    • PLAYERDROP_RANDOM

      public static final net.minecraft.world.item.ItemStack[] PLAYERDROP_RANDOM
  • Constructor Details

    • BoxCookTickAction

      public BoxCookTickAction()
  • Method Details

    • overrideMobDrop

      public static void overrideMobDrop(Class<? extends net.minecraft.world.entity.LivingEntity> entity, Set<org.cyclops.cyclopscore.item.WeightedItemStack> drops)
      Override an entity's drops inside the spirit furnace.
      Parameters:
      entity - The entity class.
      drops - A map of drops to relative frequency, with the second pair of the map key representing the min-max amount of drops (both inclusive)
    • overridePlayerDropInner

      public static void overridePlayerDropInner(String playerId, net.minecraft.world.item.ItemStack drop)
      Override a player's drops inside the spirit furnace.
      Parameters:
      playerId - The player id.
      drop - The drop
    • canTick

      public boolean canTick(BlockEntitySpiritFurnace 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<BlockEntitySpiritFurnace>
      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.
    • getCookStack

      protected net.minecraft.world.item.ItemStack getCookStack(BlockEntitySpiritFurnace tile)
    • getPlayerSkull

      protected net.minecraft.world.item.ItemStack getPlayerSkull(String playerName)
    • getPlayerDeterminedDrop

      protected net.minecraft.world.item.ItemStack getPlayerDeterminedDrop(String playerId)
    • doNextDrop

      protected void doNextDrop(BlockEntitySpiritFurnace tile)
    • getRequiredMb

      protected int getRequiredMb(BlockEntitySpiritFurnace tile, int tick)
    • onTick

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