Record Class WorldModifiers
java.lang.Object
java.lang.Record
com.viaversion.viaaprilfools.api.minecraft.item.WorldModifiers
- All Implemented Interfaces:
com.viaversion.viaversion.util.Copyable
public record WorldModifiers(int[] effects, boolean includeDescription)
extends Record
implements com.viaversion.viaversion.util.Copyable
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.viaversion.viaversion.api.type.Type<WorldModifiers> -
Constructor Summary
ConstructorsConstructorDescriptionWorldModifiers(int[] effects, boolean includeDescription) Creates an instance of aWorldModifiersrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncopy()int[]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.booleanReturns the value of theincludeDescriptionrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
TYPE
-
-
Constructor Details
-
WorldModifiers
public WorldModifiers(int[] effects, boolean includeDescription) Creates an instance of aWorldModifiersrecord class.- Parameters:
effects- the value for theeffectsrecord componentincludeDescription- the value for theincludeDescriptionrecord component
-
-
Method Details
-
copy
- Specified by:
copyin interfacecom.viaversion.viaversion.util.Copyable
-
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
public int[] effects()Returns the value of theeffectsrecord component.- Returns:
- the value of the
effectsrecord component
-
includeDescription
public boolean includeDescription()Returns the value of theincludeDescriptionrecord component.- Returns:
- the value of the
includeDescriptionrecord component
-