Record Class SheepPredicate
java.lang.Object
java.lang.Record
net.minecraft.advancements.criterion.SheepPredicate
- All Implemented Interfaces:
EntitySubPredicate
public record SheepPredicate(Optional<Boolean> sheared)
extends Record
implements EntitySubPredicate
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<SheepPredicate> The field for theshearedrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSheepPredicate(Optional<Boolean> sheared) Creates an instance of aSheepPredicaterecord class. -
Method Summary
Modifier and TypeMethodDescriptioncom.mojang.serialization.MapCodec<SheepPredicate> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static SheepPredicatehasWool()booleanmatches(Entity entity, ServerLevel level, @Nullable Vec3 position) sheared()Returns the value of theshearedrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sheared
-
CODEC
-
-
Constructor Details
-
SheepPredicate
-
-
Method Details
-
codec
- Specified by:
codecin interfaceEntitySubPredicate
-
matches
- Specified by:
matchesin interfaceEntitySubPredicate
-
hasWool
-
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). -
sheared
-