DefaultedRegistryValue, Taggable & StringRepresentable expansion#2587
Closed
MrHell228 wants to merge 13 commits intoSpongePowered:api-14from
Closed
DefaultedRegistryValue, Taggable & StringRepresentable expansion#2587MrHell228 wants to merge 13 commits intoSpongePowered:api-14from
MrHell228 wants to merge 13 commits intoSpongePowered:api-14from
Conversation
aed78da to
090b0d0
Compare
Zidane
reviewed
Apr 1, 2025
|
|
||
| /** | ||
| * A type that may be included in one or more {@link Tag} collections. | ||
| * A {@link DefaultedRegistryValue} that may be included in one or more {@link Tag} collections. |
Member
There was a problem hiding this comment.
This feels like implementation creep onto the API where taggables must be defaulted registry values.
Contributor
Author
There was a problem hiding this comment.
ah, I forgot to revert this line, sorry. (Taggable interface extends DefaultedRegsistryValue even without this PR though)
Zidane
reviewed
Apr 1, 2025
1c2f629 to
24fe544
Compare
Contributor
Author
|
Nuked |
This reverts commit e965ac0.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
SpongeAPI | Sponge
QOL PR with big amount of lines but very small amont of actual changes.
List of changes:
TaggablehasregistryTypemethod, and I think it would be nice to have it forDefaultedRegistryValuetoo to be able to retrieve registry key just from value without need to pass registry. So oldDefaultedRegistryValuemethods moved toRegisryValueinterface (i guess it makes sense).#tags&#isinTaggablenow defaulted so interface would be more friendly for plugin devs to use.DefaultedRegistryValueandTaggablesubtypes now explicitly implement#registryType.WorldType&WorldArchetypeType) implementTaggablebecause minecraft allows adding tags for them with data packsDefaultedRegistryValuebecause they were missing itStringRepresentablebecause they were missing itIf override
RegistryValuemethods inDefaultedRegistryValue, this whole PR shouldn't cause even binary breaking change. Don't know if it's needed though.