Package net.minecraft.nbt
Record Class SnbtGrammar.IntegerLiteral
java.lang.Object
java.lang.Record
net.minecraft.nbt.SnbtGrammar.IntegerLiteral
- Enclosing class:
SnbtGrammar
static record SnbtGrammar.IntegerLiteral(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SnbtGrammar.BaseThe field for thebaserecord component.private final StringThe field for thedigitsrecord component.private final SnbtGrammar.SignThe field for thesignrecord component.private final SnbtGrammar.IntegerSuffixThe field for thesuffixrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionIntegerLiteral(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix) Creates an instance of aIntegerLiteralrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbase()Returns the value of thebaserecord component.private StringcleanupDigits(SnbtGrammar.Sign pSign) <T> Tcreate(com.mojang.serialization.DynamicOps<T> pOps, SnbtGrammar.TypeSuffix pTypeSuffix, ParseState<?> pParseState) <T> Tcreate(com.mojang.serialization.DynamicOps<T> pOps, ParseState<?> pParseState) digits()Returns the value of thedigitsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.sign()Returns the value of thesignrecord component.private SnbtGrammar.SignedPrefixsuffix()Returns the value of thesuffixrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
sign
The field for thesignrecord component. -
base
The field for thebaserecord component. -
digits
The field for thedigitsrecord component. -
suffix
The field for thesuffixrecord component.
-
-
Constructor Details
-
IntegerLiteral
IntegerLiteral(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix) Creates an instance of aIntegerLiteralrecord class.- Parameters:
sign- the value for thesignrecord componentbase- the value for thebaserecord componentdigits- the value for thedigitsrecord componentsuffix- the value for thesuffixrecord component
-
-
Method Details
-
signedOrDefault
-
cleanupDigits
-
create
@Nullable public <T> T create(com.mojang.serialization.DynamicOps<T> pOps, ParseState<?> pParseState) -
create
@Nullable public <T> T create(com.mojang.serialization.DynamicOps<T> pOps, SnbtGrammar.TypeSuffix pTypeSuffix, ParseState<?> pParseState) -
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). -
sign
Returns the value of thesignrecord component.- Returns:
- the value of the
signrecord component
-
base
Returns the value of thebaserecord component.- Returns:
- the value of the
baserecord component
-
digits
Returns the value of thedigitsrecord component.- Returns:
- the value of the
digitsrecord component
-
suffix
Returns the value of thesuffixrecord component.- Returns:
- the value of the
suffixrecord component
-