Record Class NotCondition
java.lang.Object
java.lang.Record
net.minecraft.world.level.levelgen.material.condition.NotCondition
- All Implemented Interfaces:
MaterialCondition
-
Nested Class Summary
Nested classes/interfaces inherited from interface MaterialCondition
MaterialCondition.HolderHolder -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<NotCondition> private final MaterialConditionThe field for thetargetrecord component.Fields inherited from interface MaterialCondition
DIRECT_CODEC -
Constructor Summary
ConstructorsConstructorDescriptionNotCondition(MaterialCondition target) Creates an instance of aNotConditionrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<NotCondition> 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.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
target
The field for thetargetrecord component. -
CODEC
-
-
Constructor Details
-
NotCondition
Creates an instance of aNotConditionrecord class.- Parameters:
target- the value for thetargetrecord component
-
-
Method Details
-
codec
- Specified by:
codecin interfaceMaterialCondition
-
compile
- Specified by:
compilein interfaceMaterialCondition
-
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). -
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-