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 theheights
record component.private final int
The field for themaxSection
record component.private final int
The field for theminSection
record component. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Optional
<double[]> heights()
Returns the value of theheights
record component.int
Returns the value of themaxSection
record component.int
Returns the value of theminSection
record component.final String
toString()
Returns a string representation of this record class.private static com.mojang.serialization.DataResult
<BlendingData.Packed> validateArraySize
(BlendingData.Packed p_360312_)
-
Field Details
-
minSection
private final int minSectionThe field for theminSection
record component. -
maxSection
private final int maxSectionThe field for themaxSection
record component. -
heights
The field for theheights
record component. -
DOUBLE_ARRAY_CODEC
private static final com.mojang.serialization.Codec<double[]> DOUBLE_ARRAY_CODEC -
CODEC
-
-
Constructor Details
-
Packed
Creates an instance of aPacked
record class.- Parameters:
minSection
- the value for theminSection
record componentmaxSection
- the value for themaxSection
record componentheights
- the value for theheights
record component
-
-
Method Details
-
validateArraySize
private static com.mojang.serialization.DataResult<BlendingData.Packed> validateArraySize(BlendingData.Packed p_360312_) -
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 theminSection
record component.- Returns:
- the value of the
minSection
record component
-
maxSection
public int maxSection()Returns the value of themaxSection
record component.- Returns:
- the value of the
maxSection
record component
-
heights
Returns the value of theheights
record component.- Returns:
- the value of the
heights
record component
-