Package net.minecraft.nbt
Record Class ByteTag
java.lang.Object
java.lang.Record
net.minecraft.nbt.ByteTag
- All Implemented Interfaces:
NumericTag
,PrimitiveTag
,Tag
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ByteTag
private static final int
private final byte
The field for thevalue
record component.static final ByteTag
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
ConstructorsConstructorDescriptionByteTag
(byte value) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionaccept
(StreamTagVisitor p_197436_) void
accept
(TagVisitor p_177842_) 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.byte
value()
Returns the value of thevalue
record component.static ByteTag
valueOf
(boolean p_128274_) static ByteTag
valueOf
(byte p_128267_) void
write
(DataOutput p_128269_) 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 byte valueThe field for thevalue
record component. -
SELF_SIZE_IN_BYTES
private static final int SELF_SIZE_IN_BYTES- See Also:
-
TYPE
-
ZERO
-
ONE
-
-
Constructor Details
-
ByteTag
Deprecated, for removal: This API element is subject to removal in a future version.Creates an instance of aByteTag
record class.- Parameters:
value
- the value for thevalue
record component
-
-
Method Details
-
valueOf
-
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 byte value()Returns the value of thevalue
record component.- Returns:
- the value of the
value
record component
-