File tree Expand file tree Collapse file tree 1 file changed +16
-1
lines changed
src/main/java/org/spongepowered/api/tag Expand file tree Collapse file tree 1 file changed +16
-1
lines changed Original file line number Diff line number Diff line change 3030import org .spongepowered .api .Sponge ;
3131import org .spongepowered .api .block .BlockType ;
3232import org .spongepowered .api .registry .DefaultedRegistryType ;
33+ import org .spongepowered .api .registry .RegistryType ;
3334
3435/**
3536 * A {@link ResourceKey resource keyed} collection of {@link Taggable} values
4950 */
5051public interface Tag <T > extends ResourceKeyed {
5152
53+ /**
54+ * Gets the {@link RegistryType location} defining the parent registry.
55+ *
56+ * @return The location
57+ */
58+ RegistryType <T > registry ();
59+
5260 interface Factory {
53- <T > Tag <T > of (DefaultedRegistryType <T > registryType , ResourceKey key );
61+ default <T > Tag <T > of (DefaultedRegistryType <T > registryType , ResourceKey key ) {
62+ return this .of ((RegistryType <T >) registryType , key );
63+ }
64+
65+ <T > Tag <T > of (RegistryType <T > registryType , ResourceKey key );
5466 }
5567
5668 static <T > Tag <T > of (DefaultedRegistryType <T > registryType , ResourceKey key ) {
5769 return Sponge .game ().factoryProvider ().provide (Tag .Factory .class ).of (registryType , key );
5870 }
5971
72+ static <T > Tag <T > of (RegistryType <T > registryType , ResourceKey key ) {
73+ return Sponge .game ().factoryProvider ().provide (Tag .Factory .class ).of (registryType , key );
74+ }
6075}
You can’t perform that action at this time.
0 commit comments