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/ComponentsPredicate
intermediary net/minecraft/class_10914
official bo
named exact
intermediary comp_3833
official d
named partial
intermediary comp_3834
official e
  • Field Details Link icon

    • exact Link icon

      private final ComponentMapPredicate exact
      The field for the exact record component.
    • partial Link icon

      private final Map<ComponentPredicate.Type<?>,ComponentPredicate> partial
      The field for the partial record component.
    • EMPTY Link icon

      public static final ComponentsPredicate EMPTY
      Mappings:
      Namespace Name Mixin selector
      named EMPTY Lnet/minecraft/predicate/component/ComponentsPredicate;EMPTY:Lnet/minecraft/predicate/component/ComponentsPredicate;
      intermediary field_58044 Lnet/minecraft/class_10914;field_58044:Lnet/minecraft/class_10914;
      official a Lbo;a:Lbo;
    • CODEC Link icon

      public static final com.mojang.serialization.MapCodec<ComponentsPredicate> CODEC
      Mappings:
      Namespace Name Mixin selector
      named CODEC Lnet/minecraft/predicate/component/ComponentsPredicate;CODEC:Lcom/mojang/serialization/MapCodec;
      intermediary field_58045 Lnet/minecraft/class_10914;field_58045:Lcom/mojang/serialization/MapCodec;
      official b Lbo;b:Lcom/mojang/serialization/MapCodec;
    • PACKET_CODEC Link icon

      public static final PacketCodec<RegistryByteBuf,ComponentsPredicate> PACKET_CODEC
      Mappings:
      Namespace Name Mixin selector
      named PACKET_CODEC Lnet/minecraft/predicate/component/ComponentsPredicate;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
      intermediary field_58046 Lnet/minecraft/class_10914;field_58046:Lnet/minecraft/class_9139;
      official c Lbo;c:Lze;
  • Constructor Details Link icon

  • Method Details Link icon

    • test Link icon

      public boolean test(ComponentsAccess componentsAccess)
      Specified by:
      test in interface Predicate<ComponentsAccess>
      Mappings:
      Namespace Name Mixin selector
      named test Lnet/minecraft/predicate/component/ComponentsPredicate;test(Lnet/minecraft/component/ComponentsAccess;)Z
      intermediary method_68682 Lnet/minecraft/class_10914;method_68682(Lnet/minecraft/class_9473;)Z
      official a Lbo;a(Lkg;)Z
    • isEmpty Link icon

      public boolean isEmpty()
      Mappings:
      Namespace Name Mixin selector
      named isEmpty Lnet/minecraft/predicate/component/ComponentsPredicate;isEmpty()Z
      intermediary method_68680 Lnet/minecraft/class_10914;method_68680()Z
      official a Lbo;a()Z
    • toString Link icon

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode Link icon

      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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals Link icon

      public final boolean equals(Object object)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      object - the object with which to compare
      Returns:
      true if this object is the same as the object argument; false otherwise.
    • exact Link icon

      public ComponentMapPredicate exact()
      Returns the value of the exact record component.
      Returns:
      the value of the exact record component
    • partial Link icon

      Returns the value of the partial record component.
      Returns:
      the value of the partial record component