Record Class SequenceRule
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.material.rule.SequenceRule
- All Implemented Interfaces:
MaterialRule
-
Nested Class Summary
Nested classes/interfaces inherited from interface MaterialRule
MaterialRule.HolderHolder -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SequenceRule> private final List<MaterialRule> The field for thesequencerecord component.Fields inherited from interface MaterialRule
DIRECT_CODEC, HOLDER_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionSequenceRule(List<MaterialRule> sequence) Creates an instance of aSequenceRulerecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<SequenceRule> codec()compile(MaterialRuleContext context) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sequence()Returns the value of thesequencerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sequence
The field for thesequencerecord component. -
CODEC
-
-
Constructor Details
-
SequenceRule
Creates an instance of aSequenceRulerecord class.- Parameters:
sequence- the value for thesequencerecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceMaterialRule
-
compile
- Specified by:
compilein interfaceMaterialRule
-
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). -
sequence
Returns the value of thesequencerecord component.- Returns:
- the value of the
sequencerecord component
-