Skip to content
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

[ci skip] fix and improvements for docs in ConsumeEffect component #11998

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -21,29 +21,29 @@ public interface ConsumeEffect {
* Creates a consume effect that randomly teleports the entity on consumption.
*
* @param diameter diameter of random teleportation
* @return the effect
* @return the effect instance
*/
@Contract(value = "_ -> new", pure = true)
static TeleportRandomly teleportRandomlyEffect(final float diameter) {
return ConsumableTypesBridge.bridge().teleportRandomlyEffect(diameter);
}

/**
* Creates a consume effect that gives status effects on consumption.
* Creates a consume effect that removes status effects on consumption.
*
* @param key the sound effect to play
* @return the effect
* @param effects the potion effects to remove
* @return the effect instance
*/
@Contract(value = "_ -> new", pure = true)
static RemoveStatusEffects removeEffects(final RegistryKeySet<PotionEffectType> key) {
return ConsumableTypesBridge.bridge().removeStatusEffects(key);
static RemoveStatusEffects removeEffects(final RegistryKeySet<PotionEffectType> effects) {
return ConsumableTypesBridge.bridge().removeStatusEffects(effects);
}

/**
* Creates a consume effect that plays a sound on consumption.
*
* @param key the sound effect to play
* @return the effect
* @param key the key sound effect to play
* @return the effect instance
*/
@Contract(value = "_ -> new", pure = true)
static PlaySound playSoundConsumeEffect(final Key key) {
Expand All @@ -53,25 +53,28 @@ static PlaySound playSoundConsumeEffect(final Key key) {
/**
* Creates a consume effect that clears all status effects.
*
* @return effect instance
* @return the effect instance
*/
@Contract(value = "-> new", pure = true)
static ClearAllStatusEffects clearAllStatusEffects() {
return ConsumableTypesBridge.bridge().clearAllStatusEffects();
}

/**
* Creates a consume effect that gives status effects on consumption.
* Creates a consume effect that gives potion effects on consumption.
*
* @param effects the potion effects to apply
* @param probability the probability of these effects being applied, between 0 and 1 inclusive.
* @return the effect
* @param probability the probability of these effects being applied, between 0 and 1 inclusive
* @return the effect instance
*/
@Contract(value = "_, _ -> new", pure = true)
static ApplyStatusEffects applyStatusEffects(final List<PotionEffect> effects, final float probability) {
return ConsumableTypesBridge.bridge().applyStatusEffects(effects, probability);
}

/**
* Represents a consumable effect that randomly teleports the entity on consumption.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface TeleportRandomly extends ConsumeEffect {
Expand All @@ -85,14 +88,14 @@ interface TeleportRandomly extends ConsumeEffect {
}

/**
* Represents a consumable effect that removes status effects on consumption
* Represents a consumable effect that removes status effects on consumption.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface RemoveStatusEffects extends ConsumeEffect {

/**
* Potion effects to remove
* Potion effects to remove.
*
* @return effects
*/
Expand All @@ -107,7 +110,7 @@ interface RemoveStatusEffects extends ConsumeEffect {
interface PlaySound extends ConsumeEffect {

/**
* Sound effect to play in the world
* Sound effect to play in the world.
*
* @return sound effect
*/
Expand All @@ -124,16 +127,16 @@ interface ClearAllStatusEffects extends ConsumeEffect {
}

/**
* Represents a consumable effect that applies effects based on a probability on consumption.
* Represents a consumable effect that applies potion effects based on a probability on consumption.
*/
@ApiStatus.Experimental
@ApiStatus.NonExtendable
interface ApplyStatusEffects extends ConsumeEffect {

/**
* Effect instances to grant
* Potion effect instances to grant.
*
* @return effect
* @return potion effects
*/
List<PotionEffect> effects();

Expand Down