Record Class Climate.Parameter
java.lang.Object
java.lang.Record
net.minecraft.world.level.biome.Climate.Parameter
- Enclosing class:
Climate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<Climate.Parameter> private final longThe field for themaxrecord component.private final longThe field for theminrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionParameter(long min, long max) Creates an instance of aParameterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionlongdistance(long target) longdistance(Climate.Parameter target) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.longmax()Returns the value of themaxrecord component.longmin()Returns the value of theminrecord component.static Climate.Parameterpoint(float min) static Climate.Parameterspan(float min, float max) span(@Nullable Climate.Parameter other) static Climate.Parameterspan(Climate.Parameter min, Climate.Parameter max) toString()Returns a string representation of this record class.
-
Field Details
-
min
private final long minThe field for theminrecord component. -
max
private final long maxThe field for themaxrecord component. -
CODEC
-
-
Constructor Details
-
Parameter
public Parameter(long min, long max) Creates an instance of aParameterrecord class.- Parameters:
min- the value for theminrecord componentmax- the value for themaxrecord component
-
-
Method Details
-
point
-
span
-
span
-
toString
-
distance
public long distance(long target) -
distance
-
span
-
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. -
min
public long min()Returns the value of theminrecord component.- Returns:
- the value of the
minrecord component
-
max
public long max()Returns the value of themaxrecord component.- Returns:
- the value of the
maxrecord component
-