Overhaul registry loading
Registry data is now loaded dynamically for automatic future-proofing, ending the need for manual struct updates. Access to specific values now requires explicit data lookups.
This commit is contained in:
parent
2c26124a90
commit
0ce5471761
105
Cargo.lock
generated
105
Cargo.lock
generated
@ -125,9 +125,9 @@ checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "async-compression"
|
name = "async-compression"
|
||||||
version = "0.4.32"
|
version = "0.4.33"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5a89bce6054c720275ac2432fbba080a66a2106a44a1b804553930ca6909f4e0"
|
checksum = "93c1f86859c1af3d514fa19e8323147ff10ea98684e6c7b307912509f50e67b2"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"compression-codecs",
|
"compression-codecs",
|
||||||
"compression-core",
|
"compression-core",
|
||||||
@ -285,9 +285,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "bytes"
|
name = "bytes"
|
||||||
version = "1.10.1"
|
version = "1.11.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a"
|
checksum = "b35204fbdc0b3f4446b89fc1ac2cf84a8a68971995d0bf2e925ec7cd960f9cb3"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cast"
|
name = "cast"
|
||||||
@ -297,9 +297,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "cc"
|
name = "cc"
|
||||||
version = "1.2.44"
|
version = "1.2.45"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "37521ac7aabe3d13122dc382493e20c9416f299d2ccd5b3a5340a2570cdeb0f3"
|
checksum = "35900b6c8d709fb1d854671ae27aeaa9eec2f8b01b364e1619a40da3e6fe2afe"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"find-msvc-tools",
|
"find-msvc-tools",
|
||||||
"shlex",
|
"shlex",
|
||||||
@ -405,9 +405,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "compression-codecs"
|
name = "compression-codecs"
|
||||||
version = "0.4.31"
|
version = "0.4.32"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ef8a506ec4b81c460798f572caead636d57d3d7e940f998160f52bd254bf2d23"
|
checksum = "680dc087785c5230f8e8843e2e57ac7c1c90488b6a91b88caa265410568f441b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"compression-core",
|
"compression-core",
|
||||||
"flate2",
|
"flate2",
|
||||||
@ -415,9 +415,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "compression-core"
|
name = "compression-core"
|
||||||
version = "0.4.29"
|
version = "0.4.30"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "e47641d3deaf41fb1538ac1f54735925e275eaf3bf4d55c81b137fba797e5cbb"
|
checksum = "3a9b614a5787ef0c8802a55766480563cb3a93b435898c422ed2a359cf811582"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "console-api"
|
name = "console-api"
|
||||||
@ -535,15 +535,14 @@ checksum = "19d374276b40fb8bbdee95aef7c7fa6b5316ec764510eb64b8dd0e2ed0d7e7f5"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crc-fast"
|
name = "crc-fast"
|
||||||
version = "1.6.0"
|
version = "1.8.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6ddc2d09feefeee8bd78101665bd8645637828fa9317f9f292496dbbd8c65ff3"
|
checksum = "a2f7c8d397a6353ef0c1d6217ab91b3ddb5431daf57fd013f506b967dcf44458"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crc",
|
"crc",
|
||||||
"digest 0.10.7",
|
"digest 0.10.7",
|
||||||
"rand",
|
|
||||||
"regex",
|
|
||||||
"rustversion",
|
"rustversion",
|
||||||
|
"spin",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -958,7 +957,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"libc",
|
"libc",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -1587,9 +1586,9 @@ checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libloading"
|
name = "libloading"
|
||||||
version = "0.8.9"
|
version = "0.9.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
|
checksum = "754ca22de805bb5744484a5b151a9e1a8e837d5dc232c2d7d8c2e3492edc8b60"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"windows-link",
|
"windows-link",
|
||||||
@ -2166,7 +2165,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin"
|
name = "pumpkin"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
@ -2212,7 +2211,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-api-macros"
|
name = "pumpkin-api-macros"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro-error2",
|
"proc-macro-error2",
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
@ -2222,7 +2221,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-config"
|
name = "pumpkin-config"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"pumpkin-util",
|
"pumpkin-util",
|
||||||
@ -2233,7 +2232,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-data"
|
name = "pumpkin-data"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crc-fast",
|
"crc-fast",
|
||||||
"heck",
|
"heck",
|
||||||
@ -2251,7 +2250,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-inventory"
|
name = "pumpkin-inventory"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
@ -2266,7 +2265,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-macros"
|
name = "pumpkin-macros"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"heck",
|
"heck",
|
||||||
"proc-macro-error2",
|
"proc-macro-error2",
|
||||||
@ -2277,7 +2276,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-nbt"
|
name = "pumpkin-nbt"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"cesu8",
|
"cesu8",
|
||||||
@ -2289,7 +2288,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-protocol"
|
name = "pumpkin-protocol"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
"aes",
|
||||||
"async-compression",
|
"async-compression",
|
||||||
@ -2311,7 +2310,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-registry"
|
name = "pumpkin-registry"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"indexmap",
|
"indexmap",
|
||||||
"pumpkin-protocol",
|
"pumpkin-protocol",
|
||||||
@ -2322,7 +2321,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-util"
|
name = "pumpkin-util"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"bytes",
|
"bytes",
|
||||||
@ -2346,7 +2345,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "pumpkin-world"
|
name = "pumpkin-world"
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"bitflags",
|
"bitflags",
|
||||||
@ -2391,9 +2390,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "quote"
|
name = "quote"
|
||||||
version = "1.0.41"
|
version = "1.0.42"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
|
checksum = "a338cc41d27e6cc6dce6cefc13a0729dfbb81c262b1f519331575dd80ef3067f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
]
|
]
|
||||||
@ -2581,14 +2580,14 @@ dependencies = [
|
|||||||
"errno",
|
"errno",
|
||||||
"libc",
|
"libc",
|
||||||
"linux-raw-sys",
|
"linux-raw-sys",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls"
|
name = "rustls"
|
||||||
version = "0.23.34"
|
version = "0.23.35"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "6a9586e9ee2b4f8fab52a0048ca7334d7024eef48e2cb9407e3497bb7cab7fa7"
|
checksum = "533f54bc6a7d4f647e46ad909549eda97bf5afc1585190ef692b4286b198bd8f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"log",
|
"log",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
@ -2599,15 +2598,6 @@ dependencies = [
|
|||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "rustls-pemfile"
|
|
||||||
version = "2.2.0"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50"
|
|
||||||
dependencies = [
|
|
||||||
"rustls-pki-types",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "rustls-pki-types"
|
name = "rustls-pki-types"
|
||||||
version = "1.13.0"
|
version = "1.13.0"
|
||||||
@ -2651,9 +2641,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ruzstd"
|
name = "ruzstd"
|
||||||
version = "0.8.1"
|
version = "0.8.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3640bec8aad418d7d03c72ea2de10d5c646a598f9883c7babc160d91e3c1b26c"
|
checksum = "e5ff0cc5e135c8870a775d3320910cd9b564ec036b4dc0b8741629020be63f01"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"twox-hash 2.1.2",
|
"twox-hash 2.1.2",
|
||||||
]
|
]
|
||||||
@ -2931,6 +2921,12 @@ dependencies = [
|
|||||||
"windows-sys 0.60.2",
|
"windows-sys 0.60.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "spin"
|
||||||
|
version = "0.10.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "d5fe4ccb98d9c292d56fec89a5e07da7fc4cf0dc11e156b41793132775d3e591"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "spki"
|
name = "spki"
|
||||||
version = "0.7.3"
|
version = "0.7.3"
|
||||||
@ -2971,9 +2967,9 @@ checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "syn"
|
name = "syn"
|
||||||
version = "2.0.108"
|
version = "2.0.109"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
|
checksum = "2f17c7e013e88258aa9543dcbe81aca68a667a9ac37cd69c9fbc07858bfe0e2f"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@ -3018,7 +3014,7 @@ dependencies = [
|
|||||||
"fastrand",
|
"fastrand",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rustix",
|
"rustix",
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@ -3169,9 +3165,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tokio-util"
|
name = "tokio-util"
|
||||||
version = "0.7.16"
|
version = "0.7.17"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "14307c986784f72ef81c89db7d9e28d6ac26d16213b109ea501696195e6e3ce5"
|
checksum = "2efa149fe76073d6e8fd97ef4f4eca7b67f599660115591483572e406e165594"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"bytes",
|
"bytes",
|
||||||
"futures-core",
|
"futures-core",
|
||||||
@ -3398,9 +3394,9 @@ checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "ureq"
|
name = "ureq"
|
||||||
version = "3.1.2"
|
version = "3.1.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "99ba1025f18a4a3fc3e9b48c868e9beb4f24f4b4b1a325bada26bd4119f46537"
|
checksum = "d39cb1dbab692d82a977c0392ffac19e188bd9186a9f32806f0aaa859d75585a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64 0.22.1",
|
"base64 0.22.1",
|
||||||
"cookie_store",
|
"cookie_store",
|
||||||
@ -3408,7 +3404,6 @@ dependencies = [
|
|||||||
"log",
|
"log",
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
"rustls",
|
"rustls",
|
||||||
"rustls-pemfile",
|
|
||||||
"rustls-pki-types",
|
"rustls-pki-types",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
@ -3565,9 +3560,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "webpki-roots"
|
name = "webpki-roots"
|
||||||
version = "1.0.3"
|
version = "1.0.4"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "32b130c0d2d49f8b6889abc456e795e82525204f27c42cf767cf0d7734e089b8"
|
checksum = "b2878ef029c47c6e8cf779119f20fcf52bde7ad42a731b2a304bc221df17571e"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"rustls-pki-types",
|
"rustls-pki-types",
|
||||||
]
|
]
|
||||||
@ -3594,7 +3589,7 @@ version = "0.1.11"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-sys 0.61.2",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
@ -14,7 +14,7 @@ members = [
|
|||||||
]
|
]
|
||||||
|
|
||||||
[workspace.package]
|
[workspace.package]
|
||||||
version = "0.1.0-dev+1.21.9"
|
version = "0.1.0-dev+1.21.10"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
@ -44,7 +44,7 @@ tokio = { version = "1.48", features = [
|
|||||||
|
|
||||||
thiserror = "2.0"
|
thiserror = "2.0"
|
||||||
|
|
||||||
bytes = "1.10"
|
bytes = "1.11"
|
||||||
|
|
||||||
# Concurrency/Parallelism and Synchronization
|
# Concurrency/Parallelism and Synchronization
|
||||||
futures = { version = "0.3", default-features = false, features = ["executor"] }
|
futures = { version = "0.3", default-features = false, features = ["executor"] }
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||

|

|
||||||
[](https://discord.gg/wT8XjrjKkf)
|
[](https://discord.gg/wT8XjrjKkf)
|
||||||
[](https://opensource.org/licenses/MIT)
|
[](https://opensource.org/licenses/MIT)
|
||||||

|

|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
18752
assets/tags.json
18752
assets/tags.json
File diff suppressed because it is too large
Load Diff
@ -10,7 +10,7 @@ pumpkin-util = { path = "../pumpkin-util" }
|
|||||||
pumpkin-nbt = { path = "../pumpkin-nbt" }
|
pumpkin-nbt = { path = "../pumpkin-nbt" }
|
||||||
|
|
||||||
serde.workspace = true
|
serde.workspace = true
|
||||||
crc-fast = "1.6.0"
|
crc-fast = "1.8.0"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
pumpkin-util = { path = "../pumpkin-util" }
|
pumpkin-util = { path = "../pumpkin-util" }
|
||||||
|
|||||||
@ -170,22 +170,19 @@ impl<'de, R: Read + Seek> de::Deserializer<'de> for &mut Deserializer<R> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize_u16<V: Visitor<'de>>(self, _visitor: V) -> Result<V::Value> {
|
fn deserialize_u16<V: Visitor<'de>>(self, visitor: V) -> Result<V::Value> {
|
||||||
Err(Error::UnsupportedType(
|
let value = self.input.get_i16_be()?;
|
||||||
"u16; NBT only supports signed values".to_string(),
|
visitor.visit_i16::<Error>(value)
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize_u32<V: Visitor<'de>>(self, _visitor: V) -> Result<V::Value> {
|
fn deserialize_u32<V: Visitor<'de>>(self, visitor: V) -> Result<V::Value> {
|
||||||
Err(Error::UnsupportedType(
|
let value = self.input.get_i32_be()?;
|
||||||
"u32; NBT only supports signed values".to_string(),
|
visitor.visit_i32::<Error>(value)
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize_u64<V: Visitor<'de>>(self, _visitor: V) -> Result<V::Value> {
|
fn deserialize_u64<V: Visitor<'de>>(self, visitor: V) -> Result<V::Value> {
|
||||||
Err(Error::UnsupportedType(
|
let value = self.input.get_i64_be()?;
|
||||||
"u64; NBT only supports signed values".to_string(),
|
visitor.visit_i64::<Error>(value)
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn deserialize_bool<V: Visitor<'de>>(self, visitor: V) -> Result<V::Value> {
|
fn deserialize_bool<V: Visitor<'de>>(self, visitor: V) -> Result<V::Value> {
|
||||||
|
|||||||
@ -213,22 +213,16 @@ impl<W: Write> ser::Serializer for &mut Serializer<W> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fn serialize_u16(self, _v: u16) -> Result<()> {
|
fn serialize_u16(self, v: u16) -> Result<()> {
|
||||||
Err(Error::UnsupportedType(
|
self.serialize_i16(v as i16)
|
||||||
"u16; NBT only supports signed values".to_string(),
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn serialize_u32(self, _v: u32) -> Result<()> {
|
fn serialize_u32(self, v: u32) -> Result<()> {
|
||||||
Err(Error::UnsupportedType(
|
self.serialize_i32(v as i32)
|
||||||
"u32; NBT only supports signed values".to_string(),
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn serialize_u64(self, _v: u64) -> Result<()> {
|
fn serialize_u64(self, v: u64) -> Result<()> {
|
||||||
Err(Error::UnsupportedType(
|
self.serialize_i64(v as i64)
|
||||||
"u64; NBT only supports signed values".to_string(),
|
|
||||||
))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fn serialize_f32(self, v: f32) -> Result<()> {
|
fn serialize_f32(self, v: f32) -> Result<()> {
|
||||||
|
|||||||
@ -27,7 +27,7 @@ aes = "0.8"
|
|||||||
cfb8 = "0.8"
|
cfb8 = "0.8"
|
||||||
|
|
||||||
# compression
|
# compression
|
||||||
async-compression = { version = "0.4.32", features = ["tokio", "zlib"] }
|
async-compression = { version = "0.4.33", features = ["tokio", "zlib"] }
|
||||||
|
|
||||||
take_mut = "0.2.2"
|
take_mut = "0.2.2"
|
||||||
bitflags = "2.10.0"
|
bitflags = "2.10.0"
|
||||||
|
|||||||
@ -1,45 +1,15 @@
|
|||||||
use std::sync::LazyLock;
|
use std::sync::LazyLock;
|
||||||
|
|
||||||
use banner_pattern::BannerPattern;
|
mod jukebox_song;
|
||||||
use biome::Biome;
|
|
||||||
use cat::CatVariant;
|
|
||||||
use chat_type::{ChatType, Decoration};
|
|
||||||
use chicken::ChickenVariant;
|
|
||||||
use cow::CowVariant;
|
|
||||||
use damage_type::DamageType;
|
|
||||||
use dimension::Dimension;
|
|
||||||
use enchantment::Enchantment;
|
|
||||||
use frog::FrogVariant;
|
|
||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use instrument::Instrument;
|
|
||||||
use jukebox_song::JukeboxSong;
|
|
||||||
use paint::Painting;
|
|
||||||
use pig::PigVariant;
|
|
||||||
use pumpkin_protocol::java::client::config::RegistryEntry;
|
use pumpkin_protocol::java::client::config::RegistryEntry;
|
||||||
use pumpkin_util::include_json_static;
|
use pumpkin_util::include_json_static;
|
||||||
use pumpkin_util::resource_location::ResourceLocation;
|
use pumpkin_util::resource_location::ResourceLocation;
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
use trim_material::TrimMaterial;
|
use serde_json::Value;
|
||||||
use trim_pattern::TrimPattern;
|
|
||||||
use wolf::{WolfSoundVariant, WolfVariant};
|
|
||||||
|
|
||||||
mod banner_pattern;
|
use crate::jukebox_song::JukeboxSong;
|
||||||
mod biome;
|
|
||||||
mod cat;
|
|
||||||
mod chat_type;
|
|
||||||
mod chicken;
|
|
||||||
mod cow;
|
|
||||||
mod damage_type;
|
|
||||||
mod dimension;
|
|
||||||
mod enchantment;
|
|
||||||
mod frog;
|
|
||||||
mod instrument;
|
|
||||||
mod jukebox_song;
|
|
||||||
mod paint;
|
|
||||||
mod pig;
|
|
||||||
mod trim_material;
|
|
||||||
mod trim_pattern;
|
|
||||||
mod wolf;
|
|
||||||
|
|
||||||
pub static SYNCED_REGISTRIES: LazyLock<SyncedRegistry> =
|
pub static SYNCED_REGISTRIES: LazyLock<SyncedRegistry> =
|
||||||
LazyLock::new(|| include_json_static!("../../assets/synced_registries.json", SyncedRegistry));
|
LazyLock::new(|| include_json_static!("../../assets/synced_registries.json", SyncedRegistry));
|
||||||
@ -51,28 +21,31 @@ pub struct Registry {
|
|||||||
|
|
||||||
#[derive(Serialize, Deserialize)]
|
#[derive(Serialize, Deserialize)]
|
||||||
pub struct SyncedRegistry {
|
pub struct SyncedRegistry {
|
||||||
#[serde(rename = "worldgen/biome")]
|
#[serde(flatten)]
|
||||||
biome: IndexMap<String, Biome>,
|
pub registries: IndexMap<String, IndexMap<String, Value>>,
|
||||||
chat_type: IndexMap<String, ChatType>,
|
}
|
||||||
trim_pattern: IndexMap<String, TrimPattern>,
|
|
||||||
trim_material: IndexMap<String, TrimMaterial>,
|
// Probably not optimal
|
||||||
wolf_variant: IndexMap<String, WolfVariant>,
|
impl SyncedRegistry {
|
||||||
painting_variant: IndexMap<String, Painting>,
|
pub fn get_jukebox_song(&self, song_key: &str) -> Option<JukeboxSong> {
|
||||||
dimension_type: IndexMap<String, Dimension>,
|
let jukebox_registry = self
|
||||||
damage_type: IndexMap<String, DamageType>,
|
.registries
|
||||||
cat_variant: IndexMap<String, CatVariant>,
|
.get("minecraft:jukebox_song")
|
||||||
chicken_variant: IndexMap<String, ChickenVariant>,
|
.or_else(|| self.registries.get("jukebox_song"))?;
|
||||||
cow_variant: IndexMap<String, CowVariant>,
|
let song_value = jukebox_registry.get(song_key)?;
|
||||||
frog_variant: IndexMap<String, FrogVariant>,
|
|
||||||
pig_variant: IndexMap<String, PigVariant>,
|
serde_json::from_value(song_value.clone()).ok()
|
||||||
wolf_sound_variant: IndexMap<String, WolfSoundVariant>,
|
}
|
||||||
banner_pattern: IndexMap<String, BannerPattern>,
|
|
||||||
enchantment: IndexMap<String, Enchantment>,
|
pub fn get_jukebox_song_index(&self, song_key: &str) -> Option<usize> {
|
||||||
pub jukebox_song: IndexMap<String, JukeboxSong>,
|
let jukebox_registry = self
|
||||||
instrument: IndexMap<String, Instrument>,
|
.registries
|
||||||
|
.get("minecraft:jukebox_song")
|
||||||
|
.or_else(|| self.registries.get("jukebox_song"))?;
|
||||||
|
jukebox_registry.get_index_of(song_key)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: remove in favor of numerical registry ids for `minecraft:dimension_type`
|
|
||||||
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
|
||||||
pub enum VanillaDimensionType {
|
pub enum VanillaDimensionType {
|
||||||
Overworld,
|
Overworld,
|
||||||
@ -104,188 +77,61 @@ impl VanillaDimensionType {
|
|||||||
|
|
||||||
impl Registry {
|
impl Registry {
|
||||||
pub fn get_synced() -> Vec<Self> {
|
pub fn get_synced() -> Vec<Self> {
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
let mut synced_registries = Vec::new();
|
||||||
.biome
|
|
||||||
.iter()
|
for (registry_key, entries) in &SYNCED_REGISTRIES.registries {
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
let registry_id = if registry_key.contains(':') {
|
||||||
.collect();
|
ResourceLocation::from(registry_key)
|
||||||
let biome = Registry {
|
} else {
|
||||||
registry_id: ResourceLocation::vanilla("worldgen/biome"),
|
ResourceLocation::vanilla(registry_key)
|
||||||
registry_entries,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
let mut registry_entries: Vec<RegistryEntry> = SYNCED_REGISTRIES
|
let mut registry_entries: Vec<RegistryEntry> = entries
|
||||||
.chat_type
|
|
||||||
.iter()
|
.iter()
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
.map(|(entry_name, entry_data)| RegistryEntry::from_nbt(entry_name, entry_data))
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
// Custom RAW registry type that removes the vanilla sender name. Allows custom formatting.
|
// 3. Special Handling: Chat Type "raw" injection
|
||||||
|
// We check if this specific loop iteration is for "chat_type"
|
||||||
|
if registry_id.path == "chat_type" {
|
||||||
registry_entries.push(RegistryEntry::from_nbt_custom(
|
registry_entries.push(RegistryEntry::from_nbt_custom(
|
||||||
"raw",
|
"raw",
|
||||||
&ChatType {
|
&Self::get_raw_chat_type_struct(),
|
||||||
chat: Decoration {
|
|
||||||
translation_key: "%s".to_string(),
|
|
||||||
parameters: vec!["content".to_string()],
|
|
||||||
style: None,
|
|
||||||
},
|
|
||||||
narration: Decoration {
|
|
||||||
translation_key: "%s says %s".to_string(),
|
|
||||||
parameters: vec!["sender".to_string(), "content".to_string()],
|
|
||||||
style: None,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
));
|
));
|
||||||
|
}
|
||||||
|
|
||||||
let chat_type = Registry {
|
synced_registries.push(Registry {
|
||||||
registry_id: ResourceLocation::vanilla("chat_type"),
|
registry_id,
|
||||||
registry_entries,
|
registry_entries,
|
||||||
};
|
});
|
||||||
|
}
|
||||||
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
// let jukebox_entries = SYNCED_REGISTRIES
|
||||||
.wolf_variant
|
// .jukebox_song
|
||||||
.iter()
|
// .keys()
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
// .map(|name| RegistryEntry::none(name))
|
||||||
.collect();
|
// .collect();
|
||||||
let wolf_variant = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("wolf_variant"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
// synced_registries.push(Registry {
|
||||||
.cat_variant
|
// registry_id: ResourceLocation::vanilla("jukebox_song"),
|
||||||
.iter()
|
// registry_entries: jukebox_entries,
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
// });
|
||||||
.collect();
|
|
||||||
let cat_variant = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("cat_variant"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
|
||||||
.chicken_variant
|
|
||||||
.iter()
|
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let chicken_variant = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("chicken_variant"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
|
||||||
.cow_variant
|
|
||||||
.iter()
|
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let cow_variant = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("cow_variant"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
|
||||||
.frog_variant
|
|
||||||
.iter()
|
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let frog_variant = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("frog_variant"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
|
||||||
.pig_variant
|
|
||||||
.iter()
|
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let pig_variant = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("pig_variant"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
|
||||||
.wolf_sound_variant
|
|
||||||
.iter()
|
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let wolf_sound_variant = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("wolf_sound_variant"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
synced_registries
|
||||||
.painting_variant
|
}
|
||||||
.iter()
|
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let painting_variant = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("painting_variant"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
fn get_raw_chat_type_struct() -> impl Serialize {
|
||||||
.dimension_type
|
serde_json::json!({
|
||||||
.iter()
|
"chat": {
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
"translation_key": "%s",
|
||||||
.collect();
|
"parameters": ["content"],
|
||||||
let dimension_type = Registry {
|
"style": null
|
||||||
registry_id: ResourceLocation::vanilla("dimension_type"),
|
},
|
||||||
registry_entries,
|
"narration": {
|
||||||
};
|
"translation_key": "%s says %s",
|
||||||
|
"parameters": ["sender", "content"],
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
"style": null
|
||||||
.damage_type
|
}
|
||||||
.iter()
|
})
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let damage_type = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("damage_type"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
|
||||||
.banner_pattern
|
|
||||||
.iter()
|
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let banner_pattern = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("banner_pattern"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
|
||||||
.jukebox_song
|
|
||||||
.iter()
|
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let jukebox_song = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("jukebox_song"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
|
|
||||||
let registry_entries = SYNCED_REGISTRIES
|
|
||||||
.enchantment
|
|
||||||
.iter()
|
|
||||||
.map(|(name, _nbt)| RegistryEntry::none(name))
|
|
||||||
.collect();
|
|
||||||
let enchantment = Registry {
|
|
||||||
registry_id: ResourceLocation::vanilla("enchantment"),
|
|
||||||
registry_entries,
|
|
||||||
};
|
|
||||||
|
|
||||||
vec![
|
|
||||||
cat_variant,
|
|
||||||
chicken_variant,
|
|
||||||
cow_variant,
|
|
||||||
frog_variant,
|
|
||||||
pig_variant,
|
|
||||||
biome,
|
|
||||||
chat_type,
|
|
||||||
// trim_pattern,
|
|
||||||
// trim_material,
|
|
||||||
wolf_variant,
|
|
||||||
painting_variant,
|
|
||||||
wolf_sound_variant,
|
|
||||||
dimension_type,
|
|
||||||
damage_type,
|
|
||||||
banner_pattern,
|
|
||||||
enchantment,
|
|
||||||
jukebox_song,
|
|
||||||
// instrument,
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -12,6 +12,14 @@ impl ResourceLocation {
|
|||||||
/// The maximum number of bytes for a [`ResourceLocation`] is the same as for a normal [`String`].
|
/// The maximum number of bytes for a [`ResourceLocation`] is the same as for a normal [`String`].
|
||||||
pub const MAX_SIZE: NonZeroUsize = NonZeroUsize::new(i16::MAX as usize).unwrap();
|
pub const MAX_SIZE: NonZeroUsize = NonZeroUsize::new(i16::MAX as usize).unwrap();
|
||||||
|
|
||||||
|
pub fn from(location: &str) -> Self {
|
||||||
|
let names = location.split_once(":").unwrap_or_default();
|
||||||
|
Self {
|
||||||
|
namespace: names.0.to_string(),
|
||||||
|
path: names.1.to_string(),
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
pub fn vanilla(path: &str) -> Self {
|
pub fn vanilla(path: &str) -> Self {
|
||||||
Self {
|
Self {
|
||||||
namespace: "minecraft".to_string(),
|
namespace: "minecraft".to_string(),
|
||||||
|
|||||||
@ -35,7 +35,7 @@ num-traits = "0.2"
|
|||||||
# Compression
|
# Compression
|
||||||
flate2 = "1.1"
|
flate2 = "1.1"
|
||||||
lz4-java-wrc = "0.2.0"
|
lz4-java-wrc = "0.2.0"
|
||||||
ruzstd = "0.8.1"
|
ruzstd = "0.8.2"
|
||||||
|
|
||||||
itertools = "0.14.0"
|
itertools = "0.14.0"
|
||||||
enum_dispatch = "0.3"
|
enum_dispatch = "0.3"
|
||||||
@ -44,7 +44,7 @@ derive-getters = "0.5.0"
|
|||||||
thread_local = "1.1.9"
|
thread_local = "1.1.9"
|
||||||
lru = "0.16.2"
|
lru = "0.16.2"
|
||||||
|
|
||||||
tokio-util = { version = "0.7.16", features = ["rt"] }
|
tokio-util = { version = "0.7.17", features = ["rt"] }
|
||||||
rand = "0.9.2"
|
rand = "0.9.2"
|
||||||
num_cpus = "1.17.0"
|
num_cpus = "1.17.0"
|
||||||
slotmap = "1.0.7"
|
slotmap = "1.0.7"
|
||||||
|
|||||||
@ -37,8 +37,8 @@ pub const CHUNK_COUNT: usize = REGION_SIZE * REGION_SIZE;
|
|||||||
/// The number of bytes in a sector (4 KiB)
|
/// The number of bytes in a sector (4 KiB)
|
||||||
const SECTOR_BYTES: usize = 4096;
|
const SECTOR_BYTES: usize = 4096;
|
||||||
|
|
||||||
// 1.21.9
|
// 1.21.10
|
||||||
pub const WORLD_DATA_VERSION: i32 = 4554;
|
pub const WORLD_DATA_VERSION: i32 = 4556;
|
||||||
|
|
||||||
#[derive(Clone, Default)]
|
#[derive(Clone, Default)]
|
||||||
pub struct AnvilChunkFormat;
|
pub struct AnvilChunkFormat;
|
||||||
|
|||||||
@ -23,7 +23,7 @@ pub mod world_info;
|
|||||||
pub type BlockId = u16;
|
pub type BlockId = u16;
|
||||||
pub type BlockStateId = u16;
|
pub type BlockStateId = u16;
|
||||||
|
|
||||||
pub const CURRENT_MC_VERSION: &str = "1.21.9";
|
pub const CURRENT_MC_VERSION: &str = "1.21.10";
|
||||||
pub const CURRENT_BEDROCK_MC_VERSION: &str = "1.21.111";
|
pub const CURRENT_BEDROCK_MC_VERSION: &str = "1.21.111";
|
||||||
|
|
||||||
#[macro_export]
|
#[macro_export]
|
||||||
|
|||||||
@ -13,7 +13,7 @@ pub mod anvil;
|
|||||||
|
|
||||||
// Constraint: disk biome palette serialization changed in 1.21.5
|
// Constraint: disk biome palette serialization changed in 1.21.5
|
||||||
pub const MINIMUM_SUPPORTED_WORLD_DATA_VERSION: i32 = 4435; // 1.21.9
|
pub const MINIMUM_SUPPORTED_WORLD_DATA_VERSION: i32 = 4435; // 1.21.9
|
||||||
pub const MAXIMUM_SUPPORTED_WORLD_DATA_VERSION: i32 = 4554; // 1.21.9
|
pub const MAXIMUM_SUPPORTED_WORLD_DATA_VERSION: i32 = 4556; // 1.21.10
|
||||||
|
|
||||||
pub const MINIMUM_SUPPORTED_LEVEL_VERSION: i32 = 19132; // 1.21.9
|
pub const MINIMUM_SUPPORTED_LEVEL_VERSION: i32 = 19132; // 1.21.9
|
||||||
pub const MAXIMUM_SUPPORTED_LEVEL_VERSION: i32 = 19133; // 1.21.9
|
pub const MAXIMUM_SUPPORTED_LEVEL_VERSION: i32 = 19133; // 1.21.9
|
||||||
|
|||||||
@ -54,7 +54,7 @@ rsa = { version = "=0.10.0-rc.9", features = ["sha1"] }
|
|||||||
rsa-der = "0.3"
|
rsa-der = "0.3"
|
||||||
|
|
||||||
# authentication
|
# authentication
|
||||||
ureq = { version = "3.1.2", features = [
|
ureq = { version = "3.1.4", features = [
|
||||||
"json",
|
"json",
|
||||||
] }
|
] }
|
||||||
|
|
||||||
@ -73,11 +73,11 @@ simplelog = { version = "0.12.2", features = ["ansi_term"] }
|
|||||||
time = "0.3"
|
time = "0.3"
|
||||||
|
|
||||||
# plugins
|
# plugins
|
||||||
libloading = "0.8"
|
libloading = "0.9"
|
||||||
rustc-hash = "2.1.1"
|
rustc-hash = "2.1.1"
|
||||||
|
|
||||||
# Task handling
|
# Task handling
|
||||||
tokio-util = { version = "0.7.16", features = ["rt"] }
|
tokio-util = { version = "0.7.17", features = ["rt"] }
|
||||||
|
|
||||||
# Memory profiling
|
# Memory profiling
|
||||||
dhat = { version = "0.3.3", optional = true }
|
dhat = { version = "0.3.3", optional = true }
|
||||||
|
|||||||
@ -71,7 +71,7 @@ impl BlockBehaviour for JukeboxBlock {
|
|||||||
return BlockActionResult::Pass;
|
return BlockActionResult::Pass;
|
||||||
};
|
};
|
||||||
|
|
||||||
let Some(jukebox_song) = SYNCED_REGISTRIES.jukebox_song.get_index_of(song) else {
|
let Some(jukebox_song) = SYNCED_REGISTRIES.get_jukebox_song_index(song) else {
|
||||||
log::error!("Jukebox playable song not registered!");
|
log::error!("Jukebox playable song not registered!");
|
||||||
return BlockActionResult::Pass;
|
return BlockActionResult::Pass;
|
||||||
};
|
};
|
||||||
|
|||||||
@ -99,7 +99,7 @@ use pumpkin_world::chunk_system::ChunkLoading;
|
|||||||
const MAX_CACHED_SIGNATURES: u8 = 128; // Vanilla: 128
|
const MAX_CACHED_SIGNATURES: u8 = 128; // Vanilla: 128
|
||||||
const MAX_PREVIOUS_MESSAGES: u8 = 20; // Vanilla: 20
|
const MAX_PREVIOUS_MESSAGES: u8 = 20; // Vanilla: 20
|
||||||
|
|
||||||
pub const DATA_VERSION: i32 = 4554; // 1.21.9
|
pub const DATA_VERSION: i32 = 4556; // 1.21.10
|
||||||
|
|
||||||
enum BatchState {
|
enum BatchState {
|
||||||
Initial,
|
Initial,
|
||||||
|
|||||||
@ -9,11 +9,13 @@ use core::str;
|
|||||||
use pumpkin_config::{BASIC_CONFIG, advanced_config};
|
use pumpkin_config::{BASIC_CONFIG, advanced_config};
|
||||||
use pumpkin_protocol::{
|
use pumpkin_protocol::{
|
||||||
ConnectionState,
|
ConnectionState,
|
||||||
java::client::config::{CFinishConfig, CRegistryData},
|
java::{
|
||||||
java::server::config::{
|
client::config::{CFinishConfig, CRegistryData, CUpdateTags},
|
||||||
|
server::config::{
|
||||||
ResourcePackResponseResult, SClientInformationConfig, SConfigCookieResponse,
|
ResourcePackResponseResult, SClientInformationConfig, SConfigCookieResponse,
|
||||||
SConfigResourcePack, SKnownPacks, SPluginMessage,
|
SConfigResourcePack, SKnownPacks, SPluginMessage,
|
||||||
},
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
use pumpkin_util::{Hand, text::TextComponent};
|
use pumpkin_util::{Hand, text::TextComponent};
|
||||||
|
|
||||||
@ -153,6 +155,16 @@ impl JavaClient {
|
|||||||
))
|
))
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
self.send_packet_now(&CUpdateTags::new(&[
|
||||||
|
pumpkin_data::tag::RegistryKey::Block,
|
||||||
|
pumpkin_data::tag::RegistryKey::Fluid,
|
||||||
|
pumpkin_data::tag::RegistryKey::Enchantment,
|
||||||
|
pumpkin_data::tag::RegistryKey::WorldgenBiome,
|
||||||
|
pumpkin_data::tag::RegistryKey::Item,
|
||||||
|
pumpkin_data::tag::RegistryKey::EntityType,
|
||||||
|
pumpkin_data::tag::RegistryKey::Dialog,
|
||||||
|
]))
|
||||||
|
.await;
|
||||||
|
|
||||||
// We are done with configuring
|
// We are done with configuring
|
||||||
log::debug!("Finished config");
|
log::debug!("Finished config");
|
||||||
|
|||||||
@ -4,7 +4,7 @@ use pumpkin_config::{BASIC_CONFIG, advanced_config};
|
|||||||
use pumpkin_protocol::{
|
use pumpkin_protocol::{
|
||||||
ConnectionState, KnownPack, Label, Link, LinkType,
|
ConnectionState, KnownPack, Label, Link, LinkType,
|
||||||
java::client::{
|
java::client::{
|
||||||
config::{CConfigAddResourcePack, CConfigServerLinks, CKnownPacks, CUpdateTags},
|
config::{CConfigAddResourcePack, CConfigServerLinks, CKnownPacks},
|
||||||
login::{CLoginSuccess, CSetCompression},
|
login::{CLoginSuccess, CSetCompression},
|
||||||
},
|
},
|
||||||
java::server::login::{
|
java::server::login::{
|
||||||
@ -343,19 +343,6 @@ impl JavaClient {
|
|||||||
self.send_packet_now(&CConfigServerLinks::new(&LINKS)).await;
|
self.send_packet_now(&CConfigServerLinks::new(&LINKS)).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Send tags.
|
|
||||||
// TODO: Is this the right place to send them?
|
|
||||||
|
|
||||||
self.send_packet_now(&CUpdateTags::new(&[
|
|
||||||
pumpkin_data::tag::RegistryKey::Block,
|
|
||||||
pumpkin_data::tag::RegistryKey::Fluid,
|
|
||||||
pumpkin_data::tag::RegistryKey::Enchantment,
|
|
||||||
pumpkin_data::tag::RegistryKey::WorldgenBiome,
|
|
||||||
pumpkin_data::tag::RegistryKey::Item,
|
|
||||||
pumpkin_data::tag::RegistryKey::EntityType,
|
|
||||||
]))
|
|
||||||
.await;
|
|
||||||
|
|
||||||
let resource_config = &advanced_config().resource_pack;
|
let resource_config = &advanced_config().resource_pack;
|
||||||
if resource_config.enabled {
|
if resource_config.enabled {
|
||||||
let uuid = Uuid::new_v3(&uuid::Uuid::NAMESPACE_DNS, resource_config.url.as_bytes());
|
let uuid = Uuid::new_v3(&uuid::Uuid::NAMESPACE_DNS, resource_config.url.as_bytes());
|
||||||
@ -384,7 +371,7 @@ impl JavaClient {
|
|||||||
self.send_packet_now(&CKnownPacks::new(&[KnownPack {
|
self.send_packet_now(&CKnownPacks::new(&[KnownPack {
|
||||||
namespace: "minecraft",
|
namespace: "minecraft",
|
||||||
id: "core",
|
id: "core",
|
||||||
version: "1.21.9",
|
version: "1.21.10",
|
||||||
}]))
|
}]))
|
||||||
.await;
|
.await;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user