Class RegistryExtensions

java.lang.Object
org.quiltmc.qsl.registry.attachment.api.RegistryExtensions

public final class RegistryExtensions extends Object
Extensions for working with Registrys.
  • Constructor Details

    • RegistryExtensions

      public RegistryExtensions()
  • Method Details

    • register

      public static <R, T extends R, V1> T register(net.minecraft.registry.Registry<R> registry, net.minecraft.util.Identifier id, T entry, RegistryEntryAttachment<R,V1> attach1, V1 value1)
      Utility method to register an entry and associate a value to it in an attachment.
      Type Parameters:
      R - type of the entries in the registry
      T - type of the entry we're currently registering (may be a subclass of R)
      V1 - type of the attached value
      Parameters:
      registry - target registry
      id - entry identifier
      entry - entry to register
      attach1 - attachment
      value1 - value to associate to entry in attachment
      Returns:
      the newly registered entry
    • register

      public static <R, T extends R, V1, V2> T register(net.minecraft.registry.Registry<R> registry, net.minecraft.util.Identifier id, T entry, RegistryEntryAttachment<R,V1> attach1, V1 value1, RegistryEntryAttachment<R,V2> attach2, V2 value2)
      Utility method to register an entry and associate values to it in multiple attachments.
      Type Parameters:
      R - type of the entries in the registry
      T - type of the entry we're currently registering (may be a subclass of R)
      V1 - type of the first attached value
      V2 - type of the second attached value
      Parameters:
      registry - target registry
      id - entry identifier
      entry - entry to register
      attach1 - first attachment
      value1 - value to associate to entry in first attachment
      attach2 - second attachment
      value2 - value to associate to entry in second attachment
      Returns:
      the newly registered entry
    • register

      public static <R, T extends R, V1, V2, V3> T register(net.minecraft.registry.Registry<R> registry, net.minecraft.util.Identifier id, T entry, RegistryEntryAttachment<R,V1> attach1, V1 value1, RegistryEntryAttachment<R,V2> attach2, V2 value2, RegistryEntryAttachment<R,V3> attach3, V3 value3)
      Utility method to register an entry and associate values to it in multiple attachments.
      Type Parameters:
      R - type of the entries in the registry
      T - type of the entry we're currently registering (may be a subclass of R)
      V1 - type of the first attached value
      V2 - type of the second attached value
      V3 - type of the third attached value
      Parameters:
      registry - target registry
      id - entry identifier
      entry - entry to register
      attach1 - first attachment
      value1 - value to associate to entry in first attachment
      attach2 - second attachment
      value2 - value to associate to entry in second attachment
      attach3 - third attachment
      value3 - value to associate to entry in third attachment
      Returns:
      the newly registered entry
    • register

      public static <R, T extends R, V1, V2, V3, V4> T register(net.minecraft.registry.Registry<R> registry, net.minecraft.util.Identifier id, T entry, RegistryEntryAttachment<R,V1> attach1, V1 value1, RegistryEntryAttachment<R,V2> attach2, V2 value2, RegistryEntryAttachment<R,V3> attach3, V3 value3, RegistryEntryAttachment<R,V4> attach4, V4 value4)
      Utility method to register an entry and associate values to it in multiple attachments.
      Type Parameters:
      R - type of the entries in the registry
      T - type of the entry we're currently registering (may be a subclass of R)
      V1 - type of the first attached value
      V2 - type of the second attached value
      V3 - type of the third attached value
      V4 - type of the fourth attached value
      Parameters:
      registry - target registry
      id - entry identifier
      entry - entry to register
      attach1 - first attachment
      value1 - value to associate to entry in first attachment
      attach2 - second attachment
      value2 - value to associate to entry in second attachment
      attach3 - third attachment
      value3 - value to associate to entry in third attachment
      attach4 - fourth attachment
      value4 - value to associate to entry in fourth attachment
      Returns:
      the newly registered entry