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.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
  • Field Summary

    Fields inherited from interface net.minecraft.core.IdMap

    DEFAULT
  • Method Summary

    Modifier and Type
    Method
    Description
    @NotNull net.minecraft.core.HolderLookup.RegistryLookup<T>
     
    void
    bindTags(Map<net.minecraft.tags.TagKey<T>,List<net.minecraft.core.Holder<T>>> tags)
     
    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>
     
    get(@Nullable net.minecraft.resources.ResourceKey<T> entry)
     
    get(@Nullable net.minecraft.resources.ResourceLocation id)
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
    getHolder(int index)
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
    getHolder(net.minecraft.resources.ResourceKey<T> key)
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
    getHolder(net.minecraft.resources.ResourceLocation key)
     
    int
    getId(T entry)
     
    @Nullable net.minecraft.resources.ResourceLocation
    getKey(T entry)
     
    @NotNull net.minecraft.core.HolderSet.Named<T>
    getOrCreateTag(net.minecraft.tags.TagKey<T> key)
     
    @NotNull Optional<net.minecraft.core.Holder.Reference<T>>
    getRandom(net.minecraft.util.RandomSource random)
     
    @NotNull Optional<net.minecraft.resources.ResourceKey<T>>
     
    @NotNull Optional<net.minecraft.core.HolderSet.Named<T>>
    getTag(net.minecraft.tags.TagKey<T> tag)
     
    @NotNull Stream<net.minecraft.tags.TagKey<T>>
     
    @NotNull Stream<com.mojang.datafixers.util.Pair<net.minecraft.tags.TagKey<T>,net.minecraft.core.HolderSet.Named<T>>>
     
    @NotNull net.minecraft.core.HolderOwner<T>
     
    @NotNull Stream<net.minecraft.core.Holder.Reference<T>>
     
    boolean
     
    @NotNull Iterator<T>
     
    @NotNull net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>>
    key()
     
    @NotNull Set<net.minecraft.resources.ResourceLocation>
     
    @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
     
    void
     
    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.IdMap

    byIdOrThrow, getIdOrThrow

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface net.minecraft.core.Registry

    asHolderIdMap, asTagAddingLookup, byNameCodec, getHolderOrThrow, getOptional, getOptional, getOrThrow, getRandomElementOf, getTagOrEmpty, 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>
    • get

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

      @Nullable public 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.Registry<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>
    • getHolder

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

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

      @NotNull public @NotNull Optional<net.minecraft.core.Holder.Reference<T>> getHolder(net.minecraft.resources.ResourceKey<T> key)
      Specified by:
      getHolder 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>
    • holders

      @NotNull public @NotNull Stream<net.minecraft.core.Holder.Reference<T>> holders()
      Specified by:
      holders in interface net.minecraft.core.Registry<T>
    • getTag

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

      @NotNull public @NotNull net.minecraft.core.HolderSet.Named<T> getOrCreateTag(net.minecraft.tags.TagKey<T> key)
      Specified by:
      getOrCreateTag in interface net.minecraft.core.Registry<T>
    • getTags

      @NotNull public @NotNull Stream<com.mojang.datafixers.util.Pair<net.minecraft.tags.TagKey<T>,net.minecraft.core.HolderSet.Named<T>>> getTags()
      Specified by:
      getTags in interface net.minecraft.core.Registry<T>
    • getTagNames

      @NotNull public @NotNull Stream<net.minecraft.tags.TagKey<T>> getTagNames()
      Specified by:
      getTagNames in interface net.minecraft.core.Registry<T>
    • resetTags

      public void resetTags()
      Specified by:
      resetTags in interface net.minecraft.core.Registry<T>
    • bindTags

      public void bindTags(Map<net.minecraft.tags.TagKey<T>,List<net.minecraft.core.Holder<T>>> tags)
      Specified by:
      bindTags in interface net.minecraft.core.Registry<T>
    • holderOwner

      @NotNull public @NotNull net.minecraft.core.HolderOwner<T> holderOwner()
      Specified by:
      holderOwner in interface net.minecraft.core.Registry<T>
    • asLookup

      @NotNull public @NotNull net.minecraft.core.HolderLookup.RegistryLookup<T> asLookup()
      Specified by:
      asLookup 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.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>
    • 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>