Class MappedRegistry<T>

All Implemented Interfaces:
com.mojang.serialization.Codec<T>, com.mojang.serialization.Decoder<T>, com.mojang.serialization.Encoder<T>, com.mojang.serialization.Keyable, Iterable<T>, IdMap<T>
Direct Known Subclasses:
DefaultedRegistry, NamespacedWrapper

public class MappedRegistry<T> extends WritableRegistry<T>
  • Field Details

    • LOGGER

      protected static final org.apache.logging.log4j.Logger LOGGER
    • byId

      private final it.unimi.dsi.fastutil.objects.ObjectList<T> byId
    • toId

      private final it.unimi.dsi.fastutil.objects.Object2IntMap<T> toId
    • storage

      private final com.google.common.collect.BiMap<ResourceLocation,​T> storage
    • keyStorage

      private final com.google.common.collect.BiMap<ResourceKey<T>,​T> keyStorage
    • lifecycles

      private final Map<T,​com.mojang.serialization.Lifecycle> lifecycles
    • elementsLifecycle

      private com.mojang.serialization.Lifecycle elementsLifecycle
    • randomCache

      protected Object[] randomCache
    • nextId

      private int nextId
  • Constructor Details

    • MappedRegistry

      public MappedRegistry(ResourceKey<? extends Registry<T>> p_122681_, com.mojang.serialization.Lifecycle p_122682_)
  • Method Details