Record Class MaterialRule.HolderHolder
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.material.rule.MaterialRule.HolderHolder
- All Implemented Interfaces:
MaterialRule
- Enclosing interface:
MaterialRule
public static record MaterialRule.HolderHolder(Holder<MaterialRule> holder)
extends Record
implements MaterialRule
-
Nested Class Summary
Nested classes/interfaces inherited from interface MaterialRule
MaterialRule.HolderHolder -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<MaterialRule> The field for theholderrecord component.Fields inherited from interface MaterialRule
CODEC, DIRECT_CODEC, HOLDER_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionHolderHolder(Holder<MaterialRule> holder) Creates an instance of aHolderHolderrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<MaterialRule.HolderHolder> 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.holder()Returns the value of theholderrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
holder
The field for theholderrecord component.
-
-
Constructor Details
-
HolderHolder
Creates an instance of aHolderHolderrecord class.- Parameters:
holder- the value for theholderrecord component
-
-
Method Details
-
compile
- Specified by:
compilein interfaceMaterialRule
-
codec
- Specified by:
codecin 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). -
holder
Returns the value of theholderrecord component.- Returns:
- the value of the
holderrecord component
-