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> valueCodec) final booleanIndicates whether some other object is "equal to" this one.filtered()Returns the value of thefilteredrecord component.static Filterable<String> from(FilteredText text) get(boolean filterEnabled) final inthashCode()Returns a hash code value for this object.<U> Filterable<U> static <T> Filterable<T> passThrough(T value) 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> valueCodec) final StringtoString()Returns a string representation of this record class.
-
Field Details
-
raw
The field for therawrecord component. -
filtered
-
-
Constructor Details
-
Filterable
-
-
Method Details
-
codec
public static <T> com.mojang.serialization.Codec<Filterable<T>> codec(com.mojang.serialization.Codec<T> valueCodec) -
streamCodec
public static <B extends io.netty.buffer.ByteBuf, T> StreamCodec<B, Filterable<T>> streamCodec(StreamCodec<B, T> valueCodec) -
passThrough
-
from
-
get
-
map
-
resolve
-
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). -
raw
Returns the value of therawrecord component.- Returns:
- the value of the
rawrecord component
-
filtered
-