public class ItemHoverEvent extends AHoverEvent
action| Constructor and Description |
|---|
ItemHoverEvent(HoverEventAction action,
net.lenni0451.mcstructs.core.Identifier item,
int count,
net.lenni0451.mcstructs.nbt.tags.CompoundTag nbt) |
ItemHoverEvent(net.lenni0451.mcstructs.core.Identifier item,
int count,
net.lenni0451.mcstructs.nbt.tags.CompoundTag nbt) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(java.lang.Object o) |
int |
getCount() |
net.lenni0451.mcstructs.core.Identifier |
getItem() |
net.lenni0451.mcstructs.nbt.tags.CompoundTag |
getNbt() |
int |
hashCode() |
ItemHoverEvent |
setCount(int count)
Set the count of this hover event.
|
ItemHoverEvent |
setItem(net.lenni0451.mcstructs.core.Identifier item)
Set the item of this hover event.
|
ItemHoverEvent |
setNbt(net.lenni0451.mcstructs.nbt.tags.CompoundTag nbt)
Set the nbt of this hover event.
|
TextHoverEvent |
toLegacy(TextComponentSerializer textComponentSerializer,
net.lenni0451.mcstructs.snbt.SNbtSerializer<?> sNbtSerializer)
Converts this hover event to a legacy text hover event.
|
java.lang.String |
toString() |
getActionpublic ItemHoverEvent(net.lenni0451.mcstructs.core.Identifier item,
int count,
net.lenni0451.mcstructs.nbt.tags.CompoundTag nbt)
public ItemHoverEvent(HoverEventAction action, net.lenni0451.mcstructs.core.Identifier item, int count, @Nullable net.lenni0451.mcstructs.nbt.tags.CompoundTag nbt)
public net.lenni0451.mcstructs.core.Identifier getItem()
public ItemHoverEvent setItem(net.lenni0451.mcstructs.core.Identifier item)
item - The new itempublic int getCount()
public ItemHoverEvent setCount(int count)
count - The new count@Nullable public net.lenni0451.mcstructs.nbt.tags.CompoundTag getNbt()
public ItemHoverEvent setNbt(@Nullable net.lenni0451.mcstructs.nbt.tags.CompoundTag nbt)
nbt - The new nbtpublic TextHoverEvent toLegacy(TextComponentSerializer textComponentSerializer, net.lenni0451.mcstructs.snbt.SNbtSerializer<?> sNbtSerializer)
AHoverEventtoLegacy in class AHoverEventtextComponentSerializer - The serializer to use for text componentssNbtSerializer - The serializer to use for nbt tagspublic boolean equals(java.lang.Object o)
equals in class AHoverEventpublic int hashCode()
hashCode in class AHoverEventpublic java.lang.String toString()
toString in class AHoverEvent