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
FieldsModifier and TypeFieldDescriptionprivate final SurfaceRules.ConditionThe field for theconditionrecord component.private final SurfaceRules.SurfaceRuleThe field for thefollowuprecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTestRule(SurfaceRules.Condition condition, SurfaceRules.SurfaceRule followup) Creates an instance of aTestRulerecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theconditionrecord component.final booleanIndicates whether some other object is "equal to" this one.followup()Returns the value of thefollowuprecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.tryApply(int p_189805_, int p_189806_, int p_189807_)
-
Field Details
-
condition
The field for theconditionrecord component. -
followup
The field for thefollowuprecord component.
-
-
Constructor Details
-
TestRule
TestRule(SurfaceRules.Condition condition, SurfaceRules.SurfaceRule followup) Creates an instance of aTestRulerecord class.- Parameters:
condition- the value for theconditionrecord componentfollowup- the value for thefollowuprecord component
-
-
Method Details
-
tryApply
- Specified by:
tryApplyin 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 theconditionrecord component.- Returns:
- the value of the
conditionrecord component
-
followup
Returns the value of thefollowuprecord component.- Returns:
- the value of the
followuprecord component
-