chore: decrease compile time

Instead of parsing pumpkin-data for everyone who compiles lets have it as static files, pumpkin-codegen is a standalone parser now
This commit is contained in:
Alexander Medvedev 2026-02-09 15:52:46 +01:00
parent 7e277c0bfb
commit f60a77c5d9
109 changed files with 956814 additions and 263 deletions

3
.gitignore vendored
View File

@ -134,9 +134,6 @@ run/
result result
result-* result-*
# Generated Data
pumpkin-data/src/generated
# Vanilla minecraft server # Vanilla minecraft server
banned-ips.json banned-ips.json
banned-players.json banned-players.json

28
Cargo.lock generated
View File

@ -2076,18 +2076,10 @@ version = "0.1.0-dev+1.21.11"
dependencies = [ dependencies = [
"crc-fast", "crc-fast",
"criterion", "criterion",
"heck",
"indexmap",
"phf", "phf",
"proc-macro2",
"pumpkin-nbt", "pumpkin-nbt",
"pumpkin-util", "pumpkin-util",
"quote",
"rayon",
"serde", "serde",
"serde_json",
"serde_json5",
"syn",
] ]
[[package]] [[package]]
@ -2258,26 +2250,6 @@ version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba" checksum = "0c8d0fd677905edcbeedbf2edb6494d676f0e98d54d5cf9bda0b061cb8fb8aba"
[[package]]
name = "rayon"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]] [[package]]
name = "redox_syscall" name = "redox_syscall"
version = "0.5.18" version = "0.5.18"

View File

@ -11,7 +11,7 @@ members = [
"pumpkin/", "pumpkin/",
"pumpkin-data", "pumpkin-data",
] ]
exclude = ["pumpkin-codegen"]
[workspace.lints.clippy] [workspace.lints.clippy]
# Groups # Groups
@ -140,7 +140,7 @@ phf = "0.13.1"
pkcs8 = "=0.11.0-rc.10" pkcs8 = "=0.11.0-rc.10"
proc-macro2 = "1.0" proc-macro2 = "1.0"
pumpkin-config = { path = "pumpkin-config" } pumpkin-config = { path = "pumpkin-config" }
pumpkin-data = { path = "pumpkin-data" } pumpkin-data = { path = "pumpkin-data", default-features = false }
pumpkin-inventory = { path = "pumpkin-inventory" } pumpkin-inventory = { path = "pumpkin-inventory" }
pumpkin-macros = { path = "pumpkin-macros" } pumpkin-macros = { path = "pumpkin-macros" }
pumpkin-nbt = { path = "pumpkin-nbt" } pumpkin-nbt = { path = "pumpkin-nbt" }

906
pumpkin-codegen/Cargo.lock generated Normal file
View File

@ -0,0 +1,906 @@
# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
version = 4
[[package]]
name = "adler2"
version = "2.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa"
[[package]]
name = "autocfg"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "base16ct"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c7f02d4ea65f2c1853089ffd8d2787bdbc63de2f0d29dedbcf8ccdfa0ccd4cf"
[[package]]
name = "base64"
version = "0.22.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6"
[[package]]
name = "base64ct"
version = "1.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2af50177e190e07a26ab74f8b1efbfe2ef87da2116221318cb1c2e82baf7de06"
[[package]]
name = "block-buffer"
version = "0.10.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71"
dependencies = [
"generic-array",
]
[[package]]
name = "bumpalo"
version = "3.19.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5dd9dc738b7a8311c7ade152424974d8115f2cdad61e8dab8dac9f2362298510"
[[package]]
name = "bytes"
version = "1.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1e748733b7cbc798e1434b6ac524f0c1ff2ab456fe201501e6497c8417a4fc33"
[[package]]
name = "cesu8"
version = "1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c"
[[package]]
name = "cfg-if"
version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "colored"
version = "3.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "faf9468729b8cbcea668e36183cb69d317348c2e08e994829fb56ebfdfbaac34"
dependencies = [
"windows-sys",
]
[[package]]
name = "const-oid"
version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8"
[[package]]
name = "cpufeatures"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280"
dependencies = [
"libc",
]
[[package]]
name = "crc32fast"
version = "1.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511"
dependencies = [
"cfg-if",
]
[[package]]
name = "crossbeam-deque"
version = "0.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51"
dependencies = [
"crossbeam-epoch",
"crossbeam-utils",
]
[[package]]
name = "crossbeam-epoch"
version = "0.9.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.21"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28"
[[package]]
name = "crypto-bigint"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0dc92fb57ca44df6db8059111ab3af99a63d5d0f8375d9972e319a379c6bab76"
dependencies = [
"generic-array",
"rand_core",
"subtle",
"zeroize",
]
[[package]]
name = "crypto-common"
version = "0.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3"
dependencies = [
"generic-array",
"typenum",
]
[[package]]
name = "der"
version = "0.7.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e7c1832837b905bbfb5101e07cc24c8deddf52f93225eee6ead5f4d63d53ddcb"
dependencies = [
"const-oid",
"pem-rfc7468",
"zeroize",
]
[[package]]
name = "digest"
version = "0.10.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292"
dependencies = [
"block-buffer",
"const-oid",
"crypto-common",
"subtle",
]
[[package]]
name = "ecdsa"
version = "0.16.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee27f32b5c5292967d2d4a9d7f1e0b0aed2c15daded5a60300e4abb9d8020bca"
dependencies = [
"der",
"digest",
"elliptic-curve",
"rfc6979",
"signature",
"spki",
]
[[package]]
name = "either"
version = "1.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719"
[[package]]
name = "elliptic-curve"
version = "0.13.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b5e6043086bf7973472e0c7dff2142ea0b680d30e18d9cc40f267efbf222bd47"
dependencies = [
"base16ct",
"crypto-bigint",
"digest",
"ff",
"generic-array",
"group",
"hkdf",
"pem-rfc7468",
"pkcs8",
"rand_core",
"sec1",
"subtle",
"zeroize",
]
[[package]]
name = "enum_dispatch"
version = "0.3.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "aa18ce2bc66555b3218614519ac839ddb759a7d6720732f979ef8d13be147ecd"
dependencies = [
"once_cell",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "equivalent"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
[[package]]
name = "ff"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c0b50bfb653653f9ca9095b427bed08ab8d75a137839d9ad64eb11810d5b6393"
dependencies = [
"rand_core",
"subtle",
]
[[package]]
name = "flate2"
version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
dependencies = [
"crc32fast",
"miniz_oxide",
]
[[package]]
name = "generic-array"
version = "0.14.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bb6743198531e02858aeaea5398fcc883e71851fcbcb5a2f773e2fb6cb1edf2"
dependencies = [
"typenum",
"version_check",
"zeroize",
]
[[package]]
name = "getrandom"
version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
dependencies = [
"cfg-if",
"libc",
"wasi",
]
[[package]]
name = "getrandom"
version = "0.3.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "899def5c37c4fd7b2664648c28120ecec138e4d395b459e5ca34f9cce2dd77fd"
dependencies = [
"cfg-if",
"libc",
"r-efi",
"wasip2",
]
[[package]]
name = "group"
version = "0.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0f9ef7462f7c099f518d754361858f86d8a07af53ba9af0fe635bbccb151a63"
dependencies = [
"ff",
"rand_core",
"subtle",
]
[[package]]
name = "hashbrown"
version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
[[package]]
name = "heck"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "hkdf"
version = "0.12.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5f8eb2ad728638ea2c7d47a21db23b7b58a72ed6a38256b8a1849f15fbbdf7"
dependencies = [
"hmac",
]
[[package]]
name = "hmac"
version = "0.12.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e"
dependencies = [
"digest",
]
[[package]]
name = "indexmap"
version = "2.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
dependencies = [
"equivalent",
"hashbrown",
"serde",
"serde_core",
]
[[package]]
name = "itoa"
version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "js-sys"
version = "0.3.85"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c942ebf8e95485ca0d52d97da7c5a2c387d0e7f0ba4c35e93bfcaee045955b3"
dependencies = [
"once_cell",
"wasm-bindgen",
]
[[package]]
name = "libc"
version = "0.2.180"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
[[package]]
name = "md-5"
version = "0.10.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf"
dependencies = [
"cfg-if",
"digest",
]
[[package]]
name = "md5"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae960838283323069879657ca3de837e9f7bbb4c7bf6ea7f1b290d5e9476d2e0"
[[package]]
name = "memchr"
version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
[[package]]
name = "miniz_oxide"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
dependencies = [
"adler2",
"simd-adler32",
]
[[package]]
name = "num-derive"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "num-traits"
version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
[[package]]
name = "once_cell"
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
[[package]]
name = "p384"
version = "0.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fe42f1670a52a47d448f14b6a5c61dd78fce51856e68edaa38f7ae3a46b8d6b6"
dependencies = [
"ecdsa",
"elliptic-curve",
"primeorder",
"sha2",
]
[[package]]
name = "pem-rfc7468"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "88b39c9bfcfc231068454382784bb460aae594343fb030d46e9f50a645418412"
dependencies = [
"base64ct",
]
[[package]]
name = "pest"
version = "2.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e0848c601009d37dfa3430c4666e147e49cdcf1b92ecd3e63657d8a5f19da662"
dependencies = [
"memchr",
"ucd-trie",
]
[[package]]
name = "pest_derive"
version = "2.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11f486f1ea21e6c10ed15d5a7c77165d0ee443402f0780849d1768e7d9d6fe77"
dependencies = [
"pest",
"pest_generator",
]
[[package]]
name = "pest_generator"
version = "2.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8040c4647b13b210a963c1ed407c1ff4fdfa01c31d6d2a098218702e6664f94f"
dependencies = [
"pest",
"pest_meta",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "pest_meta"
version = "2.8.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89815c69d36021a140146f26659a81d6c2afa33d216d736dd4be5381a7362220"
dependencies = [
"pest",
"sha2",
]
[[package]]
name = "pin-project-lite"
version = "0.2.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b"
[[package]]
name = "pkcs8"
version = "0.10.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f950b2377845cebe5cf8b5165cb3cc1a5e0fa5cfa3e1f7f55707d8fd82e0a7b7"
dependencies = [
"der",
"spki",
]
[[package]]
name = "primeorder"
version = "0.13.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "353e1ca18966c16d9deb1c69278edbc5f194139612772bd9537af60ac231e1e6"
dependencies = [
"elliptic-curve",
]
[[package]]
name = "proc-macro2"
version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [
"unicode-ident",
]
[[package]]
name = "pumpkin-codegen"
version = "0.1.0-dev+1.21.11"
dependencies = [
"heck",
"indexmap",
"proc-macro2",
"pumpkin-nbt",
"pumpkin-util",
"quote",
"rayon",
"serde",
"serde_json",
"serde_json5",
"syn",
]
[[package]]
name = "pumpkin-nbt"
version = "0.1.0-dev+1.21.11"
dependencies = [
"bytes",
"cesu8",
"flate2",
"serde",
"thiserror",
]
[[package]]
name = "pumpkin-util"
version = "0.1.0-dev+1.21.11"
dependencies = [
"base64",
"bytes",
"colored",
"ecdsa",
"enum_dispatch",
"md5",
"num-derive",
"num-traits",
"p384",
"proc-macro2",
"pumpkin-nbt",
"quote",
"serde",
"serde_json",
"syn",
"thiserror",
"tokio",
"uuid",
]
[[package]]
name = "quote"
version = "1.0.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
dependencies = [
"proc-macro2",
]
[[package]]
name = "r-efi"
version = "5.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f"
[[package]]
name = "rand_core"
version = "0.6.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
dependencies = [
"getrandom 0.2.17",
]
[[package]]
name = "rayon"
version = "1.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "368f01d005bf8fd9b1206fb6fa653e6c4a81ceb1466406b81792d87c5677a58f"
dependencies = [
"either",
"rayon-core",
]
[[package]]
name = "rayon-core"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "22e18b0f0062d30d4230b2e85ff77fdfe4326feb054b9783a3460d8435c8ab91"
dependencies = [
"crossbeam-deque",
"crossbeam-utils",
]
[[package]]
name = "rfc6979"
version = "0.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8dd2a808d456c4a54e300a23e9f5a67e122c3024119acbfd73e3bf664491cb2"
dependencies = [
"hmac",
"subtle",
]
[[package]]
name = "rustversion"
version = "1.0.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
[[package]]
name = "sec1"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d3e97a565f76233a6003f9f5c54be1d9c5bdfa3eccfb189469f11ec4901c47dc"
dependencies = [
"base16ct",
"der",
"generic-array",
"pkcs8",
"subtle",
"zeroize",
]
[[package]]
name = "serde"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
"serde_derive",
]
[[package]]
name = "serde_core"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "serde_json"
version = "1.0.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
dependencies = [
"itoa",
"memchr",
"serde",
"serde_core",
"zmij",
]
[[package]]
name = "serde_json5"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d34d03f54462862f2a42918391c9526337f53171eaa4d8894562be7f252edd3"
dependencies = [
"pest",
"pest_derive",
"serde",
]
[[package]]
name = "sha2"
version = "0.10.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a7507d819769d01a365ab707794a4084392c824f54a7a6a7862f8c3d0892b283"
dependencies = [
"cfg-if",
"cpufeatures",
"digest",
]
[[package]]
name = "signature"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de"
dependencies = [
"digest",
"rand_core",
]
[[package]]
name = "simd-adler32"
version = "0.3.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
[[package]]
name = "spki"
version = "0.7.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d"
dependencies = [
"base64ct",
"der",
]
[[package]]
name = "subtle"
version = "2.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292"
[[package]]
name = "syn"
version = "2.0.114"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d4d107df263a3013ef9b1879b0df87d706ff80f65a86ea879bd9c31f9b307c2a"
dependencies = [
"proc-macro2",
"quote",
"unicode-ident",
]
[[package]]
name = "thiserror"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [
"thiserror-impl",
]
[[package]]
name = "thiserror-impl"
version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
dependencies = [
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "tokio"
version = "1.49.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72a2903cd7736441aac9df9d7688bd0ce48edccaadf181c3b90be801e81d3d86"
dependencies = [
"pin-project-lite",
]
[[package]]
name = "typenum"
version = "1.19.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "562d481066bde0658276a35467c4af00bdc6ee726305698a55b86e61d7ad82bb"
[[package]]
name = "ucd-trie"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2896d95c02a80c6d6a5d6e953d479f5ddf2dfdb6a244441010e373ac0fb88971"
[[package]]
name = "unicode-ident"
version = "1.0.23"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "537dd038a89878be9b64dd4bd1b260315c1bb94f4d784956b81e27a088d9a09e"
[[package]]
name = "uuid"
version = "1.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ee48d38b119b0cd71fe4141b30f5ba9c7c5d9f4e7a3a8b4a674e4b6ef789976f"
dependencies = [
"getrandom 0.3.4",
"js-sys",
"md-5",
"serde_core",
"wasm-bindgen",
]
[[package]]
name = "version_check"
version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a"
[[package]]
name = "wasi"
version = "0.11.1+wasi-snapshot-preview1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "wasip2"
version = "1.0.2+wasi-0.2.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
dependencies = [
"wit-bindgen",
]
[[package]]
name = "wasm-bindgen"
version = "0.2.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64024a30ec1e37399cf85a7ffefebdb72205ca1c972291c51512360d90bd8566"
dependencies = [
"cfg-if",
"once_cell",
"rustversion",
"wasm-bindgen-macro",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-macro"
version = "0.2.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "008b239d9c740232e71bd39e8ef6429d27097518b6b30bdf9086833bd5b6d608"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
]
[[package]]
name = "wasm-bindgen-macro-support"
version = "0.2.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5256bae2d58f54820e6490f9839c49780dff84c65aeab9e772f15d5f0e913a55"
dependencies = [
"bumpalo",
"proc-macro2",
"quote",
"syn",
"wasm-bindgen-shared",
]
[[package]]
name = "wasm-bindgen-shared"
version = "0.2.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f01b580c9ac74c8d8f0c0e4afb04eeef2acf145458e52c03845ee9cd23e3d12"
dependencies = [
"unicode-ident",
]
[[package]]
name = "windows-link"
version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-sys"
version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
"windows-link",
]
[[package]]
name = "wit-bindgen"
version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
[[package]]
name = "zeroize"
version = "1.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b97154e67e32c85465826e8bcc1c59429aaaf107c1e4a9e53c8d8ccd5eff88d0"
[[package]]
name = "zmij"
version = "1.0.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4de98dfa5d5b7fef4ee834d0073d560c9ca7b6c46a71d058c48db7960f8cfaf7"

View File

@ -0,0 +1,28 @@
[package]
name = "pumpkin-codegen"
version = "0.1.0-dev+1.21.11"
edition = "2024"
rust-version = "1.89"
[dependencies]
indexmap = { version = "2.7", features = ["serde"] }
heck = "0.5"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_json5 = "0.2"
rayon = "1.11.0"
proc-macro2 = "1.0"
quote = "1.0"
syn = { version = "2.0", features = ["full", "extra-traits"] }
pumpkin-util = { path = "../pumpkin-util" }
pumpkin-nbt = { path = "../pumpkin-nbt" }
# [lints]
# all = { level = "deny", priority = -1 }
# nursery = { level = "deny", priority = -1 }
# pedantic = { level = "deny", priority = -1 }
# cargo = { level = "deny", priority = -1 }

View File

@ -0,0 +1,3 @@
disallowed-types = [
{ path = "std::collections::HashMap", reason = "If you need a map, use BTreeMap for deterministic ordering. Otherwise it forces a rebuild after every change.", replacement = "std::collections::BTreeMap" },
]

View File

@ -13,8 +13,6 @@ struct Attributes {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/attributes.json");
let attributes: BTreeMap<String, Attributes> = let attributes: BTreeMap<String, Attributes> =
serde_json::from_str(&fs::read_to_string("../assets/attributes.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/attributes.json").unwrap())
.expect("Failed to parse attributes.json"); .expect("Failed to parse attributes.json");

View File

@ -158,9 +158,6 @@ struct MultiNoiseBiomeSuppliers {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/biome.json");
println!("cargo:rerun-if-changed=../assets/multi_noise_biome_tree.json");
let biomes: BTreeMap<String, Biome> = let biomes: BTreeMap<String, Biome> =
serde_json::from_str(&fs::read_to_string("../assets/biome.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/biome.json").unwrap())
.expect("Failed to parse biome.json"); .expect("Failed to parse biome.json");

View File

@ -366,12 +366,12 @@ impl ToTokens for FlammableStruct {
} }
#[derive(Deserialize, Clone, Copy)] #[derive(Deserialize, Clone, Copy)]
pub struct CollisionShape { pub struct BoundingBox {
pub min: Vector3<f64>, pub min: Vector3<f64>,
pub max: Vector3<f64>, pub max: Vector3<f64>,
} }
impl ToTokens for CollisionShape { impl ToTokens for BoundingBox {
fn to_tokens(&self, tokens: &mut TokenStream) { fn to_tokens(&self, tokens: &mut TokenStream) {
let min_x = &self.min.x; let min_x = &self.min.x;
let min_y = &self.min.y; let min_y = &self.min.y;
@ -382,7 +382,7 @@ impl ToTokens for CollisionShape {
let max_z = &self.max.z; let max_z = &self.max.z;
tokens.extend(quote! { tokens.extend(quote! {
CollisionShape { BoundingBox {
min: Vector3::new(#min_x, #min_y, #min_z), min: Vector3::new(#min_x, #min_y, #min_z),
max: Vector3::new(#max_x, #max_y, #max_z), max: Vector3::new(#max_x, #max_y, #max_z),
} }
@ -630,15 +630,11 @@ struct Property {
#[derive(Deserialize)] #[derive(Deserialize)]
pub struct BlockAssets { pub struct BlockAssets {
pub blocks: Vec<Block>, pub blocks: Vec<Block>,
pub shapes: Vec<CollisionShape>, pub shapes: Vec<BoundingBox>,
pub block_entity_types: Vec<String>, pub block_entity_types: Vec<String>,
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/blocks.json");
println!("cargo:rerun-if-changed=../assets/bedrock_block_states.nbt");
println!("cargo:rerun-if-changed=../assets/properties.json");
let be_blocks_data = fs::read("../assets/bedrock_block_states.nbt").unwrap(); let be_blocks_data = fs::read("../assets/bedrock_block_states.nbt").unwrap();
let mut be_blocks_cursor = Cursor::new(be_blocks_data); let mut be_blocks_cursor = Cursor::new(be_blocks_data);
let be_blocks = get_be_data_from_nbt(&mut be_blocks_cursor); let be_blocks = get_be_data_from_nbt(&mut be_blocks_cursor);
@ -912,7 +908,9 @@ pub fn build() -> TokenStream {
); );
quote! { quote! {
use crate::{BlockState, Block, CollisionShape, blocks::Flammable}; use pumpkin_util::math::boundingbox::BoundingBox;
use crate::{BlockState, Block, blocks::Flammable};
use crate::block_state::PistonBehavior; use crate::block_state::PistonBehavior;
use pumpkin_util::math::int_provider::{UniformIntProvider, IntProvider, NormalIntProvider}; use pumpkin_util::math::int_provider::{UniformIntProvider, IntProvider, NormalIntProvider};
use pumpkin_util::loot_table::*; use pumpkin_util::loot_table::*;
@ -948,7 +946,7 @@ pub fn build() -> TokenStream {
fn from_value(value: &str) -> Self; fn from_value(value: &str) -> Self;
} }
pub const COLLISION_SHAPES: &[CollisionShape] = &[ pub const COLLISION_SHAPES: &[BoundingBox] = &[
#(#shapes),* #(#shapes),*
]; ];

View File

@ -157,9 +157,6 @@ fn compose(first: &[u16], second: &[u16]) -> Vec<u16> {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/viaversion/data/mappings-1.21.7to1.21.9.nbt");
println!("cargo:rerun-if-changed=../assets/viaversion/data/mappings-1.21.9to1.21.11.nbt");
let mappings_7_to_9 = let mappings_7_to_9 =
parse_mapping_file("../assets/viaversion/data/mappings-1.21.7to1.21.9.nbt"); parse_mapping_file("../assets/viaversion/data/mappings-1.21.7to1.21.9.nbt");
let mappings_9_to_11 = let mappings_9_to_11 =

View File

@ -346,8 +346,6 @@ impl ToTokens for MaterialRuleStruct {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/chunk_gen_settings.json");
let json: BTreeMap<String, GenerationSettingsStruct> = let json: BTreeMap<String, GenerationSettingsStruct> =
serde_json::from_str(&fs::read_to_string("../assets/chunk_gen_settings.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/chunk_gen_settings.json").unwrap())
.expect("Failed to parse settings.json"); .expect("Failed to parse settings.json");

View File

@ -5,8 +5,6 @@ use proc_macro2::TokenStream;
use quote::{format_ident, quote}; use quote::{format_ident, quote};
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/chunk_status.json");
let chunk_status: Vec<String> = let chunk_status: Vec<String> =
serde_json::from_str(&fs::read_to_string("../assets/chunk_status.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/chunk_status.json").unwrap())
.expect("Failed to parse chunk_status.json"); .expect("Failed to parse chunk_status.json");

View File

@ -5,8 +5,6 @@ use quote::quote;
use syn::LitInt; use syn::LitInt;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/composter_increase_chance.json");
let composter_increase_chance: BTreeMap<u16, f32> = serde_json::from_str( let composter_increase_chance: BTreeMap<u16, f32> = serde_json::from_str(
&fs::read_to_string("../assets/composter_increase_chance.json").unwrap(), &fs::read_to_string("../assets/composter_increase_chance.json").unwrap(),
) )

View File

@ -48,8 +48,6 @@ pub enum DeathMessageType {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/damage_type.json");
let damage_types: BTreeMap<String, DamageTypeEntry> = let damage_types: BTreeMap<String, DamageTypeEntry> =
serde_json::from_str(&fs::read_to_string("../assets/damage_type.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/damage_type.json").unwrap())
.expect("Failed to parse damage_type.json"); .expect("Failed to parse damage_type.json");

View File

@ -5,8 +5,6 @@ use std::collections::BTreeMap;
use std::fs; use std::fs;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/data_component.json");
let data_component: BTreeMap<String, u8> = let data_component: BTreeMap<String, u8> =
serde_json::from_str(&fs::read_to_string("../assets/data_component.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/data_component.json").unwrap())
.expect("Failed to parse data_component.json"); .expect("Failed to parse data_component.json");

View File

@ -40,8 +40,6 @@ pub struct Dimension {
// } // }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/dimension.json");
let dimensions: BTreeMap<String, Dimension> = serde_json::from_str( let dimensions: BTreeMap<String, Dimension> = serde_json::from_str(
&fs::read_to_string("../assets/dimension.json").expect("Missing dimension.json"), &fs::read_to_string("../assets/dimension.json").expect("Missing dimension.json"),
) )

View File

@ -59,8 +59,6 @@ impl MobEffectCategory {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/effect.json");
let effects: BTreeMap<String, Effect> = let effects: BTreeMap<String, Effect> =
serde_json::from_str(&fs::read_to_string("../assets/effect.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/effect.json").unwrap())
.expect("Failed to parse effect.json"); .expect("Failed to parse effect.json");

View File

@ -53,8 +53,6 @@ impl AttributeModifierSlot {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/enchantments.json");
let enchantments: BTreeMap<String, Enchantment> = let enchantments: BTreeMap<String, Enchantment> =
serde_json::from_str(&fs::read_to_string("../assets/enchantments.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/enchantments.json").unwrap())
.expect("Failed to parse enchantments.json"); .expect("Failed to parse enchantments.json");

View File

@ -6,8 +6,6 @@ use quote::quote;
use crate::array_to_tokenstream; use crate::array_to_tokenstream;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/entity_pose.json");
let poses: Vec<String> = let poses: Vec<String> =
serde_json::from_str(&fs::read_to_string("../assets/entity_pose.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/entity_pose.json").unwrap())
.expect("Failed to parse entity_pose.json"); .expect("Failed to parse entity_pose.json");

View File

@ -6,8 +6,6 @@ use quote::{format_ident, quote};
use syn::LitInt; use syn::LitInt;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/entity_statuses.json");
let events: BTreeMap<String, u8> = let events: BTreeMap<String, u8> =
serde_json::from_str(&fs::read_to_string("../assets/entity_statuses.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/entity_statuses.json").unwrap())
.expect("Failed to parse entity_statuses.json"); .expect("Failed to parse entity_statuses.json");

View File

@ -158,8 +158,6 @@ impl ToTokens for NamedEntityType<'_> {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/entities.json");
let json: BTreeMap<String, EntityType> = let json: BTreeMap<String, EntityType> =
serde_json::from_str(&fs::read_to_string("../assets/entities.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/entities.json").unwrap())
.expect("Failed to parse entities.json"); .expect("Failed to parse entities.json");

View File

@ -3,8 +3,6 @@ use quote::quote;
use std::{collections::BTreeMap, fs}; use std::{collections::BTreeMap, fs};
use syn::LitInt; use syn::LitInt;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/flower_pot_transformations.json");
let flower_pot_transformation: BTreeMap<u16, u16> = serde_json::from_str( let flower_pot_transformation: BTreeMap<u16, u16> = serde_json::from_str(
&fs::read_to_string("../assets/flower_pot_transformations.json").unwrap(), &fs::read_to_string("../assets/flower_pot_transformations.json").unwrap(),
) )

View File

@ -339,8 +339,6 @@ const fn default_flow_distance() -> u32 {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/fluids.json");
let fluids: Vec<Fluid> = let fluids: Vec<Fluid> =
match serde_json::from_str(&fs::read_to_string("../assets/fluids.json").unwrap()) { match serde_json::from_str(&fs::read_to_string("../assets/fluids.json").unwrap()) {
Ok(fluids) => fluids, Ok(fluids) => fluids,

View File

@ -2,8 +2,6 @@ use proc_macro2::TokenStream;
use quote::quote; use quote::quote;
use std::{collections::BTreeMap, fs}; use std::{collections::BTreeMap, fs};
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/fuels.json");
let fuels: BTreeMap<u16, u16> = let fuels: BTreeMap<u16, u16> =
serde_json::from_str(&fs::read_to_string("../assets/fuels.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/fuels.json").unwrap())
.expect("Failed to parse fuels.json"); .expect("Failed to parse fuels.json");

View File

@ -6,8 +6,6 @@ use quote::quote;
use crate::array_to_tokenstream; use crate::array_to_tokenstream;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/game_event.json");
let game_events: Vec<String> = let game_events: Vec<String> =
serde_json::from_str(&fs::read_to_string("../assets/game_event.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/game_event.json").unwrap())
.expect("Failed to parse game_event.json"); .expect("Failed to parse game_event.json");

View File

@ -6,8 +6,6 @@ use quote::{format_ident, quote};
use serde_json::Value; use serde_json::Value;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/game_rules.json");
let game_rules: BTreeMap<String, Value> = let game_rules: BTreeMap<String, Value> =
serde_json::from_str(&fs::read_to_string("../assets/game_rules.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/game_rules.json").unwrap())
.expect("Failed to parse game_rules.json"); .expect("Failed to parse game_rules.json");

View File

@ -439,8 +439,6 @@ pub enum Operation {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/items.json");
let items: BTreeMap<String, Item> = let items: BTreeMap<String, Item> =
serde_json::from_str(&fs::read_to_string("../assets/items.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/items.json").unwrap())
.expect("Failed to parse items.json"); .expect("Failed to parse items.json");

View File

@ -179,9 +179,6 @@ fn compose_with_default(first: &[u16], second: &[u16]) -> Vec<u16> {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/viaversion/data/mappings-1.21.7to1.21.9.nbt");
println!("cargo:rerun-if-changed=../assets/viaversion/data/mappings-1.21.9to1.21.11.nbt");
let mappings_7_to_9 = parse_mapping_file( let mappings_7_to_9 = parse_mapping_file(
"../assets/viaversion/data/mappings-1.21.7to1.21.9.nbt", "../assets/viaversion/data/mappings-1.21.7to1.21.9.nbt",
"items", "items",

View File

@ -13,9 +13,6 @@ struct JukeboxSongData {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/jukebox_song.json");
println!("cargo:rerun-if-changed=../assets/registry/1_21_11_synced_registries.json");
let songs: BTreeMap<String, u32> = serde_json::from_str( let songs: BTreeMap<String, u32> = serde_json::from_str(
&fs::read_to_string("../assets/jukebox_song.json").expect("Missing jukebox_song.json"), &fs::read_to_string("../assets/jukebox_song.json").expect("Missing jukebox_song.json"),
) )

View File

@ -56,7 +56,7 @@ mod tracked_data;
mod translations; mod translations;
mod world_event; mod world_event;
pub const OUT_DIR: &str = "src/generated"; pub const OUT_DIR: &str = "../pumpkin-data/src/generated";
pub fn main() { pub fn main() {
type BuilderFn = fn() -> TokenStream; type BuilderFn = fn() -> TokenStream;
@ -117,6 +117,8 @@ pub fn main() {
]; ];
build_functions.par_iter().for_each(|(build_fn, file)| { build_functions.par_iter().for_each(|(build_fn, file)| {
println!("Parsing {}", file);
let raw_code = build_fn().to_string(); let raw_code = build_fn().to_string();
let header = "/* This file is generated. Do not edit manually. */\n"; let header = "/* This file is generated. Do not edit manually. */\n";
@ -128,6 +130,7 @@ pub fn main() {
write_generated_file(&final_code, file); write_generated_file(&final_code, file);
}); });
println!("Done")
} }
#[must_use] #[must_use]

View File

@ -25,8 +25,6 @@ pub struct RawChatType {
// } // }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/message_type.json");
let json: BTreeMap<String, RawChatType> = let json: BTreeMap<String, RawChatType> =
serde_json::from_str(&fs::read_to_string("../assets/message_type.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/message_type.json").unwrap())
.expect("Failed to parse message_type.json"); .expect("Failed to parse message_type.json");

View File

@ -5,8 +5,6 @@ use proc_macro2::TokenStream;
use quote::{format_ident, quote}; use quote::{format_ident, quote};
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/meta_data_type.json");
let handlers_map: BTreeMap<String, i32> = let handlers_map: BTreeMap<String, i32> =
serde_json::from_str(&fs::read_to_string("../assets/meta_data_type.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/meta_data_type.json").unwrap())
.expect("Failed to parse meta_data_type.json"); .expect("Failed to parse meta_data_type.json");

View File

@ -5,8 +5,6 @@ use pumpkin_util::DoublePerlinNoiseParametersCodec;
use quote::{format_ident, quote}; use quote::{format_ident, quote};
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/noise_parameters.json");
let json: BTreeMap<String, DoublePerlinNoiseParametersCodec> = let json: BTreeMap<String, DoublePerlinNoiseParametersCodec> =
serde_json::from_str(&fs::read_to_string("../assets/noise_parameters.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/noise_parameters.json").unwrap())
.expect("Failed to parse noise_parameters.json"); .expect("Failed to parse noise_parameters.json");

View File

@ -997,8 +997,6 @@ macro_rules! fix_final_density {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/density_function.json");
let mut reprs: NoiseRouterReprs = let mut reprs: NoiseRouterReprs =
serde_json5::from_str(&fs::read_to_string("../assets/density_function.json").unwrap()) serde_json5::from_str(&fs::read_to_string("../assets/density_function.json").unwrap())
.expect("could not deserialize density_function.json"); .expect("could not deserialize density_function.json");

View File

@ -11,9 +11,6 @@ pub struct Packets {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/packet/1_21_7_packets.json");
println!("cargo:rerun-if-changed=../assets/packet/1_21_11_packets.json");
// 2. Parse the protocol files // 2. Parse the protocol files
let packets_7: Packets = serde_json::from_str( let packets_7: Packets = serde_json::from_str(
&fs::read_to_string("../assets/packet/1_21_7_packets.json").expect("1.21.7 file missing"), &fs::read_to_string("../assets/packet/1_21_7_packets.json").expect("1.21.7 file missing"),

View File

@ -7,8 +7,6 @@ use quote::{format_ident, quote};
use crate::array_to_tokenstream; use crate::array_to_tokenstream;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/particles.json");
let particle: Vec<String> = let particle: Vec<String> =
serde_json::from_str(&fs::read_to_string("../assets/particles.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/particles.json").unwrap())
.expect("Failed to parse particles.json"); .expect("Failed to parse particles.json");

View File

@ -50,8 +50,6 @@ impl Effect {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/potion.json");
let potions: BTreeMap<String, Potion> = let potions: BTreeMap<String, Potion> =
serde_json::from_str(&fs::read_to_string("../assets/potion.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/potion.json").unwrap())
.expect("Failed to parse potion.json"); .expect("Failed to parse potion.json");

View File

@ -72,8 +72,6 @@ impl Recipes {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/potion_brewing.json");
let json: PotionBrewing = let json: PotionBrewing =
serde_json::from_str(&fs::read_to_string("../assets/potion_brewing.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/potion_brewing.json").unwrap())
.expect("Failed to parse potion_brewing.json"); .expect("Failed to parse potion_brewing.json");

View File

@ -3,8 +3,6 @@ use quote::quote;
use std::{collections::BTreeMap, fs}; use std::{collections::BTreeMap, fs};
use syn::LitInt; use syn::LitInt;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/recipe_remainder.json");
let remainder: BTreeMap<u16, u16> = let remainder: BTreeMap<u16, u16> =
serde_json::from_str(&fs::read_to_string("../assets/recipe_remainder.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/recipe_remainder.json").unwrap())
.expect("Failed to parse recipe_remainder.json"); .expect("Failed to parse recipe_remainder.json");

View File

@ -367,8 +367,6 @@ impl ToTokens for RecipeCategoryTypes {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/recipes.json");
let recipes_assets: Vec<RecipeTypes> = let recipes_assets: Vec<RecipeTypes> =
serde_json::from_str(&fs::read_to_string("../assets/recipes.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/recipes.json").unwrap())
.expect("Failed to parse recipes.json"); .expect("Failed to parse recipes.json");
@ -586,20 +584,19 @@ pub fn build() -> TokenStream {
]; ];
pub fn get_cooking_recipe_with_ingredient(ingredient: &Item, recipe_type: CookingRecipeKind) -> Option<&'static CookingRecipe> { pub fn get_cooking_recipe_with_ingredient(ingredient: &Item, recipe_type: CookingRecipeKind) -> Option<&'static CookingRecipe> {
RECIPES_COOKING.iter().find_map(|recipe| { RECIPES_COOKING
match (recipe, &recipe_type) { .iter()
(CookingRecipeType::Blasting(cooking_recipe), CookingRecipeKind::Blasting) | .find_map(|recipe| match (recipe, &recipe_type) {
(CookingRecipeType::Smelting(cooking_recipe), CookingRecipeKind::Smelting) | (CookingRecipeType::Blasting(cooking_recipe), CookingRecipeKind::Blasting)
(CookingRecipeType::Smoking(cooking_recipe), CookingRecipeKind::Smoking) | | (CookingRecipeType::Smelting(cooking_recipe), CookingRecipeKind::Smelting)
(CookingRecipeType::CampfireCooking(cooking_recipe), CookingRecipeKind::CampfireCooking) => { | (CookingRecipeType::Smoking(cooking_recipe), CookingRecipeKind::Smoking)
if cooking_recipe.ingredient.match_item(ingredient) { | (
Some(cooking_recipe) CookingRecipeType::CampfireCooking(cooking_recipe),
} else { CookingRecipeKind::CampfireCooking,
None ) => {
} cooking_recipe.ingredient.match_item(ingredient).then_some(cooking_recipe)
}
_ => None
} }
_ => None,
}) })
} }
@ -614,11 +611,7 @@ pub fn build() -> TokenStream {
| CookingRecipeType::Smoking(r) | CookingRecipeType::Smoking(r)
| CookingRecipeType::CampfireCooking(r) => r, | CookingRecipeType::CampfireCooking(r) => r,
}; };
if cooking_recipe.recipe_id == recipe_id { (cooking_recipe.recipe_id == recipe_id).then_some(cooking_recipe.experience)
Some(cooking_recipe.experience)
} else {
None
}
}) })
} }
} }

View File

@ -5,9 +5,6 @@ use serde_json::Value;
use std::fs; use std::fs;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/registry/1_21_9_synced_registries.json");
println!("cargo:rerun-if-changed=../assets/registry/1_21_11_synced_registries.json");
let process_version = |path: &str| -> TokenStream { let process_version = |path: &str| -> TokenStream {
let json_str = fs::read_to_string(path).unwrap_or_else(|_| panic!("Failed to read {path}")); let json_str = fs::read_to_string(path).unwrap_or_else(|_| panic!("Failed to read {path}"));
let mut data: IndexMap<String, IndexMap<String, Value>> = let mut data: IndexMap<String, IndexMap<String, Value>> =

View File

@ -6,8 +6,6 @@ use quote::quote;
use crate::array_to_tokenstream; use crate::array_to_tokenstream;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/scoreboard_display_slot.json");
let sound_categories: Vec<String> = serde_json::from_str( let sound_categories: Vec<String> = serde_json::from_str(
&fs::read_to_string("../assets/scoreboard_display_slot.json").unwrap(), &fs::read_to_string("../assets/scoreboard_display_slot.json").unwrap(),
) )

View File

@ -6,8 +6,6 @@ use quote::quote;
use crate::array_to_tokenstream; use crate::array_to_tokenstream;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/screens.json");
let screens: Vec<String> = let screens: Vec<String> =
serde_json::from_str(&fs::read_to_string("../assets/screens.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/screens.json").unwrap())
.expect("Failed to parse screens.json"); .expect("Failed to parse screens.json");

View File

@ -7,8 +7,6 @@ use quote::{format_ident, quote};
use crate::array_to_tokenstream; use crate::array_to_tokenstream;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/sounds.json");
let mut sound: Vec<String> = let mut sound: Vec<String> =
serde_json::from_str(&fs::read_to_string("../assets/sounds.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/sounds.json").unwrap())
.expect("Failed to parse sounds.json"); .expect("Failed to parse sounds.json");

View File

@ -7,8 +7,6 @@ use quote::{format_ident, quote};
use crate::array_to_tokenstream; use crate::array_to_tokenstream;
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/sound_category.json");
let sound_categories: Vec<String> = let sound_categories: Vec<String> =
serde_json::from_str(&fs::read_to_string("../assets/sound_category.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/sound_category.json").unwrap())
.expect("Failed to parse sound_category.json"); .expect("Failed to parse sound_category.json");

View File

@ -5,8 +5,6 @@ use proc_macro2::TokenStream;
use quote::{format_ident, quote}; use quote::{format_ident, quote};
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/spawn_egg.json");
let eggs: BTreeMap<u16, String> = let eggs: BTreeMap<u16, String> =
serde_json::from_str(&fs::read_to_string("../assets/spawn_egg.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/spawn_egg.json").unwrap())
.expect("Failed to parse spawn_egg.json"); .expect("Failed to parse spawn_egg.json");

View File

@ -241,9 +241,6 @@ fn generation_step_to_token(step: &str) -> TokenStream {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/structures.json");
println!("cargo:rerun-if-changed=../assets/structure_set.json");
let structures_json: BTreeMap<String, StructureStruct> = let structures_json: BTreeMap<String, StructureStruct> =
serde_json::from_str(&fs::read_to_string("../assets/structures.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/structures.json").unwrap())
.expect("Failed to parse structures.json"); .expect("Failed to parse structures.json");

View File

@ -64,18 +64,6 @@ impl ToTokens for EnumCreator {
} }
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
// --- Rerun Triggers ---
println!("cargo:rerun-if-changed=../assets/blocks.json");
println!("cargo:rerun-if-changed=../assets/items.json");
println!("cargo:rerun-if-changed=../assets/biome.json");
println!("cargo:rerun-if-changed=../assets/fluids.json");
println!("cargo:rerun-if-changed=../assets/entities.json");
// Watch specific tag versions
println!("cargo:rerun-if-changed=../assets/tags/1_21_11_tags.json");
println!("cargo:rerun-if-changed=../assets/tags/1_21_9_tags.json");
// --- Load Global Assets ---
let blocks_assets: BlockAssets = let blocks_assets: BlockAssets =
serde_json::from_str(&fs::read_to_string("../assets/blocks.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/blocks.json").unwrap())
.expect("Failed to parse blocks.json"); .expect("Failed to parse blocks.json");

View File

@ -3,9 +3,6 @@ use quote::{format_ident, quote};
use std::{collections::BTreeMap, fs}; use std::{collections::BTreeMap, fs};
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/tracked_data/1_21_7_tracked_data.json");
println!("cargo:rerun-if-changed=../assets/tracked_data/1_21_11_tracked_data.json");
let data_7: BTreeMap<String, u8> = serde_json::from_str( let data_7: BTreeMap<String, u8> = serde_json::from_str(
&fs::read_to_string("../assets/tracked_data/1_21_7_tracked_data.json") &fs::read_to_string("../assets/tracked_data/1_21_7_tracked_data.json")
.expect("1.21.7 data missing"), .expect("1.21.7 data missing"),

View File

@ -3,8 +3,6 @@ use quote::{format_ident, quote};
use std::{collections::BTreeMap, fs}; use std::{collections::BTreeMap, fs};
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/en_us.json");
let en_us: BTreeMap<String, String> = serde_json::from_str( let en_us: BTreeMap<String, String> = serde_json::from_str(
&fs::read_to_string("../assets/en_us.json").expect("en_us is missing"), &fs::read_to_string("../assets/en_us.json").expect("en_us is missing"),
) )

View File

@ -5,8 +5,6 @@ use proc_macro2::TokenStream;
use quote::{format_ident, quote}; use quote::{format_ident, quote};
pub fn build() -> TokenStream { pub fn build() -> TokenStream {
println!("cargo:rerun-if-changed=../assets/world_event.json");
let events: BTreeMap<String, u16> = let events: BTreeMap<String, u16> =
serde_json::from_str(&fs::read_to_string("../assets/world_event.json").unwrap()) serde_json::from_str(&fs::read_to_string("../assets/world_event.json").unwrap())
.expect("Failed to parse world_event.json"); .expect("Failed to parse world_event.json");

View File

@ -3,33 +3,99 @@ name = "pumpkin-data"
version.workspace = true version.workspace = true
edition.workspace = true edition.workspace = true
rust-version.workspace = true rust-version.workspace = true
build = "build/build.rs"
[features]
default = [
"item",
"packet",
"jukebox_song",
"translation",
"registry",
"screen",
"particle",
"sound",
"recipes",
"data_component",
"attributes",
"tracked_data",
"meta_data_type",
"chunk",
"game_event",
"game_rules",
"entity",
"dimension",
"enchantment",
"world",
"scoreboard",
"damage",
"fluid",
"block",
"tag",
"noise_router",
"composter",
"flower_pot",
"fuels",
"effect",
"structures",
"potion",
"recipe_remainder",
"chunk_gen_settings",
]
item = []
packet = []
jukebox_song = []
translation = []
registry = []
screen = []
particle = []
sound = []
recipes = []
data_component = []
attributes = []
tracked_data = []
meta_data_type = []
chunk = ["noise_parameter", "biome", "chunk_status"]
game_event = []
game_rules = []
entity = ["entity_pose", "entity_status", "entity_type", "spawn_egg"]
dimension = []
enchantment = []
world = ["world_event", "message_type"]
scoreboard = []
damage = []
fluid = []
tag = []
noise_router = []
composter = []
flower_pot = []
fuels = []
effect = []
structures = []
potion = ["potion_brewing"]
recipe_remainder = []
chunk_gen_settings = []
noise_parameter = []
biome = []
chunk_status = []
entity_pose = []
entity_status = []
entity_type = []
spawn_egg = []
world_event = []
message_type = []
block = []
item_id_remap = []
potion_brewing = []
[dependencies] [dependencies]
phf = { workspace = true, features = ["macros"] } phf = { workspace = true, features = ["macros"] }
pumpkin-util.workspace = true pumpkin-util.workspace = true
pumpkin-nbt.workspace = true pumpkin-nbt.workspace = true
serde.workspace = true serde.workspace = true
crc-fast.workspace = true crc-fast.workspace = true
[build-dependencies]
indexmap = { workspace = true, features = ["serde"] }
pumpkin-util.workspace = true
pumpkin-nbt.workspace = true
serde.workspace = true
serde_json.workspace = true
serde_json5.workspace = true
heck.workspace = true
proc-macro2.workspace = true
quote.workspace = true
syn.workspace = true
rayon.workspace = true
[dev-dependencies] [dev-dependencies]
criterion.workspace = true criterion.workspace = true
@ -37,9 +103,8 @@ criterion.workspace = true
name = "has_random_ticks" name = "has_random_ticks"
harness = false harness = false
# Generated files generate a lot of warns
# [lints]
# workspace = true
[package.metadata.cargo-machete] [package.metadata.cargo-machete]
ignored = ["phf"] ignored = ["phf"]
# [lints]
# workspace = true

View File

@ -1,7 +1,8 @@
use pumpkin_util::math::boundingbox::BoundingBox;
use pumpkin_util::math::vector3::Vector3; use pumpkin_util::math::vector3::Vector3;
use crate::block_properties::{COLLISION_SHAPES, Instrument}; use crate::block_properties::{COLLISION_SHAPES, Instrument};
use crate::{Block, BlockDirection, CollisionShape}; use crate::{Block, BlockDirection};
/// Represents a specific state of a block, including its properties and physical behaviors. /// Represents a specific state of a block, including its properties and physical behaviors.
/// ///
@ -142,21 +143,21 @@ impl BlockState {
}) })
} }
pub fn get_block_collision_shapes(&self) -> impl Iterator<Item = CollisionShape> + '_ { pub fn get_block_collision_shapes(&self) -> impl Iterator<Item = BoundingBox> + '_ {
self.collision_shapes self.collision_shapes
.iter() .iter()
.map(|&id| COLLISION_SHAPES[id as usize]) .map(|&id| COLLISION_SHAPES[id as usize])
} }
pub fn get_block_outline_shapes(&self) -> impl Iterator<Item = CollisionShape> + '_ { pub fn get_block_outline_shapes(&self) -> impl Iterator<Item = BoundingBox> + '_ {
let base_shapes = self let base_shapes = self
.outline_shapes .outline_shapes
.iter() .iter()
.map(|&id| COLLISION_SHAPES[id as usize]); .map(|&id| COLLISION_SHAPES[id as usize]);
let water_shape = self.is_waterlogged().then(|| { let water_shape = self
CollisionShape::new(Vector3::new(0.0, 0.0, 0.0), Vector3::new(1.0, 0.875, 1.0)) .is_waterlogged()
}); .then(|| BoundingBox::new(Vector3::new(0.0, 0.0, 0.0), Vector3::new(1.0, 0.875, 1.0)));
base_shapes.chain(water_shape) base_shapes.chain(water_shape)
} }

View File

@ -1,45 +0,0 @@
use pumpkin_util::math::{boundingbox::BoundingBox, position::BlockPos, vector3::Vector3};
#[derive(Clone, Copy, Debug)]
pub struct CollisionShape {
pub min: Vector3<f64>,
pub max: Vector3<f64>,
}
impl CollisionShape {
#[must_use]
pub const fn to_bounding_box(&self) -> BoundingBox {
BoundingBox {
min: self.min,
max: self.max,
}
}
#[must_use]
pub const fn new(min: Vector3<f64>, max: Vector3<f64>) -> Self {
Self { min, max }
}
#[must_use]
pub fn intersects(&self, other: &BoundingBox) -> bool {
self.min.x < other.max.x
&& self.max.x > other.min.x
&& self.min.y < other.max.y
&& self.max.y > other.min.y
&& self.min.z < other.max.z
&& self.max.z > other.min.z
}
#[must_use]
pub fn at_pos(&self, pos: BlockPos) -> Self {
let vec3 = Vector3 {
x: f64::from(pos.0.x),
y: f64::from(pos.0.y),
z: f64::from(pos.0.z),
};
Self {
min: self.min + vec3,
max: self.max + vec3,
}
}
}

View File

@ -0,0 +1,160 @@
/* This file is generated. Do not edit manually. */
use std::hash::Hash;
#[derive(Clone, Debug)]
pub struct Attributes {
pub id: u8,
pub default_value: f64,
}
impl PartialEq for Attributes {
fn eq(&self, other: &Self) -> bool {
self.id == other.id
}
}
impl Eq for Attributes {}
impl Hash for Attributes {
fn hash<H: std::hash::Hasher>(&self, state: &mut H) {
self.id.hash(state);
}
}
impl Attributes {
pub const ARMOR: Self = Self {
id: 0,
default_value: 0f64,
};
pub const ARMOR_TOUGHNESS: Self = Self {
id: 1,
default_value: 0f64,
};
pub const ATTACK_DAMAGE: Self = Self {
id: 2,
default_value: 2f64,
};
pub const ATTACK_KNOCKBACK: Self = Self {
id: 3,
default_value: 0f64,
};
pub const ATTACK_SPEED: Self = Self {
id: 4,
default_value: 4f64,
};
pub const BLOCK_BREAK_SPEED: Self = Self {
id: 5,
default_value: 1f64,
};
pub const BLOCK_INTERACTION_RANGE: Self = Self {
id: 6,
default_value: 4.5f64,
};
pub const BURNING_TIME: Self = Self {
id: 7,
default_value: 1f64,
};
pub const CAMERA_DISTANCE: Self = Self {
id: 8,
default_value: 4f64,
};
pub const EXPLOSION_KNOCKBACK_RESISTANCE: Self = Self {
id: 9,
default_value: 0f64,
};
pub const ENTITY_INTERACTION_RANGE: Self = Self {
id: 10,
default_value: 3f64,
};
pub const FALL_DAMAGE_MULTIPLIER: Self = Self {
id: 11,
default_value: 1f64,
};
pub const FLYING_SPEED: Self = Self {
id: 12,
default_value: 0.4f64,
};
pub const FOLLOW_RANGE: Self = Self {
id: 13,
default_value: 32f64,
};
pub const GRAVITY: Self = Self {
id: 14,
default_value: 0.08f64,
};
pub const JUMP_STRENGTH: Self = Self {
id: 15,
default_value: 0.41999998688697815f64,
};
pub const KNOCKBACK_RESISTANCE: Self = Self {
id: 16,
default_value: 0f64,
};
pub const LUCK: Self = Self {
id: 17,
default_value: 0f64,
};
pub const MAX_ABSORPTION: Self = Self {
id: 18,
default_value: 0f64,
};
pub const MAX_HEALTH: Self = Self {
id: 19,
default_value: 20f64,
};
pub const MINING_EFFICIENCY: Self = Self {
id: 20,
default_value: 0f64,
};
pub const MOVEMENT_EFFICIENCY: Self = Self {
id: 21,
default_value: 0f64,
};
pub const MOVEMENT_SPEED: Self = Self {
id: 22,
default_value: 0.7f64,
};
pub const OXYGEN_BONUS: Self = Self {
id: 23,
default_value: 0f64,
};
pub const SAFE_FALL_DISTANCE: Self = Self {
id: 24,
default_value: 3f64,
};
pub const SCALE: Self = Self {
id: 25,
default_value: 1f64,
};
pub const SNEAKING_SPEED: Self = Self {
id: 26,
default_value: 0.3f64,
};
pub const SPAWN_REINFORCEMENTS: Self = Self {
id: 27,
default_value: 0f64,
};
pub const STEP_HEIGHT: Self = Self {
id: 28,
default_value: 0.6f64,
};
pub const SUBMERGED_MINING_SPEED: Self = Self {
id: 29,
default_value: 0.2f64,
};
pub const SWEEPING_DAMAGE_RATIO: Self = Self {
id: 30,
default_value: 0f64,
};
pub const TEMPT_RANGE: Self = Self {
id: 31,
default_value: 10f64,
};
pub const WATER_MOVEMENT_EFFICIENCY: Self = Self {
id: 32,
default_value: 0f64,
};
pub const WAYPOINT_TRANSMIT_RANGE: Self = Self {
id: 33,
default_value: 0f64,
};
pub const WAYPOINT_RECEIVE_RANGE: Self = Self {
id: 34,
default_value: 0f64,
};
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,29 @@
/* This file is generated. Do not edit manually. */
use serde::{Deserialize, Serialize};
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone, Copy)]
pub enum ChunkStatus {
#[serde(rename = "minecraft:empty")]
Empty,
#[serde(rename = "minecraft:structure_starts")]
StructureStarts,
#[serde(rename = "minecraft:structure_references")]
StructureReferences,
#[serde(rename = "minecraft:biomes")]
Biomes,
#[serde(rename = "minecraft:noise")]
Noise,
#[serde(rename = "minecraft:surface")]
Surface,
#[serde(rename = "minecraft:carvers")]
Carvers,
#[serde(rename = "minecraft:features")]
Features,
#[serde(rename = "minecraft:initialize_light")]
InitializeLight,
#[serde(rename = "minecraft:light")]
Light,
#[serde(rename = "minecraft:spawn")]
Spawn,
#[serde(rename = "minecraft:full")]
Full,
}

View File

@ -0,0 +1,122 @@
/* This file is generated. Do not edit manually. */
#[must_use]
pub const fn get_composter_increase_chance_from_item_id(item_id: u16) -> Option<f32> {
match item_id {
49 => Some(0.3f32),
50 => Some(0.3f32),
51 => Some(0.3f32),
52 => Some(0.3f32),
53 => Some(0.3f32),
54 => Some(0.3f32),
55 => Some(0.3f32),
56 => Some(0.3f32),
57 => Some(0.3f32),
143 => Some(0.3f32),
182 => Some(0.3f32),
183 => Some(0.3f32),
184 => Some(0.3f32),
185 => Some(0.3f32),
186 => Some(0.3f32),
187 => Some(0.3f32),
188 => Some(0.3f32),
189 => Some(0.3f32),
190 => Some(0.3f32),
191 => Some(0.3f32),
192 => Some(0.5f32),
202 => Some(0.3f32),
203 => Some(0.65f32),
204 => Some(0.3f32),
205 => Some(0.65f32),
206 => Some(0.85f32),
208 => Some(0.3f32),
209 => Some(0.3f32),
210 => Some(0.3f32),
211 => Some(0.3f32),
212 => Some(0.65f32),
229 => Some(0.65f32),
230 => Some(0.65f32),
231 => Some(0.65f32),
232 => Some(0.65f32),
233 => Some(0.65f32),
234 => Some(0.65f32),
235 => Some(0.65f32),
236 => Some(0.65f32),
237 => Some(0.65f32),
238 => Some(0.65f32),
239 => Some(0.65f32),
240 => Some(0.65f32),
241 => Some(0.65f32),
242 => Some(0.65f32),
243 => Some(0.65f32),
244 => Some(0.85f32),
245 => Some(0.85f32),
246 => Some(0.65f32),
247 => Some(0.65f32),
248 => Some(0.65f32),
249 => Some(0.65f32),
250 => Some(0.65f32),
251 => Some(0.65f32),
252 => Some(0.65f32),
253 => Some(0.5f32),
254 => Some(0.5f32),
255 => Some(0.5f32),
256 => Some(0.5f32),
257 => Some(0.3f32),
258 => Some(0.3f32),
259 => Some(0.3f32),
260 => Some(0.3f32),
261 => Some(0.3f32),
262 => Some(0.65f32),
263 => Some(0.3f32),
264 => Some(0.3f32),
265 => Some(0.65f32),
266 => Some(0.3f32),
267 => Some(0.65f32),
268 => Some(0.3f32),
340 => Some(0.5f32),
341 => Some(0.3f32),
356 => Some(0.65f32),
357 => Some(0.65f32),
387 => Some(0.85f32),
388 => Some(0.85f32),
389 => Some(0.65f32),
409 => Some(0.65f32),
410 => Some(0.5f32),
411 => Some(0.5f32),
423 => Some(0.65f32),
504 => Some(0.85f32),
524 => Some(0.65f32),
525 => Some(0.65f32),
526 => Some(0.65f32),
527 => Some(0.65f32),
528 => Some(0.5f32),
529 => Some(0.65f32),
576 => Some(0.85f32),
577 => Some(0.85f32),
893 => Some(0.65f32),
951 => Some(0.3f32),
952 => Some(0.65f32),
953 => Some(0.85f32),
1027 => Some(0.5f32),
1065 => Some(0.65f32),
1085 => Some(1f32),
1102 => Some(0.85f32),
1106 => Some(0.5f32),
1107 => Some(0.3f32),
1108 => Some(0.3f32),
1109 => Some(0.3f32),
1119 => Some(0.65f32),
1227 => Some(0.65f32),
1228 => Some(0.65f32),
1229 => Some(0.85f32),
1241 => Some(1f32),
1285 => Some(0.3f32),
1286 => Some(0.3f32),
1287 => Some(0.65f32),
1288 => Some(0.3f32),
1373 => Some(0.3f32),
1374 => Some(0.3f32),
1377 => Some(0.65f32),
_ => None,
}
}

View File

@ -0,0 +1,489 @@
/* This file is generated. Do not edit manually. */
#[derive(Clone, Copy, Debug, PartialEq)]
pub struct DamageType {
pub death_message_type: DeathMessageType,
pub exhaustion: f32,
pub effects: Option<DamageEffects>,
pub message_id: &'static str,
pub scaling: DamageScaling,
pub id: u8,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DeathMessageType {
Default,
FallVariants,
IntentionalGameDesign,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DamageEffects {
Hurt,
Thorns,
Drowning,
Burning,
Poking,
Freezing,
}
#[derive(Clone, Copy, Debug, PartialEq)]
pub enum DamageScaling {
Never,
WhenCausedByLivingNonPlayer,
Always,
}
impl DamageType {
pub const ARROW: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "arrow",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 0,
};
pub const BAD_RESPAWN_POINT: DamageType = DamageType {
death_message_type: DeathMessageType::IntentionalGameDesign,
exhaustion: 0.1f32,
effects: None,
message_id: "badRespawnPoint",
scaling: DamageScaling::Always,
id: 1,
};
pub const CACTUS: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "cactus",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 2,
};
pub const CAMPFIRE: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: Some(DamageEffects::Burning),
message_id: "inFire",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 3,
};
pub const CRAMMING: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "cramming",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 4,
};
pub const DRAGON_BREATH: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "dragonBreath",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 5,
};
pub const DROWN: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: Some(DamageEffects::Drowning),
message_id: "drown",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 6,
};
pub const DRY_OUT: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "dryout",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 7,
};
pub const ENDER_PEARL: DamageType = DamageType {
death_message_type: DeathMessageType::FallVariants,
exhaustion: 0f32,
effects: None,
message_id: "fall",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 8,
};
pub const EXPLOSION: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "explosion",
scaling: DamageScaling::Always,
id: 9,
};
pub const FALL: DamageType = DamageType {
death_message_type: DeathMessageType::FallVariants,
exhaustion: 0f32,
effects: None,
message_id: "fall",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 10,
};
pub const FALLING_ANVIL: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "anvil",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 11,
};
pub const FALLING_BLOCK: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "fallingBlock",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 12,
};
pub const FALLING_STALACTITE: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "fallingStalactite",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 13,
};
pub const FIREBALL: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: Some(DamageEffects::Burning),
message_id: "fireball",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 14,
};
pub const FIREWORKS: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "fireworks",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 15,
};
pub const FLY_INTO_WALL: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "flyIntoWall",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 16,
};
pub const FREEZE: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: Some(DamageEffects::Freezing),
message_id: "freeze",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 17,
};
pub const GENERIC: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "generic",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 18,
};
pub const GENERIC_KILL: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "genericKill",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 19,
};
pub const HOT_FLOOR: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: Some(DamageEffects::Burning),
message_id: "hotFloor",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 20,
};
pub const IN_FIRE: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: Some(DamageEffects::Burning),
message_id: "inFire",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 21,
};
pub const IN_WALL: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "inWall",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 22,
};
pub const INDIRECT_MAGIC: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "indirectMagic",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 23,
};
pub const LAVA: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: Some(DamageEffects::Burning),
message_id: "lava",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 24,
};
pub const LIGHTNING_BOLT: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "lightningBolt",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 25,
};
pub const MACE_SMASH: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "mace_smash",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 26,
};
pub const MAGIC: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "magic",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 27,
};
pub const MOB_ATTACK: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "mob",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 28,
};
pub const MOB_ATTACK_NO_AGGRO: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "mob",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 29,
};
pub const MOB_PROJECTILE: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "mob",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 30,
};
pub const ON_FIRE: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: Some(DamageEffects::Burning),
message_id: "onFire",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 31,
};
pub const OUT_OF_WORLD: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "outOfWorld",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 32,
};
pub const OUTSIDE_BORDER: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "outsideBorder",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 33,
};
pub const PLAYER_ATTACK: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "player",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 34,
};
pub const PLAYER_EXPLOSION: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "explosion.player",
scaling: DamageScaling::Always,
id: 35,
};
pub const SONIC_BOOM: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "sonic_boom",
scaling: DamageScaling::Always,
id: 36,
};
pub const SPEAR: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "spear",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 37,
};
pub const SPIT: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "mob",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 38,
};
pub const STALAGMITE: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "stalagmite",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 39,
};
pub const STARVE: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "starve",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 40,
};
pub const STING: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "sting",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 41,
};
pub const SWEET_BERRY_BUSH: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: Some(DamageEffects::Poking),
message_id: "sweetBerryBush",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 42,
};
pub const THORNS: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: Some(DamageEffects::Thorns),
message_id: "thorns",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 43,
};
pub const THROWN: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "thrown",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 44,
};
pub const TRIDENT: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "trident",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 45,
};
pub const UNATTRIBUTED_FIREBALL: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: Some(DamageEffects::Burning),
message_id: "onFire",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 46,
};
pub const WIND_CHARGE: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "mob",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 47,
};
pub const WITHER: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0f32,
effects: None,
message_id: "wither",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 48,
};
pub const WITHER_SKULL: DamageType = DamageType {
death_message_type: DeathMessageType::Default,
exhaustion: 0.1f32,
effects: None,
message_id: "witherSkull",
scaling: DamageScaling::WhenCausedByLivingNonPlayer,
id: 49,
};
#[doc = r" Try to parse a damage type from a resource location string."]
pub fn from_name(name: &str) -> Option<Self> {
match name {
"arrow" => Some(Self::ARROW),
"bad_respawn_point" => Some(Self::BAD_RESPAWN_POINT),
"cactus" => Some(Self::CACTUS),
"campfire" => Some(Self::CAMPFIRE),
"cramming" => Some(Self::CRAMMING),
"dragon_breath" => Some(Self::DRAGON_BREATH),
"drown" => Some(Self::DROWN),
"dry_out" => Some(Self::DRY_OUT),
"ender_pearl" => Some(Self::ENDER_PEARL),
"explosion" => Some(Self::EXPLOSION),
"fall" => Some(Self::FALL),
"falling_anvil" => Some(Self::FALLING_ANVIL),
"falling_block" => Some(Self::FALLING_BLOCK),
"falling_stalactite" => Some(Self::FALLING_STALACTITE),
"fireball" => Some(Self::FIREBALL),
"fireworks" => Some(Self::FIREWORKS),
"fly_into_wall" => Some(Self::FLY_INTO_WALL),
"freeze" => Some(Self::FREEZE),
"generic" => Some(Self::GENERIC),
"generic_kill" => Some(Self::GENERIC_KILL),
"hot_floor" => Some(Self::HOT_FLOOR),
"in_fire" => Some(Self::IN_FIRE),
"in_wall" => Some(Self::IN_WALL),
"indirect_magic" => Some(Self::INDIRECT_MAGIC),
"lava" => Some(Self::LAVA),
"lightning_bolt" => Some(Self::LIGHTNING_BOLT),
"mace_smash" => Some(Self::MACE_SMASH),
"magic" => Some(Self::MAGIC),
"mob_attack" => Some(Self::MOB_ATTACK),
"mob_attack_no_aggro" => Some(Self::MOB_ATTACK_NO_AGGRO),
"mob_projectile" => Some(Self::MOB_PROJECTILE),
"on_fire" => Some(Self::ON_FIRE),
"out_of_world" => Some(Self::OUT_OF_WORLD),
"outside_border" => Some(Self::OUTSIDE_BORDER),
"player_attack" => Some(Self::PLAYER_ATTACK),
"player_explosion" => Some(Self::PLAYER_EXPLOSION),
"sonic_boom" => Some(Self::SONIC_BOOM),
"spear" => Some(Self::SPEAR),
"spit" => Some(Self::SPIT),
"stalagmite" => Some(Self::STALAGMITE),
"starve" => Some(Self::STARVE),
"sting" => Some(Self::STING),
"sweet_berry_bush" => Some(Self::SWEET_BERRY_BUSH),
"thorns" => Some(Self::THORNS),
"thrown" => Some(Self::THROWN),
"trident" => Some(Self::TRIDENT),
"unattributed_fireball" => Some(Self::UNATTRIBUTED_FIREBALL),
"wind_charge" => Some(Self::WIND_CHARGE),
"wither" => Some(Self::WITHER),
"wither_skull" => Some(Self::WITHER_SKULL),
_ => None,
}
}
}

View File

@ -0,0 +1,443 @@
/* This file is generated. Do not edit manually. */
use crate::data_component_impl::*;
#[derive(Copy, Clone, Debug, Hash, PartialEq, Eq)]
#[repr(u8)]
pub enum DataComponent {
CustomData = 0u8,
MaxStackSize = 1u8,
MaxDamage = 2u8,
Damage = 3u8,
Unbreakable = 4u8,
UseEffects = 5u8,
CustomName = 6u8,
MinimumAttackCharge = 7u8,
DamageType = 8u8,
ItemName = 9u8,
ItemModel = 10u8,
Lore = 11u8,
Rarity = 12u8,
Enchantments = 13u8,
CanPlaceOn = 14u8,
CanBreak = 15u8,
AttributeModifiers = 16u8,
CustomModelData = 17u8,
TooltipDisplay = 18u8,
RepairCost = 19u8,
CreativeSlotLock = 20u8,
EnchantmentGlintOverride = 21u8,
IntangibleProjectile = 22u8,
Food = 23u8,
Consumable = 24u8,
UseRemainder = 25u8,
UseCooldown = 26u8,
DamageResistant = 27u8,
Tool = 28u8,
Weapon = 29u8,
AttackRange = 30u8,
Enchantable = 31u8,
Equippable = 32u8,
Repairable = 33u8,
Glider = 34u8,
TooltipStyle = 35u8,
DeathProtection = 36u8,
BlocksAttacks = 37u8,
PiercingWeapon = 38u8,
KineticWeapon = 39u8,
SwingAnimation = 40u8,
StoredEnchantments = 41u8,
DyedColor = 42u8,
MapColor = 43u8,
MapId = 44u8,
MapDecorations = 45u8,
MapPostProcessing = 46u8,
ChargedProjectiles = 47u8,
BundleContents = 48u8,
PotionContents = 49u8,
PotionDurationScale = 50u8,
SuspiciousStewEffects = 51u8,
WritableBookContent = 52u8,
WrittenBookContent = 53u8,
Trim = 54u8,
DebugStickState = 55u8,
EntityData = 56u8,
BucketEntityData = 57u8,
BlockEntityData = 58u8,
Instrument = 59u8,
ProvidesTrimMaterial = 60u8,
OminousBottleAmplifier = 61u8,
JukeboxPlayable = 62u8,
ProvidesBannerPatterns = 63u8,
Recipes = 64u8,
LodestoneTracker = 65u8,
FireworkExplosion = 66u8,
Fireworks = 67u8,
Profile = 68u8,
NoteBlockSound = 69u8,
BannerPatterns = 70u8,
BaseColor = 71u8,
PotDecorations = 72u8,
Container = 73u8,
BlockState = 74u8,
Bees = 75u8,
Lock = 76u8,
ContainerLoot = 77u8,
BreakSound = 78u8,
VillagerVariant = 79u8,
WolfVariant = 80u8,
WolfSoundVariant = 81u8,
WolfCollar = 82u8,
FoxVariant = 83u8,
SalmonSize = 84u8,
ParrotVariant = 85u8,
TropicalFishPattern = 86u8,
TropicalFishBaseColor = 87u8,
TropicalFishPatternColor = 88u8,
MooshroomVariant = 89u8,
RabbitVariant = 90u8,
PigVariant = 91u8,
CowVariant = 92u8,
ChickenVariant = 93u8,
ZombieNautilusVariant = 94u8,
FrogVariant = 95u8,
HorseVariant = 96u8,
PaintingVariant = 97u8,
LlamaVariant = 98u8,
AxolotlVariant = 99u8,
CatVariant = 100u8,
CatCollar = 101u8,
SheepColor = 102u8,
ShulkerColor = 103u8,
}
impl DataComponent {
pub const fn to_id(self) -> u8 {
self as u8
}
pub const fn try_from_id(id: u8) -> Option<DataComponent> {
match id {
0u8 => Some(DataComponent::CustomData),
1u8 => Some(DataComponent::MaxStackSize),
2u8 => Some(DataComponent::MaxDamage),
3u8 => Some(DataComponent::Damage),
4u8 => Some(DataComponent::Unbreakable),
5u8 => Some(DataComponent::UseEffects),
6u8 => Some(DataComponent::CustomName),
7u8 => Some(DataComponent::MinimumAttackCharge),
8u8 => Some(DataComponent::DamageType),
9u8 => Some(DataComponent::ItemName),
10u8 => Some(DataComponent::ItemModel),
11u8 => Some(DataComponent::Lore),
12u8 => Some(DataComponent::Rarity),
13u8 => Some(DataComponent::Enchantments),
14u8 => Some(DataComponent::CanPlaceOn),
15u8 => Some(DataComponent::CanBreak),
16u8 => Some(DataComponent::AttributeModifiers),
17u8 => Some(DataComponent::CustomModelData),
18u8 => Some(DataComponent::TooltipDisplay),
19u8 => Some(DataComponent::RepairCost),
20u8 => Some(DataComponent::CreativeSlotLock),
21u8 => Some(DataComponent::EnchantmentGlintOverride),
22u8 => Some(DataComponent::IntangibleProjectile),
23u8 => Some(DataComponent::Food),
24u8 => Some(DataComponent::Consumable),
25u8 => Some(DataComponent::UseRemainder),
26u8 => Some(DataComponent::UseCooldown),
27u8 => Some(DataComponent::DamageResistant),
28u8 => Some(DataComponent::Tool),
29u8 => Some(DataComponent::Weapon),
30u8 => Some(DataComponent::AttackRange),
31u8 => Some(DataComponent::Enchantable),
32u8 => Some(DataComponent::Equippable),
33u8 => Some(DataComponent::Repairable),
34u8 => Some(DataComponent::Glider),
35u8 => Some(DataComponent::TooltipStyle),
36u8 => Some(DataComponent::DeathProtection),
37u8 => Some(DataComponent::BlocksAttacks),
38u8 => Some(DataComponent::PiercingWeapon),
39u8 => Some(DataComponent::KineticWeapon),
40u8 => Some(DataComponent::SwingAnimation),
41u8 => Some(DataComponent::StoredEnchantments),
42u8 => Some(DataComponent::DyedColor),
43u8 => Some(DataComponent::MapColor),
44u8 => Some(DataComponent::MapId),
45u8 => Some(DataComponent::MapDecorations),
46u8 => Some(DataComponent::MapPostProcessing),
47u8 => Some(DataComponent::ChargedProjectiles),
48u8 => Some(DataComponent::BundleContents),
49u8 => Some(DataComponent::PotionContents),
50u8 => Some(DataComponent::PotionDurationScale),
51u8 => Some(DataComponent::SuspiciousStewEffects),
52u8 => Some(DataComponent::WritableBookContent),
53u8 => Some(DataComponent::WrittenBookContent),
54u8 => Some(DataComponent::Trim),
55u8 => Some(DataComponent::DebugStickState),
56u8 => Some(DataComponent::EntityData),
57u8 => Some(DataComponent::BucketEntityData),
58u8 => Some(DataComponent::BlockEntityData),
59u8 => Some(DataComponent::Instrument),
60u8 => Some(DataComponent::ProvidesTrimMaterial),
61u8 => Some(DataComponent::OminousBottleAmplifier),
62u8 => Some(DataComponent::JukeboxPlayable),
63u8 => Some(DataComponent::ProvidesBannerPatterns),
64u8 => Some(DataComponent::Recipes),
65u8 => Some(DataComponent::LodestoneTracker),
66u8 => Some(DataComponent::FireworkExplosion),
67u8 => Some(DataComponent::Fireworks),
68u8 => Some(DataComponent::Profile),
69u8 => Some(DataComponent::NoteBlockSound),
70u8 => Some(DataComponent::BannerPatterns),
71u8 => Some(DataComponent::BaseColor),
72u8 => Some(DataComponent::PotDecorations),
73u8 => Some(DataComponent::Container),
74u8 => Some(DataComponent::BlockState),
75u8 => Some(DataComponent::Bees),
76u8 => Some(DataComponent::Lock),
77u8 => Some(DataComponent::ContainerLoot),
78u8 => Some(DataComponent::BreakSound),
79u8 => Some(DataComponent::VillagerVariant),
80u8 => Some(DataComponent::WolfVariant),
81u8 => Some(DataComponent::WolfSoundVariant),
82u8 => Some(DataComponent::WolfCollar),
83u8 => Some(DataComponent::FoxVariant),
84u8 => Some(DataComponent::SalmonSize),
85u8 => Some(DataComponent::ParrotVariant),
86u8 => Some(DataComponent::TropicalFishPattern),
87u8 => Some(DataComponent::TropicalFishBaseColor),
88u8 => Some(DataComponent::TropicalFishPatternColor),
89u8 => Some(DataComponent::MooshroomVariant),
90u8 => Some(DataComponent::RabbitVariant),
91u8 => Some(DataComponent::PigVariant),
92u8 => Some(DataComponent::CowVariant),
93u8 => Some(DataComponent::ChickenVariant),
94u8 => Some(DataComponent::ZombieNautilusVariant),
95u8 => Some(DataComponent::FrogVariant),
96u8 => Some(DataComponent::HorseVariant),
97u8 => Some(DataComponent::PaintingVariant),
98u8 => Some(DataComponent::LlamaVariant),
99u8 => Some(DataComponent::AxolotlVariant),
100u8 => Some(DataComponent::CatVariant),
101u8 => Some(DataComponent::CatCollar),
102u8 => Some(DataComponent::SheepColor),
103u8 => Some(DataComponent::ShulkerColor),
_ => None,
}
}
pub fn try_from_name(name: &str) -> Option<DataComponent> {
match name {
"minecraft:custom_data" => Some(DataComponent::CustomData),
"minecraft:max_stack_size" => Some(DataComponent::MaxStackSize),
"minecraft:max_damage" => Some(DataComponent::MaxDamage),
"minecraft:damage" => Some(DataComponent::Damage),
"minecraft:unbreakable" => Some(DataComponent::Unbreakable),
"minecraft:use_effects" => Some(DataComponent::UseEffects),
"minecraft:custom_name" => Some(DataComponent::CustomName),
"minecraft:minimum_attack_charge" => Some(DataComponent::MinimumAttackCharge),
"minecraft:damage_type" => Some(DataComponent::DamageType),
"minecraft:item_name" => Some(DataComponent::ItemName),
"minecraft:item_model" => Some(DataComponent::ItemModel),
"minecraft:lore" => Some(DataComponent::Lore),
"minecraft:rarity" => Some(DataComponent::Rarity),
"minecraft:enchantments" => Some(DataComponent::Enchantments),
"minecraft:can_place_on" => Some(DataComponent::CanPlaceOn),
"minecraft:can_break" => Some(DataComponent::CanBreak),
"minecraft:attribute_modifiers" => Some(DataComponent::AttributeModifiers),
"minecraft:custom_model_data" => Some(DataComponent::CustomModelData),
"minecraft:tooltip_display" => Some(DataComponent::TooltipDisplay),
"minecraft:repair_cost" => Some(DataComponent::RepairCost),
"minecraft:creative_slot_lock" => Some(DataComponent::CreativeSlotLock),
"minecraft:enchantment_glint_override" => Some(DataComponent::EnchantmentGlintOverride),
"minecraft:intangible_projectile" => Some(DataComponent::IntangibleProjectile),
"minecraft:food" => Some(DataComponent::Food),
"minecraft:consumable" => Some(DataComponent::Consumable),
"minecraft:use_remainder" => Some(DataComponent::UseRemainder),
"minecraft:use_cooldown" => Some(DataComponent::UseCooldown),
"minecraft:damage_resistant" => Some(DataComponent::DamageResistant),
"minecraft:tool" => Some(DataComponent::Tool),
"minecraft:weapon" => Some(DataComponent::Weapon),
"minecraft:attack_range" => Some(DataComponent::AttackRange),
"minecraft:enchantable" => Some(DataComponent::Enchantable),
"minecraft:equippable" => Some(DataComponent::Equippable),
"minecraft:repairable" => Some(DataComponent::Repairable),
"minecraft:glider" => Some(DataComponent::Glider),
"minecraft:tooltip_style" => Some(DataComponent::TooltipStyle),
"minecraft:death_protection" => Some(DataComponent::DeathProtection),
"minecraft:blocks_attacks" => Some(DataComponent::BlocksAttacks),
"minecraft:piercing_weapon" => Some(DataComponent::PiercingWeapon),
"minecraft:kinetic_weapon" => Some(DataComponent::KineticWeapon),
"minecraft:swing_animation" => Some(DataComponent::SwingAnimation),
"minecraft:stored_enchantments" => Some(DataComponent::StoredEnchantments),
"minecraft:dyed_color" => Some(DataComponent::DyedColor),
"minecraft:map_color" => Some(DataComponent::MapColor),
"minecraft:map_id" => Some(DataComponent::MapId),
"minecraft:map_decorations" => Some(DataComponent::MapDecorations),
"minecraft:map_post_processing" => Some(DataComponent::MapPostProcessing),
"minecraft:charged_projectiles" => Some(DataComponent::ChargedProjectiles),
"minecraft:bundle_contents" => Some(DataComponent::BundleContents),
"minecraft:potion_contents" => Some(DataComponent::PotionContents),
"minecraft:potion_duration_scale" => Some(DataComponent::PotionDurationScale),
"minecraft:suspicious_stew_effects" => Some(DataComponent::SuspiciousStewEffects),
"minecraft:writable_book_content" => Some(DataComponent::WritableBookContent),
"minecraft:written_book_content" => Some(DataComponent::WrittenBookContent),
"minecraft:trim" => Some(DataComponent::Trim),
"minecraft:debug_stick_state" => Some(DataComponent::DebugStickState),
"minecraft:entity_data" => Some(DataComponent::EntityData),
"minecraft:bucket_entity_data" => Some(DataComponent::BucketEntityData),
"minecraft:block_entity_data" => Some(DataComponent::BlockEntityData),
"minecraft:instrument" => Some(DataComponent::Instrument),
"minecraft:provides_trim_material" => Some(DataComponent::ProvidesTrimMaterial),
"minecraft:ominous_bottle_amplifier" => Some(DataComponent::OminousBottleAmplifier),
"minecraft:jukebox_playable" => Some(DataComponent::JukeboxPlayable),
"minecraft:provides_banner_patterns" => Some(DataComponent::ProvidesBannerPatterns),
"minecraft:recipes" => Some(DataComponent::Recipes),
"minecraft:lodestone_tracker" => Some(DataComponent::LodestoneTracker),
"minecraft:firework_explosion" => Some(DataComponent::FireworkExplosion),
"minecraft:fireworks" => Some(DataComponent::Fireworks),
"minecraft:profile" => Some(DataComponent::Profile),
"minecraft:note_block_sound" => Some(DataComponent::NoteBlockSound),
"minecraft:banner_patterns" => Some(DataComponent::BannerPatterns),
"minecraft:base_color" => Some(DataComponent::BaseColor),
"minecraft:pot_decorations" => Some(DataComponent::PotDecorations),
"minecraft:container" => Some(DataComponent::Container),
"minecraft:block_state" => Some(DataComponent::BlockState),
"minecraft:bees" => Some(DataComponent::Bees),
"minecraft:lock" => Some(DataComponent::Lock),
"minecraft:container_loot" => Some(DataComponent::ContainerLoot),
"minecraft:break_sound" => Some(DataComponent::BreakSound),
"minecraft:villager/variant" => Some(DataComponent::VillagerVariant),
"minecraft:wolf/variant" => Some(DataComponent::WolfVariant),
"minecraft:wolf/sound_variant" => Some(DataComponent::WolfSoundVariant),
"minecraft:wolf/collar" => Some(DataComponent::WolfCollar),
"minecraft:fox/variant" => Some(DataComponent::FoxVariant),
"minecraft:salmon/size" => Some(DataComponent::SalmonSize),
"minecraft:parrot/variant" => Some(DataComponent::ParrotVariant),
"minecraft:tropical_fish/pattern" => Some(DataComponent::TropicalFishPattern),
"minecraft:tropical_fish/base_color" => Some(DataComponent::TropicalFishBaseColor),
"minecraft:tropical_fish/pattern_color" => {
Some(DataComponent::TropicalFishPatternColor)
}
"minecraft:mooshroom/variant" => Some(DataComponent::MooshroomVariant),
"minecraft:rabbit/variant" => Some(DataComponent::RabbitVariant),
"minecraft:pig/variant" => Some(DataComponent::PigVariant),
"minecraft:cow/variant" => Some(DataComponent::CowVariant),
"minecraft:chicken/variant" => Some(DataComponent::ChickenVariant),
"minecraft:zombie_nautilus/variant" => Some(DataComponent::ZombieNautilusVariant),
"minecraft:frog/variant" => Some(DataComponent::FrogVariant),
"minecraft:horse/variant" => Some(DataComponent::HorseVariant),
"minecraft:painting/variant" => Some(DataComponent::PaintingVariant),
"minecraft:llama/variant" => Some(DataComponent::LlamaVariant),
"minecraft:axolotl/variant" => Some(DataComponent::AxolotlVariant),
"minecraft:cat/variant" => Some(DataComponent::CatVariant),
"minecraft:cat/collar" => Some(DataComponent::CatCollar),
"minecraft:sheep/color" => Some(DataComponent::SheepColor),
"minecraft:shulker/color" => Some(DataComponent::ShulkerColor),
_ => None,
}
}
pub const fn to_name(self) -> &'static str {
match self {
Self::CustomData => "minecraft:custom_data",
Self::MaxStackSize => "minecraft:max_stack_size",
Self::MaxDamage => "minecraft:max_damage",
Self::Damage => "minecraft:damage",
Self::Unbreakable => "minecraft:unbreakable",
Self::UseEffects => "minecraft:use_effects",
Self::CustomName => "minecraft:custom_name",
Self::MinimumAttackCharge => "minecraft:minimum_attack_charge",
Self::DamageType => "minecraft:damage_type",
Self::ItemName => "minecraft:item_name",
Self::ItemModel => "minecraft:item_model",
Self::Lore => "minecraft:lore",
Self::Rarity => "minecraft:rarity",
Self::Enchantments => "minecraft:enchantments",
Self::CanPlaceOn => "minecraft:can_place_on",
Self::CanBreak => "minecraft:can_break",
Self::AttributeModifiers => "minecraft:attribute_modifiers",
Self::CustomModelData => "minecraft:custom_model_data",
Self::TooltipDisplay => "minecraft:tooltip_display",
Self::RepairCost => "minecraft:repair_cost",
Self::CreativeSlotLock => "minecraft:creative_slot_lock",
Self::EnchantmentGlintOverride => "minecraft:enchantment_glint_override",
Self::IntangibleProjectile => "minecraft:intangible_projectile",
Self::Food => "minecraft:food",
Self::Consumable => "minecraft:consumable",
Self::UseRemainder => "minecraft:use_remainder",
Self::UseCooldown => "minecraft:use_cooldown",
Self::DamageResistant => "minecraft:damage_resistant",
Self::Tool => "minecraft:tool",
Self::Weapon => "minecraft:weapon",
Self::AttackRange => "minecraft:attack_range",
Self::Enchantable => "minecraft:enchantable",
Self::Equippable => "minecraft:equippable",
Self::Repairable => "minecraft:repairable",
Self::Glider => "minecraft:glider",
Self::TooltipStyle => "minecraft:tooltip_style",
Self::DeathProtection => "minecraft:death_protection",
Self::BlocksAttacks => "minecraft:blocks_attacks",
Self::PiercingWeapon => "minecraft:piercing_weapon",
Self::KineticWeapon => "minecraft:kinetic_weapon",
Self::SwingAnimation => "minecraft:swing_animation",
Self::StoredEnchantments => "minecraft:stored_enchantments",
Self::DyedColor => "minecraft:dyed_color",
Self::MapColor => "minecraft:map_color",
Self::MapId => "minecraft:map_id",
Self::MapDecorations => "minecraft:map_decorations",
Self::MapPostProcessing => "minecraft:map_post_processing",
Self::ChargedProjectiles => "minecraft:charged_projectiles",
Self::BundleContents => "minecraft:bundle_contents",
Self::PotionContents => "minecraft:potion_contents",
Self::PotionDurationScale => "minecraft:potion_duration_scale",
Self::SuspiciousStewEffects => "minecraft:suspicious_stew_effects",
Self::WritableBookContent => "minecraft:writable_book_content",
Self::WrittenBookContent => "minecraft:written_book_content",
Self::Trim => "minecraft:trim",
Self::DebugStickState => "minecraft:debug_stick_state",
Self::EntityData => "minecraft:entity_data",
Self::BucketEntityData => "minecraft:bucket_entity_data",
Self::BlockEntityData => "minecraft:block_entity_data",
Self::Instrument => "minecraft:instrument",
Self::ProvidesTrimMaterial => "minecraft:provides_trim_material",
Self::OminousBottleAmplifier => "minecraft:ominous_bottle_amplifier",
Self::JukeboxPlayable => "minecraft:jukebox_playable",
Self::ProvidesBannerPatterns => "minecraft:provides_banner_patterns",
Self::Recipes => "minecraft:recipes",
Self::LodestoneTracker => "minecraft:lodestone_tracker",
Self::FireworkExplosion => "minecraft:firework_explosion",
Self::Fireworks => "minecraft:fireworks",
Self::Profile => "minecraft:profile",
Self::NoteBlockSound => "minecraft:note_block_sound",
Self::BannerPatterns => "minecraft:banner_patterns",
Self::BaseColor => "minecraft:base_color",
Self::PotDecorations => "minecraft:pot_decorations",
Self::Container => "minecraft:container",
Self::BlockState => "minecraft:block_state",
Self::Bees => "minecraft:bees",
Self::Lock => "minecraft:lock",
Self::ContainerLoot => "minecraft:container_loot",
Self::BreakSound => "minecraft:break_sound",
Self::VillagerVariant => "minecraft:villager/variant",
Self::WolfVariant => "minecraft:wolf/variant",
Self::WolfSoundVariant => "minecraft:wolf/sound_variant",
Self::WolfCollar => "minecraft:wolf/collar",
Self::FoxVariant => "minecraft:fox/variant",
Self::SalmonSize => "minecraft:salmon/size",
Self::ParrotVariant => "minecraft:parrot/variant",
Self::TropicalFishPattern => "minecraft:tropical_fish/pattern",
Self::TropicalFishBaseColor => "minecraft:tropical_fish/base_color",
Self::TropicalFishPatternColor => "minecraft:tropical_fish/pattern_color",
Self::MooshroomVariant => "minecraft:mooshroom/variant",
Self::RabbitVariant => "minecraft:rabbit/variant",
Self::PigVariant => "minecraft:pig/variant",
Self::CowVariant => "minecraft:cow/variant",
Self::ChickenVariant => "minecraft:chicken/variant",
Self::ZombieNautilusVariant => "minecraft:zombie_nautilus/variant",
Self::FrogVariant => "minecraft:frog/variant",
Self::HorseVariant => "minecraft:horse/variant",
Self::PaintingVariant => "minecraft:painting/variant",
Self::LlamaVariant => "minecraft:llama/variant",
Self::AxolotlVariant => "minecraft:axolotl/variant",
Self::CatVariant => "minecraft:cat/variant",
Self::CatCollar => "minecraft:cat/collar",
Self::SheepColor => "minecraft:sheep/color",
Self::ShulkerColor => "minecraft:shulker/color",
}
}
}

View File

@ -0,0 +1,84 @@
/* This file is generated. Do not edit manually. */
#[derive(Debug, Clone, Copy)]
pub struct Dimension {
pub id: u8,
pub minecraft_name: &'static str,
pub fixed_time: Option<i64>,
pub has_skylight: bool,
pub has_ceiling: bool,
pub coordinate_scale: f64,
pub min_y: i32,
pub height: i32,
pub logical_height: i32,
pub infiniburn: &'static str,
pub ambient_light: f32,
}
impl Dimension {
pub const OVERWORLD: Self = Self {
id: 0u8,
minecraft_name: "minecraft:overworld",
fixed_time: None,
has_skylight: true,
has_ceiling: false,
coordinate_scale: 1f64,
min_y: -64i32,
height: 384i32,
logical_height: 384i32,
infiniburn: "#minecraft:infiniburn_overworld",
ambient_light: 0f32,
};
pub const OVERWORLD_CAVES: Self = Self {
id: 1u8,
minecraft_name: "minecraft:overworld_caves",
fixed_time: None,
has_skylight: true,
has_ceiling: true,
coordinate_scale: 1f64,
min_y: -64i32,
height: 384i32,
logical_height: 384i32,
infiniburn: "#minecraft:infiniburn_overworld",
ambient_light: 0f32,
};
pub const THE_END: Self = Self {
id: 2u8,
minecraft_name: "minecraft:the_end",
fixed_time: None,
has_skylight: true,
has_ceiling: false,
coordinate_scale: 1f64,
min_y: 0i32,
height: 256i32,
logical_height: 256i32,
infiniburn: "#minecraft:infiniburn_end",
ambient_light: 0.25f32,
};
pub const THE_NETHER: Self = Self {
id: 3u8,
minecraft_name: "minecraft:the_nether",
fixed_time: None,
has_skylight: false,
has_ceiling: true,
coordinate_scale: 8f64,
min_y: 0i32,
height: 256i32,
logical_height: 128i32,
infiniburn: "#minecraft:infiniburn_nether",
ambient_light: 0.1f32,
};
pub fn from_name(name: &str) -> Option<&'static Self> {
match name {
"minecraft:overworld" => Some(&Self::OVERWORLD),
"minecraft:overworld_caves" => Some(&Self::OVERWORLD_CAVES),
"minecraft:the_end" => Some(&Self::THE_END),
"minecraft:the_nether" => Some(&Self::THE_NETHER),
_ => None,
}
}
}
impl PartialEq for Dimension {
fn eq(&self, other: &Self) -> bool {
self.id == other.id
}
}
impl Eq for Dimension {}

View File

@ -0,0 +1,498 @@
/* This file is generated. Do not edit manually. */
use crate::attributes::Attributes;
use crate::data_component_impl::Operation;
use std::hash::{Hash, Hasher};
pub struct StatusEffect {
pub minecraft_name: &'static str,
pub id: u8,
pub category: MobEffectCategory,
pub color: i32,
pub translation_key: &'static str,
pub attribute_modifiers: &'static [Modifiers],
}
impl PartialEq for StatusEffect {
fn eq(&self, other: &Self) -> bool {
self.id == other.id
}
}
impl Eq for StatusEffect {}
impl Hash for StatusEffect {
fn hash<H: Hasher>(&self, state: &mut H) {
self.id.hash(state);
}
}
#[derive(Debug, Clone, Hash)]
pub enum MobEffectCategory {
Beneficial,
Harmful,
Neutral,
}
#[derive(Debug)]
pub struct Modifiers {
pub attribute: &'static Attributes,
pub id: &'static str,
pub base_value: f64,
pub operation: Operation,
}
impl StatusEffect {
pub const ABSORPTION: Self = Self {
minecraft_name: "minecraft:absorption",
id: 21u8,
category: MobEffectCategory::Beneficial,
color: 2445989i32,
translation_key: "effect.minecraft.absorption",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::MAX_ABSORPTION,
id: "minecraft:effect.absorption",
base_value: 4f64,
operation: Operation::AddValue,
}],
};
pub const BAD_OMEN: Self = Self {
minecraft_name: "minecraft:bad_omen",
id: 30u8,
category: MobEffectCategory::Neutral,
color: 745784i32,
translation_key: "effect.minecraft.bad_omen",
attribute_modifiers: &[],
};
pub const BLINDNESS: Self = Self {
minecraft_name: "minecraft:blindness",
id: 14u8,
category: MobEffectCategory::Harmful,
color: 2039587i32,
translation_key: "effect.minecraft.blindness",
attribute_modifiers: &[],
};
pub const CONDUIT_POWER: Self = Self {
minecraft_name: "minecraft:conduit_power",
id: 28u8,
category: MobEffectCategory::Beneficial,
color: 1950417i32,
translation_key: "effect.minecraft.conduit_power",
attribute_modifiers: &[],
};
pub const DARKNESS: Self = Self {
minecraft_name: "minecraft:darkness",
id: 32u8,
category: MobEffectCategory::Harmful,
color: 2696993i32,
translation_key: "effect.minecraft.darkness",
attribute_modifiers: &[],
};
pub const DOLPHINS_GRACE: Self = Self {
minecraft_name: "minecraft:dolphins_grace",
id: 29u8,
category: MobEffectCategory::Beneficial,
color: 8954814i32,
translation_key: "effect.minecraft.dolphins_grace",
attribute_modifiers: &[],
};
pub const FIRE_RESISTANCE: Self = Self {
minecraft_name: "minecraft:fire_resistance",
id: 11u8,
category: MobEffectCategory::Beneficial,
color: 16750848i32,
translation_key: "effect.minecraft.fire_resistance",
attribute_modifiers: &[],
};
pub const GLOWING: Self = Self {
minecraft_name: "minecraft:glowing",
id: 23u8,
category: MobEffectCategory::Neutral,
color: 9740385i32,
translation_key: "effect.minecraft.glowing",
attribute_modifiers: &[],
};
pub const HASTE: Self = Self {
minecraft_name: "minecraft:haste",
id: 2u8,
category: MobEffectCategory::Beneficial,
color: 14270531i32,
translation_key: "effect.minecraft.haste",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::ATTACK_SPEED,
id: "minecraft:effect.haste",
base_value: 0.10000000149011612f64,
operation: Operation::AddMultipliedTotal,
}],
};
pub const HEALTH_BOOST: Self = Self {
minecraft_name: "minecraft:health_boost",
id: 20u8,
category: MobEffectCategory::Beneficial,
color: 16284963i32,
translation_key: "effect.minecraft.health_boost",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::MAX_HEALTH,
id: "minecraft:effect.health_boost",
base_value: 4f64,
operation: Operation::AddValue,
}],
};
pub const HERO_OF_THE_VILLAGE: Self = Self {
minecraft_name: "minecraft:hero_of_the_village",
id: 31u8,
category: MobEffectCategory::Beneficial,
color: 4521796i32,
translation_key: "effect.minecraft.hero_of_the_village",
attribute_modifiers: &[],
};
pub const HUNGER: Self = Self {
minecraft_name: "minecraft:hunger",
id: 16u8,
category: MobEffectCategory::Harmful,
color: 5797459i32,
translation_key: "effect.minecraft.hunger",
attribute_modifiers: &[],
};
pub const INFESTED: Self = Self {
minecraft_name: "minecraft:infested",
id: 38u8,
category: MobEffectCategory::Harmful,
color: 9214860i32,
translation_key: "effect.minecraft.infested",
attribute_modifiers: &[],
};
pub const INSTANT_DAMAGE: Self = Self {
minecraft_name: "minecraft:instant_damage",
id: 6u8,
category: MobEffectCategory::Harmful,
color: 11101546i32,
translation_key: "effect.minecraft.instant_damage",
attribute_modifiers: &[],
};
pub const INSTANT_HEALTH: Self = Self {
minecraft_name: "minecraft:instant_health",
id: 5u8,
category: MobEffectCategory::Beneficial,
color: 16262179i32,
translation_key: "effect.minecraft.instant_health",
attribute_modifiers: &[],
};
pub const INVISIBILITY: Self = Self {
minecraft_name: "minecraft:invisibility",
id: 13u8,
category: MobEffectCategory::Beneficial,
color: 16185078i32,
translation_key: "effect.minecraft.invisibility",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::WAYPOINT_TRANSMIT_RANGE,
id: "minecraft:effect.waypoint_transmit_range_hide",
base_value: -1f64,
operation: Operation::AddMultipliedTotal,
}],
};
pub const JUMP_BOOST: Self = Self {
minecraft_name: "minecraft:jump_boost",
id: 7u8,
category: MobEffectCategory::Beneficial,
color: 16646020i32,
translation_key: "effect.minecraft.jump_boost",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::SAFE_FALL_DISTANCE,
id: "minecraft:effect.jump_boost",
base_value: 1f64,
operation: Operation::AddValue,
}],
};
pub const LEVITATION: Self = Self {
minecraft_name: "minecraft:levitation",
id: 24u8,
category: MobEffectCategory::Harmful,
color: 13565951i32,
translation_key: "effect.minecraft.levitation",
attribute_modifiers: &[],
};
pub const LUCK: Self = Self {
minecraft_name: "minecraft:luck",
id: 25u8,
category: MobEffectCategory::Beneficial,
color: 5882118i32,
translation_key: "effect.minecraft.luck",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::LUCK,
id: "minecraft:effect.luck",
base_value: 1f64,
operation: Operation::AddValue,
}],
};
pub const MINING_FATIGUE: Self = Self {
minecraft_name: "minecraft:mining_fatigue",
id: 3u8,
category: MobEffectCategory::Harmful,
color: 4866583i32,
translation_key: "effect.minecraft.mining_fatigue",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::ATTACK_SPEED,
id: "minecraft:effect.mining_fatigue",
base_value: -0.10000000149011612f64,
operation: Operation::AddMultipliedTotal,
}],
};
pub const NAUSEA: Self = Self {
minecraft_name: "minecraft:nausea",
id: 8u8,
category: MobEffectCategory::Harmful,
color: 5578058i32,
translation_key: "effect.minecraft.nausea",
attribute_modifiers: &[],
};
pub const NIGHT_VISION: Self = Self {
minecraft_name: "minecraft:night_vision",
id: 15u8,
category: MobEffectCategory::Beneficial,
color: 12779366i32,
translation_key: "effect.minecraft.night_vision",
attribute_modifiers: &[],
};
pub const OOZING: Self = Self {
minecraft_name: "minecraft:oozing",
id: 37u8,
category: MobEffectCategory::Harmful,
color: 10092451i32,
translation_key: "effect.minecraft.oozing",
attribute_modifiers: &[],
};
pub const POISON: Self = Self {
minecraft_name: "minecraft:poison",
id: 18u8,
category: MobEffectCategory::Harmful,
color: 8889187i32,
translation_key: "effect.minecraft.poison",
attribute_modifiers: &[],
};
pub const RAID_OMEN: Self = Self {
minecraft_name: "minecraft:raid_omen",
id: 34u8,
category: MobEffectCategory::Neutral,
color: 14565464i32,
translation_key: "effect.minecraft.raid_omen",
attribute_modifiers: &[],
};
pub const REGENERATION: Self = Self {
minecraft_name: "minecraft:regeneration",
id: 9u8,
category: MobEffectCategory::Beneficial,
color: 13458603i32,
translation_key: "effect.minecraft.regeneration",
attribute_modifiers: &[],
};
pub const RESISTANCE: Self = Self {
minecraft_name: "minecraft:resistance",
id: 10u8,
category: MobEffectCategory::Beneficial,
color: 9520880i32,
translation_key: "effect.minecraft.resistance",
attribute_modifiers: &[],
};
pub const SATURATION: Self = Self {
minecraft_name: "minecraft:saturation",
id: 22u8,
category: MobEffectCategory::Beneficial,
color: 16262179i32,
translation_key: "effect.minecraft.saturation",
attribute_modifiers: &[],
};
pub const SLOW_FALLING: Self = Self {
minecraft_name: "minecraft:slow_falling",
id: 27u8,
category: MobEffectCategory::Beneficial,
color: 15978425i32,
translation_key: "effect.minecraft.slow_falling",
attribute_modifiers: &[],
};
pub const SLOWNESS: Self = Self {
minecraft_name: "minecraft:slowness",
id: 1u8,
category: MobEffectCategory::Harmful,
color: 9154528i32,
translation_key: "effect.minecraft.slowness",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::MOVEMENT_SPEED,
id: "minecraft:effect.slowness",
base_value: -0.15000000596046448f64,
operation: Operation::AddMultipliedTotal,
}],
};
pub const SPEED: Self = Self {
minecraft_name: "minecraft:speed",
id: 0u8,
category: MobEffectCategory::Beneficial,
color: 3402751i32,
translation_key: "effect.minecraft.speed",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::MOVEMENT_SPEED,
id: "minecraft:effect.speed",
base_value: 0.20000000298023224f64,
operation: Operation::AddMultipliedTotal,
}],
};
pub const STRENGTH: Self = Self {
minecraft_name: "minecraft:strength",
id: 4u8,
category: MobEffectCategory::Beneficial,
color: 16762624i32,
translation_key: "effect.minecraft.strength",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::ATTACK_DAMAGE,
id: "minecraft:effect.strength",
base_value: 3f64,
operation: Operation::AddValue,
}],
};
pub const TRIAL_OMEN: Self = Self {
minecraft_name: "minecraft:trial_omen",
id: 33u8,
category: MobEffectCategory::Neutral,
color: 1484454i32,
translation_key: "effect.minecraft.trial_omen",
attribute_modifiers: &[],
};
pub const UNLUCK: Self = Self {
minecraft_name: "minecraft:unluck",
id: 26u8,
category: MobEffectCategory::Harmful,
color: 12624973i32,
translation_key: "effect.minecraft.unluck",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::LUCK,
id: "minecraft:effect.unluck",
base_value: -1f64,
operation: Operation::AddValue,
}],
};
pub const WATER_BREATHING: Self = Self {
minecraft_name: "minecraft:water_breathing",
id: 12u8,
category: MobEffectCategory::Beneficial,
color: 10017472i32,
translation_key: "effect.minecraft.water_breathing",
attribute_modifiers: &[],
};
pub const WEAKNESS: Self = Self {
minecraft_name: "minecraft:weakness",
id: 17u8,
category: MobEffectCategory::Harmful,
color: 4738376i32,
translation_key: "effect.minecraft.weakness",
attribute_modifiers: &[Modifiers {
attribute: &Attributes::ATTACK_DAMAGE,
id: "minecraft:effect.weakness",
base_value: -4f64,
operation: Operation::AddValue,
}],
};
pub const WEAVING: Self = Self {
minecraft_name: "minecraft:weaving",
id: 36u8,
category: MobEffectCategory::Harmful,
color: 7891290i32,
translation_key: "effect.minecraft.weaving",
attribute_modifiers: &[],
};
pub const WIND_CHARGED: Self = Self {
minecraft_name: "minecraft:wind_charged",
id: 35u8,
category: MobEffectCategory::Harmful,
color: 12438015i32,
translation_key: "effect.minecraft.wind_charged",
attribute_modifiers: &[],
};
pub const WITHER: Self = Self {
minecraft_name: "minecraft:wither",
id: 19u8,
category: MobEffectCategory::Harmful,
color: 7561558i32,
translation_key: "effect.minecraft.wither",
attribute_modifiers: &[],
};
pub fn from_name(name: &str) -> Option<&'static Self> {
match name {
"absorption" => Some(&Self::ABSORPTION),
"bad_omen" => Some(&Self::BAD_OMEN),
"blindness" => Some(&Self::BLINDNESS),
"conduit_power" => Some(&Self::CONDUIT_POWER),
"darkness" => Some(&Self::DARKNESS),
"dolphins_grace" => Some(&Self::DOLPHINS_GRACE),
"fire_resistance" => Some(&Self::FIRE_RESISTANCE),
"glowing" => Some(&Self::GLOWING),
"haste" => Some(&Self::HASTE),
"health_boost" => Some(&Self::HEALTH_BOOST),
"hero_of_the_village" => Some(&Self::HERO_OF_THE_VILLAGE),
"hunger" => Some(&Self::HUNGER),
"infested" => Some(&Self::INFESTED),
"instant_damage" => Some(&Self::INSTANT_DAMAGE),
"instant_health" => Some(&Self::INSTANT_HEALTH),
"invisibility" => Some(&Self::INVISIBILITY),
"jump_boost" => Some(&Self::JUMP_BOOST),
"levitation" => Some(&Self::LEVITATION),
"luck" => Some(&Self::LUCK),
"mining_fatigue" => Some(&Self::MINING_FATIGUE),
"nausea" => Some(&Self::NAUSEA),
"night_vision" => Some(&Self::NIGHT_VISION),
"oozing" => Some(&Self::OOZING),
"poison" => Some(&Self::POISON),
"raid_omen" => Some(&Self::RAID_OMEN),
"regeneration" => Some(&Self::REGENERATION),
"resistance" => Some(&Self::RESISTANCE),
"saturation" => Some(&Self::SATURATION),
"slow_falling" => Some(&Self::SLOW_FALLING),
"slowness" => Some(&Self::SLOWNESS),
"speed" => Some(&Self::SPEED),
"strength" => Some(&Self::STRENGTH),
"trial_omen" => Some(&Self::TRIAL_OMEN),
"unluck" => Some(&Self::UNLUCK),
"water_breathing" => Some(&Self::WATER_BREATHING),
"weakness" => Some(&Self::WEAKNESS),
"weaving" => Some(&Self::WEAVING),
"wind_charged" => Some(&Self::WIND_CHARGED),
"wither" => Some(&Self::WITHER),
_ => None,
}
}
pub fn from_minecraft_name(name: &str) -> Option<&'static Self> {
match name {
"absorption" => Some(&Self::ABSORPTION),
"bad_omen" => Some(&Self::BAD_OMEN),
"blindness" => Some(&Self::BLINDNESS),
"conduit_power" => Some(&Self::CONDUIT_POWER),
"darkness" => Some(&Self::DARKNESS),
"dolphins_grace" => Some(&Self::DOLPHINS_GRACE),
"fire_resistance" => Some(&Self::FIRE_RESISTANCE),
"glowing" => Some(&Self::GLOWING),
"haste" => Some(&Self::HASTE),
"health_boost" => Some(&Self::HEALTH_BOOST),
"hero_of_the_village" => Some(&Self::HERO_OF_THE_VILLAGE),
"hunger" => Some(&Self::HUNGER),
"infested" => Some(&Self::INFESTED),
"instant_damage" => Some(&Self::INSTANT_DAMAGE),
"instant_health" => Some(&Self::INSTANT_HEALTH),
"invisibility" => Some(&Self::INVISIBILITY),
"jump_boost" => Some(&Self::JUMP_BOOST),
"levitation" => Some(&Self::LEVITATION),
"luck" => Some(&Self::LUCK),
"mining_fatigue" => Some(&Self::MINING_FATIGUE),
"nausea" => Some(&Self::NAUSEA),
"night_vision" => Some(&Self::NIGHT_VISION),
"oozing" => Some(&Self::OOZING),
"poison" => Some(&Self::POISON),
"raid_omen" => Some(&Self::RAID_OMEN),
"regeneration" => Some(&Self::REGENERATION),
"resistance" => Some(&Self::RESISTANCE),
"saturation" => Some(&Self::SATURATION),
"slow_falling" => Some(&Self::SLOW_FALLING),
"slowness" => Some(&Self::SLOWNESS),
"speed" => Some(&Self::SPEED),
"strength" => Some(&Self::STRENGTH),
"trial_omen" => Some(&Self::TRIAL_OMEN),
"unluck" => Some(&Self::UNLUCK),
"water_breathing" => Some(&Self::WATER_BREATHING),
"weakness" => Some(&Self::WEAKNESS),
"weaving" => Some(&Self::WEAVING),
"wind_charged" => Some(&Self::WIND_CHARGED),
"wither" => Some(&Self::WITHER),
_ => None,
}
}
}

View File

@ -0,0 +1,677 @@
/* This file is generated. Do not edit manually. */
use crate::data_component_impl::EnchantmentsImpl;
use crate::item::Item;
use crate::tag::Enchantment as EnchantmentTag;
use crate::tag::Item as ItemTag;
use crate::tag::{RegistryKey, Tag, Taggable};
use pumpkin_util::text::TextComponent;
use pumpkin_util::text::color::NamedColor;
use std::hash::{Hash, Hasher};
use std::slice::Iter;
pub struct Enchantment {
pub id: u8,
pub name: &'static str,
pub registry_key: &'static str,
pub description: &'static str,
pub anvil_cost: u32,
pub supported_items: &'static Tag,
pub exclusive_set: Option<&'static Tag>,
pub max_level: i32,
pub slots: &'static [AttributeModifierSlot],
}
impl Taggable for Enchantment {
#[inline]
fn tag_key() -> RegistryKey {
RegistryKey::Enchantment
}
#[inline]
fn registry_key(&self) -> &str {
self.registry_key
}
#[inline]
fn registry_id(&self) -> u16 {
self.id as u16
}
}
impl PartialEq for Enchantment {
fn eq(&self, other: &Self) -> bool {
self.id == other.id
}
}
impl Eq for Enchantment {}
impl Hash for Enchantment {
fn hash<H: Hasher>(&self, state: &mut H) {
self.id.hash(state);
}
}
#[derive(Debug, Clone, Hash, PartialEq)]
pub enum AttributeModifierSlot {
Any,
MainHand,
OffHand,
Hand,
Feet,
Legs,
Chest,
Head,
Armor,
Body,
Saddle,
}
impl Enchantment {
pub const AQUA_AFFINITY: Self = Self {
id: 0u8,
name: "minecraft:aqua_affinity",
description: "enchantment.minecraft.aqua_affinity",
registry_key: "aqua_affinity",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_HEAD_ARMOR,
exclusive_set: None,
max_level: 1i32,
slots: &[AttributeModifierSlot::Head],
};
pub const BANE_OF_ARTHROPODS: Self = Self {
id: 1u8,
name: "minecraft:bane_of_arthropods",
registry_key: "bane_of_arthropods",
description: "enchantment.minecraft.bane_of_arthropods",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_WEAPON,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_DAMAGE),
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const BINDING_CURSE: Self = Self {
id: 2u8,
name: "minecraft:binding_curse",
description: "enchantment.minecraft.binding_curse",
registry_key: "binding_curse",
anvil_cost: 8u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_EQUIPPABLE,
exclusive_set: None,
max_level: 1i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const BLAST_PROTECTION: Self = Self {
id: 3u8,
name: "minecraft:blast_protection",
registry_key: "blast_protection",
description: "enchantment.minecraft.blast_protection",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_ARMOR,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_ARMOR),
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const BREACH: Self = Self {
id: 4u8,
name: "minecraft:breach",
registry_key: "breach",
description: "enchantment.minecraft.breach",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_MACE,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_DAMAGE),
max_level: 4i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const CHANNELING: Self = Self {
id: 5u8,
name: "minecraft:channeling",
description: "enchantment.minecraft.channeling",
registry_key: "channeling",
anvil_cost: 8u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_TRIDENT,
exclusive_set: None,
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const DENSITY: Self = Self {
id: 6u8,
name: "minecraft:density",
registry_key: "density",
description: "enchantment.minecraft.density",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_MACE,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_DAMAGE),
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const DEPTH_STRIDER: Self = Self {
id: 7u8,
name: "minecraft:depth_strider",
registry_key: "depth_strider",
description: "enchantment.minecraft.depth_strider",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_FOOT_ARMOR,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_BOOTS),
max_level: 3i32,
slots: &[AttributeModifierSlot::Feet],
};
pub const EFFICIENCY: Self = Self {
id: 8u8,
name: "minecraft:efficiency",
description: "enchantment.minecraft.efficiency",
registry_key: "efficiency",
anvil_cost: 1u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_MINING,
exclusive_set: None,
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const FEATHER_FALLING: Self = Self {
id: 9u8,
name: "minecraft:feather_falling",
description: "enchantment.minecraft.feather_falling",
registry_key: "feather_falling",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_FOOT_ARMOR,
exclusive_set: None,
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const FIRE_ASPECT: Self = Self {
id: 10u8,
name: "minecraft:fire_aspect",
description: "enchantment.minecraft.fire_aspect",
registry_key: "fire_aspect",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_FIRE_ASPECT,
exclusive_set: None,
max_level: 2i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const FIRE_PROTECTION: Self = Self {
id: 11u8,
name: "minecraft:fire_protection",
registry_key: "fire_protection",
description: "enchantment.minecraft.fire_protection",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_ARMOR,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_ARMOR),
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const FLAME: Self = Self {
id: 12u8,
name: "minecraft:flame",
description: "enchantment.minecraft.flame",
registry_key: "flame",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_BOW,
exclusive_set: None,
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const FORTUNE: Self = Self {
id: 13u8,
name: "minecraft:fortune",
registry_key: "fortune",
description: "enchantment.minecraft.fortune",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_MINING_LOOT,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_MINING),
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const FROST_WALKER: Self = Self {
id: 14u8,
name: "minecraft:frost_walker",
registry_key: "frost_walker",
description: "enchantment.minecraft.frost_walker",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_FOOT_ARMOR,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_BOOTS),
max_level: 2i32,
slots: &[AttributeModifierSlot::Feet],
};
pub const IMPALING: Self = Self {
id: 15u8,
name: "minecraft:impaling",
registry_key: "impaling",
description: "enchantment.minecraft.impaling",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_TRIDENT,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_DAMAGE),
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const INFINITY: Self = Self {
id: 16u8,
name: "minecraft:infinity",
registry_key: "infinity",
description: "enchantment.minecraft.infinity",
anvil_cost: 8u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_BOW,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_BOW),
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const KNOCKBACK: Self = Self {
id: 17u8,
name: "minecraft:knockback",
description: "enchantment.minecraft.knockback",
registry_key: "knockback",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_MELEE_WEAPON,
exclusive_set: None,
max_level: 2i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const LOOTING: Self = Self {
id: 18u8,
name: "minecraft:looting",
description: "enchantment.minecraft.looting",
registry_key: "looting",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_MELEE_WEAPON,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const LOYALTY: Self = Self {
id: 19u8,
name: "minecraft:loyalty",
description: "enchantment.minecraft.loyalty",
registry_key: "loyalty",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_TRIDENT,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const LUCK_OF_THE_SEA: Self = Self {
id: 20u8,
name: "minecraft:luck_of_the_sea",
description: "enchantment.minecraft.luck_of_the_sea",
registry_key: "luck_of_the_sea",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_FISHING,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const LUNGE: Self = Self {
id: 21u8,
name: "minecraft:lunge",
description: "enchantment.minecraft.lunge",
registry_key: "lunge",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_LUNGE,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::Hand],
};
pub const LURE: Self = Self {
id: 22u8,
name: "minecraft:lure",
description: "enchantment.minecraft.lure",
registry_key: "lure",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_FISHING,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MENDING: Self = Self {
id: 23u8,
name: "minecraft:mending",
description: "enchantment.minecraft.mending",
registry_key: "mending",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_DURABILITY,
exclusive_set: None,
max_level: 1i32,
slots: &[AttributeModifierSlot::Any],
};
pub const MULTISHOT: Self = Self {
id: 24u8,
name: "minecraft:multishot",
registry_key: "multishot",
description: "enchantment.minecraft.multishot",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_CROSSBOW,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_CROSSBOW),
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const PIERCING: Self = Self {
id: 25u8,
name: "minecraft:piercing",
registry_key: "piercing",
description: "enchantment.minecraft.piercing",
anvil_cost: 1u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_CROSSBOW,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_CROSSBOW),
max_level: 4i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const POWER: Self = Self {
id: 26u8,
name: "minecraft:power",
description: "enchantment.minecraft.power",
registry_key: "power",
anvil_cost: 1u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_BOW,
exclusive_set: None,
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const PROJECTILE_PROTECTION: Self = Self {
id: 27u8,
name: "minecraft:projectile_protection",
registry_key: "projectile_protection",
description: "enchantment.minecraft.projectile_protection",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_ARMOR,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_ARMOR),
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const PROTECTION: Self = Self {
id: 28u8,
name: "minecraft:protection",
registry_key: "protection",
description: "enchantment.minecraft.protection",
anvil_cost: 1u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_ARMOR,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_ARMOR),
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const PUNCH: Self = Self {
id: 29u8,
name: "minecraft:punch",
description: "enchantment.minecraft.punch",
registry_key: "punch",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_BOW,
exclusive_set: None,
max_level: 2i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const QUICK_CHARGE: Self = Self {
id: 30u8,
name: "minecraft:quick_charge",
description: "enchantment.minecraft.quick_charge",
registry_key: "quick_charge",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_CROSSBOW,
exclusive_set: None,
max_level: 3i32,
slots: &[
AttributeModifierSlot::MainHand,
AttributeModifierSlot::OffHand,
],
};
pub const RESPIRATION: Self = Self {
id: 31u8,
name: "minecraft:respiration",
description: "enchantment.minecraft.respiration",
registry_key: "respiration",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_HEAD_ARMOR,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::Head],
};
pub const RIPTIDE: Self = Self {
id: 32u8,
name: "minecraft:riptide",
registry_key: "riptide",
description: "enchantment.minecraft.riptide",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_TRIDENT,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_RIPTIDE),
max_level: 3i32,
slots: &[AttributeModifierSlot::Hand],
};
pub const SHARPNESS: Self = Self {
id: 33u8,
name: "minecraft:sharpness",
registry_key: "sharpness",
description: "enchantment.minecraft.sharpness",
anvil_cost: 1u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_SHARP_WEAPON,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_DAMAGE),
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const SILK_TOUCH: Self = Self {
id: 34u8,
name: "minecraft:silk_touch",
registry_key: "silk_touch",
description: "enchantment.minecraft.silk_touch",
anvil_cost: 8u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_MINING_LOOT,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_MINING),
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const SMITE: Self = Self {
id: 35u8,
name: "minecraft:smite",
registry_key: "smite",
description: "enchantment.minecraft.smite",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_WEAPON,
exclusive_set: Some(&EnchantmentTag::MINECRAFT_EXCLUSIVE_SET_DAMAGE),
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const SOUL_SPEED: Self = Self {
id: 36u8,
name: "minecraft:soul_speed",
description: "enchantment.minecraft.soul_speed",
registry_key: "soul_speed",
anvil_cost: 8u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_FOOT_ARMOR,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::Feet],
};
pub const SWEEPING_EDGE: Self = Self {
id: 37u8,
name: "minecraft:sweeping_edge",
description: "enchantment.minecraft.sweeping_edge",
registry_key: "sweeping_edge",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_SWEEPING,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const SWIFT_SNEAK: Self = Self {
id: 38u8,
name: "minecraft:swift_sneak",
description: "enchantment.minecraft.swift_sneak",
registry_key: "swift_sneak",
anvil_cost: 8u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_LEG_ARMOR,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::Legs],
};
pub const THORNS: Self = Self {
id: 39u8,
name: "minecraft:thorns",
description: "enchantment.minecraft.thorns",
registry_key: "thorns",
anvil_cost: 8u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_ARMOR,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::Any],
};
pub const UNBREAKING: Self = Self {
id: 40u8,
name: "minecraft:unbreaking",
description: "enchantment.minecraft.unbreaking",
registry_key: "unbreaking",
anvil_cost: 2u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_DURABILITY,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::Any],
};
pub const VANISHING_CURSE: Self = Self {
id: 41u8,
name: "minecraft:vanishing_curse",
description: "enchantment.minecraft.vanishing_curse",
registry_key: "vanishing_curse",
anvil_cost: 8u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_VANISHING,
exclusive_set: None,
max_level: 1i32,
slots: &[AttributeModifierSlot::Any],
};
pub const WIND_BURST: Self = Self {
id: 42u8,
name: "minecraft:wind_burst",
description: "enchantment.minecraft.wind_burst",
registry_key: "wind_burst",
anvil_cost: 4u32,
supported_items: &ItemTag::MINECRAFT_ENCHANTABLE_MACE,
exclusive_set: None,
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub fn from_name(name: &str) -> Option<&'static Self> {
match name {
"minecraft:aqua_affinity" => Some(&Self::AQUA_AFFINITY),
"minecraft:bane_of_arthropods" => Some(&Self::BANE_OF_ARTHROPODS),
"minecraft:binding_curse" => Some(&Self::BINDING_CURSE),
"minecraft:blast_protection" => Some(&Self::BLAST_PROTECTION),
"minecraft:breach" => Some(&Self::BREACH),
"minecraft:channeling" => Some(&Self::CHANNELING),
"minecraft:density" => Some(&Self::DENSITY),
"minecraft:depth_strider" => Some(&Self::DEPTH_STRIDER),
"minecraft:efficiency" => Some(&Self::EFFICIENCY),
"minecraft:feather_falling" => Some(&Self::FEATHER_FALLING),
"minecraft:fire_aspect" => Some(&Self::FIRE_ASPECT),
"minecraft:fire_protection" => Some(&Self::FIRE_PROTECTION),
"minecraft:flame" => Some(&Self::FLAME),
"minecraft:fortune" => Some(&Self::FORTUNE),
"minecraft:frost_walker" => Some(&Self::FROST_WALKER),
"minecraft:impaling" => Some(&Self::IMPALING),
"minecraft:infinity" => Some(&Self::INFINITY),
"minecraft:knockback" => Some(&Self::KNOCKBACK),
"minecraft:looting" => Some(&Self::LOOTING),
"minecraft:loyalty" => Some(&Self::LOYALTY),
"minecraft:luck_of_the_sea" => Some(&Self::LUCK_OF_THE_SEA),
"minecraft:lunge" => Some(&Self::LUNGE),
"minecraft:lure" => Some(&Self::LURE),
"minecraft:mending" => Some(&Self::MENDING),
"minecraft:multishot" => Some(&Self::MULTISHOT),
"minecraft:piercing" => Some(&Self::PIERCING),
"minecraft:power" => Some(&Self::POWER),
"minecraft:projectile_protection" => Some(&Self::PROJECTILE_PROTECTION),
"minecraft:protection" => Some(&Self::PROTECTION),
"minecraft:punch" => Some(&Self::PUNCH),
"minecraft:quick_charge" => Some(&Self::QUICK_CHARGE),
"minecraft:respiration" => Some(&Self::RESPIRATION),
"minecraft:riptide" => Some(&Self::RIPTIDE),
"minecraft:sharpness" => Some(&Self::SHARPNESS),
"minecraft:silk_touch" => Some(&Self::SILK_TOUCH),
"minecraft:smite" => Some(&Self::SMITE),
"minecraft:soul_speed" => Some(&Self::SOUL_SPEED),
"minecraft:sweeping_edge" => Some(&Self::SWEEPING_EDGE),
"minecraft:swift_sneak" => Some(&Self::SWIFT_SNEAK),
"minecraft:thorns" => Some(&Self::THORNS),
"minecraft:unbreaking" => Some(&Self::UNBREAKING),
"minecraft:vanishing_curse" => Some(&Self::VANISHING_CURSE),
"minecraft:wind_burst" => Some(&Self::WIND_BURST),
_ => None,
}
}
pub fn from_id(id: u8) -> Option<&'static Self> {
match id {
0u8 => Some(&Self::AQUA_AFFINITY),
1u8 => Some(&Self::BANE_OF_ARTHROPODS),
2u8 => Some(&Self::BINDING_CURSE),
3u8 => Some(&Self::BLAST_PROTECTION),
4u8 => Some(&Self::BREACH),
5u8 => Some(&Self::CHANNELING),
6u8 => Some(&Self::DENSITY),
7u8 => Some(&Self::DEPTH_STRIDER),
8u8 => Some(&Self::EFFICIENCY),
9u8 => Some(&Self::FEATHER_FALLING),
10u8 => Some(&Self::FIRE_ASPECT),
11u8 => Some(&Self::FIRE_PROTECTION),
12u8 => Some(&Self::FLAME),
13u8 => Some(&Self::FORTUNE),
14u8 => Some(&Self::FROST_WALKER),
15u8 => Some(&Self::IMPALING),
16u8 => Some(&Self::INFINITY),
17u8 => Some(&Self::KNOCKBACK),
18u8 => Some(&Self::LOOTING),
19u8 => Some(&Self::LOYALTY),
20u8 => Some(&Self::LUCK_OF_THE_SEA),
21u8 => Some(&Self::LUNGE),
22u8 => Some(&Self::LURE),
23u8 => Some(&Self::MENDING),
24u8 => Some(&Self::MULTISHOT),
25u8 => Some(&Self::PIERCING),
26u8 => Some(&Self::POWER),
27u8 => Some(&Self::PROJECTILE_PROTECTION),
28u8 => Some(&Self::PROTECTION),
29u8 => Some(&Self::PUNCH),
30u8 => Some(&Self::QUICK_CHARGE),
31u8 => Some(&Self::RESPIRATION),
32u8 => Some(&Self::RIPTIDE),
33u8 => Some(&Self::SHARPNESS),
34u8 => Some(&Self::SILK_TOUCH),
35u8 => Some(&Self::SMITE),
36u8 => Some(&Self::SOUL_SPEED),
37u8 => Some(&Self::SWEEPING_EDGE),
38u8 => Some(&Self::SWIFT_SNEAK),
39u8 => Some(&Self::THORNS),
40u8 => Some(&Self::UNBREAKING),
41u8 => Some(&Self::VANISHING_CURSE),
42u8 => Some(&Self::WIND_BURST),
_ => None,
}
}
pub fn can_enchant(&self, item: &'static Item) -> bool {
self.supported_items.1.contains(&item.id)
}
pub fn are_compatible(&self, other: &'static Enchantment) -> bool {
if self == other {
return false;
}
if let Some(tag) = self.exclusive_set
&& tag.1.contains(&(other.id as u16))
{
return false;
}
if let Some(tag) = other.exclusive_set
&& tag.1.contains(&(self.id as u16))
{
return false;
}
true
}
pub fn is_enchantment_compatible(&self, other: &EnchantmentsImpl) -> bool {
for (i, _) in other.enchantment.iter() {
if !self.are_compatible(i) {
return false;
}
}
true
}
pub fn get_fullname(&self, level: i32) -> TextComponent {
let mut ret = TextComponent::translate(self.description, []).color_named(
if self.has_tag(&EnchantmentTag::MINECRAFT_CURSE) {
NamedColor::Red
} else {
NamedColor::Gray
},
);
if level != 1 || self.max_level != 1 {
ret = ret.add_text(" ").add_child(TextComponent::translate(
"enchantment.level.".to_string() + &level.to_string(),
[],
));
}
ret
}
}

View File

@ -0,0 +1,322 @@
#[derive(Debug)]
pub struct Enchantment {
anvil_cost: u32,
supported_items: String,
max_level: i32,
slots: &[AttributeModifierSlot],
}
pub enum AttributeModifierSlot {
Any,
MainHand,
OffHand,
Feet,
Legs,
Chest,
Head,
Body,
Saddle,
}
impl Enchantment {
pub const MINECRAFT_PIERCING: Enchantment = Enchantment {
anvil_cost: 1u32,
supported_items: "#minecraft:enchantable/crossbow",
max_level: 4i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_PROJECTILE_PROTECTION: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/armor",
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const MINECRAFT_PUNCH: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/bow",
max_level: 2i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_DEPTH_STRIDER: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/foot_armor",
max_level: 3i32,
slots: &[AttributeModifierSlot::Feet],
};
pub const MINECRAFT_IMPALING: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/trident",
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_MENDING: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/durability",
max_level: 1i32,
slots: &[AttributeModifierSlot::Any],
};
pub const MINECRAFT_MULTISHOT: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/crossbow",
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_LOOTING: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/sword",
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_BREACH: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/mace",
max_level: 4i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_SHARPNESS: Enchantment = Enchantment {
anvil_cost: 1u32,
supported_items: "#minecraft:enchantable/sharp_weapon",
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_SILK_TOUCH: Enchantment = Enchantment {
anvil_cost: 8u32,
supported_items: "#minecraft:enchantable/mining_loot",
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_THORNS: Enchantment = Enchantment {
anvil_cost: 8u32,
supported_items: "#minecraft:enchantable/armor",
max_level: 3i32,
slots: &[AttributeModifierSlot::Any],
};
pub const MINECRAFT_QUICK_CHARGE: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/crossbow",
max_level: 3i32,
slots: &[
AttributeModifierSlot::MainHand,
AttributeModifierSlot::OffHand,
],
};
pub const MINECRAFT_WIND_BURST: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/mace",
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_RIPTIDE: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/trident",
max_level: 3i32,
slots: &[AttributeModifierSlot::Hand],
};
pub const MINECRAFT_KNOCKBACK: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/sword",
max_level: 2i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_FIRE_PROTECTION: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/armor",
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const MINECRAFT_FLAME: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/bow",
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_BLAST_PROTECTION: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/armor",
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const MINECRAFT_VANISHING_CURSE: Enchantment = Enchantment {
anvil_cost: 8u32,
supported_items: "#minecraft:enchantable/vanishing",
max_level: 1i32,
slots: &[AttributeModifierSlot::Any],
};
pub const MINECRAFT_LURE: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/fishing",
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_CHANNELING: Enchantment = Enchantment {
anvil_cost: 8u32,
supported_items: "#minecraft:enchantable/trident",
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_EFFICIENCY: Enchantment = Enchantment {
anvil_cost: 1u32,
supported_items: "#minecraft:enchantable/mining",
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_UNBREAKING: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/durability",
max_level: 3i32,
slots: &[AttributeModifierSlot::Any],
};
pub const MINECRAFT_SWIFT_SNEAK: Enchantment = Enchantment {
anvil_cost: 8u32,
supported_items: "#minecraft:enchantable/leg_armor",
max_level: 3i32,
slots: &[AttributeModifierSlot::Legs],
};
pub const MINECRAFT_FIRE_ASPECT: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/fire_aspect",
max_level: 2i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_BINDING_CURSE: Enchantment = Enchantment {
anvil_cost: 8u32,
supported_items: "#minecraft:enchantable/equippable",
max_level: 1i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const MINECRAFT_SOUL_SPEED: Enchantment = Enchantment {
anvil_cost: 8u32,
supported_items: "#minecraft:enchantable/foot_armor",
max_level: 3i32,
slots: &[AttributeModifierSlot::Feet],
};
pub const MINECRAFT_SMITE: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/weapon",
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_FEATHER_FALLING: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/foot_armor",
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const MINECRAFT_INFINITY: Enchantment = Enchantment {
anvil_cost: 8u32,
supported_items: "#minecraft:enchantable/bow",
max_level: 1i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_BANE_OF_ARTHROPODS: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/weapon",
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_PROTECTION: Enchantment = Enchantment {
anvil_cost: 1u32,
supported_items: "#minecraft:enchantable/armor",
max_level: 4i32,
slots: &[AttributeModifierSlot::Armor],
};
pub const MINECRAFT_AQUA_AFFINITY: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/head_armor",
max_level: 1i32,
slots: &[AttributeModifierSlot::Head],
};
pub const MINECRAFT_FORTUNE: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/mining_loot",
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_FROST_WALKER: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/foot_armor",
max_level: 2i32,
slots: &[AttributeModifierSlot::Feet],
};
pub const MINECRAFT_POWER: Enchantment = Enchantment {
anvil_cost: 1u32,
supported_items: "#minecraft:enchantable/bow",
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_DENSITY: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/mace",
max_level: 5i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_LOYALTY: Enchantment = Enchantment {
anvil_cost: 2u32,
supported_items: "#minecraft:enchantable/trident",
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_SWEEPING_EDGE: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/sword",
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub const MINECRAFT_RESPIRATION: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/head_armor",
max_level: 3i32,
slots: &[AttributeModifierSlot::Head],
};
pub const MINECRAFT_LUCK_OF_THE_SEA: Enchantment = Enchantment {
anvil_cost: 4u32,
supported_items: "#minecraft:enchantable/fishing",
max_level: 3i32,
slots: &[AttributeModifierSlot::MainHand],
};
pub fn from_name(name: &str) -> Option<&'static Self> {
match name {
"minecraft:piercing" => Some(&Self::MINECRAFT_PIERCING),
"minecraft:projectile_protection" => Some(&Self::MINECRAFT_PROJECTILE_PROTECTION),
"minecraft:punch" => Some(&Self::MINECRAFT_PUNCH),
"minecraft:depth_strider" => Some(&Self::MINECRAFT_DEPTH_STRIDER),
"minecraft:impaling" => Some(&Self::MINECRAFT_IMPALING),
"minecraft:mending" => Some(&Self::MINECRAFT_MENDING),
"minecraft:multishot" => Some(&Self::MINECRAFT_MULTISHOT),
"minecraft:looting" => Some(&Self::MINECRAFT_LOOTING),
"minecraft:breach" => Some(&Self::MINECRAFT_BREACH),
"minecraft:sharpness" => Some(&Self::MINECRAFT_SHARPNESS),
"minecraft:silk_touch" => Some(&Self::MINECRAFT_SILK_TOUCH),
"minecraft:thorns" => Some(&Self::MINECRAFT_THORNS),
"minecraft:quick_charge" => Some(&Self::MINECRAFT_QUICK_CHARGE),
"minecraft:wind_burst" => Some(&Self::MINECRAFT_WIND_BURST),
"minecraft:riptide" => Some(&Self::MINECRAFT_RIPTIDE),
"minecraft:knockback" => Some(&Self::MINECRAFT_KNOCKBACK),
"minecraft:fire_protection" => Some(&Self::MINECRAFT_FIRE_PROTECTION),
"minecraft:flame" => Some(&Self::MINECRAFT_FLAME),
"minecraft:blast_protection" => Some(&Self::MINECRAFT_BLAST_PROTECTION),
"minecraft:vanishing_curse" => Some(&Self::MINECRAFT_VANISHING_CURSE),
"minecraft:lure" => Some(&Self::MINECRAFT_LURE),
"minecraft:channeling" => Some(&Self::MINECRAFT_CHANNELING),
"minecraft:efficiency" => Some(&Self::MINECRAFT_EFFICIENCY),
"minecraft:unbreaking" => Some(&Self::MINECRAFT_UNBREAKING),
"minecraft:swift_sneak" => Some(&Self::MINECRAFT_SWIFT_SNEAK),
"minecraft:fire_aspect" => Some(&Self::MINECRAFT_FIRE_ASPECT),
"minecraft:binding_curse" => Some(&Self::MINECRAFT_BINDING_CURSE),
"minecraft:soul_speed" => Some(&Self::MINECRAFT_SOUL_SPEED),
"minecraft:smite" => Some(&Self::MINECRAFT_SMITE),
"minecraft:feather_falling" => Some(&Self::MINECRAFT_FEATHER_FALLING),
"minecraft:infinity" => Some(&Self::MINECRAFT_INFINITY),
"minecraft:bane_of_arthropods" => Some(&Self::MINECRAFT_BANE_OF_ARTHROPODS),
"minecraft:protection" => Some(&Self::MINECRAFT_PROTECTION),
"minecraft:aqua_affinity" => Some(&Self::MINECRAFT_AQUA_AFFINITY),
"minecraft:fortune" => Some(&Self::MINECRAFT_FORTUNE),
"minecraft:frost_walker" => Some(&Self::MINECRAFT_FROST_WALKER),
"minecraft:power" => Some(&Self::MINECRAFT_POWER),
"minecraft:density" => Some(&Self::MINECRAFT_DENSITY),
"minecraft:loyalty" => Some(&Self::MINECRAFT_LOYALTY),
"minecraft:sweeping_edge" => Some(&Self::MINECRAFT_SWEEPING_EDGE),
"minecraft:respiration" => Some(&Self::MINECRAFT_RESPIRATION),
"minecraft:luck_of_the_sea" => Some(&Self::MINECRAFT_LUCK_OF_THE_SEA),
_ => None,
}
}
}

View File

@ -0,0 +1,22 @@
/* This file is generated. Do not edit manually. */
#[derive(PartialEq, Clone, Copy)]
pub enum EntityPose {
Standing,
FallFlying,
Sleeping,
Swimming,
SpinAttack,
Crouching,
LongJumping,
Dying,
Croaking,
UsingTongue,
Sitting,
Roaring,
Sniffing,
Emerging,
Digging,
Sliding,
Shooting,
Inhaling,
}

View File

@ -0,0 +1,64 @@
/* This file is generated. Do not edit manually. */
#[repr(u8)]
pub enum EntityStatus {
AddBreedingParticles = 18,
AddBubbleParticles = 67,
AddDeathParticles = 60,
AddDolphinHappyVillagerParticles = 38,
AddNegativePlayerReactionParticles = 6,
AddPortalParticles = 46,
AddPositivePlayerReactionParticles = 7,
AddSplashParticles = 42,
AddSprintingParticlesOrResetSpawnerMinecartSpawnDelay = 1,
AddVillagerAngryParticles = 13,
AddVillagerHappyParticles = 14,
AddVillagerHeartParticles = 12,
AddWitchParticles = 15,
BreakBody = 65,
BreakChest = 50,
BreakFeet = 52,
BreakHead = 49,
BreakLegs = 51,
BreakMainhand = 47,
BreakOffhand = 48,
BreakSaddle = 68,
ConsumeItem = 9,
CreateEatingParticles = 45,
DripHoney = 53,
DripRichHoney = 54,
EarsTwitch = 61,
ExplodeFireworkClient = 17,
FinishRam = 59,
HitArmorStand = 32,
InvulnerableCreakingHit = 66,
KineticAttack = 2,
LookAtVillager = 11,
Peeking = 64,
PlayAttackSound = 4,
PlayCureZombieVillagerSound = 16,
PlayDeathSoundOrAddProjectileHitParticles = 3,
PlayGuardianAttackSound = 21,
PlaySpawnEffects = 20,
PrepareRam = 58,
PullHookedEntity = 31,
RavagerRoar = 69,
ResetSquidThrustTimer = 19,
ResetWolfShake = 56,
SetOpLevel0 = 24,
SetOpLevel1 = 25,
SetOpLevel2 = 26,
SetOpLevel3 = 27,
SetOpLevel4 = 28,
SetSheepEatGrassTimerOrPrimeTntMinecart = 10,
ShakeOffWater = 8,
SonicBoom = 62,
StartDigging = 63,
StopLookingAtVillager = 34,
StunRavager = 39,
SwapHands = 55,
TameOcelotFailed = 40,
TameOcelotSuccess = 41,
UseFullDebugInfo = 23,
UseReducedDebugInfo = 22,
UseTotemOfUndying = 35,
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,44 @@
/* This file is generated. Do not edit manually. */
#[must_use]
pub const fn get_potted_item(item_id: u16) -> u16 {
match item_id {
49 => 412,
50 => 413,
51 => 414,
52 => 415,
53 => 416,
54 => 417,
55 => 418,
56 => 419,
57 => 420,
203 => 421,
205 => 1146,
206 => 1147,
207 => 437,
229 => 422,
230 => 1163,
231 => 1164,
232 => 423,
233 => 424,
234 => 425,
235 => 426,
236 => 427,
237 => 428,
238 => 429,
239 => 430,
240 => 431,
241 => 432,
242 => 433,
243 => 434,
244 => 411,
247 => 436,
248 => 435,
249 => 917,
250 => 918,
251 => 919,
252 => 920,
269 => 791,
340 => 438,
_ => 0,
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,573 @@
/* This file is generated. Do not edit manually. */
pub const FUELS: [(u16, u16); 280usize] = [
(36u16, 300u16),
(37u16, 300u16),
(38u16, 300u16),
(39u16, 300u16),
(40u16, 300u16),
(41u16, 300u16),
(42u16, 300u16),
(43u16, 300u16),
(44u16, 300u16),
(45u16, 300u16),
(48u16, 300u16),
(49u16, 100u16),
(50u16, 100u16),
(51u16, 100u16),
(52u16, 100u16),
(53u16, 100u16),
(54u16, 100u16),
(55u16, 100u16),
(56u16, 100u16),
(57u16, 100u16),
(83u16, 16000u16),
(134u16, 300u16),
(135u16, 300u16),
(136u16, 300u16),
(137u16, 300u16),
(138u16, 300u16),
(139u16, 300u16),
(140u16, 300u16),
(141u16, 300u16),
(142u16, 300u16),
(143u16, 300u16),
(147u16, 300u16),
(148u16, 300u16),
(149u16, 300u16),
(150u16, 300u16),
(151u16, 300u16),
(152u16, 300u16),
(153u16, 300u16),
(154u16, 300u16),
(155u16, 300u16),
(156u16, 300u16),
(159u16, 300u16),
(160u16, 300u16),
(161u16, 300u16),
(162u16, 300u16),
(163u16, 300u16),
(164u16, 300u16),
(165u16, 300u16),
(166u16, 300u16),
(167u16, 300u16),
(170u16, 300u16),
(171u16, 300u16),
(172u16, 300u16),
(173u16, 300u16),
(174u16, 300u16),
(175u16, 300u16),
(176u16, 300u16),
(177u16, 300u16),
(178u16, 300u16),
(179u16, 300u16),
(205u16, 100u16),
(206u16, 100u16),
(207u16, 100u16),
(209u16, 100u16),
(210u16, 100u16),
(213u16, 100u16),
(214u16, 100u16),
(215u16, 100u16),
(216u16, 100u16),
(217u16, 100u16),
(218u16, 100u16),
(219u16, 100u16),
(220u16, 100u16),
(221u16, 100u16),
(222u16, 100u16),
(223u16, 100u16),
(224u16, 100u16),
(225u16, 100u16),
(226u16, 100u16),
(227u16, 100u16),
(228u16, 100u16),
(260u16, 100u16),
(269u16, 50u16),
(270u16, 150u16),
(271u16, 150u16),
(272u16, 150u16),
(273u16, 150u16),
(274u16, 150u16),
(275u16, 150u16),
(276u16, 150u16),
(277u16, 150u16),
(278u16, 150u16),
(279u16, 150u16),
(280u16, 150u16),
(305u16, 300u16),
(306u16, 300u16),
(307u16, 300u16),
(308u16, 300u16),
(310u16, 300u16),
(311u16, 300u16),
(312u16, 300u16),
(313u16, 300u16),
(314u16, 300u16),
(315u16, 300u16),
(317u16, 300u16),
(318u16, 300u16),
(331u16, 300u16),
(332u16, 300u16),
(335u16, 300u16),
(343u16, 300u16),
(344u16, 300u16),
(345u16, 300u16),
(346u16, 300u16),
(347u16, 300u16),
(348u16, 300u16),
(349u16, 300u16),
(350u16, 300u16),
(351u16, 300u16),
(352u16, 300u16),
(353u16, 300u16),
(441u16, 300u16),
(442u16, 300u16),
(443u16, 300u16),
(444u16, 300u16),
(445u16, 300u16),
(446u16, 300u16),
(447u16, 300u16),
(448u16, 300u16),
(449u16, 300u16),
(450u16, 300u16),
(451u16, 300u16),
(505u16, 67u16),
(506u16, 67u16),
(507u16, 67u16),
(508u16, 67u16),
(509u16, 67u16),
(510u16, 67u16),
(511u16, 67u16),
(512u16, 67u16),
(513u16, 67u16),
(514u16, 67u16),
(515u16, 67u16),
(516u16, 67u16),
(517u16, 67u16),
(518u16, 67u16),
(519u16, 67u16),
(520u16, 67u16),
(716u16, 50u16),
(730u16, 300u16),
(741u16, 300u16),
(745u16, 300u16),
(748u16, 300u16),
(751u16, 100u16),
(752u16, 100u16),
(753u16, 100u16),
(754u16, 100u16),
(755u16, 100u16),
(756u16, 100u16),
(757u16, 100u16),
(758u16, 100u16),
(759u16, 100u16),
(760u16, 100u16),
(767u16, 300u16),
(768u16, 300u16),
(769u16, 300u16),
(770u16, 300u16),
(771u16, 300u16),
(772u16, 300u16),
(773u16, 300u16),
(774u16, 300u16),
(775u16, 300u16),
(776u16, 300u16),
(780u16, 200u16),
(781u16, 200u16),
(782u16, 200u16),
(783u16, 200u16),
(784u16, 200u16),
(785u16, 200u16),
(786u16, 200u16),
(787u16, 200u16),
(788u16, 200u16),
(789u16, 200u16),
(801u16, 300u16),
(802u16, 300u16),
(803u16, 300u16),
(804u16, 300u16),
(805u16, 300u16),
(806u16, 300u16),
(807u16, 300u16),
(808u16, 300u16),
(809u16, 300u16),
(810u16, 300u16),
(821u16, 300u16),
(822u16, 300u16),
(823u16, 300u16),
(824u16, 300u16),
(825u16, 300u16),
(826u16, 300u16),
(827u16, 300u16),
(828u16, 300u16),
(829u16, 300u16),
(830u16, 300u16),
(863u16, 1200u16),
(864u16, 1200u16),
(865u16, 1200u16),
(866u16, 1200u16),
(867u16, 1200u16),
(868u16, 1200u16),
(869u16, 1200u16),
(870u16, 1200u16),
(871u16, 1200u16),
(872u16, 1200u16),
(873u16, 1200u16),
(874u16, 1200u16),
(875u16, 1200u16),
(876u16, 1200u16),
(877u16, 1200u16),
(878u16, 1200u16),
(879u16, 1200u16),
(880u16, 1200u16),
(881u16, 1200u16),
(882u16, 1200u16),
(892u16, 100u16),
(894u16, 300u16),
(896u16, 1600u16),
(897u16, 1600u16),
(911u16, 200u16),
(912u16, 200u16),
(913u16, 200u16),
(914u16, 200u16),
(915u16, 200u16),
(946u16, 100u16),
(988u16, 200u16),
(989u16, 200u16),
(990u16, 200u16),
(991u16, 200u16),
(992u16, 200u16),
(993u16, 200u16),
(994u16, 200u16),
(995u16, 200u16),
(996u16, 200u16),
(997u16, 200u16),
(1000u16, 800u16),
(1001u16, 800u16),
(1002u16, 800u16),
(1003u16, 800u16),
(1004u16, 800u16),
(1005u16, 800u16),
(1006u16, 800u16),
(1007u16, 800u16),
(1008u16, 800u16),
(1009u16, 800u16),
(1014u16, 20000u16),
(1027u16, 4001u16),
(1053u16, 300u16),
(1116u16, 2400u16),
(1266u16, 300u16),
(1267u16, 300u16),
(1268u16, 300u16),
(1269u16, 300u16),
(1270u16, 300u16),
(1271u16, 300u16),
(1272u16, 300u16),
(1273u16, 300u16),
(1274u16, 300u16),
(1275u16, 300u16),
(1276u16, 300u16),
(1277u16, 300u16),
(1278u16, 300u16),
(1279u16, 300u16),
(1280u16, 300u16),
(1281u16, 300u16),
(1296u16, 200u16),
(1339u16, 300u16),
(1341u16, 300u16),
(1353u16, 300u16),
(1354u16, 300u16),
(1357u16, 300u16),
(1358u16, 300u16),
(1360u16, 300u16),
];
#[must_use]
pub const fn get_item_burn_ticks(item_id: u16) -> Option<u16> {
match item_id {
36u16 => Some(300u16),
37u16 => Some(300u16),
38u16 => Some(300u16),
39u16 => Some(300u16),
40u16 => Some(300u16),
41u16 => Some(300u16),
42u16 => Some(300u16),
43u16 => Some(300u16),
44u16 => Some(300u16),
45u16 => Some(300u16),
48u16 => Some(300u16),
49u16 => Some(100u16),
50u16 => Some(100u16),
51u16 => Some(100u16),
52u16 => Some(100u16),
53u16 => Some(100u16),
54u16 => Some(100u16),
55u16 => Some(100u16),
56u16 => Some(100u16),
57u16 => Some(100u16),
83u16 => Some(16000u16),
134u16 => Some(300u16),
135u16 => Some(300u16),
136u16 => Some(300u16),
137u16 => Some(300u16),
138u16 => Some(300u16),
139u16 => Some(300u16),
140u16 => Some(300u16),
141u16 => Some(300u16),
142u16 => Some(300u16),
143u16 => Some(300u16),
147u16 => Some(300u16),
148u16 => Some(300u16),
149u16 => Some(300u16),
150u16 => Some(300u16),
151u16 => Some(300u16),
152u16 => Some(300u16),
153u16 => Some(300u16),
154u16 => Some(300u16),
155u16 => Some(300u16),
156u16 => Some(300u16),
159u16 => Some(300u16),
160u16 => Some(300u16),
161u16 => Some(300u16),
162u16 => Some(300u16),
163u16 => Some(300u16),
164u16 => Some(300u16),
165u16 => Some(300u16),
166u16 => Some(300u16),
167u16 => Some(300u16),
170u16 => Some(300u16),
171u16 => Some(300u16),
172u16 => Some(300u16),
173u16 => Some(300u16),
174u16 => Some(300u16),
175u16 => Some(300u16),
176u16 => Some(300u16),
177u16 => Some(300u16),
178u16 => Some(300u16),
179u16 => Some(300u16),
205u16 => Some(100u16),
206u16 => Some(100u16),
207u16 => Some(100u16),
209u16 => Some(100u16),
210u16 => Some(100u16),
213u16 => Some(100u16),
214u16 => Some(100u16),
215u16 => Some(100u16),
216u16 => Some(100u16),
217u16 => Some(100u16),
218u16 => Some(100u16),
219u16 => Some(100u16),
220u16 => Some(100u16),
221u16 => Some(100u16),
222u16 => Some(100u16),
223u16 => Some(100u16),
224u16 => Some(100u16),
225u16 => Some(100u16),
226u16 => Some(100u16),
227u16 => Some(100u16),
228u16 => Some(100u16),
260u16 => Some(100u16),
269u16 => Some(50u16),
270u16 => Some(150u16),
271u16 => Some(150u16),
272u16 => Some(150u16),
273u16 => Some(150u16),
274u16 => Some(150u16),
275u16 => Some(150u16),
276u16 => Some(150u16),
277u16 => Some(150u16),
278u16 => Some(150u16),
279u16 => Some(150u16),
280u16 => Some(150u16),
305u16 => Some(300u16),
306u16 => Some(300u16),
307u16 => Some(300u16),
308u16 => Some(300u16),
310u16 => Some(300u16),
311u16 => Some(300u16),
312u16 => Some(300u16),
313u16 => Some(300u16),
314u16 => Some(300u16),
315u16 => Some(300u16),
317u16 => Some(300u16),
318u16 => Some(300u16),
331u16 => Some(300u16),
332u16 => Some(300u16),
335u16 => Some(300u16),
343u16 => Some(300u16),
344u16 => Some(300u16),
345u16 => Some(300u16),
346u16 => Some(300u16),
347u16 => Some(300u16),
348u16 => Some(300u16),
349u16 => Some(300u16),
350u16 => Some(300u16),
351u16 => Some(300u16),
352u16 => Some(300u16),
353u16 => Some(300u16),
441u16 => Some(300u16),
442u16 => Some(300u16),
443u16 => Some(300u16),
444u16 => Some(300u16),
445u16 => Some(300u16),
446u16 => Some(300u16),
447u16 => Some(300u16),
448u16 => Some(300u16),
449u16 => Some(300u16),
450u16 => Some(300u16),
451u16 => Some(300u16),
505u16 => Some(67u16),
506u16 => Some(67u16),
507u16 => Some(67u16),
508u16 => Some(67u16),
509u16 => Some(67u16),
510u16 => Some(67u16),
511u16 => Some(67u16),
512u16 => Some(67u16),
513u16 => Some(67u16),
514u16 => Some(67u16),
515u16 => Some(67u16),
516u16 => Some(67u16),
517u16 => Some(67u16),
518u16 => Some(67u16),
519u16 => Some(67u16),
520u16 => Some(67u16),
716u16 => Some(50u16),
730u16 => Some(300u16),
741u16 => Some(300u16),
745u16 => Some(300u16),
748u16 => Some(300u16),
751u16 => Some(100u16),
752u16 => Some(100u16),
753u16 => Some(100u16),
754u16 => Some(100u16),
755u16 => Some(100u16),
756u16 => Some(100u16),
757u16 => Some(100u16),
758u16 => Some(100u16),
759u16 => Some(100u16),
760u16 => Some(100u16),
767u16 => Some(300u16),
768u16 => Some(300u16),
769u16 => Some(300u16),
770u16 => Some(300u16),
771u16 => Some(300u16),
772u16 => Some(300u16),
773u16 => Some(300u16),
774u16 => Some(300u16),
775u16 => Some(300u16),
776u16 => Some(300u16),
780u16 => Some(200u16),
781u16 => Some(200u16),
782u16 => Some(200u16),
783u16 => Some(200u16),
784u16 => Some(200u16),
785u16 => Some(200u16),
786u16 => Some(200u16),
787u16 => Some(200u16),
788u16 => Some(200u16),
789u16 => Some(200u16),
801u16 => Some(300u16),
802u16 => Some(300u16),
803u16 => Some(300u16),
804u16 => Some(300u16),
805u16 => Some(300u16),
806u16 => Some(300u16),
807u16 => Some(300u16),
808u16 => Some(300u16),
809u16 => Some(300u16),
810u16 => Some(300u16),
821u16 => Some(300u16),
822u16 => Some(300u16),
823u16 => Some(300u16),
824u16 => Some(300u16),
825u16 => Some(300u16),
826u16 => Some(300u16),
827u16 => Some(300u16),
828u16 => Some(300u16),
829u16 => Some(300u16),
830u16 => Some(300u16),
863u16 => Some(1200u16),
864u16 => Some(1200u16),
865u16 => Some(1200u16),
866u16 => Some(1200u16),
867u16 => Some(1200u16),
868u16 => Some(1200u16),
869u16 => Some(1200u16),
870u16 => Some(1200u16),
871u16 => Some(1200u16),
872u16 => Some(1200u16),
873u16 => Some(1200u16),
874u16 => Some(1200u16),
875u16 => Some(1200u16),
876u16 => Some(1200u16),
877u16 => Some(1200u16),
878u16 => Some(1200u16),
879u16 => Some(1200u16),
880u16 => Some(1200u16),
881u16 => Some(1200u16),
882u16 => Some(1200u16),
892u16 => Some(100u16),
894u16 => Some(300u16),
896u16 => Some(1600u16),
897u16 => Some(1600u16),
911u16 => Some(200u16),
912u16 => Some(200u16),
913u16 => Some(200u16),
914u16 => Some(200u16),
915u16 => Some(200u16),
946u16 => Some(100u16),
988u16 => Some(200u16),
989u16 => Some(200u16),
990u16 => Some(200u16),
991u16 => Some(200u16),
992u16 => Some(200u16),
993u16 => Some(200u16),
994u16 => Some(200u16),
995u16 => Some(200u16),
996u16 => Some(200u16),
997u16 => Some(200u16),
1000u16 => Some(800u16),
1001u16 => Some(800u16),
1002u16 => Some(800u16),
1003u16 => Some(800u16),
1004u16 => Some(800u16),
1005u16 => Some(800u16),
1006u16 => Some(800u16),
1007u16 => Some(800u16),
1008u16 => Some(800u16),
1009u16 => Some(800u16),
1014u16 => Some(20000u16),
1027u16 => Some(4001u16),
1053u16 => Some(300u16),
1116u16 => Some(2400u16),
1266u16 => Some(300u16),
1267u16 => Some(300u16),
1268u16 => Some(300u16),
1269u16 => Some(300u16),
1270u16 => Some(300u16),
1271u16 => Some(300u16),
1272u16 => Some(300u16),
1273u16 => Some(300u16),
1274u16 => Some(300u16),
1275u16 => Some(300u16),
1276u16 => Some(300u16),
1277u16 => Some(300u16),
1278u16 => Some(300u16),
1279u16 => Some(300u16),
1280u16 => Some(300u16),
1281u16 => Some(300u16),
1296u16 => Some(200u16),
1339u16 => Some(300u16),
1341u16 => Some(300u16),
1353u16 => Some(300u16),
1354u16 => Some(300u16),
1357u16 => Some(300u16),
1358u16 => Some(300u16),
1360u16 => Some(300u16),
_ => None,
}
}
#[must_use]
pub const fn is_fuel(item_id: u16) -> bool {
get_item_burn_ticks(item_id).is_some()
}

View File

@ -0,0 +1,63 @@
/* This file is generated. Do not edit manually. */
pub enum GameEvent {
BlockActivate,
BlockAttach,
BlockChange,
BlockClose,
BlockDeactivate,
BlockDestroy,
BlockDetach,
BlockOpen,
BlockPlace,
ContainerClose,
ContainerOpen,
Drink,
Eat,
ElytraGlide,
EntityDamage,
EntityDie,
EntityDismount,
EntityInteract,
EntityMount,
EntityPlace,
EntityAction,
Equip,
Explode,
Flap,
FluidPickup,
FluidPlace,
HitGround,
InstrumentPlay,
ItemInteractFinish,
ItemInteractStart,
JukeboxPlay,
JukeboxStopPlay,
LightningStrike,
NoteBlockPlay,
PrimeFuse,
ProjectileLand,
ProjectileShoot,
SculkSensorTendrilsClicking,
Shear,
Shriek,
Splash,
Step,
Swim,
Teleport,
Unequip,
Resonate1,
Resonate2,
Resonate3,
Resonate4,
Resonate5,
Resonate6,
Resonate7,
Resonate8,
Resonate9,
Resonate10,
Resonate11,
Resonate12,
Resonate13,
Resonate14,
Resonate15,
}

View File

@ -0,0 +1,903 @@
/* This file is generated. Do not edit manually. */
use serde::{Deserialize, Serialize};
use std::fmt;
#[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)]
pub enum GameRule {
AdvanceTime,
AdvanceWeather,
AllowEnteringNetherUsingPortals,
BlockDrops,
BlockExplosionDropDecay,
CommandBlockOutput,
CommandBlocksWork,
DrowningDamage,
ElytraMovementCheck,
EnderPearlsVanishOnDeath,
EntityDrops,
FallDamage,
FireDamage,
FireSpreadRadiusAroundPlayer,
ForgiveDeadPlayers,
FreezeDamage,
GlobalSoundEvents,
ImmediateRespawn,
KeepInventory,
LavaSourceConversion,
LimitedCrafting,
LocatorBar,
LogAdminCommands,
MaxBlockModifications,
MaxCommandForks,
MaxCommandSequenceLength,
MaxEntityCramming,
MaxMinecartSpeed,
MaxSnowAccumulationHeight,
MobDrops,
MobExplosionDropDecay,
MobGriefing,
NaturalHealthRegeneration,
PlayerMovementCheck,
PlayersNetherPortalCreativeDelay,
PlayersNetherPortalDefaultDelay,
PlayersSleepingPercentage,
ProjectilesCanBreakBlocks,
Pvp,
Raids,
RandomTickSpeed,
ReducedDebugInfo,
RespawnRadius,
SendCommandFeedback,
ShowAdvancementMessages,
ShowDeathMessages,
SpawnMobs,
SpawnMonsters,
SpawnPatrols,
SpawnPhantoms,
SpawnWanderingTraders,
SpawnWardens,
SpawnerBlocksWork,
SpectatorsGenerateChunks,
SpreadVines,
TntExplodes,
TntExplosionDropDecay,
UniversalAnger,
WaterSourceConversion,
}
impl GameRule {
pub const fn all() -> &'static [Self] {
&[
Self::AdvanceTime,
Self::AdvanceWeather,
Self::AllowEnteringNetherUsingPortals,
Self::BlockDrops,
Self::BlockExplosionDropDecay,
Self::CommandBlockOutput,
Self::CommandBlocksWork,
Self::DrowningDamage,
Self::ElytraMovementCheck,
Self::EnderPearlsVanishOnDeath,
Self::EntityDrops,
Self::FallDamage,
Self::FireDamage,
Self::FireSpreadRadiusAroundPlayer,
Self::ForgiveDeadPlayers,
Self::FreezeDamage,
Self::GlobalSoundEvents,
Self::ImmediateRespawn,
Self::KeepInventory,
Self::LavaSourceConversion,
Self::LimitedCrafting,
Self::LocatorBar,
Self::LogAdminCommands,
Self::MaxBlockModifications,
Self::MaxCommandForks,
Self::MaxCommandSequenceLength,
Self::MaxEntityCramming,
Self::MaxMinecartSpeed,
Self::MaxSnowAccumulationHeight,
Self::MobDrops,
Self::MobExplosionDropDecay,
Self::MobGriefing,
Self::NaturalHealthRegeneration,
Self::PlayerMovementCheck,
Self::PlayersNetherPortalCreativeDelay,
Self::PlayersNetherPortalDefaultDelay,
Self::PlayersSleepingPercentage,
Self::ProjectilesCanBreakBlocks,
Self::Pvp,
Self::Raids,
Self::RandomTickSpeed,
Self::ReducedDebugInfo,
Self::RespawnRadius,
Self::SendCommandFeedback,
Self::ShowAdvancementMessages,
Self::ShowDeathMessages,
Self::SpawnMobs,
Self::SpawnMonsters,
Self::SpawnPatrols,
Self::SpawnPhantoms,
Self::SpawnWanderingTraders,
Self::SpawnWardens,
Self::SpawnerBlocksWork,
Self::SpectatorsGenerateChunks,
Self::SpreadVines,
Self::TntExplodes,
Self::TntExplosionDropDecay,
Self::UniversalAnger,
Self::WaterSourceConversion,
]
}
}
impl fmt::Display for GameRule {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Self::AdvanceTime => write!(f, "advance_time"),
Self::AdvanceWeather => write!(f, "advance_weather"),
Self::AllowEnteringNetherUsingPortals => {
write!(f, "allow_entering_nether_using_portals")
}
Self::BlockDrops => write!(f, "block_drops"),
Self::BlockExplosionDropDecay => write!(f, "block_explosion_drop_decay"),
Self::CommandBlockOutput => write!(f, "command_block_output"),
Self::CommandBlocksWork => write!(f, "command_blocks_work"),
Self::DrowningDamage => write!(f, "drowning_damage"),
Self::ElytraMovementCheck => write!(f, "elytra_movement_check"),
Self::EnderPearlsVanishOnDeath => write!(f, "ender_pearls_vanish_on_death"),
Self::EntityDrops => write!(f, "entity_drops"),
Self::FallDamage => write!(f, "fall_damage"),
Self::FireDamage => write!(f, "fire_damage"),
Self::FireSpreadRadiusAroundPlayer => write!(f, "fire_spread_radius_around_player"),
Self::ForgiveDeadPlayers => write!(f, "forgive_dead_players"),
Self::FreezeDamage => write!(f, "freeze_damage"),
Self::GlobalSoundEvents => write!(f, "global_sound_events"),
Self::ImmediateRespawn => write!(f, "immediate_respawn"),
Self::KeepInventory => write!(f, "keep_inventory"),
Self::LavaSourceConversion => write!(f, "lava_source_conversion"),
Self::LimitedCrafting => write!(f, "limited_crafting"),
Self::LocatorBar => write!(f, "locator_bar"),
Self::LogAdminCommands => write!(f, "log_admin_commands"),
Self::MaxBlockModifications => write!(f, "max_block_modifications"),
Self::MaxCommandForks => write!(f, "max_command_forks"),
Self::MaxCommandSequenceLength => write!(f, "max_command_sequence_length"),
Self::MaxEntityCramming => write!(f, "max_entity_cramming"),
Self::MaxMinecartSpeed => write!(f, "max_minecart_speed"),
Self::MaxSnowAccumulationHeight => write!(f, "max_snow_accumulation_height"),
Self::MobDrops => write!(f, "mob_drops"),
Self::MobExplosionDropDecay => write!(f, "mob_explosion_drop_decay"),
Self::MobGriefing => write!(f, "mob_griefing"),
Self::NaturalHealthRegeneration => write!(f, "natural_health_regeneration"),
Self::PlayerMovementCheck => write!(f, "player_movement_check"),
Self::PlayersNetherPortalCreativeDelay => {
write!(f, "players_nether_portal_creative_delay")
}
Self::PlayersNetherPortalDefaultDelay => {
write!(f, "players_nether_portal_default_delay")
}
Self::PlayersSleepingPercentage => write!(f, "players_sleeping_percentage"),
Self::ProjectilesCanBreakBlocks => write!(f, "projectiles_can_break_blocks"),
Self::Pvp => write!(f, "pvp"),
Self::Raids => write!(f, "raids"),
Self::RandomTickSpeed => write!(f, "random_tick_speed"),
Self::ReducedDebugInfo => write!(f, "reduced_debug_info"),
Self::RespawnRadius => write!(f, "respawn_radius"),
Self::SendCommandFeedback => write!(f, "send_command_feedback"),
Self::ShowAdvancementMessages => write!(f, "show_advancement_messages"),
Self::ShowDeathMessages => write!(f, "show_death_messages"),
Self::SpawnMobs => write!(f, "spawn_mobs"),
Self::SpawnMonsters => write!(f, "spawn_monsters"),
Self::SpawnPatrols => write!(f, "spawn_patrols"),
Self::SpawnPhantoms => write!(f, "spawn_phantoms"),
Self::SpawnWanderingTraders => write!(f, "spawn_wandering_traders"),
Self::SpawnWardens => write!(f, "spawn_wardens"),
Self::SpawnerBlocksWork => write!(f, "spawner_blocks_work"),
Self::SpectatorsGenerateChunks => write!(f, "spectators_generate_chunks"),
Self::SpreadVines => write!(f, "spread_vines"),
Self::TntExplodes => write!(f, "tnt_explodes"),
Self::TntExplosionDropDecay => write!(f, "tnt_explosion_drop_decay"),
Self::UniversalAnger => write!(f, "universal_anger"),
Self::WaterSourceConversion => write!(f, "water_source_conversion"),
}
}
}
#[derive(Serialize, Deserialize, PartialEq, Eq, Clone, Debug)]
pub struct GameRuleRegistry {
#[serde(rename = "advance_time")]
#[serde(default = "default_advance_time")]
#[serde(with = "as_string")]
pub advance_time: bool,
#[serde(rename = "advance_weather")]
#[serde(default = "default_advance_weather")]
#[serde(with = "as_string")]
pub advance_weather: bool,
#[serde(rename = "allow_entering_nether_using_portals")]
#[serde(default = "default_allow_entering_nether_using_portals")]
#[serde(with = "as_string")]
pub allow_entering_nether_using_portals: bool,
#[serde(rename = "block_drops")]
#[serde(default = "default_block_drops")]
#[serde(with = "as_string")]
pub block_drops: bool,
#[serde(rename = "block_explosion_drop_decay")]
#[serde(default = "default_block_explosion_drop_decay")]
#[serde(with = "as_string")]
pub block_explosion_drop_decay: bool,
#[serde(rename = "command_block_output")]
#[serde(default = "default_command_block_output")]
#[serde(with = "as_string")]
pub command_block_output: bool,
#[serde(rename = "command_blocks_work")]
#[serde(default = "default_command_blocks_work")]
#[serde(with = "as_string")]
pub command_blocks_work: bool,
#[serde(rename = "drowning_damage")]
#[serde(default = "default_drowning_damage")]
#[serde(with = "as_string")]
pub drowning_damage: bool,
#[serde(rename = "elytra_movement_check")]
#[serde(default = "default_elytra_movement_check")]
#[serde(with = "as_string")]
pub elytra_movement_check: bool,
#[serde(rename = "ender_pearls_vanish_on_death")]
#[serde(default = "default_ender_pearls_vanish_on_death")]
#[serde(with = "as_string")]
pub ender_pearls_vanish_on_death: bool,
#[serde(rename = "entity_drops")]
#[serde(default = "default_entity_drops")]
#[serde(with = "as_string")]
pub entity_drops: bool,
#[serde(rename = "fall_damage")]
#[serde(default = "default_fall_damage")]
#[serde(with = "as_string")]
pub fall_damage: bool,
#[serde(rename = "fire_damage")]
#[serde(default = "default_fire_damage")]
#[serde(with = "as_string")]
pub fire_damage: bool,
#[serde(rename = "fire_spread_radius_around_player")]
#[serde(default = "default_fire_spread_radius_around_player")]
#[serde(with = "as_string")]
pub fire_spread_radius_around_player: i64,
#[serde(rename = "forgive_dead_players")]
#[serde(default = "default_forgive_dead_players")]
#[serde(with = "as_string")]
pub forgive_dead_players: bool,
#[serde(rename = "freeze_damage")]
#[serde(default = "default_freeze_damage")]
#[serde(with = "as_string")]
pub freeze_damage: bool,
#[serde(rename = "global_sound_events")]
#[serde(default = "default_global_sound_events")]
#[serde(with = "as_string")]
pub global_sound_events: bool,
#[serde(rename = "immediate_respawn")]
#[serde(default = "default_immediate_respawn")]
#[serde(with = "as_string")]
pub immediate_respawn: bool,
#[serde(rename = "keep_inventory")]
#[serde(default = "default_keep_inventory")]
#[serde(with = "as_string")]
pub keep_inventory: bool,
#[serde(rename = "lava_source_conversion")]
#[serde(default = "default_lava_source_conversion")]
#[serde(with = "as_string")]
pub lava_source_conversion: bool,
#[serde(rename = "limited_crafting")]
#[serde(default = "default_limited_crafting")]
#[serde(with = "as_string")]
pub limited_crafting: bool,
#[serde(rename = "locator_bar")]
#[serde(default = "default_locator_bar")]
#[serde(with = "as_string")]
pub locator_bar: bool,
#[serde(rename = "log_admin_commands")]
#[serde(default = "default_log_admin_commands")]
#[serde(with = "as_string")]
pub log_admin_commands: bool,
#[serde(rename = "max_block_modifications")]
#[serde(default = "default_max_block_modifications")]
#[serde(with = "as_string")]
pub max_block_modifications: i64,
#[serde(rename = "max_command_forks")]
#[serde(default = "default_max_command_forks")]
#[serde(with = "as_string")]
pub max_command_forks: i64,
#[serde(rename = "max_command_sequence_length")]
#[serde(default = "default_max_command_sequence_length")]
#[serde(with = "as_string")]
pub max_command_sequence_length: i64,
#[serde(rename = "max_entity_cramming")]
#[serde(default = "default_max_entity_cramming")]
#[serde(with = "as_string")]
pub max_entity_cramming: i64,
#[serde(rename = "max_minecart_speed")]
#[serde(default = "default_max_minecart_speed")]
#[serde(with = "as_string")]
pub max_minecart_speed: i64,
#[serde(rename = "max_snow_accumulation_height")]
#[serde(default = "default_max_snow_accumulation_height")]
#[serde(with = "as_string")]
pub max_snow_accumulation_height: i64,
#[serde(rename = "mob_drops")]
#[serde(default = "default_mob_drops")]
#[serde(with = "as_string")]
pub mob_drops: bool,
#[serde(rename = "mob_explosion_drop_decay")]
#[serde(default = "default_mob_explosion_drop_decay")]
#[serde(with = "as_string")]
pub mob_explosion_drop_decay: bool,
#[serde(rename = "mob_griefing")]
#[serde(default = "default_mob_griefing")]
#[serde(with = "as_string")]
pub mob_griefing: bool,
#[serde(rename = "natural_health_regeneration")]
#[serde(default = "default_natural_health_regeneration")]
#[serde(with = "as_string")]
pub natural_health_regeneration: bool,
#[serde(rename = "player_movement_check")]
#[serde(default = "default_player_movement_check")]
#[serde(with = "as_string")]
pub player_movement_check: bool,
#[serde(rename = "players_nether_portal_creative_delay")]
#[serde(default = "default_players_nether_portal_creative_delay")]
#[serde(with = "as_string")]
pub players_nether_portal_creative_delay: i64,
#[serde(rename = "players_nether_portal_default_delay")]
#[serde(default = "default_players_nether_portal_default_delay")]
#[serde(with = "as_string")]
pub players_nether_portal_default_delay: i64,
#[serde(rename = "players_sleeping_percentage")]
#[serde(default = "default_players_sleeping_percentage")]
#[serde(with = "as_string")]
pub players_sleeping_percentage: i64,
#[serde(rename = "projectiles_can_break_blocks")]
#[serde(default = "default_projectiles_can_break_blocks")]
#[serde(with = "as_string")]
pub projectiles_can_break_blocks: bool,
#[serde(rename = "pvp")]
#[serde(default = "default_pvp")]
#[serde(with = "as_string")]
pub pvp: bool,
#[serde(rename = "raids")]
#[serde(default = "default_raids")]
#[serde(with = "as_string")]
pub raids: bool,
#[serde(rename = "random_tick_speed")]
#[serde(default = "default_random_tick_speed")]
#[serde(with = "as_string")]
pub random_tick_speed: i64,
#[serde(rename = "reduced_debug_info")]
#[serde(default = "default_reduced_debug_info")]
#[serde(with = "as_string")]
pub reduced_debug_info: bool,
#[serde(rename = "respawn_radius")]
#[serde(default = "default_respawn_radius")]
#[serde(with = "as_string")]
pub respawn_radius: i64,
#[serde(rename = "send_command_feedback")]
#[serde(default = "default_send_command_feedback")]
#[serde(with = "as_string")]
pub send_command_feedback: bool,
#[serde(rename = "show_advancement_messages")]
#[serde(default = "default_show_advancement_messages")]
#[serde(with = "as_string")]
pub show_advancement_messages: bool,
#[serde(rename = "show_death_messages")]
#[serde(default = "default_show_death_messages")]
#[serde(with = "as_string")]
pub show_death_messages: bool,
#[serde(rename = "spawn_mobs")]
#[serde(default = "default_spawn_mobs")]
#[serde(with = "as_string")]
pub spawn_mobs: bool,
#[serde(rename = "spawn_monsters")]
#[serde(default = "default_spawn_monsters")]
#[serde(with = "as_string")]
pub spawn_monsters: bool,
#[serde(rename = "spawn_patrols")]
#[serde(default = "default_spawn_patrols")]
#[serde(with = "as_string")]
pub spawn_patrols: bool,
#[serde(rename = "spawn_phantoms")]
#[serde(default = "default_spawn_phantoms")]
#[serde(with = "as_string")]
pub spawn_phantoms: bool,
#[serde(rename = "spawn_wandering_traders")]
#[serde(default = "default_spawn_wandering_traders")]
#[serde(with = "as_string")]
pub spawn_wandering_traders: bool,
#[serde(rename = "spawn_wardens")]
#[serde(default = "default_spawn_wardens")]
#[serde(with = "as_string")]
pub spawn_wardens: bool,
#[serde(rename = "spawner_blocks_work")]
#[serde(default = "default_spawner_blocks_work")]
#[serde(with = "as_string")]
pub spawner_blocks_work: bool,
#[serde(rename = "spectators_generate_chunks")]
#[serde(default = "default_spectators_generate_chunks")]
#[serde(with = "as_string")]
pub spectators_generate_chunks: bool,
#[serde(rename = "spread_vines")]
#[serde(default = "default_spread_vines")]
#[serde(with = "as_string")]
pub spread_vines: bool,
#[serde(rename = "tnt_explodes")]
#[serde(default = "default_tnt_explodes")]
#[serde(with = "as_string")]
pub tnt_explodes: bool,
#[serde(rename = "tnt_explosion_drop_decay")]
#[serde(default = "default_tnt_explosion_drop_decay")]
#[serde(with = "as_string")]
pub tnt_explosion_drop_decay: bool,
#[serde(rename = "universal_anger")]
#[serde(default = "default_universal_anger")]
#[serde(with = "as_string")]
pub universal_anger: bool,
#[serde(rename = "water_source_conversion")]
#[serde(default = "default_water_source_conversion")]
#[serde(with = "as_string")]
pub water_source_conversion: bool,
}
pub enum GameRuleValue<I, B> {
Int(I),
Bool(B),
}
impl<I: fmt::Display, B: fmt::Display> fmt::Display for GameRuleValue<I, B> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
match self {
Self::Int(v) => write!(f, "{v}"),
Self::Bool(v) => write!(f, "{v}"),
}
}
}
impl GameRuleRegistry {
pub fn get(&self, rule: &GameRule) -> GameRuleValue<&i64, &bool> {
match rule {
GameRule::AdvanceTime => GameRuleValue::Bool(&self.advance_time),
GameRule::AdvanceWeather => GameRuleValue::Bool(&self.advance_weather),
GameRule::AllowEnteringNetherUsingPortals => {
GameRuleValue::Bool(&self.allow_entering_nether_using_portals)
}
GameRule::BlockDrops => GameRuleValue::Bool(&self.block_drops),
GameRule::BlockExplosionDropDecay => {
GameRuleValue::Bool(&self.block_explosion_drop_decay)
}
GameRule::CommandBlockOutput => GameRuleValue::Bool(&self.command_block_output),
GameRule::CommandBlocksWork => GameRuleValue::Bool(&self.command_blocks_work),
GameRule::DrowningDamage => GameRuleValue::Bool(&self.drowning_damage),
GameRule::ElytraMovementCheck => GameRuleValue::Bool(&self.elytra_movement_check),
GameRule::EnderPearlsVanishOnDeath => {
GameRuleValue::Bool(&self.ender_pearls_vanish_on_death)
}
GameRule::EntityDrops => GameRuleValue::Bool(&self.entity_drops),
GameRule::FallDamage => GameRuleValue::Bool(&self.fall_damage),
GameRule::FireDamage => GameRuleValue::Bool(&self.fire_damage),
GameRule::FireSpreadRadiusAroundPlayer => {
GameRuleValue::Int(&self.fire_spread_radius_around_player)
}
GameRule::ForgiveDeadPlayers => GameRuleValue::Bool(&self.forgive_dead_players),
GameRule::FreezeDamage => GameRuleValue::Bool(&self.freeze_damage),
GameRule::GlobalSoundEvents => GameRuleValue::Bool(&self.global_sound_events),
GameRule::ImmediateRespawn => GameRuleValue::Bool(&self.immediate_respawn),
GameRule::KeepInventory => GameRuleValue::Bool(&self.keep_inventory),
GameRule::LavaSourceConversion => GameRuleValue::Bool(&self.lava_source_conversion),
GameRule::LimitedCrafting => GameRuleValue::Bool(&self.limited_crafting),
GameRule::LocatorBar => GameRuleValue::Bool(&self.locator_bar),
GameRule::LogAdminCommands => GameRuleValue::Bool(&self.log_admin_commands),
GameRule::MaxBlockModifications => GameRuleValue::Int(&self.max_block_modifications),
GameRule::MaxCommandForks => GameRuleValue::Int(&self.max_command_forks),
GameRule::MaxCommandSequenceLength => {
GameRuleValue::Int(&self.max_command_sequence_length)
}
GameRule::MaxEntityCramming => GameRuleValue::Int(&self.max_entity_cramming),
GameRule::MaxMinecartSpeed => GameRuleValue::Int(&self.max_minecart_speed),
GameRule::MaxSnowAccumulationHeight => {
GameRuleValue::Int(&self.max_snow_accumulation_height)
}
GameRule::MobDrops => GameRuleValue::Bool(&self.mob_drops),
GameRule::MobExplosionDropDecay => GameRuleValue::Bool(&self.mob_explosion_drop_decay),
GameRule::MobGriefing => GameRuleValue::Bool(&self.mob_griefing),
GameRule::NaturalHealthRegeneration => {
GameRuleValue::Bool(&self.natural_health_regeneration)
}
GameRule::PlayerMovementCheck => GameRuleValue::Bool(&self.player_movement_check),
GameRule::PlayersNetherPortalCreativeDelay => {
GameRuleValue::Int(&self.players_nether_portal_creative_delay)
}
GameRule::PlayersNetherPortalDefaultDelay => {
GameRuleValue::Int(&self.players_nether_portal_default_delay)
}
GameRule::PlayersSleepingPercentage => {
GameRuleValue::Int(&self.players_sleeping_percentage)
}
GameRule::ProjectilesCanBreakBlocks => {
GameRuleValue::Bool(&self.projectiles_can_break_blocks)
}
GameRule::Pvp => GameRuleValue::Bool(&self.pvp),
GameRule::Raids => GameRuleValue::Bool(&self.raids),
GameRule::RandomTickSpeed => GameRuleValue::Int(&self.random_tick_speed),
GameRule::ReducedDebugInfo => GameRuleValue::Bool(&self.reduced_debug_info),
GameRule::RespawnRadius => GameRuleValue::Int(&self.respawn_radius),
GameRule::SendCommandFeedback => GameRuleValue::Bool(&self.send_command_feedback),
GameRule::ShowAdvancementMessages => {
GameRuleValue::Bool(&self.show_advancement_messages)
}
GameRule::ShowDeathMessages => GameRuleValue::Bool(&self.show_death_messages),
GameRule::SpawnMobs => GameRuleValue::Bool(&self.spawn_mobs),
GameRule::SpawnMonsters => GameRuleValue::Bool(&self.spawn_monsters),
GameRule::SpawnPatrols => GameRuleValue::Bool(&self.spawn_patrols),
GameRule::SpawnPhantoms => GameRuleValue::Bool(&self.spawn_phantoms),
GameRule::SpawnWanderingTraders => GameRuleValue::Bool(&self.spawn_wandering_traders),
GameRule::SpawnWardens => GameRuleValue::Bool(&self.spawn_wardens),
GameRule::SpawnerBlocksWork => GameRuleValue::Bool(&self.spawner_blocks_work),
GameRule::SpectatorsGenerateChunks => {
GameRuleValue::Bool(&self.spectators_generate_chunks)
}
GameRule::SpreadVines => GameRuleValue::Bool(&self.spread_vines),
GameRule::TntExplodes => GameRuleValue::Bool(&self.tnt_explodes),
GameRule::TntExplosionDropDecay => GameRuleValue::Bool(&self.tnt_explosion_drop_decay),
GameRule::UniversalAnger => GameRuleValue::Bool(&self.universal_anger),
GameRule::WaterSourceConversion => GameRuleValue::Bool(&self.water_source_conversion),
}
}
pub fn get_mut(&mut self, rule: &GameRule) -> GameRuleValue<&mut i64, &mut bool> {
match rule {
GameRule::AdvanceTime => GameRuleValue::Bool(&mut self.advance_time),
GameRule::AdvanceWeather => GameRuleValue::Bool(&mut self.advance_weather),
GameRule::AllowEnteringNetherUsingPortals => {
GameRuleValue::Bool(&mut self.allow_entering_nether_using_portals)
}
GameRule::BlockDrops => GameRuleValue::Bool(&mut self.block_drops),
GameRule::BlockExplosionDropDecay => {
GameRuleValue::Bool(&mut self.block_explosion_drop_decay)
}
GameRule::CommandBlockOutput => GameRuleValue::Bool(&mut self.command_block_output),
GameRule::CommandBlocksWork => GameRuleValue::Bool(&mut self.command_blocks_work),
GameRule::DrowningDamage => GameRuleValue::Bool(&mut self.drowning_damage),
GameRule::ElytraMovementCheck => GameRuleValue::Bool(&mut self.elytra_movement_check),
GameRule::EnderPearlsVanishOnDeath => {
GameRuleValue::Bool(&mut self.ender_pearls_vanish_on_death)
}
GameRule::EntityDrops => GameRuleValue::Bool(&mut self.entity_drops),
GameRule::FallDamage => GameRuleValue::Bool(&mut self.fall_damage),
GameRule::FireDamage => GameRuleValue::Bool(&mut self.fire_damage),
GameRule::FireSpreadRadiusAroundPlayer => {
GameRuleValue::Int(&mut self.fire_spread_radius_around_player)
}
GameRule::ForgiveDeadPlayers => GameRuleValue::Bool(&mut self.forgive_dead_players),
GameRule::FreezeDamage => GameRuleValue::Bool(&mut self.freeze_damage),
GameRule::GlobalSoundEvents => GameRuleValue::Bool(&mut self.global_sound_events),
GameRule::ImmediateRespawn => GameRuleValue::Bool(&mut self.immediate_respawn),
GameRule::KeepInventory => GameRuleValue::Bool(&mut self.keep_inventory),
GameRule::LavaSourceConversion => GameRuleValue::Bool(&mut self.lava_source_conversion),
GameRule::LimitedCrafting => GameRuleValue::Bool(&mut self.limited_crafting),
GameRule::LocatorBar => GameRuleValue::Bool(&mut self.locator_bar),
GameRule::LogAdminCommands => GameRuleValue::Bool(&mut self.log_admin_commands),
GameRule::MaxBlockModifications => {
GameRuleValue::Int(&mut self.max_block_modifications)
}
GameRule::MaxCommandForks => GameRuleValue::Int(&mut self.max_command_forks),
GameRule::MaxCommandSequenceLength => {
GameRuleValue::Int(&mut self.max_command_sequence_length)
}
GameRule::MaxEntityCramming => GameRuleValue::Int(&mut self.max_entity_cramming),
GameRule::MaxMinecartSpeed => GameRuleValue::Int(&mut self.max_minecart_speed),
GameRule::MaxSnowAccumulationHeight => {
GameRuleValue::Int(&mut self.max_snow_accumulation_height)
}
GameRule::MobDrops => GameRuleValue::Bool(&mut self.mob_drops),
GameRule::MobExplosionDropDecay => {
GameRuleValue::Bool(&mut self.mob_explosion_drop_decay)
}
GameRule::MobGriefing => GameRuleValue::Bool(&mut self.mob_griefing),
GameRule::NaturalHealthRegeneration => {
GameRuleValue::Bool(&mut self.natural_health_regeneration)
}
GameRule::PlayerMovementCheck => GameRuleValue::Bool(&mut self.player_movement_check),
GameRule::PlayersNetherPortalCreativeDelay => {
GameRuleValue::Int(&mut self.players_nether_portal_creative_delay)
}
GameRule::PlayersNetherPortalDefaultDelay => {
GameRuleValue::Int(&mut self.players_nether_portal_default_delay)
}
GameRule::PlayersSleepingPercentage => {
GameRuleValue::Int(&mut self.players_sleeping_percentage)
}
GameRule::ProjectilesCanBreakBlocks => {
GameRuleValue::Bool(&mut self.projectiles_can_break_blocks)
}
GameRule::Pvp => GameRuleValue::Bool(&mut self.pvp),
GameRule::Raids => GameRuleValue::Bool(&mut self.raids),
GameRule::RandomTickSpeed => GameRuleValue::Int(&mut self.random_tick_speed),
GameRule::ReducedDebugInfo => GameRuleValue::Bool(&mut self.reduced_debug_info),
GameRule::RespawnRadius => GameRuleValue::Int(&mut self.respawn_radius),
GameRule::SendCommandFeedback => GameRuleValue::Bool(&mut self.send_command_feedback),
GameRule::ShowAdvancementMessages => {
GameRuleValue::Bool(&mut self.show_advancement_messages)
}
GameRule::ShowDeathMessages => GameRuleValue::Bool(&mut self.show_death_messages),
GameRule::SpawnMobs => GameRuleValue::Bool(&mut self.spawn_mobs),
GameRule::SpawnMonsters => GameRuleValue::Bool(&mut self.spawn_monsters),
GameRule::SpawnPatrols => GameRuleValue::Bool(&mut self.spawn_patrols),
GameRule::SpawnPhantoms => GameRuleValue::Bool(&mut self.spawn_phantoms),
GameRule::SpawnWanderingTraders => {
GameRuleValue::Bool(&mut self.spawn_wandering_traders)
}
GameRule::SpawnWardens => GameRuleValue::Bool(&mut self.spawn_wardens),
GameRule::SpawnerBlocksWork => GameRuleValue::Bool(&mut self.spawner_blocks_work),
GameRule::SpectatorsGenerateChunks => {
GameRuleValue::Bool(&mut self.spectators_generate_chunks)
}
GameRule::SpreadVines => GameRuleValue::Bool(&mut self.spread_vines),
GameRule::TntExplodes => GameRuleValue::Bool(&mut self.tnt_explodes),
GameRule::TntExplosionDropDecay => {
GameRuleValue::Bool(&mut self.tnt_explosion_drop_decay)
}
GameRule::UniversalAnger => GameRuleValue::Bool(&mut self.universal_anger),
GameRule::WaterSourceConversion => {
GameRuleValue::Bool(&mut self.water_source_conversion)
}
}
}
}
impl Default for GameRuleRegistry {
fn default() -> Self {
Self {
advance_time: true,
advance_weather: true,
allow_entering_nether_using_portals: true,
block_drops: true,
block_explosion_drop_decay: true,
command_block_output: true,
command_blocks_work: true,
drowning_damage: true,
elytra_movement_check: true,
ender_pearls_vanish_on_death: true,
entity_drops: true,
fall_damage: true,
fire_damage: true,
fire_spread_radius_around_player: 128i64,
forgive_dead_players: true,
freeze_damage: true,
global_sound_events: true,
immediate_respawn: false,
keep_inventory: false,
lava_source_conversion: false,
limited_crafting: false,
locator_bar: true,
log_admin_commands: true,
max_block_modifications: 32768i64,
max_command_forks: 65536i64,
max_command_sequence_length: 65536i64,
max_entity_cramming: 24i64,
max_minecart_speed: 8i64,
max_snow_accumulation_height: 1i64,
mob_drops: true,
mob_explosion_drop_decay: true,
mob_griefing: true,
natural_health_regeneration: true,
player_movement_check: true,
players_nether_portal_creative_delay: 0i64,
players_nether_portal_default_delay: 80i64,
players_sleeping_percentage: 100i64,
projectiles_can_break_blocks: true,
pvp: true,
raids: true,
random_tick_speed: 3i64,
reduced_debug_info: false,
respawn_radius: 10i64,
send_command_feedback: true,
show_advancement_messages: true,
show_death_messages: true,
spawn_mobs: true,
spawn_monsters: true,
spawn_patrols: true,
spawn_phantoms: true,
spawn_wandering_traders: true,
spawn_wardens: true,
spawner_blocks_work: true,
spectators_generate_chunks: true,
spread_vines: true,
tnt_explodes: true,
tnt_explosion_drop_decay: false,
universal_anger: false,
water_source_conversion: true,
}
}
}
fn default_advance_time() -> bool {
GameRuleRegistry::default().advance_time
}
fn default_advance_weather() -> bool {
GameRuleRegistry::default().advance_weather
}
fn default_allow_entering_nether_using_portals() -> bool {
GameRuleRegistry::default().allow_entering_nether_using_portals
}
fn default_block_drops() -> bool {
GameRuleRegistry::default().block_drops
}
fn default_block_explosion_drop_decay() -> bool {
GameRuleRegistry::default().block_explosion_drop_decay
}
fn default_command_block_output() -> bool {
GameRuleRegistry::default().command_block_output
}
fn default_command_blocks_work() -> bool {
GameRuleRegistry::default().command_blocks_work
}
fn default_drowning_damage() -> bool {
GameRuleRegistry::default().drowning_damage
}
fn default_elytra_movement_check() -> bool {
GameRuleRegistry::default().elytra_movement_check
}
fn default_ender_pearls_vanish_on_death() -> bool {
GameRuleRegistry::default().ender_pearls_vanish_on_death
}
fn default_entity_drops() -> bool {
GameRuleRegistry::default().entity_drops
}
fn default_fall_damage() -> bool {
GameRuleRegistry::default().fall_damage
}
fn default_fire_damage() -> bool {
GameRuleRegistry::default().fire_damage
}
fn default_fire_spread_radius_around_player() -> i64 {
GameRuleRegistry::default().fire_spread_radius_around_player
}
fn default_forgive_dead_players() -> bool {
GameRuleRegistry::default().forgive_dead_players
}
fn default_freeze_damage() -> bool {
GameRuleRegistry::default().freeze_damage
}
fn default_global_sound_events() -> bool {
GameRuleRegistry::default().global_sound_events
}
fn default_immediate_respawn() -> bool {
GameRuleRegistry::default().immediate_respawn
}
fn default_keep_inventory() -> bool {
GameRuleRegistry::default().keep_inventory
}
fn default_lava_source_conversion() -> bool {
GameRuleRegistry::default().lava_source_conversion
}
fn default_limited_crafting() -> bool {
GameRuleRegistry::default().limited_crafting
}
fn default_locator_bar() -> bool {
GameRuleRegistry::default().locator_bar
}
fn default_log_admin_commands() -> bool {
GameRuleRegistry::default().log_admin_commands
}
fn default_max_block_modifications() -> i64 {
GameRuleRegistry::default().max_block_modifications
}
fn default_max_command_forks() -> i64 {
GameRuleRegistry::default().max_command_forks
}
fn default_max_command_sequence_length() -> i64 {
GameRuleRegistry::default().max_command_sequence_length
}
fn default_max_entity_cramming() -> i64 {
GameRuleRegistry::default().max_entity_cramming
}
fn default_max_minecart_speed() -> i64 {
GameRuleRegistry::default().max_minecart_speed
}
fn default_max_snow_accumulation_height() -> i64 {
GameRuleRegistry::default().max_snow_accumulation_height
}
fn default_mob_drops() -> bool {
GameRuleRegistry::default().mob_drops
}
fn default_mob_explosion_drop_decay() -> bool {
GameRuleRegistry::default().mob_explosion_drop_decay
}
fn default_mob_griefing() -> bool {
GameRuleRegistry::default().mob_griefing
}
fn default_natural_health_regeneration() -> bool {
GameRuleRegistry::default().natural_health_regeneration
}
fn default_player_movement_check() -> bool {
GameRuleRegistry::default().player_movement_check
}
fn default_players_nether_portal_creative_delay() -> i64 {
GameRuleRegistry::default().players_nether_portal_creative_delay
}
fn default_players_nether_portal_default_delay() -> i64 {
GameRuleRegistry::default().players_nether_portal_default_delay
}
fn default_players_sleeping_percentage() -> i64 {
GameRuleRegistry::default().players_sleeping_percentage
}
fn default_projectiles_can_break_blocks() -> bool {
GameRuleRegistry::default().projectiles_can_break_blocks
}
fn default_pvp() -> bool {
GameRuleRegistry::default().pvp
}
fn default_raids() -> bool {
GameRuleRegistry::default().raids
}
fn default_random_tick_speed() -> i64 {
GameRuleRegistry::default().random_tick_speed
}
fn default_reduced_debug_info() -> bool {
GameRuleRegistry::default().reduced_debug_info
}
fn default_respawn_radius() -> i64 {
GameRuleRegistry::default().respawn_radius
}
fn default_send_command_feedback() -> bool {
GameRuleRegistry::default().send_command_feedback
}
fn default_show_advancement_messages() -> bool {
GameRuleRegistry::default().show_advancement_messages
}
fn default_show_death_messages() -> bool {
GameRuleRegistry::default().show_death_messages
}
fn default_spawn_mobs() -> bool {
GameRuleRegistry::default().spawn_mobs
}
fn default_spawn_monsters() -> bool {
GameRuleRegistry::default().spawn_monsters
}
fn default_spawn_patrols() -> bool {
GameRuleRegistry::default().spawn_patrols
}
fn default_spawn_phantoms() -> bool {
GameRuleRegistry::default().spawn_phantoms
}
fn default_spawn_wandering_traders() -> bool {
GameRuleRegistry::default().spawn_wandering_traders
}
fn default_spawn_wardens() -> bool {
GameRuleRegistry::default().spawn_wardens
}
fn default_spawner_blocks_work() -> bool {
GameRuleRegistry::default().spawner_blocks_work
}
fn default_spectators_generate_chunks() -> bool {
GameRuleRegistry::default().spectators_generate_chunks
}
fn default_spread_vines() -> bool {
GameRuleRegistry::default().spread_vines
}
fn default_tnt_explodes() -> bool {
GameRuleRegistry::default().tnt_explodes
}
fn default_tnt_explosion_drop_decay() -> bool {
GameRuleRegistry::default().tnt_explosion_drop_decay
}
fn default_universal_anger() -> bool {
GameRuleRegistry::default().universal_anger
}
fn default_water_source_conversion() -> bool {
GameRuleRegistry::default().water_source_conversion
}
mod as_string {
use serde::{Deserialize, Deserializer, Serialize, Serializer};
use std::{fmt::Display, str::FromStr};
pub fn serialize<T: Display, S: Serializer>(
value: &T,
serializer: S,
) -> Result<S::Ok, S::Error> {
serializer.serialize_str(&value.to_string())
}
pub fn deserialize<'de, T, D>(deserializer: D) -> Result<T, D::Error>
where
T: FromStr,
D: Deserializer<'de>,
<T as FromStr>::Err: Display,
{
let s = String::deserialize(deserializer)?;
s.parse::<T>().map_err(serde::de::Error::custom)
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,365 @@
/* This file is generated. Do not edit manually. */
use pumpkin_util::version::MinecraftVersion;
pub static ITEM_ID_REMAP_1_21_11_TO_1_21_9: &[u16] = &[
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686,
687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762,
763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781,
782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800,
801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819,
820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838,
839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857,
858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876,
877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895,
896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914,
915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933,
934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952,
953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971,
972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990,
991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007,
1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023,
1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039,
1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055,
1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071,
1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087,
1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103,
1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119,
1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1141, 1144, 1173, 1182, 1139, 1147,
1162, 1168, 1138, 1171, 1206, 1130, 1133, 1134, 1154, 1159, 1165, 1169, 1170, 1177, 1179, 1132,
1142, 1146, 1155, 1158, 1156, 1178, 1181, 1191, 1194, 1196, 1197, 1131, 1167, 1188, 1143, 1164,
1189, 1195, 1199, 1201, 1136, 1173, 1148, 1163, 1176, 1185, 1186, 1192, 1204, 1205, 1209, 1210,
1184, 1211, 1140, 1190, 1137, 1208, 1145, 1149, 1160, 1172, 1184, 1187, 1202, 1203, 1153, 1176,
1180, 1200, 1198, 1135, 1156, 1157, 1161, 1166, 1174, 1175, 1193, 1207, 1212, 1150, 1151, 1152,
1183, 1213, 1214, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227,
1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243,
1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1259, 1255, 1256, 1257, 1258,
1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274,
1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290,
1296, 1297, 1298, 1299, 1300, 1301, 1302, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299,
1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315,
1316, 1317, 1318, 1319, 1320, 1333, 1334, 1335, 1336, 1337, 1321, 1322, 1323, 1324, 1325, 1326,
1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341, 1342,
1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358,
1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374,
1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390,
1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406,
1407, 1408, 1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422,
1423, 1424, 1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438,
1439, 1440, 1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454,
1455, 1456, 1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470,
1471, 1472, 1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486,
1487,
];
pub static ITEM_ID_REMAP_1_21_11_TO_1_21_7: &[u16] = &[
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 305, 306, 307, 308, 309, 310, 311, 312, 313,
314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332,
333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351,
352, 353, 366, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363, 364, 365, 366, 367, 368, 369,
370, 371, 372, 373, 374, 375, 376, 377, 391, 392, 393, 394, 395, 396, 397, 398, 378, 400, 401,
402, 403, 404, 405, 406, 407, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 391,
392, 393, 394, 395, 396, 397, 398, 399, 400, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410,
411, 412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429,
430, 431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448,
449, 450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467,
468, 469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486,
487, 488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505,
506, 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524,
525, 526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543,
544, 545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562,
563, 564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581,
582, 583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600,
601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619,
620, 621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638,
639, 640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657,
658, 659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676,
677, 678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695,
696, 697, 698, 699, 700, 701, 702, 703, 704, 734, 735, 736, 737, 738, 739, 740, 705, 706, 707,
708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726,
727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743, 744, 745,
746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762, 763, 764,
765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781, 782, 783,
784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800, 801, 802,
803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819, 820, 821,
822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838, 839, 840,
841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857, 858, 859,
860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876, 877, 878,
879, 916, 917, 918, 919, 920, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892,
893, 894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911,
912, 913, 914, 915, 916, 958, 959, 960, 961, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926,
927, 928, 929, 930, 931, 932, 933, 934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945,
946, 947, 948, 949, 950, 951, 952, 953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964,
965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983,
984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001,
1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017,
1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033,
1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049,
1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065,
1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081,
1082, 1083, 1084, 1096, 1098, 1127, 1136, 1094, 1101, 1116, 1122, 1093, 1125, 1160, 1085, 1088,
1089, 1108, 1113, 1119, 1123, 1124, 1131, 1133, 1087, 1097, 1100, 1109, 1112, 1110, 1132, 1135,
1145, 1148, 1150, 1151, 1086, 1121, 1142, 1143, 1118, 1143, 1149, 1153, 1155, 1091, 1127, 1102,
1117, 1130, 1139, 1140, 1146, 1158, 1159, 1163, 1164, 1138, 1165, 1095, 1144, 1092, 1162, 1099,
1103, 1114, 1126, 1138, 1141, 1156, 1157, 1107, 1130, 1134, 1154, 1152, 1090, 1110, 1111, 1115,
1120, 1128, 1129, 1147, 1161, 1166, 1104, 1105, 1106, 1137, 1167, 1168, 1169, 1170, 1171, 1172,
1173, 1174, 1175, 1176, 1177, 1178, 1179, 1180, 1181, 1182, 1183, 1184, 1185, 1186, 1187, 1188,
1189, 1190, 1191, 1192, 1193, 1194, 1195, 1196, 1197, 1198, 1199, 1200, 1201, 1202, 1203, 1204,
1251, 1205, 1206, 1207, 1212, 1208, 1209, 1210, 1211, 1212, 1213, 1214, 1215, 1216, 1217, 1218,
1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234,
1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1248, 1249, 1250, 1251, 1252, 1253, 1254,
1244, 1245, 1246, 1294, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1258,
1259, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1285, 1286,
1287, 1288, 1289, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285,
1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1296, 1297, 1298, 1299, 1348, 1349,
1350, 1351, 1352, 1353, 1354, 1355, 1300, 1301, 1302, 1303, 1304, 1305, 1306, 1307, 1308, 1309,
1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325,
1326, 1327, 1328, 1329, 1330, 1331, 1332, 1333, 1334, 1335, 1336, 1337, 1338, 1339, 1340, 1341,
1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357,
1358, 1359, 1360, 1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373,
1374, 1375, 1376, 1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389,
1390, 1391, 1392, 1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405,
1406, 1407, 1408, 1409, 1410, 1467, 1468, 1469, 1470, 1471, 1472, 1473, 1474, 1475, 1476, 1477,
1478, 1479, 1480, 1481, 1482, 1411, 1412, 1413, 1414, 1415,
];
pub static ITEM_ID_REMAP_1_21_9_TO_1_21_11: &[u16] = &[
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 305, 306,
307, 308, 309, 310, 311, 312, 313, 314, 315, 316, 317, 318, 319, 320, 321, 322, 323, 324, 325,
326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337, 338, 339, 340, 341, 342, 343, 344,
345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356, 357, 358, 359, 360, 361, 362, 363,
364, 365, 366, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376, 377, 378, 379, 380, 381, 382,
383, 384, 385, 386, 387, 388, 389, 390, 391, 392, 393, 394, 395, 396, 397, 398, 399, 400, 401,
402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 419, 420,
421, 422, 423, 424, 425, 426, 427, 428, 429, 430, 431, 432, 433, 434, 435, 436, 437, 438, 439,
440, 441, 442, 443, 444, 445, 446, 447, 448, 449, 450, 451, 452, 453, 454, 455, 456, 457, 458,
459, 460, 461, 462, 463, 464, 465, 466, 467, 468, 469, 470, 471, 472, 473, 474, 475, 476, 477,
478, 479, 480, 481, 482, 483, 484, 485, 486, 487, 488, 489, 490, 491, 492, 493, 494, 495, 496,
497, 498, 499, 500, 501, 502, 503, 504, 505, 506, 507, 508, 509, 510, 511, 512, 513, 514, 515,
516, 517, 518, 519, 520, 521, 522, 523, 524, 525, 526, 527, 528, 529, 530, 531, 532, 533, 534,
535, 536, 537, 538, 539, 540, 541, 542, 543, 544, 545, 546, 547, 548, 549, 550, 551, 552, 553,
554, 555, 556, 557, 558, 559, 560, 561, 562, 563, 564, 565, 566, 567, 568, 569, 570, 571, 572,
573, 574, 575, 576, 577, 578, 579, 580, 581, 582, 583, 584, 585, 586, 587, 588, 589, 590, 591,
592, 593, 594, 595, 596, 597, 598, 599, 600, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610,
611, 612, 613, 614, 615, 616, 617, 618, 619, 620, 621, 622, 623, 624, 625, 626, 627, 628, 629,
630, 631, 632, 633, 634, 635, 636, 637, 638, 639, 640, 641, 642, 643, 644, 645, 646, 647, 648,
649, 650, 651, 652, 653, 654, 655, 656, 657, 658, 659, 660, 661, 662, 663, 664, 665, 666, 667,
668, 669, 670, 671, 672, 673, 674, 675, 676, 677, 678, 679, 680, 681, 682, 683, 684, 685, 686,
687, 688, 689, 690, 691, 692, 693, 694, 695, 696, 697, 698, 699, 700, 701, 702, 703, 704, 705,
706, 707, 708, 709, 710, 711, 712, 713, 714, 715, 716, 717, 718, 719, 720, 721, 722, 723, 724,
725, 726, 727, 728, 729, 730, 731, 732, 733, 734, 735, 736, 737, 738, 739, 740, 741, 742, 743,
744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760, 761, 762,
763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779, 780, 781,
782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798, 799, 800,
801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817, 818, 819,
820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836, 837, 838,
839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855, 856, 857,
858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874, 875, 876,
877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893, 894, 895,
896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912, 913, 914,
915, 916, 917, 918, 919, 920, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933,
934, 935, 936, 937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952,
953, 954, 955, 956, 957, 958, 959, 960, 961, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971,
972, 973, 974, 975, 976, 977, 978, 979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990,
991, 992, 993, 994, 995, 996, 997, 998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007,
1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023,
1024, 1025, 1026, 1027, 1028, 1029, 1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039,
1040, 1041, 1042, 1043, 1044, 1045, 1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055,
1056, 1057, 1058, 1059, 1060, 1061, 1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071,
1072, 1073, 1074, 1075, 1076, 1077, 1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087,
1088, 1089, 1090, 1091, 1092, 1093, 1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103,
1104, 1105, 1106, 1107, 1108, 1109, 1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119,
1120, 1121, 1122, 1123, 1124, 1125, 1126, 1127, 1128, 1129, 1141, 1163, 1151, 1142, 1143, 1203,
1172, 1188, 1138, 1134, 1186, 1130, 1152, 1166, 1131, 1190, 1153, 1135, 1174, 1191, 1213, 1214,
1215, 1198, 1144, 1154, 1204, 1205, 1155, 1145, 1192, 1206, 1136, 1175, 1167, 1146, 1207, 1164,
1137, 1147, 1148, 1139, 1193, 1132, 1208, 1209, 1199, 1149, 1157, 1150, 1200, 1158, 1133, 1216,
1194, 1177, 1178, 1195, 1165, 1168, 1187, 1159, 1179, 1210, 1160, 1169, 1161, 1162, 1202, 1170,
1201, 1171, 1196, 1197, 1180, 1181, 1140, 1211, 1189, 1182, 1183, 1185, 1212, 1217, 1218, 1219,
1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235,
1236, 1237, 1238, 1239, 1240, 1241, 1242, 1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251,
1252, 1253, 1254, 1255, 1256, 1257, 1258, 1260, 1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268,
1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276, 1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284,
1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292, 1293, 1294, 1295, 1303, 1304, 1305, 1306, 1307,
1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316, 1317, 1318, 1319, 1320, 1321, 1322, 1323,
1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332, 1338, 1339, 1340, 1341, 1342, 1343, 1344,
1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353, 1354, 1355, 1356, 1357, 1358, 1359, 1360,
1361, 1362, 1363, 1364, 1365, 1366, 1367, 1368, 1369, 1370, 1371, 1372, 1373, 1374, 1375, 1376,
1377, 1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392,
1393, 1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408,
1409, 1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424,
1425, 1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440,
1441, 1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456,
1457, 1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472,
1473, 1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1484, 1485, 1486, 1487, 1488,
1489, 1490, 1491, 1492, 1493, 1494, 1495, 1496, 1497, 1498, 1499, 1500, 1501, 1502, 1503, 1504,
];
pub static ITEM_ID_REMAP_1_21_7_TO_1_21_11: &[u16] = &[
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25,
26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49,
50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73,
74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97,
98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116,
117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 134, 135,
136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 153, 154,
155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 172, 173,
174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 191, 192,
193, 194, 195, 196, 197, 198, 199, 200, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211,
212, 213, 214, 215, 216, 217, 218, 219, 220, 221, 222, 223, 224, 225, 226, 227, 228, 229, 230,
231, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 249,
250, 251, 252, 253, 254, 255, 256, 257, 258, 259, 260, 261, 262, 263, 264, 265, 266, 267, 268,
269, 270, 271, 272, 273, 274, 275, 276, 277, 278, 279, 280, 281, 282, 283, 284, 285, 286, 287,
288, 289, 290, 291, 292, 293, 294, 295, 296, 297, 298, 299, 300, 301, 302, 303, 304, 317, 318,
319, 320, 321, 322, 323, 324, 325, 326, 327, 328, 329, 330, 331, 332, 333, 334, 335, 336, 337,
338, 339, 340, 341, 342, 343, 344, 345, 346, 347, 348, 349, 350, 351, 352, 353, 354, 355, 356,
357, 358, 359, 360, 361, 362, 363, 364, 365, 367, 368, 369, 370, 371, 372, 373, 374, 375, 376,
377, 378, 379, 380, 381, 382, 383, 384, 385, 386, 387, 388, 389, 390, 399, 408, 409, 410, 411,
412, 413, 414, 415, 416, 417, 418, 419, 420, 421, 422, 423, 424, 425, 426, 427, 428, 429, 430,
431, 432, 433, 434, 435, 436, 437, 438, 439, 440, 441, 442, 443, 444, 445, 446, 447, 448, 449,
450, 451, 452, 453, 454, 455, 456, 457, 458, 459, 460, 461, 462, 463, 464, 465, 466, 467, 468,
469, 470, 471, 472, 473, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486, 487,
488, 489, 490, 491, 492, 493, 494, 495, 496, 497, 498, 499, 500, 501, 502, 503, 504, 505, 506,
507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525,
526, 527, 528, 529, 530, 531, 532, 533, 534, 535, 536, 537, 538, 539, 540, 541, 542, 543, 544,
545, 546, 547, 548, 549, 550, 551, 552, 553, 554, 555, 556, 557, 558, 559, 560, 561, 562, 563,
564, 565, 566, 567, 568, 569, 570, 571, 572, 573, 574, 575, 576, 577, 578, 579, 580, 581, 582,
583, 584, 585, 586, 587, 588, 589, 590, 591, 592, 593, 594, 595, 596, 597, 598, 599, 600, 601,
602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 614, 615, 616, 617, 618, 619, 620,
621, 622, 623, 624, 625, 626, 627, 628, 629, 630, 631, 632, 633, 634, 635, 636, 637, 638, 639,
640, 641, 642, 643, 644, 645, 646, 647, 648, 649, 650, 651, 652, 653, 654, 655, 656, 657, 658,
659, 660, 661, 662, 663, 664, 665, 666, 667, 668, 669, 670, 671, 672, 673, 674, 675, 676, 677,
678, 679, 680, 681, 682, 683, 684, 685, 686, 687, 688, 689, 690, 691, 692, 693, 694, 695, 696,
697, 698, 699, 700, 701, 702, 703, 704, 705, 706, 707, 708, 709, 710, 711, 712, 713, 714, 715,
716, 717, 718, 719, 720, 721, 722, 723, 724, 725, 726, 727, 728, 729, 730, 731, 732, 733, 741,
742, 743, 744, 745, 746, 747, 748, 749, 750, 751, 752, 753, 754, 755, 756, 757, 758, 759, 760,
761, 762, 763, 764, 765, 766, 767, 768, 769, 770, 771, 772, 773, 774, 775, 776, 777, 778, 779,
780, 781, 782, 783, 784, 785, 786, 787, 788, 789, 790, 791, 792, 793, 794, 795, 796, 797, 798,
799, 800, 801, 802, 803, 804, 805, 806, 807, 808, 809, 810, 811, 812, 813, 814, 815, 816, 817,
818, 819, 820, 821, 822, 823, 824, 825, 826, 827, 828, 829, 830, 831, 832, 833, 834, 835, 836,
837, 838, 839, 840, 841, 842, 843, 844, 845, 846, 847, 848, 849, 850, 851, 852, 853, 854, 855,
856, 857, 858, 859, 860, 861, 862, 863, 864, 865, 866, 867, 868, 869, 870, 871, 872, 873, 874,
875, 876, 877, 878, 879, 880, 881, 882, 883, 884, 885, 886, 887, 888, 889, 890, 891, 892, 893,
894, 895, 896, 897, 898, 899, 900, 901, 902, 903, 904, 905, 906, 907, 908, 909, 910, 911, 912,
913, 914, 915, 921, 922, 923, 924, 925, 926, 927, 928, 929, 930, 931, 932, 933, 934, 935, 936,
937, 938, 939, 940, 941, 942, 943, 944, 945, 946, 947, 948, 949, 950, 951, 952, 953, 954, 955,
956, 957, 962, 963, 964, 965, 966, 967, 968, 969, 970, 971, 972, 973, 974, 975, 976, 977, 978,
979, 980, 981, 982, 983, 984, 985, 986, 987, 988, 989, 990, 991, 992, 993, 994, 995, 996, 997,
998, 999, 1000, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013,
1014, 1015, 1016, 1017, 1018, 1019, 1020, 1021, 1022, 1023, 1024, 1025, 1026, 1027, 1028, 1029,
1030, 1031, 1032, 1033, 1034, 1035, 1036, 1037, 1038, 1039, 1040, 1041, 1042, 1043, 1044, 1045,
1046, 1047, 1048, 1049, 1050, 1051, 1052, 1053, 1054, 1055, 1056, 1057, 1058, 1059, 1060, 1061,
1062, 1063, 1064, 1065, 1066, 1067, 1068, 1069, 1070, 1071, 1072, 1073, 1074, 1075, 1076, 1077,
1078, 1079, 1080, 1081, 1082, 1083, 1084, 1085, 1086, 1087, 1088, 1089, 1090, 1091, 1092, 1093,
1094, 1095, 1096, 1097, 1098, 1099, 1100, 1101, 1102, 1103, 1104, 1105, 1106, 1107, 1108, 1109,
1110, 1111, 1112, 1113, 1114, 1115, 1116, 1117, 1118, 1119, 1120, 1121, 1122, 1123, 1124, 1125,
1126, 1127, 1128, 1129, 1141, 1163, 1151, 1142, 1143, 1203, 1172, 1188, 1138, 1134, 1186, 1130,
1152, 1131, 1190, 1153, 1135, 1174, 1191, 1213, 1214, 1215, 1198, 1144, 1154, 1204, 1205, 1155,
1145, 1192, 1206, 1136, 1175, 1167, 1146, 1207, 1164, 1137, 1147, 1148, 1139, 1193, 1132, 1208,
1209, 1199, 1149, 1157, 1150, 1200, 1158, 1133, 1216, 1194, 1177, 1178, 1195, 1165, 1168, 1187,
1159, 1179, 1210, 1160, 1169, 1161, 1162, 1202, 1170, 1201, 1171, 1196, 1197, 1180, 1181, 1140,
1211, 1189, 1182, 1183, 1185, 1212, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226,
1227, 1228, 1229, 1230, 1231, 1232, 1233, 1234, 1235, 1236, 1237, 1238, 1239, 1240, 1241, 1242,
1243, 1244, 1245, 1246, 1247, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1256, 1257, 1258, 1260,
1261, 1262, 1263, 1264, 1265, 1266, 1267, 1268, 1269, 1270, 1271, 1272, 1273, 1274, 1275, 1276,
1277, 1278, 1279, 1280, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1289, 1290, 1291, 1292,
1293, 1294, 1295, 1303, 1304, 1305, 1307, 1308, 1309, 1310, 1311, 1312, 1313, 1314, 1315, 1316,
1317, 1318, 1319, 1320, 1321, 1322, 1323, 1324, 1325, 1326, 1327, 1328, 1329, 1330, 1331, 1332,
1338, 1339, 1340, 1341, 1342, 1343, 1344, 1345, 1346, 1347, 1348, 1349, 1350, 1351, 1352, 1353,
1354, 1355, 1356, 1357, 1358, 1359, 1360, 1361, 1362, 1363, 1364, 1373, 1374, 1375, 1376, 1377,
1378, 1379, 1380, 1381, 1382, 1383, 1384, 1385, 1386, 1387, 1388, 1389, 1390, 1391, 1392, 1393,
1394, 1395, 1396, 1397, 1398, 1399, 1400, 1401, 1402, 1403, 1404, 1405, 1406, 1407, 1408, 1409,
1410, 1411, 1412, 1413, 1414, 1415, 1416, 1417, 1418, 1419, 1420, 1421, 1422, 1423, 1424, 1425,
1426, 1427, 1428, 1429, 1430, 1431, 1432, 1433, 1434, 1435, 1436, 1437, 1438, 1439, 1440, 1441,
1442, 1443, 1444, 1445, 1446, 1447, 1448, 1449, 1450, 1451, 1452, 1453, 1454, 1455, 1456, 1457,
1458, 1459, 1460, 1461, 1462, 1463, 1464, 1465, 1466, 1467, 1468, 1469, 1470, 1471, 1472, 1473,
1474, 1475, 1476, 1477, 1478, 1479, 1480, 1481, 1482, 1483, 1500, 1501, 1502, 1503, 1504,
];
#[must_use]
pub fn remap_item_id_for_version(item_id: u16, version: MinecraftVersion) -> u16 {
match version {
MinecraftVersion::V_1_21_7 => ITEM_ID_REMAP_1_21_11_TO_1_21_7
.get(usize::from(item_id))
.copied()
.unwrap_or(item_id),
MinecraftVersion::V_1_21_9 => ITEM_ID_REMAP_1_21_11_TO_1_21_9
.get(usize::from(item_id))
.copied()
.unwrap_or(item_id),
_ => item_id,
}
}
#[must_use]
pub fn remap_item_id_from_version(item_id: u16, version: MinecraftVersion) -> u16 {
match version {
MinecraftVersion::V_1_21_7 => ITEM_ID_REMAP_1_21_7_TO_1_21_11
.get(usize::from(item_id))
.copied()
.unwrap_or(item_id),
MinecraftVersion::V_1_21_9 => ITEM_ID_REMAP_1_21_9_TO_1_21_11
.get(usize::from(item_id))
.copied()
.unwrap_or(item_id),
_ => item_id,
}
}

View File

@ -0,0 +1,163 @@
/* This file is generated. Do not edit manually. */
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
#[repr(u32)]
pub enum JukeboxSong {
Id11,
Id13,
Id5,
Blocks,
Cat,
Chirp,
Creator,
CreatorMusicBox,
Far,
LavaChicken,
Mall,
Mellohi,
Otherside,
Pigstep,
Precipice,
Relic,
Stal,
Strad,
Tears,
Wait,
Ward,
}
impl JukeboxSong {
#[doc = r" Returns the JukeboxSong from the string name (e.g., 'pigstep')."]
pub fn from_name(name: &str) -> Option<Self> {
match name {
"11" => Some(Self::Id11),
"13" => Some(Self::Id13),
"5" => Some(Self::Id5),
"blocks" => Some(Self::Blocks),
"cat" => Some(Self::Cat),
"chirp" => Some(Self::Chirp),
"creator" => Some(Self::Creator),
"creator_music_box" => Some(Self::CreatorMusicBox),
"far" => Some(Self::Far),
"lava_chicken" => Some(Self::LavaChicken),
"mall" => Some(Self::Mall),
"mellohi" => Some(Self::Mellohi),
"otherside" => Some(Self::Otherside),
"pigstep" => Some(Self::Pigstep),
"precipice" => Some(Self::Precipice),
"relic" => Some(Self::Relic),
"stal" => Some(Self::Stal),
"strad" => Some(Self::Strad),
"tears" => Some(Self::Tears),
"wait" => Some(Self::Wait),
"ward" => Some(Self::Ward),
_ => None,
}
}
#[doc = r" Returns the string name of the song."]
pub const fn to_name(&self) -> &'static str {
match self {
Self::Id11 => "11",
Self::Id13 => "13",
Self::Id5 => "5",
Self::Blocks => "blocks",
Self::Cat => "cat",
Self::Chirp => "chirp",
Self::Creator => "creator",
Self::CreatorMusicBox => "creator_music_box",
Self::Far => "far",
Self::LavaChicken => "lava_chicken",
Self::Mall => "mall",
Self::Mellohi => "mellohi",
Self::Otherside => "otherside",
Self::Pigstep => "pigstep",
Self::Precipice => "precipice",
Self::Relic => "relic",
Self::Stal => "stal",
Self::Strad => "strad",
Self::Tears => "tears",
Self::Wait => "wait",
Self::Ward => "ward",
}
}
#[doc = r" Returns the numeric ID associated with the song."]
pub const fn get_id(&self) -> u32 {
match self {
Self::Id11 => 0u32,
Self::Id13 => 1u32,
Self::Id5 => 2u32,
Self::Blocks => 3u32,
Self::Cat => 4u32,
Self::Chirp => 5u32,
Self::Creator => 6u32,
Self::CreatorMusicBox => 7u32,
Self::Far => 8u32,
Self::LavaChicken => 9u32,
Self::Mall => 10u32,
Self::Mellohi => 11u32,
Self::Otherside => 12u32,
Self::Pigstep => 13u32,
Self::Precipice => 14u32,
Self::Relic => 15u32,
Self::Stal => 16u32,
Self::Strad => 17u32,
Self::Tears => 18u32,
Self::Wait => 19u32,
Self::Ward => 20u32,
}
}
#[doc = r" Returns the comparator output value (0-15) for this song."]
pub const fn comparator_output(&self) -> u8 {
match self {
Self::Id11 => 11u8,
Self::Id13 => 1u8,
Self::Id5 => 15u8,
Self::Blocks => 3u8,
Self::Cat => 2u8,
Self::Chirp => 4u8,
Self::Creator => 12u8,
Self::CreatorMusicBox => 11u8,
Self::Far => 5u8,
Self::LavaChicken => 9u8,
Self::Mall => 6u8,
Self::Mellohi => 7u8,
Self::Otherside => 14u8,
Self::Pigstep => 13u8,
Self::Precipice => 13u8,
Self::Relic => 14u8,
Self::Stal => 8u8,
Self::Strad => 9u8,
Self::Tears => 10u8,
Self::Wait => 12u8,
Self::Ward => 10u8,
}
}
#[doc = r" Returns the song length in seconds."]
pub const fn length_in_seconds(&self) -> u32 {
match self {
Self::Id11 => 71u32,
Self::Id13 => 178u32,
Self::Id5 => 178u32,
Self::Blocks => 345u32,
Self::Cat => 185u32,
Self::Chirp => 185u32,
Self::Creator => 176u32,
Self::CreatorMusicBox => 73u32,
Self::Far => 174u32,
Self::LavaChicken => 134u32,
Self::Mall => 197u32,
Self::Mellohi => 96u32,
Self::Otherside => 195u32,
Self::Pigstep => 149u32,
Self::Precipice => 299u32,
Self::Relic => 218u32,
Self::Stal => 150u32,
Self::Strad => 188u32,
Self::Tears => 175u32,
Self::Wait => 238u32,
Self::Ward => 251u32,
}
}
#[doc = r" Returns the song length in ticks (20 ticks per second)."]
pub const fn length_in_ticks(&self) -> u64 {
self.length_in_seconds() as u64 * 20
}
}

View File

@ -0,0 +1,9 @@
/* This file is generated. Do not edit manually. */
pub const CHAT: u8 = 0u8;
pub const EMOTE_COMMAND: u8 = 1u8;
pub const MSG_COMMAND_INCOMING: u8 = 2u8;
pub const MSG_COMMAND_OUTGOING: u8 = 3u8;
pub const SAY_COMMAND: u8 = 4u8;
pub const TEAM_MSG_COMMAND_INCOMING: u8 = 5u8;
pub const TEAM_MSG_COMMAND_OUTGOING: u8 = 6u8;
pub const RAW: u8 = 7u8;

View File

@ -0,0 +1,133 @@
/* This file is generated. Do not edit manually. */
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash, PartialOrd, Ord)]
#[repr(i32)]
pub enum MetaDataType {
Byte,
Integer,
Long,
Float,
String,
TextComponent,
OptionalTextComponent,
ItemStack,
Boolean,
Rotation,
BlockPos,
OptionalBlockPos,
Facing,
LazyEntityReference,
BlockState,
OptionalBlockState,
Particle,
ParticleList,
VillagerData,
OptionalInt,
EntityPose,
CatVariant,
CowVariant,
WolfVariant,
WolfSoundVariant,
FrogVariant,
PigVariant,
ChickenVariant,
ZombieNautilusVariant,
OptionalGlobalPos,
PaintingVariant,
SnifferState,
ArmadilloState,
CopperGolemState,
OxidationLevel,
Vector3f,
QuaternionF,
Profile,
Arm,
}
impl MetaDataType {
pub fn from_id(id: i32) -> Option<Self> {
match id {
0i32 => Some(Self::Byte),
1i32 => Some(Self::Integer),
2i32 => Some(Self::Long),
3i32 => Some(Self::Float),
4i32 => Some(Self::String),
5i32 => Some(Self::TextComponent),
6i32 => Some(Self::OptionalTextComponent),
7i32 => Some(Self::ItemStack),
8i32 => Some(Self::Boolean),
9i32 => Some(Self::Rotation),
10i32 => Some(Self::BlockPos),
11i32 => Some(Self::OptionalBlockPos),
12i32 => Some(Self::Facing),
13i32 => Some(Self::LazyEntityReference),
14i32 => Some(Self::BlockState),
15i32 => Some(Self::OptionalBlockState),
16i32 => Some(Self::Particle),
17i32 => Some(Self::ParticleList),
18i32 => Some(Self::VillagerData),
19i32 => Some(Self::OptionalInt),
20i32 => Some(Self::EntityPose),
21i32 => Some(Self::CatVariant),
22i32 => Some(Self::CowVariant),
23i32 => Some(Self::WolfVariant),
24i32 => Some(Self::WolfSoundVariant),
25i32 => Some(Self::FrogVariant),
26i32 => Some(Self::PigVariant),
27i32 => Some(Self::ChickenVariant),
28i32 => Some(Self::ZombieNautilusVariant),
29i32 => Some(Self::OptionalGlobalPos),
30i32 => Some(Self::PaintingVariant),
31i32 => Some(Self::SnifferState),
32i32 => Some(Self::ArmadilloState),
33i32 => Some(Self::CopperGolemState),
34i32 => Some(Self::OxidationLevel),
35i32 => Some(Self::Vector3f),
36i32 => Some(Self::QuaternionF),
37i32 => Some(Self::Profile),
38i32 => Some(Self::Arm),
_ => None,
}
}
pub const fn id(&self) -> i32 {
match self {
Self::Byte => 0i32,
Self::Integer => 1i32,
Self::Long => 2i32,
Self::Float => 3i32,
Self::String => 4i32,
Self::TextComponent => 5i32,
Self::OptionalTextComponent => 6i32,
Self::ItemStack => 7i32,
Self::Boolean => 8i32,
Self::Rotation => 9i32,
Self::BlockPos => 10i32,
Self::OptionalBlockPos => 11i32,
Self::Facing => 12i32,
Self::LazyEntityReference => 13i32,
Self::BlockState => 14i32,
Self::OptionalBlockState => 15i32,
Self::Particle => 16i32,
Self::ParticleList => 17i32,
Self::VillagerData => 18i32,
Self::OptionalInt => 19i32,
Self::EntityPose => 20i32,
Self::CatVariant => 21i32,
Self::CowVariant => 22i32,
Self::WolfVariant => 23i32,
Self::WolfSoundVariant => 24i32,
Self::FrogVariant => 25i32,
Self::PigVariant => 26i32,
Self::ChickenVariant => 27i32,
Self::ZombieNautilusVariant => 28i32,
Self::OptionalGlobalPos => 29i32,
Self::PaintingVariant => 30i32,
Self::SnifferState => 31i32,
Self::ArmadilloState => 32i32,
Self::CopperGolemState => 33i32,
Self::OxidationLevel => 34i32,
Self::Vector3f => 35i32,
Self::QuaternionF => 36i32,
Self::Profile => 37i32,
Self::Arm => 38i32,
}
}
}

View File

@ -0,0 +1,271 @@
/* This file is generated. Do not edit manually. */
pub struct DoublePerlinNoiseParameters {
pub first_octave: i32,
pub amplitudes: &'static [f64],
id: &'static str,
}
impl DoublePerlinNoiseParameters {
pub const fn new(first_octave: i32, amplitudes: &'static [f64], id: &'static str) -> Self {
Self {
first_octave,
amplitudes,
id,
}
}
pub const fn id(&self) -> &'static str {
self.id
}
pub fn id_to_parameters(id: &str) -> Option<&DoublePerlinNoiseParameters> {
Some(match id {
"aquifer_barrier" => &AQUIFER_BARRIER,
"aquifer_fluid_level_floodedness" => &AQUIFER_FLUID_LEVEL_FLOODEDNESS,
"aquifer_fluid_level_spread" => &AQUIFER_FLUID_LEVEL_SPREAD,
"aquifer_lava" => &AQUIFER_LAVA,
"badlands_pillar" => &BADLANDS_PILLAR,
"badlands_pillar_roof" => &BADLANDS_PILLAR_ROOF,
"badlands_surface" => &BADLANDS_SURFACE,
"calcite" => &CALCITE,
"cave_cheese" => &CAVE_CHEESE,
"cave_entrance" => &CAVE_ENTRANCE,
"cave_layer" => &CAVE_LAYER,
"clay_bands_offset" => &CLAY_BANDS_OFFSET,
"continentalness" => &CONTINENTALNESS,
"continentalness_large" => &CONTINENTALNESS_LARGE,
"erosion" => &EROSION,
"erosion_large" => &EROSION_LARGE,
"gravel" => &GRAVEL,
"gravel_layer" => &GRAVEL_LAYER,
"ice" => &ICE,
"iceberg_pillar" => &ICEBERG_PILLAR,
"iceberg_pillar_roof" => &ICEBERG_PILLAR_ROOF,
"iceberg_surface" => &ICEBERG_SURFACE,
"jagged" => &JAGGED,
"nether_state_selector" => &NETHER_STATE_SELECTOR,
"nether_wart" => &NETHER_WART,
"netherrack" => &NETHERRACK,
"noodle" => &NOODLE,
"noodle_ridge_a" => &NOODLE_RIDGE_A,
"noodle_ridge_b" => &NOODLE_RIDGE_B,
"noodle_thickness" => &NOODLE_THICKNESS,
"offset" => &OFFSET,
"ore_gap" => &ORE_GAP,
"ore_vein_a" => &ORE_VEIN_A,
"ore_vein_b" => &ORE_VEIN_B,
"ore_veininess" => &ORE_VEININESS,
"packed_ice" => &PACKED_ICE,
"patch" => &PATCH,
"pillar" => &PILLAR,
"pillar_rareness" => &PILLAR_RARENESS,
"pillar_thickness" => &PILLAR_THICKNESS,
"powder_snow" => &POWDER_SNOW,
"ridge" => &RIDGE,
"soul_sand_layer" => &SOUL_SAND_LAYER,
"spaghetti_2d" => &SPAGHETTI_2D,
"spaghetti_2d_elevation" => &SPAGHETTI_2D_ELEVATION,
"spaghetti_2d_modulator" => &SPAGHETTI_2D_MODULATOR,
"spaghetti_2d_thickness" => &SPAGHETTI_2D_THICKNESS,
"spaghetti_3d_1" => &SPAGHETTI_3D_1,
"spaghetti_3d_2" => &SPAGHETTI_3D_2,
"spaghetti_3d_rarity" => &SPAGHETTI_3D_RARITY,
"spaghetti_3d_thickness" => &SPAGHETTI_3D_THICKNESS,
"spaghetti_roughness" => &SPAGHETTI_ROUGHNESS,
"spaghetti_roughness_modulator" => &SPAGHETTI_ROUGHNESS_MODULATOR,
"surface" => &SURFACE,
"surface_secondary" => &SURFACE_SECONDARY,
"surface_swamp" => &SURFACE_SWAMP,
"temperature" => &TEMPERATURE,
"temperature_large" => &TEMPERATURE_LARGE,
"vegetation" => &VEGETATION,
"vegetation_large" => &VEGETATION_LARGE,
_ => return None,
})
}
}
pub const AQUIFER_BARRIER: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-3i32, &[1f64], "minecraft:aquifer_barrier");
pub const AQUIFER_FLUID_LEVEL_FLOODEDNESS: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:aquifer_fluid_level_floodedness");
pub const AQUIFER_FLUID_LEVEL_SPREAD: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-5i32, &[1f64], "minecraft:aquifer_fluid_level_spread");
pub const AQUIFER_LAVA: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-1i32, &[1f64], "minecraft:aquifer_lava");
pub const BADLANDS_PILLAR: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-2i32,
&[1f64, 1f64, 1f64, 1f64],
"minecraft:badlands_pillar",
);
pub const BADLANDS_PILLAR_ROOF: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:badlands_pillar_roof");
pub const BADLANDS_SURFACE: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64], "minecraft:badlands_surface");
pub const CALCITE: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-9i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:calcite");
pub const CAVE_CHEESE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-8i32,
&[0.5f64, 1f64, 2f64, 1f64, 2f64, 1f64, 0f64, 2f64, 0f64],
"minecraft:cave_cheese",
);
pub const CAVE_ENTRANCE: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[0.4f64, 0.5f64, 1f64], "minecraft:cave_entrance");
pub const CAVE_LAYER: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:cave_layer");
pub const CLAY_BANDS_OFFSET: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:clay_bands_offset");
pub const CONTINENTALNESS: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-9i32,
&[1f64, 1f64, 2f64, 2f64, 2f64, 1f64, 1f64, 1f64, 1f64],
"minecraft:continentalness",
);
pub const CONTINENTALNESS_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-11i32,
&[1f64, 1f64, 2f64, 2f64, 2f64, 1f64, 1f64, 1f64, 1f64],
"minecraft:continentalness_large",
);
pub const EROSION: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-9i32, &[1f64, 1f64, 0f64, 1f64, 1f64], "minecraft:erosion");
pub const EROSION_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-11i32,
&[1f64, 1f64, 0f64, 1f64, 1f64],
"minecraft:erosion_large",
);
pub const GRAVEL: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:gravel");
pub const GRAVEL_LAYER: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-8i32,
&[
1f64,
1f64,
1f64,
1f64,
0f64,
0f64,
0f64,
0f64,
0.013333333333333334f64,
],
"minecraft:gravel_layer",
);
pub const ICE: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-4i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:ice");
pub const ICEBERG_PILLAR: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:iceberg_pillar");
pub const ICEBERG_PILLAR_ROOF: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-3i32, &[1f64], "minecraft:iceberg_pillar_roof");
pub const ICEBERG_SURFACE: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64], "minecraft:iceberg_surface");
pub const JAGGED: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-16i32,
&[
1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64, 1f64,
1f64,
],
"minecraft:jagged",
);
pub const NETHER_STATE_SELECTOR: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-4i32, &[1f64], "minecraft:nether_state_selector");
pub const NETHER_WART: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-3i32, &[1f64, 0f64, 0f64, 0.9f64], "minecraft:nether_wart");
pub const NETHERRACK: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-3i32, &[1f64, 0f64, 0f64, 0.35f64], "minecraft:netherrack");
pub const NOODLE: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:noodle");
pub const NOODLE_RIDGE_A: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:noodle_ridge_a");
pub const NOODLE_RIDGE_B: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:noodle_ridge_b");
pub const NOODLE_THICKNESS: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:noodle_thickness");
pub const OFFSET: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-3i32, &[1f64, 1f64, 1f64, 0f64], "minecraft:offset");
pub const ORE_GAP: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-5i32, &[1f64], "minecraft:ore_gap");
pub const ORE_VEIN_A: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:ore_vein_a");
pub const ORE_VEIN_B: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:ore_vein_b");
pub const ORE_VEININESS: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:ore_veininess");
pub const PACKED_ICE: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:packed_ice");
pub const PATCH: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-5i32,
&[1f64, 0f64, 0f64, 0f64, 0f64, 0.013333333333333334f64],
"minecraft:patch",
);
pub const PILLAR: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64], "minecraft:pillar");
pub const PILLAR_RARENESS: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:pillar_rareness");
pub const PILLAR_THICKNESS: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:pillar_thickness");
pub const POWDER_SNOW: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64, 1f64], "minecraft:powder_snow");
pub const RIDGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-7i32,
&[1f64, 2f64, 1f64, 0f64, 0f64, 0f64],
"minecraft:ridge",
);
pub const SOUL_SAND_LAYER: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-8i32,
&[
1f64,
1f64,
1f64,
1f64,
0f64,
0f64,
0f64,
0f64,
0.013333333333333334f64,
],
"minecraft:soul_sand_layer",
);
pub const SPAGHETTI_2D: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:spaghetti_2d");
pub const SPAGHETTI_2D_ELEVATION: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:spaghetti_2d_elevation");
pub const SPAGHETTI_2D_MODULATOR: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-11i32, &[1f64], "minecraft:spaghetti_2d_modulator");
pub const SPAGHETTI_2D_THICKNESS: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-11i32, &[1f64], "minecraft:spaghetti_2d_thickness");
pub const SPAGHETTI_3D_1: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:spaghetti_3d_1");
pub const SPAGHETTI_3D_2: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-7i32, &[1f64], "minecraft:spaghetti_3d_2");
pub const SPAGHETTI_3D_RARITY: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-11i32, &[1f64], "minecraft:spaghetti_3d_rarity");
pub const SPAGHETTI_3D_THICKNESS: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:spaghetti_3d_thickness");
pub const SPAGHETTI_ROUGHNESS: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-5i32, &[1f64], "minecraft:spaghetti_roughness");
pub const SPAGHETTI_ROUGHNESS_MODULATOR: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-8i32, &[1f64], "minecraft:spaghetti_roughness_modulator");
pub const SURFACE: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-6i32, &[1f64, 1f64, 1f64], "minecraft:surface");
pub const SURFACE_SECONDARY: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-6i32,
&[1f64, 1f64, 0f64, 1f64],
"minecraft:surface_secondary",
);
pub const SURFACE_SWAMP: DoublePerlinNoiseParameters =
DoublePerlinNoiseParameters::new(-2i32, &[1f64], "minecraft:surface_swamp");
pub const TEMPERATURE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-10i32,
&[1.5f64, 0f64, 1f64, 0f64, 0f64, 0f64],
"minecraft:temperature",
);
pub const TEMPERATURE_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-12i32,
&[1.5f64, 0f64, 1f64, 0f64, 0f64, 0f64],
"minecraft:temperature_large",
);
pub const VEGETATION: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-8i32,
&[1f64, 1f64, 0f64, 0f64, 0f64, 0f64],
"minecraft:vegetation",
);
pub const VEGETATION_LARGE: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
-10i32,
&[1f64, 1f64, 0f64, 0f64, 0f64, 0f64],
"minecraft:vegetation_large",
);

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,361 @@
/* This file is generated. Do not edit manually. */
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum Particle {
AngryVillager,
Block,
BlockMarker,
Bubble,
Cloud,
CopperFireFlame,
Crit,
DamageIndicator,
DragonBreath,
DrippingLava,
FallingLava,
LandingLava,
DrippingWater,
FallingWater,
Dust,
DustColorTransition,
Effect,
ElderGuardian,
EnchantedHit,
Enchant,
EndRod,
EntityEffect,
ExplosionEmitter,
Explosion,
Gust,
SmallGust,
GustEmitterLarge,
GustEmitterSmall,
SonicBoom,
FallingDust,
Firework,
Fishing,
Flame,
Infested,
CherryLeaves,
PaleOakLeaves,
TintedLeaves,
SculkSoul,
SculkCharge,
SculkChargePop,
SoulFireFlame,
Soul,
Flash,
HappyVillager,
Composter,
Heart,
InstantEffect,
Item,
Vibration,
Trail,
ItemSlime,
ItemCobweb,
ItemSnowball,
LargeSmoke,
Lava,
Mycelium,
Note,
Poof,
Portal,
Rain,
Smoke,
WhiteSmoke,
Sneeze,
Spit,
SquidInk,
SweepAttack,
TotemOfUndying,
Underwater,
Splash,
Witch,
BubblePop,
CurrentDown,
BubbleColumnUp,
Nautilus,
Dolphin,
CampfireCosySmoke,
CampfireSignalSmoke,
DrippingHoney,
FallingHoney,
LandingHoney,
FallingNectar,
FallingSporeBlossom,
Ash,
CrimsonSpore,
WarpedSpore,
SporeBlossomAir,
DrippingObsidianTear,
FallingObsidianTear,
LandingObsidianTear,
ReversePortal,
WhiteAsh,
SmallFlame,
Snowflake,
DrippingDripstoneLava,
FallingDripstoneLava,
DrippingDripstoneWater,
FallingDripstoneWater,
GlowSquidInk,
Glow,
WaxOn,
WaxOff,
ElectricSpark,
Scrape,
Shriek,
EggCrack,
DustPlume,
TrialSpawnerDetection,
TrialSpawnerDetectionOminous,
VaultConnection,
DustPillar,
OminousSpawning,
RaidOmen,
TrialOmen,
BlockCrumble,
Firefly,
}
impl Particle {
#[doc = r" Try to parse a `Particle` from a resource location string."]
pub fn from_name(name: &str) -> Option<Self> {
match name {
"angry_villager" => Some(Self::AngryVillager),
"block" => Some(Self::Block),
"block_marker" => Some(Self::BlockMarker),
"bubble" => Some(Self::Bubble),
"cloud" => Some(Self::Cloud),
"copper_fire_flame" => Some(Self::CopperFireFlame),
"crit" => Some(Self::Crit),
"damage_indicator" => Some(Self::DamageIndicator),
"dragon_breath" => Some(Self::DragonBreath),
"dripping_lava" => Some(Self::DrippingLava),
"falling_lava" => Some(Self::FallingLava),
"landing_lava" => Some(Self::LandingLava),
"dripping_water" => Some(Self::DrippingWater),
"falling_water" => Some(Self::FallingWater),
"dust" => Some(Self::Dust),
"dust_color_transition" => Some(Self::DustColorTransition),
"effect" => Some(Self::Effect),
"elder_guardian" => Some(Self::ElderGuardian),
"enchanted_hit" => Some(Self::EnchantedHit),
"enchant" => Some(Self::Enchant),
"end_rod" => Some(Self::EndRod),
"entity_effect" => Some(Self::EntityEffect),
"explosion_emitter" => Some(Self::ExplosionEmitter),
"explosion" => Some(Self::Explosion),
"gust" => Some(Self::Gust),
"small_gust" => Some(Self::SmallGust),
"gust_emitter_large" => Some(Self::GustEmitterLarge),
"gust_emitter_small" => Some(Self::GustEmitterSmall),
"sonic_boom" => Some(Self::SonicBoom),
"falling_dust" => Some(Self::FallingDust),
"firework" => Some(Self::Firework),
"fishing" => Some(Self::Fishing),
"flame" => Some(Self::Flame),
"infested" => Some(Self::Infested),
"cherry_leaves" => Some(Self::CherryLeaves),
"pale_oak_leaves" => Some(Self::PaleOakLeaves),
"tinted_leaves" => Some(Self::TintedLeaves),
"sculk_soul" => Some(Self::SculkSoul),
"sculk_charge" => Some(Self::SculkCharge),
"sculk_charge_pop" => Some(Self::SculkChargePop),
"soul_fire_flame" => Some(Self::SoulFireFlame),
"soul" => Some(Self::Soul),
"flash" => Some(Self::Flash),
"happy_villager" => Some(Self::HappyVillager),
"composter" => Some(Self::Composter),
"heart" => Some(Self::Heart),
"instant_effect" => Some(Self::InstantEffect),
"item" => Some(Self::Item),
"vibration" => Some(Self::Vibration),
"trail" => Some(Self::Trail),
"item_slime" => Some(Self::ItemSlime),
"item_cobweb" => Some(Self::ItemCobweb),
"item_snowball" => Some(Self::ItemSnowball),
"large_smoke" => Some(Self::LargeSmoke),
"lava" => Some(Self::Lava),
"mycelium" => Some(Self::Mycelium),
"note" => Some(Self::Note),
"poof" => Some(Self::Poof),
"portal" => Some(Self::Portal),
"rain" => Some(Self::Rain),
"smoke" => Some(Self::Smoke),
"white_smoke" => Some(Self::WhiteSmoke),
"sneeze" => Some(Self::Sneeze),
"spit" => Some(Self::Spit),
"squid_ink" => Some(Self::SquidInk),
"sweep_attack" => Some(Self::SweepAttack),
"totem_of_undying" => Some(Self::TotemOfUndying),
"underwater" => Some(Self::Underwater),
"splash" => Some(Self::Splash),
"witch" => Some(Self::Witch),
"bubble_pop" => Some(Self::BubblePop),
"current_down" => Some(Self::CurrentDown),
"bubble_column_up" => Some(Self::BubbleColumnUp),
"nautilus" => Some(Self::Nautilus),
"dolphin" => Some(Self::Dolphin),
"campfire_cosy_smoke" => Some(Self::CampfireCosySmoke),
"campfire_signal_smoke" => Some(Self::CampfireSignalSmoke),
"dripping_honey" => Some(Self::DrippingHoney),
"falling_honey" => Some(Self::FallingHoney),
"landing_honey" => Some(Self::LandingHoney),
"falling_nectar" => Some(Self::FallingNectar),
"falling_spore_blossom" => Some(Self::FallingSporeBlossom),
"ash" => Some(Self::Ash),
"crimson_spore" => Some(Self::CrimsonSpore),
"warped_spore" => Some(Self::WarpedSpore),
"spore_blossom_air" => Some(Self::SporeBlossomAir),
"dripping_obsidian_tear" => Some(Self::DrippingObsidianTear),
"falling_obsidian_tear" => Some(Self::FallingObsidianTear),
"landing_obsidian_tear" => Some(Self::LandingObsidianTear),
"reverse_portal" => Some(Self::ReversePortal),
"white_ash" => Some(Self::WhiteAsh),
"small_flame" => Some(Self::SmallFlame),
"snowflake" => Some(Self::Snowflake),
"dripping_dripstone_lava" => Some(Self::DrippingDripstoneLava),
"falling_dripstone_lava" => Some(Self::FallingDripstoneLava),
"dripping_dripstone_water" => Some(Self::DrippingDripstoneWater),
"falling_dripstone_water" => Some(Self::FallingDripstoneWater),
"glow_squid_ink" => Some(Self::GlowSquidInk),
"glow" => Some(Self::Glow),
"wax_on" => Some(Self::WaxOn),
"wax_off" => Some(Self::WaxOff),
"electric_spark" => Some(Self::ElectricSpark),
"scrape" => Some(Self::Scrape),
"shriek" => Some(Self::Shriek),
"egg_crack" => Some(Self::EggCrack),
"dust_plume" => Some(Self::DustPlume),
"trial_spawner_detection" => Some(Self::TrialSpawnerDetection),
"trial_spawner_detection_ominous" => Some(Self::TrialSpawnerDetectionOminous),
"vault_connection" => Some(Self::VaultConnection),
"dust_pillar" => Some(Self::DustPillar),
"ominous_spawning" => Some(Self::OminousSpawning),
"raid_omen" => Some(Self::RaidOmen),
"trial_omen" => Some(Self::TrialOmen),
"block_crumble" => Some(Self::BlockCrumble),
"firefly" => Some(Self::Firefly),
_ => None,
}
}
pub const fn to_name(&self) -> &'static str {
match self {
Self::AngryVillager => "angry_villager",
Self::Block => "block",
Self::BlockMarker => "block_marker",
Self::Bubble => "bubble",
Self::Cloud => "cloud",
Self::CopperFireFlame => "copper_fire_flame",
Self::Crit => "crit",
Self::DamageIndicator => "damage_indicator",
Self::DragonBreath => "dragon_breath",
Self::DrippingLava => "dripping_lava",
Self::FallingLava => "falling_lava",
Self::LandingLava => "landing_lava",
Self::DrippingWater => "dripping_water",
Self::FallingWater => "falling_water",
Self::Dust => "dust",
Self::DustColorTransition => "dust_color_transition",
Self::Effect => "effect",
Self::ElderGuardian => "elder_guardian",
Self::EnchantedHit => "enchanted_hit",
Self::Enchant => "enchant",
Self::EndRod => "end_rod",
Self::EntityEffect => "entity_effect",
Self::ExplosionEmitter => "explosion_emitter",
Self::Explosion => "explosion",
Self::Gust => "gust",
Self::SmallGust => "small_gust",
Self::GustEmitterLarge => "gust_emitter_large",
Self::GustEmitterSmall => "gust_emitter_small",
Self::SonicBoom => "sonic_boom",
Self::FallingDust => "falling_dust",
Self::Firework => "firework",
Self::Fishing => "fishing",
Self::Flame => "flame",
Self::Infested => "infested",
Self::CherryLeaves => "cherry_leaves",
Self::PaleOakLeaves => "pale_oak_leaves",
Self::TintedLeaves => "tinted_leaves",
Self::SculkSoul => "sculk_soul",
Self::SculkCharge => "sculk_charge",
Self::SculkChargePop => "sculk_charge_pop",
Self::SoulFireFlame => "soul_fire_flame",
Self::Soul => "soul",
Self::Flash => "flash",
Self::HappyVillager => "happy_villager",
Self::Composter => "composter",
Self::Heart => "heart",
Self::InstantEffect => "instant_effect",
Self::Item => "item",
Self::Vibration => "vibration",
Self::Trail => "trail",
Self::ItemSlime => "item_slime",
Self::ItemCobweb => "item_cobweb",
Self::ItemSnowball => "item_snowball",
Self::LargeSmoke => "large_smoke",
Self::Lava => "lava",
Self::Mycelium => "mycelium",
Self::Note => "note",
Self::Poof => "poof",
Self::Portal => "portal",
Self::Rain => "rain",
Self::Smoke => "smoke",
Self::WhiteSmoke => "white_smoke",
Self::Sneeze => "sneeze",
Self::Spit => "spit",
Self::SquidInk => "squid_ink",
Self::SweepAttack => "sweep_attack",
Self::TotemOfUndying => "totem_of_undying",
Self::Underwater => "underwater",
Self::Splash => "splash",
Self::Witch => "witch",
Self::BubblePop => "bubble_pop",
Self::CurrentDown => "current_down",
Self::BubbleColumnUp => "bubble_column_up",
Self::Nautilus => "nautilus",
Self::Dolphin => "dolphin",
Self::CampfireCosySmoke => "campfire_cosy_smoke",
Self::CampfireSignalSmoke => "campfire_signal_smoke",
Self::DrippingHoney => "dripping_honey",
Self::FallingHoney => "falling_honey",
Self::LandingHoney => "landing_honey",
Self::FallingNectar => "falling_nectar",
Self::FallingSporeBlossom => "falling_spore_blossom",
Self::Ash => "ash",
Self::CrimsonSpore => "crimson_spore",
Self::WarpedSpore => "warped_spore",
Self::SporeBlossomAir => "spore_blossom_air",
Self::DrippingObsidianTear => "dripping_obsidian_tear",
Self::FallingObsidianTear => "falling_obsidian_tear",
Self::LandingObsidianTear => "landing_obsidian_tear",
Self::ReversePortal => "reverse_portal",
Self::WhiteAsh => "white_ash",
Self::SmallFlame => "small_flame",
Self::Snowflake => "snowflake",
Self::DrippingDripstoneLava => "dripping_dripstone_lava",
Self::FallingDripstoneLava => "falling_dripstone_lava",
Self::DrippingDripstoneWater => "dripping_dripstone_water",
Self::FallingDripstoneWater => "falling_dripstone_water",
Self::GlowSquidInk => "glow_squid_ink",
Self::Glow => "glow",
Self::WaxOn => "wax_on",
Self::WaxOff => "wax_off",
Self::ElectricSpark => "electric_spark",
Self::Scrape => "scrape",
Self::Shriek => "shriek",
Self::EggCrack => "egg_crack",
Self::DustPlume => "dust_plume",
Self::TrialSpawnerDetection => "trial_spawner_detection",
Self::TrialSpawnerDetectionOminous => "trial_spawner_detection_ominous",
Self::VaultConnection => "vault_connection",
Self::DustPillar => "dust_pillar",
Self::OminousSpawning => "ominous_spawning",
Self::RaidOmen => "raid_omen",
Self::TrialOmen => "trial_omen",
Self::BlockCrumble => "block_crumble",
Self::Firefly => "firefly",
}
}
}

View File

@ -0,0 +1,670 @@
/* This file is generated. Do not edit manually. */
use crate::effect::StatusEffect;
use std::hash::Hash;
pub struct Potion {
pub id: u8,
pub name: &'static str,
pub effects: &'static [Effect],
}
#[derive(Clone)]
pub struct Effect {
pub effect_type: &'static StatusEffect,
pub duration: i32,
pub amplifier: u8,
pub ambient: bool,
pub show_particles: bool,
pub show_icon: bool,
pub blend: bool,
}
impl Potion {
pub const AWKWARD: Self = Self {
name: "awkward",
id: 3u8,
effects: &[],
};
pub const FIRE_RESISTANCE: Self = Self {
name: "fire_resistance",
id: 11u8,
effects: &[Effect {
effect_type: &StatusEffect::FIRE_RESISTANCE,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const HARMING: Self = Self {
name: "harming",
id: 26u8,
effects: &[Effect {
effect_type: &StatusEffect::INSTANT_DAMAGE,
duration: 1i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const HEALING: Self = Self {
name: "healing",
id: 24u8,
effects: &[Effect {
effect_type: &StatusEffect::INSTANT_HEALTH,
duration: 1i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const INFESTED: Self = Self {
name: "infested",
id: 45u8,
effects: &[Effect {
effect_type: &StatusEffect::INFESTED,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const INVISIBILITY: Self = Self {
name: "invisibility",
id: 6u8,
effects: &[Effect {
effect_type: &StatusEffect::INVISIBILITY,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LEAPING: Self = Self {
name: "leaping",
id: 8u8,
effects: &[Effect {
effect_type: &StatusEffect::JUMP_BOOST,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_FIRE_RESISTANCE: Self = Self {
name: "long_fire_resistance",
id: 12u8,
effects: &[Effect {
effect_type: &StatusEffect::FIRE_RESISTANCE,
duration: 9600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_INVISIBILITY: Self = Self {
name: "long_invisibility",
id: 7u8,
effects: &[Effect {
effect_type: &StatusEffect::INVISIBILITY,
duration: 9600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_LEAPING: Self = Self {
name: "long_leaping",
id: 9u8,
effects: &[Effect {
effect_type: &StatusEffect::JUMP_BOOST,
duration: 9600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_NIGHT_VISION: Self = Self {
name: "long_night_vision",
id: 5u8,
effects: &[Effect {
effect_type: &StatusEffect::NIGHT_VISION,
duration: 9600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_POISON: Self = Self {
name: "long_poison",
id: 29u8,
effects: &[Effect {
effect_type: &StatusEffect::POISON,
duration: 1800i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_REGENERATION: Self = Self {
name: "long_regeneration",
id: 32u8,
effects: &[Effect {
effect_type: &StatusEffect::REGENERATION,
duration: 1800i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_SLOW_FALLING: Self = Self {
name: "long_slow_falling",
id: 41u8,
effects: &[Effect {
effect_type: &StatusEffect::SLOW_FALLING,
duration: 4800i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_SLOWNESS: Self = Self {
name: "long_slowness",
id: 17u8,
effects: &[Effect {
effect_type: &StatusEffect::SLOWNESS,
duration: 4800i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_STRENGTH: Self = Self {
name: "long_strength",
id: 35u8,
effects: &[Effect {
effect_type: &StatusEffect::STRENGTH,
duration: 9600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_SWIFTNESS: Self = Self {
name: "long_swiftness",
id: 14u8,
effects: &[Effect {
effect_type: &StatusEffect::SPEED,
duration: 9600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_TURTLE_MASTER: Self = Self {
name: "long_turtle_master",
id: 20u8,
effects: &[
Effect {
effect_type: &StatusEffect::SLOWNESS,
duration: 800i32,
amplifier: 3u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
},
Effect {
effect_type: &StatusEffect::RESISTANCE,
duration: 800i32,
amplifier: 2u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
},
],
};
pub const LONG_WATER_BREATHING: Self = Self {
name: "long_water_breathing",
id: 23u8,
effects: &[Effect {
effect_type: &StatusEffect::WATER_BREATHING,
duration: 9600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LONG_WEAKNESS: Self = Self {
name: "long_weakness",
id: 38u8,
effects: &[Effect {
effect_type: &StatusEffect::WEAKNESS,
duration: 4800i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const LUCK: Self = Self {
name: "luck",
id: 39u8,
effects: &[Effect {
effect_type: &StatusEffect::LUCK,
duration: 6000i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const MUNDANE: Self = Self {
name: "mundane",
id: 1u8,
effects: &[],
};
pub const NIGHT_VISION: Self = Self {
name: "night_vision",
id: 4u8,
effects: &[Effect {
effect_type: &StatusEffect::NIGHT_VISION,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const OOZING: Self = Self {
name: "oozing",
id: 44u8,
effects: &[Effect {
effect_type: &StatusEffect::OOZING,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const POISON: Self = Self {
name: "poison",
id: 28u8,
effects: &[Effect {
effect_type: &StatusEffect::POISON,
duration: 900i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const REGENERATION: Self = Self {
name: "regeneration",
id: 31u8,
effects: &[Effect {
effect_type: &StatusEffect::REGENERATION,
duration: 900i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const SLOW_FALLING: Self = Self {
name: "slow_falling",
id: 40u8,
effects: &[Effect {
effect_type: &StatusEffect::SLOW_FALLING,
duration: 1800i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const SLOWNESS: Self = Self {
name: "slowness",
id: 16u8,
effects: &[Effect {
effect_type: &StatusEffect::SLOWNESS,
duration: 1800i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRENGTH: Self = Self {
name: "strength",
id: 34u8,
effects: &[Effect {
effect_type: &StatusEffect::STRENGTH,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRONG_HARMING: Self = Self {
name: "strong_harming",
id: 27u8,
effects: &[Effect {
effect_type: &StatusEffect::INSTANT_DAMAGE,
duration: 1i32,
amplifier: 1u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRONG_HEALING: Self = Self {
name: "strong_healing",
id: 25u8,
effects: &[Effect {
effect_type: &StatusEffect::INSTANT_HEALTH,
duration: 1i32,
amplifier: 1u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRONG_LEAPING: Self = Self {
name: "strong_leaping",
id: 10u8,
effects: &[Effect {
effect_type: &StatusEffect::JUMP_BOOST,
duration: 1800i32,
amplifier: 1u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRONG_POISON: Self = Self {
name: "strong_poison",
id: 30u8,
effects: &[Effect {
effect_type: &StatusEffect::POISON,
duration: 432i32,
amplifier: 1u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRONG_REGENERATION: Self = Self {
name: "strong_regeneration",
id: 33u8,
effects: &[Effect {
effect_type: &StatusEffect::REGENERATION,
duration: 450i32,
amplifier: 1u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRONG_SLOWNESS: Self = Self {
name: "strong_slowness",
id: 18u8,
effects: &[Effect {
effect_type: &StatusEffect::SLOWNESS,
duration: 400i32,
amplifier: 3u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRONG_STRENGTH: Self = Self {
name: "strong_strength",
id: 36u8,
effects: &[Effect {
effect_type: &StatusEffect::STRENGTH,
duration: 1800i32,
amplifier: 1u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRONG_SWIFTNESS: Self = Self {
name: "strong_swiftness",
id: 15u8,
effects: &[Effect {
effect_type: &StatusEffect::SPEED,
duration: 1800i32,
amplifier: 1u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const STRONG_TURTLE_MASTER: Self = Self {
name: "strong_turtle_master",
id: 21u8,
effects: &[
Effect {
effect_type: &StatusEffect::SLOWNESS,
duration: 400i32,
amplifier: 5u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
},
Effect {
effect_type: &StatusEffect::RESISTANCE,
duration: 400i32,
amplifier: 3u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
},
],
};
pub const SWIFTNESS: Self = Self {
name: "swiftness",
id: 13u8,
effects: &[Effect {
effect_type: &StatusEffect::SPEED,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const THICK: Self = Self {
name: "thick",
id: 2u8,
effects: &[],
};
pub const TURTLE_MASTER: Self = Self {
name: "turtle_master",
id: 19u8,
effects: &[
Effect {
effect_type: &StatusEffect::SLOWNESS,
duration: 400i32,
amplifier: 3u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
},
Effect {
effect_type: &StatusEffect::RESISTANCE,
duration: 400i32,
amplifier: 2u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
},
],
};
pub const WATER: Self = Self {
name: "water",
id: 0u8,
effects: &[],
};
pub const WATER_BREATHING: Self = Self {
name: "water_breathing",
id: 22u8,
effects: &[Effect {
effect_type: &StatusEffect::WATER_BREATHING,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const WEAKNESS: Self = Self {
name: "weakness",
id: 37u8,
effects: &[Effect {
effect_type: &StatusEffect::WEAKNESS,
duration: 1800i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const WEAVING: Self = Self {
name: "weaving",
id: 43u8,
effects: &[Effect {
effect_type: &StatusEffect::WEAVING,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub const WIND_CHARGED: Self = Self {
name: "wind_charged",
id: 42u8,
effects: &[Effect {
effect_type: &StatusEffect::WIND_CHARGED,
duration: 3600i32,
amplifier: 0u8,
ambient: false,
show_particles: true,
show_icon: true,
blend: false,
}],
};
pub fn from_name(name: &str) -> Option<&'static Self> {
match name {
"awkward" => Some(&Self::AWKWARD),
"fire_resistance" => Some(&Self::FIRE_RESISTANCE),
"harming" => Some(&Self::HARMING),
"healing" => Some(&Self::HEALING),
"infested" => Some(&Self::INFESTED),
"invisibility" => Some(&Self::INVISIBILITY),
"leaping" => Some(&Self::LEAPING),
"long_fire_resistance" => Some(&Self::LONG_FIRE_RESISTANCE),
"long_invisibility" => Some(&Self::LONG_INVISIBILITY),
"long_leaping" => Some(&Self::LONG_LEAPING),
"long_night_vision" => Some(&Self::LONG_NIGHT_VISION),
"long_poison" => Some(&Self::LONG_POISON),
"long_regeneration" => Some(&Self::LONG_REGENERATION),
"long_slow_falling" => Some(&Self::LONG_SLOW_FALLING),
"long_slowness" => Some(&Self::LONG_SLOWNESS),
"long_strength" => Some(&Self::LONG_STRENGTH),
"long_swiftness" => Some(&Self::LONG_SWIFTNESS),
"long_turtle_master" => Some(&Self::LONG_TURTLE_MASTER),
"long_water_breathing" => Some(&Self::LONG_WATER_BREATHING),
"long_weakness" => Some(&Self::LONG_WEAKNESS),
"luck" => Some(&Self::LUCK),
"mundane" => Some(&Self::MUNDANE),
"night_vision" => Some(&Self::NIGHT_VISION),
"oozing" => Some(&Self::OOZING),
"poison" => Some(&Self::POISON),
"regeneration" => Some(&Self::REGENERATION),
"slow_falling" => Some(&Self::SLOW_FALLING),
"slowness" => Some(&Self::SLOWNESS),
"strength" => Some(&Self::STRENGTH),
"strong_harming" => Some(&Self::STRONG_HARMING),
"strong_healing" => Some(&Self::STRONG_HEALING),
"strong_leaping" => Some(&Self::STRONG_LEAPING),
"strong_poison" => Some(&Self::STRONG_POISON),
"strong_regeneration" => Some(&Self::STRONG_REGENERATION),
"strong_slowness" => Some(&Self::STRONG_SLOWNESS),
"strong_strength" => Some(&Self::STRONG_STRENGTH),
"strong_swiftness" => Some(&Self::STRONG_SWIFTNESS),
"strong_turtle_master" => Some(&Self::STRONG_TURTLE_MASTER),
"swiftness" => Some(&Self::SWIFTNESS),
"thick" => Some(&Self::THICK),
"turtle_master" => Some(&Self::TURTLE_MASTER),
"water" => Some(&Self::WATER),
"water_breathing" => Some(&Self::WATER_BREATHING),
"weakness" => Some(&Self::WEAKNESS),
"weaving" => Some(&Self::WEAVING),
"wind_charged" => Some(&Self::WIND_CHARGED),
_ => None,
}
}
}

View File

@ -0,0 +1,343 @@
/* This file is generated. Do not edit manually. */
#![allow(dead_code)]
use crate::item::Item;
use crate::potion::Potion;
pub struct PotionRecipe {
from: &'static Potion,
ingredient: &'static [&'static Item],
to: &'static Potion,
}
pub struct ItemRecipe {
from: &'static Item,
ingredient: &'static [&'static Item],
to: &'static Item,
}
pub const ITEM_RECIPES: [ItemRecipe; 2usize] = [
ItemRecipe {
from: &Item::POTION,
ingredient: &[&Item::GUNPOWDER],
to: &Item::SPLASH_POTION,
},
ItemRecipe {
from: &Item::SPLASH_POTION,
ingredient: &[&Item::DRAGON_BREATH],
to: &Item::LINGERING_POTION,
},
];
pub const POTION_RECIPES: [PotionRecipe; 63usize] = [
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::THICK,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::REDSTONE],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::NETHER_WART],
to: &Potion::AWKWARD,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::BREEZE_ROD],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::BREEZE_ROD],
to: &Potion::WIND_CHARGED,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::SLIME_BLOCK],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::SLIME_BLOCK],
to: &Potion::OOZING,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::STONE],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::STONE],
to: &Potion::INFESTED,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::COBWEB],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::COBWEB],
to: &Potion::WEAVING,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::GOLDEN_CARROT],
to: &Potion::NIGHT_VISION,
},
PotionRecipe {
from: &Potion::NIGHT_VISION,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_NIGHT_VISION,
},
PotionRecipe {
from: &Potion::NIGHT_VISION,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::INVISIBILITY,
},
PotionRecipe {
from: &Potion::LONG_NIGHT_VISION,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::LONG_INVISIBILITY,
},
PotionRecipe {
from: &Potion::INVISIBILITY,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_INVISIBILITY,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::MAGMA_CREAM],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::MAGMA_CREAM],
to: &Potion::FIRE_RESISTANCE,
},
PotionRecipe {
from: &Potion::FIRE_RESISTANCE,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_FIRE_RESISTANCE,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::RABBIT_FOOT],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::RABBIT_FOOT],
to: &Potion::LEAPING,
},
PotionRecipe {
from: &Potion::LEAPING,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_LEAPING,
},
PotionRecipe {
from: &Potion::LEAPING,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::STRONG_LEAPING,
},
PotionRecipe {
from: &Potion::LEAPING,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::SLOWNESS,
},
PotionRecipe {
from: &Potion::LONG_LEAPING,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::LONG_SLOWNESS,
},
PotionRecipe {
from: &Potion::SLOWNESS,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_SLOWNESS,
},
PotionRecipe {
from: &Potion::SLOWNESS,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::STRONG_SLOWNESS,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::TURTLE_HELMET],
to: &Potion::TURTLE_MASTER,
},
PotionRecipe {
from: &Potion::TURTLE_MASTER,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_TURTLE_MASTER,
},
PotionRecipe {
from: &Potion::TURTLE_MASTER,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::STRONG_TURTLE_MASTER,
},
PotionRecipe {
from: &Potion::SWIFTNESS,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::SLOWNESS,
},
PotionRecipe {
from: &Potion::LONG_SWIFTNESS,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::LONG_SLOWNESS,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::SUGAR],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::SUGAR],
to: &Potion::SWIFTNESS,
},
PotionRecipe {
from: &Potion::SWIFTNESS,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_SWIFTNESS,
},
PotionRecipe {
from: &Potion::SWIFTNESS,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::STRONG_SWIFTNESS,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::PUFFERFISH],
to: &Potion::WATER_BREATHING,
},
PotionRecipe {
from: &Potion::WATER_BREATHING,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_WATER_BREATHING,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::GLISTERING_MELON_SLICE],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::GLISTERING_MELON_SLICE],
to: &Potion::HEALING,
},
PotionRecipe {
from: &Potion::HEALING,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::STRONG_HEALING,
},
PotionRecipe {
from: &Potion::HEALING,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::HARMING,
},
PotionRecipe {
from: &Potion::STRONG_HEALING,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::STRONG_HARMING,
},
PotionRecipe {
from: &Potion::HARMING,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::STRONG_HARMING,
},
PotionRecipe {
from: &Potion::POISON,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::HARMING,
},
PotionRecipe {
from: &Potion::LONG_POISON,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::HARMING,
},
PotionRecipe {
from: &Potion::STRONG_POISON,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::STRONG_HARMING,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::SPIDER_EYE],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::SPIDER_EYE],
to: &Potion::POISON,
},
PotionRecipe {
from: &Potion::POISON,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_POISON,
},
PotionRecipe {
from: &Potion::POISON,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::STRONG_POISON,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::GHAST_TEAR],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::GHAST_TEAR],
to: &Potion::REGENERATION,
},
PotionRecipe {
from: &Potion::REGENERATION,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_REGENERATION,
},
PotionRecipe {
from: &Potion::REGENERATION,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::STRONG_REGENERATION,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::BLAZE_POWDER],
to: &Potion::MUNDANE,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::BLAZE_POWDER],
to: &Potion::STRENGTH,
},
PotionRecipe {
from: &Potion::STRENGTH,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_STRENGTH,
},
PotionRecipe {
from: &Potion::STRENGTH,
ingredient: &[&Item::GLOWSTONE_DUST],
to: &Potion::STRONG_STRENGTH,
},
PotionRecipe {
from: &Potion::WATER,
ingredient: &[&Item::FERMENTED_SPIDER_EYE],
to: &Potion::WEAKNESS,
},
PotionRecipe {
from: &Potion::WEAKNESS,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_WEAKNESS,
},
PotionRecipe {
from: &Potion::AWKWARD,
ingredient: &[&Item::PHANTOM_MEMBRANE],
to: &Potion::SLOW_FALLING,
},
PotionRecipe {
from: &Potion::SLOW_FALLING,
ingredient: &[&Item::REDSTONE],
to: &Potion::LONG_SLOW_FALLING,
},
];

View File

@ -0,0 +1,12 @@
/* This file is generated. Do not edit manually. */
#[must_use]
pub const fn get_recipe_remainder_id(item_id: u16) -> Option<u16> {
match item_id {
1013 => Some(1012),
1014 => Some(1012),
1018 => Some(1012),
1290 => Some(1120),
1381 => Some(1120),
_ => None,
}
}

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,22 @@
/* This file is generated. Do not edit manually. */
pub enum ScoreboardDisplaySlot {
List,
Sidebar,
BelowName,
TeamBlack,
TeamDarkBlue,
TeamDarkGreen,
TeamDarkAqua,
TeamDarkRed,
TeamDarkPurple,
TeamGold,
TeamGray,
TeamDarkGray,
TeamBlue,
TeamGreen,
TeamAqua,
TeamRed,
TeamLightPurple,
TeamYellow,
TeamWhite,
}

View File

@ -0,0 +1,29 @@
/* This file is generated. Do not edit manually. */
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum WindowType {
Generic9x1,
Generic9x2,
Generic9x3,
Generic9x4,
Generic9x5,
Generic9x6,
Generic3x3,
Crafter3x3,
Anvil,
Beacon,
BlastFurnace,
BrewingStand,
Crafting,
Enchantment,
Furnace,
Grindstone,
Hopper,
Lectern,
Loom,
Merchant,
ShulkerBox,
Smithing,
Smoker,
CartographyTable,
Stonecutter,
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,48 @@
/* This file is generated. Do not edit manually. */
#[derive(Clone, Copy)]
pub enum SoundCategory {
Master,
Music,
Records,
Weather,
Blocks,
Hostile,
Neutral,
Players,
Ambient,
Voice,
Ui,
}
impl SoundCategory {
pub fn from_name(name: &str) -> Option<Self> {
match name {
"master" => Some(Self::Master),
"music" => Some(Self::Music),
"records" => Some(Self::Records),
"weather" => Some(Self::Weather),
"blocks" => Some(Self::Blocks),
"hostile" => Some(Self::Hostile),
"neutral" => Some(Self::Neutral),
"players" => Some(Self::Players),
"ambient" => Some(Self::Ambient),
"voice" => Some(Self::Voice),
"ui" => Some(Self::Ui),
_ => None,
}
}
pub const fn to_name(&self) -> &'static str {
match self {
Self::Master => "master",
Self::Music => "music",
Self::Records => "records",
Self::Weather => "weather",
Self::Blocks => "blocks",
Self::Hostile => "hostile",
Self::Neutral => "neutral",
Self::Players => "players",
Self::Ambient => "ambient",
Self::Voice => "voice",
Self::Ui => "ui",
}
}
}

View File

@ -0,0 +1,108 @@
/* This file is generated. Do not edit manually. */
use crate::entity_type::EntityType;
pub fn entity_from_egg(id: u16) -> Option<&'static EntityType> {
match id {
1130u16 => Some(&EntityType::CHICKEN),
1131u16 => Some(&EntityType::COW),
1132u16 => Some(&EntityType::PIG),
1133u16 => Some(&EntityType::SHEEP),
1134u16 => Some(&EntityType::CAMEL),
1135u16 => Some(&EntityType::DONKEY),
1136u16 => Some(&EntityType::HORSE),
1137u16 => Some(&EntityType::MULE),
1138u16 => Some(&EntityType::CAT),
1139u16 => Some(&EntityType::PARROT),
1140u16 => Some(&EntityType::WOLF),
1141u16 => Some(&EntityType::ARMADILLO),
1142u16 => Some(&EntityType::BAT),
1143u16 => Some(&EntityType::BEE),
1144u16 => Some(&EntityType::FOX),
1145u16 => Some(&EntityType::GOAT),
1146u16 => Some(&EntityType::LLAMA),
1147u16 => Some(&EntityType::OCELOT),
1148u16 => Some(&EntityType::PANDA),
1149u16 => Some(&EntityType::POLAR_BEAR),
1150u16 => Some(&EntityType::RABBIT),
1151u16 => Some(&EntityType::AXOLOTL),
1152u16 => Some(&EntityType::COD),
1153u16 => Some(&EntityType::DOLPHIN),
1154u16 => Some(&EntityType::FROG),
1155u16 => Some(&EntityType::GLOW_SQUID),
1156u16 => Some(&EntityType::NAUTILUS),
1157u16 => Some(&EntityType::PUFFERFISH),
1158u16 => Some(&EntityType::SALMON),
1159u16 => Some(&EntityType::SQUID),
1160u16 => Some(&EntityType::TADPOLE),
1161u16 => Some(&EntityType::TROPICAL_FISH),
1162u16 => Some(&EntityType::TURTLE),
1163u16 => Some(&EntityType::ALLAY),
1164u16 => Some(&EntityType::MOOSHROOM),
1165u16 => Some(&EntityType::SNIFFER),
1166u16 => Some(&EntityType::COPPER_GOLEM),
1167u16 => Some(&EntityType::IRON_GOLEM),
1168u16 => Some(&EntityType::SNOW_GOLEM),
1169u16 => Some(&EntityType::TRADER_LLAMA),
1170u16 => Some(&EntityType::VILLAGER),
1171u16 => Some(&EntityType::WANDERING_TRADER),
1172u16 => Some(&EntityType::BOGGED),
1173u16 => Some(&EntityType::CAMEL_HUSK),
1174u16 => Some(&EntityType::DROWNED),
1175u16 => Some(&EntityType::HUSK),
1176u16 => Some(&EntityType::PARCHED),
1177u16 => Some(&EntityType::SKELETON),
1178u16 => Some(&EntityType::SKELETON_HORSE),
1179u16 => Some(&EntityType::STRAY),
1180u16 => Some(&EntityType::WITHER),
1181u16 => Some(&EntityType::WITHER_SKELETON),
1182u16 => Some(&EntityType::ZOMBIE),
1183u16 => Some(&EntityType::ZOMBIE_HORSE),
1184u16 => Some(&EntityType::ZOMBIE_NAUTILUS),
1185u16 => Some(&EntityType::ZOMBIE_VILLAGER),
1186u16 => Some(&EntityType::CAVE_SPIDER),
1187u16 => Some(&EntityType::SPIDER),
1188u16 => Some(&EntityType::BREEZE),
1189u16 => Some(&EntityType::CREAKING),
1190u16 => Some(&EntityType::CREEPER),
1191u16 => Some(&EntityType::ELDER_GUARDIAN),
1192u16 => Some(&EntityType::GUARDIAN),
1193u16 => Some(&EntityType::PHANTOM),
1194u16 => Some(&EntityType::SILVERFISH),
1195u16 => Some(&EntityType::SLIME),
1196u16 => Some(&EntityType::WARDEN),
1197u16 => Some(&EntityType::WITCH),
1198u16 => Some(&EntityType::EVOKER),
1199u16 => Some(&EntityType::PILLAGER),
1200u16 => Some(&EntityType::RAVAGER),
1201u16 => Some(&EntityType::VINDICATOR),
1202u16 => Some(&EntityType::VEX),
1203u16 => Some(&EntityType::BLAZE),
1204u16 => Some(&EntityType::GHAST),
1205u16 => Some(&EntityType::HAPPY_GHAST),
1206u16 => Some(&EntityType::HOGLIN),
1207u16 => Some(&EntityType::MAGMA_CUBE),
1208u16 => Some(&EntityType::PIGLIN),
1209u16 => Some(&EntityType::PIGLIN_BRUTE),
1210u16 => Some(&EntityType::STRIDER),
1211u16 => Some(&EntityType::ZOGLIN),
1212u16 => Some(&EntityType::ZOMBIFIED_PIGLIN),
1213u16 => Some(&EntityType::ENDER_DRAGON),
1214u16 => Some(&EntityType::ENDERMAN),
1215u16 => Some(&EntityType::ENDERMITE),
1216u16 => Some(&EntityType::SHULKER),
_ => None,
}
}
pub fn spawn_egg_ids() -> Box<[u16]> {
[
1130u16, 1131u16, 1132u16, 1133u16, 1134u16, 1135u16, 1136u16, 1137u16, 1138u16, 1139u16,
1140u16, 1141u16, 1142u16, 1143u16, 1144u16, 1145u16, 1146u16, 1147u16, 1148u16, 1149u16,
1150u16, 1151u16, 1152u16, 1153u16, 1154u16, 1155u16, 1156u16, 1157u16, 1158u16, 1159u16,
1160u16, 1161u16, 1162u16, 1163u16, 1164u16, 1165u16, 1166u16, 1167u16, 1168u16, 1169u16,
1170u16, 1171u16, 1172u16, 1173u16, 1174u16, 1175u16, 1176u16, 1177u16, 1178u16, 1179u16,
1180u16, 1181u16, 1182u16, 1183u16, 1184u16, 1185u16, 1186u16, 1187u16, 1188u16, 1189u16,
1190u16, 1191u16, 1192u16, 1193u16, 1194u16, 1195u16, 1196u16, 1197u16, 1198u16, 1199u16,
1200u16, 1201u16, 1202u16, 1203u16, 1204u16, 1205u16, 1206u16, 1207u16, 1208u16, 1209u16,
1210u16, 1211u16, 1212u16, 1213u16, 1214u16, 1215u16, 1216u16,
]
.into()
}

View File

@ -0,0 +1,219 @@
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
pub enum EffectType {
Speed,
Slowness,
Haste,
MiningFatigue,
Strength,
InstantHealth,
InstantDamage,
JumpBoost,
Nausea,
Regeneration,
Resistance,
FireResistance,
WaterBreathing,
Invisibility,
Blindness,
NightVision,
Hunger,
Weakness,
Poison,
Wither,
HealthBoost,
Absorption,
Saturation,
Glowing,
Levitation,
Luck,
Unluck,
SlowFalling,
ConduitPower,
DolphinsGrace,
BadOmen,
HeroOfTheVillage,
Darkness,
TrialOmen,
RaidOmen,
WindCharged,
Weaving,
Oozing,
Infested,
}
impl EffectType {
#[doc = r" Try to parse an `EffectType` from a resource location string."]
pub fn from_name(name: &str) -> Option<Self> {
match name {
"speed" => Some(Self::Speed),
"slowness" => Some(Self::Slowness),
"haste" => Some(Self::Haste),
"mining_fatigue" => Some(Self::MiningFatigue),
"strength" => Some(Self::Strength),
"instant_health" => Some(Self::InstantHealth),
"instant_damage" => Some(Self::InstantDamage),
"jump_boost" => Some(Self::JumpBoost),
"nausea" => Some(Self::Nausea),
"regeneration" => Some(Self::Regeneration),
"resistance" => Some(Self::Resistance),
"fire_resistance" => Some(Self::FireResistance),
"water_breathing" => Some(Self::WaterBreathing),
"invisibility" => Some(Self::Invisibility),
"blindness" => Some(Self::Blindness),
"night_vision" => Some(Self::NightVision),
"hunger" => Some(Self::Hunger),
"weakness" => Some(Self::Weakness),
"poison" => Some(Self::Poison),
"wither" => Some(Self::Wither),
"health_boost" => Some(Self::HealthBoost),
"absorption" => Some(Self::Absorption),
"saturation" => Some(Self::Saturation),
"glowing" => Some(Self::Glowing),
"levitation" => Some(Self::Levitation),
"luck" => Some(Self::Luck),
"unluck" => Some(Self::Unluck),
"slow_falling" => Some(Self::SlowFalling),
"conduit_power" => Some(Self::ConduitPower),
"dolphins_grace" => Some(Self::DolphinsGrace),
"bad_omen" => Some(Self::BadOmen),
"hero_of_the_village" => Some(Self::HeroOfTheVillage),
"darkness" => Some(Self::Darkness),
"trial_omen" => Some(Self::TrialOmen),
"raid_omen" => Some(Self::RaidOmen),
"wind_charged" => Some(Self::WindCharged),
"weaving" => Some(Self::Weaving),
"oozing" => Some(Self::Oozing),
"infested" => Some(Self::Infested),
_ => None,
}
}
pub const fn to_name(&self) -> &'static str {
match self {
Self::Speed => "speed",
Self::Slowness => "slowness",
Self::Haste => "haste",
Self::MiningFatigue => "mining_fatigue",
Self::Strength => "strength",
Self::InstantHealth => "instant_health",
Self::InstantDamage => "instant_damage",
Self::JumpBoost => "jump_boost",
Self::Nausea => "nausea",
Self::Regeneration => "regeneration",
Self::Resistance => "resistance",
Self::FireResistance => "fire_resistance",
Self::WaterBreathing => "water_breathing",
Self::Invisibility => "invisibility",
Self::Blindness => "blindness",
Self::NightVision => "night_vision",
Self::Hunger => "hunger",
Self::Weakness => "weakness",
Self::Poison => "poison",
Self::Wither => "wither",
Self::HealthBoost => "health_boost",
Self::Absorption => "absorption",
Self::Saturation => "saturation",
Self::Glowing => "glowing",
Self::Levitation => "levitation",
Self::Luck => "luck",
Self::Unluck => "unluck",
Self::SlowFalling => "slow_falling",
Self::ConduitPower => "conduit_power",
Self::DolphinsGrace => "dolphins_grace",
Self::BadOmen => "bad_omen",
Self::HeroOfTheVillage => "hero_of_the_village",
Self::Darkness => "darkness",
Self::TrialOmen => "trial_omen",
Self::RaidOmen => "raid_omen",
Self::WindCharged => "wind_charged",
Self::Weaving => "weaving",
Self::Oozing => "oozing",
Self::Infested => "infested",
}
}
pub fn from_minecraft_name(name: &str) -> Option<Self> {
match name {
concat!("minecraft:", "speed") => Some(Self::Speed),
concat!("minecraft:", "slowness") => Some(Self::Slowness),
concat!("minecraft:", "haste") => Some(Self::Haste),
concat!("minecraft:", "mining_fatigue") => Some(Self::MiningFatigue),
concat!("minecraft:", "strength") => Some(Self::Strength),
concat!("minecraft:", "instant_health") => Some(Self::InstantHealth),
concat!("minecraft:", "instant_damage") => Some(Self::InstantDamage),
concat!("minecraft:", "jump_boost") => Some(Self::JumpBoost),
concat!("minecraft:", "nausea") => Some(Self::Nausea),
concat!("minecraft:", "regeneration") => Some(Self::Regeneration),
concat!("minecraft:", "resistance") => Some(Self::Resistance),
concat!("minecraft:", "fire_resistance") => Some(Self::FireResistance),
concat!("minecraft:", "water_breathing") => Some(Self::WaterBreathing),
concat!("minecraft:", "invisibility") => Some(Self::Invisibility),
concat!("minecraft:", "blindness") => Some(Self::Blindness),
concat!("minecraft:", "night_vision") => Some(Self::NightVision),
concat!("minecraft:", "hunger") => Some(Self::Hunger),
concat!("minecraft:", "weakness") => Some(Self::Weakness),
concat!("minecraft:", "poison") => Some(Self::Poison),
concat!("minecraft:", "wither") => Some(Self::Wither),
concat!("minecraft:", "health_boost") => Some(Self::HealthBoost),
concat!("minecraft:", "absorption") => Some(Self::Absorption),
concat!("minecraft:", "saturation") => Some(Self::Saturation),
concat!("minecraft:", "glowing") => Some(Self::Glowing),
concat!("minecraft:", "levitation") => Some(Self::Levitation),
concat!("minecraft:", "luck") => Some(Self::Luck),
concat!("minecraft:", "unluck") => Some(Self::Unluck),
concat!("minecraft:", "slow_falling") => Some(Self::SlowFalling),
concat!("minecraft:", "conduit_power") => Some(Self::ConduitPower),
concat!("minecraft:", "dolphins_grace") => Some(Self::DolphinsGrace),
concat!("minecraft:", "bad_omen") => Some(Self::BadOmen),
concat!("minecraft:", "hero_of_the_village") => Some(Self::HeroOfTheVillage),
concat!("minecraft:", "darkness") => Some(Self::Darkness),
concat!("minecraft:", "trial_omen") => Some(Self::TrialOmen),
concat!("minecraft:", "raid_omen") => Some(Self::RaidOmen),
concat!("minecraft:", "wind_charged") => Some(Self::WindCharged),
concat!("minecraft:", "weaving") => Some(Self::Weaving),
concat!("minecraft:", "oozing") => Some(Self::Oozing),
concat!("minecraft:", "infested") => Some(Self::Infested),
_ => None,
}
}
pub const fn to_minecraft_name(&self) -> &'static str {
match self {
Self::Speed => concat!("minecraft:", "speed"),
Self::Slowness => concat!("minecraft:", "slowness"),
Self::Haste => concat!("minecraft:", "haste"),
Self::MiningFatigue => concat!("minecraft:", "mining_fatigue"),
Self::Strength => concat!("minecraft:", "strength"),
Self::InstantHealth => concat!("minecraft:", "instant_health"),
Self::InstantDamage => concat!("minecraft:", "instant_damage"),
Self::JumpBoost => concat!("minecraft:", "jump_boost"),
Self::Nausea => concat!("minecraft:", "nausea"),
Self::Regeneration => concat!("minecraft:", "regeneration"),
Self::Resistance => concat!("minecraft:", "resistance"),
Self::FireResistance => concat!("minecraft:", "fire_resistance"),
Self::WaterBreathing => concat!("minecraft:", "water_breathing"),
Self::Invisibility => concat!("minecraft:", "invisibility"),
Self::Blindness => concat!("minecraft:", "blindness"),
Self::NightVision => concat!("minecraft:", "night_vision"),
Self::Hunger => concat!("minecraft:", "hunger"),
Self::Weakness => concat!("minecraft:", "weakness"),
Self::Poison => concat!("minecraft:", "poison"),
Self::Wither => concat!("minecraft:", "wither"),
Self::HealthBoost => concat!("minecraft:", "health_boost"),
Self::Absorption => concat!("minecraft:", "absorption"),
Self::Saturation => concat!("minecraft:", "saturation"),
Self::Glowing => concat!("minecraft:", "glowing"),
Self::Levitation => concat!("minecraft:", "levitation"),
Self::Luck => concat!("minecraft:", "luck"),
Self::Unluck => concat!("minecraft:", "unluck"),
Self::SlowFalling => concat!("minecraft:", "slow_falling"),
Self::ConduitPower => concat!("minecraft:", "conduit_power"),
Self::DolphinsGrace => concat!("minecraft:", "dolphins_grace"),
Self::BadOmen => concat!("minecraft:", "bad_omen"),
Self::HeroOfTheVillage => concat!("minecraft:", "hero_of_the_village"),
Self::Darkness => concat!("minecraft:", "darkness"),
Self::TrialOmen => concat!("minecraft:", "trial_omen"),
Self::RaidOmen => concat!("minecraft:", "raid_omen"),
Self::WindCharged => concat!("minecraft:", "wind_charged"),
Self::Weaving => concat!("minecraft:", "weaving"),
Self::Oozing => concat!("minecraft:", "oozing"),
Self::Infested => concat!("minecraft:", "infested"),
}
}
}

View File

@ -0,0 +1,747 @@
/* This file is generated. Do not edit manually. */
use pumpkin_util::math::floor_div;
use pumpkin_util::random::{
RandomGenerator, RandomImpl, get_carver_seed, get_region_seed, legacy_rand::LegacyRand,
xoroshiro128::Xoroshiro,
};
#[derive(Clone, Copy, PartialEq, Eq, Hash, Debug)]
pub enum StructureKeys {
PillagerOutpost,
Mineshaft,
MineshaftMesa,
Mansion,
JunglePyramid,
DesertPyramid,
Igloo,
Shipwreck,
ShipwreckBeached,
SwampHut,
Stronghold,
Monument,
OceanRuinCold,
OceanRuinWarm,
Fortress,
NetherFossil,
EndCity,
BuriedTreasure,
BastionRemnant,
VillagePlains,
VillageDesert,
VillageSavanna,
VillageSnowy,
VillageTaiga,
RuinedPortal,
RuinedPortalDesert,
RuinedPortalJungle,
RuinedPortalSwamp,
RuinedPortalMountain,
RuinedPortalOcean,
RuinedPortalNether,
AncientCity,
TrailRuins,
TrialChambers,
}
pub struct StructureSet {
pub placement: StructurePlacement,
pub structures: &'static [WeightedEntry],
}
#[derive(Clone)]
pub struct WeightedEntry {
pub structure: StructureKeys,
pub weight: u32,
}
pub struct StructurePlacement {
pub frequency_reduction_method: Option<FrequencyReductionMethod>,
pub frequency: Option<f32>,
pub salt: u32,
pub placement_type: StructurePlacementType,
}
#[derive(Clone, Copy)]
pub enum FrequencyReductionMethod {
Default,
LegacyType1,
LegacyType2,
LegacyType3,
}
pub enum StructurePlacementType {
RandomSpread(RandomSpreadStructurePlacement),
ConcentricRings(ConcentricRingsStructurePlacement),
}
pub struct RandomSpreadStructurePlacement {
pub spacing: i32,
pub separation: i32,
pub spread_type: Option<SpreadType>,
}
pub struct ConcentricRingsStructurePlacement {
pub spread: i32,
pub distance: i32,
pub count: i32,
pub preferred_biomes: &'static str,
}
#[derive(Clone, Copy)]
pub enum SpreadType {
Linear,
Triangular,
}
impl SpreadType {
pub fn get(&self, random: &mut RandomGenerator, bound: i32) -> i32 {
match self {
Self::Linear => random.next_bounded_i32(bound),
Self::Triangular => i32::midpoint(
random.next_bounded_i32(bound),
random.next_bounded_i32(bound),
),
}
}
}
pub struct Structure {
pub biomes: &'static str,
pub step: GenerationStep,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub enum GenerationStep {
RawGeneration,
Lakes,
LocalModifications,
UndergroundStructures,
SurfaceStructures,
Strongholds,
UndergroundOres,
UndergroundDecoration,
FluidSprings,
VegetalDecoration,
TopLayerModification,
}
impl GenerationStep {
#[must_use]
pub const fn ordinal(&self) -> usize {
*self as usize
}
}
pub struct StructurePlacementCalculator {
pub seed: i64,
}
impl StructurePlacementCalculator {
#[must_use]
pub const fn new(seed: i64) -> Self {
Self { seed }
}
}
impl Structure {
pub const ANCIENT_CITY: Structure = Structure {
biomes: "#minecraft:has_structure/ancient_city",
step: GenerationStep::UndergroundDecoration,
};
pub const BASTION_REMNANT: Structure = Structure {
biomes: "#minecraft:has_structure/bastion_remnant",
step: GenerationStep::SurfaceStructures,
};
pub const BURIED_TREASURE: Structure = Structure {
biomes: "#minecraft:has_structure/buried_treasure",
step: GenerationStep::UndergroundStructures,
};
pub const DESERT_PYRAMID: Structure = Structure {
biomes: "#minecraft:has_structure/desert_pyramid",
step: GenerationStep::SurfaceStructures,
};
pub const END_CITY: Structure = Structure {
biomes: "#minecraft:has_structure/end_city",
step: GenerationStep::SurfaceStructures,
};
pub const FORTRESS: Structure = Structure {
biomes: "#minecraft:has_structure/nether_fortress",
step: GenerationStep::UndergroundDecoration,
};
pub const IGLOO: Structure = Structure {
biomes: "#minecraft:has_structure/igloo",
step: GenerationStep::SurfaceStructures,
};
pub const JUNGLE_PYRAMID: Structure = Structure {
biomes: "#minecraft:has_structure/jungle_temple",
step: GenerationStep::SurfaceStructures,
};
pub const MANSION: Structure = Structure {
biomes: "#minecraft:has_structure/woodland_mansion",
step: GenerationStep::SurfaceStructures,
};
pub const MINESHAFT: Structure = Structure {
biomes: "#minecraft:has_structure/mineshaft",
step: GenerationStep::UndergroundStructures,
};
pub const MINESHAFT_MESA: Structure = Structure {
biomes: "#minecraft:has_structure/mineshaft_mesa",
step: GenerationStep::UndergroundStructures,
};
pub const MONUMENT: Structure = Structure {
biomes: "#minecraft:has_structure/ocean_monument",
step: GenerationStep::SurfaceStructures,
};
pub const NETHER_FOSSIL: Structure = Structure {
biomes: "#minecraft:has_structure/nether_fossil",
step: GenerationStep::UndergroundDecoration,
};
pub const OCEAN_RUIN_COLD: Structure = Structure {
biomes: "#minecraft:has_structure/ocean_ruin_cold",
step: GenerationStep::SurfaceStructures,
};
pub const OCEAN_RUIN_WARM: Structure = Structure {
biomes: "#minecraft:has_structure/ocean_ruin_warm",
step: GenerationStep::SurfaceStructures,
};
pub const PILLAGER_OUTPOST: Structure = Structure {
biomes: "#minecraft:has_structure/pillager_outpost",
step: GenerationStep::SurfaceStructures,
};
pub const RUINED_PORTAL: Structure = Structure {
biomes: "#minecraft:has_structure/ruined_portal_standard",
step: GenerationStep::SurfaceStructures,
};
pub const RUINED_PORTAL_DESERT: Structure = Structure {
biomes: "#minecraft:has_structure/ruined_portal_desert",
step: GenerationStep::SurfaceStructures,
};
pub const RUINED_PORTAL_JUNGLE: Structure = Structure {
biomes: "#minecraft:has_structure/ruined_portal_jungle",
step: GenerationStep::SurfaceStructures,
};
pub const RUINED_PORTAL_MOUNTAIN: Structure = Structure {
biomes: "#minecraft:has_structure/ruined_portal_mountain",
step: GenerationStep::SurfaceStructures,
};
pub const RUINED_PORTAL_NETHER: Structure = Structure {
biomes: "#minecraft:has_structure/ruined_portal_nether",
step: GenerationStep::SurfaceStructures,
};
pub const RUINED_PORTAL_OCEAN: Structure = Structure {
biomes: "#minecraft:has_structure/ruined_portal_ocean",
step: GenerationStep::SurfaceStructures,
};
pub const RUINED_PORTAL_SWAMP: Structure = Structure {
biomes: "#minecraft:has_structure/ruined_portal_swamp",
step: GenerationStep::SurfaceStructures,
};
pub const SHIPWRECK: Structure = Structure {
biomes: "#minecraft:has_structure/shipwreck",
step: GenerationStep::SurfaceStructures,
};
pub const SHIPWRECK_BEACHED: Structure = Structure {
biomes: "#minecraft:has_structure/shipwreck_beached",
step: GenerationStep::SurfaceStructures,
};
pub const STRONGHOLD: Structure = Structure {
biomes: "#minecraft:has_structure/stronghold",
step: GenerationStep::SurfaceStructures,
};
pub const SWAMP_HUT: Structure = Structure {
biomes: "#minecraft:has_structure/swamp_hut",
step: GenerationStep::SurfaceStructures,
};
pub const TRAIL_RUINS: Structure = Structure {
biomes: "#minecraft:has_structure/trail_ruins",
step: GenerationStep::UndergroundStructures,
};
pub const TRIAL_CHAMBERS: Structure = Structure {
biomes: "#minecraft:has_structure/trial_chambers",
step: GenerationStep::UndergroundStructures,
};
pub const VILLAGE_DESERT: Structure = Structure {
biomes: "#minecraft:has_structure/village_desert",
step: GenerationStep::SurfaceStructures,
};
pub const VILLAGE_PLAINS: Structure = Structure {
biomes: "#minecraft:has_structure/village_plains",
step: GenerationStep::SurfaceStructures,
};
pub const VILLAGE_SAVANNA: Structure = Structure {
biomes: "#minecraft:has_structure/village_savanna",
step: GenerationStep::SurfaceStructures,
};
pub const VILLAGE_SNOWY: Structure = Structure {
biomes: "#minecraft:has_structure/village_snowy",
step: GenerationStep::SurfaceStructures,
};
pub const VILLAGE_TAIGA: Structure = Structure {
biomes: "#minecraft:has_structure/village_taiga",
step: GenerationStep::SurfaceStructures,
};
#[must_use]
pub const fn get(key: &StructureKeys) -> &'static Self {
match *key {
StructureKeys::AncientCity => &Self::ANCIENT_CITY,
StructureKeys::BastionRemnant => &Self::BASTION_REMNANT,
StructureKeys::BuriedTreasure => &Self::BURIED_TREASURE,
StructureKeys::DesertPyramid => &Self::DESERT_PYRAMID,
StructureKeys::EndCity => &Self::END_CITY,
StructureKeys::Fortress => &Self::FORTRESS,
StructureKeys::Igloo => &Self::IGLOO,
StructureKeys::JunglePyramid => &Self::JUNGLE_PYRAMID,
StructureKeys::Mansion => &Self::MANSION,
StructureKeys::Mineshaft => &Self::MINESHAFT,
StructureKeys::MineshaftMesa => &Self::MINESHAFT_MESA,
StructureKeys::Monument => &Self::MONUMENT,
StructureKeys::NetherFossil => &Self::NETHER_FOSSIL,
StructureKeys::OceanRuinCold => &Self::OCEAN_RUIN_COLD,
StructureKeys::OceanRuinWarm => &Self::OCEAN_RUIN_WARM,
StructureKeys::PillagerOutpost => &Self::PILLAGER_OUTPOST,
StructureKeys::RuinedPortal => &Self::RUINED_PORTAL,
StructureKeys::RuinedPortalDesert => &Self::RUINED_PORTAL_DESERT,
StructureKeys::RuinedPortalJungle => &Self::RUINED_PORTAL_JUNGLE,
StructureKeys::RuinedPortalMountain => &Self::RUINED_PORTAL_MOUNTAIN,
StructureKeys::RuinedPortalNether => &Self::RUINED_PORTAL_NETHER,
StructureKeys::RuinedPortalOcean => &Self::RUINED_PORTAL_OCEAN,
StructureKeys::RuinedPortalSwamp => &Self::RUINED_PORTAL_SWAMP,
StructureKeys::Shipwreck => &Self::SHIPWRECK,
StructureKeys::ShipwreckBeached => &Self::SHIPWRECK_BEACHED,
StructureKeys::Stronghold => &Self::STRONGHOLD,
StructureKeys::SwampHut => &Self::SWAMP_HUT,
StructureKeys::TrailRuins => &Self::TRAIL_RUINS,
StructureKeys::TrialChambers => &Self::TRIAL_CHAMBERS,
StructureKeys::VillageDesert => &Self::VILLAGE_DESERT,
StructureKeys::VillagePlains => &Self::VILLAGE_PLAINS,
StructureKeys::VillageSavanna => &Self::VILLAGE_SAVANNA,
StructureKeys::VillageSnowy => &Self::VILLAGE_SNOWY,
StructureKeys::VillageTaiga => &Self::VILLAGE_TAIGA,
}
}
}
impl StructureSet {
pub const ANCIENT_CITIES: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 20083232u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 24i32,
separation: 8i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::AncientCity,
weight: 1u32,
}],
};
pub const BURIED_TREASURES: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: Some(FrequencyReductionMethod::LegacyType2),
frequency: Some(0.01f32),
salt: 0u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 1i32,
separation: 0i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::BuriedTreasure,
weight: 1u32,
}],
};
pub const DESERT_PYRAMIDS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 14357617u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 32i32,
separation: 8i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::DesertPyramid,
weight: 1u32,
}],
};
pub const END_CITIES: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 10387313u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 20i32,
separation: 11i32,
spread_type: Some(SpreadType::Triangular),
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::EndCity,
weight: 1u32,
}],
};
pub const IGLOOS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 14357618u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 32i32,
separation: 8i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::Igloo,
weight: 1u32,
}],
};
pub const JUNGLE_TEMPLES: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 14357619u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 32i32,
separation: 8i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::JunglePyramid,
weight: 1u32,
}],
};
pub const MINESHAFTS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: Some(FrequencyReductionMethod::LegacyType3),
frequency: Some(0.004f32),
salt: 0u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 1i32,
separation: 0i32,
spread_type: None,
}),
},
structures: &[
WeightedEntry {
structure: StructureKeys::Mineshaft,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::MineshaftMesa,
weight: 1u32,
},
],
};
pub const NETHER_COMPLEXES: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 30084232u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 27i32,
separation: 4i32,
spread_type: None,
}),
},
structures: &[
WeightedEntry {
structure: StructureKeys::Fortress,
weight: 2u32,
},
WeightedEntry {
structure: StructureKeys::BastionRemnant,
weight: 3u32,
},
],
};
pub const NETHER_FOSSILS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 14357921u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 2i32,
separation: 1i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::NetherFossil,
weight: 1u32,
}],
};
pub const OCEAN_MONUMENTS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 10387313u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 32i32,
separation: 5i32,
spread_type: Some(SpreadType::Triangular),
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::Monument,
weight: 1u32,
}],
};
pub const OCEAN_RUINS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 14357621u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 20i32,
separation: 8i32,
spread_type: None,
}),
},
structures: &[
WeightedEntry {
structure: StructureKeys::OceanRuinCold,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::OceanRuinWarm,
weight: 1u32,
},
],
};
pub const PILLAGER_OUTPOSTS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: Some(FrequencyReductionMethod::LegacyType1),
frequency: Some(0.2f32),
salt: 165745296u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 32i32,
separation: 8i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::PillagerOutpost,
weight: 1u32,
}],
};
pub const RUINED_PORTALS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 34222645u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 40i32,
separation: 15i32,
spread_type: None,
}),
},
structures: &[
WeightedEntry {
structure: StructureKeys::RuinedPortal,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::RuinedPortalDesert,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::RuinedPortalJungle,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::RuinedPortalSwamp,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::RuinedPortalMountain,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::RuinedPortalOcean,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::RuinedPortalNether,
weight: 1u32,
},
],
};
pub const SHIPWRECKS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 165745295u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 24i32,
separation: 4i32,
spread_type: None,
}),
},
structures: &[
WeightedEntry {
structure: StructureKeys::Shipwreck,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::ShipwreckBeached,
weight: 1u32,
},
],
};
pub const STRONGHOLDS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 0u32,
placement_type: StructurePlacementType::ConcentricRings(
ConcentricRingsStructurePlacement {
spread: 3i32,
distance: 32i32,
count: 128i32,
preferred_biomes: "#minecraft:stronghold_biased_to",
},
),
},
structures: &[WeightedEntry {
structure: StructureKeys::Stronghold,
weight: 1u32,
}],
};
pub const SWAMP_HUTS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 14357620u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 32i32,
separation: 8i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::SwampHut,
weight: 1u32,
}],
};
pub const TRAIL_RUINS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 83469867u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 34i32,
separation: 8i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::TrailRuins,
weight: 1u32,
}],
};
pub const TRIAL_CHAMBERS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 94251327u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 34i32,
separation: 12i32,
spread_type: None,
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::TrialChambers,
weight: 1u32,
}],
};
pub const VILLAGES: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 10387312u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 34i32,
separation: 8i32,
spread_type: None,
}),
},
structures: &[
WeightedEntry {
structure: StructureKeys::VillagePlains,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::VillageDesert,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::VillageSavanna,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::VillageSnowy,
weight: 1u32,
},
WeightedEntry {
structure: StructureKeys::VillageTaiga,
weight: 1u32,
},
],
};
pub const WOODLAND_MANSIONS: StructureSet = StructureSet {
placement: StructurePlacement {
frequency_reduction_method: None,
frequency: None,
salt: 10387319u32,
placement_type: StructurePlacementType::RandomSpread(RandomSpreadStructurePlacement {
spacing: 80i32,
separation: 20i32,
spread_type: Some(SpreadType::Triangular),
}),
},
structures: &[WeightedEntry {
structure: StructureKeys::Mansion,
weight: 1u32,
}],
};
pub const ALL: &'static [StructureSet] = &[
Self::ANCIENT_CITIES,
Self::BURIED_TREASURES,
Self::DESERT_PYRAMIDS,
Self::END_CITIES,
Self::IGLOOS,
Self::JUNGLE_TEMPLES,
Self::MINESHAFTS,
Self::NETHER_COMPLEXES,
Self::NETHER_FOSSILS,
Self::OCEAN_MONUMENTS,
Self::OCEAN_RUINS,
Self::PILLAGER_OUTPOSTS,
Self::RUINED_PORTALS,
Self::SHIPWRECKS,
Self::STRONGHOLDS,
Self::SWAMP_HUTS,
Self::TRAIL_RUINS,
Self::TRIAL_CHAMBERS,
Self::VILLAGES,
Self::WOODLAND_MANSIONS,
];
#[must_use]
pub fn get(name: &str) -> Option<&'static Self> {
match name {
"ancient_cities" => Some(&Self::ANCIENT_CITIES),
"buried_treasures" => Some(&Self::BURIED_TREASURES),
"desert_pyramids" => Some(&Self::DESERT_PYRAMIDS),
"end_cities" => Some(&Self::END_CITIES),
"igloos" => Some(&Self::IGLOOS),
"jungle_temples" => Some(&Self::JUNGLE_TEMPLES),
"mineshafts" => Some(&Self::MINESHAFTS),
"nether_complexes" => Some(&Self::NETHER_COMPLEXES),
"nether_fossils" => Some(&Self::NETHER_FOSSILS),
"ocean_monuments" => Some(&Self::OCEAN_MONUMENTS),
"ocean_ruins" => Some(&Self::OCEAN_RUINS),
"pillager_outposts" => Some(&Self::PILLAGER_OUTPOSTS),
"ruined_portals" => Some(&Self::RUINED_PORTALS),
"shipwrecks" => Some(&Self::SHIPWRECKS),
"strongholds" => Some(&Self::STRONGHOLDS),
"swamp_huts" => Some(&Self::SWAMP_HUTS),
"trail_ruins" => Some(&Self::TRAIL_RUINS),
"trial_chambers" => Some(&Self::TRIAL_CHAMBERS),
"villages" => Some(&Self::VILLAGES),
"woodland_mansions" => Some(&Self::WOODLAND_MANSIONS),
_ => None,
}
}
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,727 @@
/* This file is generated. Do not edit manually. */
use pumpkin_util::version::MinecraftVersion;
#[derive(Copy, Clone, Debug)]
pub struct TrackedId {
pub latest: u8,
pub v1_21_7: u8,
}
impl TrackedId {
pub fn get(&self, version: &MinecraftVersion) -> u8 {
match version {
MinecraftVersion::V_1_21_7 | MinecraftVersion::V_1_21_9 => self.v1_21_7,
_ => self.latest,
}
}
}
impl From<TrackedId> for u8 {
fn from(id: TrackedId) -> u8 {
id.latest
}
}
pub struct TrackedData;
impl TrackedData {
pub const DATA_ACTIVE: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_AIR: TrackedId = TrackedId {
latest: 1u8,
v1_21_7: 1u8,
};
pub const DATA_ANGER: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_ANGER_END_TIME: TrackedId = TrackedId {
latest: 21u8,
v1_21_7: 21u8,
};
pub const DATA_ANGRY: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
pub const DATA_ARMOR_STAND_FLAGS: TrackedId = TrackedId {
latest: 15u8,
v1_21_7: 15u8,
};
pub const DATA_ASK_FOR_BAMBOO_TICKS: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_ATTACHED_FACE: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_BABY: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_BACKGROUND: TrackedId = TrackedId {
latest: 25u8,
v1_21_7: 25u8,
};
pub const DATA_BAT_FLAGS: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_BEAM_TARGET: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 8u8,
};
pub const DATA_BEAM_TARGET_ID: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
pub const DATA_BEE_FLAGS: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
pub const DATA_BEGGING: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 255u8,
};
pub const DATA_BILLBOARD: TrackedId = TrackedId {
latest: 15u8,
v1_21_7: 15u8,
};
pub const DATA_BLAZE_FLAGS: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_BLOCK_OFFSET: TrackedId = TrackedId {
latest: 12u8,
v1_21_7: 255u8,
};
pub const DATA_BLOCK_POS: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 255u8,
};
pub const DATA_BLOCK_STATE: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 8u8,
};
pub const DATA_BOOST_TIME: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_BRIGHTNESS: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_BUBBLE_WOBBLE_TICKS: TrackedId = TrackedId {
latest: 13u8,
v1_21_7: 13u8,
};
pub const DATA_CAN_DUPLICATE: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_CARRIED_BLOCK: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_CAT_VARIANT: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 19u8,
};
pub const DATA_CAUGHT_FISH: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 255u8,
};
pub const DATA_CELEBRATING: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_CHARGED: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 19u8,
};
pub const DATA_CHARGING: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_CHEST: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_CHILD: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_COLD: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_COLLAR_COLOR: TrackedId = TrackedId {
latest: 20u8,
v1_21_7: 20u8,
};
pub const DATA_COLOR: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_COMMAND: TrackedId = TrackedId {
latest: 13u8,
v1_21_7: 255u8,
};
pub const DATA_CONVERTING: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 19u8,
};
pub const DATA_CONVERTING_IN_WATER: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 18u8,
};
pub const DATA_COPPER_GOLEM_STATE: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_CRUMBLING: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_CUSTOM_BLOCK_STATE: TrackedId = TrackedId {
latest: 11u8,
v1_21_7: 255u8,
};
pub const DATA_CUSTOM_NAME: TrackedId = TrackedId {
latest: 2u8,
v1_21_7: 2u8,
};
pub const DATA_DAMAGE_WOBBLE_SIDE: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 255u8,
};
pub const DATA_DAMAGE_WOBBLE_STRENGTH: TrackedId = TrackedId {
latest: 10u8,
v1_21_7: 255u8,
};
pub const DATA_DAMAGE_WOBBLE_TICKS: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 255u8,
};
pub const DATA_DANCING: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 255u8,
};
pub const DATA_DARK_TICKS_REMAINING: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_DASHING: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 255u8,
};
pub const DATA_DESCRIPTION: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 255u8,
};
pub const DATA_DIGGING_SAND: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_DRINKING: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_EATING_TICKS: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 19u8,
};
pub const DATA_ENCHANTED: TrackedId = TrackedId {
latest: 12u8,
v1_21_7: 255u8,
};
pub const DATA_FACING: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 255u8,
};
pub const DATA_FINISH_DIG_TIME: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_FLAGS: TrackedId = TrackedId {
latest: 0u8,
v1_21_7: 0u8,
};
pub const DATA_FOX_FLAGS: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 18u8,
};
pub const DATA_FROM_BUCKET: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_FROZEN_TICKS: TrackedId = TrackedId {
latest: 7u8,
v1_21_7: 7u8,
};
pub const DATA_FUSE: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 8u8,
};
pub const DATA_FUSE_SPEED: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_GLOW_COLOR_OVERRIDE: TrackedId = TrackedId {
latest: 22u8,
v1_21_7: 22u8,
};
pub const DATA_HAS_EGG: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_HAS_FISH: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_HAS_ROPES: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_HEAD_DOWN: TrackedId = TrackedId {
latest: 21u8,
v1_21_7: 255u8,
};
pub const DATA_HEAD_ROLLING_TIME_LEFT: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_HEALTH: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 9u8,
};
pub const DATA_HEIGHT: TrackedId = TrackedId {
latest: 21u8,
v1_21_7: 21u8,
};
pub const DATA_HIDDEN_GENE: TrackedId = TrackedId {
latest: 21u8,
v1_21_7: 21u8,
};
pub const DATA_HOME_POS: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 255u8,
};
pub const DATA_HOOK_ENTITY_ID: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 255u8,
};
pub const DATA_HORSE_FLAGS: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
pub const DATA_IGNITED: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 18u8,
};
pub const DATA_IMMOVABLE: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_IMMUNE_TO_ZOMBIFICATION: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_INTERPOLATION_DURATION: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 9u8,
};
pub const DATA_INVUL_TIMER: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 255u8,
};
pub const DATA_IN_GROUND: TrackedId = TrackedId {
latest: 10u8,
v1_21_7: 255u8,
};
pub const DATA_IN_SLEEPING_POSE: TrackedId = TrackedId {
latest: 20u8,
v1_21_7: 255u8,
};
pub const DATA_IRON_GOLEM_FLAGS: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_ITEM: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 255u8,
};
pub const DATA_ITEM_DISPLAY: TrackedId = TrackedId {
latest: 24u8,
v1_21_7: 24u8,
};
pub const DATA_ITEM_STACK: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 8u8,
};
pub const DATA_LAST_OUTPUT: TrackedId = TrackedId {
latest: 14u8,
v1_21_7: 255u8,
};
pub const DATA_LAST_POSE_TICK: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 255u8,
};
pub const DATA_LEFT_HORN: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_LEFT_PADDLE_MOVING: TrackedId = TrackedId {
latest: 11u8,
v1_21_7: 11u8,
};
pub const DATA_LEFT_ROTATION: TrackedId = TrackedId {
latest: 13u8,
v1_21_7: 13u8,
};
pub const DATA_LINE_WIDTH: TrackedId = TrackedId {
latest: 24u8,
v1_21_7: 24u8,
};
pub const DATA_LIT: TrackedId = TrackedId {
latest: 13u8,
v1_21_7: 255u8,
};
pub const DATA_LIVING_FLAGS: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 8u8,
};
pub const DATA_LOYALTY: TrackedId = TrackedId {
latest: 11u8,
v1_21_7: 255u8,
};
pub const DATA_MAIN_ARM_ID: TrackedId = TrackedId {
latest: 15u8,
v1_21_7: 18u8,
};
pub const DATA_MAIN_GENE: TrackedId = TrackedId {
latest: 20u8,
v1_21_7: 20u8,
};
pub const DATA_MOB_FLAGS: TrackedId = TrackedId {
latest: 15u8,
v1_21_7: 15u8,
};
pub const DATA_MOISTNESS: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_NAME_VISIBLE: TrackedId = TrackedId {
latest: 3u8,
v1_21_7: 3u8,
};
pub const DATA_NO_GRAVITY: TrackedId = TrackedId {
latest: 5u8,
v1_21_7: 5u8,
};
pub const DATA_OTHER_TRUSTED: TrackedId = TrackedId {
latest: 20u8,
v1_21_7: 255u8,
};
pub const DATA_OWNER: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 255u8,
};
pub const DATA_OWNER_UUID: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 18u8,
};
pub const DATA_OXIDATION_LEVEL: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_PANDA_FLAGS: TrackedId = TrackedId {
latest: 22u8,
v1_21_7: 22u8,
};
pub const DATA_PARTICLE: TrackedId = TrackedId {
latest: 10u8,
v1_21_7: 255u8,
};
pub const DATA_PEEK_AMOUNT: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
pub const DATA_PHASE_TYPE: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_PIERCE_LEVEL: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 255u8,
};
pub const DATA_PLAYER_MODE_CUSTOMIZATION_ID: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 17u8,
};
pub const DATA_PLAYING_DEAD: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_POSE: TrackedId = TrackedId {
latest: 6u8,
v1_21_7: 6u8,
};
pub const DATA_POTION_SWIRLS: TrackedId = TrackedId {
latest: 10u8,
v1_21_7: 10u8,
};
pub const DATA_POTION_SWIRLS_AMBIENT: TrackedId = TrackedId {
latest: 11u8,
v1_21_7: 11u8,
};
pub const DATA_PROFILE: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_PROJECTILE_FLAGS: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 255u8,
};
pub const DATA_PROVOKED: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 18u8,
};
pub const DATA_PUFF_STATE: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
pub const DATA_RADIUS: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 255u8,
};
pub const DATA_RESPONSE: TrackedId = TrackedId {
latest: 10u8,
v1_21_7: 255u8,
};
pub const DATA_RIGHT_HORN: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 255u8,
};
pub const DATA_RIGHT_PADDLE_MOVING: TrackedId = TrackedId {
latest: 12u8,
v1_21_7: 12u8,
};
pub const DATA_RIGHT_ROTATION: TrackedId = TrackedId {
latest: 14u8,
v1_21_7: 14u8,
};
pub const DATA_ROTATION: TrackedId = TrackedId {
latest: 10u8,
v1_21_7: 9u8,
};
pub const DATA_SCALE: TrackedId = TrackedId {
latest: 12u8,
v1_21_7: 12u8,
};
pub const DATA_SCREAMING: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_SHADOW_RADIUS: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 18u8,
};
pub const DATA_SHADOW_STRENGTH: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 19u8,
};
pub const DATA_SHEARED: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_SHOOTER_ENTITY_ID: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 255u8,
};
pub const DATA_SHOOTING: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_SHOT_AT_ANGLE: TrackedId = TrackedId {
latest: 10u8,
v1_21_7: 255u8,
};
pub const DATA_SHOW_BOTTOM: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 9u8,
};
pub const DATA_SILENT: TrackedId = TrackedId {
latest: 4u8,
v1_21_7: 4u8,
};
pub const DATA_SIZE: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_SLEEPING_POSITION: TrackedId = TrackedId {
latest: 14u8,
v1_21_7: 14u8,
};
pub const DATA_SLIME_SIZE: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_SNEEZE_PROGRESS: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 18u8,
};
pub const DATA_SNOW_GOLEM_FLAGS: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_SOUND_VARIANT: TrackedId = TrackedId {
latest: 23u8,
v1_21_7: 255u8,
};
pub const DATA_SPELL: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_SPIDER_FLAGS: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_SPIKES_RETRACTED: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_STACK: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 255u8,
};
pub const DATA_START_INTERPOLATION: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 8u8,
};
pub const DATA_STATE: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_STAYING_STILL: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_STINGER_COUNT: TrackedId = TrackedId {
latest: 13u8,
v1_21_7: 13u8,
};
pub const DATA_STRENGTH: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 19u8,
};
pub const DATA_STUCK_ARROW_COUNT: TrackedId = TrackedId {
latest: 12u8,
v1_21_7: 12u8,
};
pub const DATA_TAMEABLE_FLAGS: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
pub const DATA_TARGET: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_TELEPORT_DURATION: TrackedId = TrackedId {
latest: 10u8,
v1_21_7: 10u8,
};
pub const DATA_TEXT: TrackedId = TrackedId {
latest: 23u8,
v1_21_7: 23u8,
};
pub const DATA_TEXT_DISPLAY_FLAGS: TrackedId = TrackedId {
latest: 27u8,
v1_21_7: 27u8,
};
pub const DATA_TEXT_OPACITY: TrackedId = TrackedId {
latest: 26u8,
v1_21_7: 26u8,
};
pub const DATA_TRACKED_ENTITY_ID_1: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_TRACKED_ENTITY_ID_2: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_TRACKED_ENTITY_ID_3: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 255u8,
};
pub const DATA_TRACKER_BODY_ROTATION: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
pub const DATA_TRACKER_HEAD_ROTATION: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_TRACKER_LEFT_ARM_ROTATION: TrackedId = TrackedId {
latest: 18u8,
v1_21_7: 18u8,
};
pub const DATA_TRACKER_LEFT_LEG_ROTATION: TrackedId = TrackedId {
latest: 20u8,
v1_21_7: 20u8,
};
pub const DATA_TRACKER_RIGHT_ARM_ROTATION: TrackedId = TrackedId {
latest: 19u8,
v1_21_7: 19u8,
};
pub const DATA_TRACKER_RIGHT_LEG_ROTATION: TrackedId = TrackedId {
latest: 21u8,
v1_21_7: 21u8,
};
pub const DATA_TRANSLATION: TrackedId = TrackedId {
latest: 11u8,
v1_21_7: 11u8,
};
pub const DATA_TRUSTING: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_UNROOTED: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 255u8,
};
pub const DATA_VALUE: TrackedId = TrackedId {
latest: 8u8,
v1_21_7: 255u8,
};
pub const DATA_VARIANT: TrackedId = TrackedId {
latest: 20u8,
v1_21_7: 20u8,
};
pub const DATA_VEX_FLAGS: TrackedId = TrackedId {
latest: 16u8,
v1_21_7: 16u8,
};
pub const DATA_VIEW_RANGE: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
pub const DATA_VILLAGER_DATA: TrackedId = TrackedId {
latest: 20u8,
v1_21_7: 18u8,
};
pub const DATA_WAITING: TrackedId = TrackedId {
latest: 9u8,
v1_21_7: 255u8,
};
pub const DATA_WARNING: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 255u8,
};
pub const DATA_WIDTH: TrackedId = TrackedId {
latest: 20u8,
v1_21_7: 20u8,
};
pub const DATA_ZOMBIE_TYPE: TrackedId = TrackedId {
latest: 17u8,
v1_21_7: 17u8,
};
}

Some files were not shown because too many files have changed in this diff Show More