Record Class ConsumeEffect.ApplyEffects
java.lang.Object
java.lang.Record
org.geysermc.mcprotocollib.protocol.data.game.item.component.ConsumeEffect.ApplyEffects
- All Implemented Interfaces:
ConsumeEffect
- Enclosing interface:
- ConsumeEffect
public static record ConsumeEffect.ApplyEffects(List<MobEffectInstance> effects, float probability)
extends Record
implements ConsumeEffect
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface org.geysermc.mcprotocollib.protocol.data.game.item.component.ConsumeEffect
ConsumeEffect.ApplyEffects, ConsumeEffect.ClearAllEffects, ConsumeEffect.PlaySound, ConsumeEffect.RemoveEffects, ConsumeEffect.TeleportRandomly -
Constructor Summary
ConstructorsConstructorDescriptionApplyEffects(List<MobEffectInstance> effects, float probability) Creates an instance of aApplyEffectsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic @NonNull ConsumeEffect.ApplyEffects.ApplyEffectsBuilderbuilder()effects()Returns the value of theeffectsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatReturns the value of theprobabilityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ApplyEffects
Creates an instance of aApplyEffectsrecord class.- Parameters:
effects- the value for theeffectsrecord componentprobability- the value for theprobabilityrecord component
-
-
Method Details
-
builder
-
toBuilder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
effects
Returns the value of theeffectsrecord component.- Returns:
- the value of the
effectsrecord component
-
probability
public float probability()Returns the value of theprobabilityrecord component.- Returns:
- the value of the
probabilityrecord component
-