Class JavaRegistryTagCache

java.lang.Object
org.geysermc.geyser.session.cache.registry.JavaRegistryTagCache
All Implemented Interfaces:
JavaRegistryProvider

public final class JavaRegistryTagCache extends Object implements 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.

  • Constructor Details

    • JavaRegistryTagCache

      public JavaRegistryTagCache()
  • Method Details

    • registry

      public <T> JavaRegistry<T> registry(JavaRegistryKey<T> registryKey)
      Description copied from interface: JavaRegistryProvider
      Provides a JavaRegistry for the given registryKey.
      Specified by:
      registry in interface JavaRegistryProvider
      Type Parameters:
      T - the type of the registry
      Parameters:
      registryKey - the registry key to get a JavaRegistry for
      Returns:
      the JavaRegistry for the registryKey
    • rawTag

      public it.unimi.dsi.fastutil.ints.IntList rawTag(Tag<?> tag)
      Description copied from interface: JavaRegistryProvider
      Provides a list of raw network IDs for the given tag. 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:
      rawTag in interface JavaRegistryProvider
      Parameters:
      tag - the tag to look up
      Returns:
      the list of raw network IDs the tag holds
    • clear

      public void clear()
    • loadRegistryData

      public void loadRegistryData(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)
    • freeze

      public void freeze()
    • bootstrap

      public static void bootstrap()