Record Class SurfaceRules.TestRule
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.SurfaceRules.TestRule
- All Implemented Interfaces:
SurfaceRules.SurfaceRule
- Enclosing class:
SurfaceRules
static record SurfaceRules.TestRule(SurfaceRules.Condition condition, SurfaceRules.SurfaceRule followup)
extends Record
implements SurfaceRules.SurfaceRule
-
Field Summary
Modifier and TypeFieldDescriptionprivate final SurfaceRules.Condition
The field for thecondition
record component.private final SurfaceRules.SurfaceRule
The field for thefollowup
record component. -
Constructor Summary
ConstructorDescriptionTestRule
(SurfaceRules.Condition condition, SurfaceRules.SurfaceRule followup) Creates an instance of aTestRule
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecondition
record component.final boolean
Indicates whether some other object is "equal to" this one.followup()
Returns the value of thefollowup
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.tryApply
(int p_189805_, int p_189806_, int p_189807_)
-
Field Details
-
condition
The field for thecondition
record component. -
followup
The field for thefollowup
record component.
-
-
Constructor Details
-
TestRule
TestRule(SurfaceRules.Condition condition, SurfaceRules.SurfaceRule followup) Creates an instance of aTestRule
record class.- Parameters:
condition
- the value for thecondition
record componentfollowup
- the value for thefollowup
record component
-
-
Method Details
-
tryApply
- Specified by:
tryApply
in interfaceSurfaceRules.SurfaceRule
-
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 withObjects::equals(Object,Object)
. -
condition
Returns the value of thecondition
record component.- Returns:
- the value of the
condition
record component
-
followup
Returns the value of thefollowup
record component.- Returns:
- the value of the
followup
record component
-