From 3f0171aafece7c36c89a0e3448747a9918791574 Mon Sep 17 00:00:00 2001 From: "Luis C.M." <42545778+c0508383@users.noreply.github.com> Date: Mon, 17 Feb 2025 21:39:18 -0600 Subject: [PATCH] Implemented anvil repair and item destroyed events for custom items and linked items --- java/noppes/npcs/api/event/IItemEvent.java | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/java/noppes/npcs/api/event/IItemEvent.java b/java/noppes/npcs/api/event/IItemEvent.java index 6cebcef..e522695 100644 --- a/java/noppes/npcs/api/event/IItemEvent.java +++ b/java/noppes/npcs/api/event/IItemEvent.java @@ -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(); + } }