Skip to content

Data Types

This page describes the various data types that Minecraft works with.

All numbers are stored as big endian, so the number 12345 (0x3039) would be stored as

Addressnn+1
Data0x300x39
TypeSize (Bytes)RangeComment
Boolean10 to 1Written as a byte. Can either be 0x00 or 0x01.
Byte1-128 to 127Signed, two's complement.
Short2-32,768 to 32,767Signed, two's complement.
Integer4-2,147,483,648 to 2,147,483,647Signed, two's complement.
Long8-9,223,372,036,854,775,808 to 9,223,372,036,854,775,807Signed, two's complement.
Float4Single-precision 32-bit IEEE 754 floating point.
Double8Double-precision 64-bit IEEE 754 floating point.
String8>=2Modified UTF-8 string. Prefixed by an unsigned short containing the length of the string.
String16>=2 and <= 240UCS-2 string, big-endian. Prefixed by an unsigned short containing the length of the string in characters. UCS-2 consists of 16-bit words, each of which represent a Unicode code point between U+0000 and U+FFFF inclusive.

Entity Metadata

Read more over on Entity metadata.

Further reading