Class JavaRegistryTagCache
java.lang.Object
org.geysermc.geyser.session.cache.registry.JavaRegistryTagCache
- All Implemented Interfaces:
JavaRegistryProvider
A
JavaRegistryProvider for a GeyserSession, accessed through GeyserSession.javaRegistries().
This class builds on top of BuiltInJavaRegistries.PROVIDER, and as such works with both built-in and networked registries.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.geysermc.geyser.registry.java.JavaRegistryProvider
JavaRegistryProvider.Provider -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidvoidloadRegistryData(Optional<GeyserSession> session, org.geysermc.mcprotocollib.protocol.packet.configuration.clientbound.ClientboundRegistryDataPacket registryData) voidloadTags(Optional<GeyserSession> session, org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundUpdateTagsPacket tagsPacket) it.unimi.dsi.fastutil.ints.IntListProvides a list of raw network IDs for the giventag.<T> JavaRegistry<T> registry(JavaRegistryKey<T> registryKey) Provides aJavaRegistryfor the givenregistryKey.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.geysermc.geyser.registry.java.JavaRegistryProvider
is, is, is, tag
-
Constructor Details
-
JavaRegistryTagCache
public JavaRegistryTagCache()
-
-
Method Details
-
registry
Description copied from interface:JavaRegistryProviderProvides aJavaRegistryfor the givenregistryKey.- Specified by:
registryin interfaceJavaRegistryProvider- Type Parameters:
T- the type of the registry- Parameters:
registryKey- the registry key to get aJavaRegistryfor- Returns:
- the
JavaRegistryfor theregistryKey
-
rawTag
Description copied from interface:JavaRegistryProviderProvides a list of raw network IDs for the giventag. This can be an empty list.Generally, prefer using
JavaRegistryProvider.tag(Tag)as it maps the network IDs into a list of objects.- Specified by:
rawTagin interfaceJavaRegistryProvider- Parameters:
tag- the tag to look up- Returns:
- the list of raw network IDs the tag holds
-
loadRegistryData
public void loadRegistryData(Optional<GeyserSession> session, org.geysermc.mcprotocollib.protocol.packet.configuration.clientbound.ClientboundRegistryDataPacket registryData) -
loadTags
public void loadTags(Optional<GeyserSession> session, org.geysermc.mcprotocollib.protocol.packet.common.clientbound.ClientboundUpdateTagsPacket tagsPacket) -
bootstrap
public static void bootstrap()
-