Record Class RawFilteredPair<T>

java.lang.Object
java.lang.Record
net.minecraft.text.RawFilteredPair<T>
Record Components:
raw -
filtered -

public record RawFilteredPair<T>(T raw, Optional<T> filtered) extends Record
Mappings:
Namespace Name
named net/minecraft/text/RawFilteredPair
intermediary net/minecraft/class_9262
official ark
named raw
intermediary comp_2369
official a
named filtered
intermediary comp_2370
official b
  • Field Details

    • raw

      private final T raw
      The field for the raw record component.
    • filtered

      private final Optional<T> filtered
      The field for the filtered record component.
  • Constructor Details

    • RawFilteredPair

      public RawFilteredPair(T t, Optional<T> optional)
  • Method Details

    • createCodec

      public static <T> com.mojang.serialization.Codec<RawFilteredPair<T>> createCodec(com.mojang.serialization.Codec<T> baseCodec)
      Mappings:
      Namespace Name Mixin selector
      named createCodec Lnet/minecraft/text/RawFilteredPair;createCodec(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      intermediary method_57135 Lnet/minecraft/class_9262;method_57135(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
      official a Lark;a(Lcom/mojang/serialization/Codec;)Lcom/mojang/serialization/Codec;
    • createPacketCodec

      public static <B extends ByteBuf, T> PacketCodec<B,RawFilteredPair<T>> createPacketCodec(PacketCodec<B,T> basePacketCodec)
      Mappings:
      Namespace Name Mixin selector
      named createPacketCodec Lnet/minecraft/text/RawFilteredPair;createPacketCodec(Lnet/minecraft/network/codec/PacketCodec;)Lnet/minecraft/network/codec/PacketCodec;
      intermediary method_57139 Lnet/minecraft/class_9262;method_57139(Lnet/minecraft/class_9139;)Lnet/minecraft/class_9139;
      official a Lark;a(Lyw;)Lyw;
    • of

      public static <T> RawFilteredPair<T> of(T raw)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/text/RawFilteredPair;of(Ljava/lang/Object;)Lnet/minecraft/text/RawFilteredPair;
      intermediary method_57137 Lnet/minecraft/class_9262;method_57137(Ljava/lang/Object;)Lnet/minecraft/class_9262;
      official a Lark;a(Ljava/lang/Object;)Lark;
    • of

      public static RawFilteredPair<String> of(FilteredMessage message)
      Mappings:
      Namespace Name Mixin selector
      named of Lnet/minecraft/text/RawFilteredPair;of(Lnet/minecraft/server/filter/FilteredMessage;)Lnet/minecraft/text/RawFilteredPair;
      intermediary method_57134 Lnet/minecraft/class_9262;method_57134(Lnet/minecraft/class_5837;)Lnet/minecraft/class_9262;
      official a Lark;a(Larl;)Lark;
    • get

      public T get(boolean shouldFilter)
      Mappings:
      Namespace Name Mixin selector
      named get Lnet/minecraft/text/RawFilteredPair;get(Z)Ljava/lang/Object;
      intermediary method_57140 Lnet/minecraft/class_9262;method_57140(Z)Ljava/lang/Object;
      official a Lark;a(Z)Ljava/lang/Object;
    • map

      public <U> RawFilteredPair<U> map(Function<T,U> mapper)
      Mappings:
      Namespace Name Mixin selector
      named map Lnet/minecraft/text/RawFilteredPair;map(Ljava/util/function/Function;)Lnet/minecraft/text/RawFilteredPair;
      intermediary method_57138 Lnet/minecraft/class_9262;method_57138(Ljava/util/function/Function;)Lnet/minecraft/class_9262;
      official a Lark;a(Ljava/util/function/Function;)Lark;
    • resolve

      public <U> Optional<RawFilteredPair<U>> resolve(Function<T,Optional<U>> resolver)
      Mappings:
      Namespace Name Mixin selector
      named resolve Lnet/minecraft/text/RawFilteredPair;resolve(Ljava/util/function/Function;)Ljava/util/Optional;
      intermediary method_57141 Lnet/minecraft/class_9262;method_57141(Ljava/util/function/Function;)Ljava/util/Optional;
      official b Lark;b(Ljava/util/function/Function;)Ljava/util/Optional;
    • toString

      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

      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

      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.
    • raw

      public T raw()
      Returns the value of the raw record component.
      Returns:
      the value of the raw record component
    • filtered

      public Optional<T> filtered()
      Returns the value of the filtered record component.
      Returns:
      the value of the filtered record component