# beta-minecraft-rust

Minecraft Beta 1.7.3, rewritten in Rust.

This rewrite is not 100% faithful to the original. It fixes some bugs and diverges in some places (although most decisions are purely of technical nature).

This repo has no Minecraft files. A script downloads them for you (step 2).

## 1. Install

You need Linux and:

- [Rust](https://rustup.rs)
- [slangc](https://github.com/shader-slang/slang/releases) (Arch: `pacman -S shader-slang`)
- A recent Vulkan GPU driver
- `curl` and `unzip`

## 2. Get the game files

```sh
./download-assets.sh
```

This downloads the original files from Mojang's servers, plus three original sounds from [Betacraft](https://betacraft.uk).

## 3. Play

```sh
cargo run --release --bin minecraft
```

Worlds are saved in `~/.minecraft`, the same folder the original game uses.

Run a server instead:

```sh
cargo run --release --bin minecraft-server
```

Debug Vulkan with the Khronos validation layer (`vulkan-validation-layers` package):

```sh
VULKAN_VALIDATION=warn cargo run --release --bin minecraft
```

Levels: `none` (default), `error`, `fatal` (abort on the first error), `warn`, `best_practice`. Append `,sync`, `,gpu` or `,printf` for synchronization validation, GPU-assisted validation or shader `printf`. Log filtering uses `RUST_LOG`.

## License

MIT or Apache-2.0, your choice. `crates/volcanic` and `crates/volcanic-mem` are MIT only.

Minecraft is a trademark of Mojang. This project is not affiliated with Mojang or Microsoft.
