Difference between revisions of "Units of Measurement"
Jump to navigation
Jump to search
(Created page with "There are several different units of measurement used in the protocol depending on what is being described. For example, it wouldn't make much sense to send the position of a ...") |
|||
Line 30: | Line 30: | ||
| class="col3" | Represents the position of a chunk. | | class="col3" | Represents the position of a chunk. | ||
|} | |} | ||
+ | |||
+ | [[Category:Protocol Details]] | ||
+ | [[Category:Minecraft Beta]] |
Revision as of 10:12, 5 March 2012
There are several different units of measurement used in the protocol depending on what is being described. For example, it wouldn't make much sense to send the position of a block (which is a constant multiple of 32) in a floating point double.
A block represents 1 meter x 1 meter x 1 meter. There are 32 pixels per meter, and chunks are 16m x 128m x 16m.
Data Types | Units | Represents | |
---|---|---|---|
Absolute | double | meters | Represents an object's location in the world. |
Absolute Integer | int | pixels | Represents an object's location in the world. Functions the same as Absolute Double, but requires fewer bytes and is less precise. In C/C++/Java: absolute_int = (int)(absolute_double * 32.0);
|
Block | byte, short, int | meters | Represents a block's location in the world. |
Chunk | short, int | chunks | Represents the position of a chunk. |