Class RegistrarManagerImpl.RegistrarImpl<T>

java.lang.Object
dev.architectury.registry.registries.fabric.RegistrarManagerImpl.RegistrarImpl<T>
All Implemented Interfaces:
dev.architectury.registry.registries.Registrar<T>, Iterable<T>
Enclosing class:
RegistrarManagerImpl

public static class RegistrarManagerImpl.RegistrarImpl<T> extends Object implements dev.architectury.registry.registries.Registrar<T>
  • Constructor Summary

    Constructors
    Constructor
    Description
    RegistrarImpl(String modId, net.minecraft.core.Registry<T> delegate)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    byRawId(int rawId)
     
    boolean
    contains(net.minecraft.resources.ResourceLocation id)
     
    boolean
     
    dev.architectury.registry.registries.RegistrySupplier<T>
    delegate(net.minecraft.resources.ResourceLocation id)
     
    Set<Map.Entry<net.minecraft.resources.ResourceKey<T>,T>>
     
    get(net.minecraft.resources.ResourceLocation id)
     
    @Nullable net.minecraft.resources.ResourceLocation
    getId(T obj)
     
    Set<net.minecraft.resources.ResourceLocation>
     
    Optional<net.minecraft.resources.ResourceKey<T>>
    getKey(T obj)
     
    int
    getRawId(T obj)
     
     
    net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<T>>
    key()
     
    void
    listen(net.minecraft.resources.ResourceLocation id, Consumer<T> callback)
     
    <E extends T>
    dev.architectury.registry.registries.RegistrySupplier<E>
    register(net.minecraft.resources.ResourceLocation id, Supplier<E> supplier)
     

    Methods inherited from class java.lang.Object

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

    Methods inherited from interface java.lang.Iterable

    forEach, spliterator

    Methods inherited from interface dev.architectury.registry.registries.Registrar

    listen, wrap
  • Constructor Details

    • RegistrarImpl

      public RegistrarImpl(String modId, net.minecraft.core.Registry<T> delegate)
  • Method Details

    • delegate

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

      public <E extends T> 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 @Nullable 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 obj)
      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 id)
      Specified by:
      contains in interface dev.architectury.registry.registries.Registrar<T>
    • containsValue

      public boolean containsValue(T obj)
      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>
    • listen

      public void listen(net.minecraft.resources.ResourceLocation id, Consumer<T> callback)
      Specified by:
      listen in interface dev.architectury.registry.registries.Registrar<T>