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 SummaryFieldsModifier and TypeFieldDescriptionprivate final SurfaceRules.ConditionThe field for theconditionrecord component.private final SurfaceRules.SurfaceRuleThe field for thefollowuprecord component.
- 
Constructor SummaryConstructorsConstructorDescriptionTestRule(SurfaceRules.Condition condition, SurfaceRules.SurfaceRule followup) Creates an instance of aTestRulerecord class.
- 
Method SummaryModifier 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- 
conditionThe field for theconditionrecord component.
- 
followupThe field for thefollowuprecord component.
 
- 
- 
Constructor Details- 
TestRuleTestRule(SurfaceRules.Condition condition, SurfaceRules.SurfaceRule followup) Creates an instance of aTestRulerecord class.- Parameters:
- condition- the value for the- conditionrecord component
- followup- the value for the- followuprecord component
 
 
- 
- 
Method Details- 
tryApply- Specified by:
- tryApplyin interface- SurfaceRules.SurfaceRule
 
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
conditionReturns the value of theconditionrecord component.- Returns:
- the value of the conditionrecord component
 
- 
followupReturns the value of thefollowuprecord component.- Returns:
- the value of the followuprecord component
 
 
-