Package net.minecraft.server
Record Class ServerLinks.Entry
java.lang.Object
java.lang.Record
net.minecraft.server.ServerLinks.Entry
- Enclosing class:
ServerLinks
public static record ServerLinks.Entry(com.mojang.datafixers.util.Either<ServerLinks.KnownLinkType,Component> type, URI link)
extends Record
-
Field Summary
Modifier and TypeFieldDescriptionprivate final URI
The field for thelink
record component.private final com.mojang.datafixers.util.Either
<ServerLinks.KnownLinkType, Component> The field for thetype
record component. -
Constructor Summary
ConstructorDescriptionEntry
(com.mojang.datafixers.util.Either<ServerLinks.KnownLinkType, Component> type, URI link) Creates an instance of aEntry
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ServerLinks.Entry
final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static ServerLinks.Entry
knownType
(ServerLinks.KnownLinkType p_350698_, URI p_352076_) link()
Returns the value of thelink
record component.final String
toString()
Returns a string representation of this record class.com.mojang.datafixers.util.Either
<ServerLinks.KnownLinkType, Component> type()
Returns the value of thetype
record component.
-
Field Details
-
type
The field for thetype
record component. -
link
The field for thelink
record component.
-
-
Constructor Details
-
Entry
Creates an instance of aEntry
record class.- Parameters:
type
- the value for thetype
record componentlink
- the value for thelink
record component
-
-
Method Details
-
knownType
-
custom
-
displayName
-
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 thetype
record component.- Returns:
- the value of the
type
record component
-
link
Returns the value of thelink
record component.- Returns:
- the value of the
link
record component
-