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
private 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
ConstructorsModifierConstructorDescriptionprivateTestRule(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.@Nullable BlockStatetryApply(int blockX, int blockY, int blockZ)
-
Field Details
-
condition
The field for theconditionrecord component. -
followup
The field for thefollowuprecord component.
-
-
Constructor Details
-
TestRule
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
-
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 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
-