Class RepairEvent

java.lang.Object
net.minecraftforge.eventbus.internal.MutableEventInternals
net.minecraftforge.eventbus.api.event.MutableEvent
com.blamejared.clumps.api.events.RepairEvent
All Implemented Interfaces:
IRepairEvent, net.minecraftforge.eventbus.internal.Event

public class RepairEvent extends net.minecraftforge.eventbus.api.event.MutableEvent implements IRepairEvent
Fired before an item is repaired, if a repair is performed, then any leftover experience should be set back to this event.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraftforge.eventbus.api.bus.EventBus<RepairEvent>
     

    Fields inherited from class net.minecraftforge.eventbus.internal.MutableEventInternals

    isMonitoring
  • Constructor Summary

    Constructors
    Constructor
    Description
    RepairEvent(net.minecraft.world.entity.player.Player player, int value)
     
  • 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.

    Methods inherited from class java.lang.Object

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

    • BUS

      public static final net.minecraftforge.eventbus.api.bus.EventBus<RepairEvent> BUS
  • Constructor Details

    • RepairEvent

      public RepairEvent(net.minecraft.world.entity.player.Player player, int value)
  • Method Details

    • setValue

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

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

      public net.minecraft.world.entity.player.Player getPlayer()
      Gets the player whose items are being repaired.
      Specified by:
      getPlayer in interface IRepairEvent
      Returns:
      The player whose items are being repaired.