Record Class JigsawStructure.MaxDistance
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.structure.structures.JigsawStructure.MaxDistance
- Enclosing class:
JigsawStructure
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<JigsawStructure.MaxDistance> private static final com.mojang.serialization.Codec<JigsawStructure.MaxDistance> private final intThe field for thehorizontalrecord component.private static final com.mojang.serialization.Codec<Integer> private final intThe field for theverticalrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionMaxDistance(int p_433607_) MaxDistance(int horizontal, int vertical) Creates an instance of aMaxDistancerecord class. -
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.intReturns the value of thehorizontalrecord component.final StringtoString()Returns a string representation of this record class.intvertical()Returns the value of theverticalrecord component.
-
Field Details
-
horizontal
private final int horizontalThe field for thehorizontalrecord component. -
vertical
private final int verticalThe field for theverticalrecord component. -
HORIZONTAL_VALUE_CODEC
-
FULL_CODEC
-
CODEC
-
-
Constructor Details
-
MaxDistance
public MaxDistance(int p_433607_) -
MaxDistance
public MaxDistance(int horizontal, int vertical) Creates an instance of aMaxDistancerecord class.- Parameters:
horizontal- the value for thehorizontalrecord componentvertical- the value for theverticalrecord component
-
-
Method Details
-
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. All components in this record class are compared with '=='. -
horizontal
public int horizontal()Returns the value of thehorizontalrecord component.- Returns:
- the value of the
horizontalrecord component
-
vertical
public int vertical()Returns the value of theverticalrecord component.- Returns:
- the value of the
verticalrecord component
-