Class RegistryWrapper

  • All Implemented Interfaces:

    
    public class RegistryWrapper
    
                        

    A wrapper for many registries, providing quick functions to register things to them. Basically a tiny registrate but cooler (totally).

    "Mom, can we get registrate?" "No, we have registrate at home." Registrate at home:

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final Set<DeferredRegister<?>> getRegistries()
      final DeferredRegister<AttachmentType<?>> getDataAttachments()
      final DeferredRegister<ParticleType<?>> getParticleTypes()
      final DeferredRegister<EntityDataSerializer<?>> getEntityDataSerializers()
      final String getModId()
      final Unit setModId(String modId)
      final <T extends Any> DeferredRegister<T> deferred(Registry<T> registry)
      final <S extends Tag, T extends INBTSerializable<S>> DeferredHolder<AttachmentType<?>, AttachmentType<T>> livingAttachment(String id, Function0<T> ctor) Register a data attachment for a living entity.
      final DeferredHolder<ParticleType<?>, SimpleParticleType> simpleParticle(String id, Boolean overrideLimiter) Register a simple particle.
      final <T extends Any> EntityDataSerializer<T> entityDataSerializer(String id, EntityDataSerializer<T> serializer) Register an entity data serializer.
      final Unit setup(IEventBus bus) Hook this RegistryWrapper into the proper events on your mod's bus.
      • Methods inherited from class java.lang.Object

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

      • RegistryWrapper

        RegistryWrapper(String modId)
    • Method Detail

      • deferred

         final <T extends Any> DeferredRegister<T> deferred(Registry<T> registry)
      • livingAttachment

         final <S extends Tag, T extends INBTSerializable<S>> DeferredHolder<AttachmentType<?>, AttachmentType<T>> livingAttachment(String id, Function0<T> ctor)

        Register a data attachment for a living entity.

      • simpleParticle

         final DeferredHolder<ParticleType<?>, SimpleParticleType> simpleParticle(String id, Boolean overrideLimiter)

        Register a simple particle.

      • entityDataSerializer

         final <T extends Any> EntityDataSerializer<T> entityDataSerializer(String id, EntityDataSerializer<T> serializer)

        Register an entity data serializer.

      • setup

         final Unit setup(IEventBus bus)

        Hook this RegistryWrapper into the proper events on your mod's bus. It won't work unless you call this.