Skip to content

Commit

Permalink
Corrected index order info and Added index calculation to notes
Browse files Browse the repository at this point in the history
  • Loading branch information
BJTMastermind committed Dec 1, 2024
1 parent 3cb76e9 commit 106d8d9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Java/Classic_Docs/0.0.13a/Level_Format.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ The level data is stored in **Big Endian** byte order.
| Width | 2 | The width of the world (x direction) |
| Height | 2 | The depth of the world. (z direction)[\[1\]](#1) |
| Depth | 2 | The height of the world. (y direction)[\[1\]](#1) |
| Blocks | 4,194,304 (256×256×64) | All the blocks in the world. YZX order (Y increments first) |
| Blocks | ***Width***×***Height***×***Depth*** | All the blocks in the world. XZY order (X increments first)[\[2\]](#2) |

## Notes
1. <a id="1"></a> Due to a bug in Minecraft Classic the `Height` and `Depth` values are swapped causing Height to be the Depth and Depth to be the Height.
2. <a id="2"></a> The index can be calculated with `(y × Height + z) × Width + x`
5 changes: 4 additions & 1 deletion Java/Classic_Docs/rd-132211/Level_Format.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,7 @@ The level data is stored in **Big Endian** byte order.

| Name | Size (in bytes) | Description |
|------|-----------------|-------------|
| Blocks | 4,194,304 (256×256×64) | All the blocks in the world. YZX order (Y increments first) |
| Blocks | 4,194,304 (256×256×64) | All the blocks in the world. XZY order (X increments first)[\[1\]](#1) |

## Notes
1. <a id="1"></a> The index can be calculated with `(y × 256 + z) × 256 + x`

0 comments on commit 106d8d9

Please sign in to comment.