Interface IRepairEvent

All Known Implementing Classes:
RepairEvent

public interface IRepairEvent
Fired before an item is repaired, allowing other mods to repair items before the vanilla inventory is repaired. If a repair is performed, then any leftover experience should be set back to this event using setValue(int)
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.entity.player.Player
    Gets the player whose items are being repaired.
    int
    Gets the amount of experience to be used by the repair.
    void
    setValue(int value)
    Sets the amount of experience left after repairing.
  • Method Details

    • setValue

      void setValue(int value)
      Sets the amount of experience left after repairing.
      Parameters:
      value - The new value to set.
    • getValue

      int getValue()
      Gets the amount of experience to be used by the repair.
      Returns:
      The amount of experience to be used by the repair.
    • getPlayer

      net.minecraft.world.entity.player.Player getPlayer()
      Gets the player whose items are being repaired.
      Returns:
      The player whose items are being repaired.