Interface JavaRegistryReader.Context
- All Superinterfaces:
JavaRegistryProvider.Provider
- All Known Implementing Classes:
RegistryEntryContext
- Enclosing interface:
JavaRegistryReader<T>
Provides a registry entry (serialised to NBT), and a
JavaRegistryProvider.-
Method Summary
Modifier and TypeMethodDescriptiondata()default org.cloudburstmc.nbt.NbtMapNote that this unsafely casts the data to anNbtMap, only use if you're sure the data is a compound tag.default net.kyori.adventure.text.ComponentAttempts to usedataAsMap()to get this registry entry as anNbtMap, and then tries to parse the"description"key into aComponent, usingMessageTranslator.componentFromNbtTag(Object).Methods inherited from interface org.geysermc.geyser.registry.java.JavaRegistryProvider.Provider
javaRegistries
-
Method Details
-
data
Object data()- Returns:
- the registry entry to parse, serialised to NBT
-
dataAsMap
default org.cloudburstmc.nbt.NbtMap dataAsMap()Note that this unsafely casts the data to anNbtMap, only use if you're sure the data is a compound tag.- Returns:
- the registry entry, cast to an
NbtMap
-
parseDescription
default net.kyori.adventure.text.Component parseDescription()Attempts to usedataAsMap()to get this registry entry as anNbtMap, and then tries to parse the"description"key into aComponent, usingMessageTranslator.componentFromNbtTag(Object). If the key did not exist, an empty component is returned.- Returns:
- the
"description"key from this entry, parsed as aComponent
-