Package net.minecraft.nbt
Record Class DoubleTag
java.lang.Object
java.lang.Record
net.minecraft.nbt.DoubleTag
- All Implemented Interfaces:
NumericTag
,PrimitiveTag
,Tag
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final int
private final double
The field for thevalue
record component.static final DoubleTag
Fields inherited from interface net.minecraft.nbt.Tag
ARRAY_HEADER, MAX_DEPTH, OBJECT_HEADER, OBJECT_REFERENCE, STRING_SIZE, TAG_BYTE, TAG_BYTE_ARRAY, TAG_COMPOUND, TAG_DOUBLE, TAG_END, TAG_FLOAT, TAG_INT, TAG_INT_ARRAY, TAG_LIST, TAG_LONG, TAG_LONG_ARRAY, TAG_SHORT, TAG_STRING
-
Constructor Summary
ConstructorsConstructorDescriptionDoubleTag
(double value) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionaccept
(StreamTagVisitor p_197452_) void
accept
(TagVisitor p_177860_) box()
byte
copy()
double
final boolean
Indicates whether some other object is "equal to" this one.float
byte
getId()
getType()
final int
hashCode()
Returns a hash code value for this object.int
intValue()
long
short
int
toString()
Returns a string representation of this record class.double
value()
Returns the value of thevalue
record component.static DoubleTag
valueOf
(double p_128501_) void
write
(DataOutput p_128503_) Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.minecraft.nbt.NumericTag
asBoolean, asByte, asDouble, asFloat, asInt, asLong, asNumber, asShort
Methods inherited from interface net.minecraft.nbt.Tag
acceptAsRoot, asByteArray, asCompound, asIntArray, asList, asLongArray, asString
-
Field Details
-
value
private final double valueThe field for thevalue
record component. -
SELF_SIZE_IN_BYTES
private static final int SELF_SIZE_IN_BYTES- See Also:
-
ZERO
-
TYPE
-
-
Constructor Details
-
DoubleTag
Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aDoubleTag
record class.- Parameters:
value
- the value for thevalue
record component
-
-
Method Details
-
valueOf
-
write
- Specified by:
write
in interfaceTag
- Throws:
IOException
-
sizeInBytes
public int sizeInBytes()- Specified by:
sizeInBytes
in interfaceTag
-
getId
public byte getId() -
getType
-
copy
- Specified by:
copy
in interfacePrimitiveTag
- Specified by:
copy
in interfaceTag
-
accept
-
longValue
public long longValue()- Specified by:
longValue
in interfaceNumericTag
-
intValue
public int intValue()- Specified by:
intValue
in interfaceNumericTag
-
shortValue
public short shortValue()- Specified by:
shortValue
in interfaceNumericTag
-
byteValue
public byte byteValue()- Specified by:
byteValue
in interfaceNumericTag
-
doubleValue
public double doubleValue()- Specified by:
doubleValue
in interfaceNumericTag
-
floatValue
public float floatValue()- Specified by:
floatValue
in interfaceNumericTag
-
box
- Specified by:
box
in interfaceNumericTag
-
accept
-
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 with '=='. -
value
public double value()Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-