Class SimpleRegistry<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>, IObjectIntIterable<T>
Direct Known Subclasses:
DefaultedRegistry, NamespacedWrapper

public class SimpleRegistry<T> extends MutableRegistry<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<RegistryKey<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

    • SimpleRegistry

      public SimpleRegistry(RegistryKey<? extends Registry<T>> p_i232509_1_, com.mojang.serialization.Lifecycle p_i232509_2_)
  • Method Details