Record Class KnownPack
java.lang.Object
java.lang.Record
net.minecraft.server.packs.repository.KnownPack
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate final StringThe field for theidrecord component.private final StringThe field for thenamespacerecord component.static final StreamCodec<io.netty.buffer.ByteBuf, KnownPack> static final Stringprivate final StringThe field for theversionrecord component.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionfinal 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.booleanReturns the value of thenamespacerecord component.toString()Returns a string representation of this record class.static KnownPackversion()Returns the value of theversionrecord component.
- 
Field Details- 
namespaceThe field for thenamespacerecord component.
- 
idThe field for theidrecord component.
- 
versionThe field for theversionrecord component.
- 
STREAM_CODEC
- 
VANILLA_NAMESPACE- See Also:
 
 
- 
- 
Constructor Details- 
KnownPackCreates an instance of aKnownPackrecord class.- Parameters:
- namespace- the value for the- namespacerecord component
- id- the value for the- idrecord component
- version- the value for the- versionrecord component
 
 
- 
- 
Method Details- 
vanilla
- 
isVanillapublic boolean isVanilla()
- 
toStringReturns 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.
- 
hashCodepublic 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.
- 
equalsIndicates 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).
- 
namespaceReturns the value of thenamespacerecord component.- Returns:
- the value of the namespacerecord component
 
- 
idReturns the value of theidrecord component.- Returns:
- the value of the idrecord component
 
- 
versionReturns the value of theversionrecord component.- Returns:
- the value of the versionrecord component
 
 
-