-
-
Notifications
You must be signed in to change notification settings - Fork 341
Add ItemActionEffects #2585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: api-14
Are you sure you want to change the base?
Add ItemActionEffects #2585
Conversation
5f0a59e
to
c0b74b5
Compare
Actually, ConsumeEffect might be not the best name because DEATH_PROTECTION component also uses them. Can't think of a different name though |
More fitting names could be |
e70c4d9
to
e0debb6
Compare
|
/** | ||
* The set of {@link PotionEffect}s applied on use of an {@link ItemStack}. | ||
*/ | ||
public static final Key<WeightedCollectionValue<PotionEffect>> APPLICABLE_POTION_EFFECTS = Keys.weightedKey(ResourceKey.sponge("applicable_potion_effects"), PotionEffect.class); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because API-14 have been released, this would be a breaking change. Rebase the PR to API-15 or keep this key for now and remove it in later versions.
|
I don't mind renaming it to |
Well, that's just my opinion, I'm not 100% sure |
I prefer shorter names overall though here I'm not 100% sure as well :/ |
Renamed to |
SpongeAPI | Sponge
Exposes
ConsumeEffect
s, addsKeys.CONSUME_EFFECTS
andKeys.DEATH_PROTECTION_EFFECTS
to apply them toItemStack
.Currently
Keys.APPLICABLE_POTION_EFFECTS
does nothing and itsWeithedTable
approach doesn't make much sense anymore so I think it would be better to just delete it.