Record Class Mutation
java.lang.Object
java.lang.Record
dev.yowsef.stealablock.api.block.Mutation
public record Mutation(@NotNull String id, @NotNull String prefix, @NotNull String displayName, @NotNull String hexColor, double incomeMultiplier, double mysteryUnboxChance, int tierOrder, @Nullable String nextMutationId)
extends Record
Definition of a block mutation tier (built-in: normal, golden, diamond, rainbow; extensible by addons).
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull StringReturns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@NotNull StringhexColor()Returns the value of thehexColorrecord component.@NotNull Stringid()Returns the value of theidrecord component.doubleReturns the value of theincomeMultiplierrecord component.doubleReturns the value of themysteryUnboxChancerecord component.@Nullable StringReturns the value of thenextMutationIdrecord component.@NotNull Stringprefix()Returns the value of theprefixrecord component.intReturns the value of thetierOrderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
NORMAL
-
GOLDEN
-
DIAMOND
-
RAINBOW
-
-
Constructor Details
-
Mutation
public Mutation(@NotNull @NotNull String id, @NotNull @NotNull String prefix, @NotNull @NotNull String displayName, @NotNull @NotNull String hexColor, double incomeMultiplier, double mysteryUnboxChance, int tierOrder, @Nullable @Nullable String nextMutationId) Creates an instance of aMutationrecord class.- Parameters:
id- the value for theidrecord componentprefix- the value for theprefixrecord componentdisplayName- the value for thedisplayNamerecord componenthexColor- the value for thehexColorrecord componentincomeMultiplier- the value for theincomeMultiplierrecord componentmysteryUnboxChance- the value for themysteryUnboxChancerecord componenttierOrder- the value for thetierOrderrecord componentnextMutationId- the value for thenextMutationIdrecord component
-
-
Method Details
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
prefix
Returns the value of theprefixrecord component.- Returns:
- the value of the
prefixrecord component
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
hexColor
Returns the value of thehexColorrecord component.- Returns:
- the value of the
hexColorrecord component
-
incomeMultiplier
public double incomeMultiplier()Returns the value of theincomeMultiplierrecord component.- Returns:
- the value of the
incomeMultiplierrecord component
-
mysteryUnboxChance
public double mysteryUnboxChance()Returns the value of themysteryUnboxChancerecord component.- Returns:
- the value of the
mysteryUnboxChancerecord component
-
tierOrder
public int tierOrder()Returns the value of thetierOrderrecord component.- Returns:
- the value of the
tierOrderrecord component
-
nextMutationId
Returns the value of thenextMutationIdrecord component.- Returns:
- the value of the
nextMutationIdrecord component
-