diff options
Diffstat (limited to 'src/main/java/com/anthonyhilyard/iceberg/events/NewItemPickupCallback.java')
-rw-r--r-- | src/main/java/com/anthonyhilyard/iceberg/events/NewItemPickupCallback.java | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/main/java/com/anthonyhilyard/iceberg/events/NewItemPickupCallback.java b/src/main/java/com/anthonyhilyard/iceberg/events/NewItemPickupCallback.java new file mode 100644 index 0000000..5f56eb9 --- /dev/null +++ b/src/main/java/com/anthonyhilyard/iceberg/events/NewItemPickupCallback.java @@ -0,0 +1,24 @@ +package com.anthonyhilyard.iceberg.events; + +import java.util.UUID; + +import net.fabricmc.fabric.api.event.Event; +import net.fabricmc.fabric.api.event.EventFactory; +import net.minecraft.world.item.ItemStack; + +/** + * This event is fired right before a player picks up a new item. This event fires on the logical client. + */ +public interface NewItemPickupCallback +{ + Event<NewItemPickupCallback> EVENT = EventFactory.createArrayBacked(NewItemPickupCallback.class, + (listeners) -> (playerUUID, itemStack) -> { + for (NewItemPickupCallback listener : listeners) + { + listener.onItemPickup(playerUUID, itemStack); + } + } + ); + + public void onItemPickup(UUID playerUUID, ItemStack itemStack); +}
\ No newline at end of file |