Implemented anvil repair and item destroyed events for custom items and linked items

This commit is contained in:
Luis C.M. committed 2025-02-17 21:39:18 -06:00
1 parent c372a031fb
commit 3f0171aafe
1 file changed
+17
@@ -4,6 +4,7 @@ import cpw.mods.fml.common.eventhandler.Cancelable;
import noppes.npcs.api.entity.IEntity;
import noppes.npcs.api.entity.IPlayer;
import noppes.npcs.api.item.IItemCustomizable;
import noppes.npcs.api.item.IItemStack;
public interface IItemEvent extends ICustomNPCsEvent {
@@ -84,6 +85,22 @@ public interface IItemEvent extends ICustomNPCsEvent {
}
// onBreakEvent if Durability Expires or Consumed
interface BreakItem extends IItemEvent {
IItemStack getBrokenStack();
IPlayer getPlayer();
}
// onRepairEvent
interface RepairItem extends IItemEvent {
IItemStack getLeft();
IItemStack getRight();
IItemStack getOutput();
float getAnvilBreakChance();
}
}