Package net.minecraft.server.packs
Record Class PackLocationInfo
java.lang.Object
java.lang.Record
net.minecraft.server.packs.PackLocationInfo
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The field for theid
record component.The field for theknownPackInfo
record component.private final PackSource
The field for thesource
record component.private final Component
The field for thetitle
record component. -
Constructor Summary
ConstructorDescriptionPackLocationInfo
(String id, Component title, PackSource source, Optional<KnownPack> knownPackInfo) Creates an instance of aPackLocationInfo
record class. -
Method Summary
Modifier and TypeMethodDescriptioncreateChatLink
(boolean p_326100_, Component p_325972_) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.id()
Returns the value of theid
record component.Returns the value of theknownPackInfo
record component.source()
Returns the value of thesource
record component.title()
Returns the value of thetitle
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
id
The field for theid
record component. -
title
The field for thetitle
record component. -
source
The field for thesource
record component. -
knownPackInfo
The field for theknownPackInfo
record component.
-
-
Constructor Details
-
PackLocationInfo
public PackLocationInfo(String id, Component title, PackSource source, Optional<KnownPack> knownPackInfo) Creates an instance of aPackLocationInfo
record class.- Parameters:
id
- the value for theid
record componenttitle
- the value for thetitle
record componentsource
- the value for thesource
record componentknownPackInfo
- the value for theknownPackInfo
record component
-
-
Method Details
-
createChatLink
-
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)
. -
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
title
Returns the value of thetitle
record component.- Returns:
- the value of the
title
record component
-
source
Returns the value of thesource
record component.- Returns:
- the value of the
source
record component
-
knownPackInfo
Returns the value of theknownPackInfo
record component.- Returns:
- the value of the
knownPackInfo
record component
-