Class RegistryCache
java.lang.Object
org.geysermc.geyser.session.cache.RegistryCache
- All Implemented Interfaces:
JavaRegistryProvider
Stores any information sent via Java registries. May not contain all data in a given registry - we'll strip what's
unneeded.
Crafted as of 1.20.5 for easy "add new registry" functionality in the future.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Map<JavaRegistryKey<?>, RegistryCache.RegistryReader<?>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidinit()voidload(org.geysermc.mcprotocollib.protocol.packet.configuration.clientbound.ClientboundRegistryDataPacket packet) Loads a registry in, if we are tracking it.<T> JavaRegistry<T> registry(JavaRegistryKey<T> registryKey)
-
Field Details
-
READERS
@VisibleForTesting public static final Map<JavaRegistryKey<?>,RegistryCache.RegistryReader<?>> READERS
-
-
Constructor Details
-
RegistryCache
-
-
Method Details
-
load
public void load(org.geysermc.mcprotocollib.protocol.packet.configuration.clientbound.ClientboundRegistryDataPacket packet) Loads a registry in, if we are tracking it. -
registry
- Specified by:
registryin interfaceJavaRegistryProvider
-
init
public static void init()
-