Record Class SuspiciousStewEffects
java.lang.Object
java.lang.Record
fr.fidorial.item.component.SuspiciousStewEffects
- Record Components:
effects- the effects, in the order they are given
The effects a suspicious stew gives whoever eats it, under
minecraft:suspicious_stew_effects.- Since:
- 0.1.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne effect of a suspicious stew. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intHow long an effect lasts when its duration is not given, in ticks.static final SuspiciousStewEffectsNo effect at all. -
Constructor Summary
ConstructorsConstructorDescriptionCreates the effects of a suspicious stew. -
Method Summary
Modifier and TypeMethodDescriptioneffects()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.static SuspiciousStewEffectsReturns the effects of a stew that gives a single effect.plus(SuspiciousStewEffects.Entry entry) Returns these effects followed by one more.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_DURATION
public static final int DEFAULT_DURATIONHow long an effect lasts when its duration is not given, in ticks.- Since:
- 0.1.0
- See Also:
-
EMPTY
-
-
Constructor Details
-
SuspiciousStewEffects
Creates the effects of a suspicious stew.- Parameters:
effects- the effects, in the order they are given- Since:
- 0.1.0
-
-
Method Details
-
of
Returns the effects of a stew that gives a single effect.- Parameters:
effect- the effectduration- how long it lasts, in ticks- Returns:
- the effects of a stew that gives a single effect
- Since:
- 0.1.0
-
plus
Returns these effects followed by one more.- Parameters:
entry- the effect to append- Returns:
- these effects followed by one more
- Since:
- 0.1.0
-
toString
-
hashCode
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
effects
-