Record Class BlendingData.Packed
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.blending.BlendingData.Packed
- Enclosing class:
BlendingData
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<BlendingData.Packed> private static final com.mojang.serialization.Codec<double[]> private final Optional<double[]> The field for theheightsrecord component.private final intThe field for themaxSectionrecord component.private final intThe field for theminSectionrecord component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Optional<double[]> heights()Returns the value of theheightsrecord component.intReturns the value of themaxSectionrecord component.intReturns the value of theminSectionrecord component.final StringtoString()Returns a string representation of this record class.private static com.mojang.serialization.DataResult<BlendingData.Packed> validateArraySize(BlendingData.Packed pPacked)
-
Field Details
-
minSection
private final int minSectionThe field for theminSectionrecord component. -
maxSection
private final int maxSectionThe field for themaxSectionrecord component. -
heights
The field for theheightsrecord component. -
DOUBLE_ARRAY_CODEC
private static final com.mojang.serialization.Codec<double[]> DOUBLE_ARRAY_CODEC -
CODEC
-
-
Constructor Details
-
Packed
Creates an instance of aPackedrecord class.- Parameters:
minSection- the value for theminSectionrecord componentmaxSection- the value for themaxSectionrecord componentheights- the value for theheightsrecord component
-
-
Method Details
-
validateArraySize
private static com.mojang.serialization.DataResult<BlendingData.Packed> validateArraySize(BlendingData.Packed pPacked) -
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 '=='. -
minSection
public int minSection()Returns the value of theminSectionrecord component.- Returns:
- the value of the
minSectionrecord component
-
maxSection
public int maxSection()Returns the value of themaxSectionrecord component.- Returns:
- the value of the
maxSectionrecord component
-
heights
Returns the value of theheightsrecord component.- Returns:
- the value of the
heightsrecord component
-