Package net.minecraft.server.network
Record Class Filterable<T>
java.lang.Object
java.lang.Record
net.minecraft.server.network.Filterable<T>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFilterable(T raw, Optional<T> filtered) Creates an instance of aFilterablerecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> com.mojang.serialization.Codec<Filterable<T>> codec(com.mojang.serialization.Codec<T> pCodec) final booleanIndicates whether some other object is "equal to" this one.filtered()Returns the value of thefilteredrecord component.static Filterable<String> from(FilteredText pFilteredText) get(boolean pFiltered) final inthashCode()Returns a hash code value for this object.<U> Filterable<U> static <T> Filterable<T> passThrough(T p_330890_) raw()Returns the value of therawrecord component.<U> Optional<Filterable<U>> static <B extends io.netty.buffer.ByteBuf,T>
StreamCodec<B, Filterable<T>> streamCodec(StreamCodec<B, T> pCodec) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
raw
The field for therawrecord component. -
filtered
The field for thefilteredrecord component.
-
-
Constructor Details
-
Filterable
Creates an instance of aFilterablerecord class.- Parameters:
raw- the value for therawrecord componentfiltered- the value for thefilteredrecord component
-
-
Method Details
-
codec
public static <T> com.mojang.serialization.Codec<Filterable<T>> codec(com.mojang.serialization.Codec<T> pCodec) -
streamCodec
public static <B extends io.netty.buffer.ByteBuf,T> StreamCodec<B,Filterable<T>> streamCodec(StreamCodec<B, T> pCodec) -
passThrough
-
from
-
get
-
map
-
resolve
-
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). -
raw
Returns the value of therawrecord component.- Returns:
- the value of the
rawrecord component
-
filtered
Returns the value of thefilteredrecord component.- Returns:
- the value of the
filteredrecord component
-