Class RegistryResourceListener<T>

java.lang.Object
net.rebel459.unified.api.core.RegistryResourceListener<T>
Direct Known Subclasses:
BlockRegistry, BlockSetTypeRegistry, CreativeTabRegistry, EntityRegistry, ItemRegistry, SoundEventRegistry, WoodTypeRegistry

public abstract class RegistryResourceListener<T> extends Object
An extensible class for creating Registry listeners
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static final class 
    A declaration whose complete codec is evaluated only when its registry factory needs it.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    RegistryResourceListener(net.minecraft.resources.Identifier id, com.mojang.serialization.Codec<T> codec, net.minecraft.resources.Identifier... loadAfter)
     
    protected
    RegistryResourceListener(net.minecraft.resources.Identifier id, com.mojang.serialization.Codec<T> codec, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>> registry, net.minecraft.resources.Identifier... loadAfter)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
     
    final void
    Adds this listener to the bootstrap queue.
    protected abstract void
    register(net.minecraft.resources.Identifier id, RegistryResourceListener.DeferredDeclaration<T> declaration)
    Queues the registration code for a data-driven registry entry.
    protected net.minecraft.resources.Identifier
    registryId(net.minecraft.resources.Identifier resourceId)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • RegistryResourceListener

      protected RegistryResourceListener(net.minecraft.resources.Identifier id, com.mojang.serialization.Codec<T> codec, net.minecraft.resources.Identifier... loadAfter)
    • RegistryResourceListener

      protected RegistryResourceListener(net.minecraft.resources.Identifier id, com.mojang.serialization.Codec<T> codec, net.minecraft.resources.ResourceKey<? extends net.minecraft.core.Registry<?>> registry, net.minecraft.resources.Identifier... loadAfter)
  • Method Details

    • init

      public final void init()
      Adds this listener to the bootstrap queue.
    • completeRegistration

      public static void completeRegistration()
    • register

      protected abstract void register(net.minecraft.resources.Identifier id, RegistryResourceListener.DeferredDeclaration<T> declaration)
      Queues the registration code for a data-driven registry entry.
    • registryId

      protected net.minecraft.resources.Identifier registryId(net.minecraft.resources.Identifier resourceId)