Record Class KnownPack
java.lang.Object
java.lang.Record
net.minecraft.server.packs.repository.KnownPack
-
Field Summary
Modifier and TypeFieldDescriptionprivate final String
The field for theid
record component.private final String
The field for thenamespace
record component.static final StreamCodec
<io.netty.buffer.ByteBuf, KnownPack> static final String
private final String
The field for theversion
record component. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal 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.boolean
Returns the value of thenamespace
record component.toString()
Returns a string representation of this record class.static KnownPack
version()
Returns the value of theversion
record component.
-
Field Details
-
namespace
The field for thenamespace
record component. -
id
The field for theid
record component. -
version
The field for theversion
record component. -
STREAM_CODEC
-
VANILLA_NAMESPACE
- See Also:
-
-
Constructor Details
-
KnownPack
Creates an instance of aKnownPack
record class.- Parameters:
namespace
- the value for thenamespace
record componentid
- the value for theid
record componentversion
- the value for theversion
record component
-
-
Method Details
-
vanilla
-
isVanilla
public boolean isVanilla() -
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)
. -
namespace
Returns the value of thenamespace
record component.- Returns:
- the value of the
namespace
record component
-
id
Returns the value of theid
record component.- Returns:
- the value of the
id
record component
-
version
Returns the value of theversion
record component.- Returns:
- the value of the
version
record component
-