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.Base
The field for thebase
record component.private final String
The field for thedigits
record component.private final SnbtGrammar.Sign
The field for thesign
record component.private final SnbtGrammar.IntegerSuffix
The field for thesuffix
record component. -
Constructor Summary
ConstructorsConstructorDescriptionIntegerLiteral
(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix) Creates an instance of aIntegerLiteral
record class. -
Method Summary
Modifier and TypeMethodDescriptionbase()
Returns the value of thebase
record component.private String
cleanupDigits
(SnbtGrammar.Sign p_409828_) <T> T
create
(com.mojang.serialization.DynamicOps<T> p_409628_, SnbtGrammar.TypeSuffix p_410472_, ParseState<?> p_410023_) <T> T
create
(com.mojang.serialization.DynamicOps<T> p_410386_, ParseState<?> p_409584_) digits()
Returns the value of thedigits
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.sign()
Returns the value of thesign
record component.private SnbtGrammar.SignedPrefix
suffix()
Returns the value of thesuffix
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
sign
The field for thesign
record component. -
base
The field for thebase
record component. -
digits
The field for thedigits
record component. -
suffix
The field for thesuffix
record component.
-
-
Constructor Details
-
IntegerLiteral
IntegerLiteral(SnbtGrammar.Sign sign, SnbtGrammar.Base base, String digits, SnbtGrammar.IntegerSuffix suffix) Creates an instance of aIntegerLiteral
record class.- Parameters:
sign
- the value for thesign
record componentbase
- the value for thebase
record componentdigits
- the value for thedigits
record componentsuffix
- the value for thesuffix
record component
-
-
Method Details
-
signedOrDefault
-
cleanupDigits
-
create
@Nullable public <T> T create(com.mojang.serialization.DynamicOps<T> p_410386_, ParseState<?> p_409584_) -
create
@Nullable public <T> T create(com.mojang.serialization.DynamicOps<T> p_409628_, SnbtGrammar.TypeSuffix p_410472_, ParseState<?> p_410023_) -
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 thesign
record component.- Returns:
- the value of the
sign
record component
-
base
Returns the value of thebase
record component.- Returns:
- the value of the
base
record component
-
digits
Returns the value of thedigits
record component.- Returns:
- the value of the
digits
record component
-
suffix
Returns the value of thesuffix
record component.- Returns:
- the value of the
suffix
record component
-