mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-13 16:54:22 +00:00
Datagen addOptionalTag/s methods that allow passing the TagKey itself instead of passing the location (#9807) (#9808)
This commit is contained in:
1 parent
78fffcf45a
commit
70d700e630
1 file changed
+13
@@ -25,6 +25,19 @@ public interface IForgeTagAppender<T>
|
||||
return builder;
|
||||
}
|
||||
|
||||
default TagsProvider.TagAppender<T> addOptionalTag(TagKey<T> value) {
|
||||
return self().addOptionalTag(value.location());
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
default TagsProvider.TagAppender<T> addOptionalTags(TagKey<T>... values) {
|
||||
TagsProvider.TagAppender<T> builder = self();
|
||||
for (TagKey<T> value : values) {
|
||||
builder.addOptionalTag(value.location());
|
||||
}
|
||||
return builder;
|
||||
}
|
||||
|
||||
default TagsProvider.TagAppender<T> replace() {
|
||||
return replace(true);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user