java.lang.Object
org.cyclops.evilcraft.blockentity.tickaction.bloodchest.AnvilRepairAction
All Implemented Interfaces:
IBloodChestRepairAction

public class AnvilRepairAction extends Object implements IBloodChestRepairAction
Repair action for anvils.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    canRepair(net.minecraft.world.item.ItemStack itemStack, int tick)
    Check if a given item can be repaired.
    boolean
    isItemValidForSlot(net.minecraft.world.item.ItemStack itemStack)
    Check if the given item can be inserted into the Blood Chest.
    org.apache.commons.lang3.tuple.Pair<Float,net.minecraft.world.item.ItemStack>
    repair(net.minecraft.world.item.ItemStack itemStack, net.minecraft.util.RandomSource random, boolean doAction, boolean isBulk)
    The repair logic for a given item for one tick.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • AnvilRepairAction

      public AnvilRepairAction()
  • Method Details

    • isItemValidForSlot

      public boolean isItemValidForSlot(net.minecraft.world.item.ItemStack itemStack)
      Description copied from interface: IBloodChestRepairAction
      Check if the given item can be inserted into the Blood Chest.
      Specified by:
      isItemValidForSlot in interface IBloodChestRepairAction
      Parameters:
      itemStack - The ItemStack that could be inserted.
      Returns:
      If the given item can be inserted into the given slot of the Blood Chest.
    • canRepair

      public boolean canRepair(net.minecraft.world.item.ItemStack itemStack, int tick)
      Description copied from interface: IBloodChestRepairAction
      Check if a given item can be repaired.
      Specified by:
      canRepair in interface IBloodChestRepairAction
      Parameters:
      itemStack - The item that could be repaired.
      tick - The current tick inside the Blood Chest.
      Returns:
      If the given item can be repaired.
    • repair

      public org.apache.commons.lang3.tuple.Pair<Float,net.minecraft.world.item.ItemStack> repair(net.minecraft.world.item.ItemStack itemStack, net.minecraft.util.RandomSource random, boolean doAction, boolean isBulk)
      Description copied from interface: IBloodChestRepairAction
      The repair logic for a given item for one tick.
      Specified by:
      repair in interface IBloodChestRepairAction
      Parameters:
      itemStack - The item to repair.
      random - A random instance.
      doAction - If the actual repair action should be performed, otherwise this is just a simulation.
      isBulk - If the repairing container repairs things in bulk.
      Returns:
      Pair of blood usage multiplier and new itemstack.