Class DelayedRegistry<T>

java.lang.Object
org.quiltmc.qsl.frozenblock.core.registry.impl.event.DelayedRegistry<T>
All Implemented Interfaces:
com.mojang.serialization.Keyable, Iterable<T>, net.minecraft.core.HolderGetter<T>, net.minecraft.core.HolderLookup<T>, net.minecraft.core.HolderLookup.RegistryLookup<T>, net.minecraft.core.HolderOwner<T>, net.minecraft.core.IdMap<T>, net.minecraft.core.Registry<T>, net.minecraft.core.WritableRegistry<T>

@Internal public final class DelayedRegistry<T> extends Object implements net.minecraft.core.WritableRegistry<T>
Modified to work on Fabric
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.core.HolderLookup

    net.minecraft.core.HolderLookup.Provider, net.minecraft.core.HolderLookup.RegistryLookup<T>

    Nested classes/interfaces inherited from interface net.minecraft.core.HolderLookup.RegistryLookup

    net.minecraft.core.HolderLookup.RegistryLookup.Delegate<T>

    Nested classes/interfaces inherited from interface net.minecraft.core.Registry

    net.minecraft.core.Registry.PendingTags<T>
  • Field Summary

    Fields inherited from interface net.minecraft.core.IdMap

    DEFAULT
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    bindTag(net.minecraft.tags.TagKey<T> tagKey, List<net.minecraft.core.Holder<T>> list)
     
    byId(int index)
     
    boolean
    containsKey(net.minecraft.resources.ResourceKey<T> key)
     
    boolean
    containsKey(net.minecraft.resources.ResourceLocation id)
     
    @NotNull net.minecraft.core.Holder.Reference<T>
     
    @NotNull net.minecraft.core.HolderGetter<T>
     
    @NotNull Set<Map.Entry<net.minecraft.resources.ResourceKey<T>,T>>
     
    @NotNull net.minecraft.core.Registry<T>
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
    get(int index)
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
    get(@Nullable net.minecraft.resources.ResourceKey<T> entry)
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
    get(@Nullable net.minecraft.resources.ResourceLocation id)
     
    @NotNull Optional<net.minecraft.core.HolderSet.Named<T>>
    get(net.minecraft.tags.TagKey<T> tag)
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
     
    int
    getId(T entry)
     
    @Nullable net.minecraft.resources.ResourceLocation
    getKey(T entry)
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
    getRandom(net.minecraft.util.RandomSource random)
     
    @NotNull Optional<net.minecraft.resources.ResourceKey<T>>
     
    @NotNull Stream<net.minecraft.core.HolderSet.Named<T>>
     
    getValue(@Nullable net.minecraft.resources.ResourceKey<T> resourceKey)
     
    getValue(@Nullable net.minecraft.resources.ResourceLocation resourceLocation)
     
    boolean
     
    @NotNull Iterator<T>
     
    @NotNull net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>>
    key()
     
    @NotNull Set<net.minecraft.resources.ResourceLocation>
     
    @NotNull Stream<net.minecraft.core.Holder.Reference<T>>
     
    Stream<net.minecraft.core.HolderSet.Named<T>>
     
    @NotNull net.minecraft.core.Registry.PendingTags<T>
    prepareTagReload(net.minecraft.tags.TagLoader.LoadResult<T> loadResult)
     
    @NotNull net.minecraft.core.Holder.Reference<T>
    register(net.minecraft.resources.ResourceKey<T> key, T entry, net.minecraft.core.RegistrationInfo registrationInfo)
     
    @NotNull Optional<net.minecraft.core.RegistrationInfo>
    registrationInfo(net.minecraft.resources.ResourceKey<T> key)
     
    @NotNull Set<net.minecraft.resources.ResourceKey<T>>
     
    @NotNull com.mojang.serialization.Lifecycle
     
    int
     
    @NotNull net.minecraft.core.Holder<T>
    wrapAsHolder(T object)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.core.HolderGetter

    getOrThrow, getOrThrow

    Methods inherited from interface net.minecraft.core.HolderLookup

    listElementIds, listTagIds

    Methods inherited from interface net.minecraft.core.HolderLookup.RegistryLookup

    filterElements, filterFeatures

    Methods inherited from interface net.minecraft.core.HolderOwner

    canSerializeIn

    Methods inherited from interface net.minecraft.core.IdMap

    byIdOrThrow, getIdOrThrow

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface net.minecraft.core.Registry

    asHolderIdMap, byNameCodec, getOptional, getOptional, getRandomElementOf, getTagOrEmpty, getValueOrThrow, holderByNameCodec, keys, stream
  • Method Details

    • getKey

      @Nullable public @Nullable net.minecraft.resources.ResourceLocation getKey(T entry)
      Specified by:
      getKey in interface net.minecraft.core.Registry<T>
    • getResourceKey

      @NotNull public @NotNull Optional<net.minecraft.resources.ResourceKey<T>> getResourceKey(T entry)
      Specified by:
      getResourceKey in interface net.minecraft.core.Registry<T>
    • getId

      public int getId(@Nullable T entry)
      Specified by:
      getId in interface net.minecraft.core.IdMap<T>
      Specified by:
      getId in interface net.minecraft.core.Registry<T>
    • getValue

      @Nullable public T getValue(@Nullable @Nullable net.minecraft.resources.ResourceKey<T> resourceKey)
      Specified by:
      getValue in interface net.minecraft.core.Registry<T>
    • getValue

      @Nullable public T getValue(@Nullable @Nullable net.minecraft.resources.ResourceLocation resourceLocation)
      Specified by:
      getValue in interface net.minecraft.core.Registry<T>
    • get

      @NotNull public @NotNull Optional<net.minecraft.core.Holder.Reference<T>> get(@Nullable @Nullable net.minecraft.resources.ResourceKey<T> entry)
      Specified by:
      get in interface net.minecraft.core.HolderGetter<T>
    • get

      @NotNull public @NotNull Optional<net.minecraft.core.Holder.Reference<T>> get(@Nullable @Nullable net.minecraft.resources.ResourceLocation id)
      Specified by:
      get in interface net.minecraft.core.Registry<T>
    • registrationInfo

      @NotNull public @NotNull Optional<net.minecraft.core.RegistrationInfo> registrationInfo(net.minecraft.resources.ResourceKey<T> key)
      Specified by:
      registrationInfo in interface net.minecraft.core.Registry<T>
    • registryLifecycle

      @NotNull public @NotNull com.mojang.serialization.Lifecycle registryLifecycle()
      Specified by:
      registryLifecycle in interface net.minecraft.core.HolderLookup.RegistryLookup<T>
    • getAny

      @NotNull public @NotNull Optional<net.minecraft.core.Holder.Reference<T>> getAny()
      Specified by:
      getAny in interface net.minecraft.core.Registry<T>
    • keySet

      @NotNull public @NotNull Set<net.minecraft.resources.ResourceLocation> keySet()
      Specified by:
      keySet in interface net.minecraft.core.Registry<T>
    • entrySet

      @NotNull public @NotNull Set<Map.Entry<net.minecraft.resources.ResourceKey<T>,T>> entrySet()
      Specified by:
      entrySet in interface net.minecraft.core.Registry<T>
    • registryKeySet

      @NotNull public @NotNull Set<net.minecraft.resources.ResourceKey<T>> registryKeySet()
      Specified by:
      registryKeySet in interface net.minecraft.core.Registry<T>
    • getRandom

      @NotNull public @NotNull Optional<net.minecraft.core.Holder.Reference<T>> getRandom(net.minecraft.util.RandomSource random)
      Specified by:
      getRandom in interface net.minecraft.core.Registry<T>
    • containsKey

      public boolean containsKey(net.minecraft.resources.ResourceLocation id)
      Specified by:
      containsKey in interface net.minecraft.core.Registry<T>
    • containsKey

      public boolean containsKey(net.minecraft.resources.ResourceKey<T> key)
      Specified by:
      containsKey in interface net.minecraft.core.Registry<T>
    • freeze

      @NotNull public @NotNull net.minecraft.core.Registry<T> freeze()
      Specified by:
      freeze in interface net.minecraft.core.Registry<T>
    • createIntrusiveHolder

      @NotNull public @NotNull net.minecraft.core.Holder.Reference<T> createIntrusiveHolder(T holder)
      Specified by:
      createIntrusiveHolder in interface net.minecraft.core.Registry<T>
    • get

      @NotNull public @NotNull Optional<net.minecraft.core.Holder.Reference<T>> get(int index)
      Specified by:
      get in interface net.minecraft.core.Registry<T>
    • wrapAsHolder

      @NotNull public @NotNull net.minecraft.core.Holder<T> wrapAsHolder(T object)
      Specified by:
      wrapAsHolder in interface net.minecraft.core.Registry<T>
    • listElements

      @NotNull public @NotNull Stream<net.minecraft.core.Holder.Reference<T>> listElements()
      Specified by:
      listElements in interface net.minecraft.core.HolderLookup<T>
    • listTags

      public Stream<net.minecraft.core.HolderSet.Named<T>> listTags()
      Specified by:
      listTags in interface net.minecraft.core.HolderLookup<T>
    • get

      @NotNull public @NotNull Optional<net.minecraft.core.HolderSet.Named<T>> get(net.minecraft.tags.TagKey<T> tag)
      Specified by:
      get in interface net.minecraft.core.HolderGetter<T>
    • getTags

      @NotNull public @NotNull Stream<net.minecraft.core.HolderSet.Named<T>> getTags()
      Specified by:
      getTags in interface net.minecraft.core.Registry<T>
    • prepareTagReload

      @NotNull public @NotNull net.minecraft.core.Registry.PendingTags<T> prepareTagReload(net.minecraft.tags.TagLoader.LoadResult<T> loadResult)
      Specified by:
      prepareTagReload in interface net.minecraft.core.Registry<T>
    • iterator

      @NotNull public @NotNull Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>
    • byId

      @Nullable public T byId(int index)
      Specified by:
      byId in interface net.minecraft.core.IdMap<T>
    • key

      @NotNull public @NotNull net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> key()
      Specified by:
      key in interface net.minecraft.core.HolderLookup.RegistryLookup<T>
      Specified by:
      key in interface net.minecraft.core.Registry<T>
    • size

      public int size()
      Specified by:
      size in interface net.minecraft.core.IdMap<T>
    • register

      @NotNull public @NotNull net.minecraft.core.Holder.Reference<T> register(net.minecraft.resources.ResourceKey<T> key, T entry, net.minecraft.core.RegistrationInfo registrationInfo)
      Specified by:
      register in interface net.minecraft.core.WritableRegistry<T>
    • bindTag

      public void bindTag(net.minecraft.tags.TagKey<T> tagKey, List<net.minecraft.core.Holder<T>> list)
      Specified by:
      bindTag in interface net.minecraft.core.WritableRegistry<T>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface net.minecraft.core.WritableRegistry<T>
    • createRegistrationLookup

      @NotNull public @NotNull net.minecraft.core.HolderGetter<T> createRegistrationLookup()
      Specified by:
      createRegistrationLookup in interface net.minecraft.core.WritableRegistry<T>