mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-21 07:13:49 -07:00
[ci skip] fix and improvements for docs in ConsumeEffect component (#11998)
This commit is contained in:
@@ -21,7 +21,7 @@ public interface ConsumeEffect {
|
|||||||
* Creates a consume effect that randomly teleports the entity on consumption.
|
* Creates a consume effect that randomly teleports the entity on consumption.
|
||||||
*
|
*
|
||||||
* @param diameter diameter of random teleportation
|
* @param diameter diameter of random teleportation
|
||||||
* @return the effect
|
* @return the effect instance
|
||||||
*/
|
*/
|
||||||
@Contract(value = "_ -> new", pure = true)
|
@Contract(value = "_ -> new", pure = true)
|
||||||
static TeleportRandomly teleportRandomlyEffect(final float diameter) {
|
static TeleportRandomly teleportRandomlyEffect(final float diameter) {
|
||||||
@@ -29,21 +29,21 @@ public interface ConsumeEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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
|
* @param effects the potion effects to remove
|
||||||
* @return the effect
|
* @return the effect instance
|
||||||
*/
|
*/
|
||||||
@Contract(value = "_ -> new", pure = true)
|
@Contract(value = "_ -> new", pure = true)
|
||||||
static RemoveStatusEffects removeEffects(final RegistryKeySet<PotionEffectType> key) {
|
static RemoveStatusEffects removeEffects(final RegistryKeySet<PotionEffectType> effects) {
|
||||||
return ConsumableTypesBridge.bridge().removeStatusEffects(key);
|
return ConsumableTypesBridge.bridge().removeStatusEffects(effects);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a consume effect that plays a sound on consumption.
|
* Creates a consume effect that plays a sound on consumption.
|
||||||
*
|
*
|
||||||
* @param key the sound effect to play
|
* @param key the key sound effect to play
|
||||||
* @return the effect
|
* @return the effect instance
|
||||||
*/
|
*/
|
||||||
@Contract(value = "_ -> new", pure = true)
|
@Contract(value = "_ -> new", pure = true)
|
||||||
static PlaySound playSoundConsumeEffect(final Key key) {
|
static PlaySound playSoundConsumeEffect(final Key key) {
|
||||||
@@ -53,7 +53,7 @@ public interface ConsumeEffect {
|
|||||||
/**
|
/**
|
||||||
* Creates a consume effect that clears all status effects.
|
* Creates a consume effect that clears all status effects.
|
||||||
*
|
*
|
||||||
* @return effect instance
|
* @return the effect instance
|
||||||
*/
|
*/
|
||||||
@Contract(value = "-> new", pure = true)
|
@Contract(value = "-> new", pure = true)
|
||||||
static ClearAllStatusEffects clearAllStatusEffects() {
|
static ClearAllStatusEffects clearAllStatusEffects() {
|
||||||
@@ -61,17 +61,20 @@ public interface ConsumeEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 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 effects the potion effects to apply
|
||||||
* @param probability the probability of these effects being applied, between 0 and 1 inclusive.
|
* @param probability the probability of these effects being applied, between 0 and 1 inclusive
|
||||||
* @return the effect
|
* @return the effect instance
|
||||||
*/
|
*/
|
||||||
@Contract(value = "_, _ -> new", pure = true)
|
@Contract(value = "_, _ -> new", pure = true)
|
||||||
static ApplyStatusEffects applyStatusEffects(final List<PotionEffect> effects, final float probability) {
|
static ApplyStatusEffects applyStatusEffects(final List<PotionEffect> effects, final float probability) {
|
||||||
return ConsumableTypesBridge.bridge().applyStatusEffects(effects, probability);
|
return ConsumableTypesBridge.bridge().applyStatusEffects(effects, probability);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents a consumable effect that randomly teleports the entity on consumption.
|
||||||
|
*/
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
@ApiStatus.NonExtendable
|
@ApiStatus.NonExtendable
|
||||||
interface TeleportRandomly extends ConsumeEffect {
|
interface TeleportRandomly extends ConsumeEffect {
|
||||||
@@ -85,14 +88,14 @@ public interface ConsumeEffect {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Represents a consumable effect that removes status effects on consumption
|
* Represents a consumable effect that removes status effects on consumption.
|
||||||
*/
|
*/
|
||||||
@ApiStatus.Experimental
|
@ApiStatus.Experimental
|
||||||
@ApiStatus.NonExtendable
|
@ApiStatus.NonExtendable
|
||||||
interface RemoveStatusEffects extends ConsumeEffect {
|
interface RemoveStatusEffects extends ConsumeEffect {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Potion effects to remove
|
* Potion effects to remove.
|
||||||
*
|
*
|
||||||
* @return effects
|
* @return effects
|
||||||
*/
|
*/
|
||||||
@@ -107,7 +110,7 @@ public interface ConsumeEffect {
|
|||||||
interface PlaySound extends ConsumeEffect {
|
interface PlaySound extends ConsumeEffect {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sound effect to play in the world
|
* Sound effect to play in the world.
|
||||||
*
|
*
|
||||||
* @return sound effect
|
* @return sound effect
|
||||||
*/
|
*/
|
||||||
@@ -124,16 +127,16 @@ public interface 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.Experimental
|
||||||
@ApiStatus.NonExtendable
|
@ApiStatus.NonExtendable
|
||||||
interface ApplyStatusEffects extends ConsumeEffect {
|
interface ApplyStatusEffects extends ConsumeEffect {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Effect instances to grant
|
* Potion effect instances to grant.
|
||||||
*
|
*
|
||||||
* @return effect
|
* @return potion effects
|
||||||
*/
|
*/
|
||||||
List<PotionEffect> effects();
|
List<PotionEffect> effects();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user