Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
package org.spongepowered.api.item.inventory;

import net.kyori.adventure.text.ComponentLike;
import net.kyori.adventure.text.event.HoverEvent;
import net.kyori.adventure.text.event.HoverEventSource;
import org.spongepowered.api.Sponge;
import org.spongepowered.api.block.BlockSnapshot;
import org.spongepowered.api.block.BlockState;
Expand Down Expand Up @@ -57,7 +59,7 @@
* use {@link ValueContainer#get(Key)} in order to retrieve information regarding
* this item stack.</p>
*/
public interface ItemStack extends SerializableDataHolder.Mutable, ComponentLike {
public interface ItemStack extends SerializableDataHolder.Mutable, ComponentLike, HoverEventSource<HoverEvent.ShowItem> {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not that I'm expecting people to be implementing an ItemStack, but is there a way to default implement the method itself being added?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not in any complete manner -- the hover event includes SNBT-serialized data from the stack's tag, which we don't reeealy expose in API


/**
* Returns an empty {@link ItemStack}.
Expand Down