Class RegistryExtensions
java.lang.Object
org.quiltmc.qsl.registry.attachment.api.RegistryExtensions
Extensions for working with
Registrys.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <R,T extends R, V1>
Tregister(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.static <R,T extends R, V1, V2>
Tregister(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.static <R,T extends R, V1, V2, V3>
Tregister(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.static <R,T extends R, V1, V2, V3, V4>
Tregister(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.
-
Constructor Details
-
RegistryExtensions
public RegistryExtensions()
-
-
Method Details
-
register
public static <R,T extends R, T registerV1> (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 registryT- type of the entry we're currently registering (may be a subclass ofR)V1- type of the attached value- Parameters:
registry- target registryid- entry identifierentry- entry to registerattach1- attachmentvalue1- value to associate to entry in attachment- Returns:
- the newly registered entry
-
register
public static <R,T extends R, T registerV1, V2> (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 registryT- type of the entry we're currently registering (may be a subclass ofR)V1- type of the first attached valueV2- type of the second attached value- Parameters:
registry- target registryid- entry identifierentry- entry to registerattach1- first attachmentvalue1- value to associate to entry in first attachmentattach2- second attachmentvalue2- value to associate to entry in second attachment- Returns:
- the newly registered entry
-
register
public static <R,T extends R, T registerV1, V2, V3> (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 registryT- type of the entry we're currently registering (may be a subclass ofR)V1- type of the first attached valueV2- type of the second attached valueV3- type of the third attached value- Parameters:
registry- target registryid- entry identifierentry- entry to registerattach1- first attachmentvalue1- value to associate to entry in first attachmentattach2- second attachmentvalue2- value to associate to entry in second attachmentattach3- third attachmentvalue3- value to associate to entry in third attachment- Returns:
- the newly registered entry
-
register
public static <R,T extends R, T registerV1, V2, V3, V4> (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 registryT- type of the entry we're currently registering (may be a subclass ofR)V1- type of the first attached valueV2- type of the second attached valueV3- type of the third attached valueV4- type of the fourth attached value- Parameters:
registry- target registryid- entry identifierentry- entry to registerattach1- first attachmentvalue1- value to associate to entry in first attachmentattach2- second attachmentvalue2- value to associate to entry in second attachmentattach3- third attachmentvalue3- value to associate to entry in third attachmentattach4- fourth attachmentvalue4- value to associate to entry in fourth attachment- Returns:
- the newly registered entry
-