Class RegistriesImpl.VanillaBackedRegistryImpl<T>

java.lang.Object
dev.architectury.registry.registries.forge.RegistriesImpl.VanillaBackedRegistryImpl<T>
All Implemented Interfaces:
dev.architectury.registry.registries.Registrar<T>, Iterable<T>
Enclosing class:
RegistriesImpl

public static class RegistriesImpl.VanillaBackedRegistryImpl<T> extends Object implements dev.architectury.registry.registries.Registrar<T>
  • Constructor Details

    • VanillaBackedRegistryImpl

      public VanillaBackedRegistryImpl(net.minecraft.core.Registry<T> delegate)
  • Method Details

    • delegate

      @NotNull public @NotNull dev.architectury.registry.registries.RegistrySupplier<T> delegate(net.minecraft.resources.ResourceLocation id)
      Specified by:
      delegate in interface dev.architectury.registry.registries.Registrar<T>
    • register

      @NotNull public <E extends T> @NotNull dev.architectury.registry.registries.RegistrySupplier<E> register(net.minecraft.resources.ResourceLocation id, Supplier<E> supplier)
      Specified by:
      register in interface dev.architectury.registry.registries.Registrar<T>
    • getId

      @Nullable public net.minecraft.resources.ResourceLocation getId(T obj)
      Specified by:
      getId in interface dev.architectury.registry.registries.Registrar<T>
    • getRawId

      public int getRawId(T obj)
      Specified by:
      getRawId in interface dev.architectury.registry.registries.Registrar<T>
    • getKey

      public Optional<net.minecraft.resources.ResourceKey<T>> getKey(T t)
      Specified by:
      getKey in interface dev.architectury.registry.registries.Registrar<T>
    • get

      @Nullable public T get(net.minecraft.resources.ResourceLocation id)
      Specified by:
      get in interface dev.architectury.registry.registries.Registrar<T>
    • byRawId

      public T byRawId(int rawId)
      Specified by:
      byRawId in interface dev.architectury.registry.registries.Registrar<T>
    • contains

      public boolean contains(net.minecraft.resources.ResourceLocation resourceLocation)
      Specified by:
      contains in interface dev.architectury.registry.registries.Registrar<T>
    • containsValue

      public boolean containsValue(T t)
      Specified by:
      containsValue in interface dev.architectury.registry.registries.Registrar<T>
    • getIds

      public Set<net.minecraft.resources.ResourceLocation> getIds()
      Specified by:
      getIds in interface dev.architectury.registry.registries.Registrar<T>
    • entrySet

      public Set<Map.Entry<net.minecraft.resources.ResourceKey<T>,T>> entrySet()
      Specified by:
      entrySet in interface dev.architectury.registry.registries.Registrar<T>
    • key

      public net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>> key()
      Specified by:
      key in interface dev.architectury.registry.registries.Registrar<T>
    • iterator

      public Iterator<T> iterator()
      Specified by:
      iterator in interface Iterable<T>