Package net.minecraft.server
Record Class ServerLinks.UntrustedEntry
java.lang.Object
java.lang.Record
net.minecraft.server.ServerLinks.UntrustedEntry
- Enclosing class:
ServerLinks
public static record ServerLinks.UntrustedEntry(com.mojang.datafixers.util.Either<ServerLinks.KnownLinkType,Component> type, String link)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for thelinkrecord component.static final StreamCodec<io.netty.buffer.ByteBuf, ServerLinks.UntrustedEntry> private final com.mojang.datafixers.util.Either<ServerLinks.KnownLinkType, Component> The field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionUntrustedEntry(com.mojang.datafixers.util.Either<ServerLinks.KnownLinkType, Component> type, String link) Creates an instance of aUntrustedEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.link()Returns the value of thelinkrecord component.final StringtoString()Returns a string representation of this record class.com.mojang.datafixers.util.Either<ServerLinks.KnownLinkType, Component> type()Returns the value of thetyperecord component.
-
Field Details
-
type
The field for thetyperecord component. -
link
The field for thelinkrecord component. -
STREAM_CODEC
-
-
Constructor Details
-
UntrustedEntry
public UntrustedEntry(com.mojang.datafixers.util.Either<ServerLinks.KnownLinkType, Component> type, String link) Creates an instance of aUntrustedEntryrecord class.- Parameters:
type- the value for thetyperecord componentlink- the value for thelinkrecord component
-
-
Method Details
-
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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
link
Returns the value of thelinkrecord component.- Returns:
- the value of the
linkrecord component
-