Record Class ComponentsPredicate
java.lang.Object
java.lang.Record
net.minecraft.predicate.component.ComponentsPredicate
- Record Components:
exact-partial-
- All Implemented Interfaces:
Predicate<ComponentsAccess>
public record ComponentsPredicate(ComponentMapPredicate exact, Map<ComponentPredicate.Type<?>,ComponentPredicate> partial)
extends Record
implements Predicate<ComponentsAccess>
- Mappings:
Namespace Name named net/minecraft/predicate/component/ComponentsPredicateintermediary net/minecraft/class_10914official bonamed exactintermediary comp_3833official dnamed partialintermediary comp_3834official e
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.MapCodec<ComponentsPredicate> static final ComponentsPredicateprivate final ComponentMapPredicateThe field for theexactrecord component.static final PacketCodec<RegistryByteBuf, ComponentsPredicate> private final Map<ComponentPredicate.Type<?>, ComponentPredicate> The field for thepartialrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionComponentsPredicate(ComponentMapPredicate componentMapPredicate, Map<ComponentPredicate.Type<?>, ComponentPredicate> map) -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.exact()Returns the value of theexactrecord component.final inthashCode()Returns a hash code value for this object.booleanisEmpty()partial()Returns the value of thepartialrecord component.booleantest(ComponentsAccess componentsAccess) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
exact
The field for theexactrecord component. -
partial
The field for thepartialrecord component. -
EMPTY
- Mappings:
Namespace Name Mixin selector named EMPTYLnet/minecraft/predicate/component/ComponentsPredicate;EMPTY:Lnet/minecraft/predicate/component/ComponentsPredicate;intermediary field_58044Lnet/minecraft/class_10914;field_58044:Lnet/minecraft/class_10914;official aLbo;a:Lbo;
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/predicate/component/ComponentsPredicate;CODEC:Lcom/mojang/serialization/MapCodec;intermediary field_58045Lnet/minecraft/class_10914;field_58045:Lcom/mojang/serialization/MapCodec;official bLbo;b:Lcom/mojang/serialization/MapCodec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/predicate/component/ComponentsPredicate;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_58046Lnet/minecraft/class_10914;field_58046:Lnet/minecraft/class_9139;official cLbo;c:Lze;
-
-
Constructor Details
-
ComponentsPredicate
public ComponentsPredicate(ComponentMapPredicate componentMapPredicate, Map<ComponentPredicate.Type<?>, ComponentPredicate> map)
-
-
Method Details
-
test
- Specified by:
testin interfacePredicate<ComponentsAccess>- Mappings:
Namespace Name Mixin selector named testLnet/minecraft/predicate/component/ComponentsPredicate;test(Lnet/minecraft/component/ComponentsAccess;)Zintermediary method_68682Lnet/minecraft/class_10914;method_68682(Lnet/minecraft/class_9473;)Zofficial aLbo;a(Lkg;)Z
-
isEmpty
public boolean isEmpty()- Mappings:
Namespace Name Mixin selector named isEmptyLnet/minecraft/predicate/component/ComponentsPredicate;isEmpty()Zintermediary method_68680Lnet/minecraft/class_10914;method_68680()Zofficial aLbo;a()Z
-
toString
Returns 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. -
hashCode
public 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. -
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). -
exact
Returns the value of theexactrecord component.- Returns:
- the value of the
exactrecord component
-
partial
Returns the value of thepartialrecord component.- Returns:
- the value of the
partialrecord component
-