Merge branch 'master' into 1.13_assets

This commit is contained in:
ice_iix 2020-07-06 17:54:08 -07:00
commit 3a4aa3fcf9
64 changed files with 2694 additions and 675 deletions

View File

@ -1,20 +0,0 @@
image: ubuntu/latest
packages:
- curl
- libegl1-mesa-dev
- libgles2-mesa-dev
- pkg-config
- libssl-dev
sources:
- https://github.com/iceiix/stevenarella
tasks:
- setup: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh
sh ./rustup.sh -y
source $HOME/.cargo/env
cargo --version
- build: |
source $HOME/.cargo/env
cd stevenarella
cargo build
cargo test

8
.cargo/config Normal file
View File

@ -0,0 +1,8 @@
[target.x86_64-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]
[target.i686-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]
[target.i586-pc-windows-msvc]
rustflags = ["-Ctarget-feature=+crt-static"]

60
.github/workflows/build.yaml vendored Normal file
View File

@ -0,0 +1,60 @@
name: Build
on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- windows-latest
- ubuntu-latest
- macos-latest
fail-fast: true
steps:
- uses: actions/checkout@v2
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: 1.44.1
components: clippy, rustfmt
default: true
- name: Install dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libxcb-composite0-dev
- name: Build binary
run: |
cargo build --verbose --release
env:
MACOSX_DEPLOYMENT_TARGET: 10.14
- name: Run clippy
uses: actions-rs/clippy-check@v1.0.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-targets -- -D warnings
- name: Check formatting
run: cargo fmt --all -- --check
- name: Move binary
run: |
if [[ ${{ matrix.os }} == windows ]]; then
mv target/release/stevenarella.exe stevenarella-${{ matrix.os }}.exe
else
mv target/release/stevenarella stevenarella-${{ matrix.os }}
fi
shell: bash
- name: Upload binary
uses: actions/upload-artifact@v2
with:
name: stevenarella-${{ matrix.os }}
path: stevenarella*
- name: Release binary
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
stevenarella*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

272
Cargo.lock generated
View File

@ -1,5 +1,10 @@
# This file is automatically @generated by Cargo. # This file is automatically @generated by Cargo.
# It is not intended for manual editing. # It is not intended for manual editing.
[[package]]
name = "adler"
version = "0.2.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "adler32" name = "adler32"
version = "1.1.0" version = "1.1.0"
@ -7,30 +12,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "aes" name = "aes"
version = "0.3.2" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)", "aes-soft 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "aesni 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
"block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "block-cipher 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "aes-soft" name = "aes-soft"
version = "0.3.3" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "block-cipher 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "aesni" name = "aesni"
version = "0.6.0" version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "block-cipher 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -95,7 +100,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "base64" name = "base64"
version = "0.12.2" version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
@ -123,29 +128,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "block-buffer" name = "block-buffer"
version = "0.7.3" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "generic-array 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
"byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "block-cipher-trait" name = "block-cipher"
version = "0.6.2" version = "0.7.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "generic-array 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]]
name = "block-padding"
version = "0.1.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -153,11 +147,6 @@ name = "bumpalo"
version = "3.4.0" version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "byte-tools"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "bytemuck" name = "bytemuck"
version = "1.2.0" version = "1.2.0"
@ -193,11 +182,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "cfb8" name = "cfb8"
version = "0.3.2" version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", "block-cipher 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
"stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "stream-cipher 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -221,7 +210,7 @@ dependencies = [
"approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "approx 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)", "rand 0.6.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -370,6 +359,11 @@ dependencies = [
"objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)", "objc 0.2.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "cpuid-bool"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "crc32fast" name = "crc32fast"
version = "1.2.0" version = "1.2.0"
@ -433,10 +427,10 @@ dependencies = [
[[package]] [[package]]
name = "digest" name = "digest"
version = "0.8.1" version = "0.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "generic-array 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -480,20 +474,15 @@ dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "fake-simd"
version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "flate2" name = "flate2"
version = "1.0.14" version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)", "libc 0.2.71 (registry+https://github.com/rust-lang/crates.io-index)",
"miniz_oxide 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)", "miniz_oxide 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -625,10 +614,11 @@ dependencies = [
[[package]] [[package]]
name = "generic-array" name = "generic-array"
version = "0.12.3" version = "0.14.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)", "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
"version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -909,7 +899,7 @@ name = "js-sys"
version = "0.3.40" version = "0.3.40"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"wasm-bindgen 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1068,6 +1058,14 @@ dependencies = [
"adler32 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "adler32 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]]
name = "miniz_oxide"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [
"adler 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
]
[[package]] [[package]]
name = "mio" name = "mio"
version = "0.6.22" version = "0.6.22"
@ -1168,7 +1166,7 @@ dependencies = [
"autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-integer 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1178,7 +1176,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)", "autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1209,7 +1207,7 @@ dependencies = [
"num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "num-bigint 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"num-integer 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)", "num-integer 0.1.43 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1275,6 +1273,11 @@ name = "opaque-debug"
version = "0.2.3" version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]]
name = "opaque-debug"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "openssl" name = "openssl"
version = "0.10.29" version = "0.10.29"
@ -1387,7 +1390,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1434,7 +1437,7 @@ dependencies = [
"proc-macro-error-attr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-error-attr 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
"version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -1445,7 +1448,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
"syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
@ -1692,7 +1695,7 @@ name = "reqwest"
version = "0.10.6" version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"base64 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
"bytes 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)", "bytes 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)",
"encoding_rs 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)", "encoding_rs 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)",
"futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)", "futures-core 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1709,12 +1712,12 @@ dependencies = [
"native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)", "native-tls 0.2.4 (registry+https://github.com/rust-lang/crates.io-index)",
"percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "percent-encoding 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "pin-project-lite 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)", "serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)", "tokio 0.2.21 (registry+https://github.com/rust-lang/crates.io-index)",
"tokio-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)", "tokio-tls 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
"url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-futures 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-futures 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
"winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)", "winreg 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -1829,30 +1832,30 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "serde" name = "serde"
version = "1.0.113" version = "1.0.114"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"serde_derive 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.113" version = "1.0.114"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "serde_json" name = "serde_json"
version = "1.0.55" version = "1.0.56"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)", "ryu 1.0.5 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1862,19 +1865,20 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", "itoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)", "url 2.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "sha-1" name = "sha-1"
version = "0.8.2" version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)", "block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)", "cpuid-bool 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
"opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
"opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1971,12 +1975,12 @@ dependencies = [
"futures-executor-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", "futures-executor-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
"futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)", "futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)",
"rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)", "rustc_version 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
"stdweb-derive 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-derive 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
"stdweb-internal-macros 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-internal-macros 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)",
"stdweb-internal-runtime 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb-internal-runtime 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1986,9 +1990,9 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -1999,11 +2003,11 @@ dependencies = [
"base-x 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)", "base-x 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_derive 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
"sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)", "sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2034,17 +2038,17 @@ dependencies = [
name = "steven_protocol" name = "steven_protocol"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"aes 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "aes 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cfb8 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)", "cfb8 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)", "hex 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)", "num-traits 0.2.12 (registry+https://github.com/rust-lang/crates.io-index)",
"reqwest 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
"sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)", "sha-1 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
"std_or_web 0.0.1", "std_or_web 0.0.1",
"steven_shared 0.0.1", "steven_shared 0.0.1",
] ]
@ -2061,13 +2065,13 @@ version = "0.0.1"
name = "stevenarella" name = "stevenarella"
version = "0.0.1" version = "0.0.1"
dependencies = [ dependencies = [
"base64 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)", "base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)",
"byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)", "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"cgmath 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)", "cgmath 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)",
"clipboard 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)", "clipboard 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
"collision 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)", "collision 0.20.1 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"glutin 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)", "glutin 0.22.0 (registry+https://github.com/rust-lang/crates.io-index)",
"image 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)", "image 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)",
"lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2076,9 +2080,8 @@ dependencies = [
"rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)", "rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
"reqwest 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)", "reqwest 0.10.6 (registry+https://github.com/rust-lang/crates.io-index)",
"rsa_public_encrypt_pkcs1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "rsa_public_encrypt_pkcs1 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
"sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
"std_or_web 0.0.1", "std_or_web 0.0.1",
"stdweb 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)", "stdweb 0.4.20 (registry+https://github.com/rust-lang/crates.io-index)",
"steven_blocks 0.0.1", "steven_blocks 0.0.1",
@ -2087,17 +2090,17 @@ dependencies = [
"steven_resources 0.1.0", "steven_resources 0.1.0",
"steven_shared 0.0.1", "steven_shared 0.0.1",
"structopt 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)", "structopt 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
"winit 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)", "winit 0.20.0 (registry+https://github.com/rust-lang/crates.io-index)",
"zip 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)", "zip 0.5.6 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "stream-cipher" name = "stream-cipher"
version = "0.3.2" version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)", "generic-array 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2124,12 +2127,12 @@ dependencies = [
"proc-macro-error 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro-error 1.0.2 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "syn" name = "syn"
version = "1.0.31" version = "1.0.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2144,7 +2147,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2346,18 +2349,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
name = "wasm-bindgen" name = "wasm-bindgen"
version = "0.2.63" version = "0.2.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)", "serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)",
"serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)", "serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-macro 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-macro 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "wasm-bindgen-backend" name = "wasm-bindgen-backend"
version = "0.2.63" version = "0.2.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
@ -2365,8 +2368,8 @@ dependencies = [
"log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)",
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-shared 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-shared 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2376,34 +2379,34 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)", "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
"js-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
"web-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", "web-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "wasm-bindgen-macro" name = "wasm-bindgen-macro"
version = "0.2.63" version = "0.2.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-macro-support 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-macro-support 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "wasm-bindgen-macro-support" name = "wasm-bindgen-macro-support"
version = "0.2.63" version = "0.2.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)", "proc-macro2 1.0.18 (registry+https://github.com/rust-lang/crates.io-index)",
"quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)", "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
"syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)", "syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-backend 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-backend 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen-shared 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen-shared 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
name = "wasm-bindgen-shared" name = "wasm-bindgen-shared"
version = "0.2.63" version = "0.2.64"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
[[package]] [[package]]
@ -2467,7 +2470,7 @@ version = "0.3.40"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"js-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)", "js-sys 0.3.40 (registry+https://github.com/rust-lang/crates.io-index)",
"wasm-bindgen 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)", "wasm-bindgen 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[[package]] [[package]]
@ -2597,15 +2600,16 @@ version = "0.5.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
dependencies = [ dependencies = [
"crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)", "crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)", "flate2 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)",
"podio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)", "podio 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)",
] ]
[metadata] [metadata]
"checksum adler 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ccc9a9dd069569f212bc4330af9f17c4afb5e8ce185e83dbb14f1349dda18b10"
"checksum adler32 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d" "checksum adler32 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "567b077b825e468cc974f0020d4082ee6e03132512f207ef1a02fd5d00d1f32d"
"checksum aes 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "54eb1d8fe354e5fc611daf4f2ea97dd45a765f4f1e4512306ec183ae2e8f20c9" "checksum aes 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f7001367fde4c768a19d1029f0a8be5abd9308e1119846d5bd9ad26297b8faf5"
"checksum aes-soft 0.3.3 (registry+https://github.com/rust-lang/crates.io-index)" = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" "checksum aes-soft 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4925647ee64e5056cf231608957ce7c81e12d6d6e316b9ce1404778cc1d35fa7"
"checksum aesni 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" "checksum aesni 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d050d39b0b7688b3a3254394c3e30a9d66c41dcf9b05b0e2dbdc623f6505d264"
"checksum andrew 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e" "checksum andrew 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9b7f09f89872c2b6b29e319377b1fbe91c6f5947df19a25596e121cf19a7b35e"
"checksum android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407" "checksum android_glue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "000444226fcff248f2bc4c7625be32c63caccfecc2723a2b9f78a7487a49c407"
"checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b" "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
@ -2614,22 +2618,20 @@ dependencies = [
"checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" "checksum autocfg 0.1.7 (registry+https://github.com/rust-lang/crates.io-index)" = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2"
"checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" "checksum autocfg 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d"
"checksum base-x 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b20b618342cf9891c292c4f5ac2cde7287cc5c87e87e9c769d617793607dec1" "checksum base-x 0.2.6 (registry+https://github.com/rust-lang/crates.io-index)" = "1b20b618342cf9891c292c4f5ac2cde7287cc5c87e87e9c769d617793607dec1"
"checksum base64 0.12.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e223af0dc48c96d4f8342ec01a4974f139df863896b316681efd36742f22cc67" "checksum base64 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3441f0f7b02788e948e47f457ca01f1d7e6d92c693bc132c22b087d3141c03ff"
"checksum bit-set 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" "checksum bit-set 0.5.2 (registry+https://github.com/rust-lang/crates.io-index)" = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de"
"checksum bit-vec 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f0dc55f2d8a1a85650ac47858bb001b4c0dd73d79e3c455a842925e68d29cd3" "checksum bit-vec 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "5f0dc55f2d8a1a85650ac47858bb001b4c0dd73d79e3c455a842925e68d29cd3"
"checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
"checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a" "checksum block 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)" = "0d8c1fef690941d3e7788d328517591fecc684c084084702d6ff1641e993699a"
"checksum block-buffer 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c0940dc441f31689269e10ac70eb1002a3a1d3ad1390e030043662eb7fe4688b" "checksum block-buffer 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
"checksum block-cipher-trait 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" "checksum block-cipher 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "fa136449e765dc7faa244561ccae839c394048667929af599b5d931ebe7b7f10"
"checksum block-padding 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "fa79dedbb091f449f1f39e53edf88d5dbe95f895dae6135a8d7b881fb5af73f5"
"checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820" "checksum bumpalo 3.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2e8c087f005730276d1096a652e92a8bacee2e2472bcc9715a74d2bec38b5820"
"checksum byte-tools 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e3b5ca7a04898ad4bcd41c90c5285445ff5b791899bb1b0abdd2a2aa791211d7"
"checksum bytemuck 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37fa13df2292ecb479ec23aa06f4507928bef07839be9ef15281411076629431" "checksum bytemuck 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "37fa13df2292ecb479ec23aa06f4507928bef07839be9ef15281411076629431"
"checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
"checksum bytes 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "118cf036fbb97d0816e3c34b2d7a1e8cfc60f68fcf63d550ddbe9bd5f59c213b" "checksum bytes 0.5.5 (registry+https://github.com/rust-lang/crates.io-index)" = "118cf036fbb97d0816e3c34b2d7a1e8cfc60f68fcf63d550ddbe9bd5f59c213b"
"checksum calloop 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7aa2097be53a00de9e8fc349fea6d76221f398f5c4fa550d420669906962d160" "checksum calloop 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "7aa2097be53a00de9e8fc349fea6d76221f398f5c4fa550d420669906962d160"
"checksum cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)" = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" "checksum cc 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)" = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311"
"checksum cfb8 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1b310afa67a25a8d5189eacaf5b14418c8dc3d8bcc5755619d89cab87871260d" "checksum cfb8 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba2baac45bade12cdd992418b4b4ea40f6198c03b2de1a9eb7b059f118f445d6"
"checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
"checksum cgl 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff" "checksum cgl 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "0ced0551234e87afee12411d535648dd89d2e7f34c78b753395567aff3d447ff"
"checksum cgmath 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "283944cdecc44bf0b8dd010ec9af888d3b4f142844fdbe026c20ef68148d6fe7" "checksum cgmath 0.17.0 (registry+https://github.com/rust-lang/crates.io-index)" = "283944cdecc44bf0b8dd010ec9af888d3b4f142844fdbe026c20ef68148d6fe7"
@ -2648,13 +2650,14 @@ dependencies = [
"checksum core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9" "checksum core-graphics 0.17.3 (registry+https://github.com/rust-lang/crates.io-index)" = "56790968ab1c8a1202a102e6de05fc6e1ec87da99e4e93e9a7d13efbfc1e95a9"
"checksum core-graphics 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59e78b2e0aaf43f08e7ae0d6bc96895ef72ff0921c7d4ff4762201b2dba376dd" "checksum core-graphics 0.19.0 (registry+https://github.com/rust-lang/crates.io-index)" = "59e78b2e0aaf43f08e7ae0d6bc96895ef72ff0921c7d4ff4762201b2dba376dd"
"checksum core-video-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828" "checksum core-video-sys 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "34ecad23610ad9757664d644e369246edde1803fcb43ed72876565098a5d3828"
"checksum cpuid-bool 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6d375c433320f6c5057ae04a04376eef4d04ce2801448cf8863a78da99107be4"
"checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" "checksum crc32fast 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1"
"checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" "checksum crossbeam-deque 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285"
"checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" "checksum crossbeam-epoch 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace"
"checksum crossbeam-queue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570" "checksum crossbeam-queue 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "774ba60a54c213d409d5353bda12d49cd68d14e45036a285234c8d6f91f92570"
"checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" "checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
"checksum deflate 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e7e5d2a2273fed52a7f947ee55b092c4057025d7a3e04e5ecdbd25d6c3fb1bd7" "checksum deflate 0.8.4 (registry+https://github.com/rust-lang/crates.io-index)" = "e7e5d2a2273fed52a7f947ee55b092c4057025d7a3e04e5ecdbd25d6c3fb1bd7"
"checksum digest 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f3d0c8c8752312f9713efd397ff63acb9f85585afbf179282e720e7704954dd5" "checksum digest 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
"checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0" "checksum discard 1.0.4 (registry+https://github.com/rust-lang/crates.io-index)" = "212d0f5754cb6769937f4501cc0e67f4f4483c8d2c3e1e922ee9edbe4ab4c7c0"
"checksum dispatch 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e93ca78226c51902d7aa8c12c988338aadd9e85ed9c6be8aaac39192ff3605" "checksum dispatch 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)" = "04e93ca78226c51902d7aa8c12c988338aadd9e85ed9c6be8aaac39192ff3605"
"checksum dlib 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76" "checksum dlib 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b11f15d1e3268f140f68d390637d5e76d849782d971ae7063e0da69fe9709a76"
@ -2662,8 +2665,7 @@ dependencies = [
"checksum dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b" "checksum dtoa 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "134951f4028bdadb9b84baf4232681efbf277da25144b9b0ad65df75946c422b"
"checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" "checksum either 1.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3"
"checksum encoding_rs 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" "checksum encoding_rs 0.8.23 (registry+https://github.com/rust-lang/crates.io-index)" = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171"
"checksum fake-simd 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "e88a8acf291dafb59c2d96e8f59828f3838bb1a70398823ade51a84de6a6deed" "checksum flate2 1.0.16 (registry+https://github.com/rust-lang/crates.io-index)" = "68c90b0fc46cf89d227cc78b40e494ff81287a92dd07631e5af0d06fe3cf885e"
"checksum flate2 1.0.14 (registry+https://github.com/rust-lang/crates.io-index)" = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42"
"checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" "checksum fnv 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1"
"checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" "checksum foreign-types 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1"
"checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" "checksum foreign-types-shared 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b"
@ -2681,7 +2683,7 @@ dependencies = [
"checksum futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" "checksum futures-util 0.3.5 (registry+https://github.com/rust-lang/crates.io-index)" = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6"
"checksum futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d" "checksum futures-util-preview 0.3.0-alpha.19 (registry+https://github.com/rust-lang/crates.io-index)" = "5ce968633c17e5f97936bd2797b6e38fb56cf16a7422319f7ec2e30d3c470e8d"
"checksum generator 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "add72f17bb81521258fcc8a7a3245b1e184e916bfbe34f0ea89558f440df5c68" "checksum generator 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "add72f17bb81521258fcc8a7a3245b1e184e916bfbe34f0ea89558f440df5c68"
"checksum generic-array 0.12.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" "checksum generic-array 0.14.2 (registry+https://github.com/rust-lang/crates.io-index)" = "ac746a5f3bbfdadd6106868134545e684693d54d9d44f6e9588a7d54af0bf980"
"checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" "checksum getrandom 0.1.14 (registry+https://github.com/rust-lang/crates.io-index)" = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb"
"checksum gif 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "471d90201b3b223f3451cd4ad53e34295f16a1df17b1edf3736d47761c3981af" "checksum gif 0.10.3 (registry+https://github.com/rust-lang/crates.io-index)" = "471d90201b3b223f3451cd4ad53e34295f16a1df17b1edf3736d47761c3981af"
"checksum gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ca98bbde17256e02d17336a6bdb5a50f7d0ccacee502e191d3e3d0ec2f96f84a" "checksum gl_generator 0.13.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ca98bbde17256e02d17336a6bdb5a50f7d0ccacee502e191d3e3d0ec2f96f84a"
@ -2732,6 +2734,7 @@ dependencies = [
"checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" "checksum mime 0.3.16 (registry+https://github.com/rust-lang/crates.io-index)" = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d"
"checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" "checksum mime_guess 2.0.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212"
"checksum miniz_oxide 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435" "checksum miniz_oxide 0.3.7 (registry+https://github.com/rust-lang/crates.io-index)" = "791daaae1ed6889560f8c4359194f56648355540573244a5448a83ba1ecc7435"
"checksum miniz_oxide 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "be0f75932c1f6cfae3c04000e40114adf955636e19040f9c0a2c380702aa1c7f"
"checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" "checksum mio 0.6.22 (registry+https://github.com/rust-lang/crates.io-index)" = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430"
"checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19" "checksum mio-extras 2.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "52403fe290012ce777c4626790c8951324a2b9e3316b3143779c72b029742f19"
"checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" "checksum miow 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919"
@ -2752,6 +2755,7 @@ dependencies = [
"checksum objc_id 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b" "checksum objc_id 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "c92d4ddb4bd7b50d730c215ff871754d0da6b2178849f8a2a2ab69712d0c073b"
"checksum once_cell 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" "checksum once_cell 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d"
"checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" "checksum opaque-debug 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c"
"checksum opaque-debug 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
"checksum openssl 0.10.29 (registry+https://github.com/rust-lang/crates.io-index)" = "cee6d85f4cb4c4f59a6a85d5b68a233d280c82e29e822913b9c8b129fbf20bdd" "checksum openssl 0.10.29 (registry+https://github.com/rust-lang/crates.io-index)" = "cee6d85f4cb4c4f59a6a85d5b68a233d280c82e29e822913b9c8b129fbf20bdd"
"checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" "checksum openssl-probe 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de"
"checksum openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)" = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de" "checksum openssl-sys 0.9.58 (registry+https://github.com/rust-lang/crates.io-index)" = "a842db4709b604f0fe5d1170ae3565899be2ad3d9cbc72dedc789ac0511f78de"
@ -2813,11 +2817,11 @@ dependencies = [
"checksum security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" "checksum security-framework-sys 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405"
"checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" "checksum semver 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
"checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" "checksum semver-parser 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
"checksum serde 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)" = "6135c78461981c79497158ef777264c51d9d0f4f3fc3a4d22b915900e42dac6a" "checksum serde 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "5317f7588f0a5078ee60ef675ef96735a1442132dc645eb1d12c018620ed8cd3"
"checksum serde_derive 1.0.113 (registry+https://github.com/rust-lang/crates.io-index)" = "93c5eaa17d0954cb481cdcfffe9d84fcfa7a1a9f2349271e678677be4c26ae31" "checksum serde_derive 1.0.114 (registry+https://github.com/rust-lang/crates.io-index)" = "2a0be94b04690fbaed37cddffc5c134bf537c8e3329d53e982fe04c374978f8e"
"checksum serde_json 1.0.55 (registry+https://github.com/rust-lang/crates.io-index)" = "ec2c5d7e739bc07a3e73381a39d61fdb5f671c60c1df26a130690665803d8226" "checksum serde_json 1.0.56 (registry+https://github.com/rust-lang/crates.io-index)" = "3433e879a558dde8b5e8feb2a04899cf34fdde1fafb894687e52105fc1162ac3"
"checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" "checksum serde_urlencoded 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97"
"checksum sha-1 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f7d94d0bede923b3cea61f3f1ff57ff8cdfd77b400fb8f9998949e0cf04163df" "checksum sha-1 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "170a36ea86c864a3f16dd2687712dd6646f7019f301e57537c7f4dc9f5916770"
"checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" "checksum sha1 0.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d"
"checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11" "checksum shared_library 0.1.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5a9e7e0f2bfae24d8a5b5a66c5b257a83c7412304311512a0c054cd5e619da11"
"checksum simple_asn1 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "57f6bbbcefb91c0dac9b27c91ba13bd2aa29a815fe980f5b1e07d523fbf7b350" "checksum simple_asn1 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "57f6bbbcefb91c0dac9b27c91ba13bd2aa29a815fe980f5b1e07d523fbf7b350"
@ -2831,11 +2835,11 @@ dependencies = [
"checksum stdweb-derive 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef" "checksum stdweb-derive 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "c87a60a40fccc84bef0652345bbbbbe20a605bf5d0ce81719fc476f5c03b50ef"
"checksum stdweb-internal-macros 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11" "checksum stdweb-internal-macros 0.2.9 (registry+https://github.com/rust-lang/crates.io-index)" = "58fa5ff6ad0d98d1ffa8cb115892b6e69d67799f6763e162a1c9db421dc22e11"
"checksum stdweb-internal-runtime 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0" "checksum stdweb-internal-runtime 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "213701ba3370744dcd1a12960caa4843b3d68b4d1c0a5d575e0d65b2ee9d16c0"
"checksum stream-cipher 0.3.2 (registry+https://github.com/rust-lang/crates.io-index)" = "8131256a5896cabcf5eb04f4d6dacbe1aefda854b0d9896e09cb58829ec5638c" "checksum stream-cipher 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "09f8ed9974042b8c3672ff3030a69fcc03b74c47c3d1ecb7755e8a3626011e88"
"checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a" "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
"checksum structopt 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "de2f5e239ee807089b62adce73e48c625e0ed80df02c7ab3f068f5db5281065c" "checksum structopt 0.3.15 (registry+https://github.com/rust-lang/crates.io-index)" = "de2f5e239ee807089b62adce73e48c625e0ed80df02c7ab3f068f5db5281065c"
"checksum structopt-derive 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "510413f9de616762a4fbeab62509bf15c729603b72d7cd71280fbca431b1c118" "checksum structopt-derive 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)" = "510413f9de616762a4fbeab62509bf15c729603b72d7cd71280fbca431b1c118"
"checksum syn 1.0.31 (registry+https://github.com/rust-lang/crates.io-index)" = "b5304cfdf27365b7585c25d4af91b35016ed21ef88f17ced89c7093b43dba8b6" "checksum syn 1.0.33 (registry+https://github.com/rust-lang/crates.io-index)" = "e8d5d96e8cbb005d6959f119f773bfaebb5684296108fb32600c00cde305b2cd"
"checksum syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" "checksum syn-mid 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a"
"checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
"checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
@ -2863,12 +2867,12 @@ dependencies = [
"checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" "checksum walkdir 2.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d"
"checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" "checksum want 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0"
"checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
"checksum wasm-bindgen 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)" = "4c2dc4aa152834bc334f506c1a06b866416a8b6697d5c9f75b9a689c8486def0" "checksum wasm-bindgen 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)" = "6a634620115e4a229108b71bde263bb4220c483b3f07f5ba514ee8d15064c4c2"
"checksum wasm-bindgen-backend 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)" = "ded84f06e0ed21499f6184df0e0cb3494727b0c5da89534e0fcc55c51d812101" "checksum wasm-bindgen-backend 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)" = "3e53963b583d18a5aa3aaae4b4c1cb535218246131ba22a71f05b518098571df"
"checksum wasm-bindgen-futures 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "64487204d863f109eb77e8462189d111f27cb5712cc9fdb3461297a76963a2f6" "checksum wasm-bindgen-futures 0.4.13 (registry+https://github.com/rust-lang/crates.io-index)" = "64487204d863f109eb77e8462189d111f27cb5712cc9fdb3461297a76963a2f6"
"checksum wasm-bindgen-macro 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)" = "838e423688dac18d73e31edce74ddfac468e37b1506ad163ffaf0a46f703ffe3" "checksum wasm-bindgen-macro 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)" = "3fcfd5ef6eec85623b4c6e844293d4516470d8f19cd72d0d12246017eb9060b8"
"checksum wasm-bindgen-macro-support 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)" = "3156052d8ec77142051a533cdd686cba889537b213f948cd1d20869926e68e92" "checksum wasm-bindgen-macro-support 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)" = "9adff9ee0e94b926ca81b57f57f86d5545cdcb1d259e21ec9bdd95b901754c75"
"checksum wasm-bindgen-shared 0.2.63 (registry+https://github.com/rust-lang/crates.io-index)" = "c9ba19973a58daf4db6f352eda73dc0e289493cd29fb2632eb172085b6521acd" "checksum wasm-bindgen-shared 0.2.64 (registry+https://github.com/rust-lang/crates.io-index)" = "7f7b90ea6c632dd06fd765d44542e234d5e63d9bb917ecd64d79778a13bd79ae"
"checksum wayland-client 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "af1080ebe0efabcf12aef2132152f616038f2d7dcbbccf7b2d8c5270fe14bcda" "checksum wayland-client 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "af1080ebe0efabcf12aef2132152f616038f2d7dcbbccf7b2d8c5270fe14bcda"
"checksum wayland-commons 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "bb66b0d1a27c39bbce712b6372131c6e25149f03ffb0cd017cf8f7de8d66dbdb" "checksum wayland-commons 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "bb66b0d1a27c39bbce712b6372131c6e25149f03ffb0cd017cf8f7de8d66dbdb"
"checksum wayland-protocols 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc286643656742777d55dc8e70d144fa4699e426ca8e9d4ef454f4bf15ffcf9" "checksum wayland-protocols 0.23.6 (registry+https://github.com/rust-lang/crates.io-index)" = "6cc286643656742777d55dc8e70d144fa4699e426ca8e9d4ef454f4bf15ffcf9"

View File

@ -19,18 +19,17 @@ opt-level = 1
[dependencies] [dependencies]
cfg-if = "0.1.9" cfg-if = "0.1.9"
wasm-bindgen = "0.2.44" wasm-bindgen = "0.2.64"
sha-1 = "0.8.2"
glutin = "0.22.0" glutin = "0.22.0"
byteorder = "1.3.4" byteorder = "1.3.4"
serde = "1.0.104" serde = "1.0.114"
serde_json = "1.0.55" serde_json = "1.0.56"
flate2 = { version = "1.0.14", features = ["rust_backend"], default-features = false } flate2 = { version = "1.0.16", features = ["rust_backend"], default-features = false }
zip = { version = "0.5.6", features = ["deflate"], default-features = false } zip = { version = "0.5.6", features = ["deflate"], default-features = false }
image = "0.23.6" image = "0.23.6"
rand = "0.7.3" rand = "0.7.3"
rand_pcg = "0.2.1" rand_pcg = "0.2.1"
base64 = "0.12.2" base64 = "0.12.3"
log = { version = "0.4.8", features = ["std"] } log = { version = "0.4.8", features = ["std"] }
cgmath = "0.17.0" cgmath = "0.17.0"
lazy_static = "1.4.0" lazy_static = "1.4.0"

View File

@ -1,5 +1,5 @@
# Stevenarella # Stevenarella
[![builds.sr.ht status](https://builds.sr.ht/~iceiix/stevenarella.svg)](https://builds.sr.ht/~iceiix/stevenarella?) [![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Ficeiix%2Fstevenarella%2Fbadge%3Fref%3Dmaster&style=plastic)](https://actions-badge.atrox.dev/iceiix/stevenarella/goto?ref=master)
Multi-protocol Minecraft-compatible client written in Rust Multi-protocol Minecraft-compatible client written in Rust
@ -17,12 +17,15 @@ In action: http://gfycat.com/NeedyElaborateGypsymoth
We have a chatroom on [EsperNet](https://esper.net): `irc.esper.net` server, `#stevenarella` channel. We have a chatroom on [EsperNet](https://esper.net): `irc.esper.net` server, `#stevenarella` channel.
Join with your favorite IRC client or [Matrix](https://matrix.to/#/#_espernet_#stevenarella:matrix.org). Join with your favorite IRC client.
## Protocol support ## Protocol support
| Game version | Protocol version | Supported? | | Game version | Protocol version | Supported? |
| ------ | --- | --- | | ------ | --- | --- |
| 1.16.1 | 736 | ✓ |
| 1.16 | 735 | ✓ |
| 1.15.2 | 578 | ✓ |
| 1.15.1 | 575 | ✓ | | 1.15.1 | 575 | ✓ |
| 1.14.4 | 498 | ✓ | | 1.14.4 | 498 | ✓ |
| 1.14.3 | 490 | ✓ | | 1.14.3 | 490 | ✓ |
@ -53,10 +56,9 @@ Support for older protocols will _not_ be dropped as newer protocols are added.
## Downloads ## Downloads
Windows users can download pre-compiled builds from here: https://ci.appveyor.com/project/iceiix/stevenarella Windows, Ubuntu Linux, and macOS users can download pre-compiled builds
(Select your platform, Click the artifacts tab and download Steven.zip) from [GitHub Actions](https://actions-badge.atrox.dev/iceiix/stevenarella/goto?ref=master).
(Click the artifacts drop-down and select your platform.)
The Visual Studio 2017 Redistributable is required to run these builds.
## Building ## Building

View File

@ -1,51 +0,0 @@
version: 1.0.{build}
image: Visual Studio 2017
clone_depth: 1
skip_branch_with_pr: true
branches:
only:
- master
platform:
- x64
build_script:
- cmd: >-
echo on
echo AddMessage "PLATFORM is %PLATFORM%"
if "%PLATFORM%" == "x86" set RUST_INSTALL=i686-pc-windows-msvc
if "%PLATFORM%" == "x64" set RUST_INSTALL=x86_64-pc-windows-msvc
echo AddMessage "platform is %platform%"
appveyor AddMessage "Platform rust: %RUST_INSTALL%"
appveyor DownloadFile "https://static.rust-lang.org/dist/rust-1.44.1-%RUST_INSTALL%.exe" -FileName rust-install.exe
"./rust-install.exe" /VERYSILENT /NORESTART /DIR="C:\Rust\"
SET PATH=%PATH%;C:\Rust\bin
rustc -V
cargo -V
cargo build
mkdir dist-debug
cp target\debug\stevenarella.exe dist-debug
cargo build --release
mkdir dist
cp target\release\stevenarella.exe dist
artifacts:
- path: dist
- path: dist-debug

View File

@ -1,4 +1,6 @@
#![recursion_limit = "600"] #![recursion_limit = "600"]
#![allow(clippy::identity_op)]
#![allow(clippy::collapsible_if)]
extern crate steven_shared as shared; extern crate steven_shared as shared;
@ -262,7 +264,7 @@ macro_rules! define_blocks {
return $update_state; return $update_state;
)? )?
Block::$name { Block::$name {
$($fname: $fname,)? $($fname,)?
} }
} }
)+ )+
@ -377,7 +379,7 @@ macro_rules! define_blocks {
$($fname: $fname.next().unwrap(),)? $($fname: $fname.next().unwrap(),)?
}, },
state: CombinationIterState { state: CombinationIterState {
$($fname: $fname,)? $($fname,)?
} }
} }
} }
@ -571,9 +573,9 @@ define_blocks! {
} }
}, },
update_state (world, pos) => if variant == DirtVariant::Podzol { update_state (world, pos) => if variant == DirtVariant::Podzol {
Block::Dirt{snowy: is_snowy(world, pos), variant: variant} Block::Dirt{snowy: is_snowy(world, pos), variant}
} else { } else {
Block::Dirt{snowy: snowy, variant: variant} Block::Dirt{snowy, variant}
}, },
} }
Cobblestone { Cobblestone {
@ -775,7 +777,7 @@ define_blocks! {
offset if check_decay { offset if check_decay {
None None
} else { } else {
Some(variant.offset() * (7 * 2) + ((distance as usize - 1) << 1) | (if decayable { 0 } else { 1 })) Some(variant.offset() * (7 * 2) + ((distance as usize - 1) << 1) + (if decayable { 0 } else { 1 }))
}, },
material material::LEAVES, material material::LEAVES,
model { ("minecraft", format!("{}_leaves", variant.as_string()) ) }, model { ("minecraft", format!("{}_leaves", variant.as_string()) ) },
@ -1338,7 +1340,7 @@ define_blocks! {
collision vec![], collision vec![],
update_state (world, pos) => { update_state (world, pos) => {
Fire{ Fire{
age: age, age,
up: can_burn(world, pos.shift(Direction::Up)), up: can_burn(world, pos.shift(Direction::Up)),
north: can_burn(world, pos.shift(Direction::North)), north: can_burn(world, pos.shift(Direction::North)),
south: can_burn(world, pos.shift(Direction::South)), south: can_burn(world, pos.shift(Direction::South)),
@ -1439,7 +1441,7 @@ define_blocks! {
south: can_connect_redstone(world, pos, Direction::South), south: can_connect_redstone(world, pos, Direction::South),
west: can_connect_redstone(world, pos, Direction::West), west: can_connect_redstone(world, pos, Direction::West),
east: can_connect_redstone(world, pos, Direction::East), east: can_connect_redstone(world, pos, Direction::East),
power: power power
}, },
multipart (key, val) => match key { multipart (key, val) => match key {
"north" => val.contains(north.as_string()), "north" => val.contains(north.as_string()),
@ -1566,7 +1568,7 @@ define_blocks! {
collision door_collision(facing, hinge, open), collision door_collision(facing, hinge, open),
update_state (world, pos) => { update_state (world, pos) => {
let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered); let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered);
Block::WoodenDoor{facing: facing, half: half, hinge: hinge, open: open, powered: powered} Block::WoodenDoor{facing, half, hinge, open, powered}
}, },
} }
Ladder { Ladder {
@ -1703,7 +1705,7 @@ define_blocks! {
collision door_collision(facing, hinge, open), collision door_collision(facing, hinge, open),
update_state (world, pos) => { update_state (world, pos) => {
let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered); let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered);
Block::IronDoor{facing: facing, half: half, hinge: hinge, open: open, powered: powered} Block::IronDoor{facing, half, hinge, open, powered}
}, },
} }
WoodenPressurePlate { WoodenPressurePlate {
@ -2089,7 +2091,7 @@ define_blocks! {
Point3::new(0.0, 0.0, 0.0), Point3::new(0.0, 0.0, 0.0),
Point3::new(1.0, 1.0/8.0, 1.0) Point3::new(1.0, 1.0/8.0, 1.0)
)], )],
update_state (world, pos) => RepeaterPowered{delay: delay, facing: facing, locked: update_repeater_state(world, pos, facing)}, update_state (world, pos) => RepeaterPowered{delay, facing, locked: update_repeater_state(world, pos, facing)},
} }
StainedGlass { StainedGlass {
props { props {
@ -2223,7 +2225,7 @@ define_blocks! {
data None::<usize>, data None::<usize>,
offset mushroom_block_offset(false, west, up, south, north, east, down), offset mushroom_block_offset(false, west, up, south, north, east, down),
model { ("minecraft", "mushroom_stem") }, model { ("minecraft", "mushroom_stem") },
variant format!("variant=all_stem"), variant "variant=all_stem".to_string(),
} }
IronBars { IronBars {
props { props {
@ -2381,7 +2383,7 @@ define_blocks! {
_ => Direction::Up, _ => Direction::Up,
}; };
Block::PumpkinStem{age: age, facing: facing} Block::PumpkinStem{age, facing}
}, },
} }
MelonStem { MelonStem {
@ -2417,7 +2419,7 @@ define_blocks! {
_ => Direction::Up, _ => Direction::Up,
}; };
Block::MelonStem{age: age, facing: facing} Block::MelonStem{age, facing}
}, },
} }
Vine { Vine {
@ -2449,7 +2451,7 @@ define_blocks! {
update_state (world, pos) => { update_state (world, pos) => {
let mat = world.get_block(pos.shift(Direction::Up)).get_material(); let mat = world.get_block(pos.shift(Direction::Up)).get_material();
let up = mat.renderable && (mat.should_cull_against || mat.never_cull /* Because leaves */); let up = mat.renderable && (mat.should_cull_against || mat.never_cull /* Because leaves */);
Vine{up: up, south: south, west: west, north: north, east: east} Vine{up, south, west, north, east}
}, },
} }
FenceGate { FenceGate {
@ -2471,10 +2473,10 @@ define_blocks! {
variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open), variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open),
collision fence_gate_collision(facing, in_wall, open), collision fence_gate_collision(facing, in_wall, open),
update_state (world, pos) => Block::FenceGate{ update_state (world, pos) => Block::FenceGate{
facing: facing, facing,
in_wall: fence_gate_update_state(world, pos, facing), in_wall: fence_gate_update_state(world, pos, facing),
open: open, open,
powered: powered powered
}, },
} }
BrickStairs { BrickStairs {
@ -2931,14 +2933,14 @@ define_blocks! {
}; };
Tripwire{ Tripwire{
powered: powered, powered,
attached: attached, attached,
disarmed: disarmed, disarmed,
north: f(Direction::North), north: f(Direction::North),
south: f(Direction::South), south: f(Direction::South),
west: f(Direction::West), west: f(Direction::West),
east: f(Direction::East), east: f(Direction::East),
mojang_cant_even: mojang_cant_even mojang_cant_even
} }
}, },
} }
@ -4207,10 +4209,10 @@ define_blocks! {
variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open), variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open),
collision fence_gate_collision(facing, in_wall, open), collision fence_gate_collision(facing, in_wall, open),
update_state (world, pos) => Block::SpruceFenceGate{ update_state (world, pos) => Block::SpruceFenceGate{
facing: facing, facing,
in_wall: fence_gate_update_state(world, pos, facing), in_wall: fence_gate_update_state(world, pos, facing),
open: open, open,
powered: powered powered
}, },
} }
BirchFenceGate { BirchFenceGate {
@ -4232,10 +4234,10 @@ define_blocks! {
variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open), variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open),
collision fence_gate_collision(facing, in_wall, open), collision fence_gate_collision(facing, in_wall, open),
update_state (world, pos) => Block::BirchFenceGate{ update_state (world, pos) => Block::BirchFenceGate{
facing: facing, facing,
in_wall: fence_gate_update_state(world, pos, facing), in_wall: fence_gate_update_state(world, pos, facing),
open: open, open,
powered: powered powered
}, },
} }
JungleFenceGate { JungleFenceGate {
@ -4257,10 +4259,10 @@ define_blocks! {
variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open), variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open),
collision fence_gate_collision(facing, in_wall, open), collision fence_gate_collision(facing, in_wall, open),
update_state (world, pos) => Block::JungleFenceGate{ update_state (world, pos) => Block::JungleFenceGate{
facing: facing, facing,
in_wall: fence_gate_update_state(world, pos, facing), in_wall: fence_gate_update_state(world, pos, facing),
open: open, open,
powered: powered powered
}, },
} }
DarkOakFenceGate { DarkOakFenceGate {
@ -4282,10 +4284,10 @@ define_blocks! {
variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open), variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open),
collision fence_gate_collision(facing, in_wall, open), collision fence_gate_collision(facing, in_wall, open),
update_state (world, pos) => Block::DarkOakFenceGate{ update_state (world, pos) => Block::DarkOakFenceGate{
facing: facing, facing,
in_wall: fence_gate_update_state(world, pos, facing), in_wall: fence_gate_update_state(world, pos, facing),
open: open, open,
powered: powered powered
}, },
} }
AcaciaFenceGate { AcaciaFenceGate {
@ -4307,10 +4309,10 @@ define_blocks! {
variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open), variant format!("facing={},in_wall={},open={}", facing.as_string(), in_wall, open),
collision fence_gate_collision(facing, in_wall, open), collision fence_gate_collision(facing, in_wall, open),
update_state (world, pos) => Block::AcaciaFenceGate{ update_state (world, pos) => Block::AcaciaFenceGate{
facing: facing, facing,
in_wall: fence_gate_update_state(world, pos, facing), in_wall: fence_gate_update_state(world, pos, facing),
open: open, open,
powered: powered powered
}, },
} }
SpruceFence { SpruceFence {
@ -4479,7 +4481,7 @@ define_blocks! {
collision door_collision(facing, hinge, open), collision door_collision(facing, hinge, open),
update_state (world, pos) => { update_state (world, pos) => {
let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered); let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered);
Block::SpruceDoor{facing: facing, half: half, hinge: hinge, open: open, powered: powered} Block::SpruceDoor{facing, half, hinge, open, powered}
}, },
} }
BirchDoor { BirchDoor {
@ -4503,7 +4505,7 @@ define_blocks! {
collision door_collision(facing, hinge, open), collision door_collision(facing, hinge, open),
update_state (world, pos) => { update_state (world, pos) => {
let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered); let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered);
Block::BirchDoor{facing: facing, half: half, hinge: hinge, open: open, powered: powered} Block::BirchDoor{facing, half, hinge, open, powered}
}, },
} }
JungleDoor { JungleDoor {
@ -4527,7 +4529,7 @@ define_blocks! {
collision door_collision(facing, hinge, open), collision door_collision(facing, hinge, open),
update_state (world, pos) => { update_state (world, pos) => {
let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered); let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered);
Block::JungleDoor{facing: facing, half: half, hinge: hinge, open: open, powered: powered} Block::JungleDoor{facing, half, hinge, open, powered}
}, },
} }
AcaciaDoor { AcaciaDoor {
@ -4551,7 +4553,7 @@ define_blocks! {
collision door_collision(facing, hinge, open), collision door_collision(facing, hinge, open),
update_state (world, pos) => { update_state (world, pos) => {
let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered); let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered);
Block::AcaciaDoor{facing: facing, half: half, hinge: hinge, open: open, powered: powered} Block::AcaciaDoor{facing, half, hinge, open, powered}
}, },
} }
DarkOakDoor { DarkOakDoor {
@ -4575,7 +4577,7 @@ define_blocks! {
collision door_collision(facing, hinge, open), collision door_collision(facing, hinge, open),
update_state (world, pos) => { update_state (world, pos) => {
let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered); let (facing, hinge, open, powered) = update_door_state(world, pos, half, facing, hinge, open, powered);
Block::DarkOakDoor{facing: facing, half: half, hinge: hinge, open: open, powered: powered} Block::DarkOakDoor{facing, half, hinge, open, powered}
}, },
} }
EndRod { EndRod {
@ -7265,7 +7267,7 @@ impl TreeVariant {
TreeVariant::Spruce | TreeVariant::DarkOak => 1, TreeVariant::Spruce | TreeVariant::DarkOak => 1,
TreeVariant::Birch => 2, TreeVariant::Birch => 2,
TreeVariant::Jungle => 3, TreeVariant::Jungle => 3,
_ => panic!("TreeVariant {:?} has no data (1.13+ only)"), _ => panic!("TreeVariant {:?} has no data (1.13+ only)", self),
} }
} }
@ -7294,7 +7296,7 @@ impl TreeVariant {
TreeVariant::Jungle => 3, TreeVariant::Jungle => 3,
TreeVariant::Acacia => 4, TreeVariant::Acacia => 4,
TreeVariant::DarkOak => 5, TreeVariant::DarkOak => 5,
_ => panic!("TreeVariant {:?} has no plank data (1.13+ only)"), _ => panic!("TreeVariant {:?} has no plank data (1.13+ only)", self),
} }
} }
} }

View File

@ -10,4 +10,4 @@ gl_generator = "0.14.0"
khronos_api = "3.1.0" khronos_api = "3.1.0"
[dependencies] [dependencies]
libc = "0.2.66" libc = "0.2.71"

View File

@ -1 +1,4 @@
#![allow(clippy::unused_unit)]
#![allow(clippy::missing_safety_doc)]
#![allow(clippy::too_many_arguments)]
include!(concat!(env!("OUT_DIR"), "/bindings.rs")); include!(concat!(env!("OUT_DIR"), "/bindings.rs"));

1432
protocol/Cargo.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@ -5,16 +5,16 @@ authors = [ "Thinkofdeath <thinkofdeath@spigotmc.org>", "iceiix <ice_ix@protonma
edition = "2018" edition = "2018"
[dependencies] [dependencies]
serde = "1.0.104" serde = "1.0.114"
serde_json = "1.0.55" serde_json = "1.0.56"
hex = "0.4.0" hex = "0.4.2"
sha-1 = "0.8.2" sha-1 = "0.9.1"
aes = "0.3.2" aes = "0.4.0"
cfb8 = "0.3.2" cfb8 = "0.4.0"
byteorder = "1.3.4" byteorder = "1.3.4"
log = { version = "0.4.8", features = ["std"] } log = { version = "0.4.8", features = ["std"] }
flate2 = { version = "1.0.14", features = ["rust_backend"], default-features = false } flate2 = { version = "1.0.16", features = ["rust_backend"], default-features = false }
num-traits = "0.2.10" num-traits = "0.2.12"
[dependencies.steven_shared] [dependencies.steven_shared]
path = "../shared" path = "../shared"

View File

@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use serde_json;
use std::fmt; use std::fmt;
use std::mem; use std::mem;
@ -96,14 +95,14 @@ pub struct Modifier {
impl Modifier { impl Modifier {
pub fn from_value(v: &serde_json::Value) -> Self { pub fn from_value(v: &serde_json::Value) -> Self {
let mut m = Modifier { let mut m = Modifier {
bold: v.get("bold").map_or(Option::None, |v| v.as_bool()), bold: v.get("bold").and_then(|v| v.as_bool()),
italic: v.get("italic").map_or(Option::None, |v| v.as_bool()), italic: v.get("italic").and_then(|v| v.as_bool()),
underlined: v.get("underlined").map_or(Option::None, |v| v.as_bool()), underlined: v.get("underlined").and_then(|v| v.as_bool()),
strikethrough: v.get("strikethrough").map_or(Option::None, |v| v.as_bool()), strikethrough: v.get("strikethrough").and_then(|v| v.as_bool()),
obfuscated: v.get("obfuscated").map_or(Option::None, |v| v.as_bool()), obfuscated: v.get("obfuscated").and_then(|v| v.as_bool()),
color: v color: v
.get("color") .get("color")
.map_or(Option::None, |v| v.as_str()) .and_then(|v| v.as_str())
.map(|v| Color::from_string(&v.to_owned())), .map(|v| Color::from_string(&v.to_owned())),
extra: Option::None, extra: Option::None,
}; };
@ -187,7 +186,29 @@ pub enum Color {
impl fmt::Display for Color { impl fmt::Display for Color {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{}", self.to_string()) write!(
f,
"{}",
match *self {
Color::Black => "black".to_owned(),
Color::DarkBlue => "dark_blue".to_owned(),
Color::DarkGreen => "dark_green".to_owned(),
Color::DarkAqua => "dark_aqua".to_owned(),
Color::DarkRed => "dark_red".to_owned(),
Color::DarkPurple => "dark_purple".to_owned(),
Color::Gold => "gold".to_owned(),
Color::Gray => "gray".to_owned(),
Color::DarkGray => "dark_gray".to_owned(),
Color::Blue => "blue".to_owned(),
Color::Green => "green".to_owned(),
Color::Aqua => "aqua".to_owned(),
Color::Red => "red".to_owned(),
Color::LightPurple => "light_purple".to_owned(),
Color::Yellow => "yellow".to_owned(),
Color::White => "white".to_owned(),
Color::RGB(r, g, b) => format!("#{:02X}{:02X}{:02X}", r, g, b),
}
)
} }
} }
@ -224,29 +245,8 @@ impl Color {
}; };
Color::RGB(r, g, b) Color::RGB(r, g, b)
} }
"white" | _ => Color::White, "white" => Color::White,
} _ => Color::White,
}
pub fn to_string(&self) -> String {
match *self {
Color::Black => "black".to_owned(),
Color::DarkBlue => "dark_blue".to_owned(),
Color::DarkGreen => "dark_green".to_owned(),
Color::DarkAqua => "dark_aqua".to_owned(),
Color::DarkRed => "dark_red".to_owned(),
Color::DarkPurple => "dark_purple".to_owned(),
Color::Gold => "gold".to_owned(),
Color::Gray => "gray".to_owned(),
Color::DarkGray => "dark_gray".to_owned(),
Color::Blue => "blue".to_owned(),
Color::Green => "green".to_owned(),
Color::Aqua => "aqua".to_owned(),
Color::Red => "red".to_owned(),
Color::LightPurple => "light_purple".to_owned(),
Color::Yellow => "yellow".to_owned(),
Color::White => "white".to_owned(),
Color::RGB(r, g, b) => format!("#{:02X}{:02X}{:02X}", r, g, b),
} }
} }
@ -357,7 +357,10 @@ pub fn convert_legacy(c: &mut Component) {
'n' => modifier.underlined = Some(true), 'n' => modifier.underlined = Some(true),
'o' => modifier.italic = Some(true), 'o' => modifier.italic = Some(true),
'r' => {} 'r' => {}
_ => unimplemented!(), _ => println!(
"warning: unsupported color code {:?} in text '{}'",
color_char, txt
),
} }
current.modifier = modifier; current.modifier = modifier;

View File

@ -19,10 +19,10 @@ use std::io;
#[derive(Debug)] #[derive(Debug)]
pub struct Stack { pub struct Stack {
id: isize, pub id: isize,
count: isize, pub count: isize,
damage: Option<isize>, pub damage: Option<isize>,
tag: Option<nbt::NamedTag>, pub tag: Option<nbt::NamedTag>,
} }
impl Default for Stack { impl Default for Stack {

View File

@ -84,8 +84,8 @@ impl Serializable for ModIdMapping {
} }
} }
pub static BLOCK_NAMESPACE: &'static str = "\u{1}"; pub static BLOCK_NAMESPACE: &str = "\u{1}";
pub static ITEM_NAMESPACE: &'static str = "\u{2}"; pub static ITEM_NAMESPACE: &str = "\u{2}";
#[derive(Debug)] #[derive(Debug)]
pub enum FmlHs { pub enum FmlHs {

View File

@ -18,10 +18,7 @@
use aes::Aes128; use aes::Aes128;
use cfb8::stream_cipher::{NewStreamCipher, StreamCipher}; use cfb8::stream_cipher::{NewStreamCipher, StreamCipher};
use cfb8::Cfb8; use cfb8::Cfb8;
use hex;
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
use reqwest;
use serde_json;
use std_or_web::fs; use std_or_web::fs;
pub mod forge; pub mod forge;
@ -43,8 +40,9 @@ use std::net::TcpStream;
use std::sync::atomic::{AtomicBool, AtomicI32, Ordering}; use std::sync::atomic::{AtomicBool, AtomicI32, Ordering};
use std::time::{Duration, Instant}; use std::time::{Duration, Instant};
pub const SUPPORTED_PROTOCOLS: [i32; 18] = [ pub const SUPPORTED_PROTOCOLS: [i32; 21] = [
575, 498, 490, 485, 480, 477, 452, 451, 404, 340, 316, 315, 210, 109, 107, 74, 47, 5, 736, 735, 578, 575, 498, 490, 485, 480, 477, 452, 451, 404, 340, 316, 315, 210, 109, 107, 74,
47, 5,
]; ];
static CURRENT_PROTOCOL_VERSION: AtomicI32 = AtomicI32::new(SUPPORTED_PROTOCOLS[0]); static CURRENT_PROTOCOL_VERSION: AtomicI32 = AtomicI32::new(SUPPORTED_PROTOCOLS[0]);
@ -421,11 +419,21 @@ impl Serializable for f64 {
#[derive(Debug, PartialEq, Eq, Hash, Clone)] #[derive(Debug, PartialEq, Eq, Hash, Clone)]
pub struct UUID(u64, u64); pub struct UUID(u64, u64);
impl UUID { #[derive(Debug)]
pub fn from_str(s: &str) -> UUID { pub struct UUIDParseError;
// TODO: Panics aren't the best idea here impl std::error::Error for UUIDParseError {}
impl fmt::Display for UUIDParseError {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "Invalid UUID format")
}
}
impl std::str::FromStr for UUID {
type Err = UUIDParseError;
fn from_str(s: &str) -> Result<Self, Self::Err> {
if s.len() != 36 { if s.len() != 36 {
panic!("Invalid UUID format"); return Err(UUIDParseError {});
} }
let mut parts = hex::decode(&s[..8]).unwrap(); let mut parts = hex::decode(&s[..8]).unwrap();
parts.extend_from_slice(&hex::decode(&s[9..13]).unwrap()); parts.extend_from_slice(&hex::decode(&s[9..13]).unwrap());
@ -438,7 +446,7 @@ impl UUID {
high |= (parts[i] as u64) << (56 - i * 8); high |= (parts[i] as u64) << (56 - i * 8);
low |= (parts[i + 8] as u64) << (56 - i * 8); low |= (parts[i + 8] as u64) << (56 - i * 8);
} }
UUID(high, low) Ok(UUID(high, low))
} }
} }
@ -484,12 +492,12 @@ impl Default for Biomes3D {
impl Serializable for Biomes3D { impl Serializable for Biomes3D {
fn read_from<R: io::Read>(buf: &mut R) -> Result<Biomes3D, Error> { fn read_from<R: io::Read>(buf: &mut R) -> Result<Biomes3D, Error> {
let mut data: [i32; 1024] = [0; 1024]; let data: [i32; 1024] = [0; 1024];
// Non-length-prefixed three-dimensional biome data // Non-length-prefixed three-dimensional biome data
for i in 0..1024 { for item in &mut data.to_vec() {
let b: i32 = Serializable::read_from(buf)?; let b: i32 = Serializable::read_from(buf)?;
data[i] = b; *item = b;
} }
Result::Ok(Biomes3D { data }) Result::Ok(Biomes3D { data })
@ -940,14 +948,15 @@ impl Serializable for Position {
let pos = buf.read_u64::<BigEndian>()?; let pos = buf.read_u64::<BigEndian>()?;
Ok(Position::new( Ok(Position::new(
((pos as i64) >> 38) as i32, ((pos as i64) >> 38) as i32,
(((pos as i64) >> 26) & 0xFFF) as i32, ((pos as i64) & 0xFFF) as i32,
((pos as i64) << 38 >> 38) as i32, ((pos as i64) << 26 >> 38) as i32,
)) ))
} }
fn write_to<W: io::Write>(&self, buf: &mut W) -> Result<(), Error> { fn write_to<W: io::Write>(&self, buf: &mut W) -> Result<(), Error> {
let pos = (((self.x as u64) & 0x3FFFFFF) << 38) let pos = (((self.x as u64) & 0x3FFFFFF) << 38)
| (((self.y as u64) & 0xFFF) << 26) | ((self.y as u64) & 0xFFF)
| ((self.z as u64) & 0x3FFFFFF); | (((self.z as u64) & 0x3FFFFFF) << 12);
buf.write_u64::<BigEndian>(pos)?; buf.write_u64::<BigEndian>(pos)?;
Result::Ok(()) Result::Ok(())
} }
@ -1209,8 +1218,8 @@ impl Conn {
let invalid_status = || Error::Err("Invalid status".to_owned()); let invalid_status = || Error::Err("Invalid status".to_owned());
let version = val.get("version").ok_or(invalid_status())?; let version = val.get("version").ok_or_else(invalid_status)?;
let players = val.get("players").ok_or(invalid_status())?; let players = val.get("players").ok_or_else(invalid_status)?;
// For modded servers, get the list of Forge mods installed // For modded servers, get the list of Forge mods installed
let mut forge_mods: std::vec::Vec<crate::protocol::forge::ForgeMod> = vec![]; let mut forge_mods: std::vec::Vec<crate::protocol::forge::ForgeMod> = vec![];
@ -1265,26 +1274,26 @@ impl Conn {
name: version name: version
.get("name") .get("name")
.and_then(Value::as_str) .and_then(Value::as_str)
.ok_or(invalid_status())? .ok_or_else(invalid_status)?
.to_owned(), .to_owned(),
protocol: version protocol: version
.get("protocol") .get("protocol")
.and_then(Value::as_i64) .and_then(Value::as_i64)
.ok_or(invalid_status())? as i32, .ok_or_else(invalid_status)? as i32,
}, },
players: StatusPlayers { players: StatusPlayers {
max: players max: players
.get("max") .get("max")
.and_then(Value::as_i64) .and_then(Value::as_i64)
.ok_or(invalid_status())? as i32, .ok_or_else(invalid_status)? as i32,
online: players online: players
.get("online") .get("online")
.and_then(Value::as_i64) .and_then(Value::as_i64)
.ok_or(invalid_status())? as i32, .ok_or_else(invalid_status)? as i32,
sample: Vec::new(), /* TODO */ sample: Vec::new(), /* TODO */
}, },
description: format::Component::from_value( description: format::Component::from_value(
val.get("description").ok_or(invalid_status())?, val.get("description").ok_or_else(invalid_status)?,
), ),
favicon: val favicon: val
.get("favicon") .get("favicon")
@ -1344,11 +1353,8 @@ impl Write for Conn {
match self.cipher.as_mut() { match self.cipher.as_mut() {
Option::None => self.stream.write(buf), Option::None => self.stream.write(buf),
Option::Some(cipher) => { Option::Some(cipher) => {
// TODO: avoid copying, but trait requires non-mutable buf
let mut data = vec![0; buf.len()]; let mut data = vec![0; buf.len()];
for i in 0..buf.len() { data[..buf.len()].clone_from_slice(&buf[..]);
data[i] = buf[i];
}
cipher.encrypt(&mut data); cipher.encrypt(&mut data);

View File

@ -13,7 +13,6 @@
// limitations under the License. // limitations under the License.
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
use reqwest;
use serde_json::json; use serde_json::json;
use sha1::{self, Digest}; use sha1::{self, Digest};
@ -78,7 +77,7 @@ impl Profile {
pub fn refresh(self, token: &str) -> Result<Profile, super::Error> { pub fn refresh(self, token: &str) -> Result<Profile, super::Error> {
let req_msg = json!({ let req_msg = json!({
"accessToken": self.access_token.clone(), "accessToken": self.access_token,
"clientToken": token "clientToken": token
}); });
let req = serde_json::to_string(&req_msg)?; let req = serde_json::to_string(&req_msg)?;
@ -135,10 +134,10 @@ impl Profile {
public_key: &[u8], public_key: &[u8],
) -> Result<(), super::Error> { ) -> Result<(), super::Error> {
let mut hasher = sha1::Sha1::new(); let mut hasher = sha1::Sha1::new();
hasher.input(server_id.as_bytes()); hasher.update(server_id.as_bytes());
hasher.input(shared_key); hasher.update(shared_key);
hasher.input(public_key); hasher.update(public_key);
let mut hash = hasher.result(); let mut hash = hasher.finalize();
// Mojang uses a hex method which allows for // Mojang uses a hex method which allows for
// negatives so we have to account for that. // negatives so we have to account for that.

View File

@ -179,13 +179,22 @@ state_packets!(
} }
/// UseEntity is sent when the user interacts (right clicks) or attacks /// UseEntity is sent when the user interacts (right clicks) or attacks
/// (left clicks) an entity. /// (left clicks) an entity.
packet UseEntity { packet UseEntity_Sneakflag {
field target_id: VarInt =, field target_id: VarInt =,
field ty: VarInt =, field ty: VarInt =,
field target_x: f32 = when(|p: &UseEntity| p.ty.0 == 2), field target_x: f32 = when(|p: &UseEntity_Sneakflag| p.ty.0 == 2),
field target_y: f32 = when(|p: &UseEntity| p.ty.0 == 2), field target_y: f32 = when(|p: &UseEntity_Sneakflag| p.ty.0 == 2),
field target_z: f32 = when(|p: &UseEntity| p.ty.0 == 2), field target_z: f32 = when(|p: &UseEntity_Sneakflag| p.ty.0 == 2),
field hand: VarInt = when(|p: &UseEntity| p.ty.0 == 0 || p.ty.0 == 2), field hand: VarInt = when(|p: &UseEntity_Sneakflag| p.ty.0 == 0 || p.ty.0 == 2),
field sneaking: bool =,
}
packet UseEntity_Hand {
field target_id: VarInt =,
field ty: VarInt =,
field target_x: f32 = when(|p: &UseEntity_Hand| p.ty.0 == 2),
field target_y: f32 = when(|p: &UseEntity_Hand| p.ty.0 == 2),
field target_z: f32 = when(|p: &UseEntity_Hand| p.ty.0 == 2),
field hand: VarInt = when(|p: &UseEntity_Hand| p.ty.0 == 0 || p.ty.0 == 2),
} }
packet UseEntity_Handsfree { packet UseEntity_Handsfree {
field target_id: VarInt =, field target_id: VarInt =,
@ -198,6 +207,12 @@ state_packets!(
field target_id: i32 =, field target_id: i32 =,
field ty: u8 =, field ty: u8 =,
} }
/// Sent when Generate is pressed on the Jigsaw Block interface.
packet GenerateStructure {
field location: Position =,
field levels: VarInt =,
field keep_jigsaws: bool =,
}
/// KeepAliveServerbound is sent by a client as a response to a /// KeepAliveServerbound is sent by a client as a response to a
/// KeepAliveClientbound. If the client doesn't reply the server /// KeepAliveClientbound. If the client doesn't reply the server
/// may disconnect the client. /// may disconnect the client.
@ -280,11 +295,14 @@ state_packets!(
} }
/// ClientAbilities is used to modify the players current abilities. /// ClientAbilities is used to modify the players current abilities.
/// Currently flying is the only one /// Currently flying is the only one
packet ClientAbilities { packet ClientAbilities_f32 {
field flags: u8 =, field flags: u8 =,
field flying_speed: f32 =, field flying_speed: f32 =,
field walking_speed: f32 =, field walking_speed: f32 =,
} }
packet ClientAbilities_u8 {
field flags: u8 =,
}
/// PlayerDigging is sent when the client starts/stops digging a block. /// PlayerDigging is sent when the client starts/stops digging a block.
/// It also can be sent for droppping items and eating/shooting. /// It also can be sent for droppping items and eating/shooting.
packet PlayerDigging { packet PlayerDigging {
@ -381,7 +399,15 @@ state_packets!(
field slot: i16 =, field slot: i16 =,
field clicked_item: Option<item::Stack> =, field clicked_item: Option<item::Stack> =,
} }
packet UpdateJigsawBlock { packet UpdateJigsawBlock_Joint {
field location: Position =,
field name: String =,
field target: String =,
field pool: String =,
field final_state: String =,
field joint_type: String =,
}
packet UpdateJigsawBlock_Type {
field location: Position =, field location: Position =,
field attachment_type: String =, field attachment_type: String =,
field target_pool: String =, field target_pool: String =,
@ -473,6 +499,15 @@ state_packets!(
field cursor_y: u8 =, field cursor_y: u8 =,
field cursor_z: u8 =, field cursor_z: u8 =,
} }
packet PlayerBlockPlacement_insideblock {
field hand: VarInt =,
field location: Position =,
field face: VarInt =,
field cursor_x: f32 =,
field cursor_y: f32 =,
field cursor_z: f32 =,
field inside_block: bool =, //1.14 added insideblock
}
/// UseItem is sent when the client tries to use an item. /// UseItem is sent when the client tries to use an item.
packet UseItem { packet UseItem {
@ -523,6 +558,20 @@ state_packets!(
field velocity_y: i16 = when(|p: &SpawnObject_i32_NoUUID| p.data != 0), field velocity_y: i16 = when(|p: &SpawnObject_i32_NoUUID| p.data != 0),
field velocity_z: i16 = when(|p: &SpawnObject_i32_NoUUID| p.data != 0), field velocity_z: i16 = when(|p: &SpawnObject_i32_NoUUID| p.data != 0),
} }
packet SpawnObject_VarInt {
field entity_id: VarInt =,
field uuid: UUID =,
field ty: VarInt =, //1.14 changed u8 to VarInt
field x: f64 =,
field y: f64 =,
field z: f64 =,
field pitch: i8 =,
field yaw: i8 =,
field data: i32 =,
field velocity_x: i16 =,
field velocity_y: i16 =,
field velocity_z: i16 =,
}
/// SpawnExperienceOrb spawns a single experience orb into the world when /// SpawnExperienceOrb spawns a single experience orb into the world when
/// it is in range of the client. The count controls the amount of experience /// it is in range of the client. The count controls the amount of experience
/// gained when collected. /// gained when collected.
@ -817,7 +866,13 @@ state_packets!(
/// ServerMessage is a message sent by the server. It could be from a player /// ServerMessage is a message sent by the server. It could be from a player
/// or just a system message. The Type field controls the location the /// or just a system message. The Type field controls the location the
/// message is displayed at and when the message is displayed. /// message is displayed at and when the message is displayed.
packet ServerMessage { packet ServerMessage_Sender {
field message: format::Component =,
/// 0 - Chat message, 1 - System message, 2 - Action bar message
field position: u8 =,
field sender: UUID =,
}
packet ServerMessage_Position {
field message: format::Component =, field message: format::Component =,
/// 0 - Chat message, 1 - System message, 2 - Action bar message /// 0 - Chat message, 1 - System message, 2 - Action bar message
field position: u8 =, field position: u8 =,
@ -992,6 +1047,17 @@ state_packets!(
} }
/// ChunkData sends or updates a single chunk on the client. If New is set /// ChunkData sends or updates a single chunk on the client. If New is set
/// then biome data should be sent too. /// then biome data should be sent too.
packet ChunkData_Biomes3D_bool {
field chunk_x: i32 =,
field chunk_z: i32 =,
field new: bool =,
field ignore_old_data: bool =,
field bitmask: VarInt =,
field heightmaps: Option<nbt::NamedTag> =,
field biomes: Biomes3D = when(|p: &ChunkData_Biomes3D_bool| p.new),
field data: LenPrefixedBytes<VarInt> =,
field block_entities: LenPrefixed<VarInt, Option<nbt::NamedTag>> =,
}
packet ChunkData_Biomes3D { packet ChunkData_Biomes3D {
field chunk_x: i32 =, field chunk_x: i32 =,
field chunk_z: i32 =, field chunk_z: i32 =,
@ -1134,6 +1200,38 @@ state_packets!(
} }
/// JoinGame is sent after completing the login process. This /// JoinGame is sent after completing the login process. This
/// sets the initial state for the client. /// sets the initial state for the client.
packet JoinGame_WorldNames {
/// The entity id the client will be referenced by
field entity_id: i32 =,
/// The starting gamemode of the client
field gamemode: u8 =,
/// The previous gamemode of the client
field previous_gamemode: u8 =,
/// Identifiers for all worlds on the server
field world_names: LenPrefixed<VarInt, String> =,
/// Represents a dimension registry
field dimension_codec: Option<nbt::NamedTag> =,
/// The dimension the client is starting in
field dimension: String =,
/// The world being spawned into
field world_name: String =,
/// Truncated SHA-256 hash of world's seed
field hashed_seed: i64 =,
/// The max number of players on the server
field max_players: u8 =,
/// The render distance (2-32)
field view_distance: VarInt =,
/// Whether the client should reduce the amount of debug
/// information it displays in F3 mode
field reduced_debug_info: bool =,
/// Whether to prompt or immediately respawn
field enable_respawn_screen: bool =,
/// Whether the world is in debug mode
field is_debug: bool =,
/// Whether the world is a superflat world
field is_flat: bool =,
}
packet JoinGame_HashedSeed_Respawn { packet JoinGame_HashedSeed_Respawn {
/// The entity id the client will be referenced by /// The entity id the client will be referenced by
field entity_id: i32 =, field entity_id: i32 =,
@ -1453,7 +1551,7 @@ state_packets!(
field hash: String =, field hash: String =,
} }
/// Respawn is sent to respawn the player after death or when they move worlds. /// Respawn is sent to respawn the player after death or when they move worlds.
packet Respawn { packet Respawn_Gamemode {
field dimension: i32 =, field dimension: i32 =,
field difficulty: u8 =, field difficulty: u8 =,
field gamemode: u8 =, field gamemode: u8 =,
@ -1466,6 +1564,16 @@ state_packets!(
field gamemode: u8 =, field gamemode: u8 =,
field level_type: String =, field level_type: String =,
} }
packet Respawn_WorldName {
field dimension: String =,
field world_name: String =,
field hashed_seed: i64 =,
field gamemode: u8 =,
field previous_gamemode: u8 =,
field is_debug: bool =,
field is_flat: bool =,
field copy_metadata: bool =,
}
/// EntityHeadLook rotates an entity's head to the new angle. /// EntityHeadLook rotates an entity's head to the new angle.
packet EntityHeadLook { packet EntityHeadLook {
field entity_id: VarInt =, field entity_id: VarInt =,
@ -1560,7 +1668,7 @@ state_packets!(
/// EntityEquipment is sent to display an item on an entity, like a sword /// EntityEquipment is sent to display an item on an entity, like a sword
/// or armor. Slot 0 is the held item and slots 1 to 4 are boots, leggings /// or armor. Slot 0 is the held item and slots 1 to 4 are boots, leggings
/// chestplate and helmet respectively. /// chestplate and helmet respectively.
packet EntityEquipment { packet EntityEquipment_VarInt {
field entity_id: VarInt =, field entity_id: VarInt =,
field slot: VarInt =, field slot: VarInt =,
field item: Option<item::Stack> =, field item: Option<item::Stack> =,
@ -1857,7 +1965,16 @@ state_packets!(
field status: VarInt =, field status: VarInt =,
field successful: bool =, field successful: bool =,
} }
packet UpdateLight { packet UpdateLight_WithTrust {
field chunk_x: VarInt =,
field chunk_z: VarInt =,
field trust_edges: bool =,
field sky_light_mask: VarInt =,
field block_light_mask: VarInt =,
field empty_sky_light_mask: VarInt =,
field light_arrays: Vec<u8> =,
}
packet UpdateLight_NoTrust {
field chunk_x: VarInt =, field chunk_x: VarInt =,
field chunk_z: VarInt =, field chunk_z: VarInt =,
field sky_light_mask: VarInt =, field sky_light_mask: VarInt =,
@ -1942,11 +2059,15 @@ state_packets!(
/// LoginSuccess is sent by the server if the player successfully /// LoginSuccess is sent by the server if the player successfully
/// authenicates with the session servers (online mode) or straight /// authenicates with the session servers (online mode) or straight
/// after LoginStart (offline mode). /// after LoginStart (offline mode).
packet LoginSuccess { packet LoginSuccess_String {
/// String encoding of a uuid (with hyphens) /// String encoding of a uuid (with hyphens)
field uuid: String =, field uuid: String =,
field username: String =, field username: String =,
} }
packet LoginSuccess_UUID {
field uuid: UUID =,
field username: String =,
}
/// SetInitialCompression sets the compression threshold during the /// SetInitialCompression sets the compression threshold during the
/// login state. /// login state.
packet SetInitialCompression { packet SetInitialCompression {
@ -2448,7 +2569,7 @@ impl Serializable for PlayerInfoData {
} }
}, },
}), }),
4 => m.players.push(PlayerDetail::Remove { uuid: uuid }), 4 => m.players.push(PlayerDetail::Remove { uuid }),
_ => panic!(), _ => panic!(),
} }
} }
@ -2567,6 +2688,11 @@ pub enum RecipeData {
ingredient: RecipeIngredient, ingredient: RecipeIngredient,
result: Option<item::Stack>, result: Option<item::Stack>,
}, },
Smithing {
base: RecipeIngredient,
addition: RecipeIngredient,
result: Option<item::Stack>,
},
} }
impl Default for RecipeData { impl Default for RecipeData {
@ -2681,6 +2807,11 @@ impl Serializable for Recipe {
ingredient: Serializable::read_from(buf)?, ingredient: Serializable::read_from(buf)?,
result: Serializable::read_from(buf)?, result: Serializable::read_from(buf)?,
}, },
"minecraft:smithing" => RecipeData::Smithing {
base: Serializable::read_from(buf)?,
addition: Serializable::read_from(buf)?,
result: Serializable::read_from(buf)?,
},
_ => panic!("unrecognized recipe type: {}", ty), _ => panic!("unrecognized recipe type: {}", ty),
}; };
@ -2837,6 +2968,7 @@ pub enum CommandProperty {
ItemEnchantment, ItemEnchantment,
EntitySummon, EntitySummon,
Dimension, Dimension,
UUID,
} }
impl Serializable for CommandNode { impl Serializable for CommandNode {
@ -2964,6 +3096,7 @@ impl Serializable for CommandNode {
"minecraft:item_enchantment" => CommandProperty::ItemEnchantment, "minecraft:item_enchantment" => CommandProperty::ItemEnchantment,
"minecraft:entity_summon" => CommandProperty::EntitySummon, "minecraft:entity_summon" => CommandProperty::EntitySummon,
"minecraft:dimension" => CommandProperty::Dimension, "minecraft:dimension" => CommandProperty::Dimension,
"minecraft:uuid" => CommandProperty::UUID,
_ => panic!("unsupported command node parser {}", parse), _ => panic!("unsupported command node parser {}", parse),
}) })
} else { } else {

View File

@ -12,7 +12,8 @@ mod v1_14_1;
mod v1_14_2; mod v1_14_2;
mod v1_14_3; mod v1_14_3;
mod v1_14_4; mod v1_14_4;
mod v1_15_1; mod v1_15;
mod v1_16_1;
mod v1_7_10; mod v1_7_10;
mod v1_8_9; mod v1_8_9;
mod v1_9; mod v1_9;
@ -24,6 +25,9 @@ mod v1_9_2;
pub fn protocol_name_to_protocol_version(s: String) -> i32 { pub fn protocol_name_to_protocol_version(s: String) -> i32 {
match s.as_ref() { match s.as_ref() {
"" => SUPPORTED_PROTOCOLS[0], "" => SUPPORTED_PROTOCOLS[0],
"1.16.1" => 736,
"1.16" => 735,
"1.15.2" => 578,
"1.15.1" => 575, "1.15.1" => 575,
"1.14.4" => 498, "1.14.4" => 498,
"1.14.3" => 490, "1.14.3" => 490,
@ -60,7 +64,10 @@ pub fn translate_internal_packet_id_for_version(
to_internal: bool, to_internal: bool,
) -> i32 { ) -> i32 {
match version { match version {
575 => v1_15_1::translate_internal_packet_id(state, dir, id, to_internal), 736 => v1_16_1::translate_internal_packet_id(state, dir, id, to_internal),
735 => v1_16_1::translate_internal_packet_id(state, dir, id, to_internal),
578 => v1_15::translate_internal_packet_id(state, dir, id, to_internal),
575 => v1_15::translate_internal_packet_id(state, dir, id, to_internal),
498 => v1_14_4::translate_internal_packet_id(state, dir, id, to_internal), 498 => v1_14_4::translate_internal_packet_id(state, dir, id, to_internal),
490 => v1_14_3::translate_internal_packet_id(state, dir, id, to_internal), 490 => v1_14_3::translate_internal_packet_id(state, dir, id, to_internal),
485 => v1_14_2::translate_internal_packet_id(state, dir, id, to_internal), 485 => v1_14_2::translate_internal_packet_id(state, dir, id, to_internal),

View File

@ -17,13 +17,13 @@ protocol_packet_ids!(
0x06 => ClickWindow_u8 0x06 => ClickWindow_u8
0x07 => CloseWindow 0x07 => CloseWindow
0x08 => PluginMessageServerbound 0x08 => PluginMessageServerbound
0x09 => UseEntity 0x09 => UseEntity_Hand
0x0a => KeepAliveServerbound_VarInt 0x0a => KeepAliveServerbound_VarInt
0x0b => PlayerPosition 0x0b => PlayerPosition
0x0c => PlayerPositionLook 0x0c => PlayerPositionLook
0x0d => PlayerLook 0x0d => PlayerLook
0x0e => Player 0x0e => Player
0x0f => ClientAbilities 0x0f => ClientAbilities_f32
0x10 => PlayerDigging_u8 0x10 => PlayerDigging_u8
0x11 => PlayerAction 0x11 => PlayerAction
0x12 => SteerVehicle 0x12 => SteerVehicle
@ -52,7 +52,7 @@ protocol_packet_ids!(
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty 0x0d => ServerDifficulty
0x0e => TabCompleteReply 0x0e => TabCompleteReply
0x0f => ServerMessage 0x0f => ServerMessage_Position
0x10 => MultiBlockChange_VarInt 0x10 => MultiBlockChange_VarInt
0x11 => ConfirmTransaction 0x11 => ConfirmTransaction
0x12 => WindowClose 0x12 => WindowClose
@ -88,7 +88,7 @@ protocol_packet_ids!(
0x30 => EntityDestroy 0x30 => EntityDestroy
0x31 => EntityRemoveEffect 0x31 => EntityRemoveEffect
0x32 => ResourcePackSend 0x32 => ResourcePackSend
0x33 => Respawn 0x33 => Respawn_Gamemode
0x34 => EntityHeadLook 0x34 => EntityHeadLook
0x35 => WorldBorder 0x35 => WorldBorder
0x36 => Camera 0x36 => Camera
@ -97,7 +97,7 @@ protocol_packet_ids!(
0x39 => EntityMetadata 0x39 => EntityMetadata
0x3a => EntityAttach_leashed 0x3a => EntityAttach_leashed
0x3b => EntityVelocity 0x3b => EntityVelocity
0x3c => EntityEquipment 0x3c => EntityEquipment_VarInt
0x3d => SetExperience 0x3d => SetExperience
0x3e => UpdateHealth 0x3e => UpdateHealth
0x3f => ScoreboardObjective 0x3f => ScoreboardObjective
@ -122,7 +122,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
} }
} }

View File

@ -21,7 +21,7 @@ protocol_packet_ids!(
0x0a => PluginMessageServerbound 0x0a => PluginMessageServerbound
0x0b => EditBook 0x0b => EditBook
0x0c => QueryEntityNBT 0x0c => QueryEntityNBT
0x0d => UseEntity 0x0d => UseEntity_Hand
0x0e => KeepAliveServerbound_i64 0x0e => KeepAliveServerbound_i64
0x0f => Player 0x0f => Player
0x10 => PlayerPosition 0x10 => PlayerPosition
@ -31,7 +31,7 @@ protocol_packet_ids!(
0x14 => SteerBoat 0x14 => SteerBoat
0x15 => PickItem 0x15 => PickItem
0x16 => CraftRecipeRequest 0x16 => CraftRecipeRequest
0x17 => ClientAbilities 0x17 => ClientAbilities_f32
0x18 => PlayerDigging 0x18 => PlayerDigging
0x19 => PlayerAction 0x19 => PlayerAction
0x1a => SteerVehicle 0x1a => SteerVehicle
@ -67,7 +67,7 @@ protocol_packet_ids!(
0x0b => BlockChange_VarInt 0x0b => BlockChange_VarInt
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty 0x0d => ServerDifficulty
0x0e => ServerMessage 0x0e => ServerMessage_Position
0x0f => MultiBlockChange_VarInt 0x0f => MultiBlockChange_VarInt
0x10 => TabCompleteReply 0x10 => TabCompleteReply
0x11 => DeclareCommands 0x11 => DeclareCommands
@ -110,7 +110,7 @@ protocol_packet_ids!(
0x36 => EntityDestroy 0x36 => EntityDestroy
0x37 => EntityRemoveEffect 0x37 => EntityRemoveEffect
0x38 => ResourcePackSend 0x38 => ResourcePackSend
0x39 => Respawn 0x39 => Respawn_Gamemode
0x3a => EntityHeadLook 0x3a => EntityHeadLook
0x3b => SelectAdvancementTab 0x3b => SelectAdvancementTab
0x3c => WorldBorder 0x3c => WorldBorder
@ -120,7 +120,7 @@ protocol_packet_ids!(
0x40 => EntityMetadata 0x40 => EntityMetadata
0x41 => EntityAttach 0x41 => EntityAttach
0x42 => EntityVelocity 0x42 => EntityVelocity
0x43 => EntityEquipment 0x43 => EntityEquipment_VarInt
0x44 => SetExperience 0x44 => SetExperience
0x45 => UpdateHealth 0x45 => UpdateHealth
0x46 => ScoreboardObjective 0x46 => ScoreboardObjective
@ -140,7 +140,7 @@ protocol_packet_ids!(
0x55 => EntityEffect 0x55 => EntityEffect
0x56 => DeclareRecipes 0x56 => DeclareRecipes
0x57 => TagsWithEntities 0x57 => TagsWithEntities
0x58 => UpdateLight 0x58 => UpdateLight_NoTrust
} }
} }
login Login { login Login {
@ -152,7 +152,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
0x04 => LoginPluginRequest 0x04 => LoginPluginRequest
} }

View File

@ -21,7 +21,7 @@ protocol_packet_ids!(
0x0a => PluginMessageServerbound 0x0a => PluginMessageServerbound
0x0b => EditBook 0x0b => EditBook
0x0c => QueryEntityNBT 0x0c => QueryEntityNBT
0x0d => UseEntity 0x0d => UseEntity_Hand
0x0e => KeepAliveServerbound_i64 0x0e => KeepAliveServerbound_i64
0x0f => Player 0x0f => Player
0x10 => PlayerPosition 0x10 => PlayerPosition
@ -31,7 +31,7 @@ protocol_packet_ids!(
0x14 => SteerBoat 0x14 => SteerBoat
0x15 => PickItem 0x15 => PickItem
0x16 => CraftRecipeRequest 0x16 => CraftRecipeRequest
0x17 => ClientAbilities 0x17 => ClientAbilities_f32
0x18 => PlayerDigging 0x18 => PlayerDigging
0x19 => PlayerAction 0x19 => PlayerAction
0x1a => SteerVehicle 0x1a => SteerVehicle
@ -67,7 +67,7 @@ protocol_packet_ids!(
0x0b => BlockChange_VarInt 0x0b => BlockChange_VarInt
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty 0x0d => ServerDifficulty
0x0e => ServerMessage 0x0e => ServerMessage_Position
0x0f => MultiBlockChange_VarInt 0x0f => MultiBlockChange_VarInt
0x10 => TabCompleteReply 0x10 => TabCompleteReply
0x11 => DeclareCommands 0x11 => DeclareCommands
@ -110,7 +110,7 @@ protocol_packet_ids!(
0x36 => EntityDestroy 0x36 => EntityDestroy
0x37 => EntityRemoveEffect 0x37 => EntityRemoveEffect
0x38 => ResourcePackSend 0x38 => ResourcePackSend
0x39 => Respawn 0x39 => Respawn_Gamemode
0x3a => EntityHeadLook 0x3a => EntityHeadLook
0x3b => SelectAdvancementTab 0x3b => SelectAdvancementTab
0x3c => WorldBorder 0x3c => WorldBorder
@ -120,7 +120,7 @@ protocol_packet_ids!(
0x40 => EntityMetadata 0x40 => EntityMetadata
0x41 => EntityAttach 0x41 => EntityAttach
0x42 => EntityVelocity 0x42 => EntityVelocity
0x43 => EntityEquipment 0x43 => EntityEquipment_VarInt
0x44 => SetExperience 0x44 => SetExperience
0x45 => UpdateHealth 0x45 => UpdateHealth
0x46 => ScoreboardObjective 0x46 => ScoreboardObjective
@ -140,7 +140,7 @@ protocol_packet_ids!(
0x55 => EntityEffect 0x55 => EntityEffect
0x56 => DeclareRecipes 0x56 => DeclareRecipes
0x57 => TagsWithEntities 0x57 => TagsWithEntities
0x58 => UpdateLight 0x58 => UpdateLight_NoTrust
0x59 => WindowOpen_VarInt 0x59 => WindowOpen_VarInt
0x5a => TradeList_WithoutRestock // TODO: without 1.14 added fields 0x5a => TradeList_WithoutRestock // TODO: without 1.14 added fields
} }
@ -154,7 +154,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
0x04 => LoginPluginRequest 0x04 => LoginPluginRequest
} }

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow 0x07 => ClickWindow
0x08 => CloseWindow 0x08 => CloseWindow
0x09 => PluginMessageServerbound 0x09 => PluginMessageServerbound
0x0a => UseEntity 0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_VarInt 0x0b => KeepAliveServerbound_VarInt
0x0c => PlayerPosition 0x0c => PlayerPosition
0x0d => PlayerPositionLook 0x0d => PlayerPositionLook
@ -26,7 +26,7 @@ protocol_packet_ids!(
0x0f => Player 0x0f => Player
0x10 => VehicleMove 0x10 => VehicleMove
0x11 => SteerBoat 0x11 => SteerBoat
0x12 => ClientAbilities 0x12 => ClientAbilities_f32
0x13 => PlayerDigging 0x13 => PlayerDigging
0x14 => PlayerAction 0x14 => PlayerAction
0x15 => SteerVehicle 0x15 => SteerVehicle
@ -55,7 +55,7 @@ protocol_packet_ids!(
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty 0x0d => ServerDifficulty
0x0e => TabCompleteReply 0x0e => TabCompleteReply
0x0f => ServerMessage 0x0f => ServerMessage_Position
0x10 => MultiBlockChange_VarInt 0x10 => MultiBlockChange_VarInt
0x11 => ConfirmTransaction 0x11 => ConfirmTransaction
0x12 => WindowClose 0x12 => WindowClose
@ -91,7 +91,7 @@ protocol_packet_ids!(
0x30 => EntityDestroy 0x30 => EntityDestroy
0x31 => EntityRemoveEffect 0x31 => EntityRemoveEffect
0x32 => ResourcePackSend 0x32 => ResourcePackSend
0x33 => Respawn 0x33 => Respawn_Gamemode
0x34 => EntityHeadLook 0x34 => EntityHeadLook
0x35 => WorldBorder 0x35 => WorldBorder
0x36 => Camera 0x36 => Camera
@ -100,7 +100,7 @@ protocol_packet_ids!(
0x39 => EntityMetadata 0x39 => EntityMetadata
0x3a => EntityAttach 0x3a => EntityAttach
0x3b => EntityVelocity 0x3b => EntityVelocity
0x3c => EntityEquipment 0x3c => EntityEquipment_VarInt
0x3d => SetExperience 0x3d => SetExperience
0x3e => UpdateHealth 0x3e => UpdateHealth
0x3f => ScoreboardObjective 0x3f => ScoreboardObjective
@ -126,7 +126,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
} }
} }

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow 0x07 => ClickWindow
0x08 => CloseWindow 0x08 => CloseWindow
0x09 => PluginMessageServerbound 0x09 => PluginMessageServerbound
0x0a => UseEntity 0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_VarInt 0x0b => KeepAliveServerbound_VarInt
0x0c => PlayerPosition 0x0c => PlayerPosition
0x0d => PlayerPositionLook 0x0d => PlayerPositionLook
@ -26,7 +26,7 @@ protocol_packet_ids!(
0x0f => Player 0x0f => Player
0x10 => VehicleMove 0x10 => VehicleMove
0x11 => SteerBoat 0x11 => SteerBoat
0x12 => ClientAbilities 0x12 => ClientAbilities_f32
0x13 => PlayerDigging 0x13 => PlayerDigging
0x14 => PlayerAction 0x14 => PlayerAction
0x15 => SteerVehicle 0x15 => SteerVehicle
@ -55,7 +55,7 @@ protocol_packet_ids!(
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty 0x0d => ServerDifficulty
0x0e => TabCompleteReply 0x0e => TabCompleteReply
0x0f => ServerMessage 0x0f => ServerMessage_Position
0x10 => MultiBlockChange_VarInt 0x10 => MultiBlockChange_VarInt
0x11 => ConfirmTransaction 0x11 => ConfirmTransaction
0x12 => WindowClose 0x12 => WindowClose
@ -91,7 +91,7 @@ protocol_packet_ids!(
0x30 => EntityDestroy 0x30 => EntityDestroy
0x31 => EntityRemoveEffect 0x31 => EntityRemoveEffect
0x32 => ResourcePackSend 0x32 => ResourcePackSend
0x33 => Respawn 0x33 => Respawn_Gamemode
0x34 => EntityHeadLook 0x34 => EntityHeadLook
0x35 => WorldBorder 0x35 => WorldBorder
0x36 => Camera 0x36 => Camera
@ -100,7 +100,7 @@ protocol_packet_ids!(
0x39 => EntityMetadata 0x39 => EntityMetadata
0x3a => EntityAttach 0x3a => EntityAttach
0x3b => EntityVelocity 0x3b => EntityVelocity
0x3c => EntityEquipment 0x3c => EntityEquipment_VarInt
0x3d => SetExperience 0x3d => SetExperience
0x3e => UpdateHealth 0x3e => UpdateHealth
0x3f => ScoreboardObjective 0x3f => ScoreboardObjective
@ -126,7 +126,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
} }
} }

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow 0x07 => ClickWindow
0x08 => CloseWindow 0x08 => CloseWindow
0x09 => PluginMessageServerbound 0x09 => PluginMessageServerbound
0x0a => UseEntity 0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_i64 0x0b => KeepAliveServerbound_i64
0x0c => Player 0x0c => Player
0x0d => PlayerPosition 0x0d => PlayerPosition
@ -27,7 +27,7 @@ protocol_packet_ids!(
0x10 => VehicleMove 0x10 => VehicleMove
0x11 => SteerBoat 0x11 => SteerBoat
0x12 => CraftRecipeRequest 0x12 => CraftRecipeRequest
0x13 => ClientAbilities 0x13 => ClientAbilities_f32
0x14 => PlayerDigging 0x14 => PlayerDigging
0x15 => PlayerAction 0x15 => PlayerAction
0x16 => SteerVehicle 0x16 => SteerVehicle
@ -58,7 +58,7 @@ protocol_packet_ids!(
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty 0x0d => ServerDifficulty
0x0e => TabCompleteReply 0x0e => TabCompleteReply
0x0f => ServerMessage 0x0f => ServerMessage_Position
0x10 => MultiBlockChange_VarInt 0x10 => MultiBlockChange_VarInt
0x11 => ConfirmTransaction 0x11 => ConfirmTransaction
0x12 => WindowClose 0x12 => WindowClose
@ -96,7 +96,7 @@ protocol_packet_ids!(
0x32 => EntityDestroy 0x32 => EntityDestroy
0x33 => EntityRemoveEffect 0x33 => EntityRemoveEffect
0x34 => ResourcePackSend 0x34 => ResourcePackSend
0x35 => Respawn 0x35 => Respawn_Gamemode
0x36 => EntityHeadLook 0x36 => EntityHeadLook
0x37 => SelectAdvancementTab 0x37 => SelectAdvancementTab
0x38 => WorldBorder 0x38 => WorldBorder
@ -106,7 +106,7 @@ protocol_packet_ids!(
0x3c => EntityMetadata 0x3c => EntityMetadata
0x3d => EntityAttach 0x3d => EntityAttach
0x3e => EntityVelocity 0x3e => EntityVelocity
0x3f => EntityEquipment 0x3f => EntityEquipment_VarInt
0x40 => SetExperience 0x40 => SetExperience
0x41 => UpdateHealth 0x41 => UpdateHealth
0x42 => ScoreboardObjective 0x42 => ScoreboardObjective
@ -133,7 +133,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
} }
} }

View File

@ -21,7 +21,7 @@ protocol_packet_ids!(
0x0a => PluginMessageServerbound 0x0a => PluginMessageServerbound
0x0b => EditBook 0x0b => EditBook
0x0c => QueryEntityNBT 0x0c => QueryEntityNBT
0x0d => UseEntity 0x0d => UseEntity_Hand
0x0e => KeepAliveServerbound_i64 0x0e => KeepAliveServerbound_i64
0x0f => Player 0x0f => Player
0x10 => PlayerPosition 0x10 => PlayerPosition
@ -31,7 +31,7 @@ protocol_packet_ids!(
0x14 => SteerBoat 0x14 => SteerBoat
0x15 => PickItem 0x15 => PickItem
0x16 => CraftRecipeRequest 0x16 => CraftRecipeRequest
0x17 => ClientAbilities 0x17 => ClientAbilities_f32
0x18 => PlayerDigging 0x18 => PlayerDigging
0x19 => PlayerAction 0x19 => PlayerAction
0x1a => SteerVehicle 0x1a => SteerVehicle
@ -67,7 +67,7 @@ protocol_packet_ids!(
0x0b => BlockChange_VarInt 0x0b => BlockChange_VarInt
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty 0x0d => ServerDifficulty
0x0e => ServerMessage 0x0e => ServerMessage_Position
0x0f => MultiBlockChange_VarInt 0x0f => MultiBlockChange_VarInt
0x10 => TabCompleteReply 0x10 => TabCompleteReply
0x11 => DeclareCommands 0x11 => DeclareCommands
@ -109,7 +109,7 @@ protocol_packet_ids!(
0x35 => EntityDestroy 0x35 => EntityDestroy
0x36 => EntityRemoveEffect 0x36 => EntityRemoveEffect
0x37 => ResourcePackSend 0x37 => ResourcePackSend
0x38 => Respawn 0x38 => Respawn_Gamemode
0x39 => EntityHeadLook 0x39 => EntityHeadLook
0x3a => SelectAdvancementTab 0x3a => SelectAdvancementTab
0x3b => WorldBorder 0x3b => WorldBorder
@ -119,7 +119,7 @@ protocol_packet_ids!(
0x3f => EntityMetadata 0x3f => EntityMetadata
0x40 => EntityAttach 0x40 => EntityAttach
0x41 => EntityVelocity 0x41 => EntityVelocity
0x42 => EntityEquipment 0x42 => EntityEquipment_VarInt
0x43 => SetExperience 0x43 => SetExperience
0x44 => UpdateHealth 0x44 => UpdateHealth
0x45 => ScoreboardObjective 0x45 => ScoreboardObjective
@ -149,7 +149,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
0x04 => LoginPluginRequest 0x04 => LoginPluginRequest
} }

View File

@ -22,7 +22,7 @@ protocol_packet_ids!(
0x0b => PluginMessageServerbound 0x0b => PluginMessageServerbound
0x0c => EditBook 0x0c => EditBook
0x0d => QueryEntityNBT 0x0d => QueryEntityNBT
0x0e => UseEntity 0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64 0x0f => KeepAliveServerbound_i64
0x10 => LockDifficulty 0x10 => LockDifficulty
0x11 => PlayerPosition 0x11 => PlayerPosition
@ -33,7 +33,7 @@ protocol_packet_ids!(
0x16 => SteerBoat 0x16 => SteerBoat
0x17 => PickItem 0x17 => PickItem
0x18 => CraftRecipeRequest 0x18 => CraftRecipeRequest
0x19 => ClientAbilities 0x19 => ClientAbilities_f32
0x1a => PlayerDigging 0x1a => PlayerDigging
0x1b => PlayerAction 0x1b => PlayerAction
0x1c => SteerVehicle 0x1c => SteerVehicle
@ -47,16 +47,16 @@ protocol_packet_ids!(
0x24 => UpdateCommandBlock 0x24 => UpdateCommandBlock
0x25 => UpdateCommandBlockMinecart 0x25 => UpdateCommandBlockMinecart
0x26 => CreativeInventoryAction 0x26 => CreativeInventoryAction
0x27 => UpdateJigsawBlock 0x27 => UpdateJigsawBlock_Type
0x28 => UpdateStructureBlock 0x28 => UpdateStructureBlock
0x29 => SetSign 0x29 => SetSign
0x2a => ArmSwing 0x2a => ArmSwing
0x2b => SpectateTeleport 0x2b => SpectateTeleport
0x2c => PlayerBlockPlacement_f32 0x2c => PlayerBlockPlacement_insideblock
0x2d => UseItem 0x2d => UseItem
} }
clientbound Clientbound { clientbound Clientbound {
0x00 => SpawnObject 0x00 => SpawnObject_VarInt
0x01 => SpawnExperienceOrb 0x01 => SpawnExperienceOrb
0x02 => SpawnGlobalEntity 0x02 => SpawnGlobalEntity
0x03 => SpawnMob_WithMeta 0x03 => SpawnMob_WithMeta
@ -70,7 +70,7 @@ protocol_packet_ids!(
0x0b => BlockChange_VarInt 0x0b => BlockChange_VarInt
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty_Locked 0x0d => ServerDifficulty_Locked
0x0e => ServerMessage 0x0e => ServerMessage_Position
0x0f => MultiBlockChange_VarInt 0x0f => MultiBlockChange_VarInt
0x10 => TabCompleteReply 0x10 => TabCompleteReply
0x11 => DeclareCommands 0x11 => DeclareCommands
@ -92,7 +92,7 @@ protocol_packet_ids!(
0x21 => ChunkData_HeightMap 0x21 => ChunkData_HeightMap
0x22 => Effect 0x22 => Effect
0x23 => Particle_Data 0x23 => Particle_Data
0x24 => UpdateLight 0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance 0x25 => JoinGame_i32_ViewDistance
0x26 => Maps 0x26 => Maps
0x27 => TradeList_WithoutRestock 0x27 => TradeList_WithoutRestock
@ -114,7 +114,7 @@ protocol_packet_ids!(
0x37 => EntityDestroy 0x37 => EntityDestroy
0x38 => EntityRemoveEffect 0x38 => EntityRemoveEffect
0x39 => ResourcePackSend 0x39 => ResourcePackSend
0x3a => Respawn 0x3a => Respawn_Gamemode
0x3b => EntityHeadLook 0x3b => EntityHeadLook
0x3c => SelectAdvancementTab 0x3c => SelectAdvancementTab
0x3d => WorldBorder 0x3d => WorldBorder
@ -126,7 +126,7 @@ protocol_packet_ids!(
0x43 => EntityMetadata 0x43 => EntityMetadata
0x44 => EntityAttach 0x44 => EntityAttach
0x45 => EntityVelocity 0x45 => EntityVelocity
0x46 => EntityEquipment 0x46 => EntityEquipment_VarInt
0x47 => SetExperience 0x47 => SetExperience
0x48 => UpdateHealth 0x48 => UpdateHealth
0x49 => ScoreboardObjective 0x49 => ScoreboardObjective
@ -159,7 +159,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
0x04 => LoginPluginRequest 0x04 => LoginPluginRequest
} }

View File

@ -22,7 +22,7 @@ protocol_packet_ids!(
0x0b => PluginMessageServerbound 0x0b => PluginMessageServerbound
0x0c => EditBook 0x0c => EditBook
0x0d => QueryEntityNBT 0x0d => QueryEntityNBT
0x0e => UseEntity 0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64 0x0f => KeepAliveServerbound_i64
0x10 => LockDifficulty 0x10 => LockDifficulty
0x11 => PlayerPosition 0x11 => PlayerPosition
@ -33,7 +33,7 @@ protocol_packet_ids!(
0x16 => SteerBoat 0x16 => SteerBoat
0x17 => PickItem 0x17 => PickItem
0x18 => CraftRecipeRequest 0x18 => CraftRecipeRequest
0x19 => ClientAbilities 0x19 => ClientAbilities_f32
0x1a => PlayerDigging 0x1a => PlayerDigging
0x1b => PlayerAction 0x1b => PlayerAction
0x1c => SteerVehicle 0x1c => SteerVehicle
@ -47,16 +47,16 @@ protocol_packet_ids!(
0x24 => UpdateCommandBlock 0x24 => UpdateCommandBlock
0x25 => UpdateCommandBlockMinecart 0x25 => UpdateCommandBlockMinecart
0x26 => CreativeInventoryAction 0x26 => CreativeInventoryAction
0x27 => UpdateJigsawBlock 0x27 => UpdateJigsawBlock_Type
0x28 => UpdateStructureBlock 0x28 => UpdateStructureBlock
0x29 => SetSign 0x29 => SetSign
0x2a => ArmSwing 0x2a => ArmSwing
0x2b => SpectateTeleport 0x2b => SpectateTeleport
0x2c => PlayerBlockPlacement_f32 0x2c => PlayerBlockPlacement_insideblock
0x2d => UseItem 0x2d => UseItem
} }
clientbound Clientbound { clientbound Clientbound {
0x00 => SpawnObject 0x00 => SpawnObject_VarInt
0x01 => SpawnExperienceOrb 0x01 => SpawnExperienceOrb
0x02 => SpawnGlobalEntity 0x02 => SpawnGlobalEntity
0x03 => SpawnMob_WithMeta 0x03 => SpawnMob_WithMeta
@ -70,7 +70,7 @@ protocol_packet_ids!(
0x0b => BlockChange_VarInt 0x0b => BlockChange_VarInt
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty_Locked 0x0d => ServerDifficulty_Locked
0x0e => ServerMessage 0x0e => ServerMessage_Position
0x0f => MultiBlockChange_VarInt 0x0f => MultiBlockChange_VarInt
0x10 => TabCompleteReply 0x10 => TabCompleteReply
0x11 => DeclareCommands 0x11 => DeclareCommands
@ -92,7 +92,7 @@ protocol_packet_ids!(
0x21 => ChunkData_HeightMap 0x21 => ChunkData_HeightMap
0x22 => Effect 0x22 => Effect
0x23 => Particle_Data 0x23 => Particle_Data
0x24 => UpdateLight 0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance 0x25 => JoinGame_i32_ViewDistance
0x26 => Maps 0x26 => Maps
0x27 => TradeList_WithoutRestock 0x27 => TradeList_WithoutRestock
@ -114,7 +114,7 @@ protocol_packet_ids!(
0x37 => EntityDestroy 0x37 => EntityDestroy
0x38 => EntityRemoveEffect 0x38 => EntityRemoveEffect
0x39 => ResourcePackSend 0x39 => ResourcePackSend
0x3a => Respawn 0x3a => Respawn_Gamemode
0x3b => EntityHeadLook 0x3b => EntityHeadLook
0x3c => SelectAdvancementTab 0x3c => SelectAdvancementTab
0x3d => WorldBorder 0x3d => WorldBorder
@ -126,7 +126,7 @@ protocol_packet_ids!(
0x43 => EntityMetadata 0x43 => EntityMetadata
0x44 => EntityAttach 0x44 => EntityAttach
0x45 => EntityVelocity 0x45 => EntityVelocity
0x46 => EntityEquipment 0x46 => EntityEquipment_VarInt
0x47 => SetExperience 0x47 => SetExperience
0x48 => UpdateHealth 0x48 => UpdateHealth
0x49 => ScoreboardObjective 0x49 => ScoreboardObjective
@ -159,7 +159,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
0x04 => LoginPluginRequest 0x04 => LoginPluginRequest
} }

View File

@ -22,7 +22,7 @@ protocol_packet_ids!(
0x0b => PluginMessageServerbound 0x0b => PluginMessageServerbound
0x0c => EditBook 0x0c => EditBook
0x0d => QueryEntityNBT 0x0d => QueryEntityNBT
0x0e => UseEntity 0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64 0x0f => KeepAliveServerbound_i64
0x10 => LockDifficulty 0x10 => LockDifficulty
0x11 => PlayerPosition 0x11 => PlayerPosition
@ -33,7 +33,7 @@ protocol_packet_ids!(
0x16 => SteerBoat 0x16 => SteerBoat
0x17 => PickItem 0x17 => PickItem
0x18 => CraftRecipeRequest 0x18 => CraftRecipeRequest
0x19 => ClientAbilities 0x19 => ClientAbilities_f32
0x1a => PlayerDigging 0x1a => PlayerDigging
0x1b => PlayerAction 0x1b => PlayerAction
0x1c => SteerVehicle 0x1c => SteerVehicle
@ -47,16 +47,16 @@ protocol_packet_ids!(
0x24 => UpdateCommandBlock 0x24 => UpdateCommandBlock
0x25 => UpdateCommandBlockMinecart 0x25 => UpdateCommandBlockMinecart
0x26 => CreativeInventoryAction 0x26 => CreativeInventoryAction
0x27 => UpdateJigsawBlock 0x27 => UpdateJigsawBlock_Type
0x28 => UpdateStructureBlock 0x28 => UpdateStructureBlock
0x29 => SetSign 0x29 => SetSign
0x2a => ArmSwing 0x2a => ArmSwing
0x2b => SpectateTeleport 0x2b => SpectateTeleport
0x2c => PlayerBlockPlacement_f32 0x2c => PlayerBlockPlacement_insideblock
0x2d => UseItem 0x2d => UseItem
} }
clientbound Clientbound { clientbound Clientbound {
0x00 => SpawnObject 0x00 => SpawnObject_VarInt
0x01 => SpawnExperienceOrb 0x01 => SpawnExperienceOrb
0x02 => SpawnGlobalEntity 0x02 => SpawnGlobalEntity
0x03 => SpawnMob_WithMeta 0x03 => SpawnMob_WithMeta
@ -70,7 +70,7 @@ protocol_packet_ids!(
0x0b => BlockChange_VarInt 0x0b => BlockChange_VarInt
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty_Locked 0x0d => ServerDifficulty_Locked
0x0e => ServerMessage 0x0e => ServerMessage_Position
0x0f => MultiBlockChange_VarInt 0x0f => MultiBlockChange_VarInt
0x10 => TabCompleteReply 0x10 => TabCompleteReply
0x11 => DeclareCommands 0x11 => DeclareCommands
@ -92,7 +92,7 @@ protocol_packet_ids!(
0x21 => ChunkData_HeightMap 0x21 => ChunkData_HeightMap
0x22 => Effect 0x22 => Effect
0x23 => Particle_Data 0x23 => Particle_Data
0x24 => UpdateLight 0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance 0x25 => JoinGame_i32_ViewDistance
0x26 => Maps 0x26 => Maps
0x27 => TradeList_WithoutRestock 0x27 => TradeList_WithoutRestock
@ -114,7 +114,7 @@ protocol_packet_ids!(
0x37 => EntityDestroy 0x37 => EntityDestroy
0x38 => EntityRemoveEffect 0x38 => EntityRemoveEffect
0x39 => ResourcePackSend 0x39 => ResourcePackSend
0x3a => Respawn 0x3a => Respawn_Gamemode
0x3b => EntityHeadLook 0x3b => EntityHeadLook
0x3c => SelectAdvancementTab 0x3c => SelectAdvancementTab
0x3d => WorldBorder 0x3d => WorldBorder
@ -126,7 +126,7 @@ protocol_packet_ids!(
0x43 => EntityMetadata 0x43 => EntityMetadata
0x44 => EntityAttach 0x44 => EntityAttach
0x45 => EntityVelocity 0x45 => EntityVelocity
0x46 => EntityEquipment 0x46 => EntityEquipment_VarInt
0x47 => SetExperience 0x47 => SetExperience
0x48 => UpdateHealth 0x48 => UpdateHealth
0x49 => ScoreboardObjective 0x49 => ScoreboardObjective
@ -159,7 +159,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
0x04 => LoginPluginRequest 0x04 => LoginPluginRequest
} }

View File

@ -22,7 +22,7 @@ protocol_packet_ids!(
0x0b => PluginMessageServerbound 0x0b => PluginMessageServerbound
0x0c => EditBook 0x0c => EditBook
0x0d => QueryEntityNBT 0x0d => QueryEntityNBT
0x0e => UseEntity 0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64 0x0f => KeepAliveServerbound_i64
0x10 => LockDifficulty 0x10 => LockDifficulty
0x11 => PlayerPosition 0x11 => PlayerPosition
@ -33,7 +33,7 @@ protocol_packet_ids!(
0x16 => SteerBoat 0x16 => SteerBoat
0x17 => PickItem 0x17 => PickItem
0x18 => CraftRecipeRequest 0x18 => CraftRecipeRequest
0x19 => ClientAbilities 0x19 => ClientAbilities_f32
0x1a => PlayerDigging 0x1a => PlayerDigging
0x1b => PlayerAction 0x1b => PlayerAction
0x1c => SteerVehicle 0x1c => SteerVehicle
@ -47,16 +47,16 @@ protocol_packet_ids!(
0x24 => UpdateCommandBlock 0x24 => UpdateCommandBlock
0x25 => UpdateCommandBlockMinecart 0x25 => UpdateCommandBlockMinecart
0x26 => CreativeInventoryAction 0x26 => CreativeInventoryAction
0x27 => UpdateJigsawBlock 0x27 => UpdateJigsawBlock_Type
0x28 => UpdateStructureBlock 0x28 => UpdateStructureBlock
0x29 => SetSign 0x29 => SetSign
0x2a => ArmSwing 0x2a => ArmSwing
0x2b => SpectateTeleport 0x2b => SpectateTeleport
0x2c => PlayerBlockPlacement_f32 0x2c => PlayerBlockPlacement_insideblock
0x2d => UseItem 0x2d => UseItem
} }
clientbound Clientbound { clientbound Clientbound {
0x00 => SpawnObject 0x00 => SpawnObject_VarInt
0x01 => SpawnExperienceOrb 0x01 => SpawnExperienceOrb
0x02 => SpawnGlobalEntity 0x02 => SpawnGlobalEntity
0x03 => SpawnMob_WithMeta 0x03 => SpawnMob_WithMeta
@ -70,7 +70,7 @@ protocol_packet_ids!(
0x0b => BlockChange_VarInt 0x0b => BlockChange_VarInt
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty_Locked 0x0d => ServerDifficulty_Locked
0x0e => ServerMessage 0x0e => ServerMessage_Position
0x0f => MultiBlockChange_VarInt 0x0f => MultiBlockChange_VarInt
0x10 => TabCompleteReply 0x10 => TabCompleteReply
0x11 => DeclareCommands 0x11 => DeclareCommands
@ -92,7 +92,7 @@ protocol_packet_ids!(
0x21 => ChunkData_HeightMap 0x21 => ChunkData_HeightMap
0x22 => Effect 0x22 => Effect
0x23 => Particle_Data 0x23 => Particle_Data
0x24 => UpdateLight 0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance 0x25 => JoinGame_i32_ViewDistance
0x26 => Maps 0x26 => Maps
0x27 => TradeList_WithRestock 0x27 => TradeList_WithRestock
@ -114,7 +114,7 @@ protocol_packet_ids!(
0x37 => EntityDestroy 0x37 => EntityDestroy
0x38 => EntityRemoveEffect 0x38 => EntityRemoveEffect
0x39 => ResourcePackSend 0x39 => ResourcePackSend
0x3a => Respawn 0x3a => Respawn_Gamemode
0x3b => EntityHeadLook 0x3b => EntityHeadLook
0x3c => SelectAdvancementTab 0x3c => SelectAdvancementTab
0x3d => WorldBorder 0x3d => WorldBorder
@ -126,7 +126,7 @@ protocol_packet_ids!(
0x43 => EntityMetadata 0x43 => EntityMetadata
0x44 => EntityAttach 0x44 => EntityAttach
0x45 => EntityVelocity 0x45 => EntityVelocity
0x46 => EntityEquipment 0x46 => EntityEquipment_VarInt
0x47 => SetExperience 0x47 => SetExperience
0x48 => UpdateHealth 0x48 => UpdateHealth
0x49 => ScoreboardObjective 0x49 => ScoreboardObjective
@ -159,7 +159,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
0x04 => LoginPluginRequest 0x04 => LoginPluginRequest
} }

View File

@ -22,7 +22,7 @@ protocol_packet_ids!(
0x0b => PluginMessageServerbound 0x0b => PluginMessageServerbound
0x0c => EditBook 0x0c => EditBook
0x0d => QueryEntityNBT 0x0d => QueryEntityNBT
0x0e => UseEntity 0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64 0x0f => KeepAliveServerbound_i64
0x10 => LockDifficulty 0x10 => LockDifficulty
0x11 => PlayerPosition 0x11 => PlayerPosition
@ -33,7 +33,7 @@ protocol_packet_ids!(
0x16 => SteerBoat 0x16 => SteerBoat
0x17 => PickItem 0x17 => PickItem
0x18 => CraftRecipeRequest 0x18 => CraftRecipeRequest
0x19 => ClientAbilities 0x19 => ClientAbilities_f32
0x1a => PlayerDigging 0x1a => PlayerDigging
0x1b => PlayerAction 0x1b => PlayerAction
0x1c => SteerVehicle 0x1c => SteerVehicle
@ -47,16 +47,16 @@ protocol_packet_ids!(
0x24 => UpdateCommandBlock 0x24 => UpdateCommandBlock
0x25 => UpdateCommandBlockMinecart 0x25 => UpdateCommandBlockMinecart
0x26 => CreativeInventoryAction 0x26 => CreativeInventoryAction
0x27 => UpdateJigsawBlock 0x27 => UpdateJigsawBlock_Type
0x28 => UpdateStructureBlock 0x28 => UpdateStructureBlock
0x29 => SetSign 0x29 => SetSign
0x2a => ArmSwing 0x2a => ArmSwing
0x2b => SpectateTeleport 0x2b => SpectateTeleport
0x2c => PlayerBlockPlacement_f32 0x2c => PlayerBlockPlacement_insideblock
0x2d => UseItem 0x2d => UseItem
} }
clientbound Clientbound { clientbound Clientbound {
0x00 => SpawnObject 0x00 => SpawnObject_VarInt
0x01 => SpawnExperienceOrb 0x01 => SpawnExperienceOrb
0x02 => SpawnGlobalEntity 0x02 => SpawnGlobalEntity
0x03 => SpawnMob_WithMeta 0x03 => SpawnMob_WithMeta
@ -70,7 +70,7 @@ protocol_packet_ids!(
0x0b => BlockChange_VarInt 0x0b => BlockChange_VarInt
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty_Locked 0x0d => ServerDifficulty_Locked
0x0e => ServerMessage 0x0e => ServerMessage_Position
0x0f => MultiBlockChange_VarInt 0x0f => MultiBlockChange_VarInt
0x10 => TabCompleteReply 0x10 => TabCompleteReply
0x11 => DeclareCommands 0x11 => DeclareCommands
@ -92,7 +92,7 @@ protocol_packet_ids!(
0x21 => ChunkData_HeightMap 0x21 => ChunkData_HeightMap
0x22 => Effect 0x22 => Effect
0x23 => Particle_Data 0x23 => Particle_Data
0x24 => UpdateLight 0x24 => UpdateLight_NoTrust
0x25 => JoinGame_i32_ViewDistance 0x25 => JoinGame_i32_ViewDistance
0x26 => Maps 0x26 => Maps
0x27 => TradeList_WithRestock 0x27 => TradeList_WithRestock
@ -114,7 +114,7 @@ protocol_packet_ids!(
0x37 => EntityDestroy 0x37 => EntityDestroy
0x38 => EntityRemoveEffect 0x38 => EntityRemoveEffect
0x39 => ResourcePackSend 0x39 => ResourcePackSend
0x3a => Respawn 0x3a => Respawn_Gamemode
0x3b => EntityHeadLook 0x3b => EntityHeadLook
0x3c => SelectAdvancementTab 0x3c => SelectAdvancementTab
0x3d => WorldBorder 0x3d => WorldBorder
@ -126,7 +126,7 @@ protocol_packet_ids!(
0x43 => EntityMetadata 0x43 => EntityMetadata
0x44 => EntityAttach 0x44 => EntityAttach
0x45 => EntityVelocity 0x45 => EntityVelocity
0x46 => EntityEquipment 0x46 => EntityEquipment_VarInt
0x47 => SetExperience 0x47 => SetExperience
0x48 => UpdateHealth 0x48 => UpdateHealth
0x49 => ScoreboardObjective 0x49 => ScoreboardObjective
@ -160,7 +160,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
0x04 => LoginPluginRequest 0x04 => LoginPluginRequest
} }

View File

@ -22,7 +22,7 @@ protocol_packet_ids!(
0x0b => PluginMessageServerbound 0x0b => PluginMessageServerbound
0x0c => EditBook 0x0c => EditBook
0x0d => QueryEntityNBT 0x0d => QueryEntityNBT
0x0e => UseEntity 0x0e => UseEntity_Hand
0x0f => KeepAliveServerbound_i64 0x0f => KeepAliveServerbound_i64
0x10 => LockDifficulty 0x10 => LockDifficulty
0x11 => PlayerPosition 0x11 => PlayerPosition
@ -33,7 +33,7 @@ protocol_packet_ids!(
0x16 => SteerBoat 0x16 => SteerBoat
0x17 => PickItem 0x17 => PickItem
0x18 => CraftRecipeRequest 0x18 => CraftRecipeRequest
0x19 => ClientAbilities 0x19 => ClientAbilities_f32
0x1a => PlayerDigging 0x1a => PlayerDigging
0x1b => PlayerAction 0x1b => PlayerAction
0x1c => SteerVehicle 0x1c => SteerVehicle
@ -47,16 +47,16 @@ protocol_packet_ids!(
0x24 => UpdateCommandBlock 0x24 => UpdateCommandBlock
0x25 => UpdateCommandBlockMinecart 0x25 => UpdateCommandBlockMinecart
0x26 => CreativeInventoryAction 0x26 => CreativeInventoryAction
0x27 => UpdateJigsawBlock 0x27 => UpdateJigsawBlock_Type
0x28 => UpdateStructureBlock 0x28 => UpdateStructureBlock
0x29 => SetSign 0x29 => SetSign
0x2a => ArmSwing 0x2a => ArmSwing
0x2b => SpectateTeleport 0x2b => SpectateTeleport
0x2c => PlayerBlockPlacement_f32 0x2c => PlayerBlockPlacement_insideblock
0x2d => UseItem 0x2d => UseItem
} }
clientbound Clientbound { clientbound Clientbound {
0x00 => SpawnObject 0x00 => SpawnObject_VarInt
0x01 => SpawnExperienceOrb 0x01 => SpawnExperienceOrb
0x02 => SpawnGlobalEntity 0x02 => SpawnGlobalEntity
0x03 => SpawnMob_NoMeta 0x03 => SpawnMob_NoMeta
@ -71,7 +71,7 @@ protocol_packet_ids!(
0x0c => BlockChange_VarInt 0x0c => BlockChange_VarInt
0x0d => BossBar 0x0d => BossBar
0x0e => ServerDifficulty_Locked 0x0e => ServerDifficulty_Locked
0x0f => ServerMessage 0x0f => ServerMessage_Position
0x10 => MultiBlockChange_VarInt 0x10 => MultiBlockChange_VarInt
0x11 => TabCompleteReply 0x11 => TabCompleteReply
0x12 => DeclareCommands 0x12 => DeclareCommands
@ -93,7 +93,7 @@ protocol_packet_ids!(
0x22 => ChunkData_Biomes3D 0x22 => ChunkData_Biomes3D
0x23 => Effect 0x23 => Effect
0x24 => Particle_f64 0x24 => Particle_f64
0x25 => UpdateLight 0x25 => UpdateLight_NoTrust
0x26 => JoinGame_HashedSeed_Respawn 0x26 => JoinGame_HashedSeed_Respawn
0x27 => Maps 0x27 => Maps
0x28 => TradeList_WithRestock 0x28 => TradeList_WithRestock
@ -127,7 +127,7 @@ protocol_packet_ids!(
0x44 => EntityMetadata 0x44 => EntityMetadata
0x45 => EntityAttach 0x45 => EntityAttach
0x46 => EntityVelocity 0x46 => EntityVelocity
0x47 => EntityEquipment 0x47 => EntityEquipment_VarInt
0x48 => SetExperience 0x48 => SetExperience
0x49 => UpdateHealth 0x49 => UpdateHealth
0x4a => ScoreboardObjective 0x4a => ScoreboardObjective
@ -160,7 +160,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
0x04 => LoginPluginRequest 0x04 => LoginPluginRequest
} }

View File

@ -0,0 +1,178 @@
protocol_packet_ids!(
handshake Handshaking {
serverbound Serverbound {
0x00 => Handshake
}
clientbound Clientbound {
}
}
play Play {
serverbound Serverbound {
0x00 => TeleportConfirm
0x01 => QueryBlockNBT
0x02 => SetDifficulty
0x03 => ChatMessage
0x04 => ClientStatus
0x05 => ClientSettings
0x06 => TabComplete
0x07 => ConfirmTransactionServerbound
0x08 => ClickWindowButton
0x09 => ClickWindow
0x0a => CloseWindow
0x0b => PluginMessageServerbound
0x0c => EditBook
0x0d => QueryEntityNBT
0x0e => UseEntity_Sneakflag
0x0f => GenerateStructure
0x10 => KeepAliveServerbound_i64
0x11 => LockDifficulty
0x12 => PlayerPosition
0x13 => PlayerPositionLook
0x14 => PlayerLook
0x15 => Player
0x16 => VehicleMove
0x17 => SteerBoat
0x18 => PickItem
0x19 => CraftRecipeRequest
0x1a => ClientAbilities_u8
0x1b => PlayerDigging
0x1c => PlayerAction
0x1d => SteerVehicle
0x1e => CraftingBookData
0x1f => NameItem
0x20 => ResourcePackStatus
0x21 => AdvancementTab
0x22 => SelectTrade
0x23 => SetBeaconEffect
0x24 => HeldItemChange
0x25 => UpdateCommandBlock
0x26 => UpdateCommandBlockMinecart
0x27 => CreativeInventoryAction
0x28 => UpdateJigsawBlock_Joint
0x29 => UpdateStructureBlock
0x2a => SetSign
0x2b => ArmSwing
0x2c => SpectateTeleport
0x2d => PlayerBlockPlacement_insideblock
0x2e => UseItem
}
clientbound Clientbound {
0x00 => SpawnObject_VarInt
0x01 => SpawnExperienceOrb
0x02 => SpawnMob_NoMeta
0x03 => SpawnPainting_VarInt
0x04 => SpawnPlayer_f64_NoMeta
0x05 => Animation
0x06 => Statistics
0x07 => AcknowledgePlayerDigging
0x08 => BlockBreakAnimation
0x09 => UpdateBlockEntity
0x0a => BlockAction
0x0b => BlockChange_VarInt
0x0c => BossBar
0x0d => ServerDifficulty_Locked
0x0e => ServerMessage_Sender
0x0f => MultiBlockChange_VarInt
0x10 => TabCompleteReply
0x11 => DeclareCommands
0x12 => ConfirmTransaction
0x13 => WindowClose
0x14 => WindowItems
0x15 => WindowProperty
0x16 => WindowSetSlot
0x17 => SetCooldown
0x18 => PluginMessageClientbound
0x19 => NamedSoundEffect
0x1a => Disconnect
0x1b => EntityAction
0x1c => Explosion
0x1d => ChunkUnload
0x1e => ChangeGameState
0x1f => WindowOpenHorse
0x20 => KeepAliveClientbound_i64
0x21 => ChunkData_Biomes3D_bool
0x22 => Effect
0x23 => Particle_f64
0x24 => UpdateLight_WithTrust
0x25 => JoinGame_WorldNames
0x26 => Maps
0x27 => TradeList_WithRestock
0x28 => EntityMove_i16
0x29 => EntityLookAndMove_i16
0x2a => EntityLook_VarInt
0x2b => Entity
0x2c => VehicleTeleport
0x2d => OpenBook
0x2e => WindowOpen_VarInt
0x2f => SignEditorOpen
0x30 => CraftRecipeResponse
0x31 => PlayerAbilities
0x32 => CombatEvent
0x33 => PlayerInfo
0x34 => FacePlayer
0x35 => TeleportPlayer_WithConfirm
0x36 => UnlockRecipes_WithSmelting
0x37 => EntityDestroy
0x38 => EntityRemoveEffect
0x39 => ResourcePackSend
0x3a => Respawn_WorldName
0x3b => EntityHeadLook
0x3c => SelectAdvancementTab
0x3d => WorldBorder
0x3e => Camera
0x3f => SetCurrentHotbarSlot
0x40 => UpdateViewPosition
0x41 => UpdateViewDistance
0x42 => SpawnPosition
0x43 => ScoreboardDisplay
0x44 => EntityMetadata
0x45 => EntityAttach
0x46 => EntityVelocity
0x47 => EntityEquipment_VarInt // TODO: changed to an array, but earlier than 1.16.1
0x48 => SetExperience
0x49 => UpdateHealth
0x4a => ScoreboardObjective
0x4b => SetPassengers
0x4c => Teams_VarInt
0x4d => UpdateScore
0x4e => TimeUpdate
0x4f => Title
0x50 => EntitySoundEffect
0x51 => SoundEffect
0x52 => StopSound
0x53 => PlayerListHeaderFooter
0x54 => NBTQueryResponse
0x55 => CollectItem
0x56 => EntityTeleport_f64
0x57 => Advancements
0x58 => EntityProperties
0x59 => EntityEffect
0x5a => DeclareRecipes
0x5b => TagsWithEntities
}
}
login Login {
serverbound Serverbound {
0x00 => LoginStart
0x01 => EncryptionResponse
0x02 => LoginPluginResponse
}
clientbound Clientbound {
0x00 => LoginDisconnect
0x01 => EncryptionRequest
0x02 => LoginSuccess_UUID
0x03 => SetInitialCompression
0x04 => LoginPluginRequest
}
}
status Status {
serverbound Serverbound {
0x00 => StatusRequest
0x01 => StatusPing
}
clientbound Clientbound {
0x00 => StatusResponse
0x01 => StatusPong
}
}
);

View File

@ -27,7 +27,7 @@ protocol_packet_ids!(
0x10 => CreativeInventoryAction 0x10 => CreativeInventoryAction
0x11 => EnchantItem 0x11 => EnchantItem
0x12 => SetSign_i16y 0x12 => SetSign_i16y
0x13 => ClientAbilities 0x13 => ClientAbilities_f32
0x14 => TabComplete_NoAssume_NoTarget 0x14 => TabComplete_NoAssume_NoTarget
0x15 => ClientSettings_u8_Handsfree_Difficulty 0x15 => ClientSettings_u8_Handsfree_Difficulty
0x16 => ClientStatus_u8 0x16 => ClientStatus_u8
@ -41,7 +41,7 @@ protocol_packet_ids!(
0x04 => EntityEquipment_u16_i32 0x04 => EntityEquipment_u16_i32
0x05 => SpawnPosition_i32 0x05 => SpawnPosition_i32
0x06 => UpdateHealth_u16 0x06 => UpdateHealth_u16
0x07 => Respawn 0x07 => Respawn_Gamemode
0x08 => TeleportPlayer_OnGround 0x08 => TeleportPlayer_OnGround
0x09 => SetCurrentHotbarSlot 0x09 => SetCurrentHotbarSlot
0x0a => EntityUsedBed_i32 0x0a => EntityUsedBed_i32
@ -110,7 +110,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest_i16 0x01 => EncryptionRequest_i16
0x02 => LoginSuccess 0x02 => LoginSuccess_String
} }
} }
status Status { status Status {

View File

@ -27,7 +27,7 @@ protocol_packet_ids!(
0x10 => CreativeInventoryAction 0x10 => CreativeInventoryAction
0x11 => EnchantItem 0x11 => EnchantItem
0x12 => SetSign 0x12 => SetSign
0x13 => ClientAbilities 0x13 => ClientAbilities_f32
0x14 => TabComplete_NoAssume 0x14 => TabComplete_NoAssume
0x15 => ClientSettings_u8_Handsfree 0x15 => ClientSettings_u8_Handsfree
0x16 => ClientStatus 0x16 => ClientStatus
@ -38,12 +38,12 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => KeepAliveClientbound_VarInt 0x00 => KeepAliveClientbound_VarInt
0x01 => JoinGame_i8 0x01 => JoinGame_i8
0x02 => ServerMessage 0x02 => ServerMessage_Position
0x03 => TimeUpdate 0x03 => TimeUpdate
0x04 => EntityEquipment_u16 0x04 => EntityEquipment_u16
0x05 => SpawnPosition 0x05 => SpawnPosition
0x06 => UpdateHealth 0x06 => UpdateHealth
0x07 => Respawn 0x07 => Respawn_Gamemode
0x08 => TeleportPlayer_NoConfirm 0x08 => TeleportPlayer_NoConfirm
0x09 => SetCurrentHotbarSlot 0x09 => SetCurrentHotbarSlot
0x0a => EntityUsedBed 0x0a => EntityUsedBed
@ -120,7 +120,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
} }
} }

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow 0x07 => ClickWindow
0x08 => CloseWindow 0x08 => CloseWindow
0x09 => PluginMessageServerbound 0x09 => PluginMessageServerbound
0x0a => UseEntity 0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_VarInt 0x0b => KeepAliveServerbound_VarInt
0x0c => PlayerPosition 0x0c => PlayerPosition
0x0d => PlayerPositionLook 0x0d => PlayerPositionLook
@ -26,7 +26,7 @@ protocol_packet_ids!(
0x0f => Player 0x0f => Player
0x10 => VehicleMove 0x10 => VehicleMove
0x11 => SteerBoat 0x11 => SteerBoat
0x12 => ClientAbilities 0x12 => ClientAbilities_f32
0x13 => PlayerDigging 0x13 => PlayerDigging
0x14 => PlayerAction 0x14 => PlayerAction
0x15 => SteerVehicle 0x15 => SteerVehicle
@ -55,7 +55,7 @@ protocol_packet_ids!(
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty 0x0d => ServerDifficulty
0x0e => TabCompleteReply 0x0e => TabCompleteReply
0x0f => ServerMessage 0x0f => ServerMessage_Position
0x10 => MultiBlockChange_VarInt 0x10 => MultiBlockChange_VarInt
0x11 => ConfirmTransaction 0x11 => ConfirmTransaction
0x12 => WindowClose 0x12 => WindowClose
@ -91,7 +91,7 @@ protocol_packet_ids!(
0x30 => EntityDestroy 0x30 => EntityDestroy
0x31 => EntityRemoveEffect 0x31 => EntityRemoveEffect
0x32 => ResourcePackSend 0x32 => ResourcePackSend
0x33 => Respawn 0x33 => Respawn_Gamemode
0x34 => EntityHeadLook 0x34 => EntityHeadLook
0x35 => WorldBorder 0x35 => WorldBorder
0x36 => Camera 0x36 => Camera
@ -100,7 +100,7 @@ protocol_packet_ids!(
0x39 => EntityMetadata 0x39 => EntityMetadata
0x3a => EntityAttach 0x3a => EntityAttach
0x3b => EntityVelocity 0x3b => EntityVelocity
0x3c => EntityEquipment 0x3c => EntityEquipment_VarInt
0x3d => SetExperience 0x3d => SetExperience
0x3e => UpdateHealth 0x3e => UpdateHealth
0x3f => ScoreboardObjective 0x3f => ScoreboardObjective
@ -127,7 +127,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
} }
} }

View File

@ -18,7 +18,7 @@ protocol_packet_ids!(
0x07 => ClickWindow 0x07 => ClickWindow
0x08 => CloseWindow 0x08 => CloseWindow
0x09 => PluginMessageServerbound 0x09 => PluginMessageServerbound
0x0a => UseEntity 0x0a => UseEntity_Hand
0x0b => KeepAliveServerbound_VarInt 0x0b => KeepAliveServerbound_VarInt
0x0c => PlayerPosition 0x0c => PlayerPosition
0x0d => PlayerPositionLook 0x0d => PlayerPositionLook
@ -26,7 +26,7 @@ protocol_packet_ids!(
0x0f => Player 0x0f => Player
0x10 => VehicleMove 0x10 => VehicleMove
0x11 => SteerBoat 0x11 => SteerBoat
0x12 => ClientAbilities 0x12 => ClientAbilities_f32
0x13 => PlayerDigging 0x13 => PlayerDigging
0x14 => PlayerAction 0x14 => PlayerAction
0x15 => SteerVehicle 0x15 => SteerVehicle
@ -55,7 +55,7 @@ protocol_packet_ids!(
0x0c => BossBar 0x0c => BossBar
0x0d => ServerDifficulty 0x0d => ServerDifficulty
0x0e => TabCompleteReply 0x0e => TabCompleteReply
0x0f => ServerMessage 0x0f => ServerMessage_Position
0x10 => MultiBlockChange_VarInt 0x10 => MultiBlockChange_VarInt
0x11 => ConfirmTransaction 0x11 => ConfirmTransaction
0x12 => WindowClose 0x12 => WindowClose
@ -91,7 +91,7 @@ protocol_packet_ids!(
0x30 => EntityDestroy 0x30 => EntityDestroy
0x31 => EntityRemoveEffect 0x31 => EntityRemoveEffect
0x32 => ResourcePackSend 0x32 => ResourcePackSend
0x33 => Respawn 0x33 => Respawn_Gamemode
0x34 => EntityHeadLook 0x34 => EntityHeadLook
0x35 => WorldBorder 0x35 => WorldBorder
0x36 => Camera 0x36 => Camera
@ -100,7 +100,7 @@ protocol_packet_ids!(
0x39 => EntityMetadata 0x39 => EntityMetadata
0x3a => EntityAttach 0x3a => EntityAttach
0x3b => EntityVelocity 0x3b => EntityVelocity
0x3c => EntityEquipment 0x3c => EntityEquipment_VarInt
0x3d => SetExperience 0x3d => SetExperience
0x3e => UpdateHealth 0x3e => UpdateHealth
0x3f => ScoreboardObjective 0x3f => ScoreboardObjective
@ -127,7 +127,7 @@ protocol_packet_ids!(
clientbound Clientbound { clientbound Clientbound {
0x00 => LoginDisconnect 0x00 => LoginDisconnect
0x01 => EncryptionRequest 0x01 => EncryptionRequest
0x02 => LoginSuccess 0x02 => LoginSuccess_String
0x03 => SetInitialCompression 0x03 => SetInitialCompression
} }
} }

View File

@ -33,7 +33,8 @@ impl Gamemode {
3 => Gamemode::Spectator, 3 => Gamemode::Spectator,
2 => Gamemode::Adventure, 2 => Gamemode::Adventure,
1 => Gamemode::Creative, 1 => Gamemode::Creative,
0 | _ => Gamemode::Survival, 0 => Gamemode::Survival,
_ => Gamemode::Survival,
} }
} }

View File

@ -13,12 +13,12 @@ fn main() {
build_map(&mut out, &base); build_map(&mut out, &base);
let mut file = BufWriter::new(fs::File::create(&dest.join("resources.rs")).unwrap()); let mut file = BufWriter::new(fs::File::create(&dest.join("resources.rs")).unwrap());
write!( writeln!(
file, file,
"pub fn get_file(name: &str) -> Option<&'static [u8]> {{\n" "pub fn get_file(name: &str) -> Option<&'static [u8]> {{"
) )
.unwrap(); .unwrap();
write!(file, " match name {{\n").unwrap(); writeln!(file, " match name {{").unwrap();
for path in &out { for path in &out {
let mut absolute_path = std::env::current_dir().unwrap(); let mut absolute_path = std::env::current_dir().unwrap();
absolute_path.push(path); absolute_path.push(path);
@ -26,9 +26,9 @@ fn main() {
let absolute = absolute_path.to_str().unwrap().replace("\\", "/"); let absolute = absolute_path.to_str().unwrap().replace("\\", "/");
let relative = path.to_str().unwrap().replace("\\", "/"); let relative = path.to_str().unwrap().replace("\\", "/");
write!( writeln!(
file, file,
" {:?} => Some(include_bytes!(\"{}\")),\n", " {:?} => Some(include_bytes!(\"{}\")),",
relative, absolute relative, absolute
) )
.unwrap(); .unwrap();

View File

@ -6,7 +6,6 @@ use crate::types::bit::Set;
use crate::world; use crate::world;
use crate::world::block; use crate::world::block;
use rand::{self, Rng, SeedableRng}; use rand::{self, Rng, SeedableRng};
use rand_pcg;
use std::sync::mpsc; use std::sync::mpsc;
use std::sync::{Arc, RwLock}; use std::sync::{Arc, RwLock};
use std::thread; use std::thread;
@ -27,10 +26,7 @@ impl ChunkBuilder {
resources: Arc<RwLock<resources::Manager>>, resources: Arc<RwLock<resources::Manager>>,
textures: Arc<RwLock<render::TextureManager>>, textures: Arc<RwLock<render::TextureManager>>,
) -> ChunkBuilder { ) -> ChunkBuilder {
let models = Arc::new(RwLock::new(model::Factory::new( let models = Arc::new(RwLock::new(model::Factory::new(resources, textures)));
resources.clone(),
textures,
)));
let mut threads = vec![]; let mut threads = vec![];
let mut free = vec![]; let mut free = vec![];

View File

@ -12,7 +12,6 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
use log;
use std::any::Any; use std::any::Any;
use std::cell::{Ref, RefCell}; use std::cell::{Ref, RefCell};
use std::collections::HashMap; use std::collections::HashMap;
@ -191,7 +190,7 @@ impl Vars {
continue; continue;
} }
for line in var.description().lines() { for line in var.description().lines() {
write!(file, "# {}\n", line).unwrap(); writeln!(file, "# {}", line).unwrap();
} }
write!( write!(
file, file,
@ -204,6 +203,7 @@ impl Vars {
} }
} }
#[derive(Default)]
pub struct Console { pub struct Console {
history: Vec<Component>, history: Vec<Component>,
dirty: bool, dirty: bool,

View File

@ -53,6 +53,12 @@ pub struct Filter {
bits: BSet, bits: BSet,
} }
impl Default for Filter {
fn default() -> Self {
Self::new()
}
}
impl Filter { impl Filter {
/// Creates an empty filter which matches everything /// Creates an empty filter which matches everything
pub fn new() -> Filter { pub fn new() -> Filter {
@ -106,6 +112,7 @@ struct EntityState {
} }
/// Stores and manages a collection of entities. /// Stores and manages a collection of entities.
#[derive(Default)]
pub struct Manager { pub struct Manager {
num_components: usize, num_components: usize,
entities: Vec<(Option<EntityState>, u32)>, entities: Vec<(Option<EntityState>, u32)>,
@ -619,7 +626,7 @@ impl ComponentMem {
data.2 += 1; data.2 += 1;
data.1.set(rem, true); data.1.set(rem, true);
unsafe { unsafe {
ptr::write(data.0.as_mut_ptr().offset(start as isize) as *mut T, val); ptr::write(data.0.as_mut_ptr().add(start) as *mut T, val);
} }
} }
@ -635,7 +642,7 @@ impl ComponentMem {
// we use the drop_func which stores the type in its closure // we use the drop_func which stores the type in its closure
// to handle the dropping for us. // to handle the dropping for us.
unsafe { unsafe {
(self.drop_func)(data.0.as_mut_ptr().offset(start as isize)); (self.drop_func)(data.0.as_mut_ptr().add(start));
} }
data.2 -= 1; data.2 -= 1;
data.2 data.2
@ -650,7 +657,7 @@ impl ComponentMem {
let rem = index % COMPONENTS_PER_BLOCK; let rem = index % COMPONENTS_PER_BLOCK;
let data = self.data[idx].as_ref().unwrap(); let data = self.data[idx].as_ref().unwrap();
let start = rem * self.component_size; let start = rem * self.component_size;
unsafe { &*(data.0.as_ptr().offset(start as isize) as *const T) } unsafe { &*(data.0.as_ptr().add(start) as *const T) }
} }
fn get_mut<T>(&mut self, index: usize) -> &mut T { fn get_mut<T>(&mut self, index: usize) -> &mut T {
@ -658,7 +665,7 @@ impl ComponentMem {
let rem = index % COMPONENTS_PER_BLOCK; let rem = index % COMPONENTS_PER_BLOCK;
let data = self.data[idx].as_mut().unwrap(); let data = self.data[idx].as_mut().unwrap();
let start = rem * self.component_size; let start = rem * self.component_size;
unsafe { &mut *(data.0.as_mut_ptr().offset(start as isize) as *mut T) } unsafe { &mut *(data.0.as_mut_ptr().add(start) as *mut T) }
} }
} }
@ -670,7 +677,7 @@ impl Drop for ComponentMem {
if data.1.get(i) { if data.1.get(i) {
let start = i * self.component_size; let start = i * self.component_size;
unsafe { unsafe {
(self.drop_func)(data.0.as_mut_ptr().offset(start as isize)); (self.drop_func)(data.0.as_mut_ptr().add(start));
} }
} }
} }

View File

@ -640,7 +640,7 @@ impl ecs::System for MovementHandler {
if movement.is_key_pressed(Stevenkey::Jump) { if movement.is_key_pressed(Stevenkey::Jump) {
if movement.when_last_jump_pressed.is_none() { if movement.when_last_jump_pressed.is_none() {
movement.when_last_jump_pressed = Some(Instant::now()); movement.when_last_jump_pressed = Some(Instant::now());
if !movement.when_last_jump_released.is_none() { if movement.when_last_jump_released.is_some() {
let dt = movement.when_last_jump_pressed.unwrap() let dt = movement.when_last_jump_pressed.unwrap()
- movement.when_last_jump_released.unwrap(); - movement.when_last_jump_released.unwrap();
if dt.as_secs() == 0 if dt.as_secs() == 0
@ -655,7 +655,7 @@ impl ecs::System for MovementHandler {
} }
} }
} }
} else if !movement.when_last_jump_pressed.is_none() { } else if movement.when_last_jump_pressed.is_some() {
movement.when_last_jump_released = Some(Instant::now()); movement.when_last_jump_released = Some(Instant::now());
movement.when_last_jump_pressed = None; movement.when_last_jump_pressed = None;
} }

View File

@ -38,7 +38,7 @@ impl ecs::System for ApplyVelocity {
} }
let pos = m.get_component_mut(e, self.position).unwrap(); let pos = m.get_component_mut(e, self.position).unwrap();
let vel = m.get_component(e, self.velocity).unwrap(); let vel = m.get_component(e, self.velocity).unwrap();
pos.position = pos.position + vel.velocity; pos.position += vel.velocity;
} }
} }
} }

View File

@ -264,6 +264,7 @@ pub const NEAREST_MIPMAP_LINEAR: TextureValue = gl::NEAREST_MIPMAP_LINEAR as Tex
pub const CLAMP_TO_EDGE: TextureValue = gl::CLAMP_TO_EDGE as TextureValue; pub const CLAMP_TO_EDGE: TextureValue = gl::CLAMP_TO_EDGE as TextureValue;
/// `Texture` is a buffer of data used by fragment shaders. /// `Texture` is a buffer of data used by fragment shaders.
#[derive(Default)]
pub struct Texture(u32); pub struct Texture(u32);
impl Texture { impl Texture {
@ -510,6 +511,7 @@ pub type ShaderParameter = u32;
pub const COMPILE_STATUS: ShaderParameter = gl::COMPILE_STATUS; pub const COMPILE_STATUS: ShaderParameter = gl::COMPILE_STATUS;
pub const INFO_LOG_LENGTH: ShaderParameter = gl::INFO_LOG_LENGTH; pub const INFO_LOG_LENGTH: ShaderParameter = gl::INFO_LOG_LENGTH;
#[derive(Default)]
pub struct Program(u32); pub struct Program(u32);
impl Program { impl Program {
@ -536,8 +538,8 @@ impl Program {
} }
pub fn uniform_location(&self, name: &str) -> Option<Uniform> { pub fn uniform_location(&self, name: &str) -> Option<Uniform> {
let u = let c_name = ffi::CString::new(name).unwrap();
unsafe { gl::GetUniformLocation(self.0, ffi::CString::new(name).unwrap().as_ptr()) }; let u = unsafe { gl::GetUniformLocation(self.0, c_name.as_ptr()) };
if u != -1 { if u != -1 {
Some(Uniform(u)) Some(Uniform(u))
} else { } else {
@ -646,10 +648,9 @@ impl Uniform {
} }
} }
pub fn set_float_mutli_raw(&self, data: *const f32, len: usize) { #[allow(clippy::missing_safety_doc)]
unsafe { pub unsafe fn set_float_multi_raw(&self, data: *const f32, len: usize) {
gl::Uniform4fv(self.0, len as i32, data); gl::Uniform4fv(self.0, len as i32, data);
}
} }
pub fn set_matrix4(&self, m: &::cgmath::Matrix4<f32>) { pub fn set_matrix4(&self, m: &::cgmath::Matrix4<f32>) {
@ -712,6 +713,7 @@ impl Attribute {
// VertexArray is used to store state needed to render vertices. // VertexArray is used to store state needed to render vertices.
// This includes buffers, the format of the buffers and enabled // This includes buffers, the format of the buffers and enabled
// attributes. // attributes.
#[derive(Default)]
pub struct VertexArray(u32); pub struct VertexArray(u32);
impl VertexArray { impl VertexArray {
@ -772,6 +774,7 @@ pub const READ_ONLY: Access = gl::READ_ONLY;
pub const WRITE_ONLY: Access = gl::WRITE_ONLY; pub const WRITE_ONLY: Access = gl::WRITE_ONLY;
/// `Buffer` is a storage for vertex data. /// `Buffer` is a storage for vertex data.
#[derive(Default)]
pub struct Buffer(u32); pub struct Buffer(u32);
impl Buffer { impl Buffer {
@ -871,6 +874,7 @@ pub const COLOR_ATTACHMENT_1: Attachment = gl::COLOR_ATTACHMENT1;
pub const COLOR_ATTACHMENT_2: Attachment = gl::COLOR_ATTACHMENT2; pub const COLOR_ATTACHMENT_2: Attachment = gl::COLOR_ATTACHMENT2;
pub const DEPTH_ATTACHMENT: Attachment = gl::DEPTH_ATTACHMENT; pub const DEPTH_ATTACHMENT: Attachment = gl::DEPTH_ATTACHMENT;
#[derive(Default)]
pub struct Framebuffer(u32); pub struct Framebuffer(u32);
pub fn check_framebuffer_status() { pub fn check_framebuffer_status() {

View File

@ -13,6 +13,9 @@
// limitations under the License. // limitations under the License.
#![recursion_limit = "300"] #![recursion_limit = "300"]
#![allow(clippy::too_many_arguments)] // match standard gl functions with many arguments
#![allow(clippy::many_single_char_names)] // short variable names provide concise clarity
#![allow(clippy::float_cmp)] // float comparison used to check if changed
use log::{error, info, warn}; use log::{error, info, warn};
use std::time::{Duration, Instant}; use std::time::{Duration, Instant};
@ -43,7 +46,6 @@ pub mod world;
use crate::protocol::mojang; use crate::protocol::mojang;
use cfg_if::cfg_if; use cfg_if::cfg_if;
use glutin;
use std::marker::PhantomData; use std::marker::PhantomData;
use std::rc::Rc; use std::rc::Rc;
use std::sync::mpsc; use std::sync::mpsc;
@ -296,7 +298,8 @@ fn main2() {
let textures = renderer.get_textures(); let textures = renderer.get_textures();
let dpi_factor = window.window().scale_factor(); let dpi_factor = window.window().scale_factor();
let default_protocol_version = protocol::versions::protocol_name_to_protocol_version( let default_protocol_version = protocol::versions::protocol_name_to_protocol_version(
opt.default_protocol_version.unwrap_or("".to_string()), opt.default_protocol_version
.unwrap_or_else(|| "".to_string()),
); );
let mut game = Game { let mut game = Game {
server: server::Server::dummy_server(resource_manager.clone()), server: server::Server::dummy_server(resource_manager.clone()),
@ -347,8 +350,7 @@ fn main2() {
let version = { let version = {
let try_res = game.resource_manager.try_write(); let try_res = game.resource_manager.try_write();
if try_res.is_ok() { if let Ok(mut res) = try_res {
let mut res = try_res.unwrap();
res.tick(&mut resui, &mut ui_container, delta); res.tick(&mut resui, &mut ui_container, delta);
res.version() res.version()
} else { } else {
@ -508,18 +510,16 @@ fn handle_window_event<T>(
game.focused = true; game.focused = true;
window.window().set_cursor_grab(true).unwrap(); window.window().set_cursor_grab(true).unwrap();
window.window().set_cursor_visible(false); window.window().set_cursor_visible(false);
} else { } else if !game.focused {
if !game.focused { window.window().set_cursor_grab(false).unwrap();
window.window().set_cursor_grab(false).unwrap(); window.window().set_cursor_visible(true);
window.window().set_cursor_visible(true); ui_container.click_at(
ui_container.click_at( game,
game, game.last_mouse_x,
game.last_mouse_x, game.last_mouse_y,
game.last_mouse_y, width,
width, height,
height, );
);
}
} }
} }
(ElementState::Pressed, MouseButton::Right) => { (ElementState::Pressed, MouseButton::Right) => {

View File

@ -6,7 +6,6 @@ use crate::shared::Direction;
use crate::world; use crate::world;
use crate::world::block::{Block, TintType}; use crate::world::block::{Block, TintType};
use byteorder::{NativeEndian, WriteBytesExt}; use byteorder::{NativeEndian, WriteBytesExt};
use serde_json;
use std::cell::RefCell; use std::cell::RefCell;
use std::collections::HashMap; use std::collections::HashMap;
use std::io::Write; use std::io::Write;
@ -896,7 +895,7 @@ impl RawModel {
.texture_vars .texture_vars
.get(&name[1..]) .get(&name[1..])
.cloned() .cloned()
.unwrap_or("".to_owned()); .unwrap_or_else(|| "".to_owned());
return self.lookup_texture(&tex); return self.lookup_texture(&tex);
} }
name.to_owned() name.to_owned()

View File

@ -57,9 +57,7 @@ impl Atlas {
} }
} }
} }
if target.is_none() { target?;
return None;
}
let mut t = target.unwrap(); let mut t = target.unwrap();
let ret = Rect { let ret = Rect {
x: t.x, x: t.x,

View File

@ -25,11 +25,8 @@ use crate::resources;
use crate::world; use crate::world;
use byteorder::{NativeEndian, WriteBytesExt}; use byteorder::{NativeEndian, WriteBytesExt};
use cgmath::prelude::*; use cgmath::prelude::*;
use collision;
use image;
use image::{GenericImage, GenericImageView}; use image::{GenericImage, GenericImageView};
use log::{error, trace}; use log::{error, trace};
use serde_json;
use std::collections::HashMap; use std::collections::HashMap;
use std::io::Write; use std::io::Write;
use std::sync::{Arc, RwLock}; use std::sync::{Arc, RwLock};
@ -41,7 +38,6 @@ use std::sync::mpsc;
use std::thread; use std::thread;
#[cfg(not(target_arch = "wasm32"))] #[cfg(not(target_arch = "wasm32"))]
use reqwest;
const ATLAS_SIZE: usize = 1024; const ATLAS_SIZE: usize = 1024;
@ -959,6 +955,8 @@ pub struct TextureManager {
} }
impl TextureManager { impl TextureManager {
#[allow(clippy::let_and_return)]
#[allow(clippy::type_complexity)]
fn new( fn new(
res: Arc<RwLock<resources::Manager>>, res: Arc<RwLock<resources::Manager>>,
) -> ( ) -> (
@ -972,6 +970,7 @@ impl TextureManager {
let mut tm = TextureManager { let mut tm = TextureManager {
textures: HashMap::with_hasher(BuildHasherDefault::default()), textures: HashMap::with_hasher(BuildHasherDefault::default()),
version: { version: {
// TODO: fix borrow and remove clippy::let_and_return above
let ver = res.read().unwrap().version(); let ver = res.read().unwrap().version();
ver ver
}, },
@ -1222,7 +1221,7 @@ impl TextureManager {
} }
fn get_texture(&self, name: &str) -> Option<Texture> { fn get_texture(&self, name: &str) -> Option<Texture> {
if let Some(_) = name.find(':') { if name.find(':').is_some() {
self.textures.get(name).cloned() self.textures.get(name).cloned()
} else { } else {
self.textures.get(&format!("minecraft:{}", name)).cloned() self.textures.get(&format!("minecraft:{}", name)).cloned()
@ -1390,7 +1389,7 @@ impl TextureManager {
rel_height: 1.0, rel_height: 1.0,
is_rel: false, is_rel: false,
}; };
self.textures.insert(full_name.to_owned(), t.clone()); self.textures.insert(full_name, t.clone());
t t
} }
@ -1425,8 +1424,7 @@ impl TextureManager {
(height as f32) / (tex.height as f32), (height as f32) / (tex.height as f32),
); );
let old_name = mem::replace(&mut tex.name, format!("steven-dynamic:{}", name)); let old_name = mem::replace(&mut tex.name, format!("steven-dynamic:{}", name));
self.dynamic_textures self.dynamic_textures.insert(name.to_owned(), (tex, img));
.insert(name.to_owned(), (tex.clone(), img));
// We need to rename the texture itself so that get_texture calls // We need to rename the texture itself so that get_texture calls
// work with the new name // work with the new name
let mut old = self.textures.remove(&old_name).unwrap(); let mut old = self.textures.remove(&old_name).unwrap();

View File

@ -86,31 +86,36 @@ impl Manager {
let mut model = { let mut model = {
let collection = &mut self.collections[ckey.0]; let collection = &mut self.collections[ckey.0];
collection.shader.program.use_program(); collection.shader.program.use_program();
collection.shader.position.map(|v| v.enable()); if let Some(v) = collection.shader.position {
collection.shader.texture_info.map(|v| v.enable()); v.enable()
collection.shader.texture_offset.map(|v| v.enable()); }
collection.shader.color.map(|v| v.enable()); if let Some(v) = collection.shader.texture_info {
collection.shader.id.map(|v| v.enable()); v.enable()
collection }
.shader if let Some(v) = collection.shader.texture_offset {
.position v.enable()
.map(|v| v.vertex_pointer(3, gl::FLOAT, false, 36, 0)); }
collection if let Some(v) = collection.shader.color {
.shader v.enable()
.texture_info }
.map(|v| v.vertex_pointer(4, gl::UNSIGNED_SHORT, false, 36, 12)); if let Some(v) = collection.shader.id {
collection v.enable()
.shader }
.texture_offset if let Some(v) = collection.shader.position {
.map(|v| v.vertex_pointer_int(3, gl::SHORT, 36, 20)); v.vertex_pointer(3, gl::FLOAT, false, 36, 0)
collection }
.shader if let Some(v) = collection.shader.texture_info {
.color v.vertex_pointer(4, gl::UNSIGNED_SHORT, false, 36, 12)
.map(|v| v.vertex_pointer(4, gl::UNSIGNED_BYTE, true, 36, 28)); }
collection if let Some(v) = collection.shader.texture_offset {
.shader v.vertex_pointer_int(3, gl::SHORT, 36, 20)
.id }
.map(|v| v.vertex_pointer_int(1, gl::UNSIGNED_BYTE, 36, 32)); if let Some(v) = collection.shader.color {
v.vertex_pointer(4, gl::UNSIGNED_BYTE, true, 36, 28)
}
if let Some(v) = collection.shader.id {
v.vertex_pointer_int(1, gl::UNSIGNED_BYTE, 36, 32)
}
let mut model = Model { let mut model = Model {
// For culling only // For culling only
@ -214,7 +219,7 @@ impl Manager {
textures: &Arc<RwLock<super::TextureManager>>, textures: &Arc<RwLock<super::TextureManager>>,
) { ) {
for collection in &mut self.collections { for collection in &mut self.collections {
for (_, model) in &mut collection.models { for model in collection.models.values_mut() {
for vert in &mut model.verts { for vert in &mut model.verts {
vert.texture = if vert.texture.version == version { vert.texture = if vert.texture.version == version {
vert.texture.clone() vert.texture.clone()
@ -244,23 +249,21 @@ impl Manager {
gl::enable(gl::BLEND); gl::enable(gl::BLEND);
for collection in &self.collections { for collection in &self.collections {
collection.shader.program.use_program(); collection.shader.program.use_program();
collection if let Some(v) = collection.shader.perspective_matrix {
.shader v.set_matrix4(perspective_matrix)
.perspective_matrix }
.map(|v| v.set_matrix4(perspective_matrix)); if let Some(v) = collection.shader.camera_matrix {
collection v.set_matrix4(camera_matrix)
.shader }
.camera_matrix if let Some(v) = collection.shader.texture {
.map(|v| v.set_matrix4(camera_matrix)); v.set_int(0)
collection.shader.texture.map(|v| v.set_int(0)); }
collection if let Some(v) = collection.shader.sky_offset {
.shader v.set_float(sky_offset)
.sky_offset }
.map(|v| v.set_float(sky_offset)); if let Some(v) = collection.shader.light_level {
collection v.set_float(light_level)
.shader }
.light_level
.map(|v| v.set_float(light_level));
gl::blend_func(collection.blend_s, collection.blend_d); gl::blend_func(collection.blend_s, collection.blend_d);
for model in collection.models.values() { for model in collection.models.values() {
@ -273,17 +276,17 @@ impl Manager {
continue; continue;
} }
model.array.bind(); model.array.bind();
collection if let Some(v) = collection.shader.lighting {
.shader v.set_float2(model.block_light, model.sky_light)
.lighting }
.map(|v| v.set_float2(model.block_light, model.sky_light)); if let Some(v) = collection.shader.model_matrix {
collection v.set_matrix4_multi(&model.matrix)
.shader }
.model_matrix if let Some(v) = collection.shader.color_mul {
.map(|v| v.set_matrix4_multi(&model.matrix)); unsafe {
collection.shader.color_mul.map(|v| { v.set_float_multi_raw(model.colors.as_ptr() as *const _, model.colors.len())
v.set_float_mutli_raw(model.colors.as_ptr() as *const _, model.colors.len()) }
}); }
gl::draw_elements(gl::TRIANGLES, model.count, self.index_type, 0); gl::draw_elements(gl::TRIANGLES, model.count, self.index_type, 0);
} }
} }

View File

@ -18,7 +18,6 @@ use crate::render::glsl;
use crate::render::shaders; use crate::render::shaders;
use crate::resources; use crate::resources;
use byteorder::{NativeEndian, WriteBytesExt}; use byteorder::{NativeEndian, WriteBytesExt};
use image;
use image::GenericImageView; use image::GenericImageView;
use std::collections::HashMap; use std::collections::HashMap;
use std::sync::{Arc, RwLock}; use std::sync::{Arc, RwLock};

View File

@ -14,7 +14,6 @@
extern crate steven_resources as internal; extern crate steven_resources as internal;
use serde_json;
use std::collections::HashMap; use std::collections::HashMap;
use std::hash::BuildHasherDefault; use std::hash::BuildHasherDefault;
use std::io; use std::io;
@ -24,10 +23,6 @@ use std::sync::{Arc, Mutex};
use std::thread; use std::thread;
use std_or_web::fs; use std_or_web::fs;
#[cfg(not(target_arch = "wasm32"))]
use reqwest;
use zip;
use crate::types::hash::FNVHash; use crate::types::hash::FNVHash;
use crate::ui; use crate::ui;
@ -135,7 +130,7 @@ impl Manager {
// (if it was started) // (if it was started)
let mut done = false; let mut done = false;
if let Some(ref recv) = self.vanilla_chan { if let Some(ref recv) = self.vanilla_chan {
if let Ok(_) = recv.try_recv() { if recv.try_recv().is_ok() {
done = true; done = true;
} }
} }
@ -145,7 +140,7 @@ impl Manager {
} }
let mut done = false; let mut done = false;
if let Some(ref recv) = self.vanilla_assets_chan { if let Some(ref recv) = self.vanilla_assets_chan {
if let Ok(_) = recv.try_recv() { if recv.try_recv().is_ok() {
done = true; done = true;
} }
} }
@ -234,11 +229,11 @@ impl Manager {
prog = task.progress as f64 / task.total as f64; prog = task.progress as f64 / task.total as f64;
} }
let background = ui.background.borrow(); let background = ui.background.borrow();
let bar = ui.progress_bar.borrow(); let progress_bar = ui.progress_bar.borrow();
// Let the progress bar finish // Let the progress bar finish
if !found if !found
&& (background.y - ui.position).abs() < 0.7 * delta && (background.y - ui.position).abs() < 0.7 * delta
&& (bar.width - 350.0).abs() < 1.0 * delta && (progress_bar.width - 350.0).abs() < 1.0 * delta
{ {
ui.closing = true; ui.closing = true;
ui.position = -UI_HEIGHT; ui.position = -UI_HEIGHT;
@ -261,12 +256,13 @@ impl Manager {
} else { } else {
background.y += (ui.position - background.y).signum() * 0.7 * delta; background.y += (ui.position - background.y).signum() * 0.7 * delta;
} }
let mut bar = ui.progress_bar.borrow_mut(); let mut progress_bar = ui.progress_bar.borrow_mut();
let target_size = (350.0 * ui.progress).min(350.0); let target_size = (350.0 * ui.progress).min(350.0);
if (bar.width - target_size).abs() < 1.0 * delta { if (progress_bar.width - target_size).abs() < 1.0 * delta {
bar.width = target_size; progress_bar.width = target_size;
} else { } else {
bar.width += ((target_size - bar.width).signum() * delta).max(0.0); progress_bar.width +=
((target_size - progress_bar.width).signum() * delta).max(0.0);
} }
} }

157
src/screen/delete_server.rs Normal file
View File

@ -0,0 +1,157 @@
// Copyright 2016 Matthew Collins
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
use std::collections::BTreeMap;
use std_or_web::fs;
use crate::render;
use crate::ui;
use serde_json::{self, Value};
pub struct DeleteServerEntry {
elements: Option<UIElements>,
index: usize,
name: String,
address: String,
}
struct UIElements {
logo: ui::logo::Logo,
_prompt: ui::TextRef,
_confirm: ui::ButtonRef,
_cancel: ui::ButtonRef,
}
impl DeleteServerEntry {
pub fn new(index: usize, name: &str, address: &str) -> DeleteServerEntry {
DeleteServerEntry {
elements: None,
index,
name: name.to_string(),
address: address.to_string(),
}
}
fn delete_server(index: usize) {
let mut servers_info = match fs::File::open("servers.json") {
Ok(val) => serde_json::from_reader(val).unwrap(),
Err(_) => {
let mut info = BTreeMap::default();
info.insert("servers".to_owned(), Value::Array(vec![]));
Value::Object(info.into_iter().collect())
}
};
{
let servers = servers_info
.as_object_mut()
.unwrap()
.get_mut("servers")
.unwrap()
.as_array_mut()
.unwrap();
servers.remove(index);
}
let mut out = fs::File::create("servers.json").unwrap();
serde_json::to_writer_pretty(&mut out, &servers_info).unwrap();
}
}
impl super::Screen for DeleteServerEntry {
fn on_active(&mut self, renderer: &mut render::Renderer, ui_container: &mut ui::Container) {
let logo = ui::logo::Logo::new(renderer.resources.clone(), ui_container);
// Prompt
let prompt = ui::TextBuilder::new()
.text(format!(
"Are you sure you wish to delete {} {}?",
self.name, self.address
))
.position(0.0, 40.0)
.alignment(ui::VAttach::Middle, ui::HAttach::Center)
.create(ui_container);
// Confirm
let confirm = ui::ButtonBuilder::new()
.position(110.0, 100.0)
.size(200.0, 40.0)
.alignment(ui::VAttach::Middle, ui::HAttach::Center)
.create(ui_container);
{
let mut confirm = confirm.borrow_mut();
let txt = ui::TextBuilder::new()
.text("Confirm")
.alignment(ui::VAttach::Middle, ui::HAttach::Center)
.attach(&mut *confirm);
confirm.add_text(txt);
let index = self.index;
confirm.add_click_func(move |_, game| {
Self::delete_server(index);
game.screen_sys
.replace_screen(Box::new(super::ServerList::new(None)));
true
});
}
// Cancel
let cancel = ui::ButtonBuilder::new()
.position(-110.0, 100.0)
.size(200.0, 40.0)
.alignment(ui::VAttach::Middle, ui::HAttach::Center)
.create(ui_container);
{
let mut cancel = cancel.borrow_mut();
let txt = ui::TextBuilder::new()
.text("Cancel")
.alignment(ui::VAttach::Middle, ui::HAttach::Center)
.attach(&mut *cancel);
cancel.add_text(txt);
cancel.add_click_func(|_, game| {
game.screen_sys
.replace_screen(Box::new(super::ServerList::new(None)));
true
});
}
self.elements = Some(UIElements {
logo,
_prompt: prompt,
_confirm: confirm,
_cancel: cancel,
});
}
fn on_deactive(&mut self, _renderer: &mut render::Renderer, _ui_container: &mut ui::Container) {
// Clean up
self.elements = None
}
fn tick(
&mut self,
_delta: f64,
renderer: &mut render::Renderer,
_ui_container: &mut ui::Container,
) -> Option<Box<dyn super::Screen>> {
let elements = self.elements.as_mut().unwrap();
elements.logo.tick(renderer);
None
}
fn is_closable(&self) -> bool {
true
}
}

View File

@ -51,7 +51,7 @@ impl Login {
pub fn new(vars: Rc<console::Vars>) -> Login { pub fn new(vars: Rc<console::Vars>) -> Login {
Login { Login {
elements: None, elements: None,
vars: vars, vars,
} }
} }
} }

View File

@ -18,6 +18,7 @@ mod login;
pub use self::login::*; pub use self::login::*;
pub mod connecting; pub mod connecting;
pub mod delete_server;
pub mod edit_server; pub mod edit_server;
pub mod settings_menu; pub mod settings_menu;

View File

@ -24,11 +24,7 @@ use crate::protocol;
use crate::render; use crate::render;
use crate::ui; use crate::ui;
use base64;
use image;
use rand;
use rand::Rng; use rand::Rng;
use serde_json;
use std::time::Duration; use std::time::Duration;
pub struct ServerList { pub struct ServerList {
@ -211,6 +207,15 @@ impl ServerList {
.alignment(ui::VAttach::Middle, ui::HAttach::Center) .alignment(ui::VAttach::Middle, ui::HAttach::Center)
.attach(&mut *btn); .attach(&mut *btn);
btn.add_text(txt); btn.add_text(txt);
let index = index;
let sname = name.clone();
let saddr = address.clone();
btn.add_click_func(move |_, game| {
game.screen_sys.replace_screen(Box::new(
super::delete_server::DeleteServerEntry::new(index, &sname, &saddr),
));
true
})
} }
// Edit entry button // Edit entry button
@ -270,6 +275,8 @@ impl ServerList {
format::convert_legacy(&mut desc); format::convert_legacy(&mut desc);
let favicon = if let Some(icon) = res.0.favicon { let favicon = if let Some(icon) = res.0.favicon {
let data_base64 = &icon["data:image/png;base64,".len()..]; let data_base64 = &icon["data:image/png;base64,".len()..];
let data_base64: String =
data_base64.chars().filter(|c| !c.is_whitespace()).collect();
let data = base64::decode(data_base64).unwrap(); let data = base64::decode(data_base64).unwrap();
Some(image::load_from_memory(&data).unwrap()) Some(image::load_from_memory(&data).unwrap())
} else { } else {
@ -506,7 +513,7 @@ impl super::Screen for ServerList {
} }
let sm = let sm =
format!("{} mods + {}", res.forge_mods.len(), res.protocol_name); format!("{} mods + {}", res.forge_mods.len(), res.protocol_name);
let st = if res.forge_mods.len() > 0 { let st = if !res.forge_mods.is_empty() {
&sm &sm
} else { } else {
&res.protocol_name &res.protocol_name

View File

@ -21,7 +21,7 @@ impl SettingsMenu {
SettingsMenu { SettingsMenu {
_vars: vars, _vars: vars,
elements: None, elements: None,
show_disconnect_button: show_disconnect_button, show_disconnect_button,
} }
} }
} }

View File

@ -24,14 +24,12 @@ use crate::types::hash::FNVHash;
use crate::types::Gamemode; use crate::types::Gamemode;
use crate::world; use crate::world;
use crate::world::block; use crate::world::block;
use base64;
use cgmath::prelude::*; use cgmath::prelude::*;
use log::{debug, error, warn}; use log::{debug, error, warn};
use rand::{self, Rng}; use rand::{self, Rng};
use rsa_public_encrypt_pkcs1;
use serde_json;
use std::collections::HashMap; use std::collections::HashMap;
use std::hash::BuildHasherDefault; use std::hash::BuildHasherDefault;
use std::str::FromStr;
use std::sync::mpsc; use std::sync::mpsc;
use std::sync::{Arc, RwLock}; use std::sync::{Arc, RwLock};
use std::thread; use std::thread;
@ -114,7 +112,11 @@ impl Server {
) -> Result<Server, protocol::Error> { ) -> Result<Server, protocol::Error> {
let mut conn = protocol::Conn::new(address, protocol_version)?; let mut conn = protocol::Conn::new(address, protocol_version)?;
let tag = if forge_mods.len() != 0 { "\0FML\0" } else { "" }; let tag = if !forge_mods.is_empty() {
"\0FML\0"
} else {
""
};
let host = conn.host.clone() + tag; let host = conn.host.clone() + tag;
let port = conn.port; let port = conn.port;
conn.write_packet(protocol::packet::handshake::serverbound::Handshake { conn.write_packet(protocol::packet::handshake::serverbound::Handshake {
@ -147,18 +149,36 @@ impl Server {
verify_token = Rc::new(val.verify_token.data); verify_token = Rc::new(val.verify_token.data);
break; break;
} }
protocol::packet::Packet::LoginSuccess(val) => { protocol::packet::Packet::LoginSuccess_String(val) => {
warn!("Server is running in offline mode"); warn!("Server is running in offline mode");
debug!("Login: {} {}", val.username, val.uuid); debug!("Login: {} {}", val.username, val.uuid);
let mut read = conn.clone(); let mut read = conn.clone();
let mut write = conn.clone(); let mut write = conn;
read.state = protocol::State::Play; read.state = protocol::State::Play;
write.state = protocol::State::Play; write.state = protocol::State::Play;
let rx = Self::spawn_reader(read); let rx = Self::spawn_reader(read);
return Ok(Server::new( return Ok(Server::new(
protocol_version, protocol_version,
forge_mods, forge_mods,
protocol::UUID::from_str(&val.uuid), protocol::UUID::from_str(&val.uuid).unwrap(),
resources,
Some(write),
Some(rx),
));
}
// TODO: avoid duplication
protocol::packet::Packet::LoginSuccess_UUID(val) => {
warn!("Server is running in offline mode");
debug!("Login: {} {:?}", val.username, val.uuid);
let mut read = conn.clone();
let mut write = conn;
read.state = protocol::State::Play;
write.state = protocol::State::Play;
let rx = Self::spawn_reader(read);
return Ok(Server::new(
protocol_version,
forge_mods,
val.uuid,
resources, resources,
Some(write), Some(write),
Some(rx), Some(rx),
@ -198,7 +218,7 @@ impl Server {
} }
let mut read = conn.clone(); let mut read = conn.clone();
let mut write = conn.clone(); let mut write = conn;
read.enable_encyption(&shared, true); read.enable_encyption(&shared, true);
write.enable_encyption(&shared, false); write.enable_encyption(&shared, false);
@ -210,8 +230,15 @@ impl Server {
read.set_compresssion(val.threshold.0); read.set_compresssion(val.threshold.0);
write.set_compresssion(val.threshold.0); write.set_compresssion(val.threshold.0);
} }
protocol::packet::Packet::LoginSuccess(val) => { protocol::packet::Packet::LoginSuccess_String(val) => {
debug!("Login: {} {}", val.username, val.uuid); debug!("Login: {} {}", val.username, val.uuid);
uuid = protocol::UUID::from_str(&val.uuid).unwrap();
read.state = protocol::State::Play;
write.state = protocol::State::Play;
break;
}
protocol::packet::Packet::LoginSuccess_UUID(val) => {
debug!("Login: {} {:?}", val.username, val.uuid);
uuid = val.uuid; uuid = val.uuid;
read.state = protocol::State::Play; read.state = protocol::State::Play;
write.state = protocol::State::Play; write.state = protocol::State::Play;
@ -229,7 +256,7 @@ impl Server {
Ok(Server::new( Ok(Server::new(
protocol_version, protocol_version,
forge_mods, forge_mods,
protocol::UUID::from_str(&uuid), uuid,
resources, resources,
Some(write), Some(write),
Some(rx), Some(rx),
@ -243,7 +270,7 @@ impl Server {
thread::spawn(move || loop { thread::spawn(move || loop {
let pck = read.read_packet(); let pck = read.read_packet();
let was_error = pck.is_err(); let was_error = pck.is_err();
if let Err(_) = tx.send(pck) { if tx.send(pck).is_err() {
return; return;
} }
if was_error { if was_error {
@ -482,16 +509,19 @@ impl Server {
self pck { self pck {
PluginMessageClientbound_i16 => on_plugin_message_clientbound_i16, PluginMessageClientbound_i16 => on_plugin_message_clientbound_i16,
PluginMessageClientbound => on_plugin_message_clientbound_1, PluginMessageClientbound => on_plugin_message_clientbound_1,
JoinGame_WorldNames => on_game_join_worldnames,
JoinGame_HashedSeed_Respawn => on_game_join_hashedseed_respawn, JoinGame_HashedSeed_Respawn => on_game_join_hashedseed_respawn,
JoinGame_i32_ViewDistance => on_game_join_i32_viewdistance, JoinGame_i32_ViewDistance => on_game_join_i32_viewdistance,
JoinGame_i32 => on_game_join_i32, JoinGame_i32 => on_game_join_i32,
JoinGame_i8 => on_game_join_i8, JoinGame_i8 => on_game_join_i8,
JoinGame_i8_NoDebug => on_game_join_i8_nodebug, JoinGame_i8_NoDebug => on_game_join_i8_nodebug,
Respawn => on_respawn, Respawn_Gamemode => on_respawn_gamemode,
Respawn_HashedSeed => on_respawn_hashedseed, Respawn_HashedSeed => on_respawn_hashedseed,
Respawn_WorldName => on_respawn_worldname,
KeepAliveClientbound_i64 => on_keep_alive_i64, KeepAliveClientbound_i64 => on_keep_alive_i64,
KeepAliveClientbound_VarInt => on_keep_alive_varint, KeepAliveClientbound_VarInt => on_keep_alive_varint,
KeepAliveClientbound_i32 => on_keep_alive_i32, KeepAliveClientbound_i32 => on_keep_alive_i32,
ChunkData_Biomes3D_bool => on_chunk_data_biomes3d_bool,
ChunkData => on_chunk_data, ChunkData => on_chunk_data,
ChunkData_Biomes3D => on_chunk_data_biomes3d, ChunkData_Biomes3D => on_chunk_data_biomes3d,
ChunkData_HeightMap => on_chunk_data_heightmap, ChunkData_HeightMap => on_chunk_data_heightmap,
@ -520,6 +550,7 @@ impl Server {
// Entities // Entities
EntityDestroy => on_entity_destroy, EntityDestroy => on_entity_destroy,
EntityDestroy_u8 => on_entity_destroy_u8, EntityDestroy_u8 => on_entity_destroy_u8,
SpawnPlayer_f64_NoMeta => on_player_spawn_f64_nometa,
SpawnPlayer_f64 => on_player_spawn_f64, SpawnPlayer_f64 => on_player_spawn_f64,
SpawnPlayer_i32 => on_player_spawn_i32, SpawnPlayer_i32 => on_player_spawn_i32,
SpawnPlayer_i32_HeldItem => on_player_spawn_i32_helditem, SpawnPlayer_i32_HeldItem => on_player_spawn_i32_helditem,
@ -818,8 +849,8 @@ impl Server {
} }
match channel { match channel {
// TODO: "REGISTER" => "REGISTER" => {} // TODO
// TODO: "UNREGISTER" => "UNREGISTER" => {} // TODO
"FML|HS" => { "FML|HS" => {
let msg = crate::protocol::Serializable::read_from(&mut std::io::Cursor::new(data)) let msg = crate::protocol::Serializable::read_from(&mut std::io::Cursor::new(data))
.unwrap(); .unwrap();
@ -837,10 +868,7 @@ impl Server {
fml_protocol_version, override_dimension fml_protocol_version, override_dimension
); );
self.write_plugin_message( self.write_plugin_message("REGISTER", b"FML|HS\0FML\0FML|MP\0FML\0FORGE");
"REGISTER",
"FML|HS\0FML\0FML|MP\0FML\0FORGE".as_bytes(),
);
self.write_fmlhs_plugin_message(&ClientHello { self.write_fmlhs_plugin_message(&ClientHello {
fml_protocol_version, fml_protocol_version,
}); });
@ -942,6 +970,10 @@ impl Server {
} }
} }
fn on_game_join_worldnames(&mut self, join: packet::play::clientbound::JoinGame_WorldNames) {
self.on_game_join(join.gamemode, join.entity_id)
}
fn on_game_join_hashedseed_respawn( fn on_game_join_hashedseed_respawn(
&mut self, &mut self,
join: packet::play::clientbound::JoinGame_HashedSeed_Respawn, join: packet::play::clientbound::JoinGame_HashedSeed_Respawn,
@ -997,9 +1029,9 @@ impl Server {
}; };
// TODO: refactor with write_plugin_message // TODO: refactor with write_plugin_message
if self.protocol_version >= 47 { if self.protocol_version >= 47 {
self.write_packet(brand.as_message()); self.write_packet(brand.into_message());
} else { } else {
self.write_packet(brand.as_message17()); self.write_packet(brand.into_message17());
} }
} }
@ -1007,7 +1039,11 @@ impl Server {
self.respawn(respawn.gamemode) self.respawn(respawn.gamemode)
} }
fn on_respawn(&mut self, respawn: packet::play::clientbound::Respawn) { fn on_respawn_gamemode(&mut self, respawn: packet::play::clientbound::Respawn_Gamemode) {
self.respawn(respawn.gamemode)
}
fn on_respawn_worldname(&mut self, respawn: packet::play::clientbound::Respawn_WorldName) {
self.respawn(respawn.gamemode) self.respawn(respawn.gamemode)
} }
@ -1287,6 +1323,21 @@ impl Server {
} }
} }
fn on_player_spawn_f64_nometa(
&mut self,
spawn: packet::play::clientbound::SpawnPlayer_f64_NoMeta,
) {
self.on_player_spawn(
spawn.entity_id.0,
spawn.uuid,
spawn.x,
spawn.y,
spawn.z,
spawn.yaw as f64,
spawn.pitch as f64,
)
}
fn on_player_spawn_f64(&mut self, spawn: packet::play::clientbound::SpawnPlayer_f64) { fn on_player_spawn_f64(&mut self, spawn: packet::play::clientbound::SpawnPlayer_f64) {
self.on_player_spawn( self.on_player_spawn(
spawn.entity_id.0, spawn.entity_id.0,
@ -1332,7 +1383,7 @@ impl Server {
) { ) {
self.on_player_spawn( self.on_player_spawn(
spawn.entity_id.0, spawn.entity_id.0,
protocol::UUID::from_str(&spawn.uuid), protocol::UUID::from_str(&spawn.uuid).unwrap(),
f64::from(spawn.x), f64::from(spawn.x),
f64::from(spawn.y), f64::from(spawn.y),
f64::from(spawn.z), f64::from(spawn.z),
@ -1541,13 +1592,13 @@ impl Server {
nbt.1.get("Text4").unwrap().as_str().unwrap(), nbt.1.get("Text4").unwrap().as_str().unwrap(),
); );
self.world.add_block_entity_action( self.world.add_block_entity_action(
world::BlockEntityAction::UpdateSignText( world::BlockEntityAction::UpdateSignText(Box::new((
block_update.location, block_update.location,
line1, line1,
line2, line2,
line3, line3,
line4, line4,
), ))),
); );
} }
//10 => // Unused //10 => // Unused
@ -1575,13 +1626,13 @@ impl Server {
format::convert_legacy(&mut update_sign.line3); format::convert_legacy(&mut update_sign.line3);
format::convert_legacy(&mut update_sign.line4); format::convert_legacy(&mut update_sign.line4);
self.world self.world
.add_block_entity_action(world::BlockEntityAction::UpdateSignText( .add_block_entity_action(world::BlockEntityAction::UpdateSignText(Box::new((
update_sign.location, update_sign.location,
update_sign.line1, update_sign.line1,
update_sign.line2, update_sign.line2,
update_sign.line3, update_sign.line3,
update_sign.line4, update_sign.line4,
)); ))));
} }
fn on_sign_update_u16(&mut self, mut update_sign: packet::play::clientbound::UpdateSign_u16) { fn on_sign_update_u16(&mut self, mut update_sign: packet::play::clientbound::UpdateSign_u16) {
@ -1590,13 +1641,13 @@ impl Server {
format::convert_legacy(&mut update_sign.line3); format::convert_legacy(&mut update_sign.line3);
format::convert_legacy(&mut update_sign.line4); format::convert_legacy(&mut update_sign.line4);
self.world self.world
.add_block_entity_action(world::BlockEntityAction::UpdateSignText( .add_block_entity_action(world::BlockEntityAction::UpdateSignText(Box::new((
Position::new(update_sign.x, update_sign.y as i32, update_sign.z), Position::new(update_sign.x, update_sign.y as i32, update_sign.z),
update_sign.line1, update_sign.line1,
update_sign.line2, update_sign.line2,
update_sign.line3, update_sign.line3,
update_sign.line4, update_sign.line4,
)); ))));
} }
fn on_player_info_string( fn on_player_info_string(
@ -1726,6 +1777,22 @@ impl Server {
} }
} }
fn on_chunk_data_biomes3d_bool(
&mut self,
chunk_data: packet::play::clientbound::ChunkData_Biomes3D_bool,
) {
self.world
.load_chunk115(
chunk_data.chunk_x,
chunk_data.chunk_z,
chunk_data.new,
chunk_data.bitmask.0 as u16,
chunk_data.data.data,
)
.unwrap();
self.load_block_entities(chunk_data.block_entities.data);
}
fn on_chunk_data_biomes3d( fn on_chunk_data_biomes3d(
&mut self, &mut self,
chunk_data: packet::play::clientbound::ChunkData_Biomes3D, chunk_data: packet::play::clientbound::ChunkData_Biomes3D,
@ -1920,6 +1987,7 @@ impl Server {
} }
} }
#[allow(clippy::enum_variant_names)]
#[derive(Debug, Clone, Copy)] #[derive(Debug, Clone, Copy)]
enum TeleportFlag { enum TeleportFlag {
RelX = 0b00001, RelX = 0b00001,

View File

@ -7,7 +7,7 @@ pub struct Brand {
} }
impl Brand { impl Brand {
pub fn as_message(self) -> PluginMessageServerbound { pub fn into_message(self) -> PluginMessageServerbound {
let protocol_version = crate::protocol::current_protocol_version(); let protocol_version = crate::protocol::current_protocol_version();
let channel_name = if protocol_version >= 404 { let channel_name = if protocol_version >= 404 {
@ -25,7 +25,7 @@ impl Brand {
} }
// TODO: cleanup this duplication for 1.7, return either message dynamically // TODO: cleanup this duplication for 1.7, return either message dynamically
pub fn as_message17(self) -> PluginMessageServerbound_i16 { pub fn into_message17(self) -> PluginMessageServerbound_i16 {
let mut data = vec![]; let mut data = vec![];
Serializable::write_to(&self.brand, &mut data).unwrap(); Serializable::write_to(&self.brand, &mut data).unwrap();
PluginMessageServerbound_i16 { PluginMessageServerbound_i16 {

View File

@ -114,7 +114,7 @@ impl SunModel {
z: SIZE, z: SIZE,
texture_x: 1.0, texture_x: 1.0,
texture_y: 0.0, texture_y: 0.0,
texture: tex.clone(), texture: tex,
r: 255, r: 255,
g: 255, g: 255,
b: 255, b: 255,
@ -178,7 +178,7 @@ impl SunModel {
z: SIZE, z: SIZE,
texture_x: mpx + (1.0 / 4.0), texture_x: mpx + (1.0 / 4.0),
texture_y: mpy, texture_y: mpy,
texture: tex.clone(), texture: tex,
r: 255, r: 255,
g: 255, g: 255,
b: 255, b: 255,

View File

@ -3,7 +3,6 @@ use crate::render::model;
use crate::shared::{Direction, Position}; use crate::shared::{Direction, Position};
use crate::world; use crate::world;
use crate::world::block; use crate::world::block;
use cgmath;
use collision::{self, Aabb}; use collision::{self, Aabb};
pub struct Info { pub struct Info {
@ -12,6 +11,12 @@ pub struct Info {
last_pos: Position, last_pos: Position,
} }
impl Default for Info {
fn default() -> Self {
Self::new()
}
}
impl Info { impl Info {
pub fn new() -> Info { pub fn new() -> Info {
Info { Info {
@ -130,6 +135,7 @@ impl Info {
} }
} }
#[allow(clippy::type_complexity)]
pub fn test_block( pub fn test_block(
world: &world::World, world: &world::World,
pos: Position, pos: Position,

View File

@ -2,7 +2,6 @@ use crate::render;
use crate::resources; use crate::resources;
use crate::ui; use crate::ui;
use rand::{self, seq::SliceRandom}; use rand::{self, seq::SliceRandom};
use rand_pcg;
use std::f64::consts; use std::f64::consts;
use std::sync::{Arc, RwLock}; use std::sync::{Arc, RwLock};
use std::time::{SystemTime, UNIX_EPOCH}; use std::time::{SystemTime, UNIX_EPOCH};

View File

@ -282,6 +282,12 @@ pub struct Container {
last_height: f64, last_height: f64,
} }
impl Default for Container {
fn default() -> Self {
Self::new()
}
}
impl Container { impl Container {
pub fn new() -> Container { pub fn new() -> Container {
Container { Container {
@ -677,6 +683,7 @@ macro_rules! element {
} }
} }
#[derive(Default)]
pub struct $builder { pub struct $builder {
$( $(
$sname: Option<$sty>, $sname: Option<$sty>,
@ -769,7 +776,7 @@ macro_rules! element {
$oname: self.$oname.unwrap_or($oval), $oname: self.$oname.unwrap_or($oval),
)* )*
$( $(
$nname: $nname, $nname,
)* )*
// Base fields // Base fields
draw_index: self.draw_index, draw_index: self.draw_index,
@ -1532,9 +1539,8 @@ impl UIElement for TextBox {
(VirtualKeyCode::V, true) => { (VirtualKeyCode::V, true) => {
if ctrl_pressed { if ctrl_pressed {
let mut clipboard: ClipboardContext = ClipboardProvider::new().unwrap(); let mut clipboard: ClipboardContext = ClipboardProvider::new().unwrap();
match clipboard.get_contents() { if let Ok(text) = clipboard.get_contents() {
Ok(text) => self.input.push_str(&text), self.input.push_str(&text)
Err(_) => (),
} }
} }
} }

View File

@ -24,8 +24,8 @@ use crate::shared::{Direction, Position};
use crate::types::hash::FNVHash; use crate::types::hash::FNVHash;
use crate::types::{bit, nibble}; use crate::types::{bit, nibble};
use cgmath::prelude::*; use cgmath::prelude::*;
use collision;
use flate2::read::ZlibDecoder; use flate2::read::ZlibDecoder;
use std::cmp::Ordering;
use std::collections::HashMap; use std::collections::HashMap;
use std::collections::VecDeque; use std::collections::VecDeque;
use std::hash::BuildHasherDefault; use std::hash::BuildHasherDefault;
@ -53,11 +53,13 @@ pub enum BlockEntityAction {
Create(Position), Create(Position),
Remove(Position), Remove(Position),
UpdateSignText( UpdateSignText(
Position, Box<(
format::Component, Position,
format::Component, format::Component,
format::Component, format::Component,
format::Component, format::Component,
format::Component,
)>,
), ),
} }
@ -202,6 +204,7 @@ impl World {
self.block_entity_actions.push_back(action); self.block_entity_actions.push_back(action);
} }
#[allow(clippy::verbose_bit_mask)] // "llvm generates better code" for updates_performed & 0xFFF "on x86"
pub fn tick(&mut self, m: &mut ecs::Manager) { pub fn tick(&mut self, m: &mut ecs::Manager) {
use std::time::Instant; use std::time::Instant;
let start = Instant::now(); let start = Instant::now();
@ -209,11 +212,9 @@ impl World {
while !self.light_updates.is_empty() { while !self.light_updates.is_empty() {
updates_performed += 1; updates_performed += 1;
self.do_light_update(); self.do_light_update();
if updates_performed & 0xFFF == 0 { if (updates_performed & 0xFFF == 0) && start.elapsed().subsec_nanos() >= 5000000 {
if start.elapsed().subsec_nanos() >= 5000000 { // 5 ms for light updates
// 5 ms for light updates break;
break;
}
} }
} }
@ -243,7 +244,8 @@ impl World {
} }
} }
} }
BlockEntityAction::UpdateSignText(pos, line1, line2, line3, line4) => { BlockEntityAction::UpdateSignText(bx) => {
let (pos, line1, line2, line3, line4) = *bx;
if let Some(chunk) = self.chunks.get(&CPos(pos.x >> 4, pos.z >> 4)) { if let Some(chunk) = self.chunks.get(&CPos(pos.x >> 4, pos.z >> 4)) {
if let Some(entity) = chunk.block_entities.get(&pos) { if let Some(entity) = chunk.block_entities.get(&pos) {
if let Some(sign) = m.get_component_mut(*entity, sign_info) { if let Some(sign) = m.get_component_mut(*entity, sign_info) {
@ -316,7 +318,7 @@ impl World {
pub fn copy_cloud_heightmap(&mut self, data: &mut [u8]) -> bool { pub fn copy_cloud_heightmap(&mut self, data: &mut [u8]) -> bool {
let mut dirty = false; let mut dirty = false;
for (_, c) in &mut self.chunks { for c in self.chunks.values_mut() {
if c.heightmap_dirty { if c.heightmap_dirty {
dirty = true; dirty = true;
c.heightmap_dirty = false; c.heightmap_dirty = false;
@ -443,7 +445,7 @@ impl World {
pub fn get_dirty_chunk_sections(&mut self) -> Vec<(i32, i32, i32)> { pub fn get_dirty_chunk_sections(&mut self) -> Vec<(i32, i32, i32)> {
let mut out = vec![]; let mut out = vec![];
for (_, chunk) in &mut self.chunks { for chunk in self.chunks.values_mut() {
for sec in &mut chunk.sections { for sec in &mut chunk.sections {
if let Some(sec) = sec.as_mut() { if let Some(sec) = sec.as_mut() {
if !sec.building && sec.dirty { if !sec.building && sec.dirty {
@ -490,7 +492,7 @@ impl World {
} }
pub fn flag_dirty_all(&mut self) { pub fn flag_dirty_all(&mut self) {
for (_, chunk) in &mut self.chunks { for chunk in self.chunks.values_mut() {
for sec in &mut chunk.sections { for sec in &mut chunk.sections {
if let Some(sec) = sec.as_mut() { if let Some(sec) = sec.as_mut() {
sec.dirty = true; sec.dirty = true;
@ -801,6 +803,7 @@ impl World {
) )
} }
#[allow(clippy::needless_range_loop)]
fn load_uncompressed_chunk17( fn load_uncompressed_chunk17(
&mut self, &mut self,
x: i32, x: i32,
@ -997,6 +1000,7 @@ impl World {
self.load_chunk19_or_115(false, x, z, new, mask, data) self.load_chunk19_or_115(false, x, z, new, mask, data)
} }
#[allow(clippy::or_fun_call)]
fn load_chunk19_or_115( fn load_chunk19_or_115(
&mut self, &mut self,
read_biomes: bool, read_biomes: bool,
@ -1071,6 +1075,7 @@ impl World {
mappings mappings
.get(&id) .get(&id)
.cloned() .cloned()
// TODO: fix or_fun_call, but do not re-borrow self
.unwrap_or(block::Block::by_vanilla_id( .unwrap_or(block::Block::by_vanilla_id(
id, id,
self.protocol_version, self.protocol_version,
@ -1267,20 +1272,24 @@ impl Chunk {
} }
} }
let idx = ((z << 4) | x) as usize; let idx = ((z << 4) | x) as usize;
if self.heightmap[idx] < y as u8 { match self.heightmap[idx].cmp(&(y as u8)) {
self.heightmap[idx] = y as u8; Ordering::Less => {
self.heightmap_dirty = true; self.heightmap[idx] = y as u8;
} else if self.heightmap[idx] == y as u8 { self.heightmap_dirty = true;
// Find a new lowest
for yy in 0..y {
let sy = y - yy - 1;
if let block::Air { .. } = self.get_block(x, sy, z) {
continue;
}
self.heightmap[idx] = sy as u8;
break;
} }
self.heightmap_dirty = true; Ordering::Equal => {
// Find a new lowest
for yy in 0..y {
let sy = y - yy - 1;
if let block::Air { .. } = self.get_block(x, sy, z) {
continue;
}
self.heightmap[idx] = sy as u8;
break;
}
self.heightmap_dirty = true;
}
Ordering::Greater => (),
} }
true true
} }