-
Notifications
You must be signed in to change notification settings - Fork 430
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add vararg helper methods for multi-tag support in the FabricTagBuilder #4452
Merged
+52
−5
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
modmuss50
reviewed
Feb 19, 2025
...tion-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/provider/FabricTagProvider.java
Outdated
Show resolved
Hide resolved
modmuss50
approved these changes
Feb 19, 2025
Just some checkstyle failuires now, you need a blank line after the for loop. |
apple502j
reviewed
Feb 20, 2025
...tion-api-v1/src/main/java/net/fabricmc/fabric/api/datagen/v1/provider/FabricTagProvider.java
Outdated
Show resolved
Hide resolved
modmuss50
approved these changes
Feb 20, 2025
modmuss50
pushed a commit
that referenced
this pull request
Feb 20, 2025
…er (#4452) * Add multiple helper varargs methods for tags * Fixed a bit the JavaDocs grammar * More clarity for the addTags in JavaDocs * Changed the Stream.of() with a for loop * Added blank lines after block at same indentation level * Small grammar mistakes * Changed the `add(T... elements)` to use for loop instead of `Stream.of()` (cherry picked from commit 60b6f1b)
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
enhancement
New feature or request
last call
If you care, make yourself heard right away!
merge me please
Pull requests that are ready to merge
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This makes it possible to use multiple arguments in the new addTags methods so that modders using datagen (like me) no loger have to call the
addTag()
method for eachTagKey<T>
.This PR will add the following vararg methods:
Also changed the JavaDocs at line 421 to link the
addOptionalTag(TagKey<T>)
instead of* If not, use {@link #addOptionalTag(Identifier)} instead.
Also changed the
add(T... elements)
method to use a for loop instead of aStream.of()
: