Package net.minecraft.server.packs
Record Class PackLocationInfo
java.lang.Object
java.lang.Record
net.minecraft.server.packs.PackLocationInfo
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theidrecord component.The field for theknownPackInforecord component.private final PackSourceThe field for thesourcerecord component.private final ComponentThe field for thetitlerecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPackLocationInfo(String id, Component title, PackSource source, Optional<KnownPack> knownPackInfo) Creates an instance of aPackLocationInforecord class. -
Method Summary
Modifier and TypeMethodDescriptioncreateChatLink(boolean p_326100_, Component p_325972_) final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theknownPackInforecord component.source()Returns the value of thesourcerecord component.title()Returns the value of thetitlerecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
id
The field for theidrecord component. -
title
The field for thetitlerecord component. -
source
The field for thesourcerecord component. -
knownPackInfo
The field for theknownPackInforecord component.
-
-
Constructor Details
-
PackLocationInfo
public PackLocationInfo(String id, Component title, PackSource source, Optional<KnownPack> knownPackInfo) Creates an instance of aPackLocationInforecord class.- Parameters:
id- the value for theidrecord componenttitle- the value for thetitlerecord componentsource- the value for thesourcerecord componentknownPackInfo- the value for theknownPackInforecord 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 theidrecord component.- Returns:
- the value of the
idrecord component
-
title
Returns the value of thetitlerecord component.- Returns:
- the value of the
titlerecord component
-
source
Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
knownPackInfo
Returns the value of theknownPackInforecord component.- Returns:
- the value of the
knownPackInforecord component
-