Package net.minecraft.text
Class HoverEvent.Action<T>
java.lang.Object
net.minecraft.text.HoverEvent.Action<T>
- Enclosing class:
- HoverEvent
public static class HoverEvent.Action<T> extends Object
-
Field Summary
Fields Modifier and Type Field Description private static Map<String,HoverEvent.Action<?>>BY_NAMEprivate Function<JsonElement,T>deserializerprivate Function<Text,T>legacyDeserializerprivate Stringnameprivate booleanparsableprivate Function<T,JsonElement>serializerstatic HoverEvent.Action<HoverEvent.EntityContent>SHOW_ENTITYstatic HoverEvent.Action<HoverEvent.ItemStackContent>SHOW_ITEMstatic HoverEvent.Action<Text>SHOW_TEXT -
Constructor Summary
-
Method Summary
Modifier and Type Method Description HoverEventbuildHoverEvent(JsonElement contents)HoverEventbuildHoverEvent(Text value)static HoverEvent.Action<?>byName(String name)private Tcast(Object o)JsonElementcontentsToJson(Object contents)StringgetName()booleanisParsable()StringtoString()
-
Field Details
-
SHOW_TEXT
-
SHOW_ITEM
-
SHOW_ENTITY
-
BY_NAME
-
name
-
parsable
private final boolean parsable -
deserializer
-
serializer
-
legacyDeserializer
-
-
Constructor Details
-
Action
public Action(String name, boolean parsable, Function<JsonElement,T> deserializer, Function<T,JsonElement> serializer, Function<Text,T> legacyDeserializer)
-
-
Method Details