Record Class JigsawStructure.MaxDistance
java.lang.Object
java.lang.Record
dev.wyck.worldgen.structure.types.JigsawStructure.MaxDistance
- Record Components:
horizontal- the horizontal reach in blocks, from 1 to 128vertical- the vertical reach in blocks
- Enclosing interface:
JigsawStructure
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe vertical reach vanilla uses when none is given: the full height of a dimension. -
Constructor Summary
ConstructorsConstructorDescriptionMaxDistance(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.static JigsawStructure.MaxDistanceof(int distance) Creates a maximum distance that is the same horizontally and vertically, as vanilla's single-number form does.static JigsawStructure.MaxDistanceof(int horizontal, int vertical) Creates a maximum distance.final StringtoString()Returns a string representation of this record class.intvertical()Returns the value of theverticalrecord component.
-
Field Details
-
DEFAULT_VERTICAL
The vertical reach vanilla uses when none is given: the full height of a dimension.- See Also:
-
-
Constructor Details
-
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
-
of
Creates a maximum distance that is the same horizontally and vertically, as vanilla's single-number form does.- Parameters:
distance- the reach in blocks- Returns:
- the maximum distance
- Since:
- 3.4.0
-
of
Creates a maximum distance.- Parameters:
horizontal- the horizontal reach in blocksvertical- the vertical reach in blocks- Returns:
- the maximum distance
- Since:
- 3.4.0
-
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. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
horizontal
public int horizontal()Returns the value of thehorizontalrecord component.- Returns:
- the value of the
horizontalrecord component
-
vertical
-