diff --git a/.gitignore b/.gitignore index c56b780a4..f32c0d033 100644 --- a/.gitignore +++ b/.gitignore @@ -11,4 +11,5 @@ world/ feather.toml -bans.toml + +**/__pycache__/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..11ae5c54b --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "crates/generated/minecraft-data"] + path = crates/generated/minecraft-data + url = https://github.com/PrismarineJS/minecraft-data diff --git a/Cargo.lock b/Cargo.lock index 118e67103..a76711fbf 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2,85 +2,85 @@ # It is not intended for manual editing. [[package]] name = "addr2line" -version = "0.12.1" +version = "0.14.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a49806b9dadc843c61e7c97e72490ad7f7220ae249012fbda9ad0609457c0543" +checksum = "a55f82cfe485775d02112886f4169bde0c5894d75e79ead7eafe7e40a25e45f7" dependencies = [ - "gimli", + "gimli 0.23.0", ] [[package]] -name = "adler32" -version = "1.0.4" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d2e7343e7fc9de883d1b0341e0b13970f764c14101234857d2ddafa1cb1cac2" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aes" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54eb1d8fe354e5fc611daf4f2ea97dd45a765f4f1e4512306ec183ae2e8f20c9" +checksum = "dd2bc6d3f370b5666245ff421e231cba4353df936e26986d2918e61a8fd6aef6" dependencies = [ "aes-soft", "aesni", - "block-cipher-trait", + "block-cipher", ] [[package]] name = "aes-soft" -version = "0.3.3" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfd7e7ae3f9a1fb5c03b389fc6bb9a51400d0c13053f0dca698c832bfd893a0d" +checksum = "63dd91889c49327ad7ef3b500fd1109dbd3c509a03db0d4a9ce413b79f575cb6" dependencies = [ - "block-cipher-trait", + "block-cipher", "byteorder", "opaque-debug", ] [[package]] name = "aesni" -version = "0.6.0" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f70a6b5f971e473091ab7cfb5ffac6cde81666c4556751d8d5620ead8abf100" +checksum = "0a6fe808308bb07d393e2ea47780043ec47683fcf19cf5efc8ca51c50cc8c68a" dependencies = [ - "block-cipher-trait", + "block-cipher", "opaque-debug", ] [[package]] name = "ahash" -version = "0.3.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f3e0bf23f51883cce372d5d5892211236856e4bb37fb942e1eb135ee0f146e3" +checksum = "739f4a8db6605981345c5654f3a85b056ce52f37a39d34da03f25bf2151ea16e" dependencies = [ "const-random", ] [[package]] -name = "aho-corasick" -version = "0.7.10" +name = "ahash" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8716408b8bc624ed7f65d223ddb9ac2d044c0547b6fa4b0d554f3a9540496ada" +checksum = "1dd69f6bbb6851e9bba54499698ed6b50640e35544e6b552e7604ad6258778b9" dependencies = [ - "memchr", + "getrandom 0.2.2", + "once_cell", + "version_check", ] [[package]] -name = "alga" -version = "0.9.3" +name = "aho-corasick" +version = "0.7.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f823d037a7ec6ea2197046bafd4ae150e6bc36f9ca347404f46a46823fa84f2" +checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5" dependencies = [ - "approx", - "num-complex", - "num-traits", + "memchr", ] [[package]] name = "anyhow" -version = "1.0.31" +version = "1.0.38" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bb70cc08ec97ca5450e6eba421deeea5f172c0fc61f78b5357b2a8e8be195f" +checksum = "afddf7f520a80dbf76e6f50a35bca42a2331ef227a28b3b6dc5c2e2338d114b1" [[package]] name = "approx" @@ -92,40 +92,92 @@ dependencies = [ ] [[package]] -name = "arc-swap" -version = "0.4.6" +name = "approx" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b585a98a234c46fc563103e9278c9391fde1f4e6850334da895d27edb9580f62" +checksum = "3f2a05fd1bd10b2527e20a2cd32d8873d115b8b39fe219ee25f42a8aca6ba278" +dependencies = [ + "num-traits", +] [[package]] -name = "arrayvec" -version = "0.4.12" +name = "argh" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "91792f088f87cdc7a2cfb1d617fa5ea18d7f1dc22ef0e1b5f82f3157cdc522be" +dependencies = [ + "argh_derive", + "argh_shared", +] + +[[package]] +name = "argh_derive" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd9fd44efafa8690358b7408d253adf110036b88f55672a933f01d616ad9b1b9" +checksum = "c4eb0c0c120ad477412dc95a4ce31e38f2113e46bd13511253f79196ca68b067" dependencies = [ - "nodrop", + "argh_shared", + "heck", + "proc-macro2", + "quote", + "syn", ] +[[package]] +name = "argh_shared" +version = "0.1.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "781f336cc9826dbaddb9754cb5db61e64cab4f69668bd19dcc4a0394a86f4cb1" + [[package]] name = "arrayvec" -version = "0.5.1" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cff77d8686867eceff3105329d4698d96c2391c176d5d03adc90c7389162b5b8" +checksum = "23b62fc65de8e4e7f52534fb52b0f3ed04746ae267519eef2a83941e8085068b" dependencies = [ "serde", ] [[package]] -name = "as-slice" -version = "0.1.3" +name = "async-executor" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37dfb65bc03b2bc85ee827004f14a6817e04160e3b1a28931986a666a9290e70" +checksum = "eb877970c7b440ead138f6321a3b5395d6061183af779340b65e20c0fede9146" dependencies = [ - "generic-array 0.12.3", - "generic-array 0.13.2", - "stable_deref_trait", + "async-task", + "concurrent-queue", + "fastrand", + "futures-lite", + "once_cell", + "vec-arena", +] + +[[package]] +name = "async-io" +version = "1.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9315f8f07556761c3e48fec2e6b276004acf426e6dc068b2c2251854d65ee0fd" +dependencies = [ + "concurrent-queue", + "fastrand", + "futures-lite", + "libc", + "log", + "nb-connect", + "once_cell", + "parking", + "polling", + "vec-arena", + "waker-fn", + "winapi", ] +[[package]] +name = "async-task" +version = "4.0.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e91831deabf0d6d7ec49552e489aed63b7456a7a3c46cff62adad428110b0af0" + [[package]] name = "atty" version = "0.2.14" @@ -134,7 +186,7 @@ checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8" dependencies = [ "hermit-abi", "libc", - "winapi 0.3.8", + "winapi", ] [[package]] @@ -145,54 +197,40 @@ checksum = "1d49d90015b3c36167a20fe2810c5cd875ad504b39cff3d4eae7977e6b7c1cb2" [[package]] name = "autocfg" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8aac770f1885fd7e387acedd76065302551364496e46b3dd00860b2f8359b9d" +checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" [[package]] name = "backtrace" -version = "0.3.48" +version = "0.3.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0df2f85c8a2abbe3b7d7e748052fdd9b76a0458fdeb16ad4223f5eca78c7c130" +checksum = "9d117600f438b1707d4e4ae15d3595657288f8235a0eb593e80ecc98ab34e1bc" dependencies = [ "addr2line", - "cfg-if", + "cfg-if 1.0.0", "libc", - "object", + "miniz_oxide", + "object 0.23.0", "rustc-demangle", ] [[package]] name = "base64" -version = "0.12.1" +version = "0.13.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d1ccbaf7d9ec9537465a97bf19edc1a4e158ecb49fc16178202238c569cc42" +checksum = "904dfeac50f3cdaba28fc6f57fdcddb75f49ed61346676a78c4ffe55877802fd" [[package]] name = "bincode" -version = "1.2.1" +version = "1.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5753e2a71534719bf3f4e57006c3a4f0d2c672a4b676eec84161f763eca87dbf" +checksum = "d175dfa69e619905c4c3cdb7c3c203fa3bdd5d51184e3afdb2742c0280493772" dependencies = [ "byteorder", "serde", ] -[[package]] -name = "bit-set" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e11e16035ea35e4e5997b393eacbf6f63983188f7a2ad25bfb13465f5ad59de" -dependencies = [ - "bit-vec", -] - -[[package]] -name = "bit-vec" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f0dc55f2d8a1a85650ac47858bb001b4c0dd73d79e3c455a842925e68d29cd3" - [[package]] name = "bitflags" version = "1.2.1" @@ -201,46 +239,65 @@ checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693" [[package]] name = "bitvec" -version = "0.17.4" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41262f11d771fd4a61aa3ce019fca363b4b6c282fca9da2a31186d3965a47a5c" +checksum = "35a2e31dce162f8f238c3c35a6600f1df4cb30f8929a6c464b0a8118d17c2502" dependencies = [ - "either", + "funty", "radium", + "tap", + "wyz", ] [[package]] -name = "block-cipher-trait" -version = "0.6.2" +name = "block-buffer" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c924d49bd09e7c06003acda26cd9742e796e34282ec6c1189404dee0c1f4774" +checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4" dependencies = [ - "generic-array 0.12.3", + "generic-array", ] [[package]] -name = "bstr" -version = "0.2.13" +name = "block-cipher" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31accafdb70df7871592c058eca3985b71104e15ac32f64706022c58867da931" +checksum = "f337a3e6da609650eb74e02bc9fac7b735049f7623ab12f2e4c719316fcc7e80" dependencies = [ - "lazy_static", - "memchr", - "regex-automata", - "serde", + "generic-array", ] [[package]] name = "bumpalo" -version = "3.3.0" +version = "3.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5356f1d23ee24a1f785a56d1d1a5f0fd5b0f6a0c0fb2412ce11da71649ab78f6" +checksum = "63396b8a4b9de3f4fdfb320ab6080762242f66a8ef174c49d8e19b674db4cdbe" [[package]] name = "bytecount" -version = "0.6.0" +version = "0.6.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "72feb31ffc86498dacdbd0fcebb56138e7177a8cc5cea4516031d15ae85a742e" + +[[package]] +name = "bytemuck" +version = "1.5.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "bed57e2090563b83ba8f83366628ce535a7584c9afa4c9fc0612a03925c6df58" +dependencies = [ + "bytemuck_derive", +] + +[[package]] +name = "bytemuck_derive" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0017894339f586ccb943b01b9555de56770c11cda818e7e3d8bd93f4ed7f46e" +checksum = "8e215f8c2f9f79cb53c8335e687ffd07d5bfcb6fe5fc80723762d0be46e7cc54" +dependencies = [ + "proc-macro2", + "quote", + "syn", +] [[package]] name = "byteorder" @@ -250,9 +307,15 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "bytes" -version = "0.5.4" +version = "0.5.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "0e4cec68f03f32e44924783795810fa50a7035d8c8ebe78580ad7e6c703fba38" + +[[package]] +name = "bytes" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "130aac562c0dd69c56b3b1cc8ffd2e17be31d0b6c25b61c96b76231aa23e39e1" +checksum = "b700ce4376041dcd0a327fd0097c41095743c4c8af8887265942faf1100bd040" [[package]] name = "bzip2" @@ -266,9 +329,9 @@ dependencies = [ [[package]] name = "bzip2-sys" -version = "0.1.9+1.0.8" +version = "0.1.10+1.0.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad3b39a260062fca31f7b0b12f207e8f2590a67d32ec7d59c20484b07ea7285e" +checksum = "17fa3d1ac1ca21c5c4e36a97f3c3eb25084576f6fc47bf0139c1123434216c6c" dependencies = [ "cc", "libc", @@ -276,19 +339,16 @@ dependencies = [ ] [[package]] -name = "cast" -version = "0.2.3" +name = "cache-padded" +version = "1.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b9434b9a5aa1450faa3f9cb14ea0e8c53bb5d2b3c1bfd1ab4fc03e9f33fbfb0" -dependencies = [ - "rustc_version", -] +checksum = "631ae5198c9be5e753e5cc215e1bd73c2b466a3565173db433f52bb9d3e66dba" [[package]] name = "cc" -version = "1.0.54" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7bbb73db36c1246e9034e307d0fba23f9a2e251faa47ade70c1bd252220c8311" +checksum = "e3c69b077ad434294d3ce9f1f6143a2a4b89a8a2d54ef813d85003a4fd1137fd" [[package]] name = "cesu8" @@ -298,11 +358,10 @@ checksum = "6d43a04d8753f35258c91f8ec639f792891f748a1edbd759cf1dcea3382ad83c" [[package]] name = "cfb8" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b310afa67a25a8d5189eacaf5b14418c8dc3d8bcc5755619d89cab87871260d" +checksum = "dfe91dea0d0c5ad0c16988e2aa5a784cff3c398d21f6938eb24e810963e89a9e" dependencies = [ - "block-cipher-trait", "stream-cipher", ] @@ -312,53 +371,67 @@ version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822" +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + [[package]] name = "chrono" -version = "0.4.11" +version = "0.4.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "80094f509cf8b5ae86a4966a39b3ff66cd7e2a3e594accec3743ff3fabeab5b2" +checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73" dependencies = [ + "libc", "num-integer", "num-traits", "time", + "winapi", ] [[package]] -name = "clap" -version = "2.33.1" +name = "chunked_transfer" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdfa80d47f954d53a35a64987ca1422f495b8d6483c0fe9f7117b36c2a792129" -dependencies = [ - "bitflags", - "textwrap", - "unicode-width", -] +checksum = "fff857943da45f546682664a79488be82e69e43c1a7a2307679ab9afb3a66d2e" [[package]] -name = "cloudabi" -version = "0.0.3" +name = "colored" +version = "1.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddfc5b9aa5d4507acaf872de71051dfd0e309860e88966e1051e462a077aac4f" +checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" dependencies = [ - "bitflags", + "atty", + "lazy_static", + "winapi", ] [[package]] name = "colored" -version = "1.9.3" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f4ffc801dacf156c5854b9df4f425a626539c3a6ef7893cc0c5084a23f0b6c59" +checksum = "b3616f750b84d8f0de8a58bda93e08e2a81ad3f523089b05f1dffecab48c6cbd" dependencies = [ "atty", "lazy_static", - "winapi 0.3.8", + "winapi", +] + +[[package]] +name = "concurrent-queue" +version = "1.2.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "30ed07550be01594c6026cff2a1d7fe9c8f683caa798e12b68694ac9e88286a3" +dependencies = [ + "cache-padded", ] [[package]] name = "const-random" -version = "0.1.8" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1af9ac737b2dd2d577701e59fd09ba34822f6f2ebdb30a7647405d9e55e16a" +checksum = "f590d95d011aa80b063ffe3253422ed5aa462af4e9867d43ce8337562bac77c4" dependencies = [ "const-random-macro", "proc-macro-hack", @@ -366,192 +439,162 @@ dependencies = [ [[package]] name = "const-random-macro" -version = "0.1.8" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25e4c606eb459dd29f7c57b2e0879f2b6f14ee130918c2b78ccb58a9624e6c7a" +checksum = "615f6e27d000a2bffbc7f2f6a8669179378fa27ee4d0a509e985dfc0a7defb40" dependencies = [ - "getrandom", + "getrandom 0.2.2", + "lazy_static", "proc-macro-hack", + "tiny-keccak", ] [[package]] -name = "core-foundation" -version = "0.7.0" +name = "cpuid-bool" +version = "0.1.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8aebca1129a03dc6dc2b127edd729435bbc4a37e1d5f4d7513165089ceb02634" + +[[package]] +name = "cranelift-bforest" +version = "0.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d24c7a13c43e870e37c1556b74555437870a04514f7685f5b354e090567171" +checksum = "9221545c0507dc08a62b2d8b5ffe8e17ac580b0a74d1813b496b8d70b070fbd0" dependencies = [ - "core-foundation-sys", - "libc", + "cranelift-entity", ] [[package]] -name = "core-foundation-sys" -version = "0.7.0" +name = "cranelift-codegen" +version = "0.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3a71ab494c0b5b860bdc8407ae08978052417070c2ced38573a9157ad75b8ac" +checksum = "7e9936ea608b6cd176f107037f6adbb4deac933466fc7231154f96598b2d3ab1" +dependencies = [ + "byteorder", + "cranelift-bforest", + "cranelift-codegen-meta", + "cranelift-codegen-shared", + "cranelift-entity", + "gimli 0.22.0", + "log", + "regalloc", + "smallvec", + "target-lexicon", + "thiserror", +] [[package]] -name = "crc32fast" -version = "1.2.0" +name = "cranelift-codegen-meta" +version = "0.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba125de2af0df55319f41944744ad91c71113bf74a4646efff39afe1f6842db1" +checksum = "4ef2b2768568306540f4c8db3acce9105534d34c4a1e440529c1e702d7f8c8d7" dependencies = [ - "cfg-if", + "cranelift-codegen-shared", + "cranelift-entity", ] [[package]] -name = "criterion" -version = "0.3.2" +name = "cranelift-codegen-shared" +version = "0.68.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6759012d6d19c4caec95793f052613e9d4113e925e7f14154defbac0f1d4c938" + +[[package]] +name = "cranelift-entity" +version = "0.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63f696897c88b57f4ffe3c69d8e1a0613c7d0e6c4833363c8560fbde9c47b966" +checksum = "86badbce14e15f52a45b666b38abe47b204969dd7f8fb7488cb55dd46b361fa6" dependencies = [ - "atty", - "cast", - "clap", - "criterion-plot", - "csv", - "itertools 0.9.0", - "lazy_static", - "num-traits", - "oorandom", - "plotters", - "rayon", - "regex", "serde", - "serde_derive", - "serde_json", - "tinytemplate", - "walkdir", ] [[package]] -name = "criterion-plot" -version = "0.4.2" +name = "cranelift-frontend" +version = "0.68.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ddeaf7989f00f2e1d871a26a110f3ed713632feac17f65f03ca938c542618b60" +checksum = "b608bb7656c554d0a4cf8f50c7a10b857e80306f6ff829ad6d468a7e2323c8d8" dependencies = [ - "cast", - "itertools 0.9.0", + "cranelift-codegen", + "log", + "smallvec", + "target-lexicon", ] [[package]] -name = "crossbeam" -version = "0.7.3" +name = "crc32fast" +version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69323bff1fb41c635347b8ead484a5ca6c3f11914d784170b158d8449ab07f8e" +checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a" dependencies = [ - "cfg-if", - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", + "cfg-if 1.0.0", ] [[package]] name = "crossbeam-channel" -version = "0.4.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cced8691919c02aac3cb0a1bc2e9b73d89e832bf9a06fc579d4e71b68a2da061" +checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775" dependencies = [ + "cfg-if 1.0.0", "crossbeam-utils", - "maybe-uninit", ] [[package]] name = "crossbeam-deque" -version = "0.7.3" +version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f02af974daeee82218205558e51ec8768b48cf524bd01d550abe5573a608285" +checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9" dependencies = [ + "cfg-if 1.0.0", "crossbeam-epoch", "crossbeam-utils", - "maybe-uninit", ] [[package]] name = "crossbeam-epoch" -version = "0.8.2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "058ed274caafc1f60c4997b5fc07bf7dc7cca454af7c6e81edffe5f33f70dace" +checksum = "2584f639eb95fea8c798496315b297cf81b9b58b6d30ab066a75455333cf4b12" dependencies = [ - "autocfg 1.0.0", - "cfg-if", + "cfg-if 1.0.0", "crossbeam-utils", "lazy_static", - "maybe-uninit", "memoffset", "scopeguard", ] -[[package]] -name = "crossbeam-queue" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab6bffe714b6bb07e42f201352c34f51fefd355ace793f9e638ebd52d23f98d2" -dependencies = [ - "cfg-if", - "crossbeam-utils", -] - [[package]] name = "crossbeam-utils" -version = "0.7.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8" +checksum = "e7e9d99fa91428effe99c5c6d4634cdeba32b8cf784fc428a2a687f61a952c49" dependencies = [ - "autocfg 1.0.0", - "cfg-if", + "autocfg 1.0.1", + "cfg-if 1.0.0", "lazy_static", ] [[package]] -name = "csv" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00affe7f6ab566df61b4be3ce8cf16bc2576bca0963ceb0955e45d514bf9a279" -dependencies = [ - "bstr", - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.10" +name = "crunchy" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b2466559f260f48ad25fe6317b3c8dac77b5bdb5763ac7d9d6103530663bc90" -dependencies = [ - "memchr", -] +checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "ctor" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6b25ee9ac1995c54d7adb2eff8cfffb7260bc774fb63c601ec65467f43cd9d" -dependencies = [ - "quote 1.0.1", - "syn 1.0.29", -] - -[[package]] -name = "ctrlc" -version = "3.1.4" +version = "0.1.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a4ba686dff9fa4c1c9636ce1010b0cf98ceb421361b0bb3d6faeec43bd217a7" +checksum = "e8f45d9ad417bcef4817d614a501ab55cdd96a6fdb24f49aab89a54acfd66b19" dependencies = [ - "nix", - "winapi 0.3.8", + "quote", + "syn", ] [[package]] name = "darling" -version = "0.10.2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d706e75d87e35569db781a9b5e2416cff1236a47ed380831f959382ccd5f858" +checksum = "a06d4a9551359071d1890820e3571252b91229e0712e7c36b08940e603c5a8fc" dependencies = [ "darling_core", "darling_macro", @@ -559,168 +602,132 @@ dependencies = [ [[package]] name = "darling_core" -version = "0.10.2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c960ae2da4de88a91b2d920c2a7233b400bc33cb28453a2987822d8392519b" +checksum = "b443e5fb0ddd56e0c9bfa47dc060c5306ee500cb731f2b91432dd65589a77684" dependencies = [ "fnv", "ident_case", - "proc-macro2 1.0.17", - "quote 1.0.1", + "proc-macro2", + "quote", "strsim", - "syn 1.0.29", + "syn", ] [[package]] name = "darling_macro" -version = "0.10.2" +version = "0.12.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d9b5a2f4ac4969822c62224815d069952656cadc7084fdca9751e6d959189b72" +checksum = "c0220073ce504f12a70efc4e7cdaea9e9b1b324872e7ad96a208056d7a638b81" dependencies = [ "darling_core", - "quote 1.0.1", - "syn 1.0.29", + "quote", + "syn", ] [[package]] -name = "dashmap" -version = "3.11.2" +name = "digest" +version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8b384aed866a28e92a6943f4f5d869f0a623776b550751cb87e711148803c18" +checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" dependencies = [ - "ahash", - "cfg-if", - "num_cpus", + "generic-array", ] [[package]] -name = "derivative" -version = "1.0.4" +name = "either" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c6d883546668a3e2011b6a716a7330b82eabb0151b138217f632c8243e17135" -dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "syn 0.15.44", -] +checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457" [[package]] -name = "derivative" -version = "2.1.1" +name = "enumset" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb582b60359da160a9477ee80f15c8d784c477e69c217ef2cdd4169c24ea380f" +checksum = "c70e3089d60da62772627697a83dd166615072eebe1a52ac05f16bdbd0165dc3" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "enumset_derive", ] [[package]] -name = "downcast-rs" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "52ba6eb47c2131e784a38b726eb54c1e1484904f013e576a25354d0124161af6" - -[[package]] -name = "dtoa" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4358a9e11b9a09cf52383b451b49a169e8d797b68aa02301ff586d70d9661ea3" - -[[package]] -name = "either" -version = "1.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb1f6b1ce1c140482ea30ddd3335fc0024ac7ee112895426e0a629a6c20adfe3" - -[[package]] -name = "encoding_rs" -version = "0.8.23" +name = "enumset_derive" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8ac63f94732332f44fe654443c46f6375d1939684c17b0afb6cb56b0456e171" +checksum = "e19c52f9ec503c8a68dc04daf71a04b07e690c32ab1a8b68e33897f255269d47" dependencies = [ - "cfg-if", + "darling", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "erasable" -version = "1.2.1" +name = "erased-serde" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f11890ce181d47a64e5d1eb4b6caba0e7bae911a356723740d058a5d0340b7d" +checksum = "0465971a8cc1fa2455c8465aaa377131e1f1cf4983280f474a13e68793aa770c" dependencies = [ - "autocfg 1.0.0", - "scopeguard", + "serde", ] [[package]] -name = "failure" -version = "0.1.8" +name = "fallible-iterator" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d32e9bd16cc02eae7db7ef620b392808b89f6a5e16bb3497d159c6b92a0f4f86" -dependencies = [ - "backtrace", - "failure_derive", -] +checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" [[package]] -name = "failure_derive" -version = "0.1.8" +name = "fastrand" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa4da3c766cd7a0db8242e326e9e4e081edd567072893ed320008189715366a4" +checksum = "ca5faf057445ce5c9d4329e382b2ce7ca38550ef3b73a5348362d5f24e0c7fe3" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", - "synstructure", + "instant", ] [[package]] -name = "feather-anvil" -version = "0.6.0" +name = "feather-base" +version = "0.1.0" dependencies = [ + "ahash 0.4.7", "anyhow", - "arrayvec 0.5.1", + "arrayvec", + "bitflags", "bitvec", "byteorder", - "feather-biomes", "feather-blocks", - "feather-chunk", - "feather-inventory", - "feather-items", - "feather-util", - "hematite-nbt 0.4.1 (git+https://github.com/PistonDevelopers/hematite_nbt?rev=41124ff)", + "feather-generated", + "hematite-nbt", + "libcraft-core", + "nom", + "nom_locate", + "num-derive", + "num-traits", + "parking_lot", + "rand 0.8.3", + "rand_pcg", "serde", + "serde_json", "serde_test", + "serde_with", + "smallvec", "thiserror", - "tokio", "uuid", + "vek 0.14.0", ] [[package]] -name = "feather-biomes" -version = "0.6.0" +name = "feather-blocks" +version = "0.1.0" dependencies = [ - "num-derive", - "num-traits", - "strum 0.18.0", - "strum_macros 0.18.0", -] - -[[package]] -name = "feather-blocks" -version = "0.6.0" -dependencies = [ - "anyhow", - "bincode", - "bit-set", - "criterion", - "feather-blocks-generator", - "feather-definitions", - "feather-util", + "anyhow", + "bincode", + "feather-generated", "num-traits", "once_cell", "serde", "thiserror", + "vek 0.12.1", ] [[package]] @@ -729,650 +736,204 @@ version = "0.1.0" dependencies = [ "anyhow", "bincode", - "feather-data", "heck", "indexmap", "maplit", "once_cell", - "proc-macro2 1.0.17", - "quote 1.0.1", + "proc-macro2", + "quote", "serde", "serde_json", - "syn 1.0.29", + "syn", ] [[package]] -name = "feather-chunk" -version = "0.6.0" -dependencies = [ - "ahash", - "bitflags", - "feather-biomes", - "feather-blocks", - "feather-util", - "smallvec", -] - -[[package]] -name = "feather-chunk-map" -version = "0.6.0" +name = "feather-common" +version = "0.1.0" dependencies = [ + "ahash 0.7.1", + "anyhow", + "feather-base", "feather-blocks", - "feather-chunk", - "feather-util", - "hashbrown", + "feather-ecs", + "feather-generated", + "feather-utils", + "flume", + "itertools 0.10.0", + "log", "parking_lot", + "quill-common", + "smartstring", + "uuid", ] [[package]] -name = "feather-codegen" -version = "0.6.0" -dependencies = [ - "heck", - "lazy_static", - "proc-macro2 1.0.17", - "quote 1.0.1", - "strum 0.16.0", - "strum_macros 0.16.0", - "syn 1.0.29", -] - -[[package]] -name = "feather-core" -version = "0.6.0" -dependencies = [ - "feather-anvil", - "feather-biomes", - "feather-blocks", - "feather-chunk", - "feather-chunk-map", - "feather-entity-metadata", - "feather-game-rules", - "feather-inventory", - "feather-item-block", - "feather-items", - "feather-loot", - "feather-misc", - "feather-network", - "feather-text", - "feather-util", -] - -[[package]] -name = "feather-data" -version = "0.6.0" +name = "feather-datapacks" +version = "0.1.0" dependencies = [ + "ahash 0.4.7", "anyhow", - "feather-data-macro", - "reqwest", + "log", + "serde", + "serde_json", + "smartstring", + "thiserror", + "ureq 1.5.4", "zip", ] [[package]] -name = "feather-data-macro" -version = "0.6.0" +name = "feather-ecs" +version = "0.1.0" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "ahash 0.7.1", + "anyhow", + "feather-utils", + "hecs", + "log", + "thiserror", ] [[package]] -name = "feather-definitions" +name = "feather-generated" version = "0.1.0" dependencies = [ "num-derive", "num-traits", -] - -[[package]] -name = "feather-definitions-generator" -version = "0.1.0" -dependencies = [ - "anyhow", - "feather-data", - "heck", - "indexmap", - "itertools 0.9.0", - "once_cell", - "proc-macro2 1.0.17", - "quote 1.0.1", - "regex", - "ron", - "serde", - "serde_json", - "syn 1.0.29", - "walkdir", -] - -[[package]] -name = "feather-entity-metadata" -version = "0.6.0" -dependencies = [ - "bitflags", - "feather-inventory", - "feather-util", - "hematite-nbt 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid", -] - -[[package]] -name = "feather-game-rules" -version = "0.6.0" - -[[package]] -name = "feather-inventory" -version = "0.6.0" -dependencies = [ - "feather-items", - "fecs", - "legion", - "maplit", - "once_cell", "parking_lot", - "smallvec", "thiserror", + "vek 0.12.1", ] [[package]] -name = "feather-item-block" -version = "0.6.0" -dependencies = [ - "feather-blocks", - "feather-items", -] - -[[package]] -name = "feather-items" -version = "0.6.0" -dependencies = [ - "feather-definitions", -] - -[[package]] -name = "feather-loot" +name = "feather-plugin-host" version = "0.1.0" dependencies = [ - "ahash", + "ahash 0.7.1", "anyhow", - "feather-data", - "feather-items", - "feather-loot-model", - "inlinable_string", - "itertools 0.9.0", - "once_cell", - "rand", - "serde_json", - "smallvec", - "thiserror", - "walkdir", -] - -[[package]] -name = "feather-loot-model" -version = "0.1.0" -dependencies = [ - "ahash", - "inlinable_string", - "rand", + "bincode", + "bytemuck", + "feather-common", + "feather-ecs", + "log", + "quill-common", + "quill-plugin-format", "serde", - "smallvec", + "vec-arena", + "wasmer", + "wasmer-wasi", ] [[package]] -name = "feather-misc" +name = "feather-protocol" version = "0.1.0" -dependencies = [ - "feather-blocks", - "feather-items", - "ordinalizer", -] - -[[package]] -name = "feather-network" -version = "0.6.0" dependencies = [ "aes", - "ahash", "anyhow", + "bytemuck", "byteorder", - "bytes", + "bytes 0.5.6", "cfb8", - "feather-anvil", - "feather-blocks", - "feather-chunk", - "feather-codegen", - "feather-entity-metadata", - "feather-inventory", - "feather-items", - "feather-misc", - "feather-util", - "flate2 1.0.14", - "hematite-nbt 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "log", - "num-derive", + "feather-base", + "flate2", + "hematite-nbt", "num-traits", - "once_cell", "parking_lot", "serde", - "strum 0.18.0", - "strum_macros 0.18.0", "thiserror", - "tokio-util", "uuid", ] [[package]] name = "feather-server" -version = "0.6.0" +version = "0.1.0" dependencies = [ + "ahash 0.7.1", "anyhow", "base64", - "crossbeam", - "ctrlc", - "feather-core", - "feather-server-block", - "feather-server-chat", - "feather-server-chunk", - "feather-server-config", - "feather-server-entity", - "feather-server-lighting", - "feather-server-network", - "feather-server-packet-buffer", - "feather-server-physics", - "feather-server-player", - "feather-server-types", - "feather-server-util", - "feather-server-weather", - "feather-server-worldgen", - "fecs", - "fxhash", - "log", - "rand", - "simple_logger", - "spin_sleep", - "tokio", -] - -[[package]] -name = "feather-server-block" -version = "0.6.0" -dependencies = [ - "ahash", - "anyhow", - "arrayvec 0.5.1", - "feather-core", - "feather-server-entity", - "feather-server-types", - "feather-server-util", - "feather-test-framework", - "fecs", - "inventory", - "log", - "num-traits", - "once_cell", -] - -[[package]] -name = "feather-server-chat" -version = "0.6.0" - -[[package]] -name = "feather-server-chunk" -version = "0.6.0" -dependencies = [ - "ahash", - "anyhow", - "crossbeam", - "feather-core", - "feather-server-types", - "feather-server-util", - "feather-server-worldgen", - "fecs", - "log", - "parking_lot", - "rayon", - "smallvec", -] - -[[package]] -name = "feather-server-commands" -version = "0.6.0" -dependencies = [ - "anyhow", - "feather-core", - "feather-definitions", - "feather-server-types", - "feather-server-util", - "fecs", - "lieutenant", - "rand", - "smallvec", - "thiserror", - "tokio", - "uuid", - "vek", -] - -[[package]] -name = "feather-server-config" -version = "0.6.0" -dependencies = [ - "anyhow", - "feather-util", - "humantime-serde", - "serde", - "tokio", - "toml", -] - -[[package]] -name = "feather-server-entity" -version = "0.6.0" -dependencies = [ - "anyhow", - "feather-core", - "feather-server-types", - "feather-server-util", - "feather-test-framework", - "fecs", - "inventory", - "log", - "nalgebra-glm", - "num-derive", - "num-traits", - "parking_lot", - "rand", - "smallvec", -] - -[[package]] -name = "feather-server-lighting" -version = "0.6.0" -dependencies = [ - "ahash", - "arrayvec 0.5.1", - "crossbeam", - "feather-core", - "feather-server-physics", - "feather-server-types", - "feather-server-util", - "fecs", - "log", - "nalgebra-glm", - "parking_lot", - "smallvec", -] - -[[package]] -name = "feather-server-network" -version = "0.6.0" -dependencies = [ - "anyhow", - "derivative 2.1.1", - "feather-core", - "feather-server-types", - "feather-server-util", - "fecs", + "chrono", + "colored 2.0.0", + "feather-base", + "feather-common", + "feather-ecs", + "feather-plugin-host", + "feather-protocol", + "feather-utils", + "fern", "flume", - "futures", + "futures-lite", + "hematite-nbt", "log", - "md5 0.7.0", - "mojang-api", - "num-bigint-dig", + "md-5", + "num-bigint 0.3.1", "once_cell", "parking_lot", - "rand", + "quill-common", + "rand 0.7.3", "rsa", "rsa-der", + "serde", "serde_json", - "thiserror", + "sha-1", "tokio", - "tokio-util", - "uuid", -] - -[[package]] -name = "feather-server-packet-buffer" -version = "0.6.0" -dependencies = [ - "ahash", - "crossbeam", - "feather-core", - "fecs", - "indexmap", - "num-traits", - "once_cell", - "parking_lot", - "smallvec", - "strum 0.18.0", -] - -[[package]] -name = "feather-server-physics" -version = "0.6.0" -dependencies = [ - "bitflags", - "feather-core", - "feather-server-types", - "fecs", - "heapless", - "nalgebra", - "nalgebra-glm", - "ncollide3d", - "parking_lot", - "smallvec", -] - -[[package]] -name = "feather-server-player" -version = "0.6.0" -dependencies = [ - "ahash", - "anyhow", - "feather-core", - "feather-definitions", - "feather-server-commands", - "feather-server-entity", - "feather-server-network", - "feather-server-types", - "feather-server-util", - "fecs", - "inventory", - "itertools 0.9.0", - "log", - "mojang-api", - "nalgebra-glm", - "once_cell", - "parking_lot", - "smallvec", - "thiserror", -] - -[[package]] -name = "feather-server-template" -version = "0.6.0" -dependencies = [ - "feather-core", - "feather-server-types", - "feather-server-util", - "fecs", -] - -[[package]] -name = "feather-server-types" -version = "0.6.0" -dependencies = [ - "ahash", - "anyhow", - "bumpalo", - "crossbeam", - "dashmap", - "feather-core", - "feather-server-config", - "feather-server-packet-buffer", - "fecs", - "flume", - "futures", - "inventory", - "log", - "mojang-api", - "nalgebra-glm", - "ncollide3d", - "once_cell", - "parking_lot", - "rand", - "smallvec", - "thread_local", - "tokio", - "uuid", -] - -[[package]] -name = "feather-server-util" -version = "0.6.0" -dependencies = [ - "ahash", - "anyhow", - "arrayvec 0.5.1", - "feather-core", - "feather-server-types", - "fecs", - "inventory", - "itertools 0.9.0", - "md5 0.7.0", - "nalgebra-glm", - "rand", - "rand_distr", - "reqwest", - "serde", - "smallvec", + "toml", + "ureq 2.0.2", "uuid", + "vec-arena", ] [[package]] -name = "feather-server-weather" -version = "0.6.0" +name = "feather-utils" +version = "0.1.0" dependencies = [ - "feather-core", - "feather-server-types", - "feather-server-util", - "fecs", - "rand", + "simple_logger", ] [[package]] -name = "feather-server-worldgen" +name = "feather-worldgen" version = "0.6.0" dependencies = [ - "approx", + "approx 0.3.2", "bitvec", - "feather-core", + "feather-base", "log", "num-traits", "once_cell", - "rand", + "rand 0.7.3", "rand_xorshift", "simdnoise", "smallvec", - "strum 0.18.0", -] - -[[package]] -name = "feather-test-framework" -version = "0.6.0" -dependencies = [ - "crossbeam", - "feather-core", - "feather-server-chunk", - "feather-server-network", - "feather-server-player", - "feather-server-types", - "feather-server-util", - "fecs", - "flume", - "tokio", + "strum 0.19.5", ] [[package]] -name = "feather-text" +name = "fern" version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8c9a4820f0ccc8a7afd67c39a0f1a0f4b07ca1725164271a64939d7aeb9af065" dependencies = [ - "hematite-nbt 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)", - "nom", - "nom_locate", - "serde", - "serde_json", - "serde_with", - "thiserror", - "uuid", -] - -[[package]] -name = "feather-util" -version = "0.6.0" -dependencies = [ - "hash32", - "hash32-derive", - "nalgebra-glm", - "num-derive", - "num-traits", - "serde", - "vek", -] - -[[package]] -name = "feather_api" -version = "0.1.0" - -[[package]] -name = "fecs" -version = "0.1.0" -source = "git+https://github.com/feather-rs/fecs?rev=0c4838d65b41ca059012b6e9147eabf0c275a731#0c4838d65b41ca059012b6e9147eabf0c275a731" -dependencies = [ - "arrayvec 0.5.1", - "erasable", - "fecs-macros", - "fxhash", - "legion", - "smallvec", - "static_assertions 1.1.0", - "thiserror", -] - -[[package]] -name = "fecs-macros" -version = "0.1.0" -source = "git+https://github.com/feather-rs/fecs?rev=0c4838d65b41ca059012b6e9147eabf0c275a731#0c4838d65b41ca059012b6e9147eabf0c275a731" -dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "log", ] [[package]] -name = "fixedbitset" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37ab347416e802de484e4d03c7316c48f1ecb56574dfd4a46a80f173ce1de04d" - -[[package]] -name = "flate2" -version = "0.2.20" +name = "filetime" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6234dd4468ae5d1e2dbb06fe2b058696fdc50a339c68a393aefbf00bc81e423" +checksum = "1d34cfa13a63ae058bfa601fe9e313bbdb3746427c1459185464ce0fcf62e1e8" dependencies = [ + "cfg-if 1.0.0", "libc", - "miniz-sys", + "redox_syscall", + "winapi", ] [[package]] name = "flate2" -version = "1.0.14" +version = "1.0.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cfff41391129e0a856d6d822600b8d71179d46879e310417eb9c762eb178b42" +checksum = "cd3aec53de10fe96d7d8c565eb17f2c687bb5518a2ec453b5b1252964526abe0" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "crc32fast", "libc", "miniz_oxide", @@ -1380,12 +941,15 @@ dependencies = [ [[package]] name = "flume" -version = "0.7.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "855e285c3835897065a6ba6f9463b44553eb9f29c7988d692f3d41283b47388b" +checksum = "531a685ab99b8f60a271b44d5dd1a76e55124a8c9fa0407b7a8e9cd172d5b588" dependencies = [ - "futures", - "spin", + "futures-core", + "futures-sink", + "nanorand", + "pin-project", + "spinning_top", ] [[package]] @@ -1395,369 +959,183 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" [[package]] -name = "foreign-types" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6f339eb8adc052cd2ca78910fda869aefa38d22d5cb648e6485e4d3fc06f3b1" -dependencies = [ - "foreign-types-shared", -] - -[[package]] -name = "foreign-types-shared" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00b0228411908ca8685dba7fc2cdd70ec9990a6e753e89b6ac91a84c40fbaf4b" - -[[package]] -name = "fuchsia-zircon" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e9763c69ebaae630ba35f74888db465e49e259ba1bc0eda7d06f4a067615d82" -dependencies = [ - "bitflags", - "fuchsia-zircon-sys", -] - -[[package]] -name = "fuchsia-zircon-sys" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3dcaa9ae7725d12cdb85b3ad99a434db70b468c09ded17e012d86b5c1010f7a7" - -[[package]] -name = "futures" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e05b85ec287aac0dc34db7d4a569323df697f9c55b99b15d6b4ef8cde49f613" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f366ad74c28cca6ba456d95e6422883cfb4b252a83bed929c83abfdbbf2967d5" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "59f5fff90fd5d971f936ad674802482ba441b6f09ba5e15fd8b39145582ca399" - -[[package]] -name = "futures-executor" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "10d6bb888be1153d3abeb9006b11b02cf5e9b209fda28693c31ae1e4e012e314" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de27142b013a8e869c14957e6d2edeef89e97c289e69d042ee3a49acd8b51789" - -[[package]] -name = "futures-macro" -version = "0.3.5" +name = "form_urlencoded" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d0b5a30a4328ab5473878237c447333c093297bded83a4983d10f4deea240d39" +checksum = "5fc25a87fa4fd2094bffb06925852034d90a17f0d1e05197d4956d3555752191" dependencies = [ - "proc-macro-hack", - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "matches", + "percent-encoding", ] [[package]] -name = "futures-sink" -version = "0.3.5" +name = "funty" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f2032893cb734c7a05d85ce0cc8b8c4075278e93b24b66f9de99d6eb0fa8acc" +checksum = "1847abb9cb65d566acd5942e94aea9c8f547ad02c98e1649326fc0e8910b8b1e" [[package]] -name = "futures-task" -version = "0.3.5" +name = "futures-core" +version = "0.3.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb66b5f09e22019b1ab0830f7785bcea8e7a42148683f99214f73f8ec21a626" -dependencies = [ - "once_cell", -] +checksum = "15496a72fabf0e62bdc3df11a59a3787429221dd0710ba8ef163d6f7a9112c94" + +[[package]] +name = "futures-io" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "d71c2c65c57704c32f5241c1223167c2c3294fd34ac020c807ddbe6db287ba59" [[package]] -name = "futures-util" -version = "0.3.5" +name = "futures-lite" +version = "1.11.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8764574ff08b701a084482c3c7031349104b07ac897393010494beaa18ce32c6" +checksum = "b4481d0cd0de1d204a4fa55e7d45f07b1d958abcb06714b3446438e2eff695fb" dependencies = [ - "futures-channel", + "fastrand", "futures-core", "futures-io", - "futures-macro", - "futures-sink", - "futures-task", "memchr", - "pin-project", - "pin-utils", - "proc-macro-hack", - "proc-macro-nested", - "slab", + "parking", + "pin-project-lite", + "waker-fn", ] [[package]] -name = "fxhash" -version = "0.2.1" +name = "futures-sink" +version = "0.3.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "85754d98985841b7d4f5e8e6fbfa4a4ac847916893ec511a2917ccd8525b8bb3" + +[[package]] +name = "generational-arena" +version = "0.2.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c31b6d751ae2c7f11320402d34e41349dd1016f8d5d45e48c4312bc8625af50c" +checksum = "8e1d3b771574f62d0548cee0ad9057857e9fc25d7a3335f140c84f6acd0bf601" dependencies = [ - "byteorder", + "cfg-if 0.1.10", + "serde", ] [[package]] name = "generic-array" -version = "0.12.3" +version = "0.14.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c68f0274ae0e023facc3c97b2e00f076be70e254bc851d972503b328db79b2ec" +checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817" dependencies = [ "typenum", + "version_check", ] [[package]] -name = "generic-array" -version = "0.13.2" +name = "getrandom" +version = "0.1.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ed1e761351b56f54eb9dcd0cfaca9fd0daecf93918e1cfc01c8a3d26ee7adcd" +checksum = "8fc3cb4d91f53b50155bdcfd23f6a4c39ae1969c2ae85982b135750cccaf5fce" dependencies = [ - "typenum", + "cfg-if 1.0.0", + "libc", + "wasi 0.9.0+wasi-snapshot-preview1", ] [[package]] name = "getrandom" -version = "0.1.14" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7abc8dd8451921606d809ba32e95b6111925cd2906060d2dcc29c070220503eb" +checksum = "c9495705279e7140bf035dde1f6e750c162df8b625267cd52cc44e0b156732c8" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", + "js-sys", "libc", - "wasi", + "wasi 0.10.2+wasi-snapshot-preview1", + "wasm-bindgen", ] [[package]] name = "ghost" -version = "0.1.1" +version = "0.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a36606a68532b5640dc86bb1f33c64b45c4682aad4c50f3937b317ea387f3d6" +checksum = "1a5bcf1bbeab73aa4cf2fde60a846858dc036163c7c33bec309f8d17de785479" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "gimli" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcc8e0c9bce37868955864dbecd2b1ab2bdf967e6f28066d65aaac620444b65c" - -[[package]] -name = "h2" -version = "0.2.5" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "79b7246d7e4b979c03fa093da39cfb3617a96bbeee6310af63991668d7e843ff" +checksum = "aaf91faf136cb47367fa430cd46e37a788775e7fa104f8b4bcb3861dc389b724" dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http", + "fallible-iterator", "indexmap", - "log", - "slab", - "tokio", - "tokio-util", + "stable_deref_trait", ] [[package]] -name = "hash32" -version = "0.1.1" +name = "gimli" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4041af86e63ac4298ce40e5cca669066e75b6f1aa3390fe2561ffa5e1d9f4cc" -dependencies = [ - "byteorder", -] +checksum = "f6503fe142514ca4799d4c26297c4248239fe8838d827db6bd6065c6ed29a6ce" [[package]] -name = "hash32-derive" -version = "0.1.0" +name = "goblin" +version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc0efbd154a17cddc3616d83faef479c0076d871a2143c157b310cc7ca799a2" +checksum = "d20fd25aa456527ce4f544271ae4fea65d2eda4a6561ea56f39fb3ee4f7e3884" dependencies = [ - "proc-macro2 0.3.8", - "quote 0.5.2", - "syn 0.13.11", + "log", + "plain", + "scroll", ] [[package]] name = "hashbrown" -version = "0.7.2" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96282e96bfcd3da0d3aa9938bedf1e50df3269b6db08b4876d2da0bb1a0841cf" +checksum = "d7afe4a420e3fe79967a00898cc1f4db7c8a49a9333a29f8a4bd76a253d5cd04" dependencies = [ - "ahash", - "autocfg 1.0.0", - "rayon", -] - -[[package]] -name = "heapless" -version = "0.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73a8a2391a3bc70b31f60e7a90daa5755a360559c0b6b9c5cfc0fee482362dc0" -dependencies = [ - "as-slice", - "generic-array 0.13.2", - "hash32", - "stable_deref_trait", + "ahash 0.4.7", ] [[package]] name = "heck" -version = "0.3.1" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20564e78d53d2bb135c343b3f47714a56af2061f1c928fdb541dc7b9fdd94205" +checksum = "87cbf45460356b7deeb5e3415b5563308c0a9b057c85e12b06ad551f98d0a6ac" dependencies = [ "unicode-segmentation", ] [[package]] -name = "hematite-nbt" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98b407a33bb1715a4cf0276edfe8df52352c55b2a3703c5079adedf398b92932" +name = "hecs" +version = "0.3.2" +source = "git+https://github.com/feather-rs/feather-hecs#824712c4e4ab658e75fabf2a91a54f9d1c0b1790" dependencies = [ - "byteorder", - "cesu8", - "flate2 0.2.20", - "serde", + "hashbrown", ] [[package]] name = "hematite-nbt" -version = "0.4.1" -source = "git+https://github.com/PistonDevelopers/hematite_nbt?rev=41124ff#41124ff0b8b4394bf0c51a0fd92b72c594a45309" +version = "0.5.1" +source = "git+https://github.com/PistonDevelopers/hematite_nbt#dccdb7601021d8addf732b6b9a8af547d8a7d654" dependencies = [ "byteorder", "cesu8", - "flate2 0.2.20", + "flate2", "serde", ] [[package]] name = "hermit-abi" -version = "0.1.13" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91780f809e750b0a89f5544be56617ff6b1227ee485bcb06ebe10cdf89bd3b71" +checksum = "322f4de77956e22ed0e5032c359a0f1273f1f7f0d79bfa3b8ffbc730d7fbcc5c" dependencies = [ "libc", ] -[[package]] -name = "http" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "28d569972648b2c512421b5f2a405ad6ac9666547189d0c5477a3f200f3e02f9" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13d5ff830006f7646652e057693569bfe0d51760c0085a071769d142a205111b" -dependencies = [ - "bytes", - "http", -] - -[[package]] -name = "httparse" -version = "1.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd179ae861f0c2e53da70d892f5f3029f9594be0c41dc5269cd371691b1dc2f9" - -[[package]] -name = "humantime" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9b6c53306532d3c8e8087b44e6580e10db51a023cf9b433cea2ac38066b92da" - -[[package]] -name = "humantime-serde" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1c57351e2c81b7a03e82a6c8f4198b309c158f6d67c4adb707af6af7d91465a" -dependencies = [ - "humantime", - "serde", -] - -[[package]] -name = "hyper" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6e7655b9594024ad0ee439f3b5a7299369dc2a3f459b47c696f9ff676f9aa1f" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2", - "http", - "http-body", - "httparse", - "itoa", - "log", - "pin-project", - "socket2", - "time", - "tokio", - "tower-service", - "want", -] - -[[package]] -name = "hyper-tls" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3adcd308402b9553630734e9c36b77a7e48b3821251ca2493e8cd596763aafaa" -dependencies = [ - "bytes", - "hyper", - "native-tls", - "tokio", - "tokio-tls", -] - [[package]] name = "ident_case" version = "1.0.1" @@ -1766,9 +1144,9 @@ checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" [[package]] name = "idna" -version = "0.2.0" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02e2673c30ee86b5b96a9cb52ad15718aa1f966f5ab9ad54a8b95d5ca33120a9" +checksum = "89829a5d69c23d348314a7ac337fe39173b61149a9864deabd260983aed48c21" dependencies = [ "matches", "unicode-bidi", @@ -1777,61 +1155,70 @@ dependencies = [ [[package]] name = "indexmap" -version = "1.3.2" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "076f042c5b7b98f31d205f1249267e12a6518c1481e9dae9764af19b707d2292" +checksum = "4fb1fa934250de4de8aef298d81c729a7d33d8c239daa3a7575e6b92bfc7313b" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", + "hashbrown", "serde", ] [[package]] -name = "inlinable_string" -version = "0.1.11" +name = "inkwell" +version = "0.1.0-beta.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cb6ee2a7da03bfc3b66ca47c92c2e392fcc053ea040a85561749b026f7aad09a" +checksum = "f5fe0be1e47c0c0f3da4397693e08f5d78329ae095c25d529e12ade78420fb41" dependencies = [ - "serde", + "either", + "inkwell_internals", + "libc", + "llvm-sys", + "once_cell", + "parking_lot", + "regex", ] [[package]] -name = "inventory" -version = "0.1.6" +name = "inkwell_internals" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "82d3f4b90287725c97b17478c60dda0c6324e7c84ee1ed72fb9179d0fdf13956" +checksum = "c2e1f71330ccec54ee62533ae88574c4169b67fb4b95cbb1196a1322582abd11" dependencies = [ - "ctor", - "ghost", - "inventory-impl", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "inventory-impl" -version = "0.1.6" +name = "instant" +version = "0.1.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9092a4fefc9d503e9287ef137f03180a6e7d1b04c419563171ee14947c5e80ec" +checksum = "61124eeebbd69b8190558df225adf7e4caafce0d743919e5d6b19652314ec5ec" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "cfg-if 1.0.0", ] [[package]] -name = "iovec" -version = "0.1.4" +name = "inventory" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2b3ea6ff95e175473f8ffe6a7eb7c00d054240321b84c57051175fe3c1e075e" +checksum = "0f0f7efb804ec95e33db9ad49e4252f049e37e8b0a4652e3cd61f7999f2eff7f" dependencies = [ - "libc", + "ctor", + "ghost", + "inventory-impl", ] [[package]] -name = "itertools" -version = "0.8.2" +name = "inventory-impl" +version = "0.1.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f56a2d0bc861f9165be4eb3442afd3c236d8a98afd426f65d92324ae1091a484" +checksum = "75c094e94816723ab936484666968f5b58060492e880f3c8d00489a1e244fa51" dependencies = [ - "either", + "proc-macro2", + "quote", + "syn", ] [[package]] @@ -1844,420 +1231,258 @@ dependencies = [ ] [[package]] -name = "itoa" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e" - -[[package]] -name = "js-sys" -version = "0.3.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce10c23ad2ea25ceca0093bd3192229da4c5b3c0f2de499c1ecac0d98d452177" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "kernel32-sys" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7507624b29483431c0ba2d82aece8ca6cdba9382bff4ddd0f7490560c056098d" -dependencies = [ - "winapi 0.2.8", - "winapi-build", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" -dependencies = [ - "spin", -] - -[[package]] -name = "legion" -version = "0.2.1" -source = "git+https://github.com/TomGillen/legion?rev=bd441f4811e7a9e877a0f479a674bbdbf4e4cda3#bd441f4811e7a9e877a0f479a674bbdbf4e4cda3" -dependencies = [ - "legion-core", - "legion-systems", -] - -[[package]] -name = "legion-core" -version = "0.2.1" -source = "git+https://github.com/TomGillen/legion?rev=bd441f4811e7a9e877a0f479a674bbdbf4e4cda3#bd441f4811e7a9e877a0f479a674bbdbf4e4cda3" -dependencies = [ - "crossbeam-channel", - "derivative 1.0.4", - "downcast-rs", - "fxhash", - "itertools 0.8.2", - "parking_lot", - "rayon", - "smallvec", - "thiserror", - "tracing", -] - -[[package]] -name = "legion-systems" -version = "0.2.1" -source = "git+https://github.com/TomGillen/legion?rev=bd441f4811e7a9e877a0f479a674bbdbf4e4cda3#bd441f4811e7a9e877a0f479a674bbdbf4e4cda3" -dependencies = [ - "bit-set", - "crossbeam-channel", - "crossbeam-queue", - "derivative 1.0.4", - "downcast-rs", - "fxhash", - "itertools 0.8.2", - "legion-core", - "paste", - "rayon", - "tracing", -] - -[[package]] -name = "lexical-core" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d7043aa5c05dd34fb73b47acb8c3708eac428de4545ea3682ed2f11293ebd890" -dependencies = [ - "arrayvec 0.4.12", - "cfg-if", - "rustc_version", - "ryu", - "static_assertions 0.3.4", -] - -[[package]] -name = "libc" -version = "0.2.71" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9457b06509d27052635f90d6466700c65095fdf75409b3fbdd903e988b886f49" - -[[package]] -name = "libm" -version = "0.2.1" +name = "itertools" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" - -[[package]] -name = "lieutenant" -version = "0.2.0" -source = "git+https://github.com/feather-rs/lieutenant#c8f7a3fb02fe852dcd91de5d711e993610dda29a" -dependencies = [ - "derivative 2.1.1", - "lieutenant-macros", - "slab", - "smallvec", -] - -[[package]] -name = "lieutenant-macros" -version = "0.1.0" -source = "git+https://github.com/feather-rs/lieutenant#c8f7a3fb02fe852dcd91de5d711e993610dda29a" +checksum = "37d572918e350e82412fe766d24b15e6682fb2ed2bbe018280caa810397cb319" dependencies = [ - "darling", - "proc-macro-error", - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "either", ] [[package]] -name = "lock_api" -version = "0.3.4" +name = "itoa" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4da24a77a3d8a6d4862d95f72e6fdb9c09a643ecdb402d754004a557f2bec75" -dependencies = [ - "scopeguard", -] +checksum = "dd25036021b0de88a0aff6b850051563c6516d0bf53f8638938edbb9de732736" [[package]] -name = "log" -version = "0.4.8" +name = "js-sys" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14b6052be84e6b71ab17edffc2eeabf5c2c3ae1fdb464aae35ac50c67a44e1f7" +checksum = "dc9f84f9b115ce7843d60706df1422a916680bfdfcbdb0447c5614ff9d7e4d78" dependencies = [ - "cfg-if", + "wasm-bindgen", ] [[package]] -name = "maplit" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" - -[[package]] -name = "matches" -version = "0.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" - -[[package]] -name = "matrixmultiply" -version = "0.2.3" +name = "lazy_static" +version = "1.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4f7ec66360130972f34830bfad9ef05c6610a43938a467bcc9ab9369ab3478f" +checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" dependencies = [ - "rawpointer", + "spin", ] [[package]] -name = "maybe-uninit" -version = "2.0.0" +name = "leb128" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00" +checksum = "3576a87f2ba00f6f106fdfcd16db1d698d648a26ad8e0573cad8537c3c362d2a" [[package]] -name = "md5" -version = "0.6.1" +name = "lexical-core" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e6bcd6433cff03a4bfc3d9834d504467db1f1cf6d0ea765d37d330249ed629d" +checksum = "21f866863575d0e1d654fbeeabdc927292fdf862873dc3c96c6f753357e13374" +dependencies = [ + "arrayvec", + "bitflags", + "cfg-if 1.0.0", + "ryu", + "static_assertions", +] [[package]] -name = "md5" -version = "0.7.0" +name = "libc" +version = "0.2.86" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" +checksum = "b7282d924be3275cec7f6756ff4121987bc6481325397dde6ba3e7802b1a8b1c" [[package]] -name = "memchr" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3728d817d99e5ac407411fa471ff9800a778d88a24685968b36824eaf4bee400" +name = "libcraft-core" +version = "0.1.0" +source = "git+https://github.com/feather-rs/libcraft#a1c51e604e60268a2b9076f6a61eee9efb67b682" +dependencies = [ + "bytemuck", + "num-derive", + "num-traits", + "serde", + "strum 0.20.0", + "strum_macros", + "vek 0.14.0", +] [[package]] -name = "memoffset" -version = "0.5.4" +name = "libloading" +version = "0.6.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4fc2c02a7e374099d4ee95a193111f72d2110197fe200272371758f6c3643d8" +checksum = "351a32417a12d5f7e82c368a66781e307834dae04c6ce0cd4456d52989229883" dependencies = [ - "autocfg 1.0.0", + "cfg-if 1.0.0", + "winapi", ] [[package]] -name = "mime" -version = "0.3.16" +name = "libm" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a60c7ce501c71e03a9c9c0d35b861413ae925bd979cc7a4e30d060069aaac8d" +checksum = "c7d73b3f436185384286bd8098d17ec07c9a7d2388a6599f824d8502b529702a" [[package]] -name = "mime_guess" -version = "2.0.3" +name = "llvm-sys" +version = "110.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2684d4c2e97d99848d30b324b00c8fcc7e5c897b7cbb5819b09e7c90e8baf212" +checksum = "b0062a0c6635fb5d57c6ebba072dcae50e41651030363cf06d220b0d016840f2" dependencies = [ - "mime", - "unicase", + "cc", + "lazy_static", + "libc", + "regex", + "semver 0.11.0", ] [[package]] -name = "miniz-sys" -version = "0.1.12" +name = "lock_api" +version = "0.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9e3ae51cea1576ceba0dde3d484d30e6e5b86dee0b2d412fe3a16a15c98202" +checksum = "dd96ffd135b2fd7b973ac026d28085defbe8983df057ced3eb4f2130b0831312" dependencies = [ - "cc", - "libc", + "scopeguard", ] [[package]] -name = "miniz_oxide" -version = "0.3.6" +name = "log" +version = "0.4.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa679ff6578b1cddee93d7e82e263b94a575e0bfced07284eb0c037c1d2416a5" +checksum = "51b9bbe6c47d51fc3e1a9b945965946b4c44142ab8792c50835a980d362c2710" dependencies = [ - "adler32", + "cfg-if 1.0.0", ] [[package]] -name = "mio" -version = "0.6.22" +name = "mach" +version = "0.3.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fce347092656428bc8eaf6201042cb551b8d67855af7374542a92a0fbfcac430" +checksum = "b823e83b2affd8f40a9ee8c29dbc56404c1e34cd2710921f2801e2cf29527afa" dependencies = [ - "cfg-if", - "fuchsia-zircon", - "fuchsia-zircon-sys", - "iovec", - "kernel32-sys", "libc", - "log", - "miow 0.2.1", - "net2", - "slab", - "winapi 0.2.8", ] [[package]] -name = "mio-named-pipes" -version = "0.1.6" +name = "maplit" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5e374eff525ce1c5b7687c4cef63943e7686524a387933ad27ca7ec43779cb3" -dependencies = [ - "log", - "mio", - "miow 0.3.4", - "winapi 0.3.8", -] +checksum = "3e2e65a1a2e43cfcb47a895c4c8b10d1f4a61097f9f254f183aee60cad9c651d" [[package]] -name = "mio-uds" -version = "0.6.8" +name = "matches" +version = "0.1.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "afcb699eb26d4332647cc848492bbc15eafb26f08d0304550d5aa1f612e066f0" -dependencies = [ - "iovec", - "libc", - "mio", -] +checksum = "7ffc5c5338469d4d3ea17d269fa8ea3512ad247247c30bd2df69e68309ed0a08" [[package]] -name = "miow" -version = "0.2.1" +name = "md-5" +version = "0.9.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c1f2f3b1cf331de6896aabf6e9d55dca90356cc9960cca7eaaf408a355ae919" +checksum = "7b5a279bb9607f9f53c22d496eade00d138d1bdcccd07d74650387cf94942a15" dependencies = [ - "kernel32-sys", - "net2", - "winapi 0.2.8", - "ws2_32-sys", + "block-buffer", + "digest", + "opaque-debug", ] [[package]] -name = "miow" -version = "0.3.4" +name = "memchr" +version = "2.3.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "22dfdd1d51b2639a5abd17ed07005c3af05fb7a2a3b1a1d0d7af1000a520c1c7" +checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525" + +[[package]] +name = "memmap2" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "04e3e85b970d650e2ae6d70592474087051c11c54da7f7b4949725c5735fbcc6" dependencies = [ - "socket2", - "winapi 0.3.8", + "libc", ] [[package]] -name = "mojang-api" +name = "memoffset" version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "35d5dd99508e0d8e2f16ceab7288cb06394e7d2838d08fdc35fd1551e8ec2f12" +checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87" dependencies = [ - "lazy_static", - "log", - "num-bigint", - "reqwest", - "serde", - "serde_json", - "sha1", - "uuid", + "autocfg 1.0.1", ] [[package]] -name = "nalgebra" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6511777ed3da44b6a11e732a66a7d6274dfbbcd68ad968e64b778dcb829d94a" +name = "minecraft-proxy" +version = "0.1.0" dependencies = [ - "alga", - "approx", - "generic-array 0.13.2", - "matrixmultiply", - "num-complex", - "num-rational", - "num-traits", - "rand", - "rand_distr", - "typenum", + "anyhow", + "argh", + "async-executor", + "async-io", + "either", + "feather-protocol", + "futures-lite", + "log", + "simple_logger", ] [[package]] -name = "nalgebra-glm" -version = "0.6.0" +name = "miniz_oxide" +version = "0.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ae78da13d67be0d2e4ab567490477e4c9f314fc151ddfff6713b15bdbb2aa72" +checksum = "a92518e98c078586bc6c934028adcca4c92a53d6a958196de835170a01d84e4b" dependencies = [ - "alga", - "approx", - "nalgebra", - "num-traits", + "adler", + "autocfg 1.0.1", ] [[package]] -name = "native-tls" -version = "0.2.4" +name = "mio" +version = "0.7.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b0d88c06fe90d5ee94048ba40409ef1d9315d86f6f38c2efdaad4fb50c58b2d" +checksum = "a5dede4e2065b3842b8b0af444119f3aa331cc7cc2dd20388bfb0f5d5a38823a" dependencies = [ - "lazy_static", "libc", "log", - "openssl", - "openssl-probe", - "openssl-sys", - "schannel", - "security-framework", - "security-framework-sys", - "tempfile", + "miow", + "ntapi", + "winapi", ] [[package]] -name = "ncollide3d" -version = "0.22.0" +name = "miow" +version = "0.3.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf6b0aa58474dc252fd96782f46315e9a3ae7ad18014a65d70975865e1d19754" +checksum = "5a33c1b55807fbed163481b5ba66db4b2fa6cde694a5027be10fb724206c5897" dependencies = [ - "alga", - "approx", - "bitflags", - "downcast-rs", - "either", - "nalgebra", - "num-traits", - "petgraph", - "slab", - "slotmap", - "smallvec", + "socket2", + "winapi", ] [[package]] -name = "net2" -version = "0.2.34" +name = "more-asserts" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ba7c918ac76704fb42afcbbb43891e72731f3dcca3bef2a19786297baf14af7" -dependencies = [ - "cfg-if", - "libc", - "winapi 0.3.8", -] +checksum = "0debeb9fcf88823ea64d64e4a815ab1643f33127d995978e099942ce38f25238" [[package]] -name = "nix" -version = "0.17.0" +name = "nanorand" +version = "0.5.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50e4785f2c3b7589a0d0c1dd60285e1188adac4006e8abd6dd578e1567027363" +checksum = "ac1378b66f7c93a1c0f8464a19bf47df8795083842e5090f4b7305973d5a22d0" dependencies = [ - "bitflags", - "cc", - "cfg-if", - "libc", - "void", + "getrandom 0.2.2", ] [[package]] -name = "nodrop" -version = "0.1.14" +name = "nb-connect" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb" +checksum = "670361df1bc2399ee1ff50406a0d422587dd3bb0da596e1978fe8e05dabddf4f" +dependencies = [ + "libc", + "socket2", +] [[package]] name = "nom" -version = "5.1.1" +version = "5.1.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b471253da97532da4b61552249c521e01e736071f71c1a4f7ebbfbf0a06aad6" +checksum = "ffb4262d26ed83a1c0a33a38fe2bb15797329c85770da05e6b828ddb782627af" dependencies = [ "lexical-core", "memchr", @@ -2266,31 +1491,51 @@ dependencies = [ [[package]] name = "nom_locate" -version = "2.0.0" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e4726500a3d0297dd38edc169d919ad997a9931b4645b59ce0231e88536e213" +checksum = "a67484adf5711f94f2f28b653bf231bff8e438be33bf5b0f35935a0db4f618a2" dependencies = [ "bytecount", "memchr", "nom", ] +[[package]] +name = "ntapi" +version = "0.3.6" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3f6bb902e437b6d86e03cce10a7e2af662292c5dfef23b65899ea3ac9354ad44" +dependencies = [ + "winapi", +] + [[package]] name = "num-bigint" version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "090c7f9998ee0ff65aa5b723e4009f7b217707f1fb5ea551329cc4d6231fb304" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", + "num-integer", + "num-traits", +] + +[[package]] +name = "num-bigint" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5e9a41747ae4633fce5adffb4d2e81ffc5e89593cb19917f8fb2cc5ff76507bf" +dependencies = [ + "autocfg 1.0.1", "num-integer", "num-traits", ] [[package]] name = "num-bigint-dig" -version = "0.6.0" +version = "0.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3d03c330f9f7a2c19e3c0b42698e48141d0809c78cd9b6219f85bd7d7e892aa" +checksum = "5d51546d704f52ef14b3c962b5776e53d5b862e5790e40a350d366c209bd7f7a" dependencies = [ "autocfg 0.1.7", "byteorder", @@ -2299,73 +1544,51 @@ dependencies = [ "num-integer", "num-iter", "num-traits", - "rand", + "rand 0.7.3", "serde", "smallvec", "zeroize", ] -[[package]] -name = "num-complex" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6b19411a9719e753aff12e5187b74d60d3dc449ec3f4dc21e3989c3f554bc95" -dependencies = [ - "autocfg 1.0.0", - "num-traits", -] - [[package]] name = "num-derive" -version = "0.3.0" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c8b15b261814f992e33760b1fca9fe8b693d8a65299f20c9901688636cfb746" +checksum = "876a53fff98e03a936a674b29568b0e605f06b29372c2489ff4de23f1949743d" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "num-integer" -version = "0.1.42" +version = "0.1.44" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f6ea62e9d81a77cd3ee9a2a5b9b609447857f3d358704331e4ef39eb247fcba" +checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "num-traits", ] [[package]] name = "num-iter" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfb0800a0291891dd9f4fe7bd9c19384f98f7fbe0cd0f39a2c6b88b9868bbc00" -dependencies = [ - "autocfg 1.0.0", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.2.4" +version = "0.1.42" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c000134b5dbf44adc5cb772486d335293351644b801551abe8f75c84cfa4aef" +checksum = "b2021c8337a54d21aca0d59a92577a029af9431cb59b909b03252b9c164fad59" dependencies = [ - "autocfg 1.0.0", + "autocfg 1.0.1", "num-integer", "num-traits", ] [[package]] name = "num-traits" -version = "0.2.11" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c62be47e61d1842b9170f0fdeec8eba98e60e90e5446449a0545e5152acd7096" +checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290" dependencies = [ - "autocfg 1.0.0", - "libm", + "autocfg 1.0.1", ] [[package]] @@ -2380,105 +1603,68 @@ dependencies = [ [[package]] name = "object" -version = "0.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9cbca9424c482ee628fa549d9c812e2cd22f1180b9222c9200fdfa6eb31aecb2" - -[[package]] -name = "once_cell" -version = "1.4.0" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b631f7e854af39a1739f401cf34a8a013dfe09eac4fa4dba91e9768bd28168d" +checksum = "8d3b63360ec3cb337817c2dbd47ab4a0f170d285d8e5a2064600f3def1402397" dependencies = [ - "parking_lot", + "crc32fast", + "indexmap", ] [[package]] -name = "oorandom" -version = "11.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94af325bc33c7f60191be4e2c984d48aaa21e2854f473b85398344b60c9b6358" - -[[package]] -name = "opaque-debug" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2839e79665f131bdb5782e51f2c6c9599c133c6098982a54c794358bf432529c" - -[[package]] -name = "openssl" -version = "0.10.29" +name = "object" +version = "0.23.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cee6d85f4cb4c4f59a6a85d5b68a233d280c82e29e822913b9c8b129fbf20bdd" -dependencies = [ - "bitflags", - "cfg-if", - "foreign-types", - "lazy_static", - "libc", - "openssl-sys", -] +checksum = "a9a7ab5d64814df0fe4a4b5ead45ed6c5f181ee3ff04ba344313a6c80446c5d4" [[package]] -name = "openssl-probe" -version = "0.1.2" +name = "once_cell" +version = "1.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77af24da69f9d9341038eba93a073b1fdaaa1b788221b00a69bce9e762cb32de" +checksum = "10acf907b94fc1b1a152d08ef97e7759650268cf986bf127f387e602b02c7e5a" [[package]] -name = "openssl-sys" -version = "0.9.57" +name = "opaque-debug" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7410fef80af8ac071d4f63755c0ab89ac3df0fd1ea91f1d1f37cf5cec4395990" -dependencies = [ - "autocfg 1.0.0", - "cc", - "libc", - "pkg-config", - "vcpkg", -] +checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] -name = "ordinalizer" -version = "0.1.0" +name = "parking" +version = "2.0.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f631c9219be3de11edcff6a906b344dcab3e927e13506a366ddaa8ec49ad7c41" -dependencies = [ - "proc-macro-error", - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", -] +checksum = "427c3892f9e783d91cc128285287e70a59e206ca452770ece88a76f7a3eddd72" [[package]] name = "parking_lot" -version = "0.10.2" +version = "0.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3a704eb390aafdc107b0e392f56a82b668e3a71366993b5340f5833fd62505e" +checksum = "6d7744ac029df22dca6284efe4e898991d28e3085c706c972bcd7da4a27a15eb" dependencies = [ + "instant", "lock_api", "parking_lot_core", ] [[package]] name = "parking_lot_core" -version = "0.7.2" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d58c7c768d4ba344e3e8d72518ac13e259d7c7ade24167003b8488e10b6740a3" +checksum = "fa7a782938e745763fe6907fc6ba86946d72f49fe7e21de074e08128a99fb018" dependencies = [ - "cfg-if", - "cloudabi", + "cfg-if 1.0.0", + "instant", "libc", "redox_syscall", "smallvec", - "winapi 0.3.8", + "winapi", ] [[package]] name = "paste" -version = "0.1.15" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d53181dcd37421c08d3b69f887784956674d09c3f9a47a04fece2b130a5b346b" +checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880" dependencies = [ "paste-impl", "proc-macro-hack", @@ -2486,14 +1672,22 @@ dependencies = [ [[package]] name = "paste-impl" -version = "0.1.15" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ca490fa1c034a71412b4d1edcb904ec5a0981a4426c9eb2128c0fda7a68d17" +checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6" dependencies = [ "proc-macro-hack", - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", +] + +[[package]] +name = "pem" +version = "0.8.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "fd56cbd21fea48d0c440b41cd69c589faacade08c992d9a54e471b79d0fd13eb" +dependencies = [ + "base64", + "once_cell", + "regex", ] [[package]] @@ -2503,181 +1697,188 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d4fd5641d01c8f18a23da7b6fe29298ff4b55afcccdf78973b24cf3175fee32e" [[package]] -name = "petgraph" -version = "0.5.1" +name = "pest" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "467d164a6de56270bd7c4d070df81d07beace25012d5103ced4e9ff08d6afdb7" +checksum = "10f4872ae94d7b90ae48754df22fd42ad52ce740b8f370b03da4835417403e53" dependencies = [ - "fixedbitset", - "indexmap", + "ucd-trie", ] [[package]] name = "pin-project" -version = "0.4.17" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edc93aeee735e60ecb40cf740eb319ff23eab1c5748abfdb5c180e4ce49f7791" +checksum = "96fa8ebb90271c4477f144354485b8068bd8f6b78b428b01ba892ca26caf0b63" dependencies = [ "pin-project-internal", ] [[package]] name = "pin-project-internal" -version = "0.4.17" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e58db2081ba5b4c93bd6be09c40fd36cb9193a8336c384f3b40012e531aa7e40" +checksum = "758669ae3558c6f74bd2a18b41f7ac0b5a195aea6639d6a9b5e5d1ad5ba24c0b" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "pin-project-lite" -version = "0.1.5" +version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7505eeebd78492e0f6108f7171c4948dbb120ee8119d9d77d0afa5469bef67f" +checksum = "439697af366c49a6d0a010c56a0d97685bc140ce0d377b13a2ea2aa42d64a827" [[package]] -name = "pin-utils" -version = "0.1.0" +name = "pkg-config" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" +checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c" [[package]] -name = "pkg-config" -version = "0.3.17" +name = "plain" +version = "0.2.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b4596b6d070b27117e987119b4dac604f3c58cfb0b191112e24771b2faeac1a6" + +[[package]] +name = "podio" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05da548ad6865900e60eaba7f589cc0783590a92e940c26953ff81ddbab2d677" +checksum = "b18befed8bc2b61abc79a457295e7e838417326da1586050b919414073977f19" [[package]] -name = "plotters" -version = "0.2.15" +name = "polling" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d1685fbe7beba33de0330629da9d955ac75bd54f33d7b79f9a895590124f6bb" +checksum = "a2a7bc6b2a29e632e45451c941832803a18cce6781db04de8a04696cdca8bde4" dependencies = [ - "js-sys", - "num-traits", - "wasm-bindgen", - "web-sys", + "cfg-if 0.1.10", + "libc", + "log", + "wepoll-sys", + "winapi", ] [[package]] name = "ppv-lite86" -version = "0.2.8" +version = "0.2.10" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "237a5ed80e274dbc66f86bd59c1e25edc039660be53194b5fe0a482e0f2612ea" +checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857" [[package]] name = "proc-macro-error" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98e9e4b82e0ef281812565ea4751049f1bdcdfccda7d3f459f2e138a40c08678" +checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" dependencies = [ "proc-macro-error-attr", - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "proc-macro2", + "quote", + "syn", "version_check", ] [[package]] name = "proc-macro-error-attr" -version = "1.0.2" +version = "1.0.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f5444ead4e9935abd7f27dc51f7e852a0569ac888096d5ec2499470794e2e53" +checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", - "syn-mid", + "proc-macro2", + "quote", "version_check", ] [[package]] name = "proc-macro-hack" -version = "0.5.16" +version = "0.5.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e0456befd48169b9f13ef0f0ad46d492cf9d2dbb918bcf38e01eed4ce3ec5e4" - -[[package]] -name = "proc-macro-nested" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e946095f9d3ed29ec38de908c22f95d9ac008e424c7bcae54c75a79c527c694" +checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5" [[package]] name = "proc-macro2" -version = "0.3.8" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b06e2f335f48d24442b35a19df506a835fb3547bc3c06ef27340da9acf5cae7" +checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71" dependencies = [ - "unicode-xid 0.1.0", + "unicode-xid", ] [[package]] -name = "proc-macro2" -version = "0.4.30" +name = "qstring" +version = "0.7.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759" +checksum = "d464fae65fff2680baf48019211ce37aaec0c78e9264c84a3e484717f965104e" dependencies = [ - "unicode-xid 0.1.0", + "percent-encoding", ] [[package]] -name = "proc-macro2" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1502d12e458c49a4c9cbff560d0fe0060c252bc29799ed94ca2ed4bb665a0101" +name = "quill-common" +version = "0.1.0" +source = "git+https://github.com/feather-rs/quill#7f09f85c1247570035fe4b92a4e194817a529214" dependencies = [ - "unicode-xid 0.2.0", + "bincode", + "bytemuck", + "libcraft-core", + "serde", + "smartstring", + "uuid", ] [[package]] -name = "quote" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9949cfe66888ffe1d53e6ec9d9f3b70714083854be20fd5e271b232a017401e8" +name = "quill-plugin-format" +version = "0.1.0" +source = "git+https://github.com/feather-rs/quill#7f09f85c1247570035fe4b92a4e194817a529214" dependencies = [ - "proc-macro2 0.3.8", + "anyhow", + "flate2", + "serde", + "serde_json", + "tar", ] [[package]] name = "quote" -version = "0.6.13" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1" +checksum = "c3d0b9745dc2debf507c8422de05d7226cc1f0644216dfdfead988f9b1ab32a7" dependencies = [ - "proc-macro2 0.4.30", + "proc-macro2", ] [[package]] -name = "quote" -version = "1.0.1" +name = "radium" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49d77c41ca8767f2f41394c11a4eebccab83da25e7cc035387a3125f02be90a3" -dependencies = [ - "proc-macro2 1.0.17", -] +checksum = "643f8f41a8ebc4c5dc4515c82bb8abd397b527fc20fd681b7c011c2aee5d44fb" [[package]] -name = "radium" -version = "0.3.0" +name = "rand" +version = "0.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def50a86306165861203e7f84ecffbbdfdea79f0e51039b33de1e952358c47ac" +checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +dependencies = [ + "getrandom 0.1.16", + "libc", + "rand_chacha 0.2.2", + "rand_core 0.5.1", + "rand_hc 0.2.0", +] [[package]] name = "rand" -version = "0.7.3" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03" +checksum = "0ef9e7e66b4468674bfcb0c81af8b7fa0bb154fa9f28eb840da5c447baeb8d7e" dependencies = [ - "getrandom", "libc", - "rand_chacha", - "rand_core", - "rand_hc", - "rand_pcg", + "rand_chacha 0.3.0", + "rand_core 0.6.2", + "rand_hc 0.3.0", ] [[package]] @@ -2687,7 +1888,17 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402" dependencies = [ "ppv-lite86", - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_chacha" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e12735cf05c9e10bf21534da50a147b924d555dc7a547c42e6bb2d5b6017ae0d" +dependencies = [ + "ppv-lite86", + "rand_core 0.6.2", ] [[package]] @@ -2696,16 +1907,16 @@ version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19" dependencies = [ - "getrandom", + "getrandom 0.1.16", ] [[package]] -name = "rand_distr" -version = "0.2.2" +name = "rand_core" +version = "0.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2" +checksum = "34cf66eb183df1c5876e2dcf6b13d57340741e8dc255b48e40a26de954d06ae7" dependencies = [ - "rand", + "getrandom 0.2.2", ] [[package]] @@ -2714,16 +1925,25 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c" dependencies = [ - "rand_core", + "rand_core 0.5.1", +] + +[[package]] +name = "rand_hc" +version = "0.3.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3190ef7066a446f2e7f42e239d161e905420ccab01eb967c9eb27d21b2322a73" +dependencies = [ + "rand_core 0.6.2", ] [[package]] name = "rand_pcg" -version = "0.2.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429" +checksum = "7de198537002b913568a3847e53535ace266f93526caf5c360ec41d72c5787f0" dependencies = [ - "rand_core", + "rand_core 0.6.2", ] [[package]] @@ -2732,21 +1952,16 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "77d416b86801d23dde1aa643023b775c3a462efc0ed96443add11546cdf1dca8" dependencies = [ - "rand_core", + "rand_core 0.5.1", ] -[[package]] -name = "rawpointer" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "60a357793950651c4ed0f3f52338f53b2f809f32d83a07f72909fa13e4c6c1e3" - [[package]] name = "rayon" -version = "1.3.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db6ce3297f9c85e16621bb8cca38a06779ffc31bb8184e1be4bed2be4678a098" +checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674" dependencies = [ + "autocfg 1.0.1", "crossbeam-deque", "either", "rayon-core", @@ -2754,12 +1969,12 @@ dependencies = [ [[package]] name = "rayon-core" -version = "1.7.0" +version = "1.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08a89b46efaf957e52b18062fb2f4660f8b8a4dde1807ca002690868ef2c85a9" +checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a" dependencies = [ + "crossbeam-channel", "crossbeam-deque", - "crossbeam-queue", "crossbeam-utils", "lazy_static", "num_cpus", @@ -2767,106 +1982,97 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.1.56" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2439c63f3f6139d1b57529d16bc3b8bb855230c8efcc5d3a896c8bea7c3b1e84" +checksum = "94341e4e44e24f6b591b59e47a8a027df12e008d73fd5672dbea9cc22f4507d9" +dependencies = [ + "bitflags", +] [[package]] -name = "regex" -version = "1.3.9" +name = "regalloc" +version = "0.0.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c3780fcf44b193bc4d09f36d2a3c87b251da4a046c87795a0d35f4f927ad8e6" +checksum = "571f7f397d61c4755285cd37853fe8e03271c243424a907415909379659381c5" dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", - "thread_local", + "log", + "rustc-hash", + "smallvec", ] [[package]] -name = "regex-automata" -version = "0.1.9" +name = "regex" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ae1ded71d66a4a97f5e961fd0cb25a5f366a42a41570d16a763a69c092c26ae4" +checksum = "d9251239e129e16308e70d853559389de218ac275b515068abc96829d05b948a" dependencies = [ - "byteorder", + "aho-corasick", + "memchr", + "regex-syntax", + "thread_local", ] [[package]] name = "regex-syntax" -version = "0.6.18" +version = "0.6.22" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "26412eb97c6b088a6997e05f69403a802a92d520de2f8e63c2b65f9e0f47c4e8" +checksum = "b5eb417147ba9860a96cfe72a0b93bf88fee1744b5636ec99ab20c1aa9376581" [[package]] -name = "remove_dir_all" -version = "0.5.2" +name = "region" +version = "2.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a83fa3702a688b9359eccba92d153ac33fd2e8462f9e0e3fdf155239ea7792e" +checksum = "877e54ea2adcd70d80e9179344c97f93ef0dffd6b03e1f4529e6e83ab2fa9ae0" dependencies = [ - "winapi 0.3.8", + "bitflags", + "libc", + "mach", + "winapi", ] [[package]] -name = "reqwest" -version = "0.10.6" +name = "remove_dir_all" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b82c9238b305f26f53443e3a4bc8528d64b8d0bee408ec949eb7bf5635ec680" +checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7" dependencies = [ - "base64", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "http", - "http-body", - "hyper", - "hyper-tls", - "js-sys", - "lazy_static", - "log", - "mime", - "mime_guess", - "native-tls", - "percent-encoding", - "pin-project-lite", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-tls", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "winreg", + "winapi", ] [[package]] -name = "ron" -version = "0.5.2" -source = "git+https://github.com/ron-rs/ron?rev=0a7d83da66a4009f169967c5d2ac382a446bb76e#0a7d83da66a4009f169967c5d2ac382a446bb76e" +name = "ring" +version = "0.16.20" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" dependencies = [ - "base64", - "bitflags", - "serde", + "cc", + "libc", + "once_cell", + "spin", + "untrusted", + "web-sys", + "winapi", ] [[package]] name = "rsa" -version = "0.2.0" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ed8692d8e0ea3baae03f0f32ecfc13a6c6f1f85fcd6d9fdefcdf364e70f4df9" +checksum = "3648b669b10afeab18972c105e284a7b953a669b0be3514c27f9b17acab2f9cd" dependencies = [ "byteorder", - "failure", + "digest", "lazy_static", "num-bigint-dig", "num-integer", "num-iter", "num-traits", - "rand", + "pem", + "rand 0.7.3", + "sha2", + "simple_asn1", "subtle", + "thiserror", "zeroize", ] @@ -2881,9 +2087,15 @@ dependencies = [ [[package]] name = "rustc-demangle" -version = "0.1.16" +version = "0.1.18" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e3bad0ee36814ca07d7968269dd4b7ec89ec2da10c4bb613928d3077083c232" + +[[package]] +name = "rustc-hash" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783" +checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" @@ -2891,33 +2103,27 @@ version = "0.2.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" dependencies = [ - "semver", + "semver 0.9.0", ] [[package]] -name = "ryu" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed3d612bc64430efeb3f7ee6ef26d590dce0c43249217bddc62112540c7941e1" - -[[package]] -name = "same-file" -version = "1.0.6" +name = "rustls" +version = "0.19.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" +checksum = "064fd21ff87c6e87ed4506e68beb42459caa4a0e2eb144932e6776768556980b" dependencies = [ - "winapi-util", + "base64", + "log", + "ring", + "sct", + "webpki", ] [[package]] -name = "schannel" -version = "0.1.19" +name = "ryu" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f05ba609c234e60bee0d547fe94a4c7e9da733d1c962cf6e59efa4cd9c8bc75" -dependencies = [ - "lazy_static", - "winapi 0.3.8", -] +checksum = "71d301d4193d031abdd79ff7e3dd721168a9572ef3fe51a1517aba235bd8f86e" [[package]] name = "scopeguard" @@ -2926,26 +2132,33 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd" [[package]] -name = "security-framework" -version = "0.4.4" +name = "scroll" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64808902d7d99f78eaddd2b4e2509713babc3dc3c85ad6f4c447680f3c01e535" +checksum = "fda28d4b4830b807a8b43f7b0e6b5df875311b3e7621d84577188c175b6ec1ec" dependencies = [ - "bitflags", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", + "scroll_derive", ] [[package]] -name = "security-framework-sys" -version = "0.4.3" +name = "scroll_derive" +version = "0.10.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17bf11d99252f512695eb468de5516e5cf75455521e69dfe343f3b74e4748405" +checksum = "aaaae8f38bb311444cfb7f1979af0bc9240d95795f75f9ceddf6a59b79ceffa0" dependencies = [ - "core-foundation-sys", - "libc", + "proc-macro2", + "quote", + "syn", +] + +[[package]] +name = "sct" +version = "0.6.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e3042af939fca8c3453b7af0f1c66e533a15a86169e39de2657310ade8f98d3c" +dependencies = [ + "ring", + "untrusted", ] [[package]] @@ -2954,7 +2167,16 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" dependencies = [ - "semver-parser", + "semver-parser 0.7.0", +] + +[[package]] +name = "semver" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" +dependencies = [ + "semver-parser 0.10.2", ] [[package]] @@ -2963,31 +2185,49 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" +[[package]] +name = "semver-parser" +version = "0.10.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" +dependencies = [ + "pest", +] + [[package]] name = "serde" -version = "1.0.112" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736aac72d1eafe8e5962d1d1c3d99b0df526015ba40915cb3c49d042e92ec243" +checksum = "92d5161132722baa40d802cc70b15262b98258453e85e5d1d365c757c73869ae" dependencies = [ "serde_derive", ] +[[package]] +name = "serde_bytes" +version = "0.11.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9" +dependencies = [ + "serde", +] + [[package]] name = "serde_derive" -version = "1.0.112" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf0343ce212ac0d3d6afd9391ac8e9c9efe06b533c8d33f660f6390cc4093f57" +checksum = "9391c295d64fc0abb2c556bad848f33cb8296276b1ad2677d1ae1ace4f258f31" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "serde_json" -version = "1.0.53" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "993948e75b189211a9b31a7528f950c6adc21f9720b6438ff80a7fa2f864cea2" +checksum = "43535db9747a4ba938c0ce0a98cc631a46ebf943c9e1d604e091df6007620bf6" dependencies = [ "itoa", "ryu", @@ -2996,59 +2236,67 @@ dependencies = [ [[package]] name = "serde_test" -version = "1.0.112" +version = "1.0.123" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326d93a77b25d5516844911b9df1d02375405a5b2671c1d23b0fbd9ac7af4f3" +checksum = "38145a8510bdf71d9a8cceeb57664049538446e77f24648328bdbcf22dc7e169" dependencies = [ "serde", ] [[package]] -name = "serde_urlencoded" -version = "0.6.1" +name = "serde_with" +version = "1.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec5d77e2d4c73717816afac02670d5c4f534ea95ed430442cad02e7a6e32c97" +checksum = "b44be9227e214a0420707c9ca74c2d4991d9955bae9415a8f93f05cebf561be5" dependencies = [ - "dtoa", - "itoa", "serde", - "url", + "serde_with_macros", ] [[package]] -name = "serde_with" -version = "1.4.0" +name = "serde_with_macros" +version = "1.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89d3d595d64120bbbc70b7f6d5ae63298b62a3d9f373ec2f56acf5365ca8a444" +checksum = "e48b35457e9d855d3dc05ef32a73e0df1e2c0fd72c38796a4ee909160c8eeec2" dependencies = [ - "serde", - "serde_with_macros", + "darling", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "serde_with_macros" -version = "1.1.0" +name = "sha-1" +version = "0.9.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4070d2c9b9d258465ad1d82aabb985b84cd9a3afa94da25ece5a9938ba5f1606" +checksum = "dfebf75d25bd900fd1e7d11501efab59bc846dbc76196839663e6637bba9f25f" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "block-buffer", + "cfg-if 1.0.0", + "cpuid-bool", + "digest", + "opaque-debug", ] [[package]] -name = "sha1" -version = "0.6.0" +name = "sha2" +version = "0.9.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2579985fda508104f7587689507983eadd6a6e84dd35d6d115361f530916fa0d" +checksum = "fa827a14b29ab7f44778d14a88d3cb76e949c45083f7dbfa507d0cb699dc12de" +dependencies = [ + "block-buffer", + "cfg-if 1.0.0", + "cpuid-bool", + "digest", + "opaque-debug", +] [[package]] name = "signal-hook-registry" -version = "1.2.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94f478ede9f64724c5d173d7bb56099ec3e2d9fc2774aac65d34b8b890405f41" +checksum = "16f1d0fef1604ba8f7a073c7e701f213e056707210e9020af4528e0101ce11a6" dependencies = [ - "arc-swap", "libc", ] @@ -3058,7 +2306,7 @@ version = "1.0.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "1893a4b8db694e23889b63229b6e1deb33846ee0552588bb6e45e53eff59667d" dependencies = [ - "cfg-if", + "cfg-if 0.1.10", "paste", ] @@ -3072,59 +2320,53 @@ dependencies = [ [[package]] name = "simple_asn1" -version = "0.4.0" +version = "0.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b25ecba7165254f0c97d6c22a64b1122a03634b18d20a34daf21e18f892e618" +checksum = "692ca13de57ce0613a363c8c2f1de925adebc81b04c923ac60c5488bb44abe4b" dependencies = [ "chrono", - "num-bigint", + "num-bigint 0.2.6", "num-traits", ] [[package]] name = "simple_logger" -version = "1.6.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea0c4611f32f4c2bac73754f22dca1f57e6c1945e0590dae4e5f2a077b92367" +checksum = "cd57f17c093ead1d4a1499dc9acaafdd71240908d64775465543b8d9a9f1d198" dependencies = [ "atty", "chrono", - "colored", + "colored 1.9.3", "log", - "winapi 0.3.8", + "winapi", ] [[package]] -name = "slab" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c111b5bd5695e56cffe5129854aa230b39c93a305372fdbb2668ca2394eea9f8" - -[[package]] -name = "slotmap" -version = "0.4.0" +name = "smallvec" +version = "1.6.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c46a3482db8f247956e464d783693ece164ca056e6e67563ee5505bdb86452cd" +checksum = "fe0f37c9e8f3c5a4a66ad655a93c74daac4ad00c441533bf5c6e7990bb42604e" [[package]] -name = "smallvec" -version = "1.4.0" +name = "smartstring" +version = "0.2.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7cb5678e1615754284ec264d9bb5b4c27d2018577fd90ac0ceb578591ed5ee4" +checksum = "1ada87540bf8ef4cf8a1789deb175626829bb59b1fefd816cf7f7f55efcdbae9" dependencies = [ "serde", + "static_assertions", ] [[package]] name = "socket2" -version = "0.3.12" +version = "0.3.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03088793f677dce356f3ccc2edb1b314ad191ab702a5de3faf49304f7e104918" +checksum = "122e570113d28d773067fab24266b66753f6ea915758651696b6e35e49f88d6e" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", - "redox_syscall", - "winapi 0.3.8", + "winapi", ] [[package]] @@ -3134,26 +2376,19 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" [[package]] -name = "spin_sleep" -version = "1.0.0" +name = "spinning_top" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a98101bdc3833e192713c2af0b0dd2614f50d1cf1f7a97c5221b7aac052acc7" +checksum = "7e529d73e80d64b5f2631f9035113347c578a1c9c7774b83a2b880788459ab36" dependencies = [ - "once_cell", - "winapi 0.3.8", + "lock_api", ] [[package]] name = "stable_deref_trait" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dba1a27d3efae4351c8051072d619e3ade2820635c3958d826bfea39d59b54c8" - -[[package]] -name = "static_assertions" -version = "0.3.4" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f3eb36b47e512f8f1c9e3d10c2c1965bc992bd9cdb024fa581e2194501c83d3" +checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" [[package]] name = "static_assertions" @@ -3163,167 +2398,137 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" [[package]] name = "stream-cipher" -version = "0.3.2" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8131256a5896cabcf5eb04f4d6dacbe1aefda854b0d9896e09cb58829ec5638c" +checksum = "c80e15f898d8d8f25db24c253ea615cc14acf418ff307822995814e7d42cfa89" dependencies = [ - "generic-array 0.12.3", + "block-cipher", + "generic-array", ] [[package]] name = "strsim" -version = "0.9.3" +version = "0.10.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6446ced80d6c486436db5c078dde11a9f73d42b57fb273121e160b84f63d894c" +checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" [[package]] name = "strum" -version = "0.16.0" +version = "0.19.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6138f8f88a16d90134763314e3fc76fa3ed6a7db4725d6acf9a3ef95a3188d22" +checksum = "b89a286a7e3b5720b9a477b23253bc50debac207c8d21505f8e70b36792f11b5" [[package]] name = "strum" -version = "0.18.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bd81eb48f4c437cadc685403cad539345bf703d78e63707418431cecd4522b" - -[[package]] -name = "strum_macros" -version = "0.16.0" +version = "0.20.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0054a7df764039a6cd8592b9de84be4bec368ff081d203a7d5371cbfa8e65c81" -dependencies = [ - "heck", - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", -] +checksum = "7318c509b5ba57f18533982607f24070a55d353e90d4cae30c467cdb2ad5ac5c" [[package]] name = "strum_macros" -version = "0.18.0" +version = "0.20.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87c85aa3f8ea653bfd3ddf25f7ee357ee4d204731f6aa9ad04002306f6e2774c" +checksum = "ee8bc6b87a5112aeeab1f4a9f7ab634fe6cbefc4850006df31267f4cfb9e3149" dependencies = [ "heck", - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "subtle" -version = "2.2.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "502d53007c02d7605a05df1c1a73ee436952781653da5d0bf57ad608f66932c1" +checksum = "1e81da0851ada1f3e9d4312c704aa4f8806f0f9d69faaf8df2f3464b4a9437c2" [[package]] name = "syn" -version = "0.13.11" +version = "1.0.60" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14f9bf6292f3a61d2c716723fdb789a41bbe104168e6f496dc6497e531ea1b9b" +checksum = "c700597eca8a5a762beb35753ef6b94df201c81cca676604f547495a0d7f0081" dependencies = [ - "proc-macro2 0.3.8", - "quote 0.5.2", - "unicode-xid 0.1.0", + "proc-macro2", + "quote", + "unicode-xid", ] [[package]] -name = "syn" -version = "0.15.44" +name = "synstructure" +version = "0.12.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5" +checksum = "b834f2d66f734cb897113e34aaff2f1ab4719ca946f9a7358dba8f8064148701" dependencies = [ - "proc-macro2 0.4.30", - "quote 0.6.13", - "unicode-xid 0.1.0", + "proc-macro2", + "quote", + "syn", + "unicode-xid", ] [[package]] -name = "syn" -version = "1.0.29" +name = "tap" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb37da98a55b1d08529362d9cbb863be17556873df2585904ab9d2bc951291d0" -dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "unicode-xid 0.2.0", -] +checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" [[package]] -name = "syn-mid" -version = "0.5.0" +name = "tar" +version = "0.4.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7be3539f6c128a931cf19dcee741c1af532c7fd387baa739c03dd2e96479338a" +checksum = "c0bcfbd6a598361fda270d82469fff3d65089dc33e175c9a131f7b4cd395f228" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "filetime", + "libc", + "xattr", ] [[package]] -name = "synstructure" -version = "0.12.3" +name = "target-lexicon" +version = "0.11.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545" -dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", - "unicode-xid 0.2.0", -] +checksum = "422045212ea98508ae3d28025bc5aaa2bd4a9cdaecd442a08da2ee620ee9ea95" [[package]] name = "tempfile" -version = "3.1.0" +version = "3.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9" +checksum = "dac1c663cfc93810f88aed9b8941d48cabf856a1b111c29a40439018d870eb22" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", "libc", - "rand", + "rand 0.8.3", "redox_syscall", "remove_dir_all", - "winapi 0.3.8", -] - -[[package]] -name = "textwrap" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060" -dependencies = [ - "unicode-width", + "winapi", ] [[package]] name = "thiserror" -version = "1.0.19" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b13f926965ad00595dd129fa12823b04bbf866e9085ab0a5f2b05b850fbfc344" +checksum = "e0f4a65597094d4483ddaed134f409b2cb7c1beccf25201a9f73c719254fa98e" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.19" +version = "1.0.24" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "893582086c2f98cde18f906265a65b5030a074b1046c674ae898be6519a7f479" +checksum = "7765189610d8241a44529806d6fd1f2e0a08734313a35d5b3a556f92b381f3c0" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "thread_local" -version = "1.0.1" +version = "1.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14" +checksum = "8018d24e04c95ac8790716a5987d0fec4f8b27249ffa0f7d33f1369bdfb88cbd" dependencies = [ - "lazy_static", + "once_cell", ] [[package]] @@ -3333,130 +2538,105 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ca8a50ef2360fbd1eeb0ecd46795a87a19024eb4b53c5dc916ca1fd95fe62438" dependencies = [ "libc", - "winapi 0.3.8", + "winapi", ] [[package]] -name = "tinytemplate" -version = "1.0.4" +name = "tiny-keccak" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45e4bc5ac99433e0dcb8b9f309dd271a165ae37dde129b9e0ce1bfdd8bfe4891" +checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" dependencies = [ - "serde", - "serde_json", + "crunchy", +] + +[[package]] +name = "tinyvec" +version = "1.1.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "317cca572a0e89c3ce0ca1f1bdc9369547fe318a683418e42ac8f59d14701023" +dependencies = [ + "tinyvec_macros", ] +[[package]] +name = "tinyvec_macros" +version = "0.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cda74da7e1a664f795bb1f8a87ec406fb89a02522cf6e50620d016add6dbbf5c" + [[package]] name = "tokio" -version = "0.2.21" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d099fa27b9702bed751524694adbe393e18b36b204da91eb1cbbbbb4a5ee2d58" +checksum = "e8190d04c665ea9e6b6a0dc45523ade572c088d2e6566244c1122671dbf4ae3a" dependencies = [ - "bytes", - "fnv", - "futures-core", - "iovec", - "lazy_static", + "autocfg 1.0.1", + "bytes 1.0.1", "libc", "memchr", "mio", - "mio-named-pipes", - "mio-uds", "num_cpus", + "once_cell", + "parking_lot", "pin-project-lite", "signal-hook-registry", - "slab", "tokio-macros", - "winapi 0.3.8", + "winapi", ] [[package]] name = "tokio-macros" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f0c3acc6aa564495a0f2e1d59fab677cd7f81a19994cfc7f3ad0e64301560389" -dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", -] - -[[package]] -name = "tokio-tls" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a70f4fcd7b3b24fb194f837560168208f669ca8cb70d0c4b862944452396343" -dependencies = [ - "native-tls", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.3.1" +version = "1.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be8242891f2b6cbef26a2d7e8605133c2c554cd35b3e4948ea892d6d68436499" +checksum = "caf7b11a536f46a809a8a9f0bb4237020f70ecbf115b842360afb127ea2fda57" dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "log", - "pin-project-lite", - "tokio", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "toml" -version = "0.5.6" +version = "0.5.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffc92d160b1eef40665be3a05630d003936a3bc7da7421277846c2613e92c71a" +checksum = "a31142970826733df8241ef35dc040ef98c679ab14d7c3e54d827099b3acecaa" dependencies = [ "serde", ] -[[package]] -name = "tower-service" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e987b6bf443f4b5b3b6f38704195592cca41c5bb7aedd3c3693c7081f8289860" - [[package]] name = "tracing" -version = "0.1.14" +version = "0.1.25" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a7c6b59d116d218cb2d990eb06b77b64043e0268ef7323aae63d8b30ae462923" +checksum = "01ebdc2bb4498ab1ab5f5b73c5803825e60199229ccba0698170e3be0e7f959f" dependencies = [ - "cfg-if", + "cfg-if 1.0.0", + "pin-project-lite", "tracing-attributes", "tracing-core", ] [[package]] name = "tracing-attributes" -version = "0.1.8" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "99bbad0de3fd923c9c3232ead88510b783e5a4d16a6154adffa3d53308de984c" +checksum = "a8a9bd1db7706f2373a190b0d067146caa39350c486f3d455b0e33b431f94c07" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "proc-macro2", + "quote", + "syn", ] [[package]] name = "tracing-core" -version = "0.1.10" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0aa83a9a47081cd522c09c81b31aec2c9273424976f922ad61c053b58350b715" +checksum = "f50de3927f93d202783f4513cda820ab47ef17f624b03c096e86ef00c67e6b5f" dependencies = [ "lazy_static", ] -[[package]] -name = "try-lock" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e604eb7b43c06650e854be16a2a03155743d3752dd1c943f6829e26b7a36e382" - [[package]] name = "typenum" version = "1.12.0" @@ -3464,14 +2644,35 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33" [[package]] -name = "unicase" -version = "2.6.0" +name = "typetag" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50f37be617794602aabbeee0be4f259dc1778fabe05e2d67ee8f79326d5cb4f6" +checksum = "422619e1a7299befb977a1f6d8932c499f6151dbcafae715193570860cae8f07" dependencies = [ - "version_check", + "erased-serde", + "inventory", + "lazy_static", + "serde", + "typetag-impl", +] + +[[package]] +name = "typetag-impl" +version = "0.1.7" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "504f9626fe6cc1c376227864781996668e15c1ff251d222f63ef17f310bf1fec" +dependencies = [ + "proc-macro2", + "quote", + "syn", ] +[[package]] +name = "ucd-trie" +version = "0.1.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "56dee185309b50d1f11bfedef0fe6d036842e3fb77413abef29f8f8d1c5d4c1c" + [[package]] name = "unicode-bidi" version = "0.3.4" @@ -3483,43 +2684,73 @@ dependencies = [ [[package]] name = "unicode-normalization" -version = "0.1.12" +version = "0.1.17" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5479532badd04e128284890390c1e876ef7a993d0570b3597ae43dfa1d59afa4" +checksum = "07fbfce1c8a97d547e8b5334978438d9d6ec8c20e38f56d4a4374d181493eaef" dependencies = [ - "smallvec", + "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.6.0" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e83e153d1053cbb5a118eeff7fd5be06ed99153f00dbcd8ae310c5fb2b22edc0" +checksum = "bb0d2e7be6ae3a5fa87eed5fb451aff96f2573d2694942e40543ae0bbe19c796" [[package]] -name = "unicode-width" -version = "0.1.7" +name = "unicode-xid" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "caaa9d531767d1ff2150b9332433f32a24622147e5ebb1f26409d5da67afd479" +checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564" [[package]] -name = "unicode-xid" -version = "0.1.0" +name = "untrusted" +version = "0.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc" +checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] -name = "unicode-xid" -version = "0.2.0" +name = "ureq" +version = "1.5.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "294b85ef5dbc3670a72e82a89971608a1fcc4ed5c7c5a2895230d31a95f0569b" +dependencies = [ + "base64", + "chunked_transfer", + "log", + "once_cell", + "qstring", + "rustls", + "url", + "webpki", + "webpki-roots", +] + +[[package]] +name = "ureq" +version = "2.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c" +checksum = "6585dcbf3483242f77b502864478ede62431baf3442b99367d3456ec20c1707b" +dependencies = [ + "base64", + "chunked_transfer", + "log", + "once_cell", + "rustls", + "serde", + "serde_json", + "url", + "webpki", + "webpki-roots", +] [[package]] name = "url" -version = "2.1.1" +version = "2.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "829d4a8476c35c9bf0bbce5a3b23f4106f79728039b726d292bb93bc106787cb" +checksum = "9ccd964113622c8e9322cfac19eb1004a07e636c545f325da085d5cdde6f1f8b" dependencies = [ + "form_urlencoded", "idna", "matches", "percent-encoding", @@ -3527,33 +2758,46 @@ dependencies = [ [[package]] name = "uuid" -version = "0.8.1" +version = "0.8.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fde2f6a4bea1d6e007c4ad38c6839fa71cbb63b6dbf5b595aa38dc9b1093c11" +checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7" dependencies = [ - "md5 0.6.1", - "rand", + "getrandom 0.2.2", "serde", ] [[package]] -name = "vcpkg" -version = "0.2.8" +name = "vec-arena" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "eafc1b9b2dfc6f5529177b62cf806484db55b32dc7c9658a118e11bbeb33061d" + +[[package]] +name = "vek" +version = "0.12.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fc439f2794e98976c88a2a2dafce96b930fe8010b0a256b3c2199a773933168" +checksum = "2b5ec6f1e1336c875817faba09752eeac76aa0c51c304b9030cbfcd0daf5e217" +dependencies = [ + "approx 0.3.2", + "num-integer", + "num-traits", + "rustc_version", + "serde", + "static_assertions", +] [[package]] name = "vek" -version = "0.10.4" +version = "0.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e44defd4e0c629bdc842e5d180dda428b3abd2c6b0c7e1fced8c718f65d5f77" +checksum = "cdd07aa105f92385e2c8ff5632a2cd426e7f659813edce6f21ff4a9a488b696b" dependencies = [ - "approx", + "approx 0.4.0", "num-integer", "num-traits", "rustc_version", "serde", - "static_assertions 1.1.0", + "static_assertions", ] [[package]] @@ -3563,153 +2807,365 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed" [[package]] -name = "void" -version = "1.0.2" +name = "waker-fn" +version = "1.1.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" + +[[package]] +name = "wasi" +version = "0.9.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" + +[[package]] +name = "wasi" +version = "0.10.2+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a02e4885ed3bc0f2de90ea6dd45ebcbb66dacffe03547fadbb0eeae2770887d" +checksum = "fd6fbd9a79829dd1ad0cc20627bf1ed606756a7f77edff7b66b7064f9cb327c6" [[package]] -name = "walkdir" -version = "2.3.1" +name = "wasm-bindgen" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "777182bc735b6424e1a57516d35ed72cb8019d85c8c9bf536dccb3445c1a2f7d" +checksum = "7ee1280240b7c461d6a0071313e08f34a60b0365f14260362e5a2b17d1d31aa7" dependencies = [ - "same-file", - "winapi 0.3.8", - "winapi-util", + "cfg-if 1.0.0", + "wasm-bindgen-macro", ] [[package]] -name = "want" -version = "0.3.0" +name = "wasm-bindgen-backend" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce8a968cb1cd110d136ff8b819a556d6fb6d919363c61534f6860c7eb172ba0" +checksum = "5b7d8b6942b8bb3a9b0e73fc79b98095a27de6fa247615e59d096754a3bc2aa8" dependencies = [ + "bumpalo", + "lazy_static", "log", - "try-lock", + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-shared", ] [[package]] -name = "wasi" -version = "0.9.0+wasi-snapshot-preview1" +name = "wasm-bindgen-macro" +version = "0.2.71" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" +checksum = "e5ac38da8ef716661f0f36c0d8320b89028efe10c7c0afde65baffb496ce0d3b" +dependencies = [ + "quote", + "wasm-bindgen-macro-support", +] [[package]] -name = "wasm-bindgen" -version = "0.2.63" +name = "wasm-bindgen-macro-support" +version = "0.2.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "cc053ec74d454df287b9374ee8abb36ffd5acb95ba87da3ba5b7d3fe20eb401e" +dependencies = [ + "proc-macro2", + "quote", + "syn", + "wasm-bindgen-backend", + "wasm-bindgen-shared", +] + +[[package]] +name = "wasm-bindgen-shared" +version = "0.2.71" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7d6f8ec44822dd71f5f221a5847fb34acd9060535c1211b70a05844c0f6383b1" + +[[package]] +name = "wasmer" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a70cfae554988d904d64ca17ab0e7cd652ee5c8a0807094819c1ea93eb9d6866" +dependencies = [ + "cfg-if 0.1.10", + "indexmap", + "more-asserts", + "target-lexicon", + "thiserror", + "wasmer-compiler", + "wasmer-compiler-cranelift", + "wasmer-compiler-llvm", + "wasmer-derive", + "wasmer-engine", + "wasmer-engine-jit", + "wasmer-engine-native", + "wasmer-types", + "wasmer-vm", + "winapi", +] + +[[package]] +name = "wasmer-compiler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c2dc4aa152834bc334f506c1a06b866416a8b6697d5c9f75b9a689c8486def0" +checksum = "6b7732a9cab472bd921d5a0c422f45b3d03f62fa2c40a89e0770cef6d47e383e" dependencies = [ - "cfg-if", + "enumset", "serde", - "serde_json", - "wasm-bindgen-macro", + "serde_bytes", + "smallvec", + "target-lexicon", + "thiserror", + "wasmer-types", + "wasmer-vm", + "wasmparser", ] [[package]] -name = "wasm-bindgen-backend" -version = "0.2.63" +name = "wasmer-compiler-cranelift" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ded84f06e0ed21499f6184df0e0cb3494727b0c5da89534e0fcc55c51d812101" +checksum = "48cb9395f094e1d81534f4c5e330ed4cdb424e8df870d29ad585620284f5fddb" dependencies = [ - "bumpalo", + "cranelift-codegen", + "cranelift-frontend", + "gimli 0.22.0", + "more-asserts", + "rayon", + "serde", + "smallvec", + "tracing", + "wasmer-compiler", + "wasmer-types", + "wasmer-vm", +] + +[[package]] +name = "wasmer-compiler-llvm" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1d72c30e73aba7c5d56b5445858ae7ce6334d2e970ddc504a86eb5199e852bc4" +dependencies = [ + "byteorder", + "cc", + "goblin", + "inkwell", + "itertools 0.9.0", "lazy_static", - "log", - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", - "wasm-bindgen-shared", + "libc", + "rayon", + "regex", + "rustc_version", + "semver 0.11.0", + "smallvec", + "target-lexicon", + "wasmer-compiler", + "wasmer-types", + "wasmer-vm", ] [[package]] -name = "wasm-bindgen-futures" -version = "0.4.13" +name = "wasmer-derive" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "64487204d863f109eb77e8462189d111f27cb5712cc9fdb3461297a76963a2f6" +checksum = "d8b86dcd2c3efdb8390728a2b56f762db07789aaa5aa872a9dc776ba3a7912ed" dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", + "proc-macro-error", + "proc-macro2", + "quote", + "syn", ] [[package]] -name = "wasm-bindgen-macro" -version = "0.2.63" +name = "wasmer-engine" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "838e423688dac18d73e31edce74ddfac468e37b1506ad163ffaf0a46f703ffe3" +checksum = "efe4667d6bd888f26ae8062a63a9379fa697415b4b4e380f33832e8418fd71b5" dependencies = [ - "quote 1.0.1", - "wasm-bindgen-macro-support", + "backtrace", + "bincode", + "lazy_static", + "memmap2", + "more-asserts", + "rustc-demangle", + "serde", + "serde_bytes", + "target-lexicon", + "thiserror", + "wasmer-compiler", + "wasmer-types", + "wasmer-vm", ] [[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.63" +name = "wasmer-engine-jit" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3156052d8ec77142051a533cdd686cba889537b213f948cd1d20869926e68e92" +checksum = "26770be802888011b4a3072f2a282fc2faa68aa48c71b3db6252a3937a85f3da" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", - "wasm-bindgen-backend", - "wasm-bindgen-shared", + "bincode", + "cfg-if 0.1.10", + "region", + "serde", + "serde_bytes", + "wasmer-compiler", + "wasmer-engine", + "wasmer-types", + "wasmer-vm", + "winapi", ] [[package]] -name = "wasm-bindgen-shared" -version = "0.2.63" +name = "wasmer-engine-native" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "2bb4083a6c69f2cd4b000b82a80717f37c6cc2e536aee3a8ffe9af3edc276a8b" +dependencies = [ + "bincode", + "cfg-if 0.1.10", + "leb128", + "libloading", + "serde", + "tempfile", + "tracing", + "wasmer-compiler", + "wasmer-engine", + "wasmer-object", + "wasmer-types", + "wasmer-vm", + "which", +] + +[[package]] +name = "wasmer-object" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "abf8e0c12b82ff81ebecd30d7e118be5fec871d6de885a90eeb105df0a769a7b" +dependencies = [ + "object 0.22.0", + "thiserror", + "wasmer-compiler", + "wasmer-types", +] + +[[package]] +name = "wasmer-types" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "c7f4ac28c2951cd792c18332f03da523ed06b170f5cf6bb5b1bdd7e36c2a8218" +dependencies = [ + "cranelift-entity", + "serde", + "thiserror", +] + +[[package]] +name = "wasmer-vm" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "a7635ba0b6d2fd325f588d69a950ad9fa04dddbf6ad08b6b2a183146319bf6ae" +dependencies = [ + "backtrace", + "cc", + "cfg-if 0.1.10", + "indexmap", + "libc", + "memoffset", + "more-asserts", + "region", + "serde", + "thiserror", + "wasmer-types", + "winapi", +] + +[[package]] +name = "wasmer-wasi" +version = "1.0.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aaf3ec2503b6b12034cf066deb923805952f821223b881acb746df83e284c03e" +dependencies = [ + "bincode", + "byteorder", + "generational-arena", + "getrandom 0.2.2", + "libc", + "serde", + "thiserror", + "time", + "tracing", + "typetag", + "wasmer", + "winapi", +] + +[[package]] +name = "wasmparser" +version = "0.65.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c9ba19973a58daf4db6f352eda73dc0e289493cd29fb2632eb172085b6521acd" +checksum = "87cc2fe6350834b4e528ba0901e7aa405d78b89dc1fa3145359eb4de0e323fcf" [[package]] name = "web-sys" -version = "0.3.40" +version = "0.3.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b72fe77fd39e4bd3eaa4412fd299a0be6b3dfe9d2597e2f1c20beb968f41d17" +checksum = "ec600b26223b2948cedfde2a0aa6756dcf1fef616f43d7b3097aaf53a6c4d92b" dependencies = [ "js-sys", "wasm-bindgen", ] [[package]] -name = "winapi" -version = "0.2.8" +name = "webpki" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "167dc9d6949a9b857f3451275e911c3f44255842c1f7a76f33c55103a909087a" +checksum = "b8e38c0608262c46d4a56202ebabdeb094cef7e560ca7a226c6bf055188aa4ea" +dependencies = [ + "ring", + "untrusted", +] [[package]] -name = "winapi" -version = "0.3.8" +name = "webpki-roots" +version = "0.21.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8093091eeb260906a183e6ae1abdba2ef5ef2257a21801128899c3fc699229c6" +checksum = "82015b7e0b8bad8185994674a13a93306bea76cf5a16c5a181382fd3a5ec2376" dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", + "webpki", ] [[package]] -name = "winapi-build" -version = "0.1.1" +name = "wepoll-sys" +version = "3.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d315eee3b34aca4797b2da6b13ed88266e6d612562a0c46390af8299fc699bc" +checksum = "0fcb14dea929042224824779fbc82d9fab8d2e6d3cbc0ac404de8edf489e77ff" +dependencies = [ + "cc", +] [[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" +name = "which" +version = "4.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" +checksum = "87c14ef7e1b8b8ecfc75d5eca37949410046e66f15d185c01d70824f1f8111ef" +dependencies = [ + "libc", + "thiserror", +] [[package]] -name = "winapi-util" -version = "0.1.5" +name = "winapi" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178" +checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" dependencies = [ - "winapi 0.3.8", + "winapi-i686-pc-windows-gnu", + "winapi-x86_64-pc-windows-gnu", ] +[[package]] +name = "winapi-i686-pc-windows-gnu" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" + [[package]] name = "winapi-x86_64-pc-windows-gnu" version = "0.4.0" @@ -3717,55 +3173,50 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" [[package]] -name = "winreg" -version = "0.7.0" +name = "wyz" +version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0120db82e8a1e0b9fb3345a539c478767c0048d842860994d96113d5b667bd69" -dependencies = [ - "winapi 0.3.8", -] +checksum = "85e60b0d1b5f99db2556934e21937020776a5d31520bf169e851ac44e6420214" [[package]] -name = "ws2_32-sys" -version = "0.2.1" +name = "xattr" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59cefebd0c892fa2dd6de581e937301d8552cb44489cdff035c6187cb63fa5e" +checksum = "244c3741f4240ef46274860397c7c74e50eb23624996930e484c16679633a54c" dependencies = [ - "winapi 0.2.8", - "winapi-build", + "libc", ] [[package]] name = "zeroize" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3cbac2ed2ba24cc90f5e06485ac8c7c1e5449fe8911aef4d8877218af021a5b8" +checksum = "81a974bcdd357f0dca4d41677db03436324d45a4c9ed2d0b873a5a360ce41c36" dependencies = [ "zeroize_derive", ] [[package]] name = "zeroize_derive" -version = "1.0.0" +version = "1.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de251eec69fc7c1bc3923403d18ececb929380e016afe103da75f396704f8ca2" +checksum = "c3f369ddb18862aba61aa49bf31e74d29f0f162dec753063200e1dc084345d16" dependencies = [ - "proc-macro2 1.0.17", - "quote 1.0.1", - "syn 1.0.29", + "proc-macro2", + "quote", + "syn", "synstructure", ] [[package]] name = "zip" -version = "0.5.8" +version = "0.5.6" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "543adf038106b64cfca4711c82c917d785e3540e04f7996554488f988ec43124" +checksum = "58287c28d78507f5f91f2a4cf1e8310e2c76fd4c6932f93ac60fd1ceb402db7d" dependencies = [ - "byteorder", "bzip2", "crc32fast", - "flate2 1.0.14", - "thiserror", + "flate2", + "podio", "time", ] diff --git a/Cargo.toml b/Cargo.toml index dfe5fb088..f93d60463 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,7 +1,24 @@ [workspace] members = [ - "api", + # Listed in the order they appear in the dependency tree (from bottom to top) + "crates/utils", + "crates/generated", + "crates/blocks", + "crates/blocks/generator", + "crates/base", + "crates/ecs", + "crates/datapacks", + "crates/worldgen", + "crates/common", + "crates/protocol", + "crates/plugin-host", + "crates/server", + "tools/proxy", +] + +# Temp until we finish porting everything to new 1.16 design +exclude = [ "core", "core/anvil", "core/blocks", @@ -15,8 +32,8 @@ members = [ "core/loot", "core/loot/model", "core/misc", + "core/protocol", "core/inventory", - "core/network", "core/text", "core/util", @@ -42,11 +59,9 @@ members = [ "server/weather", "server/worldgen", - "codegen", "data", "data/macro" ] -# To make sure the server isn't dirt slow in debug mode. -[profile.dev] -opt-level = 1 +[profile.release] +debug = true diff --git a/README.md b/README.md index 5e5ce9189..35522f2ce 100644 --- a/README.md +++ b/README.md @@ -4,38 +4,50 @@ A Minecraft server implementation written in Rust. -_Notice_: The codebase is undergoing a major refactor in [this PR](https://github.com/feather-rs/feather/pull/307). The PR will be merged shortly, but the code on the `develop` branch is discontinued. - -### Features - -Note that Feather is still early in development. Don't expect anything not listed here to work. - -- [x] Highly scalable architecture -- [x] Anvil world loading and saving -- [x] Physics -- [x] Basic world generation -- [x] Chunk streaming -- [x] Day/night cycle -- [x] Weather -- [x] Block lighting -- [x] Arrow shooting -- [x] Falling blocks -- [x] Block placement and breaking -- [x] Item dropping and collection -- [x] Chat -- [x] Inventory handling -- [x] Movement broadcasting - -On the current `develop` branch, some more features are pending release: -- [x] Commands (/tell, /tp, /gamemode) -- [x] Survival mode -- [x] Survival mode block breaking and drops -- [x] Health + fall damage -- [x] (soon) block entities, including chests +### Status + +The project is in an early stage. Many, many features are unimplemented. We welcome help from anyone willing to contribute! + +### Supported Minecraft versions + +Feather supports 1.16.5 clients and world saves. We do not currently have plans to support multiple versions at once, but +we may consider this in the future. + +### Goals + +The Feather project aims to provide a Minecraft server that is _fast_, _modular_, and paired with an ergonomic plugin API. + +Our mid-term goal is to make Feather usable on hub and minigame servers. The limited set of gameplay features available in Feather +is not a problem for such servers that require a small subset of vanilla functionality. On the other hand, Feather's modularity +and performance lends itself to these types of servers. Therefore, our current focus is +on building a rich plugin API to enable these use cases. + +In the long term, Feather could be used on larger, more survival-like servers, where its performance should allow + +### Ecosystem + +The Feather ecosystem consists of several repositories: +* [`libcraft`](https://github.com/feather-rs/libcraft), a set of Rust crates providing Minecraft functionality. +* [`quill`](https://github.com/feather-rs/quill), our work-in-progress plugin API. Quill plugins are written in Rust and compiled to WebAssembly. Feather runs them in a sandboxed WebAssembly VM. +* [`feather`], the server software built on top of `libcraft` and `quill`. + +### Performance + +Comparisons to vanilla performance _will_ be extremely misleading, because Feather implements so few features. But if you really want them: + +* Feather can handle 1,000,000 entities spawned by a plugin before it starts to max out the CPU. The vanilla server will croak long before then. +* Feather can handle 500 concurrent player connections with each player walking in a random direction. + +These results _will_ change after more features are implemented in Feather, so take them with a grain of salt. + +Memory usage in Feather is proportional to the number of loaded chunks, not player counts. In the 500 player test, the server uses ~40 MiB of RAM +until the players start to spread out. In the 1,000,000 entities test, it uses 400 MiB of RAM without any chunks loaded. ### Running We offer precompiled binaries for Windows, Linux, and macOS at [GitHub Releases](https://github.com/feather-rs/feather/releases). +NB: these binaries are currently outdated. We intend to make another release shortly. + To run Feather: * Extract the downloaded archive. * Run the binary. @@ -51,8 +63,6 @@ Warning: Feather world persistence is fairly new and will likely cause problems when attempting to open Feather worlds in vanilla. Do not let Feather touch worlds you care about unless they have been backed up. -Feather currently only supports 1.13.2 clients and world saves. In the future, additional versions will be supported. - ### Compiling If you are on another platform, compile the server yourself to try it out: ```bash @@ -61,7 +71,8 @@ cd feather cargo build --release ``` -Compiling from source requires `rustfmt`. +Compiling from source requires the latest stable version of Rust. Older Rust versions may be able +to compile Feather, but they are not guaranteed to keep working. The server executable will be located in `target/release`. @@ -74,7 +85,7 @@ and the codebase has not been tested enough to consider the server production re * How can I contribute? -Check out our [issue tracker](https://github.com/feather-rs/feather/issues) to find an issue which appeals to you. Feel free +Check out our [issue tracker](https://github.com/feather-rs/feather/issues) to find out what needs to be worked on. Feel free to join [our Discord](https://discordapp.com/invite/4eYmK69) and ask questions whenever you need. Thanks for your interest in contributing! * Are there other ways I can help? diff --git a/api/Cargo.toml b/api/Cargo.toml deleted file mode 100644 index f8c384e2c..000000000 --- a/api/Cargo.toml +++ /dev/null @@ -1,7 +0,0 @@ -[package] -name = "feather_api" -version = "0.1.0" -authors = ["caelunshun "] -edition = "2018" - -[dependencies] diff --git a/assets/dimension.nbt b/assets/dimension.nbt new file mode 100644 index 000000000..4e3238334 Binary files /dev/null and b/assets/dimension.nbt differ diff --git a/assets/dimension_codec.nbt b/assets/dimension_codec.nbt new file mode 100644 index 000000000..59c3fcd57 Binary files /dev/null and b/assets/dimension_codec.nbt differ diff --git a/codegen/Cargo.toml b/codegen/Cargo.toml deleted file mode 100644 index b783fe003..000000000 --- a/codegen/Cargo.toml +++ /dev/null @@ -1,17 +0,0 @@ -[package] -name = "feather-codegen" -version = "0.6.0" -authors = ["caelunshun "] -edition = "2018" - -[lib] -proc-macro = true - -[dependencies] -syn = { version = "1.0", features = ["full", "extra-traits", "derive"] } -quote = "1.0" -proc-macro2 = "1.0" -lazy_static = "1.4" -heck = "0.3" -strum = "0.16" -strum_macros = "0.16" diff --git a/codegen/src/entity_metadata.rs b/codegen/src/entity_metadata.rs deleted file mode 100644 index 7ca93243e..000000000 --- a/codegen/src/entity_metadata.rs +++ /dev/null @@ -1,335 +0,0 @@ -use proc_macro::TokenStream; -use proc_macro2::Ident; -use proc_macro2::Span; -use quote::quote; -use std::collections::HashMap; -use syn::braced; -use syn::parenthesized; -use syn::parse::{Parse, ParseBuffer}; -use syn::Error; -use syn::Lit; -use syn::Token; - -#[derive(Clone)] -struct EntityMetadata { - ident: Ident, - variants: HashMap, -} - -impl Parse for EntityMetadata { - fn parse(input: &ParseBuffer) -> Result { - let ident = input.parse()?; - - input.parse::()?; - - let mut variants = HashMap::new(); - while let Ok(variant) = input.parse::() { - variants.insert(variant.ident.clone(), variant); - - input.parse::()?; - } - - Ok(Self { ident, variants }) - } -} - -#[derive(Clone)] -struct Variant { - ident: Ident, - extends: Option, - entries: Vec, -} - -impl Parse for Variant { - fn parse(input: &ParseBuffer) -> Result { - let ident = input.parse()?; - - let extends = if input.parse::().is_ok() { - let ident = input.parse()?; - Some(ident) - } else { - None - }; - - let content; - braced!(content in input); - - let mut entries = vec![]; - - while let Ok(entry) = content.parse::() { - entries.push(entry); - } - - Ok(Self { - ident, - extends, - entries, - }) - } -} - -#[derive(Clone)] -struct Entry { - ty: EntryType, - name: Ident, - index: u8, - default: Option, -} - -impl Parse for Entry { - fn parse(input: &ParseBuffer) -> Result { - let name = input.parse()?; - let _ = input.parse::()?; - let ty = input.parse()?; - - let paren; - parenthesized!(paren in input); - let default = match paren.parse() { - Ok(val) => Some(val), - Err(_) => None, - }; - - let _ = input.parse::()?; - - let index = match input.parse::()? { - Lit::Int(val) => val.base10_parse()?, - _ => panic!("Index not a `u8`"), - }; - - let _ = input.parse::()?; - - Ok(Self { - ty, - name, - index, - default, - }) - } -} - -#[derive(PartialEq, Debug, Display, EnumString, Copy, Clone)] -enum EntryType { - Byte, - VarInt, - Float, - String, - Slot, - Boolean, - OptUuid, - Position, -} - -impl Parse for EntryType { - fn parse(input: &ParseBuffer) -> Result { - let ty = input.parse::()?; - - Ok(EntryType::from_rust_type(&ty.to_string())) - } -} - -impl EntryType { - fn rust_type(self) -> &'static str { - match self { - EntryType::Byte => "u8", - EntryType::VarInt => "i32", - EntryType::Float => "f32", - EntryType::String => "String", - EntryType::Slot => "Slot", - EntryType::Boolean => "bool", - EntryType::OptUuid => "OptUuid", - EntryType::Position => "BlockPosition", - } - } - - fn from_rust_type(ty: &str) -> Self { - match ty { - "u8" => EntryType::Byte, - "VarInt" => EntryType::VarInt, - "f32" => EntryType::Float, - "String" => EntryType::String, - "bool" => EntryType::Boolean, - "Slot" => EntryType::Slot, - "OptUuid" => EntryType::OptUuid, - "BlockPosition" => EntryType::Position, - _ => panic!("Invalid entry type {}", ty), - } - } -} - -#[allow(clippy::cognitive_complexity)] // FIXME: clean this function up -pub fn entity_metadata(input: TokenStream) -> TokenStream { - let input: EntityMetadata = syn::parse_macro_input!(input); - - let mut structs = vec![]; - let mut enum_variants = vec![]; - - let mut to_raw_metadata_arms = vec![]; - let mut to_full_raw_metadata_arms = vec![]; - - let enum_ident = input.ident.clone(); - - for variant in input.variants.values() { - let entries = get_metadata_entries(&input, variant.clone()); - - let variant_ident = &variant.ident; - - let mut struct_fields = vec![]; - let mut struct_impl = vec![]; - let mut to_raw_metadata = vec![]; - let mut to_full_raw_metadata = vec![]; - - let mut new_fn_parameters = vec![]; - let mut new_fn_contents = vec![]; - - let mut default_entries = vec![]; - - for entry in entries { - let entry_ident = entry.name; - let ty_enum = entry.ty; - let ty = ty_enum.rust_type(); - let ty_ident = Ident::new(ty, Span::call_site()); - - let is_dirty_name = format!("__is_dirty_{}", entry_ident); - let is_dirty_ident = Ident::new(&is_dirty_name, Span::call_site()); - - struct_fields.push(quote! { - #entry_ident: #ty_ident, - #is_dirty_ident: bool, - }); - - let set_fn_ident = Ident::new(&format!("set_{}", entry_ident), Span::call_site()); - let get_fn_ident = entry_ident.clone(); - - struct_impl.push(quote! { - pub fn #set_fn_ident(&mut self, val: #ty_ident) { - self.#entry_ident = val; - self.#is_dirty_ident = true; - } - - pub fn #get_fn_ident(&self) -> #ty_ident { - self.#entry_ident.clone() - } - }); - - let pass_reference = ty_enum == EntryType::Slot; - - let index = entry.index; - let set_expr = if pass_reference { - quote! { meta.set(#index, self.#entry_ident.clone()); } - } else { - quote! { meta.set(#index, self.#entry_ident); } - }; - to_raw_metadata.push(quote! { - if self.#is_dirty_ident { - #set_expr - self.#is_dirty_ident = false; - } - }); - to_full_raw_metadata.push(quote! { - #set_expr - }); - - new_fn_parameters.push(quote! { - #entry_ident: #ty_ident - }); - - new_fn_contents.push(quote! { - #entry_ident, - #is_dirty_ident: true, - }); - - to_raw_metadata_arms.push(quote! { - #enum_ident::#variant_ident(meta) => meta.to_raw_metadata(), - }); - - to_full_raw_metadata_arms.push(quote! { - #enum_ident::#variant_ident(meta) => meta.to_full_raw_metadata(), - }); - - default_entries.push(match entry.default { - Some(default) => quote! { #entry_ident: #default, #is_dirty_ident: false, }, - None => quote! { #entry_ident: Default::default(), #is_dirty_ident: false, }, - }); - } - - struct_impl.push(quote! { - pub fn new(#(#new_fn_parameters),*) -> Self { - Self { - #(#new_fn_contents)* - } - } - - fn to_raw_metadata(&mut self) -> EntityMetadata { - let mut meta = EntityMetadata::new(); - #(#to_raw_metadata)* - meta - } - - fn to_full_raw_metadata(&self) -> EntityMetadata { - let mut meta = EntityMetadata::new(); - #(#to_full_raw_metadata)* - meta - } - }); - - structs.push(quote! { - #[derive(Clone, Debug)] - pub struct #variant_ident { - #(#struct_fields)* - } - - impl #variant_ident { - #(#struct_impl)* - } - - impl Default for #variant_ident { - fn default() -> Self { - Self { - #(#default_entries)* - } - } - } - }); - - enum_variants.push(quote! { - #variant_ident(#variant_ident), - }) - } - - let result = quote! { - #[derive(Clone, Debug)] - pub enum #enum_ident { - #(#enum_variants)* - } - - impl #enum_ident { - pub fn to_raw_metadata(&mut self) -> EntityMetadata { - match self { - #(#to_raw_metadata_arms)* - } - } - - pub fn to_full_raw_metadata(&self) -> EntityMetadata { - match self { - #(#to_full_raw_metadata_arms)* - } - } - } - - #(#structs)* - }; - - result.into() -} - -fn get_metadata_entries(metadata: &EntityMetadata, variant: Variant) -> Vec { - let mut entries = vec![]; - - if let Some(inherits_from) = variant.extends.as_ref() { - let inherits_from = &metadata.variants[inherits_from]; - entries.extend(get_metadata_entries(metadata, inherits_from.clone()).into_iter()); - } - - entries.extend(variant.entries.into_iter()); - entries -} diff --git a/codegen/src/lib.rs b/codegen/src/lib.rs deleted file mode 100644 index 4f75af355..000000000 --- a/codegen/src/lib.rs +++ /dev/null @@ -1,286 +0,0 @@ -extern crate proc_macro; - -#[macro_use] -extern crate strum_macros; - -mod entity_metadata; - -use heck::SnakeCase; -use lazy_static::lazy_static; -use proc_macro::TokenStream; -use quote::quote; -use std::collections::HashMap; -use syn::export::Span; -use syn::Data; -use syn::Ident; -use syn::Type; -use syn::{parse_macro_input, DeriveInput}; - -#[proc_macro_derive(AsAny)] -pub fn derive_as_any(_item: TokenStream) -> TokenStream { - let parsed: DeriveInput = parse_macro_input!(_item as DeriveInput); - - let name = &parsed.ident; - - let result = quote! { - impl AsAny for #name { - fn as_any(&self) -> &Any { - self - } - } - }; - - result.into() -} - -#[derive(Clone, Copy, Debug, Eq, PartialEq, Hash)] -enum PacketParameterType { - Varint, - Varlong, - String, - U64, - U32, - U16, - U8, - I64, - I32, - I16, - I8, - Position, - Boolean, - F32, - F64, - Uuid, - Nbt, - Slot, - EntityMetadata, -} - -lazy_static! { - static ref PARAMETER_MAPPINGS: HashMap<&'static str, PacketParameterType> = { - let mut m = HashMap::new(); - - m.insert("VarInt", PacketParameterType::Varint); - m.insert("VarLong", PacketParameterType::Varlong); - m.insert("String", PacketParameterType::String); - m.insert("u64", PacketParameterType::U64); - m.insert("u32", PacketParameterType::U32); - m.insert("u16", PacketParameterType::U16); - m.insert("u8", PacketParameterType::U8); - m.insert("i64", PacketParameterType::I64); - m.insert("i32", PacketParameterType::I32); - m.insert("i16", PacketParameterType::I16); - m.insert("i8", PacketParameterType::I8); - m.insert("BlockPosition", PacketParameterType::Position); - m.insert("bool", PacketParameterType::Boolean); - m.insert("f32", PacketParameterType::F32); - m.insert("f64", PacketParameterType::F64); - m.insert("Uuid", PacketParameterType::Uuid); - m.insert("Blob", PacketParameterType::Nbt); - m.insert("Slot", PacketParameterType::Slot); - m.insert("EntityMetadata", PacketParameterType::EntityMetadata); - - m - }; - static ref FUNCTION_MAPPINGS: HashMap = { - let mut m = HashMap::new(); - - m.insert(PacketParameterType::Varint, "var_int"); - m.insert(PacketParameterType::Varlong, "var_long"); - m.insert(PacketParameterType::String, "string"); - m.insert(PacketParameterType::U64, "u64"); - m.insert(PacketParameterType::U32, "u32"); - m.insert(PacketParameterType::U16, "u16"); - m.insert(PacketParameterType::U8, "u8"); - m.insert(PacketParameterType::I64, "i64"); - m.insert(PacketParameterType::I32, "i32"); - m.insert(PacketParameterType::I16, "i16"); - m.insert(PacketParameterType::I8, "i8"); - m.insert(PacketParameterType::Position, "position"); - m.insert(PacketParameterType::Boolean, "bool"); - m.insert(PacketParameterType::F32, "f32"); - m.insert(PacketParameterType::F64, "f64"); - m.insert(PacketParameterType::Uuid, "uuid"); - m.insert(PacketParameterType::Nbt, "nbt"); - m.insert(PacketParameterType::Slot, "slot"); - m.insert(PacketParameterType::EntityMetadata, "metadata"); - - m - }; -} - -#[proc_macro_derive(Packet)] -pub fn derive_packet(_item: TokenStream) -> TokenStream { - let item: DeriveInput = parse_macro_input!(_item as DeriveInput); - - let ident = item.ident.clone(); - - let fields = match &item.data { - Data::Struct(st) => &st.fields, - _ => panic!("Not a struct"), - }; - - let mut write_code = vec![]; - let mut read_code = vec![]; - - for field in fields { - let field_name = field.ident.as_ref().unwrap(); - let ty = match &field.ty { - Type::Path(path) => &path.path.segments, - _ => panic!("Not a path field"), - }; - - if ty.len() != 1 { - panic!("Must not use paths"); - } - - let ty_ident = &ty.first().unwrap().ident; - - let parameter_type = PARAMETER_MAPPINGS - .get(ty_ident.to_string().as_str()) - .unwrap_or_else(|| { - panic!( - "Couldn't find packet parameter type corresponding to {}", - ty_ident - ) - }); - let function_ident = Ident::new( - FUNCTION_MAPPINGS.get(parameter_type).unwrap(), - Span::call_site(), - ); - - let write_fn_ident = Ident::new(&format!("push_{}", function_ident), Span::call_site()); - let read_fn_ident = Ident::new(&format!("try_get_{}", function_ident), Span::call_site()); - - let use_ref = { - vec![ - PacketParameterType::Position, - PacketParameterType::String, - PacketParameterType::Uuid, - PacketParameterType::Nbt, - PacketParameterType::EntityMetadata, - ] - .contains(parameter_type) - }; - - let write; - - if use_ref { - write = quote! { - buf.#write_fn_ident(&self.#field_name); - }; - } else { - write = quote! { - buf.#write_fn_ident(self.#field_name); - } - } - - let read; - - read = quote! { - self.#field_name = buf.#read_fn_ident()?; - }; - - write_code.push(write); - read_code.push(read); - } - - let r = quote! { - impl Packet for #ident { - fn read_from(&mut self, mut buf: &mut Cursor<&[u8]>) -> anyhow::Result<()> { - #(#read_code)* - Ok(()) - } - - fn write_to(&self, buf: &mut BytesMut) { - #(#write_code)* - } - - fn ty(&self) -> PacketType { - PacketType::#ident - } - - fn ty_sized() -> PacketType where Self: Sized { - PacketType::#ident - } - - fn box_clone(&self) -> Box { - Box::new((*self).clone()) - } - } - }; - - r.into() -} - -#[proc_macro_derive(FromSnakeCase)] -pub fn derive_from_snake_case(input: TokenStream) -> TokenStream { - let input: syn::DeriveInput = syn::parse(input).unwrap(); - let name = &input.ident; - - let mut match_arms = vec![]; - - match &input.data { - syn::Data::Enum(en) => { - for variant in &en.variants { - let snake_case = variant.ident.to_string().to_snake_case(); - let ident = &variant.ident; - match_arms.push(quote! { - #snake_case => Some(#name::#ident) - }); - } - } - _ => panic!("Can only derive `FromSnakeCase` on enums"), - } - - let result = quote! { - impl FromSnakeCase for #name { - fn from_snake_case(val: &str) -> Option { - match val { - #(#match_arms ,)* - _ => None, - } - } - } - }; - - result.into() -} - -#[proc_macro_derive(ToSnakeCase)] -pub fn derive_to_snake_case(input: TokenStream) -> TokenStream { - let input: syn::DeriveInput = syn::parse(input).unwrap(); - let name = &input.ident; - - let mut match_arms = vec![]; - - match &input.data { - syn::Data::Enum(en) => { - for variant in &en.variants { - let snake_case = variant.ident.to_string().to_snake_case(); - let ident = &variant.ident; - match_arms.push(quote! { - #name::#ident => #snake_case.to_string() - }); - } - } - _ => panic!("Can only derive `ToSnakeCase` on enums"), - } - - let result = quote! { - impl ToSnakeCase for #name { - fn to_snake_case(&self) -> String { - match self { - #(#match_arms),* - } - } - } - }; - - result.into() -} - -#[proc_macro] -pub fn entity_metadata(input: TokenStream) -> TokenStream { - entity_metadata::entity_metadata(input) -} diff --git a/core/anvil/Cargo.toml b/core/anvil/Cargo.toml deleted file mode 100644 index 3d99d2fbf..000000000 --- a/core/anvil/Cargo.toml +++ /dev/null @@ -1,26 +0,0 @@ -[package] -name = "feather-anvil" -version = "0.6.0" -authors = ["caelunshun "] -edition = "2018" - -[dependencies] -feather-items = { path = "../items" } -feather-blocks = { path = "../blocks" } -feather-biomes = { path = "../biomes" } -feather-inventory = { path = "../inventory" } -feather-chunk = { path = "../chunk" } -feather-util = { path = "../util" } - -thiserror = "1.0" -tokio = { version = "0.2", features = ["full"] } -serde = "1.0.112" # >= 1.0.112 needed for a fix in #[serde(flatten)] -uuid = "0.8" -hematite-nbt = { git = "https://github.com/PistonDevelopers/hematite_nbt", rev="41124ff" } # needed for NBT array serialization -byteorder = "1.3" -bitvec = "0.17" -anyhow = "1.0" -arrayvec = { version = "0.5", features = ["serde"] } - -[dev-dependencies] -"serde_test" = "1.0.112" diff --git a/core/blocks/Cargo.toml b/core/blocks/Cargo.toml deleted file mode 100644 index f9596e467..000000000 --- a/core/blocks/Cargo.toml +++ /dev/null @@ -1,27 +0,0 @@ -[package] -name = "feather-blocks" -version = "0.6.0" -authors = ["caelunshun "] -edition = "2018" - -[dependencies] -feather-definitions = { path = "../../definitions" } -feather-util = { path = "../util" } - -bit-set = "0.5" -once_cell = { version = "1.3", features = ["parking_lot"] } -anyhow = "1.0" -thiserror = "1.0" -num-traits = "0.2" -serde = { version = "1.0", features = ["derive"] } -bincode = "1.2" - -[build-dependencies] -feather-blocks-generator = { path = "generator" } - -[dev-dependencies] -criterion = "0.3" - -[[bench]] -name = "block_id_mappings" -harness = false diff --git a/core/blocks/benches/block_id_mappings.rs b/core/blocks/benches/block_id_mappings.rs deleted file mode 100644 index b0d880894..000000000 --- a/core/blocks/benches/block_id_mappings.rs +++ /dev/null @@ -1,44 +0,0 @@ -#[macro_use] -extern crate criterion; - -use criterion::{black_box, Criterion}; -use feather_blocks::{BlockId, EastWire, WestWire}; - -// Some useless vanity benchmarks. - -fn to_id_complex_state(c: &mut Criterion) { - feather_blocks::init(); - let block = BlockId::redstone_wire() - .with_east_wire(EastWire::Up) - .with_power(15); - c.bench_function("to_id_complex_state", |b| { - b.iter(|| black_box(block).vanilla_id()); - }); -} - -fn from_id_complex_state(c: &mut Criterion) { - feather_blocks::init(); - c.bench_function("from_id_complex_state", |b| { - b.iter(|| BlockId::from_vanilla_id(black_box(7198))); - }); -} - -fn update_properties_complex_state(c: &mut Criterion) { - feather_blocks::init(); - c.bench_function("update_properties_complex_state", |b| { - b.iter(|| { - BlockId::redstone_wire() - .with_east_wire(EastWire::Up) - .with_west_wire(WestWire::Side) - .with_power(15) - }); - }); -} - -criterion_group!( - benches, - update_properties_complex_state, - to_id_complex_state, - from_id_complex_state -); -criterion_main!(benches); diff --git a/core/blocks/generator/Cargo.toml b/core/blocks/generator/Cargo.toml deleted file mode 100644 index d9b2e5599..000000000 --- a/core/blocks/generator/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -name = "feather-blocks-generator" -version = "0.1.0" -authors = ["caelunshun "] -edition = "2018" - -[dependencies] -feather-data = { path = "../../../data" } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -anyhow = "1.0" -indexmap = { version = "1.3", features = ["serde-1"] } -quote = "1.0" -syn = "1.0" -proc-macro2 = "1.0" -heck = "0.3" -once_cell = "1.3" -maplit = "1.0" -bincode = "1.2" diff --git a/core/blocks/src/generated/vanilla_ids.dat b/core/blocks/src/generated/vanilla_ids.dat deleted file mode 100644 index 28831415e..000000000 Binary files a/core/blocks/src/generated/vanilla_ids.dat and /dev/null differ diff --git a/core/chunk/Cargo.toml b/core/chunk/Cargo.toml deleted file mode 100644 index 8ee5cd18d..000000000 --- a/core/chunk/Cargo.toml +++ /dev/null @@ -1,14 +0,0 @@ -[package] -name = "feather-chunk" -version = "0.6.0" -authors = ["caelunshun "] -edition = "2018" - -[dependencies] -feather-blocks = { path = "../blocks" } -feather-biomes = { path = "../biomes" } -feather-util = { path = "../util" } - -bitflags = "1.2" -ahash = "0.3" -smallvec = "1.3" diff --git a/core/chunk/src/lib.rs b/core/chunk/src/lib.rs deleted file mode 100644 index e0a6d0fc7..000000000 --- a/core/chunk/src/lib.rs +++ /dev/null @@ -1,1448 +0,0 @@ -use ahash::AHashMap; -use bitflags::bitflags; -use feather_biomes::Biome; -use feather_blocks::{BlockId, SimplifiedBlockKind}; -use feather_util::ChunkPosition; -use smallvec::SmallVec; - -/// The number of bits used for each block -/// in the global palette. -pub const GLOBAL_BITS_PER_BLOCK: u8 = 14; - -/// The minimum bits per block allowed when -/// using a section palette. -/// Bits per block values lower than this -/// value will be offsetted to this value. -pub const MIN_BITS_PER_BLOCK: u8 = 4; - -/// The maximum number of bits per block -/// allowed when using a section palette. -/// Values above this will use the global palette -/// instead. -pub const MAX_BITS_PER_BLOCK: u8 = 8; - -/// The height in blocks of a chunk column. -pub const CHUNK_HEIGHT: usize = 256; -/// The width in blocks of a chunk column. -pub const CHUNK_WIDTH: usize = 16; - -/// The height in blocks of a chunk section. -pub const SECTION_HEIGHT: usize = 16; - -/// The width in blocks of a chunk section. -pub const SECTION_WIDTH: usize = CHUNK_WIDTH; - -/// The volume in blocks of a chunk section. -pub const SECTION_VOLUME: usize = (SECTION_HEIGHT * SECTION_WIDTH * SECTION_WIDTH) as usize; - -/// The number of chunk sections in a column. -pub const NUM_SECTIONS: usize = 16; - -/// A chunk column consisting -/// of a 16x256x16 section of blocks. -/// A chunk column maintains an array -/// of up to 16 chunk sections, each corresponding -/// to a 16x16x16 section of blocks in the chunk. -#[derive(Clone)] -pub struct Chunk { - /// The location of this chunk, in chunk - /// coordinates. - location: ChunkPosition, - /// An array of the sections in this chunk. - /// A section with Y value `y` can be found at - /// index `y` in this array. - /// When an entry in this array is set to `None`, - /// the section at the entry's Y coordinate - /// is assumed to empty, meaning that it consists - /// of only air. - sections: [Option; NUM_SECTIONS], - /// The biomes in this section, indexable by - /// ((z << 4) | x). - biomes: [Biome; SECTION_WIDTH * SECTION_WIDTH], - /// Whether this chunk has been modified since the most recent - /// call to `check_modified`(). - modified: bool, - - heightmaps: Box<[HeightMap]>, -} - -#[derive(Clone, Copy, Default)] -pub struct HeightMap { - light_blocking: u16, - motion_blocking: u16, - motion_blocking_no_leaves: u16, - ocean_floor: u16, - world_surface: u16, -} - -impl HeightMap { - /// Y-coordinate + 1 of the highest opaque block. - pub fn light_blocking(self) -> u16 { - self.light_blocking - } - - pub fn set_light_blocking(&mut self, mut light_blocking: u16) { - if light_blocking > 256 { - light_blocking = 256; - } - self.light_blocking = light_blocking; - } - - /// Y-coordinate + 1 of the highest solid or fluid block. - pub fn motion_blocking(self) -> u16 { - self.motion_blocking - } - - pub fn set_motion_blocking(&mut self, mut motion_blocking: u16) { - if motion_blocking > 256 { - motion_blocking = 256; - } - self.motion_blocking = motion_blocking; - } - - /// Y-coordinate + 1 of the highest solid or fluid block that is not leaves. - pub fn motion_blocking_no_leaves(self) -> u16 { - self.motion_blocking_no_leaves - } - - pub fn set_motion_blocking_no_leaves(&mut self, mut motion_blocking_no_leaves: u16) { - if motion_blocking_no_leaves > 256 { - motion_blocking_no_leaves = 256; - } - self.motion_blocking_no_leaves = motion_blocking_no_leaves; - } - - /// Y-coordinate + 1 of the highest solid block. - pub fn ocean_floor(self) -> u16 { - self.ocean_floor - } - - pub fn set_ocean_floor(&mut self, mut ocean_floor: u16) { - if ocean_floor > 256 { - ocean_floor = 256; - } - self.ocean_floor = ocean_floor; - } - - /// Y-coordinate + 1 of the highest non-air block. - pub fn world_surface(self) -> u16 { - self.world_surface - } - - pub fn set_world_surface(&mut self, mut world_surface: u16) { - if world_surface > 256 { - world_surface = 256; - } - self.world_surface = world_surface; - } -} - -bitflags! { - struct HeightMapMask: u8 { - const LIGHT_BLOCKING = 0b0000_0001; - const MOTION_BLOCKING = 0b0000_0010; - const MOTION_BLOCKING_NO_LEAVES = 0b0000_0100; - const OCEAN_FLOOR = 0b0000_1000; - const WORLD_SURFACE = 0b0001_0000; - } -} - -impl Default for Chunk { - fn default() -> Self { - // Rust apparently forces you to implement - // `Copy` on types if you want to use the - // `[ChunkSection::new(); 16]` syntax, - // so I had to do this. - let sections = [ - None, None, None, None, None, None, None, None, None, None, None, None, None, None, - None, None, - ]; - - Self { - location: ChunkPosition::new(0, 0), - modified: true, - sections, - biomes: [Biome::Plains; SECTION_WIDTH * SECTION_WIDTH], - heightmaps: vec![HeightMap::default(); CHUNK_WIDTH * CHUNK_WIDTH].into_boxed_slice(), - } - } -} - -impl Chunk { - /// Creates a new empty chunk - /// with the specified location. - pub fn new(location: ChunkPosition) -> Self { - Self { - location, - modified: true, - ..Default::default() - } - } - - /// Creates a new empty chunk - /// with the specified location, - /// and filling its biomes with - /// the provided `default_biome`. - pub fn new_with_default_biome(location: ChunkPosition, default_biome: Biome) -> Self { - Self { - location, - modified: true, - biomes: [default_biome; SECTION_WIDTH * SECTION_HEIGHT], - ..Default::default() - } - } - - /// Gets the block at the specified - /// position in this chunk. The position - /// is in the chunk's local coordinate - /// space. - /// - /// The specified coordinates must be inside - /// this chunk, so the function will panic - /// if `x >= 16 || y >= 256 || z >= 16`. - pub fn block_at(&self, x: usize, y: usize, z: usize) -> BlockId { - Self::check_coords(x, y, z); - let chunk_section = &self.sections[(y / 16) as usize]; - match chunk_section { - Some(section) => section.block_at(x, y % 16, z), - None => BlockId::air(), - } - } - - /// Sets the block at the specified - /// position in this chunk. The position - /// is in the chunk's local coordinate - /// space. - /// - /// The specified coordinates must be inside - /// this chunk, so the function will panic - /// if `x >= 16 || y >= 256 || z >= 16`. - pub fn set_block_at(&mut self, x: usize, y: usize, z: usize, block: BlockId) { - Self::check_coords(x, y, z); - self.modified = true; - - let chunk_section = &mut self.sections[y / 16]; - - let section; - if let Some(sec) = chunk_section { - section = sec; - } else { - // The section is empty - create it - if block == BlockId::air() { - return; // Nothing to do - section already empty - } - - let new_section = ChunkSection::default(); - self.set_section_at(y / 16, Some(new_section)); - section = self.section_mut(y / 16).unwrap(); - } - - let old_block = section.block_at(x, y % 16, z); - section.set_block_at(x, y % 16, z, block); - - self.update_heightmap(x, y, z, old_block, block); - } - - pub fn heightmap(&self, x: usize, z: usize) -> &HeightMap { - Self::check_coords(x, 0, z); - &self.heightmaps[x + z * CHUNK_WIDTH] - } - - pub fn heightmap_mut(&mut self, x: usize, z: usize) -> &mut HeightMap { - Self::check_coords(x, 0, z); - &mut self.heightmaps[x + z * CHUNK_WIDTH] - } - - pub fn heightmaps(&self) -> &[HeightMap] { - &self.heightmaps - } - - fn update_heightmap( - &mut self, - x: usize, - y: usize, - z: usize, - old_block: BlockId, - new_block: BlockId, - ) -> HeightMapMask { - let mut mask: HeightMapMask = HeightMapMask::empty(); - let y = y as u16; - - struct HeightMapCheckContext( - &'static dyn Fn(BlockId) -> bool, - HeightMapMask, - &'static dyn Fn(&HeightMap) -> u16, - &'static dyn Fn(&mut HeightMap, u16), - ); - - let checks: [HeightMapCheckContext; 5] = [ - // Light blocking - HeightMapCheckContext( - &|block| block.is_opaque(), - HeightMapMask::LIGHT_BLOCKING, - &|map| map.light_blocking(), - &|map, value| map.set_light_blocking(value), - ), - // Motion blocking - HeightMapCheckContext( - &|block| block.is_solid() || block.is_fluid(), - HeightMapMask::MOTION_BLOCKING, - &|map| map.motion_blocking(), - &|map, value| map.set_motion_blocking(value), - ), - // Motion blocking no leaves - HeightMapCheckContext( - &|block| { - (block.is_solid() || block.is_fluid()) - && block.simplified_kind() != SimplifiedBlockKind::Leaves - }, - HeightMapMask::MOTION_BLOCKING_NO_LEAVES, - &|map| map.motion_blocking_no_leaves(), - &|map, value| map.set_motion_blocking_no_leaves(value), - ), - // Ocean floor - HeightMapCheckContext( - &|block| block.is_solid(), - HeightMapMask::OCEAN_FLOOR, - &|map| map.ocean_floor(), - &|map, value| map.set_ocean_floor(value), - ), - // World surface - HeightMapCheckContext( - &|block| !block.is_air(), - HeightMapMask::WORLD_SURFACE, - &|map| map.world_surface(), - &|map, value| map.set_world_surface(value), - ), - ]; - - for HeightMapCheckContext(valid_block, check_mask, map_getter, map_setter) in checks.iter() - { - // Check heightmap type - if valid_block(old_block) && map_getter(self.heightmap_mut(x, z)) == y { - // This was the highest block - self.heightmap_mut(x, z).set_light_blocking(0); - - for i in (0..y).rev() { - let block = self.block_at(x, i as usize, z); - - if valid_block(block) { - map_setter(self.heightmap_mut(x, z), i + 1); - break; - } - } - mask |= *check_mask; - } - if valid_block(new_block) && map_getter(self.heightmap_mut(x, z)) < y { - // This is the new highest block - map_setter(self.heightmap_mut(x, z), y); - mask |= *check_mask; - } - } - - mask - } - - /// Recalculate the heightmap for the chunk - pub fn recalculate_heightmap(&mut self) { - // This function can be optimized, instead of - // fetching heightmap every time, and sections - for x in 0..CHUNK_WIDTH { - for z in 0..CHUNK_WIDTH { - let mut mask: HeightMapMask = HeightMapMask::empty(); - for y in (0..CHUNK_HEIGHT).rev() { - if mask.is_all() { - break; - } - let block = self.block_at(x, y, z); - mask |= self.update_heightmap(x, y, z, BlockId::air(), block); - } - } - } - } - - pub fn sky_light_at(&self, x: usize, y: usize, z: usize) -> u8 { - Self::check_coords(x, y, z); - let chunk_section = self.section_for_y(y); - match chunk_section { - Some(chunk_section) => chunk_section.sky_light_at(x, y % 16, z), - None => 0, - } - } - - pub fn block_light_at(&self, x: usize, y: usize, z: usize) -> u8 { - Self::check_coords(x, y, z); - let chunk_section = self.section_for_y(y); - match chunk_section { - Some(chunk_section) => chunk_section.block_light_at(x, y % 16, z), - None => 0, - } - } - - pub fn set_sky_light_at(&mut self, x: usize, y: usize, z: usize, value: u8) { - Self::check_coords(x, y, z); - let chunk_section = self.section_for_y_mut(y); - chunk_section.set_sky_light_at(x, y % 16, z, value); - } - - pub fn set_block_light_at(&mut self, x: usize, y: usize, z: usize, value: u8) { - Self::check_coords(x, y, z); - let chunk_section = self.section_for_y_mut(y); - chunk_section.set_block_light_at(x, y % 16, z, value); - } - - fn section_for_y(&self, y: usize) -> &Option { - &self.sections[y / 16] - } - - fn section_for_y_mut(&mut self, y: usize) -> &mut ChunkSection { - self.sections[y / 16].get_or_insert_with(ChunkSection::default) - } - - fn check_coords(x: usize, y: usize, z: usize) { - assert!(x < CHUNK_WIDTH); - assert!(y < CHUNK_HEIGHT); - assert!(z < CHUNK_WIDTH); - } - - /// Returns a slice of the 16 - /// chunk sections in the chunk. - pub fn sections(&self) -> Vec> { - self.sections.iter().map(|sec| sec.as_ref()).collect() - } - - /// Returns a mutable slice of the 16 sections - /// in this chunk. - pub fn sections_mut(&mut self) -> Vec> { - self.modified = true; - self.sections.iter_mut().map(|sec| sec.as_mut()).collect() - } - - /// Returns the position in chunk coordinates - /// of this chunk. - pub fn position(&self) -> ChunkPosition { - self.location - } - - /// Sets the position of this chunk. - pub fn set_position(&mut self, pos: ChunkPosition) { - self.location = pos - } - - /// Returns a reference to the chunk section at the given - /// Y offset. The Y offset must be between 0 and 15, inclusive; - /// each Y offset value corresponds to 16 blocks vertically. - /// - /// If this function returns `None`, the section is assumed - /// to be empty, meaning it consists only of air. - pub fn section(&self, index: usize) -> Option<&ChunkSection> { - assert!(index < NUM_SECTIONS); - self.sections[index].as_ref() - } - - /// Returns a mutable reference to the chunk section at the given - /// Y offset. The Y offset must be between 0 and 15, inclusive; - /// each Y offset value corresponds to 16 blocks vertically. - /// - /// If this function returns `None`, the section is assumed - /// to be empty, meaning it consists only of air. - pub fn section_mut(&mut self, index: usize) -> Option<&mut ChunkSection> { - assert!(index < NUM_SECTIONS); - self.modified = true; - self.sections[index].as_mut() - } - - /// Sets the section at the given section index. - pub fn set_section_at(&mut self, index: usize, section: Option) { - assert!(index < NUM_SECTIONS); - self.sections[index] = section; - self.modified = true; - } - - /// Optimizes each section in this chunk. - /// - /// Returns the number of sections which were actually - /// optimized - sections which have not been - /// modified since the last time they were optimized - /// are not optimized. - pub fn optimize(&mut self) -> u32 { - let modified = self.modified; - let mut count = 0; - let mut to_remove = vec![]; - for (i, s) in self.sections.iter_mut().enumerate() { - if let Some(section) = s { - if section.optimize() { - // Section was optimized - increment count - count += 1; - } - - if section.empty() { - to_remove.push(i); - } - } - } - - for i in to_remove { - self.set_section_at(i, None); - } - - self.modified = modified; - - count - } - - /// Returns the biomes of this chunk. - pub fn biomes(&self) -> &[Biome] { - &self.biomes - } - - /// Returns a mutable reference to the biomes of this chunk. - pub fn biomes_mut(&mut self) -> &mut [Biome] { - self.modified = true; - &mut self.biomes - } - - /// Gets the biome for the specified column. - /// - /// # Panics - /// Panics if `x < 16` or `z < 16`. - pub fn biome_at(&self, x: usize, z: usize) -> Biome { - let index = Self::biome_index(x, z); - self.biomes[index] - } - - /// Sets the biome for the specified column. - /// - /// # Panics - /// Panics if `x < 16` or `z < 16`. - pub fn set_biome_at(&mut self, x: usize, z: usize, biome: Biome) { - let index = Self::biome_index(x, z); - self.modified = true; - self.biomes[index] = biome; - } - - /// Checks whether this chunk has been modified since the last - /// call to this function. - pub fn check_modified(&mut self) -> bool { - let res = self.modified; - self.modified = false; - res - } - - /// Marks this chunk as modified. - /// See `check_modified`. - pub fn set_modified(&mut self) { - self.modified = true; - } - - fn biome_index(x: usize, z: usize) -> usize { - assert!(x < 16); - assert!(z < 16); - - (z << 4) | x - } -} - -/// A chunk section consisting of a 16x16x16 -/// cube of blocks. -#[derive(Clone, Debug)] -pub struct ChunkSection { - /// The block state data for this chunk section. - data: BitArray, - /// This section's palette. `None` if using the global palette. - /// The palette should always remain sorted so that a binary - /// search can be performed on it. - palette: Option>, - /// The number of solid blocks in this chunk, i.e. those - /// that are not air. This value is used to figure out when - /// the section becomes empty. - solid_block_count: u16, - - block_light: BitArray, - sky_light: BitArray, - - /// A section is considered dirty when it has been - /// modified since the last time it was optimized. - dirty: bool, -} - -impl ChunkSection { - /// Creates a new, empty `ChunkSection`. - pub fn new( - mut data: BitArray, - mut palette: Option>, - block_light: BitArray, - sky_light: BitArray, - ) -> Self { - // Correct palette if not using the global palette - if let Some(palette) = palette.as_mut() { - Self::correct_data_and_palette(&mut data, palette); - } - - // Count solid blocks - let mut solid_block_count = 0; - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - if data.get(block_index(x, y, z)) != 0 { - solid_block_count += 1; - } - } - } - } - - Self { - data, - palette, - solid_block_count, - dirty: false, - block_light, - sky_light, - } - } - - /// Corrects a given raw palette and data array. - /// - /// Since chunk data stored by external sources - /// (e.g. Vanilla) might not require a sorted palette - /// like Feather does, we need to sort the palette and - /// correct data in the array when reading from external - /// sources. - /// - /// The correction is done in-place. - fn correct_data_and_palette(data: &mut BitArray, palette: &mut Vec) { - let original_palette = palette.clone(); // Palette without sorting guarantees - - palette.sort_unstable(); - - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - // Replace index into palette of each block with - // new index into the sorted palette. - let block_index = block_index(x, y, z); - let old_index = data.get(block_index); - let new_index = palette - .binary_search(&original_palette[old_index as usize]) - .unwrap(); - data.set(block_index, new_index as u64); - } - } - } - } - - /// Returns whether this chunk section is empty. - pub fn empty(&self) -> bool { - self.solid_block_count == 0 - } - - /// Retrieves the block at the given position in this chunk section. - /// The position is local to this section. - pub fn block_at(&self, x: usize, y: usize, z: usize) -> BlockId { - let index = block_index(x, y, z); - let block_id = self.data.get(index); - - match &self.palette { - Some(palette) => palette[block_id as usize], - None => BlockId::from_vanilla_id(block_id as u16), - } - } - - /// Sets the block at the given position in this chunk section. - /// The position is local to this section. - pub fn set_block_at(&mut self, x: usize, y: usize, z: usize, block: BlockId) { - self.dirty = true; - - let index = block_index(x, y, z); - - // The value that will be put into the data array. - let mut paletted_index; - if let Some(palette) = self.palette.as_mut() { - // Retrieve the block index from the palette. - - // If necessary, add the block to the palette. - match palette.binary_search(&block) { - Ok(index) => paletted_index = index, - Err(insertion_index) => { - palette.insert(insertion_index, block); - paletted_index = insertion_index; - - // Resize if necessary - if needed_bits((palette.len() - 1) as u64) > self.data.bits_per_value { - let new_bits_per_value = self.data.bits_per_value + 1; - if new_bits_per_value <= MAX_BITS_PER_BLOCK { - self.data = self.data.resize_to(self.data.bits_per_value + 1).unwrap(); - paletted_index = insertion_index; - } else { - // Switch to the global palette - let mut new_data = BitArray::new(GLOBAL_BITS_PER_BLOCK, SECTION_VOLUME); - for _x in 0..16 { - for _y in 0..16 { - for _z in 0..16 { - let block = self.block_at(_x, _y, _z); - new_data.set( - block_index(_x, _y, _z), - block.vanilla_id() as u64, - ); - } - } - } - - self.palette = None; - paletted_index = block.vanilla_id() as usize; - self.data = new_data; - } - } - - // Correct data, since palette entries after - // the one which was inserted will be offsetted - // by one. - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - let index = block_index(x, y, z); - - let entry = self.data.get(index); - if entry >= insertion_index as u64 { - self.data.set(index, entry + 1); - } - } - } - } - } - } - } else { - // Use the global palette. - paletted_index = block.vanilla_id() as usize; - } - - let old_block = self.block_at(x, y, z); - if block.is_air() && !old_block.is_air() { - self.solid_block_count -= 1; - } else if !block.is_air() && old_block.is_air() { - self.solid_block_count += 1; - } - - self.data.set(index, paletted_index as u64); - debug_assert_eq!(self.block_at(x, y, z), block); - } - - /// Optimizes this chunk section, reducing the bits - /// per block value as much as possible and removing unused - /// entries from the palette. - /// - /// This function only optimizes the chunk if it is dirt, - /// i.e. if it has been modified since the last time - /// it was optimized. The returned value is `true` when - /// the chunk was optimized and `false` when it wasn't. - pub fn optimize(&mut self) -> bool { - // Only optimize the chunk if it has been modified. - if !self.dirty { - return false; - } - - self.dirty = false; - - // Replace palette with new one. - let mut new_palette = vec![]; - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - let block = self.block_at(x, y, z); - match new_palette.binary_search(&block) { - Ok(_) => (), - Err(insert_index) => { - new_palette.insert(insert_index, block); - } - } - } - } - } - - // Recalculate all block IDs to match with the new palette. - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - let block = self.block_at(x, y, z); - self.data.set( - block_index(x, y, z), - new_palette.binary_search(&block).unwrap() as u64, - ); - } - } - } - - self.palette = Some(new_palette); - - // Recalculate bits per block value. - let mut new_bits_per_block = needed_bits(self.palette.as_ref().unwrap().len() as u64); - if new_bits_per_block > MAX_BITS_PER_BLOCK { - self.palette = None; - } else { - if new_bits_per_block < MIN_BITS_PER_BLOCK { - new_bits_per_block = MIN_BITS_PER_BLOCK; - } - self.data = self.data.resize_to(new_bits_per_block).unwrap(); - } - - true // Chunk was optimized - } - - /// If the global palette is in use, convert it to a section palette. - /// This is used for chunk saving. - pub fn convert_palette_to_section(&mut self) { - if self.palette.is_some() { - // Nothing to do: section palette already in use. - return; - } - - type TuplePos = (usize, usize, usize); - let mut blocks: AHashMap> = AHashMap::with_capacity(512); - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - blocks - .entry(self.block_at(x, y, z)) - .or_default() - .push((x, y, z)); - } - } - } - - // Create a palette based on the blocks in the chunk. - // We also have to modify the data array based on the new palette. - let mut palette = Vec::with_capacity(512); - for (block, positions) in blocks.into_iter() { - palette.push(block); - - for (x, y, z) in positions { - let index = block_index(x, y, z); - self.data.set(index, (palette.len() - 1) as u64); - } - } - - self.palette = Some(palette); - } - - /// Returns the internal data array for this section. - pub fn data(&self) -> &BitArray { - &self.data - } - - /// Returns the palette for this section. - pub fn palette(&self) -> Option<&[BlockId]> { - self.palette.as_deref() - } - - /// Returns the number of bits used to store each block. - pub fn bits_per_block(&self) -> u8 { - self.data.bits_per_value - } - - pub fn sky_light(&self) -> &BitArray { - &self.sky_light - } - - pub fn block_light(&self) -> &BitArray { - &self.block_light - } - - pub fn sky_light_mut(&mut self) -> &mut BitArray { - &mut self.sky_light - } - - pub fn block_light_mut(&mut self) -> &mut BitArray { - &mut self.block_light - } - - pub fn sky_light_at(&self, x: usize, y: usize, z: usize) -> u8 { - let index = block_index(x, y, z); - self.sky_light.get(index) as u8 - } - - pub fn block_light_at(&self, x: usize, y: usize, z: usize) -> u8 { - let index = block_index(x, y, z); - self.block_light.get(index) as u8 - } - - pub fn set_sky_light_at(&mut self, x: usize, y: usize, z: usize, value: u8) { - assert!(value < 16, "light level cannot exceed 15"); - let index = block_index(x, y, z); - self.sky_light.set(index, u64::from(value)); - } - - pub fn set_block_light_at(&mut self, x: usize, y: usize, z: usize, value: u8) { - assert!(value < 16, "light level cannot exceed 15"); - let index = block_index(x, y, z); - self.block_light.set(index, u64::from(value)); - } -} - -impl Default for ChunkSection { - fn default() -> Self { - let air = BlockId::air(); - Self { - data: BitArray::new(4, SECTION_VOLUME), - palette: Some(vec![air]), - solid_block_count: 0, - dirty: false, - block_light: BitArray::new(4, SECTION_VOLUME), - sky_light: BitArray::new(4, SECTION_VOLUME), - } - } -} - -/// Returns the index into a block state array -/// for the given block position. -fn block_index(x: usize, y: usize, z: usize) -> usize { - assert!(x < 16); - assert!(y < 16); - assert!(z < 16); - (y << 8) | (z << 4) | x -} - -/// A "bit array." This struct manages -/// an internal array of `u64` to which -/// values of arbitrary bit length can be written. -#[derive(Clone, Debug)] -pub struct BitArray { - /// The internal data array containing all values - data: Vec, - /// The capacity, in values, of this array - capacity: usize, - /// The number of bits used to represent each value - bits_per_value: u8, - /// The maximum value represented by an entry in this array - value_mask: u64, -} - -impl BitArray { - /// Creates a new `BitArray` with the given - /// bits per value and capacity. The array - /// will be initialized with zeroes. - pub fn new(bits_per_value: u8, capacity: usize) -> Self { - assert!( - bits_per_value <= 64, - "Bits per value cannot be more than 64" - ); - assert!(bits_per_value > 0, "Bits per value must be positive"); - let data = { - let len = (((capacity * (bits_per_value as usize)) as f64) / 64.0).ceil() as usize; - vec![0u64; len] - }; - - let value_mask = (1 << (bits_per_value as u64)) - 1; - - Self { - data, - capacity, - bits_per_value, - value_mask, - } - } - - /// Creates a new `BitArray` based on the given raw parts. - pub fn from_raw(data: Vec, bits_per_value: u8, capacity: usize) -> Self { - assert!( - bits_per_value <= 64, - "Bits per value cannot be more than 64" - ); - assert!(bits_per_value > 0, "Bits per value must be positive"); - - let value_mask = (1 << (bits_per_value as u64)) - 1; - - Self { - data, - capacity, - bits_per_value, - value_mask, - } - } - - /// Returns the highest possible value represented - /// by and entry in this `BitArray`. - pub fn highest_possible_value(&self) -> u64 { - self.value_mask - } - - /// Returns the value at the given location in this `BitArray`. - pub fn get(&self, index: usize) -> u64 { - assert!(index < self.capacity, "Index out of bounds"); - - let bit_index = index * (self.bits_per_value as usize); - - let start_long_index = bit_index / 64; - - let start_long = self.data[start_long_index]; - - let index_in_start_long = (bit_index % 64) as u64; - - let mut result = start_long >> index_in_start_long; - - let end_bit_offset = index_in_start_long + self.bits_per_value as u64; - - if end_bit_offset > 64 { - // Value stretches across multiple longs - let end_long = self.data[start_long_index + 1]; - result |= end_long << (64 - index_in_start_long); - } - - result & self.value_mask - } - - /// Sets the value at the given index into this `BitArray` - pub fn set(&mut self, index: usize, val: u64) { - assert!(index < self.capacity, "Index out of bounds"); - assert!( - val <= self.value_mask, - "Value does not fit into bits_per_value" - ); - - let bit_index = index * (self.bits_per_value as usize); - - let start_long_index = bit_index / 64; - - let index_in_start_long = (bit_index % 64) as u64; - - // Clear bits of this value first - self.data[start_long_index] = (self.data[start_long_index] - & !(self.value_mask << index_in_start_long)) - | ((val & self.value_mask) << index_in_start_long); - - let end_bit_offset = index_in_start_long + self.bits_per_value as u64; - if end_bit_offset > 64 { - // Value stretches across multiple longs - self.data[start_long_index + 1] = (self.data[start_long_index + 1] - & !((1 << (end_bit_offset - 64)) - 1)) - | val >> (64 - index_in_start_long); - } - - debug_assert_eq!(self.get(index), val); - } - - /// Produces a `BitArray` with the same values - /// as this `BitArray` but with a new bits per value. - /// If a value in this `BitArray` cannot be represented - /// by the new bits per value, `Err` is returned. - pub fn resize_to(&self, new_bits_per_value: u8) -> Result { - assert!( - new_bits_per_value <= 64, - "Bits per value cannot be more than 64" - ); - - let mut new_arr = BitArray::new(new_bits_per_value, self.capacity); - - for i in 0..self.capacity { - let val = self.get(i); - if needed_bits(val) > new_bits_per_value { - return Err(()); - } - - new_arr.set(i, val); - debug_assert_eq!(new_arr.get(i), val); - } - - Ok(new_arr) - } - - /// Returns the internal array. - pub fn inner(&self) -> &Vec { - &self.data - } -} - -/// Returns the number of bits -/// needed to represent the given value. -fn needed_bits(mut val: u64) -> u8 { - let mut result = 0; - loop { - val >>= 1; - result += 1; - - if val == 0 { - break; - } - } - - result -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn chunk_new() { - let pos = ChunkPosition::new(0, 0); - let chunk = Chunk::new(pos); - - // Confirm that chunk is empty - for x in 0..16 { - assert!(chunk.section(x).is_none()); - assert!(chunk.section(x).is_none()); - } - - assert_eq!(chunk.position(), pos); - } - - #[test] - fn chunk_new_with_default_biome() { - let pos = ChunkPosition::new(0, 0); - let chunk = Chunk::new_with_default_biome(pos, Biome::Mountains); - - // Confirm that chunk is empty - for x in 0..16 { - assert!(chunk.section(x).is_none()); - assert!(chunk.section(x).is_none()); - } - - assert_eq!(chunk.position(), pos); - - // Confirm that biomes are set - for x in 0..16 { - for z in 0..16 { - assert_eq!(chunk.biome_at(x, z), Biome::Mountains); - } - } - } - - #[test] - fn set_block_simple() { - let pos = ChunkPosition::new(0, 0); - let mut chunk = Chunk::new(pos); - - chunk.set_block_at(0, 0, 0, BlockId::andesite()); - assert_eq!(chunk.block_at(0, 0, 0), BlockId::andesite()); - assert!(chunk.section(0).is_some()); - } - - #[test] - fn fill_chunk() { - let pos = ChunkPosition::new(0, 0); - let mut chunk = Chunk::new(pos); - - let block = BlockId::stone(); - - for x in 0..16 { - for y in 0..256 { - for z in 0..16 { - chunk.set_block_at(x, y, z, block); - assert_eq!(chunk.block_at(x, y, z), block); - } - } - } - - // Check again, just to be sure - for x in 0..16 { - for y in 0..256 { - for z in 0..16 { - assert_eq!(chunk.block_at(x, y, z), block); - } - } - } - } - - #[test] - fn spray_chunk() { - // This test fills each section of the chunk - // with the blocks with IDs corresponding - // to 0-4095 in order, testing that - // resizing, etc. works correctly. - - let pos = ChunkPosition::new(0, 0); - let mut chunk = Chunk::new(pos); - - for section in chunk.sections() { - assert!(section.is_none()); - } - - for section in 0..16 { - let mut counter = 0; - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - let block = BlockId::from_vanilla_id(counter); - chunk.set_block_at(x, (section * 16) + y, z, block); - assert_eq!(chunk.block_at(x, (section * 16) + y, z), block); - if counter != 0 { - assert!( - chunk.section(section).is_some(), - "Section {} failed", - section - ); - } - counter += 1; - } - } - } - } - - // Go through again to be sure - for section in 0..16 { - assert!(chunk.section(section).is_some()); - let mut counter = 0; - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - let block = BlockId::from_vanilla_id(counter); - assert_eq!(chunk.block_at(x, (section * 16) + y, z), block); - assert!(chunk.section(section).is_some()); - counter += 1; - } - } - } - } - - // Now, empty the chunk, call optimize(), and ensure - // that the sections become empty. - for x in 0..16 { - for y in 0..256 { - for z in 0..16 { - chunk.set_block_at(x, y, z, BlockId::air()); - } - } - } - - chunk.optimize(); - - for section in chunk.sections() { - assert!(section.is_none()); - } - } - - #[test] - fn section_from_data_and_palette() { - let pos = ChunkPosition::new(0, 0); - let mut chunk = Chunk::new(pos); - - let mut data = BitArray::new(5, 4096); - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - data.set(block_index(x, y, z), 0); - } - } - } - - let palette = vec![BlockId::stone()]; - let section = ChunkSection::new( - data, - Some(palette), - BitArray::new(4, SECTION_VOLUME), - BitArray::new(4, SECTION_VOLUME), - ); - chunk.set_section_at(0, Some(section)); - - for x in 0..16 { - for y in 0..16 { - for z in 0..16 { - assert_eq!(chunk.block_at(x, y, z), BlockId::stone()); - } - } - } - } - - #[test] - fn bit_array() { - let mut barr = BitArray::new(5, 4096); - assert_eq!(barr.highest_possible_value(), 31); - - for i in 0..4096 { - barr.set(i, 8); - assert_eq!(barr.get(i), 8); - } - - for i in 0..4096 { - assert_eq!(barr.get(i), 8); - } - - let resized = barr.resize_to(8).unwrap(); - for i in 0..4096 { - assert_eq!(resized.get(i), 8); - } - - let resized = barr.resize_to(4).unwrap(); - for i in 0..4096 { - assert_eq!(resized.get(i), 8); - } - } - - #[test] - fn bit_array_resize_fail() { - let mut barr = BitArray::new(5, 4096); - - for i in 0..4096 { - barr.set(i, 31); - } - - assert!(barr.resize_to(4).is_err()); - } - - #[test] - fn bit_array_big_test() { - let mut barr = BitArray::new(14, 4096); - - for i in 0..4096 { - barr.set(i, i as u64); - assert_eq!(barr.get(i), i as u64); - if i != 4095 { - assert_eq!(barr.get(i + 1), 0); - } - if i != 0 { - assert_eq!(barr.get(i - 1), (i - 1) as u64); - } - } - - for i in 0..4096 { - assert_eq!(barr.get(i), i as u64); - } - } - - #[test] - fn bit_array_resize() { - let mut barr = BitArray::new(12, 4096); - assert_eq!(barr.bits_per_value, 12); - - for i in 0..4096 { - barr.set(i, i as u64); - assert_eq!(barr.get(i), i as u64); - } - - let mut barr = barr.resize_to(13).unwrap(); - assert_eq!(barr.bits_per_value, 13); - - for i in 0..4096 { - assert_eq!(barr.get(i), i as u64); - barr.set(i, (i + 1) as u64); - assert_eq!(barr.get(i), (i + 1) as u64); - } - - let mut barr = barr.resize_to(14).unwrap(); - assert_eq!(barr.bits_per_value, 14); - - for i in 0..4096 { - assert_eq!(barr.get(i), (i + 1) as u64); - barr.set(i, i as u64); - assert_eq!(barr.get(i), i as u64); - } - - for i in 0..4096 { - assert_eq!(barr.get(i), i as u64); - } - } - - #[test] - fn test_needed_bits() { - assert_eq!(needed_bits(31), 5); - assert_eq!(needed_bits(255), 8); - assert_eq!(needed_bits(256), 9); - assert_eq!(needed_bits(1), 1); - } - - #[test] - fn test_block_index() { - assert_eq!(block_index(0, 1, 0), 256); - assert_eq!(block_index(1, 1, 1), 256 + 16 + 1); - } - - #[test] - fn test_correct_data_and_palette() { - let mut data = BitArray::new(4, 4096); - let mut palette = vec![ - BlockId::redstone_wire(), - BlockId::stone(), - BlockId::stone_brick_slab(), - BlockId::sea_pickle(), - BlockId::acacia_button(), - ]; - ChunkSection::correct_data_and_palette(&mut data, &mut palette); - assert_eq!(palette.len(), 5); - - let mut sorted = palette.clone(); - sorted.sort(); - assert_eq!(sorted, palette); - } - - #[test] - fn test_palette_insertion_in_middle() { - let mut chunk = ChunkSection::default(); - - chunk.set_block_at(0, 0, 0, BlockId::cobblestone()); - chunk.set_block_at(0, 1, 0, BlockId::stone()); - - assert_eq!(chunk.block_at(0, 0, 0), BlockId::cobblestone()); - assert_eq!(chunk.block_at(0, 1, 0), BlockId::stone()); - } - - #[test] - fn test_biomes() { - let mut chunk = Chunk::default(); - - for x in 0..SECTION_WIDTH { - for z in 0..SECTION_WIDTH { - assert_eq!(chunk.biome_at(x, z), Biome::Plains); - chunk.set_biome_at(x, z, Biome::BirchForest); - assert_eq!(chunk.biome_at(x, z), Biome::BirchForest); - } - } - } - - #[test] - fn test_modified() { - let mut chunk = Chunk::default(); - assert!(chunk.check_modified()); - assert!(!chunk.check_modified()); - - chunk.set_block_at(0, 0, 0, BlockId::stone()); - assert!(chunk.check_modified()); - assert!(!chunk.check_modified()); - } - - #[test] - fn test_convert_section_to_palette() { - let mut chunk = Chunk::default(); - - let mut counter = 0; - for x in 0..SECTION_WIDTH { - for y in 0..SECTION_HEIGHT { - for z in 0..SECTION_WIDTH { - chunk.set_block_at(x, y, z, BlockId::from_vanilla_id(counter)); - - counter += 1; - } - } - } - - let section = chunk.section_mut(0).unwrap(); - section.convert_palette_to_section(); - - assert_eq!(section.palette().unwrap().len(), counter as usize); - - // Ensure that data array still represents the same data - counter = 0; - for x in 0..SECTION_WIDTH { - for y in 0..SECTION_HEIGHT { - for z in 0..SECTION_WIDTH { - assert_eq!(chunk.block_at(x, y, z), BlockId::from_vanilla_id(counter)); - counter += 1; - } - } - } - } - - #[test] - fn test_light() { - let mut chunk = Chunk::default(); - - for x in 0..SECTION_WIDTH { - for y in 0..SECTION_HEIGHT { - for z in 0..SECTION_WIDTH { - chunk.set_block_light_at(x, y, z, 10); - chunk.set_sky_light_at(x, y, z, 8); - assert_eq!(chunk.block_light_at(x, y, z), 10); - assert_eq!(chunk.sky_light_at(x, y, z), 8); - } - } - } - } -} diff --git a/core/chunk_map/Cargo.toml b/core/chunk_map/Cargo.toml deleted file mode 100644 index 9dcb45fa1..000000000 --- a/core/chunk_map/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "feather-chunk-map" -version = "0.6.0" -authors = ["caelunshun "] -edition = "2018" - -[dependencies] -feather-chunk = { path = "../chunk" } -feather-util = { path = "../util" } -feather-blocks = { path = "../blocks" } - -hashbrown = { version ="0.7", features = ["rayon"] } -parking_lot = "0.10" diff --git a/core/chunk_map/src/lib.rs b/core/chunk_map/src/lib.rs deleted file mode 100644 index fa24f52a4..000000000 --- a/core/chunk_map/src/lib.rs +++ /dev/null @@ -1,119 +0,0 @@ -use feather_blocks::BlockId; -use feather_chunk::{Chunk, CHUNK_HEIGHT}; -use feather_util::{BlockPosition, ChunkPosition}; -use hashbrown::HashMap; -use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; -use std::sync::Arc; - -pub type ChunkMapInner = HashMap>>; - -/// The chunk map. -/// -/// This struct stores all the chunks on the server, -/// so it allows access to blocks and lighting data. -/// -/// Chunks are internally wrapped in `Arc`, -/// allowing multiple systems to access different parts -/// of the world in parallel. Mutable access to this -/// type is only required for inserting and removing -/// chunks. -#[derive(Default)] -pub struct ChunkMap(pub ChunkMapInner); - -impl ChunkMap { - /// Creates a new chunk map with no chunks. - pub fn new() -> Self { - Self::default() - } - - /// Retrieves a handle to the chunk at the given - /// position, or `None` if it is not loaded. - pub fn chunk_at(&self, pos: ChunkPosition) -> Option> { - self.0.get(&pos).map(|lock| lock.read()) - } - - /// Retrieves a handle to the chunk at the given - /// position, or `None` if it is not loaded. - pub fn chunk_at_mut(&self, pos: ChunkPosition) -> Option> { - self.0.get(&pos).map(|lock| lock.write()) - } - - /// Returns an `Arc>` at the given position. - pub fn chunk_handle_at(&self, pos: ChunkPosition) -> Option>> { - self.0.get(&pos).map(Arc::clone) - } - - /// Retrieves the block at the specified - /// location. If the chunk in which the block - /// exists is not loaded or the coordinates - /// are out of bounds, `None` is returned. - pub fn block_at(&self, pos: BlockPosition) -> Option { - check_coords(pos)?; - let (x, y, z) = chunk_relative_pos(pos); - self.chunk_at(pos.into()) - .map(|chunk| chunk.block_at(x, y, z)) - } - - /// Sets the block at the given position. - /// - /// Returns `true` if the block was set, or `false` - /// if its chunk was not loaded or the coordinates - /// are out of bounds and thus no operation - /// was performed. - pub fn set_block_at(&self, pos: BlockPosition, block: BlockId) -> bool { - if check_coords(pos).is_none() { - return false; - } - let (x, y, z) = chunk_relative_pos(pos); - - self.chunk_at_mut(pos.into()) - .map(|mut chunk| chunk.set_block_at(x, y, z, block)) - .is_some() - } - - /// Returns an iterator over chunks. - pub fn iter_chunks(&self) -> impl IntoIterator>> { - self.0.values() - } - - /// Inserts a new chunk into the chunk map. - pub fn insert(&mut self, chunk: Chunk) { - self.0 - .insert(chunk.position(), Arc::new(RwLock::new(chunk))); - } - - /// Removes the chunk at the given position, returning `true` if it existed. - pub fn remove(&mut self, pos: ChunkPosition) -> bool { - self.0.remove(&pos).is_some() - } -} - -fn check_coords(pos: BlockPosition) -> Option<()> { - if pos.y >= 0 && pos.y < CHUNK_HEIGHT as i32 { - Some(()) - } else { - None - } -} - -pub fn chunk_relative_pos(block_pos: BlockPosition) -> (usize, usize, usize) { - ( - block_pos.x as usize & 0xf, - block_pos.y as usize, - block_pos.z as usize & 0xf, - ) -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn chunk_map_out_of_bounds() { - let mut map = ChunkMap::new(); - map.insert(Chunk::new(ChunkPosition::new(0, 0))); - - assert!(map.block_at(BlockPosition::new(0, -1, 0)).is_none()); - assert!(map.block_at(BlockPosition::new(0, 0, 0)).is_some()); - } -} diff --git a/core/entity_metadata/Cargo.toml b/core/entity_metadata/Cargo.toml deleted file mode 100644 index e4ea25f7b..000000000 --- a/core/entity_metadata/Cargo.toml +++ /dev/null @@ -1,13 +0,0 @@ -[package] -name = "feather-entity-metadata" -version = "0.6.0" -authors = ["caelunshun "] -edition = "2018" - -[dependencies] -feather-util = { path = "../util" } -feather-inventory = { path = "../inventory" } - -bitflags = "1.2" -uuid = "0.8" -hematite-nbt = "0.4" diff --git a/core/network/Cargo.toml b/core/network/Cargo.toml deleted file mode 100644 index 2442e2e0c..000000000 --- a/core/network/Cargo.toml +++ /dev/null @@ -1,38 +0,0 @@ -[package] -name = "feather-network" -version = "0.6.0" -authors = ["caelunshun "] -edition = "2018" - -[dependencies] -feather-anvil = { path = "../anvil" } -feather-items = { path = "../items" } -feather-inventory = { path = "../inventory" } -feather-entity-metadata = { path = "../entity_metadata" } -feather-codegen = { path = "../../codegen" } -feather-util = { path = "../util" } -feather-blocks = { path = "../blocks" } -feather-chunk = { path = "../chunk" } -feather-misc = { path = "../misc" } - -uuid = "0.8" -serde = { version = "1.0", features = ["derive"] } -anyhow = "1.0" -thiserror = "1.0" -hematite-nbt = "0.4" -log = "0.4" -strum = "0.18" -strum_macros = "0.18" -num-traits = "0.2" -num-derive = "0.3" -ahash = "0.3" -once_cell = "1.3" -parking_lot = "0.10" - -# Codec -bytes = "0.5" -tokio-util = { version = "0.3", features = ["codec"] } -byteorder = "1.3" -flate2 = "1.0" -aes = "0.3" -cfb8 = "0.3" diff --git a/core/network/src/bytes_ext.rs b/core/network/src/bytes_ext.rs deleted file mode 100644 index 0bea05460..000000000 --- a/core/network/src/bytes_ext.rs +++ /dev/null @@ -1,158 +0,0 @@ -use bytes::{Buf, BufMut, BytesMut}; -use thiserror::Error; - -/// An error which occurred while attempting -/// to get a value from a `Buf.` -#[derive(Clone, Copy, Debug, PartialEq, Eq, Error)] -pub enum TryGetError { - /// Indicates that there were not enough remaining - /// bytes in the buffer to read a value. - #[error("not enough bytes left in buffer")] - NotEnoughBytes, - #[error("value too large")] - ValueTooLarge, - #[error("invalid value {0}")] - InvalidValue(i32), -} - -type Result = std::result::Result; - -/// Ext trait for `Bytes` to allow `try_get` operations. -/// -/// All operations are big-endian. -pub trait BytesExt { - fn try_get_i8(&mut self) -> Result; - fn try_get_i16(&mut self) -> Result; - fn try_get_i32(&mut self) -> Result; - fn try_get_i64(&mut self) -> Result; - - fn try_get_f32(&mut self) -> Result; - fn try_get_f64(&mut self) -> Result; - - fn try_get_u8(&mut self) -> Result; - fn try_get_u16(&mut self) -> Result; - fn try_get_u32(&mut self) -> Result; - fn try_get_u64(&mut self) -> Result; -} - -macro_rules! try_get_impl { - ($this:ident, $size:expr, $method:ident) => {{ - if $this.remaining() < $size { - return Err(TryGetError::NotEnoughBytes); - } - - return Ok($this.$method()); - }}; -} - -impl BytesExt for B { - fn try_get_i8(&mut self) -> Result { - try_get_impl!(self, 1, get_i8); - } - - fn try_get_i16(&mut self) -> Result { - try_get_impl!(self, 2, get_i16); - } - - fn try_get_i32(&mut self) -> Result { - try_get_impl!(self, 4, get_i32); - } - - fn try_get_i64(&mut self) -> Result { - try_get_impl!(self, 8, get_i64); - } - - fn try_get_f32(&mut self) -> Result { - try_get_impl!(self, 4, get_f32); - } - - fn try_get_f64(&mut self) -> Result { - try_get_impl!(self, 8, get_f64); - } - - fn try_get_u8(&mut self) -> Result { - try_get_impl!(self, 1, get_u8); - } - - fn try_get_u16(&mut self) -> Result { - try_get_impl!(self, 2, get_u16); - } - - fn try_get_u32(&mut self) -> Result { - try_get_impl!(self, 4, get_u32); - } - - fn try_get_u64(&mut self) -> Result { - try_get_impl!(self, 8, get_u64); - } -} - -/// Ext trait to implement put operations -/// for `BytesMut` which reserve additional capacity -/// rather than panicking. -pub trait BytesMutExt { - fn push_i8(&mut self, x: i8); - fn push_i16(&mut self, x: i16); - fn push_i32(&mut self, x: i32); - fn push_i64(&mut self, x: i64); - - fn push_f32(&mut self, x: f32); - fn push_f64(&mut self, x: f64); - - fn push_u8(&mut self, x: u8); - fn push_u16(&mut self, x: u16); - fn push_u32(&mut self, x: u32); - fn push_u64(&mut self, x: u64); -} - -impl BytesMutExt for BytesMut { - fn push_i8(&mut self, x: i8) { - self.reserve(1); - self.put_i8(x); - } - - fn push_i16(&mut self, x: i16) { - self.reserve(2); - self.put_i16(x); - } - - fn push_i32(&mut self, x: i32) { - self.reserve(4); - self.put_i32(x); - } - - fn push_i64(&mut self, x: i64) { - self.reserve(8); - self.put_i64(x); - } - - fn push_f32(&mut self, x: f32) { - self.reserve(4); - self.put_f32(x); - } - - fn push_f64(&mut self, x: f64) { - self.reserve(8); - self.put_f64(x); - } - - fn push_u8(&mut self, x: u8) { - self.reserve(1); - self.put_u8(x); - } - - fn push_u16(&mut self, x: u16) { - self.reserve(2); - self.put_u16(x); - } - - fn push_u32(&mut self, x: u32) { - self.reserve(4); - self.put_u32(x); - } - - fn push_u64(&mut self, x: u64) { - self.reserve(8); - self.put_u64(x); - } -} diff --git a/core/network/src/codec.rs b/core/network/src/codec.rs deleted file mode 100644 index 7e54f06b5..000000000 --- a/core/network/src/codec.rs +++ /dev/null @@ -1,278 +0,0 @@ -use crate::bytes_ext::TryGetError; -use crate::mctypes::{McTypeRead, McTypeWrite}; -use crate::packet::{PacketDirection, PacketId, PacketStage}; -use crate::{Packet, PacketType}; -use aes::Aes128; -use bytes::buf::BufMutExt; -use bytes::{Buf, BytesMut}; -use cfb8::stream_cipher::{NewStreamCipher, StreamCipher}; -use cfb8::Cfb8; -use flate2::read::ZlibDecoder; -use flate2::write::ZlibEncoder; -use flate2::Compression; -use std::io::{Cursor, Read, Write}; -use thiserror::Error; -use tokio_util::codec::{Decoder, Encoder}; - -type AesCfb8 = Cfb8; - -/// Maximum possible size of a varint. -const MAX_VAR_INT_SIZE: usize = 5; -/// Maximum allowed length of a received packet. -const MAX_PACKET_LEN: usize = 1_048_576; // One MB -/// Maximum possible size of a packet header. -const HEADER_SIZE: usize = MAX_VAR_INT_SIZE * 2; - -#[derive(Debug, Error)] -pub enum Error { - #[error("Packet of length {0} (under compression threshold {1}) was sent compressed")] - CompressedPacketTooSmall(usize, usize), - #[error("Packet length {0} is too large")] - PacketTooLarge(usize), - #[error("Invalid packet ID {0} for stage {1:?}")] - InvalidPacketId(u32, PacketStage), -} - -/// Codec for encoding and decoding Minecraft packets. -pub struct MinecraftCodec { - /// Direction of incoming packets. - incoming_direction: PacketDirection, - /// The current stage of this codec. - stage: PacketStage, - /// The encrypter, if encryption is enabled. - encrypter: Option, - /// The decrypter, if encryption is enabled. - decrypter: Option, - /// The compression threshold, if compression is enabled. - compression_threshold: Option, - /// Cached buffer for writing header data. - /// Using this avoids reallocations. - header_buffer: BytesMut, - /// Cached buffer into which we write decompressed - /// data. Using this avoids reallocations. - decompressed_buffer: Vec, - /// Index into `src` of next byte to decrypt. - decrypt_index: usize, -} - -impl MinecraftCodec { - pub fn new(incoming_direction: PacketDirection) -> Self { - Self { - incoming_direction, - stage: PacketStage::Handshake, - encrypter: None, - decrypter: None, - compression_threshold: None, - header_buffer: BytesMut::with_capacity(HEADER_SIZE), - decompressed_buffer: vec![], - decrypt_index: 0, - } - } - - pub fn enable_compression(&mut self, threshold: usize) { - log::trace!("Enabling compression with threshold {}", threshold); - self.compression_threshold = Some(threshold); - } - - pub fn enable_encryption(&mut self, key: [u8; 16]) { - log::trace!("Enabling encryption"); - // This is the toppoint of security: using the same IV - // for every packet. Typical for Mojang. - self.encrypter = Some(AesCfb8::new_var(&key, &key).unwrap()); - self.decrypter = Some(AesCfb8::new_var(&key, &key).unwrap()); - } - - pub fn set_stage(&mut self, stage: PacketStage) { - log::trace!("Setting packet stage to {:?}", stage); - self.stage = stage; - } -} - -impl Encoder> for MinecraftCodec { - type Error = anyhow::Error; - - fn encode(&mut self, packet: Box, dst: &mut BytesMut) -> Result<(), Self::Error> { - // Reserve space for the packet header (at most 2 * 5 bytes, for length + data length). - // `header` will contain the first 10 bytes of the buffer, while `dst` - // still contains the rest. - // "Data length" refers to the uncompressed size of the packet. - // Since we cannot know the size of the header in advance, thanks to varints, - // we reserve the maximum size and copy the header in with a correct offset. - assert!(dst.is_empty()); - dst.reserve(HEADER_SIZE); - - // Zero out the header. - dst.extend_from_slice(&[0u8; HEADER_SIZE]); - - let mut header = dst.split_to(HEADER_SIZE); - assert!(dst.is_empty()); - - // Write raw packet data to `dst`. - let ty = packet.ty(); - log::trace!("Sending packet with type {:?}", ty); - dst.push_var_int(ty.get_id().0 as i32); - packet.write_to(dst); - - // If compression is enabled, we follow a more complex course of action: - // * Write the raw packet data to `dst`. - // * If the data is less than the compression threshold, proceed as usual. - // * Otherwise, we move forward into the buffer, allocating - // another header and then writing the compressed bytes - // to the capacity after that. - let data_len: Option = if let Some(threshold) = self.compression_threshold { - let data_len = dst.len(); - if data_len >= threshold { - // Allocate new header - dst.reserve(HEADER_SIZE); - - let uncompressed = dst.split_to(data_len); - dst.extend_from_slice(&[0u8; HEADER_SIZE]); - header = dst.split_to(HEADER_SIZE); - - assert!(dst.is_empty()); - // Compress data into `compressed`. - let mut encoder = ZlibEncoder::new(dst.writer(), Compression::default()); - encoder.write_all(uncompressed.as_ref()).unwrap(); - - Some(data_len) - } else { - Some(0) // Not compressed - } - } else { - None - }; - - // Figure out the length of `data_length` encoded. - let length_of_data_length = match data_len { - Some(data_len) => { - let mut temp = BytesMut::with_capacity(MAX_VAR_INT_SIZE); - temp.push_var_int(data_len as i32); - temp.len() - } - None => 0, - }; - - // Write header. We first write to a temporary buffer, - // then copy this to the correct position in `header`, - // trimming off the unused bytes. - self.header_buffer - .push_var_int((length_of_data_length + dst.len()) as i32); - if let Some(data_len) = data_len { - self.header_buffer.push_var_int(data_len as i32); - } - - // Offset into `header` to write to. - let header_offset = HEADER_SIZE - self.header_buffer.len(); - // Discard unused header bytes. - header.advance(header_offset); - header.clear(); - - // Write into header. - header.extend_from_slice(&self.header_buffer); - self.header_buffer.clear(); - - // Finally, merge `header` and `dst`. - std::mem::swap(dst, &mut header); - dst.unsplit(header); - - // If encryption is enabled, encrypt data in place. - if let Some(crypter) = self.encrypter.as_mut() { - crypter.encrypt(dst); - } - - Ok(()) - } -} - -impl Decoder for MinecraftCodec { - type Item = Box; - type Error = anyhow::Error; - - fn decode(&mut self, src: &mut BytesMut) -> Result, Self::Error> { - // If encryption is enabled, decrypt undecrypted data. - if let Some(crypter) = self.decrypter.as_mut() { - crypter.decrypt(&mut src[self.decrypt_index..]); - self.decrypt_index = src.len(); - } - - // Conversion to `Cursor` is required because `Bytes` does - // not implement `Buf`. - let mut cursor = Cursor::new(src.as_ref()); - - // Read header. - let length = match cursor.try_get_var_int() { - Ok(length) => length as usize, - Err(TryGetError::NotEnoughBytes) => return Ok(None), - Err(e) => return Err(e.into()), - }; - - if length > cursor.remaining() { - // Full packet has not been read yet. - return Ok(None); - } - - // Prevent malicious clients from causing huge allocations. - if length > MAX_PACKET_LEN { - return Err(Error::PacketTooLarge(length).into()); - } - - // At this point, we know a full packet has been received. - - // Trim `cursor` and `src` to length of packet. - let position = cursor.position() as usize; - src.advance(position); - cursor = Cursor::new(&src[..length]); - - // If compression is enabled: - // * Read the data length field. If 0, continue as normal: the packet is not compressed. - // * Decompress remaining bytes into `self.decompressed_buffer`. - // * Update `cursor` to read from `self.decompressed_buffer`. - if let Some(threshold) = self.compression_threshold { - let data_length = cursor.try_get_var_int()?; - - if data_length != 0 { - self.decompressed_buffer.clear(); - - let mut decoder = ZlibDecoder::new(cursor); - decoder.read_to_end(&mut self.decompressed_buffer)?; - - let actual_data_length = self.decompressed_buffer.len(); - if actual_data_length < threshold { - return Err( - Error::CompressedPacketTooSmall(actual_data_length, threshold).into(), - ); - } - - cursor = Cursor::new(&self.decompressed_buffer); - } - } - - // Read packet. - let id = cursor.try_get_var_int()? as u32; - // If we don't know this packet type, skip the packet. - let packet_type = { - match PacketType::get_from_id(PacketId(id, self.incoming_direction, self.stage)) { - Ok(ty) => ty, - Err(_) => { - // Advance buffer and stop. - log::trace!("Received packet type with unknown ID 0x{:x}; skipping", id); - src.advance(length); - self.decrypt_index = src.len(); - return Ok(None); - } - } - }; - - log::trace!("Decoding packet with type {:?}", packet_type); - - let mut packet = packet_type.get_implementation(); - packet.read_from(&mut cursor)?; - - log::trace!("Received packet with type {:?}", packet_type); - - src.advance(length); - self.decrypt_index = src.len(); - - Ok(Some(packet)) - } -} diff --git a/core/network/src/lib.rs b/core/network/src/lib.rs deleted file mode 100644 index 98244eedb..000000000 --- a/core/network/src/lib.rs +++ /dev/null @@ -1,12 +0,0 @@ -mod bytes_ext; -mod codec; -mod mctypes; -mod packet; -pub mod packets; - -pub use codec::{Error, MinecraftCodec}; -pub use packet::{Packet, PacketBuilder, PacketDirection, PacketId, PacketStage, PacketType}; - -pub fn cast_packet(packet: Box) -> P { - *packet.into_any().downcast().unwrap() -} diff --git a/core/text/Cargo.toml b/core/text/Cargo.toml deleted file mode 100644 index 63885df50..000000000 --- a/core/text/Cargo.toml +++ /dev/null @@ -1,15 +0,0 @@ -[package] -name = "feather-text" -version = "0.6.0" -authors = ["caelunshun "] -edition = "2018" - -[dependencies] -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -serde_with = "1.4" -hematite-nbt = "0.4" -uuid = { version = "0.8", features = ["serde"] } -nom = "5.1" -nom_locate = "2.0" -thiserror = "1.0" \ No newline at end of file diff --git a/crates/base/Cargo.toml b/crates/base/Cargo.toml new file mode 100644 index 000000000..a1bce04a7 --- /dev/null +++ b/crates/base/Cargo.toml @@ -0,0 +1,38 @@ +[package] +name = "feather-base" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" + +[dependencies] +libcraft-core = { git = "https://github.com/feather-rs/libcraft" } +blocks = { path = "../blocks", package = "feather-blocks" } +generated = { path = "../generated", package = "feather-generated" } + +vek = "0.14" +ahash = "0.4" +smallvec = "1" +arrayvec = { version = "0.5", features = ["serde"] } +bitflags = "1" +parking_lot = "0.11" +uuid = { version = "0.8", features = ["serde"] } +num-traits = "0.2" +num-derive = "0.3" +bitvec = "0.21" + +# Text markdown parsing +nom = "5" +nom_locate = "2" + +serde = { version = "1", features = ["derive"] } +serde_with = "1" +serde_json = "1" +hematite-nbt = { git = "https://github.com/PistonDevelopers/hematite_nbt" } +byteorder = "1" +anyhow = "1" +thiserror = "1" + +[dev-dependencies] +serde_test = "1" +rand = "0.8" +rand_pcg = "0.3" diff --git a/core/anvil/src/lib.rs b/crates/base/src/anvil.rs similarity index 69% rename from core/anvil/src/lib.rs rename to crates/base/src/anvil.rs index a6d11f987..a03899dd8 100644 --- a/core/anvil/src/lib.rs +++ b/crates/base/src/anvil.rs @@ -1,4 +1,4 @@ -//! Module containing functions for loading and saving to +//! Loading and saving to/from //! world saves. Currently includes region file loading, //! player data loading, and level data loading. @@ -7,4 +7,3 @@ pub mod entity; pub mod level; pub mod player; pub mod region; -mod serialization_helper; diff --git a/core/anvil/src/block_entity.rs b/crates/base/src/anvil/block_entity.rs similarity index 94% rename from core/anvil/src/block_entity.rs rename to crates/base/src/anvil/block_entity.rs index 4fa8ffd85..ef75d350a 100644 --- a/core/anvil/src/block_entity.rs +++ b/crates/base/src/anvil/block_entity.rs @@ -1,7 +1,8 @@ -use crate::player::InventorySlot; use serde::ser::Error; use serde::{Deserialize, Serialize, Serializer}; +use super::player::InventorySlot; + /// A block entity loaded or saved to the Anvil format. /// Should be serialized using NBT. /// @@ -42,6 +43,7 @@ pub enum BlockEntityKind { #[serde(rename = "minecraft:brewing_stand")] #[serde(rename_all = "PascalCase")] BrewingStand { + #[serde(default)] items: Vec, brew_time: i16, fuel: i8, @@ -49,6 +51,7 @@ pub enum BlockEntityKind { #[serde(rename = "minecraft:cauldron")] #[serde(rename_all = "PascalCase")] Cauldron { + #[serde(default)] items: Vec, potion_id: i16, splash_potion: bool, @@ -84,10 +87,16 @@ pub enum BlockEntityKind { DaylightDetector, // empty #[serde(rename = "minecraft:dispenser")] #[serde(rename_all = "PascalCase")] - Dispenser { items: Vec }, + Dispenser { + #[serde(default)] + items: Vec, + }, #[serde(rename = "minecraft:dropper")] #[serde(rename_all = "PascalCase")] - Dropper { items: Vec }, + Dropper { + #[serde(default)] + items: Vec, + }, #[serde(rename = "minecraft:enchanting_table")] #[serde(rename_all = "PascalCase")] EnchantingTable, @@ -103,6 +112,7 @@ pub enum BlockEntityKind { #[serde(rename = "minecraft:furnace")] #[serde(rename_all = "PascalCase")] Furnace { + #[serde(default)] items: Vec, burn_time: i16, cook_time: i16, @@ -111,6 +121,7 @@ pub enum BlockEntityKind { #[serde(rename = "minecraft:hopper")] #[serde(rename_all = "PascalCase")] Hopper { + #[serde(default)] items: Vec, transfer_cooldown: i32, }, @@ -125,7 +136,10 @@ pub enum BlockEntityKind { }, #[serde(rename = "minecraft:jukebox")] #[serde(rename_all = "PascalCase")] - Jukebox { record_item: InventorySlot }, + Jukebox { + #[serde(default)] + record_item: InventorySlot, + }, // TODO: a few more /// Fallback type for unknown block entities #[serde(other, serialize_with = "BlockEntityKind::serialize_unknown")] diff --git a/core/anvil/src/entity.rs b/crates/base/src/anvil/entity.rs similarity index 93% rename from core/anvil/src/entity.rs rename to crates/base/src/anvil/entity.rs index 3ec464edd..72dc2acf1 100644 --- a/core/anvil/src/entity.rs +++ b/crates/base/src/anvil/entity.rs @@ -1,10 +1,11 @@ use arrayvec::ArrayVec; -use feather_items::{Item, ItemStack}; -use feather_util::{vec3, Position, Vec3d}; +use generated::{Item, ItemStack}; use serde::ser::Error; use serde::{Deserialize, Serialize, Serializer}; use thiserror::Error; +use crate::{vec3, Position, Vec3d}; + #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] pub enum EntityDataKind { Item, @@ -117,7 +118,6 @@ impl BaseEntityData { z: self.position[2], yaw: self.rotation[0], pitch: self.rotation[1], - on_ground: true, }) } else { Err(EntityLoadError::MissingData) @@ -183,7 +183,7 @@ impl Default for ItemData { fn default() -> Self { Self { count: 0, - item: Item::Air.identifier().to_string(), + item: Item::Air.name().to_owned(), nbt: None, } } @@ -200,7 +200,7 @@ impl From<&ItemData> for ItemStack { fn from(item: &ItemData) -> Self { ItemNbt::item_stack( &item.nbt, - Item::from_identifier(item.item.as_str()).unwrap_or(Item::Air), + Item::from_name(item.item.as_str()).unwrap_or(Item::Air), item.count as u8, ) } @@ -219,8 +219,8 @@ where Some(nbt) }; Self { - count: stack.amount as i8, - item: stack.ty.identifier().to_string(), + count: stack.count as i8, + item: stack.item.name().to_owned(), nbt, } } @@ -236,11 +236,11 @@ pub struct ItemNbt { impl ItemNbt { /// Create an `ItemStack` of the specified item and amount, setting any nbt present. - pub fn item_stack(nbt: &Option, item: Item, amount: u8) -> ItemStack { + pub fn item_stack(nbt: &Option, item: Item, count: u8) -> ItemStack { ItemStack { - ty: item, - amount, - damage: nbt.as_ref().map(|n| n.damage).flatten(), + count: count as u32, + item, + damage: nbt.as_ref().map(|n| n.damage).flatten().map(|x| x as u32), } } } @@ -252,7 +252,7 @@ where fn from(s: S) -> Self { let stack = s.borrow(); Self { - damage: stack.damage, + damage: stack.damage.map(|d| d as i32), } } } @@ -293,7 +293,7 @@ pub struct ArrowEntityData { #[cfg(test)] mod tests { use super::*; - use feather_util::position; + use crate::position; #[test] fn test_read_position() { @@ -309,7 +309,6 @@ mod tests { assert!(pos.z - 3.0 < std::f64::EPSILON); assert!(pos.yaw - 4.0 < std::f32::EPSILON); assert!(pos.pitch - 5.0 < std::f32::EPSILON); - assert!(pos.on_ground); } #[test] diff --git a/core/anvil/src/level.dat b/crates/base/src/anvil/level.dat similarity index 100% rename from core/anvil/src/level.dat rename to crates/base/src/anvil/level.dat diff --git a/core/anvil/src/level.rs b/crates/base/src/anvil/level.rs similarity index 89% rename from core/anvil/src/level.rs rename to crates/base/src/anvil/level.rs index 453f00ed1..3ac522fd2 100644 --- a/core/anvil/src/level.rs +++ b/crates/base/src/anvil/level.rs @@ -1,12 +1,9 @@ //! Implements level.dat file loading. -use feather_biomes::Biome; -use feather_items::Item; +use generated::{Biome, Item}; use serde::{Deserialize, Serialize}; -use std::collections::HashMap; -use std::io::Cursor; -use tokio::fs::File; -use tokio::io::{AsyncReadExt, AsyncWriteExt}; +use std::io::{Cursor, Read, Write}; +use std::{collections::HashMap, fs::File}; /// Root level tag #[derive(Debug, Clone, Serialize, Deserialize)] @@ -80,20 +77,20 @@ pub struct LevelData { } impl LevelData { - pub async fn load_from_file(file: &mut File) -> anyhow::Result { + pub fn load_from_file(file: &mut File) -> anyhow::Result { let mut buf = vec![]; - file.read_to_end(&mut buf).await?; + file.read_to_end(&mut buf)?; nbt::from_gzip_reader::<_, Root>(Cursor::new(&buf)) .map_err(Into::into) .map(|root| root.data) } - pub async fn save_to_file(&self, file: &mut File) -> anyhow::Result<()> { + pub fn save_to_file(&self, file: &mut File) -> anyhow::Result<()> { let mut buf = vec![]; nbt::to_gzip_writer(&mut buf, &Root { data: self.clone() }, None)?; - file.write_all(&buf).await?; + file.write_all(&buf)?; Ok(()) } } @@ -127,19 +124,19 @@ impl Default for SuperflatGeneratorOptions { structures: default_structures, layers: vec![ SuperflatLayer { - block: Item::Bedrock.identifier().to_string(), + block: Item::Bedrock.name().to_string(), height: 1, }, SuperflatLayer { - block: Item::Dirt.identifier().to_string(), + block: Item::Dirt.name().to_string(), height: 2, }, SuperflatLayer { - block: Item::GrassBlock.identifier().to_string(), + block: Item::GrassBlock.name().to_string(), height: 1, }, ], - biome: Biome::Plains.identifier().to_string(), + biome: Biome::Plains.name().to_string(), } } } diff --git a/core/anvil/src/player.dat b/crates/base/src/anvil/player.dat similarity index 100% rename from core/anvil/src/player.dat rename to crates/base/src/anvil/player.dat diff --git a/core/anvil/src/player.rs b/crates/base/src/anvil/player.rs similarity index 74% rename from core/anvil/src/player.rs rename to crates/base/src/anvil/player.rs index ee65b6c1e..65323fa83 100644 --- a/core/anvil/src/player.rs +++ b/crates/base/src/anvil/player.rs @@ -1,19 +1,18 @@ -use crate::entity::{AnimalData, ItemNbt}; -use feather_inventory::player_constants::{ - HOTBAR_SIZE, INVENTORY_SIZE, SLOT_ARMOR_MAX, SLOT_ARMOR_MIN, SLOT_HOTBAR_OFFSET, - SLOT_INVENTORY_OFFSET, SLOT_OFFHAND, -}; -use feather_items::{Item, ItemStack}; +use generated::{Item, ItemStack}; use nbt::Value; use serde::{Deserialize, Serialize}; use std::{ collections::HashMap, + fs, + fs::File, path::{Path, PathBuf}, }; -use tokio::io::AsyncWriteExt; -use tokio::prelude::{AsyncRead, AsyncWrite}; use uuid::Uuid; +use crate::inventory::*; + +use super::entity::{AnimalData, ItemNbt}; + /// Represents the contents of a player data file. #[derive(Default, Debug, Clone, Serialize, Deserialize)] pub struct PlayerData { @@ -35,6 +34,7 @@ pub struct InventorySlot { #[serde(rename = "Count")] pub count: i8, #[serde(rename = "Slot")] + #[serde(default)] pub slot: i8, #[serde(rename = "id")] pub item: String, @@ -65,16 +65,16 @@ impl InventorySlot { /// Converts an `ItemStack` and inventory position index into an `InventorySlot`. pub fn from_inventory_index(slot: i8, stack: ItemStack) -> Self { - let nbt = stack.into(); + let nbt = stack.clone().into(); let nbt = if nbt == Default::default() { None } else { Some(nbt) }; Self { - count: stack.amount as i8, + count: stack.count as i8, slot, - item: stack.ty.identifier().to_string(), + item: stack.item.name().to_owned(), nbt, } } @@ -129,44 +129,28 @@ impl From<&InventorySlot> for ItemStack { fn from(slot: &InventorySlot) -> Self { ItemNbt::item_stack( &slot.nbt, - Item::from_identifier(slot.item.as_str()).unwrap_or(Item::Air), + Item::from_name(slot.item.as_str()).unwrap_or(Item::Air), slot.count as u8, ) } } -async fn load_from_file(mut reader: R) -> Result { - let mut buf = vec![]; - tokio::io::copy(&mut reader, &mut buf).await?; - nbt::from_gzip_reader(buf.as_slice()) -} - -pub async fn load_player_data(world_dir: &Path, uuid: Uuid) -> Result { +pub fn load_player_data(world_dir: &Path, uuid: Uuid) -> Result { let file_path = file_path(world_dir, uuid); - let file = tokio::fs::File::open(file_path).await?; - let data = load_from_file(file).await?; + let mut file = File::open(file_path)?; + let data = nbt::from_gzip_reader(&mut file)?; Ok(data) } -async fn save_to_file( - mut writer: W, - data: &PlayerData, -) -> Result<(), anyhow::Error> { - let mut buf = vec![]; - nbt::to_gzip_writer(&mut buf, data, None)?; - writer.write_all(&buf).await?; - Ok(()) -} - -pub async fn save_player_data( +pub fn save_player_data( world_dir: &Path, uuid: Uuid, data: &PlayerData, ) -> Result<(), anyhow::Error> { - tokio::fs::create_dir_all(world_dir.join("playerdata")).await?; + fs::create_dir_all(world_dir.join("playerdata"))?; let file_path = file_path(world_dir, uuid); - let file = tokio::fs::File::create(file_path).await?; - save_to_file(file, data).await + let mut file = File::create(file_path)?; + nbt::to_gzip_writer(&mut file, data, None).map_err(anyhow::Error::from) } fn file_path(world_dir: &Path, uuid: Uuid) -> PathBuf { @@ -176,19 +160,20 @@ fn file_path(world_dir: &Path, uuid: Uuid) -> PathBuf { #[cfg(test)] mod tests { use super::*; - use feather_inventory::player_constants::{ - SLOT_ARMOR_CHEST, SLOT_ARMOR_FEET, SLOT_ARMOR_HEAD, SLOT_ARMOR_LEGS, + use crate::{ + inventory::{SLOT_ARMOR_CHEST, SLOT_ARMOR_FEET, SLOT_ARMOR_HEAD, SLOT_ARMOR_LEGS}, + Gamemode, }; - use feather_util::Gamemode; + use num_traits::ToPrimitive; use std::collections::HashMap; use std::io::Cursor; - #[tokio::test] - async fn test_deserialize_player() { - let cursor = Cursor::new(include_bytes!("player.dat").to_vec()); + #[test] + fn test_deserialize_player() { + let mut cursor = Cursor::new(include_bytes!("player.dat").to_vec()); - let player = load_from_file(cursor).await.unwrap(); - assert_eq!(player.gamemode, i32::from(Gamemode::Creative.id())); + let player: PlayerData = nbt::from_gzip_reader(&mut cursor).unwrap(); + assert_eq!(player.gamemode, Gamemode::Creative.to_i32().unwrap()); assert_eq!(player.inventory[0].item, "minecraft:diamond_shovel"); assert_eq!(player.inventory[0].nbt, Some(ItemNbt { damage: Some(3) })); } @@ -198,13 +183,13 @@ mod tests { let slot = InventorySlot { count: 1, slot: 2, - item: String::from(Item::Feather.identifier()), + item: String::from(Item::Feather.name()), nbt: None, }; let item_stack: ItemStack = slot.into(); - assert_eq!(item_stack.ty, Item::Feather); - assert_eq!(item_stack.amount, 1); + assert_eq!(item_stack.item, Item::Feather); + assert_eq!(item_stack.count, 1); } #[test] @@ -212,13 +197,13 @@ mod tests { let slot = InventorySlot { count: 1, slot: 2, - item: String::from(Item::DiamondAxe.identifier()), + item: String::from(Item::DiamondAxe.name()), nbt: Some(ItemNbt { damage: Some(42) }), }; let item_stack: ItemStack = slot.into(); - assert_eq!(item_stack.ty, Item::DiamondAxe); - assert_eq!(item_stack.amount, 1); + assert_eq!(item_stack.item, Item::DiamondAxe); + assert_eq!(item_stack.count, 1); assert_eq!(item_stack.damage, Some(42)); } @@ -232,7 +217,7 @@ mod tests { }; let item_stack: ItemStack = slot.into(); - assert_eq!(item_stack.ty, Item::Air); + assert_eq!(item_stack.item, Item::Air); } #[test] @@ -261,7 +246,7 @@ mod tests { let slot = InventorySlot { slot: src, count: 1, - item: String::from(Item::Stone.identifier()), + item: String::from(Item::Stone.name()), nbt: None, }; assert_eq!(slot.convert_index().unwrap(), expected); diff --git a/core/anvil/src/region.rs b/crates/base/src/anvil/region.rs similarity index 84% rename from core/anvil/src/region.rs rename to crates/base/src/anvil/region.rs index 325234c18..26c915004 100644 --- a/core/anvil/src/region.rs +++ b/crates/base/src/anvil/region.rs @@ -1,14 +1,16 @@ //! This module implements the loading and saving //! of Anvil region files. -use super::serialization_helper::packed_u9; -use crate::{block_entity::BlockEntityData, entity::EntityData}; +use crate::{ + chunk::{BlockStore, LightStore, PackedArray, Palette}, + Chunk, ChunkPosition, ChunkSection, +}; + +use super::{block_entity::BlockEntityData, entity::EntityData}; use bitvec::{bitvec, vec::BitVec}; +use blocks::BlockId; use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; -use feather_biomes::Biome; -use feather_blocks::BlockId; -use feather_chunk::{BitArray, Chunk, ChunkSection}; -use feather_util::ChunkPosition; +use generated::Biome; use serde::{Deserialize, Serialize}; use std::borrow::Cow; use std::collections::BTreeMap; @@ -24,8 +26,8 @@ use std::{fs, io, iter}; const REGION_SIZE: usize = 32; /// The data version supported by this code, currently corresponding -/// to 1.13.2. -const DATA_VERSION: i32 = 1631; +/// to 1.16.5. +const DATA_VERSION: i32 = 2586; /// Length, in bytes, of a sector. const SECTOR_BYTES: usize = 4096; @@ -49,69 +51,49 @@ pub struct ChunkLevel { z_pos: i32, last_update: i64, inhabited_time: i64, + #[serde(default)] sections: Vec, #[serde(serialize_with = "nbt::i32_array")] biomes: Vec, + #[serde(default)] entities: Vec, #[serde(rename = "TileEntities")] + #[serde(default)] block_entities: Vec, - heightmaps: Heightmaps, #[serde(rename = "ToBeTicked")] + #[serde(default)] awaiting_block_updates: Vec>, #[serde(rename = "LiquidsToBeTicked")] + #[serde(default)] awaiting_liquid_updates: Vec>, + #[serde(default)] post_processing: Vec>, #[serde(rename = "TileTicks")] + #[serde(default)] scheduled_block_updates: Vec, #[serde(rename = "LiquidTicks")] + #[serde(default)] scheduled_liquid_updates: Vec, #[serde(rename = "Status")] + #[serde(default)] worldgen_status: Cow<'static, str>, } -/// Represents the heightmap data of a chunk. -#[derive(Serialize, Deserialize, Debug)] -#[serde(rename_all = "SCREAMING_SNAKE_CASE")] -pub struct Heightmaps { - // sometimes a few of those are missing, but we regenerate them anyways - /// Deserialization: length of 0 means field was missing, - /// length is guaranteed to be a multiple of 64, - /// length should be 256 to represent valid data - #[serde(with = "packed_u9", default)] - light_blocking: Vec, - /// Deserialization: length of 0 means field was missing, - /// length is guaranteed to be a multiple of 64, - /// length should be 256 to represent valid data - #[serde(with = "packed_u9", default)] - motion_blocking: Vec, - /// Deserialization: length of 0 means field was missing, - /// length is guaranteed to be a multiple of 64, - /// length should be 256 to represent valid data - #[serde(with = "packed_u9", default)] - motion_blocking_no_leaves: Vec, - /// Deserialization: length of 0 means field was missing, - /// length is guaranteed to be a multiple of 64, - /// length should be 256 to represent valid data - #[serde(with = "packed_u9", default)] - ocean_floor: Vec, - /// Deserialization: length of 0 means field was missing, - /// length is guaranteed to be a multiple of 64, - /// length should be 256 to represent valid data - #[serde(with = "packed_u9", default)] - world_surface: Vec, -} - /// Represents a chunk section in a region file. #[derive(Serialize, Deserialize, Debug)] #[serde(rename_all = "PascalCase")] pub struct LevelSection { y: i8, #[serde(serialize_with = "nbt::i64_array", rename = "BlockStates")] + #[serde(default)] states: Vec, + #[serde(default)] palette: Vec, #[serde(serialize_with = "nbt::i8_array")] + #[serde(default)] block_light: Vec, #[serde(serialize_with = "nbt::i8_array")] + #[serde(default)] sky_light: Vec, } @@ -139,12 +121,6 @@ pub struct ScheduledBlockUpdate { /// The identifier of the type of this block #[serde(rename = "i")] name: Cow<'static, str>, - /// When this update should be executed in ticks from current time, can be negative if overdue - #[serde(rename = "t")] - ticks_from_now: i32, - /// Lower priority is handled first when happening on the same tick - #[serde(rename = "t")] - priority: i32, // TODO are these global or chunk coordinates? /// X coordinate pub x: i32, @@ -232,7 +208,7 @@ impl RegionHandle { // Parse NBT data let cursor = Cursor::new(&buf[1..]); - let root: ChunkRoot = match compression_type { + let mut root: ChunkRoot = match compression_type { 1 => nbt::from_gzip_reader(cursor).map_err(Error::Nbt)?, 2 => nbt::from_zlib_reader(cursor).map_err(Error::Nbt)?, _ => return Err(Error::InvalidCompression(compression_type)), @@ -243,29 +219,26 @@ impl RegionHandle { return Err(Error::UnsupportedDataVersion(root.data_version)); } - let level = &root.level; + let level = &mut root.level; let mut chunk = Chunk::new(original_pos); // Read sections - for section in &level.sections { + for section in &mut level.sections { read_section_into_chunk(section, &mut chunk)?; } // Read biomes - if level.biomes.len() != 256 { + if level.biomes.len() != 1024 { return Err(Error::IndexOutOfBounds); } - for index in 0..256 { + for index in 0..1024 { let id = level.biomes[index]; - chunk.biomes_mut()[index] = - Biome::from_protocol_id(id).ok_or_else(|| Error::InvalidBiomeId(id))?; + chunk.biomes_mut().as_slice_mut()[index] = + Biome::from_id(id as u32).ok_or(Error::InvalidBiomeId(id))?; } - // Chunk was not modified, but it thinks it was: disable this - chunk.check_modified(); - - chunk.recalculate_heightmap(); + // chunk.recalculate_heightmap(); Ok((chunk, level.entities.clone(), level.block_entities.clone())) } @@ -340,11 +313,11 @@ impl RegionHandle { } } -fn read_section_into_chunk(section: &LevelSection, chunk: &mut Chunk) -> Result<(), Error> { +fn read_section_into_chunk(section: &mut LevelSection, chunk: &mut Chunk) -> Result<(), Error> { let data = §ion.states; // Create palette - let mut palette = vec![]; + let mut palette = Palette::new(); for entry in §ion.palette { // Construct properties map let mut props = BTreeMap::new(); @@ -360,16 +333,16 @@ fn read_section_into_chunk(section: &LevelSection, chunk: &mut Chunk) -> Result< // Attempt to get block from the given values let block = BlockId::from_identifier_and_properties(&entry.name, &props) .ok_or_else(|| Error::InvalidBlock(entry.name.deref().to_owned()))?; - palette.push(block); + palette.index_or_insert(block); } // Create section // TODO don't clone data - need way around this - let data = BitArray::from_raw( - data.iter().map(|x| *x as u64).collect(), - ((data.len() as f32 * 64.0) / 4096.0).ceil() as u8, - 4096, - ); + let data = if data.is_empty() { + PackedArray::new(4096, 4) + } else { + PackedArray::from_u64_vec(data.iter().map(|x| *x as u64).collect(), 4096) + }; // Light // convert raw lighting data (4bits / block) into a BitArray @@ -391,9 +364,16 @@ fn read_section_into_chunk(section: &LevelSection, chunk: &mut Chunk) -> Result< u64::from_le_bytes(chunk) }) .collect(); - BitArray::from_raw(data, 4, 4096) + PackedArray::from_u64_vec(data, 4096) }; + if section.sky_light.is_empty() { + section.sky_light = vec![0; 2048]; + } + if section.block_light.is_empty() { + section.block_light = vec![0; 2048]; + } + if section.block_light.len() != 2048 || section.sky_light.len() != 2048 { return Err(Error::IndexOutOfBounds); } @@ -401,14 +381,13 @@ fn read_section_into_chunk(section: &LevelSection, chunk: &mut Chunk) -> Result< let block_light = convert_light_data(§ion.block_light); let sky_light = convert_light_data(§ion.sky_light); - let chunk_section = ChunkSection::new(data, Some(palette), block_light, sky_light); + let light = + LightStore::from_packed_arrays(block_light, sky_light).ok_or(Error::IndexOutOfBounds)?; + let blocks = BlockStore::from_raw_parts(Some(palette), data); - if section.y >= 16 { - // Haha... nope. - return Err(Error::IndexOutOfBounds); - } + let chunk_section = ChunkSection::new(blocks, light); - chunk.set_section_at(usize::from(section.y as u8), Some(chunk_section)); + chunk.set_section_at(section.y as isize, Some(chunk_section)); Ok(()) } @@ -429,47 +408,33 @@ fn chunk_to_chunk_root( .sections() .iter() .enumerate() - .filter_map(|(y, sec)| sec.map(|sec| (y, sec.clone()))) + .filter_map(|(y, sec)| sec.as_ref().map(|sec| (y, sec.clone()))) .map(|(y, mut section)| { let palette = convert_palette(&mut section); LevelSection { y: y as i8, - states: section.data().inner().iter().map(|x| *x as i64).collect(), + states: section + .blocks() + .data() + .as_u64_slice() + .iter() + .map(|x| *x as i64) + .collect(), palette, - block_light: slice_u64_to_i8(section.block_light().inner()).to_vec(), - sky_light: slice_u64_to_i8(section.sky_light().inner()).to_vec(), + block_light: slice_u64_to_i8(section.light().block_light().as_u64_slice()) + .to_vec(), + sky_light: slice_u64_to_i8(section.light().sky_light().as_u64_slice()) + .to_vec(), } }) .collect(), biomes: chunk .biomes() + .as_slice() .iter() - .map(|biome| biome.protocol_id()) + .map(|biome| biome.id() as i32) .collect(), entities: entities.into(), - heightmaps: Heightmaps { - light_blocking: chunk - .heightmaps() - .iter() - .map(|h| h.light_blocking()) - .collect(), - motion_blocking: chunk - .heightmaps() - .iter() - .map(|h| h.motion_blocking()) - .collect(), - motion_blocking_no_leaves: chunk - .heightmaps() - .iter() - .map(|h| h.motion_blocking_no_leaves()) - .collect(), - ocean_floor: chunk.heightmaps().iter().map(|h| h.ocean_floor()).collect(), - world_surface: chunk - .heightmaps() - .iter() - .map(|h| h.world_surface()) - .collect(), - }, awaiting_block_updates: vec![vec![]; 16], // TODO awaiting_liquid_updates: vec![vec![]; 16], // TODO scheduled_block_updates: vec![], // TODO @@ -482,8 +447,7 @@ fn chunk_to_chunk_root( } fn convert_palette(section: &mut ChunkSection) -> Vec { - section.convert_palette_to_section(); - raw_palette_to_palette_entries(section.palette().unwrap()) + raw_palette_to_palette_entries(section.blocks().palette().unwrap().as_slice()) } fn raw_palette_to_palette_entries(palette: &[BlockId]) -> Vec { @@ -568,6 +532,7 @@ impl SectorAllocator { let mut start = 0; let mut length = 0; + let mut found_block = None; for (index, is_used) in self.used_sectors.iter().enumerate() { if *is_used { start = 0; @@ -584,14 +549,19 @@ impl SectorAllocator { count: length as u32, }; - (block.offset..block.offset + block.count) - .for_each(|sector| self.used_sectors.set(sector as usize, true)); - - return block; + found_block = Some(block); + break; } } } + if let Some(block) = found_block { + for sector in block.offset..block.offset + block.count { + self.used_sectors.set(sector as usize, true); + } + return block; + } + // No sector found: must allocate into end let block = SectorBlock { @@ -649,7 +619,7 @@ impl Display for Error { } Error::InvalidBlock(name) => f.write_str(&format!("Chunk contains invalid block {}", name))?, Error::ChunkNotExist => f.write_str("The chunk does not exist")?, - Error::UnsupportedDataVersion(_) => f.write_str("The chunk uses an unsupported data version. Feather currently only supports 1.13.2 region files.")?, + Error::UnsupportedDataVersion(_) => f.write_str("The chunk uses an unsupported data version. Feather currently only supports 1.16.5 region files.")?, Error::InvalidBlockType => f.write_str("Chunk contains invalid block type")?, Error::MissingRootTag => f.write_str("Chunk is missing a root NBT tag")?, Error::IndexOutOfBounds => f.write_str("Section index out of bounds")?, @@ -684,7 +654,8 @@ pub fn load_region(dir: &PathBuf, pos: RegionPosition) -> Result; NUM_SECTIONS + 2], + + biomes: BiomeStore, + + heightmaps: HeightmapStore, + + position: ChunkPosition, +} + +impl Default for Chunk { + fn default() -> Self { + let sections = [ + None, None, None, None, None, None, None, None, None, None, None, None, None, None, + None, None, None, None, + ]; + Self { + sections, + biomes: BiomeStore::default(), + position: ChunkPosition::new(0, 0), + heightmaps: HeightmapStore::new(), + } + } +} + +impl Chunk { + /// Creates a new empty chunk with the + /// specified position. + /// + /// Biomes are initialized to plains. + pub fn new(position: ChunkPosition) -> Self { + Self::new_with_default_biome(position, Biome::Plains) + } + + /// Creates a new empty chunk with the specified + /// position. + /// + /// Biomes are initialized to `biome`. + pub fn new_with_default_biome(position: ChunkPosition, default_biome: Biome) -> Self { + Self { + position, + biomes: BiomeStore::new(default_biome), + ..Default::default() + } + } + + /// Gets the position of this chunk. + pub fn position(&self) -> ChunkPosition { + self.position + } + + /// Sets the position of this chunk. + pub fn set_position(&mut self, pos: ChunkPosition) { + self.position = pos; + } + + /// Gets the block at the given position within this chunk. + /// + /// Returns `None` if the coordinates are out of bounds. + pub fn block_at(&self, x: usize, y: usize, z: usize) -> Option { + let section = self.section_for_y(y)?; + match section { + Some(section) => section.block_at(x, y % SECTION_HEIGHT, z), + None => Some(BlockId::air()), + } + } + + /// Sets the block at the given position within this chunk. + /// + /// Returns `None` if the coordinates are out of bounds. + pub fn set_block_at(&mut self, x: usize, y: usize, z: usize, block: BlockId) -> Option<()> { + let old_block = self.block_at(x, y, z)?; + let section = self.section_for_y_mut(y)?; + let result = match section { + Some(section) => { + let result = section.set_block_at(x, y % SECTION_HEIGHT, z, block); + // If the block update caused the section to contain only + // air, free it to conserve memory. + if section.is_empty() { + self.clear_section(y); + } + result + } + None => { + if !block.is_air() { + let mut section = ChunkSection::default(); + let result = section.set_block_at(x, y % SECTION_HEIGHT, z, block); + self.set_section_at((y / SECTION_HEIGHT) as isize, Some(section)); + result + } else { + Some(()) + } + } + }; + self.heightmaps + .update(x, y, z, old_block, block, Self::block_at_fn(&self.sections)); + result + } + + /// Recalculates heightmaps for this chunk. + pub fn recalculate_heightmaps(&mut self) { + self.heightmaps + .recalculate(Self::block_at_fn(&self.sections)) + } + + fn block_at_fn( + sections: &[Option], + ) -> impl Fn(usize, usize, usize) -> BlockId + '_ { + move |x, y, z| { + let section = §ions[(y / SECTION_HEIGHT) + 1]; + match section { + Some(section) => section.block_at(x, y % SECTION_HEIGHT, z).unwrap(), + None => BlockId::air(), + } + } + } + + pub fn block_light_at(&self, x: usize, y: usize, z: usize) -> Option { + match self.section_for_y(y)? { + Some(s) => s.block_light_at(x, y % SECTION_HEIGHT, z), + None => Some(15), + } + } + + pub fn sky_light_at(&self, x: usize, y: usize, z: usize) -> Option { + match self.section_for_y(y)? { + Some(s) => s.sky_light_at(x, y % SECTION_HEIGHT, z), + None => Some(15), + } + } + + pub fn set_block_light_at(&mut self, x: usize, y: usize, z: usize, light: u8) -> Option<()> { + if let Some(section) = self.section_for_y_mut(y)? { + section.set_block_light_at(x, y, z, light) + } else { + Some(()) + } + } + + pub fn set_sky_light_at(&mut self, x: usize, y: usize, z: usize, light: u8) -> Option<()> { + if let Some(section) = self.section_for_y_mut(y)? { + section.set_sky_light_at(x, y, z, light) + } else { + Some(()) + } + } + + fn section_for_y(&self, y: usize) -> Option<&Option> { + self.sections.get((y / SECTION_HEIGHT) + 1) + } + + fn section_for_y_mut(&mut self, y: usize) -> Option<&mut Option> { + self.sections.get_mut((y / SECTION_HEIGHT) + 1) + } + + fn clear_section(&mut self, y: usize) { + self.sections[(y / SECTION_HEIGHT) + 1] = None; + } + + /// Gets the [`BiomeStore`] for this chunk. + pub fn biomes(&self) -> &BiomeStore { + &self.biomes + } + + /// Mutably gets the [`BiomeStore`] for this chunk. + pub fn biomes_mut(&mut self) -> &mut BiomeStore { + &mut self.biomes + } + + /// Gets the [`HeightmapStore`] for this chunk. + pub fn heightmaps(&self) -> &HeightmapStore { + &self.heightmaps + } + + /// Mutably gets the [`HeightmapStore`] for this chunk. + pub fn heightmaps_mut(&mut self) -> &mut HeightmapStore { + &mut self.heightmaps + } + + /// Gets the chunk section at index `y`. + pub fn section(&self, y: usize) -> Option<&ChunkSection> { + self.sections.get(y)?.as_ref() + } + + /// Mutably gets the chunk section at index `y`. + pub fn section_mut(&mut self, y: usize) -> Option<&mut ChunkSection> { + self.sections.get_mut(y)?.as_mut() + } + + /// Sets the section at index `y`. + pub fn set_section_at(&mut self, y: isize, section: Option) { + self.sections[(y + 1) as usize] = section; + } + + /// Gets the sections of this chunk. + pub fn sections(&self) -> &[Option] { + &self.sections + } +} + +/// A 16x16x16 chunk of blocks. +#[derive(Debug, Clone)] +pub struct ChunkSection { + blocks: BlockStore, + + light: LightStore, +} + +impl Default for ChunkSection { + fn default() -> Self { + Self::new(BlockStore::new(), LightStore::new()) + } +} + +impl ChunkSection { + /// Creates new `ChunkSection` from its + /// raw parts. + pub fn new(blocks: BlockStore, light: LightStore) -> Self { + Self { blocks, light } + } + + /// Determines whether this chunk is empty (contains only air). + pub fn is_empty(&self) -> bool { + self.non_air_blocks() == 0 + } + + /// Returns the number of air blocks in this chunk section. + pub fn air_blocks(&self) -> u32 { + self.blocks.air_blocks() + } + + /// Returns the number of non-air blocks in this chunk section. + pub fn non_air_blocks(&self) -> u32 { + SECTION_VOLUME as u32 - self.air_blocks() + } + + /// Gets the block at the given coordinates within this + /// chunk section. + pub fn block_at(&self, x: usize, y: usize, z: usize) -> Option { + self.blocks.block_at(x, y, z) + } + + /// Sets the block at the given coordinates within + /// this chunk section. + /// + /// Returns `None` if the coordinates were out of bounds. + pub fn set_block_at(&mut self, x: usize, y: usize, z: usize, block: BlockId) -> Option<()> { + self.blocks.set_block_at(x, y, z, block) + } + + pub fn block_light_at(&self, x: usize, y: usize, z: usize) -> Option { + self.light.block_light_at(x, y, z) + } + + pub fn sky_light_at(&self, x: usize, y: usize, z: usize) -> Option { + self.light.sky_light_at(x, y, z) + } + + pub fn set_block_light_at(&mut self, x: usize, y: usize, z: usize, light: u8) -> Option<()> { + self.light.set_block_light_at(x, y, z, light) + } + + pub fn set_sky_light_at(&mut self, x: usize, y: usize, z: usize, light: u8) -> Option<()> { + self.light.set_sky_light_at(x, y, z, light) + } + + pub fn light(&self) -> &LightStore { + &self.light + } + + pub fn light_mut(&mut self) -> &mut LightStore { + &mut self.light + } + + pub fn blocks(&self) -> &BlockStore { + &self.blocks + } + + pub fn blocks_mut(&mut self) -> &mut BlockStore { + &mut self.blocks + } + + fn block_index(x: usize, y: usize, z: usize) -> Option { + if x >= SECTION_WIDTH || y >= SECTION_WIDTH || z >= SECTION_WIDTH { + None + } else { + Some((y << 8) | (z << 4) | x) + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn chunk_new() { + let pos = ChunkPosition::new(0, 0); + let chunk = Chunk::new(pos); + + // Confirm that chunk is empty + for x in 0..16 { + assert!(chunk.section(x).is_none()); + assert!(chunk.section(x).is_none()); + } + + assert_eq!(chunk.position(), pos); + } + + #[test] + fn chunk_new_with_default_biome() { + let pos = ChunkPosition::new(0, 0); + let chunk = Chunk::new_with_default_biome(pos, Biome::Mountains); + + // Confirm that chunk is empty + for x in 0..16 { + assert!(chunk.section(x).is_none()); + assert!(chunk.section(x).is_none()); + } + + assert_eq!(chunk.position(), pos); + + // Confirm that biomes are set + for x in 0..4 { + for z in 0..4 { + assert_eq!(chunk.biomes.get(x, 0, z), Biome::Mountains); + } + } + } + + #[test] + fn set_block_simple() { + let pos = ChunkPosition::new(0, 0); + let mut chunk = Chunk::new(pos); + + chunk.set_block_at(0, 0, 0, BlockId::andesite()); + assert_eq!(chunk.block_at(0, 0, 0).unwrap(), BlockId::andesite()); + assert!(chunk.section(1).is_some()); + } + + #[test] + fn fill_chunk() { + let pos = ChunkPosition::new(0, 0); + let mut chunk = Chunk::new(pos); + + let block = BlockId::stone(); + + for x in 0..16 { + for y in 0..256 { + for z in 0..16 { + chunk.set_block_at(x, y, z, block).unwrap(); + assert_eq!(chunk.block_at(x, y, z), Some(block)); + } + } + } + + // Check again, just to be sure + for x in 0..16 { + for y in 0..256 { + for z in 0..16 { + assert_eq!(chunk.block_at(x, y, z), Some(block)); + } + } + } + } + + #[test] + fn spray_chunk() { + // This test fills each section of the chunk + // with the blocks with IDs corresponding + // to 0-4095 in order, testing that + // resizing, etc. works correctly. + + let pos = ChunkPosition::new(0, 0); + let mut chunk = Chunk::new(pos); + + for section in chunk.sections() { + assert!(section.is_none()); + } + + for section in 0..16 { + let mut counter = 0; + for x in 0..16 { + for y in 0..16 { + for z in 0..16 { + let block = BlockId::from_vanilla_id(counter); + chunk.set_block_at(x, (section * 16) + y, z, block); + assert_eq!(chunk.block_at(x, (section * 16) + y, z), Some(block)); + if counter != 0 { + assert!( + chunk.section(section + 1).is_some(), + "Section {} failed", + section + ); + } + counter += 1; + } + } + } + } + + // Go through again to be sure + for section in 0..16 { + assert!(chunk.section(section + 1).is_some()); + let mut counter = 0; + for x in 0..16 { + for y in 0..16 { + for z in 0..16 { + let block = BlockId::from_vanilla_id(counter); + assert_eq!(chunk.block_at(x, (section * 16) + y, z), Some(block)); + assert!(chunk.section(section + 1).is_some()); + counter += 1; + } + } + } + } + + // Now, empty the chunk and ensure + // that the sections become empty. + for x in 0..16 { + for y in 0..256 { + for z in 0..16 { + chunk.set_block_at(x, y, z, BlockId::air()); + } + } + } + + for section in chunk.sections() { + assert!(section.is_none()); + } + } + + #[test] + fn section_from_data_and_palette() { + let pos = ChunkPosition::new(0, 0); + let mut chunk = Chunk::new(pos); + + let mut palette = Palette::new(); + let stone_index = palette.index_or_insert(BlockId::stone()); + + let mut data = PackedArray::new(4096, 5); + for i in 0..4096 { + data.set(i, stone_index as u64); + } + + let section = ChunkSection::new( + BlockStore::from_raw_parts(Some(palette), data), + LightStore::new(), + ); + chunk.set_section_at(0, Some(section)); + + for x in 0..16 { + for y in 0..16 { + for z in 0..16 { + assert_eq!(chunk.block_at(x, y, z).unwrap(), BlockId::stone()); + } + } + } + } + + #[test] + fn test_palette_insertion_in_middle() { + let mut chunk = ChunkSection::default(); + + chunk.set_block_at(0, 0, 0, BlockId::cobblestone()).unwrap(); + chunk.set_block_at(0, 1, 0, BlockId::stone()).unwrap(); + + assert_eq!(chunk.block_at(0, 0, 0).unwrap(), BlockId::cobblestone()); + assert_eq!(chunk.block_at(0, 1, 0).unwrap(), BlockId::stone()); + } + + #[test] + fn test_biomes() { + let mut chunk = Chunk::default(); + + for x in 0..4 { + for z in 0..4 { + assert_eq!(chunk.biomes().get(x, 0, z), Biome::Plains); + chunk.biomes_mut().set(x, 0, z, Biome::BirchForest); + assert_eq!(chunk.biomes().get(x, 0, z), Biome::BirchForest); + } + } + } + + #[test] + fn test_light() { + let mut chunk = Chunk::default(); + + chunk.set_block_at(0, 0, 0, BlockId::stone()).unwrap(); + + for x in 0..SECTION_WIDTH { + for y in 0..SECTION_HEIGHT { + for z in 0..SECTION_WIDTH { + chunk.set_block_light_at(x, y, z, 10); + chunk.set_sky_light_at(x, y, z, 8); + assert_eq!(chunk.block_light_at(x, y, z), Some(10)); + assert_eq!(chunk.sky_light_at(x, y, z), Some(8)); + } + } + } + } + + #[test] + fn heightmaps() { + let mut chunk = Chunk::new(ChunkPosition::new(0, 0)); + + chunk.set_block_at(0, 10, 0, BlockId::stone()); + assert_eq!(chunk.heightmaps.motion_blocking.height(0, 0), Some(10)); + } +} diff --git a/crates/base/src/chunk/biome_store.rs b/crates/base/src/chunk/biome_store.rs new file mode 100644 index 000000000..0b1e09231 --- /dev/null +++ b/crates/base/src/chunk/biome_store.rs @@ -0,0 +1,129 @@ +use generated::Biome; + +use crate::{CHUNK_HEIGHT, CHUNK_WIDTH}; + +pub const BIOME_SAMPLE_RATE: usize = 4; + +pub const BIOMES_PER_CHUNK: usize = (CHUNK_WIDTH / BIOME_SAMPLE_RATE) + * (CHUNK_WIDTH / BIOME_SAMPLE_RATE) + * (CHUNK_HEIGHT / BIOME_SAMPLE_RATE); + +/// Stores the biomes of a chunk. +/// +/// Since Minecraft 1.16, Mojang uses a 3D +/// biome grid sampled in 4x4x4 blocks. We +/// do the same, though right now Feather +/// only uses 2D biomes. +#[derive(Debug, Clone)] +pub struct BiomeStore { + biomes: [Biome; BIOMES_PER_CHUNK], +} + +impl BiomeStore { + pub fn new(default_biome: Biome) -> Self { + Self { + biomes: [default_biome; BIOMES_PER_CHUNK], + } + } + + /// Creates a `BiomeStore` from a slice of [`BIOME_PER_CHUNK`] biomes. + /// + /// Returns `None` if `biomes` is not of the correct length. + pub fn from_slice(biome_slice: &[Biome]) -> Option { + let mut biomes = [Biome::Plains; BIOMES_PER_CHUNK]; + if biomes.len() != biome_slice.len() { + return None; + } + + biomes.copy_from_slice(biome_slice); + Some(Self { biomes }) + } + + /// Sets the biome at the given coordinates, in multiples + /// of 4 blocks. + /// + /// # Panics + /// Panics if `x >= 4`, `z >= 4`, or `y >= 64`. + pub fn set(&mut self, x: usize, y: usize, z: usize, biome: Biome) { + let index = self.index(x, y, z); + self.biomes[index] = biome; + } + + /// Gets the biome at the given coordinates, + /// in multiples of 4 blocks. + /// + /// # Panics + /// Panics if `x >= 4`, `z >= 4`, or `y >= 64`. + pub fn get(&self, x: usize, y: usize, z: usize) -> Biome { + let index = self.index(x, y, z); + self.biomes[index] + } + + /// Gets biome data as a raw slice. + pub fn as_slice(&self) -> &[Biome] { + &self.biomes + } + + /// Gets biomes as a mutably slice. + pub fn as_slice_mut(&mut self) -> &mut [Biome] { + &mut self.biomes + } + + fn index(&self, x: usize, y: usize, z: usize) -> usize { + assert!(x < 4); + assert!(y < 64); + assert!(z < 4); + x + (z * 4) + (y * 16) + } +} + +impl Default for BiomeStore { + fn default() -> Self { + Self::new(Biome::Plains) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn default_biome() { + let biomes = BiomeStore::new(Biome::Badlands); + for x in 0..4 { + for y in 0..64 { + for z in 0..4 { + assert_eq!(biomes.get(x, y, z), Biome::Badlands); + } + } + } + } + + #[test] + fn set_and_get_biomes() { + let mut biomes = BiomeStore::new(Biome::Beach); + + biomes.set(0, 1, 2, Biome::BambooJungle); + assert_eq!(biomes.get(0, 1, 2), Biome::BambooJungle); + } + + #[test] + #[should_panic] + fn out_of_bounds() { + let biomes = BiomeStore::new(Biome::Plains); + biomes.get(4, 0, 0); + } + + #[test] + fn from_slice_correct_length() { + let biome_slice = [Biome::BasaltDeltas; BIOMES_PER_CHUNK]; + let biomes = BiomeStore::from_slice(&biome_slice).unwrap(); + assert_eq!(biomes.as_slice(), biome_slice); + } + + #[test] + fn from_slice_incorrect_length() { + let biome_slice = [Biome::BasaltDeltas; BIOMES_PER_CHUNK - 1]; + assert!(BiomeStore::from_slice(&biome_slice).is_none()); + } +} diff --git a/crates/base/src/chunk/blocks.rs b/crates/base/src/chunk/blocks.rs new file mode 100644 index 000000000..76b01eee3 --- /dev/null +++ b/crates/base/src/chunk/blocks.rs @@ -0,0 +1,142 @@ +use blocks::BlockId; + +use crate::ChunkSection; + +use super::{ + PackedArray, Palette, GLOBAL_BITS_PER_BLOCK, MAX_BITS_PER_BLOCK, MIN_BITS_PER_BLOCK, + SECTION_VOLUME, +}; + +/// Stores the blocks of a chunk section. +#[derive(Debug, Clone)] +pub struct BlockStore { + /// `None` if using the global palette + palette: Option, + + /// Stores indices into `palette`, or just block IDs + /// if using the global palette + blocks: PackedArray, + + air_block_count: u32, +} + +impl Default for BlockStore { + fn default() -> Self { + Self::new() + } +} + +impl BlockStore { + /// Creates a new `BlockStore` containing air. + pub fn new() -> Self { + Self { + palette: Some(Palette::new()), + blocks: PackedArray::new(SECTION_VOLUME, MIN_BITS_PER_BLOCK as usize), + air_block_count: SECTION_VOLUME as u32, + } + } + + /// Creates a new `BlockStore` from the palette + /// and data array. + pub fn from_raw_parts(palette: Option, blocks: PackedArray) -> Self { + let air_block_count = Self::count_air_blocks(&blocks, &palette); + Self { + palette, + blocks, + air_block_count, + } + } + + pub fn data(&self) -> &PackedArray { + &self.blocks + } + + pub fn palette(&self) -> Option<&Palette> { + self.palette.as_ref() + } + + fn count_air_blocks(blocks: &PackedArray, palette: &Option) -> u32 { + let mut count = 0; + blocks.iter().for_each(|x| { + let block = match palette { + Some(p) => p.get(x as usize), + None => BlockId::from_vanilla_id(x as u16), + }; + if block.is_air() { + count += 1; + } + }); + count + } + + pub fn air_blocks(&self) -> u32 { + self.air_block_count + } + + pub fn block_at(&self, x: usize, y: usize, z: usize) -> Option { + let index = ChunkSection::block_index(x, y, z)?; + let block_index = self.blocks.get(index).expect("block_index out of bounds?"); + + Some(match &self.palette { + Some(palette) => palette.get(block_index as usize), + None => BlockId::from_vanilla_id(block_index as u16), + }) + } + + pub fn set_block_at(&mut self, x: usize, y: usize, z: usize, block: BlockId) -> Option<()> { + let index = ChunkSection::block_index(x, y, z)?; + self.update_air_block_count(x, y, z, block); + + let block_index = self.get_block_palette_index(block); + self.blocks.set(index, block_index as u64); + + Some(()) + } + + fn get_block_palette_index(&mut self, block: BlockId) -> usize { + match &mut self.palette { + Some(p) => { + let index = p.index_or_insert(block); + self.resize_if_needed(); + index + } + None => block.vanilla_id() as usize, + } + } + + fn resize_if_needed(&mut self) { + let palette = self.palette.as_ref().unwrap(); + + if palette.len() - 1 > self.blocks.max_value() as usize { + // Resize to either the global palette or a new section palette size. + let new_size = self.blocks.bits_per_value() + 1; + if new_size > MAX_BITS_PER_BLOCK as usize { + self.use_global_palette(); + } else { + self.blocks = self.blocks.resized(new_size); + } + } + } + + fn use_global_palette(&mut self) { + self.blocks = self.blocks.resized(GLOBAL_BITS_PER_BLOCK as usize); + let palette = self.palette.as_ref().unwrap(); + + // Update blocks to use vanilla IDs instead of palette indices + for i in 0..SECTION_VOLUME { + let block = palette.get(self.blocks.get(i).unwrap() as usize); + self.blocks.set(i, block.vanilla_id() as u64); + } + + self.palette = None; + } + + fn update_air_block_count(&mut self, x: usize, y: usize, z: usize, new: BlockId) { + let old = self.block_at(x, y, z).unwrap(); + if old.is_air() && !new.is_air() { + self.air_block_count -= 1; + } else if !old.is_air() && new.is_air() { + self.air_block_count += 1; + } + } +} diff --git a/crates/base/src/chunk/heightmap.rs b/crates/base/src/chunk/heightmap.rs new file mode 100644 index 000000000..a7cb6f883 --- /dev/null +++ b/crates/base/src/chunk/heightmap.rs @@ -0,0 +1,198 @@ +use std::marker::PhantomData; + +use blocks::{BlockId, SimplifiedBlockKind}; + +use crate::{CHUNK_HEIGHT, CHUNK_WIDTH}; + +use super::PackedArray; + +/// Stores heightmaps for a chunk. +#[derive(Debug, Clone)] +pub struct HeightmapStore { + pub motion_blocking: Heightmap, + pub motion_blocking_no_leaves: Heightmap, + pub light_blocking: Heightmap, + pub ocean_floor: Heightmap, + pub world_surface: Heightmap, +} + +impl Default for HeightmapStore { + fn default() -> Self { + Self::new() + } +} + +impl HeightmapStore { + pub fn new() -> Self { + Self { + motion_blocking: Heightmap::new(), + motion_blocking_no_leaves: Heightmap::new(), + light_blocking: Heightmap::new(), + ocean_floor: Heightmap::new(), + world_surface: Heightmap::new(), + } + } + + pub fn update( + &mut self, + x: usize, + y: usize, + z: usize, + old_block: BlockId, + new_block: BlockId, + get_block: impl Fn(usize, usize, usize) -> BlockId, + ) { + self.motion_blocking + .update(x, y, z, old_block, new_block, &get_block); + self.motion_blocking_no_leaves + .update(x, y, z, old_block, new_block, &get_block); + self.light_blocking + .update(x, y, z, old_block, new_block, &get_block); + self.ocean_floor + .update(x, y, z, old_block, new_block, &get_block); + self.world_surface + .update(x, y, z, old_block, new_block, &get_block); + } + + pub fn recalculate(&mut self, get_block: impl Fn(usize, usize, usize) -> BlockId) { + self.motion_blocking.recalculate(&get_block); + self.motion_blocking_no_leaves.recalculate(&get_block); + self.light_blocking.recalculate(&get_block); + self.ocean_floor.recalculate(&get_block); + self.world_surface.recalculate(&get_block); + } +} + +/// A function used to compute heightmaps. +pub trait HeightmapFunction { + /// Returns whether a block should be considered + /// "solid" during the heightmap computation. + fn is_solid(block: BlockId) -> bool; +} + +#[derive(Debug, Clone)] +pub struct LightBlocking; +impl HeightmapFunction for LightBlocking { + fn is_solid(block: BlockId) -> bool { + block.is_opaque() + } +} + +#[derive(Debug, Clone)] +pub struct MotionBlocking; +impl HeightmapFunction for MotionBlocking { + fn is_solid(block: BlockId) -> bool { + block.is_solid() || block.is_fluid() + } +} + +#[derive(Debug, Clone)] +pub struct MotionBlockingNoLeaves; +impl HeightmapFunction for MotionBlockingNoLeaves { + fn is_solid(block: BlockId) -> bool { + (block.is_solid() || block.is_fluid()) + && block.simplified_kind() != SimplifiedBlockKind::Leaves + } +} + +#[derive(Debug, Clone)] +pub struct OceanFloor; +impl HeightmapFunction for OceanFloor { + fn is_solid(block: BlockId) -> bool { + block.is_solid() + } +} + +#[derive(Debug, Clone)] +pub struct WorldSurface; +impl HeightmapFunction for WorldSurface { + fn is_solid(block: BlockId) -> bool { + !block.is_air() + } +} + +#[derive(Debug, Clone)] +pub struct Heightmap { + heights: PackedArray, + _marker: PhantomData, +} + +impl Default for Heightmap +where + F: HeightmapFunction, +{ + fn default() -> Self { + Self::new() + } +} + +impl Heightmap +where + F: HeightmapFunction, +{ + pub fn new() -> Self { + Self { + heights: PackedArray::new(256, 9), + _marker: PhantomData, + } + } + + pub fn set_height(&mut self, x: usize, z: usize, height: usize) { + let index = self.index(x, z); + self.heights.set(index, height as u64); + } + + pub fn height(&self, x: usize, z: usize) -> Option { + let index = self.index(x, z); + self.heights.get(index).map(|x| x as usize) + } + + pub fn as_u64_slice(&self) -> &[u64] { + self.heights.as_u64_slice() + } + + fn index(&self, x: usize, z: usize) -> usize { + (z << 4) | x + } + + /// Updates this height map after a block has been updated. + pub fn update( + &mut self, + x: usize, + y: usize, + z: usize, + old_block: BlockId, + new_block: BlockId, + get_block: impl Fn(usize, usize, usize) -> BlockId, + ) { + if F::is_solid(old_block) && self.height(x, z) == Some(y) { + // This was old the highest block + for i in (0..y).rev() { + let block = get_block(x, i, z); + + if F::is_solid(block) { + self.set_height(x, z, i + 1); + break; + } + } + } + if F::is_solid(new_block) && self.height(x, z).unwrap() < y { + // This is the new highest block + self.set_height(x, z, y); + } + } + + /// Recalculates this entire heightmap. + pub fn recalculate(&mut self, get_block: impl Fn(usize, usize, usize) -> BlockId) { + for x in 0..CHUNK_WIDTH { + 'outer: for z in 0..CHUNK_WIDTH { + for y in (0..CHUNK_HEIGHT).rev() { + if F::is_solid(get_block(x, y, z)) { + self.set_height(x, z, y + 1); + continue 'outer; + } + } + } + } + } +} diff --git a/crates/base/src/chunk/light.rs b/crates/base/src/chunk/light.rs new file mode 100644 index 000000000..ded6beb87 --- /dev/null +++ b/crates/base/src/chunk/light.rs @@ -0,0 +1,81 @@ +use crate::ChunkSection; + +use super::{PackedArray, SECTION_VOLUME}; + +/// Contains light data for a chunk section. +#[derive(Debug, Clone)] +pub struct LightStore { + block_light: PackedArray, + sky_light: PackedArray, +} + +impl Default for LightStore { + fn default() -> Self { + Self::new() + } +} + +impl LightStore { + /// Creates a `LightStore` with all light set to 15. + pub fn new() -> Self { + let mut this = LightStore { + block_light: PackedArray::new(SECTION_VOLUME, 4), + sky_light: PackedArray::new(SECTION_VOLUME, 4), + }; + fill_with_default_light(&mut this.block_light); + fill_with_default_light(&mut this.sky_light); + this + } + + /// Creates a `LightStore` from packed arrays. + pub fn from_packed_arrays(block_light: PackedArray, sky_light: PackedArray) -> Option { + if block_light.len() != SECTION_VOLUME + || sky_light.len() != SECTION_VOLUME + || block_light.bits_per_value() != 4 + || sky_light.bits_per_value() != 4 + { + None + } else { + Some(Self { + block_light, + sky_light, + }) + } + } + + pub fn block_light_at(&self, x: usize, y: usize, z: usize) -> Option { + let index = ChunkSection::block_index(x, y, z)?; + self.block_light.get(index).map(|x| x as u8) + } + + pub fn sky_light_at(&self, x: usize, y: usize, z: usize) -> Option { + let index = ChunkSection::block_index(x, y, z)?; + self.sky_light.get(index).map(|x| x as u8) + } + + pub fn set_block_light_at(&mut self, x: usize, y: usize, z: usize, light: u8) -> Option<()> { + let index = ChunkSection::block_index(x, y, z)?; + self.block_light.set(index, light.min(15) as u64); + Some(()) + } + + pub fn set_sky_light_at(&mut self, x: usize, y: usize, z: usize, light: u8) -> Option<()> { + let index = ChunkSection::block_index(x, y, z)?; + self.sky_light.set(index, light.min(15) as u64); + Some(()) + } + + pub fn block_light(&self) -> &PackedArray { + &self.block_light + } + + pub fn sky_light(&self) -> &PackedArray { + &self.sky_light + } +} + +fn fill_with_default_light(arr: &mut PackedArray) { + for i in 0..arr.len() { + arr.set(i, 15); + } +} diff --git a/crates/base/src/chunk/packed_array.rs b/crates/base/src/chunk/packed_array.rs new file mode 100644 index 000000000..a1c60704f --- /dev/null +++ b/crates/base/src/chunk/packed_array.rs @@ -0,0 +1,259 @@ +/// A packed array of integers where each integer consumes +/// `n` bits. Used to store block data in chunks. +#[derive(Debug, Clone)] +pub struct PackedArray { + length: usize, + bits_per_value: usize, + bits: Vec, +} + +impl PackedArray { + /// Creates a new `PackedArray` with the given length + /// and number of bits per value. Values are initialized + /// to zero. + /// + /// # Panics + /// Panics if `bits_per_value > 64`. + pub fn new(length: usize, bits_per_value: usize) -> Self { + let mut this = Self { + length, + bits_per_value, + bits: Vec::new(), + }; + let needed_u64s = this.needed_u64s(); + this.bits = vec![0u64; needed_u64s]; + + this + } + + /// Creates a `PackedArray` from raw `u64` data + /// and a length. + pub fn from_u64_vec(bits: Vec, length: usize) -> Self { + let bits_per_value = bits.len() * 64 / length; + Self { + length, + bits_per_value, + bits, + } + } + + /// Gets the value at the given index. + #[inline] + pub fn get(&self, index: usize) -> Option { + if index >= self.len() { + return None; + } + + let (u64_index, bit_index) = self.indexes(index); + + let u64 = self.bits[u64_index]; + Some((u64 >> bit_index) & self.mask()) + } + + /// Sets the value at the given index. + /// + /// # Panics + /// Panics if `index >= self.length()` or `value > self.max_value()`. + #[inline] + pub fn set(&mut self, index: usize, value: u64) { + assert!( + index < self.len(), + "index out of bounds: index is {}; length is {}", + index, + self.len() + ); + + let mask = self.mask(); + assert!(value <= mask); + + let (u64_index, bit_index) = self.indexes(index); + + let u64 = &mut self.bits[u64_index]; + *u64 &= !(mask << bit_index); + *u64 |= value << bit_index; + } + + /// Returns an iterator over values in this array. + pub fn iter(&self) -> impl Iterator + '_ { + let values_per_u64 = self.values_per_u64(); + let bits_per_value = self.bits_per_value() as u64; + let mask = self.mask(); + let length = self.len(); + + self.bits + .iter() + .flat_map(move |&u64| { + (0..values_per_u64).map(move |i| (u64 >> (i as u64 * bits_per_value)) & mask) + }) + .take(length) + } + + /// Resizes this packed array to a new bits per value. + pub fn resized(&mut self, new_bits_per_value: usize) -> PackedArray { + Self::from_iter(self.iter(), new_bits_per_value) + } + + /// Collects an iterator into a `PackedArray`. + pub fn from_iter(iter: impl IntoIterator, bits_per_value: usize) -> Self { + assert!(bits_per_value <= 64); + let iter = iter.into_iter(); + let mut bits = Vec::with_capacity(iter.size_hint().0); + + let mut current_u64 = 0u64; + let mut current_offset = 0; + let mut length = 0; + + for value in iter { + debug_assert!(value < 1 << bits_per_value); + current_u64 |= value << current_offset; + + current_offset += bits_per_value; + if current_offset > 64 - bits_per_value { + bits.push(current_u64); + current_offset = 0; + current_u64 = 0; + } + + length += 1; + } + + if current_offset != 0 { + bits.push(current_u64); + } + + Self { + bits, + bits_per_value, + length, + } + } + + /// Returns the maximum value of an integer in this packed array. + #[inline] + pub fn max_value(&self) -> u64 { + self.mask() + } + + /// Returns the length of this packed array. + #[inline] + pub fn len(&self) -> usize { + self.length + } + + /// Determines whether the length of this array is 0. + #[inline] + pub fn is_empty(&self) -> bool { + self.len() == 0 + } + + /// Returns the number of bits used to represent each value. + #[inline] + pub fn bits_per_value(&self) -> usize { + self.bits_per_value + } + + /// Gets the raw `u64` data. + pub fn as_u64_slice(&self) -> &[u64] { + &self.bits + } + + fn mask(&self) -> u64 { + (1 << self.bits_per_value) - 1 + } + + fn needed_u64s(&self) -> usize { + (self.length + self.values_per_u64() - 1) / self.values_per_u64() + } + + fn values_per_u64(&self) -> usize { + 64 / self.bits_per_value + } + + fn indexes(&self, index: usize) -> (usize, usize) { + let u64_index = index / self.values_per_u64(); + let bit_index = (index % self.values_per_u64()) * self.bits_per_value; + + (u64_index, bit_index) + } +} + +#[cfg(test)] +mod tests { + use super::*; + use rand::{Rng, SeedableRng}; + use rand_pcg::Pcg64Mcg; + + #[test] + fn smoke() { + let length = 100; + let mut array = PackedArray::new(length, 10); + assert_eq!(array.len(), length); + assert_eq!(array.bits_per_value(), 10); + assert_eq!(array.bits.len(), 17); + + for i in 0..length { + assert_eq!(array.get(i), Some(0)); + array.set(i, (i * 10) as u64); + assert_eq!(array.get(i), Some((i * 10) as u64)); + } + } + + #[test] + fn out_of_bounds() { + let array = PackedArray::new(97, 10); + assert_eq!(array.bits.len(), 17); + assert_eq!(array.get(96), Some(0)); + assert_eq!(array.get(97), None); + } + + #[test] + fn iter() { + let mut array = PackedArray::new(10_000, 10); + let mut rng = Pcg64Mcg::seed_from_u64(10); + let mut oracle = Vec::new(); + + for i in 0..array.len() { + let value = rng.gen_range(0..1024); + oracle.push(value); + array.set(i, value); + assert_eq!(array.get(i), Some(value)); + } + + for (i, &oracle_value) in oracle.iter().enumerate() { + assert_eq!(array.get(i), Some(oracle_value)); + } + + for (value, &oracle_value) in array.iter().zip(oracle.iter()) { + assert_eq!(value, oracle_value); + } + } + + #[test] + fn resize() { + let mut rng = Pcg64Mcg::seed_from_u64(11); + + let length = 1024; + let mut array = PackedArray::new(length, 1); + + let mut oracle = Vec::new(); + for new_bits_per_value in 2..=16 { + for i in 0..array.len() { + let value = rng.gen_range(0..array.max_value() + 1); + array.set(i, value); + oracle.push(value); + } + + for (i, &oracle_value) in oracle.iter().enumerate() { + assert_eq!(array.get(i), Some(oracle_value)); + } + + array = array.resized(new_bits_per_value); + + for (i, &oracle_value) in oracle.iter().enumerate() { + assert_eq!(array.get(i), Some(oracle_value)); + } + + oracle.clear(); + } + } +} diff --git a/crates/base/src/chunk/palette.rs b/crates/base/src/chunk/palette.rs new file mode 100644 index 000000000..e57ff54ad --- /dev/null +++ b/crates/base/src/chunk/palette.rs @@ -0,0 +1,135 @@ +use blocks::BlockId; + +/// Stores the set of distinct `BlockId`s in a chunk section. +/// +/// Empty entries in the palette default to air. +/// +/// The entry with index 0 is always air. +#[derive(Debug, Clone)] +pub struct Palette { + blocks: Vec, + free_indices: Vec, +} + +impl Default for Palette { + fn default() -> Self { + Self::new() + } +} + +#[allow(clippy::clippy::len_without_is_empty)] // palette is never empty +impl Palette { + /// Creates an empty palette. + pub fn new() -> Self { + Self { + blocks: vec![BlockId::air()], + free_indices: Vec::new(), + } + } + + /// Gets the blocks in this palette as a slice. + pub fn as_slice(&self) -> &[BlockId] { + &self.blocks + } + + /// Gets the index in the palette of `block`. + /// Inserts the block into the palette if it + /// does not already exist. + pub fn index_or_insert(&mut self, block: BlockId) -> usize { + match self.index_of(block) { + Some(i) => i, + None => self.insert(block), + } + } + + fn insert(&mut self, block: BlockId) -> usize { + match self.free_indices.pop() { + Some(i) => { + self.blocks[i] = block; + i + } + None => { + let i = self.blocks.len(); + self.blocks.push(block); + i + } + } + } + + /// Gets the block at index `i`, or air if + /// the palette does not contain `i`. + pub fn get(&self, index: usize) -> BlockId { + self.blocks.get(index).copied().unwrap_or_else(BlockId::air) + } + + /// Gets the number of blocks in the palette. + pub fn len(&self) -> usize { + self.blocks.len() + } + + /// Removes the given block from this palette. + pub fn remove(&mut self, block: BlockId) { + if let Some(index) = self.index_of(block) { + self.blocks[index] = BlockId::air(); + self.free_indices.push(index); + } + } + + fn index_of(&self, block: BlockId) -> Option { + self.blocks.iter().position(|b| *b == block) + } +} + +#[cfg(test)] +mod tests { + use ahash::AHashMap; + use blocks::BlockId; + + use super::*; + + #[test] + fn add_blocks() { + let mut palette = Palette::new(); + + for i in 0..100 { + let index = palette.index_or_insert(BlockId::from_vanilla_id(i)); + assert_eq!(index, i as usize); + assert_eq!(palette.get(index), BlockId::from_vanilla_id(i)); + } + + assert_eq!(palette.len(), 100); + } + + #[test] + fn empty_entries_are_air() { + let palette = Palette::new(); + assert_eq!(palette.get(0), BlockId::air()); + } + + #[test] + fn remove_blocks() { + let mut palette = Palette::new(); + + let mut mapping: AHashMap = AHashMap::new(); + + for i in 0..100 { + let block = BlockId::from_vanilla_id(i); + let index = palette.index_or_insert(BlockId::from_vanilla_id(i)); + if i % 2 == 0 { + palette.remove(block); + } else { + mapping.insert(block, index); + } + } + + assert_eq!(palette.len(), 50); + + for i in 0..100 { + if i % 2 == 0 { + continue; + } + let block = BlockId::from_vanilla_id(i); + assert_eq!(palette.index_or_insert(block), mapping[&block]); + } + } +} diff --git a/crates/base/src/inventory.rs b/crates/base/src/inventory.rs new file mode 100644 index 000000000..1351f771d --- /dev/null +++ b/crates/base/src/inventory.rs @@ -0,0 +1,32 @@ +//! Constants representing various standard inventory slot indices +//! for the `Player` window +//! Deprecated; mainly exists for interop with world saves. + +pub const SLOT_CRAFTING_OUTPUT: usize = 0; +pub const SLOT_CRAFTING_INPUT_X0_Y0: usize = 1; +pub const SLOT_CRAFTING_INPUT_X1_Y0: usize = 2; +pub const SLOT_CRAFTING_INPUT_X0_Y1: usize = 3; +pub const SLOT_CRAFTING_INPUT_X1_Y1: usize = 4; + +pub const SLOT_ARMOR_MIN: usize = 5; +pub const SLOT_ARMOR_MAX: usize = 8; + +pub const SLOT_ARMOR_HEAD: usize = 5; +pub const SLOT_ARMOR_CHEST: usize = 6; +pub const SLOT_ARMOR_LEGS: usize = 7; +pub const SLOT_ARMOR_FEET: usize = 8; + +pub const SLOT_OFFHAND: usize = 45; + +pub const SLOT_INVENTORY_OFFSET: usize = 9; +pub const SLOT_HOTBAR_OFFSET: usize = 36; + +pub const HOTBAR_SIZE: usize = 9; +pub const INVENTORY_SIZE: usize = 27; + +pub const SLOT_ENTITY_EQUIPMENT_MAIN_HAND: usize = 0; +pub const SLOT_ENTITY_EQUIPMENT_OFF_HAND: usize = 1; +pub const SLOT_ENTITY_EQUIPMENT_BOOTS: usize = 2; +pub const SLOT_ENTITY_EQUIPMENT_LEGGINGS: usize = 3; +pub const SLOT_ENTITY_EQUIPMENT_CHESTPLATE: usize = 4; +pub const SLOT_ENTITY_EQUIPMENT_HELMET: usize = 5; diff --git a/crates/base/src/lib.rs b/crates/base/src/lib.rs new file mode 100644 index 000000000..3e1dcdc12 --- /dev/null +++ b/crates/base/src/lib.rs @@ -0,0 +1,53 @@ +//! Core functionality for Feather. This crate primarily +//! implements or reexports essential data structures, such as: +//! * Inventories +//! * The block ID system +//! * The chunk data structure + +use std::time::Duration; + +use num_derive::{FromPrimitive, ToPrimitive}; +use serde::{Deserialize, Serialize}; + +pub mod anvil; +pub mod chunk; +pub mod inventory; +pub mod metadata; +pub mod text; +mod world; + +pub use blocks::*; +pub use chunk::{Chunk, ChunkSection, CHUNK_HEIGHT, CHUNK_WIDTH}; +pub use generated::{Area, Biome, EntityKind, Inventory, Item, ItemStack, Particle}; +pub use libcraft_core::{position, vec3, BlockPosition, ChunkPosition, Gamemode, Position, Vec3d}; +#[doc(inline)] +pub use metadata::EntityMetadata; +pub use text::{deserialize_text, Text}; + +/// Number of updates (ticks) to do per second. +pub const TPS: u32 = 20; +/// The number of milliseconds per tick. +pub const TICK_MILLIS: u32 = 1000 / TPS; +/// The duration of a tick. +pub const TICK_DURATION: Duration = Duration::from_millis(TICK_MILLIS as u64); + +/// Default port for Minecraft servers. +pub const DEFAULT_PORT: u16 = 25565; + +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, FromPrimitive, ToPrimitive)] +pub enum Direction { + North, + South, + East, + West, +} + +/// A profile property, which stores metadata +/// for some player's account. This is usually +/// used to store skin data. +#[derive(Debug, Clone, Serialize, Deserialize)] +pub struct ProfileProperty { + pub name: String, + pub value: String, + pub signature: String, +} diff --git a/core/entity_metadata/src/lib.rs b/crates/base/src/metadata.rs similarity index 94% rename from core/entity_metadata/src/lib.rs rename to crates/base/src/metadata.rs index 1858493b8..852f95504 100644 --- a/core/entity_metadata/src/lib.rs +++ b/crates/base/src/metadata.rs @@ -1,15 +1,15 @@ -//! This module implements handling of the entity +//! This module implements the entity //! metadata format. See https://wiki.vg/Entity_metadata //! for the specification. +use crate::{BlockPosition, Direction}; use bitflags::bitflags; -use feather_inventory::Slot; -use feather_util::{BlockPosition, Direction}; +use generated::ItemStack; use std::collections::BTreeMap; use uuid::Uuid; -type OptUuid = Option; -type OptChat = Option; +pub type OptUuid = Option; +pub type OptChat = Option; // Meta index constants. pub const META_INDEX_ENTITY_BITMASK: u8 = 0; @@ -43,7 +43,7 @@ pub enum MetaEntry { String(String), Chat(String), OptChat(Option), - Slot(Slot), + Slot(Option), Boolean(bool), Rotation(f32, f32, f32), Position(BlockPosition), @@ -106,9 +106,9 @@ impl ToMetaEntry for bool { } } -impl ToMetaEntry for Slot { +impl ToMetaEntry for Option { fn to_meta_entry(&self) -> MetaEntry { - MetaEntry::Slot(*self) + MetaEntry::Slot(self.clone()) } } diff --git a/core/text/src/lib.rs b/crates/base/src/text.rs similarity index 97% rename from core/text/src/lib.rs rename to crates/base/src/text.rs index ee373e891..c72cee335 100644 --- a/core/text/src/lib.rs +++ b/crates/base/src/text.rs @@ -1,4 +1,6 @@ -use serde::{Deserialize, Deserializer, Serialize, Serializer}; +//! Implementation of the Minecraft chat component format. + +use serde::{de, Deserialize, Deserializer, Serialize, Serializer}; use std::borrow::Cow; use std::fmt::{self, Display, Formatter}; use std::str::FromStr; @@ -6,8 +8,11 @@ use uuid::Uuid; pub mod markdown; +#[derive(Debug, thiserror::Error)] pub enum TextConversionError { + #[error("'{0}' is not a recognized color")] InvalidColor(String), + #[error("'{0}' is not a recognized style type")] InvalidStyle(String), } @@ -1017,6 +1022,18 @@ impl std::ops::Add for Text { } } +/// A `Deserialize` impl for `Text` which uses the text markdown format. +pub fn deserialize_text<'de, D>(deserializer: D) -> Result +where + D: Deserializer<'de>, +{ + let string = String::deserialize(deserializer)?; + + let component = markdown::translator::translate_text(&string) + .map_err(|e| de::Error::custom(e.to_string()))?; + Ok(Text::Component(Box::new(component))) +} + /// Ensures Text is either an Array or Object. /// This is required at some places when sending to the client. pub struct TextRoot(Text); diff --git a/core/text/src/markdown.rs b/crates/base/src/text/markdown.rs similarity index 100% rename from core/text/src/markdown.rs rename to crates/base/src/text/markdown.rs diff --git a/core/text/src/markdown/lexer.rs b/crates/base/src/text/markdown/lexer.rs similarity index 100% rename from core/text/src/markdown/lexer.rs rename to crates/base/src/text/markdown/lexer.rs diff --git a/core/text/src/markdown/parser.rs b/crates/base/src/text/markdown/parser.rs similarity index 99% rename from core/text/src/markdown/parser.rs rename to crates/base/src/text/markdown/parser.rs index 5095c5511..c4e502b76 100644 --- a/core/text/src/markdown/parser.rs +++ b/crates/base/src/text/markdown/parser.rs @@ -91,7 +91,7 @@ pub fn tokens_to_text(tokens: Vec) -> Token { } let trimmed = s.trim(); - if s.starts_with(' ') && trimmed != "" { + if s.starts_with(' ') && !trimmed.is_empty() { let first_span = &tokens[1].span; let t = TokenType::Text(trimmed.to_string()); let span = DynamicSpan::new( @@ -236,7 +236,7 @@ pub fn parse_tokens(brace_delimited: bool) -> impl Fn(Tokens) -> IResult) -> Result"] +edition = "2018" + +[dependencies] +feather-generated = { path = "../generated" } +once_cell = { version = "1" } +anyhow = "1" +thiserror = "1" +num-traits = "0.2" +serde = { version = "1", features = ["derive"] } +bincode = "1" +vek = "0.12" diff --git a/crates/blocks/generator/Cargo.toml b/crates/blocks/generator/Cargo.toml new file mode 100644 index 000000000..d92d6c62f --- /dev/null +++ b/crates/blocks/generator/Cargo.toml @@ -0,0 +1,26 @@ +[package] +name = "feather-blocks-generator" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" + +[lib] +name = "feather_blocks_generator" +path = "src/lib.rs" + +[[bin]] +name = "feather-blocks-generator" +path = "src/main.rs" + +[dependencies] +serde = { version = "1", features = ["derive"] } +serde_json = "1" +anyhow = "1" +indexmap = { version = "1", features = ["serde-1"] } +quote = "1" +syn = "1" +proc-macro2 = "1" +heck = "0.3" +once_cell = "1" +maplit = "1" +bincode = "1" diff --git a/core/blocks/generator/src/lib.rs b/crates/blocks/generator/src/lib.rs similarity index 99% rename from core/blocks/generator/src/lib.rs rename to crates/blocks/generator/src/lib.rs index ffdefdcad..8405394eb 100644 --- a/core/blocks/generator/src/lib.rs +++ b/crates/blocks/generator/src/lib.rs @@ -3,12 +3,12 @@ use heck::CamelCase; use heck::SnakeCase; use proc_macro2::{Ident, TokenStream}; use quote::quote; +use quote::ToTokens; use serde::ser::{SerializeSeq, SerializeStruct}; use serde::{Serialize, Serializer}; use std::collections::BTreeMap; use std::ops::RangeInclusive; use std::str::FromStr; -use syn::export::ToTokens; mod load; diff --git a/core/blocks/generator/src/load.rs b/crates/blocks/generator/src/load.rs similarity index 97% rename from core/blocks/generator/src/load.rs rename to crates/blocks/generator/src/load.rs index e0ad40d3c..232a6e3ea 100644 --- a/core/blocks/generator/src/load.rs +++ b/crates/blocks/generator/src/load.rs @@ -2,6 +2,7 @@ //! converts this report into a `Blocks`. use crate::{Block, Blocks, Property, PropertyKind}; +use anyhow::Context; use heck::CamelCase; use indexmap::map::IndexMap; use once_cell::sync::Lazy; @@ -352,7 +353,8 @@ pub fn ident(x: impl AsRef) -> Ident { } fn parse_report() -> anyhow::Result { - let report = serde_json::from_slice(feather_data::minecraft::BLOCKS)?; + let report = std::fs::read_to_string("blocks.json") + .context("failed to load blocks report. Please run the vanilla data generator and copy blocks.json to the current directory")?; - Ok(report) + Ok(serde_json::from_str(&report)?) } diff --git a/core/blocks/build.rs b/crates/blocks/generator/src/main.rs similarity index 86% rename from core/blocks/build.rs rename to crates/blocks/generator/src/main.rs index 919adad74..3f30d7e07 100644 --- a/core/blocks/build.rs +++ b/crates/blocks/generator/src/main.rs @@ -6,7 +6,7 @@ use std::process::Command; fn main() { match feather_blocks_generator::generate() { Ok(code) => { - let base = concat!(env!("CARGO_MANIFEST_DIR"), "/src/generated"); + let base = concat!(env!("CARGO_MANIFEST_DIR"), "/../src/generated"); let _ = std::fs::create_dir_all(base); @@ -33,11 +33,6 @@ fn main() { .unwrap() .write_all(&code.vanilla_ids_serialized) .unwrap(); - - println!( - "cargo:rerun-if-changed={}", - concat!(env!("CARGO_MANIFEST_DIR"), "/../../data") - ); } Err(e) => { eprintln!("An error occurred: {}", e); diff --git a/core/blocks/src/categories.rs b/crates/blocks/src/categories.rs similarity index 98% rename from core/blocks/src/categories.rs rename to crates/blocks/src/categories.rs index d53dc530d..7529310e3 100644 --- a/core/blocks/src/categories.rs +++ b/crates/blocks/src/categories.rs @@ -1,5 +1,5 @@ use crate::{BlockId, BlockKind}; -use feather_definitions::SimplifiedBlockKind; +use feather_generated::SimplifiedBlockKind; #[derive(Copy, Clone, Debug, Eq, PartialEq)] pub enum PlacementType { @@ -40,7 +40,7 @@ impl BlockId { #[inline] pub fn is_opaque(self) -> bool { - self.kind().opaque() + !self.kind().transparent() } #[inline] @@ -209,6 +209,6 @@ impl BlockId { #[inline] pub fn is_full_block(self) -> bool { - self.kind().full_block() + self.kind().solid() } } diff --git a/core/blocks/src/directions.rs b/crates/blocks/src/directions.rs similarity index 89% rename from core/blocks/src/directions.rs rename to crates/blocks/src/directions.rs index 2f52d2b2c..a4c9d164e 100644 --- a/core/blocks/src/directions.rs +++ b/crates/blocks/src/directions.rs @@ -1,5 +1,5 @@ use crate::{AxisXyz, FacingCardinal, FacingCardinalAndDown, FacingCubic}; -use feather_util::BlockPosition; +use vek::Vec3; impl FacingCardinal { pub fn opposite(self) -> FacingCardinal { @@ -55,7 +55,7 @@ impl FacingCardinal { self.to_facing_cubic().axis() } - pub fn offset(self) -> BlockPosition { + pub fn offset(self) -> Vec3 { self.to_facing_cubic().offset() } } @@ -99,7 +99,7 @@ impl FacingCardinalAndDown { self.to_facing_cubic().axis() } - pub fn offset(self) -> BlockPosition { + pub fn offset(self) -> Vec3 { self.to_facing_cubic().offset() } } @@ -149,14 +149,14 @@ impl FacingCubic { } } - pub fn offset(self) -> BlockPosition { + pub fn offset(self) -> Vec3 { match self { - FacingCubic::North => BlockPosition { x: 0, y: 0, z: -1 }, - FacingCubic::East => BlockPosition { x: 1, y: 0, z: 0 }, - FacingCubic::South => BlockPosition { x: 0, y: 0, z: 1 }, - FacingCubic::West => BlockPosition { x: -1, y: 0, z: 0 }, - FacingCubic::Up => BlockPosition { x: 0, y: 1, z: 0 }, - FacingCubic::Down => BlockPosition { x: 0, y: -1, z: 0 }, + FacingCubic::North => Vec3 { x: 0, y: 0, z: -1 }, + FacingCubic::East => Vec3 { x: 1, y: 0, z: 0 }, + FacingCubic::South => Vec3 { x: 0, y: 0, z: 1 }, + FacingCubic::West => Vec3 { x: -1, y: 0, z: 0 }, + FacingCubic::Up => Vec3 { x: 0, y: 1, z: 0 }, + FacingCubic::Down => Vec3 { x: 0, y: -1, z: 0 }, } } } diff --git a/core/blocks/src/generated/block_fns.rs b/crates/blocks/src/generated/block_fns.rs similarity index 74% rename from core/blocks/src/generated/block_fns.rs rename to crates/blocks/src/generated/block_fns.rs index a58cc8b76..f3eaaa1ad 100644 --- a/core/blocks/src/generated/block_fns.rs +++ b/crates/blocks/src/generated/block_fns.rs @@ -284,6 +284,14 @@ impl BlockId { }; block } + #[doc = "Returns an instance of `nether_gold_ore` with default state values."] + pub fn nether_gold_ore() -> Self { + let mut block = Self { + kind: BlockKind::NetherGoldOre, + state: 0, + }; + block + } #[doc = "Returns an instance of `oak_log` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] pub fn oak_log() -> Self { let mut block = Self { @@ -500,63 +508,63 @@ impl BlockId { block.set_axis_xyz(AxisXyz::Y); block } - #[doc = "Returns an instance of `oak_leaves` with default state values.\nThe default state values are as follows:\n* `distance`: 7\n* `persistent`: false\n"] + #[doc = "Returns an instance of `oak_leaves` with default state values.\nThe default state values are as follows:\n* `distance_1_7`: 7\n* `persistent`: false\n"] pub fn oak_leaves() -> Self { let mut block = Self { kind: BlockKind::OakLeaves, state: 0, }; - block.set_distance(7i32); + block.set_distance_1_7(7i32); block.set_persistent(false); block } - #[doc = "Returns an instance of `spruce_leaves` with default state values.\nThe default state values are as follows:\n* `distance`: 7\n* `persistent`: false\n"] + #[doc = "Returns an instance of `spruce_leaves` with default state values.\nThe default state values are as follows:\n* `distance_1_7`: 7\n* `persistent`: false\n"] pub fn spruce_leaves() -> Self { let mut block = Self { kind: BlockKind::SpruceLeaves, state: 0, }; - block.set_distance(7i32); + block.set_distance_1_7(7i32); block.set_persistent(false); block } - #[doc = "Returns an instance of `birch_leaves` with default state values.\nThe default state values are as follows:\n* `distance`: 7\n* `persistent`: false\n"] + #[doc = "Returns an instance of `birch_leaves` with default state values.\nThe default state values are as follows:\n* `distance_1_7`: 7\n* `persistent`: false\n"] pub fn birch_leaves() -> Self { let mut block = Self { kind: BlockKind::BirchLeaves, state: 0, }; - block.set_distance(7i32); + block.set_distance_1_7(7i32); block.set_persistent(false); block } - #[doc = "Returns an instance of `jungle_leaves` with default state values.\nThe default state values are as follows:\n* `distance`: 7\n* `persistent`: false\n"] + #[doc = "Returns an instance of `jungle_leaves` with default state values.\nThe default state values are as follows:\n* `distance_1_7`: 7\n* `persistent`: false\n"] pub fn jungle_leaves() -> Self { let mut block = Self { kind: BlockKind::JungleLeaves, state: 0, }; - block.set_distance(7i32); + block.set_distance_1_7(7i32); block.set_persistent(false); block } - #[doc = "Returns an instance of `acacia_leaves` with default state values.\nThe default state values are as follows:\n* `distance`: 7\n* `persistent`: false\n"] + #[doc = "Returns an instance of `acacia_leaves` with default state values.\nThe default state values are as follows:\n* `distance_1_7`: 7\n* `persistent`: false\n"] pub fn acacia_leaves() -> Self { let mut block = Self { kind: BlockKind::AcaciaLeaves, state: 0, }; - block.set_distance(7i32); + block.set_distance_1_7(7i32); block.set_persistent(false); block } - #[doc = "Returns an instance of `dark_oak_leaves` with default state values.\nThe default state values are as follows:\n* `distance`: 7\n* `persistent`: false\n"] + #[doc = "Returns an instance of `dark_oak_leaves` with default state values.\nThe default state values are as follows:\n* `distance_1_7`: 7\n* `persistent`: false\n"] pub fn dark_oak_leaves() -> Self { let mut block = Self { kind: BlockKind::DarkOakLeaves, state: 0, }; - block.set_distance(7i32); + block.set_distance_1_7(7i32); block.set_persistent(false); block } @@ -1139,6 +1147,30 @@ impl BlockId { }; block } + #[doc = "Returns an instance of `cornflower` with default state values."] + pub fn cornflower() -> Self { + let mut block = Self { + kind: BlockKind::Cornflower, + state: 0, + }; + block + } + #[doc = "Returns an instance of `wither_rose` with default state values."] + pub fn wither_rose() -> Self { + let mut block = Self { + kind: BlockKind::WitherRose, + state: 0, + }; + block + } + #[doc = "Returns an instance of `lily_of_the_valley` with default state values."] + pub fn lily_of_the_valley() -> Self { + let mut block = Self { + kind: BlockKind::LilyOfTheValley, + state: 0, + }; + block + } #[doc = "Returns an instance of `brown_mushroom` with default state values."] pub fn brown_mushroom() -> Self { let mut block = Self { @@ -1243,6 +1275,14 @@ impl BlockId { block.set_west_connected(false); block } + #[doc = "Returns an instance of `soul_fire` with default state values."] + pub fn soul_fire() -> Self { + let mut block = Self { + kind: BlockKind::SoulFire, + state: 0, + }; + block + } #[doc = "Returns an instance of `spawner` with default state values."] pub fn spawner() -> Self { let mut block = Self { @@ -1339,10 +1379,60 @@ impl BlockId { block.set_lit(false); block } - #[doc = "Returns an instance of `sign` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n* `waterlogged`: false\n"] - pub fn sign() -> Self { + #[doc = "Returns an instance of `oak_sign` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n* `waterlogged`: false\n"] + pub fn oak_sign() -> Self { + let mut block = Self { + kind: BlockKind::OakSign, + state: 0, + }; + block.set_rotation(0i32); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `spruce_sign` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n* `waterlogged`: false\n"] + pub fn spruce_sign() -> Self { let mut block = Self { - kind: BlockKind::Sign, + kind: BlockKind::SpruceSign, + state: 0, + }; + block.set_rotation(0i32); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `birch_sign` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n* `waterlogged`: false\n"] + pub fn birch_sign() -> Self { + let mut block = Self { + kind: BlockKind::BirchSign, + state: 0, + }; + block.set_rotation(0i32); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `acacia_sign` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n* `waterlogged`: false\n"] + pub fn acacia_sign() -> Self { + let mut block = Self { + kind: BlockKind::AcaciaSign, + state: 0, + }; + block.set_rotation(0i32); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `jungle_sign` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n* `waterlogged`: false\n"] + pub fn jungle_sign() -> Self { + let mut block = Self { + kind: BlockKind::JungleSign, + state: 0, + }; + block.set_rotation(0i32); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `dark_oak_sign` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n* `waterlogged`: false\n"] + pub fn dark_oak_sign() -> Self { + let mut block = Self { + kind: BlockKind::DarkOakSign, state: 0, }; block.set_rotation(0i32); @@ -1393,10 +1483,60 @@ impl BlockId { block.set_waterlogged(false); block } - #[doc = "Returns an instance of `wall_sign` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: false\n"] - pub fn wall_sign() -> Self { + #[doc = "Returns an instance of `oak_wall_sign` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: false\n"] + pub fn oak_wall_sign() -> Self { + let mut block = Self { + kind: BlockKind::OakWallSign, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `spruce_wall_sign` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: false\n"] + pub fn spruce_wall_sign() -> Self { + let mut block = Self { + kind: BlockKind::SpruceWallSign, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `birch_wall_sign` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: false\n"] + pub fn birch_wall_sign() -> Self { + let mut block = Self { + kind: BlockKind::BirchWallSign, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `acacia_wall_sign` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: false\n"] + pub fn acacia_wall_sign() -> Self { + let mut block = Self { + kind: BlockKind::AcaciaWallSign, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `jungle_wall_sign` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: false\n"] + pub fn jungle_wall_sign() -> Self { let mut block = Self { - kind: BlockKind::WallSign, + kind: BlockKind::JungleWallSign, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `dark_oak_wall_sign` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: false\n"] + pub fn dark_oak_wall_sign() -> Self { + let mut block = Self { + kind: BlockKind::DarkOakWallSign, state: 0, }; block.set_facing_cardinal(FacingCardinal::North); @@ -1626,6 +1766,49 @@ impl BlockId { }; block } + #[doc = "Returns an instance of `soul_soil` with default state values."] + pub fn soul_soil() -> Self { + let mut block = Self { + kind: BlockKind::SoulSoil, + state: 0, + }; + block + } + #[doc = "Returns an instance of `basalt` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn basalt() -> Self { + let mut block = Self { + kind: BlockKind::Basalt, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block + } + #[doc = "Returns an instance of `polished_basalt` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn polished_basalt() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBasalt, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block + } + #[doc = "Returns an instance of `soul_torch` with default state values."] + pub fn soul_torch() -> Self { + let mut block = Self { + kind: BlockKind::SoulTorch, + state: 0, + }; + block + } + #[doc = "Returns an instance of `soul_wall_torch` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn soul_wall_torch() -> Self { + let mut block = Self { + kind: BlockKind::SoulWallTorch, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block + } #[doc = "Returns an instance of `glowstone` with default state values."] pub fn glowstone() -> Self { let mut block = Self { @@ -1888,82 +2071,82 @@ impl BlockId { block.set_waterlogged(false); block } - #[doc = "Returns an instance of `infested_stone` with default state values."] - pub fn infested_stone() -> Self { + #[doc = "Returns an instance of `stone_bricks` with default state values."] + pub fn stone_bricks() -> Self { let mut block = Self { - kind: BlockKind::InfestedStone, + kind: BlockKind::StoneBricks, state: 0, }; block } - #[doc = "Returns an instance of `infested_cobblestone` with default state values."] - pub fn infested_cobblestone() -> Self { + #[doc = "Returns an instance of `mossy_stone_bricks` with default state values."] + pub fn mossy_stone_bricks() -> Self { let mut block = Self { - kind: BlockKind::InfestedCobblestone, + kind: BlockKind::MossyStoneBricks, state: 0, }; block } - #[doc = "Returns an instance of `infested_stone_bricks` with default state values."] - pub fn infested_stone_bricks() -> Self { + #[doc = "Returns an instance of `cracked_stone_bricks` with default state values."] + pub fn cracked_stone_bricks() -> Self { let mut block = Self { - kind: BlockKind::InfestedStoneBricks, + kind: BlockKind::CrackedStoneBricks, state: 0, }; block } - #[doc = "Returns an instance of `infested_mossy_stone_bricks` with default state values."] - pub fn infested_mossy_stone_bricks() -> Self { + #[doc = "Returns an instance of `chiseled_stone_bricks` with default state values."] + pub fn chiseled_stone_bricks() -> Self { let mut block = Self { - kind: BlockKind::InfestedMossyStoneBricks, + kind: BlockKind::ChiseledStoneBricks, state: 0, }; block } - #[doc = "Returns an instance of `infested_cracked_stone_bricks` with default state values."] - pub fn infested_cracked_stone_bricks() -> Self { + #[doc = "Returns an instance of `infested_stone` with default state values."] + pub fn infested_stone() -> Self { let mut block = Self { - kind: BlockKind::InfestedCrackedStoneBricks, + kind: BlockKind::InfestedStone, state: 0, }; block } - #[doc = "Returns an instance of `infested_chiseled_stone_bricks` with default state values."] - pub fn infested_chiseled_stone_bricks() -> Self { + #[doc = "Returns an instance of `infested_cobblestone` with default state values."] + pub fn infested_cobblestone() -> Self { let mut block = Self { - kind: BlockKind::InfestedChiseledStoneBricks, + kind: BlockKind::InfestedCobblestone, state: 0, }; block } - #[doc = "Returns an instance of `stone_bricks` with default state values."] - pub fn stone_bricks() -> Self { + #[doc = "Returns an instance of `infested_stone_bricks` with default state values."] + pub fn infested_stone_bricks() -> Self { let mut block = Self { - kind: BlockKind::StoneBricks, + kind: BlockKind::InfestedStoneBricks, state: 0, }; block } - #[doc = "Returns an instance of `mossy_stone_bricks` with default state values."] - pub fn mossy_stone_bricks() -> Self { + #[doc = "Returns an instance of `infested_mossy_stone_bricks` with default state values."] + pub fn infested_mossy_stone_bricks() -> Self { let mut block = Self { - kind: BlockKind::MossyStoneBricks, + kind: BlockKind::InfestedMossyStoneBricks, state: 0, }; block } - #[doc = "Returns an instance of `cracked_stone_bricks` with default state values."] - pub fn cracked_stone_bricks() -> Self { + #[doc = "Returns an instance of `infested_cracked_stone_bricks` with default state values."] + pub fn infested_cracked_stone_bricks() -> Self { let mut block = Self { - kind: BlockKind::CrackedStoneBricks, + kind: BlockKind::InfestedCrackedStoneBricks, state: 0, }; block } - #[doc = "Returns an instance of `chiseled_stone_bricks` with default state values."] - pub fn chiseled_stone_bricks() -> Self { + #[doc = "Returns an instance of `infested_chiseled_stone_bricks` with default state values."] + pub fn infested_chiseled_stone_bricks() -> Self { let mut block = Self { - kind: BlockKind::ChiseledStoneBricks, + kind: BlockKind::InfestedChiseledStoneBricks, state: 0, }; block @@ -2023,6 +2206,16 @@ impl BlockId { block.set_west_connected(false); block } + #[doc = "Returns an instance of `chain` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n* `waterlogged`: false\n"] + pub fn chain() -> Self { + let mut block = Self { + kind: BlockKind::Chain, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block.set_waterlogged(false); + block + } #[doc = "Returns an instance of `glass_pane` with default state values.\nThe default state values are as follows:\n* `east_connected`: false\n* `north_connected`: false\n* `south_connected`: false\n* `waterlogged`: false\n* `west_connected`: false\n"] pub fn glass_pane() -> Self { let mut block = Self { @@ -2387,32 +2580,32 @@ impl BlockId { }; block } - #[doc = "Returns an instance of `cobblestone_wall` with default state values.\nThe default state values are as follows:\n* `east_connected`: false\n* `north_connected`: false\n* `south_connected`: false\n* `up`: true\n* `waterlogged`: false\n* `west_connected`: false\n"] + #[doc = "Returns an instance of `cobblestone_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] pub fn cobblestone_wall() -> Self { let mut block = Self { kind: BlockKind::CobblestoneWall, state: 0, }; - block.set_east_connected(false); - block.set_north_connected(false); - block.set_south_connected(false); + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); block.set_up(true); block.set_waterlogged(false); - block.set_west_connected(false); + block.set_west_nlt(WestNlt::None); block } - #[doc = "Returns an instance of `mossy_cobblestone_wall` with default state values.\nThe default state values are as follows:\n* `east_connected`: false\n* `north_connected`: false\n* `south_connected`: false\n* `up`: true\n* `waterlogged`: false\n* `west_connected`: false\n"] + #[doc = "Returns an instance of `mossy_cobblestone_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] pub fn mossy_cobblestone_wall() -> Self { let mut block = Self { kind: BlockKind::MossyCobblestoneWall, state: 0, }; - block.set_east_connected(false); - block.set_north_connected(false); - block.set_south_connected(false); + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); block.set_up(true); block.set_waterlogged(false); - block.set_west_connected(false); + block.set_west_nlt(WestNlt::None); block } #[doc = "Returns an instance of `flower_pot` with default state values."] @@ -2559,6 +2752,30 @@ impl BlockId { }; block } + #[doc = "Returns an instance of `potted_cornflower` with default state values."] + pub fn potted_cornflower() -> Self { + let mut block = Self { + kind: BlockKind::PottedCornflower, + state: 0, + }; + block + } + #[doc = "Returns an instance of `potted_lily_of_the_valley` with default state values."] + pub fn potted_lily_of_the_valley() -> Self { + let mut block = Self { + kind: BlockKind::PottedLilyOfTheValley, + state: 0, + }; + block + } + #[doc = "Returns an instance of `potted_wither_rose` with default state values."] + pub fn potted_wither_rose() -> Self { + let mut block = Self { + kind: BlockKind::PottedWitherRose, + state: 0, + }; + block + } #[doc = "Returns an instance of `potted_red_mushroom` with default state values."] pub fn potted_red_mushroom() -> Self { let mut block = Self { @@ -2675,15 +2892,6 @@ impl BlockId { block.set_powered(false); block } - #[doc = "Returns an instance of `skeleton_wall_skull` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] - pub fn skeleton_wall_skull() -> Self { - let mut block = Self { - kind: BlockKind::SkeletonWallSkull, - state: 0, - }; - block.set_facing_cardinal(FacingCardinal::North); - block - } #[doc = "Returns an instance of `skeleton_skull` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n"] pub fn skeleton_skull() -> Self { let mut block = Self { @@ -2693,10 +2901,10 @@ impl BlockId { block.set_rotation(0i32); block } - #[doc = "Returns an instance of `wither_skeleton_wall_skull` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] - pub fn wither_skeleton_wall_skull() -> Self { + #[doc = "Returns an instance of `skeleton_wall_skull` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn skeleton_wall_skull() -> Self { let mut block = Self { - kind: BlockKind::WitherSkeletonWallSkull, + kind: BlockKind::SkeletonWallSkull, state: 0, }; block.set_facing_cardinal(FacingCardinal::North); @@ -2711,10 +2919,10 @@ impl BlockId { block.set_rotation(0i32); block } - #[doc = "Returns an instance of `zombie_wall_head` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] - pub fn zombie_wall_head() -> Self { + #[doc = "Returns an instance of `wither_skeleton_wall_skull` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn wither_skeleton_wall_skull() -> Self { let mut block = Self { - kind: BlockKind::ZombieWallHead, + kind: BlockKind::WitherSkeletonWallSkull, state: 0, }; block.set_facing_cardinal(FacingCardinal::North); @@ -2729,10 +2937,10 @@ impl BlockId { block.set_rotation(0i32); block } - #[doc = "Returns an instance of `player_wall_head` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] - pub fn player_wall_head() -> Self { + #[doc = "Returns an instance of `zombie_wall_head` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn zombie_wall_head() -> Self { let mut block = Self { - kind: BlockKind::PlayerWallHead, + kind: BlockKind::ZombieWallHead, state: 0, }; block.set_facing_cardinal(FacingCardinal::North); @@ -2747,10 +2955,10 @@ impl BlockId { block.set_rotation(0i32); block } - #[doc = "Returns an instance of `creeper_wall_head` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] - pub fn creeper_wall_head() -> Self { + #[doc = "Returns an instance of `player_wall_head` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn player_wall_head() -> Self { let mut block = Self { - kind: BlockKind::CreeperWallHead, + kind: BlockKind::PlayerWallHead, state: 0, }; block.set_facing_cardinal(FacingCardinal::North); @@ -2765,10 +2973,10 @@ impl BlockId { block.set_rotation(0i32); block } - #[doc = "Returns an instance of `dragon_wall_head` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] - pub fn dragon_wall_head() -> Self { + #[doc = "Returns an instance of `creeper_wall_head` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn creeper_wall_head() -> Self { let mut block = Self { - kind: BlockKind::DragonWallHead, + kind: BlockKind::CreeperWallHead, state: 0, }; block.set_facing_cardinal(FacingCardinal::North); @@ -2783,8 +2991,17 @@ impl BlockId { block.set_rotation(0i32); block } - #[doc = "Returns an instance of `anvil` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] - pub fn anvil() -> Self { + #[doc = "Returns an instance of `dragon_wall_head` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn dragon_wall_head() -> Self { + let mut block = Self { + kind: BlockKind::DragonWallHead, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block + } + #[doc = "Returns an instance of `anvil` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn anvil() -> Self { let mut block = Self { kind: BlockKind::Anvil, state: 0, @@ -4039,6 +4256,16 @@ impl BlockId { block.set_waterlogged(false); block } + #[doc = "Returns an instance of `smooth_stone_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn smooth_stone_slab() -> Self { + let mut block = Self { + kind: BlockKind::SmoothStoneSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block + } #[doc = "Returns an instance of `sandstone_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] pub fn sandstone_slab() -> Self { let mut block = Self { @@ -4049,6 +4276,16 @@ impl BlockId { block.set_waterlogged(false); block } + #[doc = "Returns an instance of `cut_sandstone_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn cut_sandstone_slab() -> Self { + let mut block = Self { + kind: BlockKind::CutSandstoneSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block + } #[doc = "Returns an instance of `petrified_oak_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] pub fn petrified_oak_slab() -> Self { let mut block = Self { @@ -4119,6 +4356,16 @@ impl BlockId { block.set_waterlogged(false); block } + #[doc = "Returns an instance of `cut_red_sandstone_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn cut_red_sandstone_slab() -> Self { + let mut block = Self { + kind: BlockKind::CutRedSandstoneSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block + } #[doc = "Returns an instance of `purpur_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] pub fn purpur_slab() -> Self { let mut block = Self { @@ -5283,6 +5530,96 @@ impl BlockId { block.set_waterlogged(true); block } + #[doc = "Returns an instance of `dead_tube_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn dead_tube_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::DeadTubeCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } + #[doc = "Returns an instance of `dead_brain_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn dead_brain_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::DeadBrainCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } + #[doc = "Returns an instance of `dead_bubble_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn dead_bubble_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::DeadBubbleCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } + #[doc = "Returns an instance of `dead_fire_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn dead_fire_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::DeadFireCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } + #[doc = "Returns an instance of `dead_horn_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn dead_horn_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::DeadHornCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } + #[doc = "Returns an instance of `tube_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn tube_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::TubeCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } + #[doc = "Returns an instance of `brain_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn brain_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::BrainCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } + #[doc = "Returns an instance of `bubble_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn bubble_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::BubbleCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } + #[doc = "Returns an instance of `fire_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn fire_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::FireCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } + #[doc = "Returns an instance of `horn_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn horn_coral_fan() -> Self { + let mut block = Self { + kind: BlockKind::HornCoralFan, + state: 0, + }; + block.set_waterlogged(true); + block + } #[doc = "Returns an instance of `dead_tube_coral_wall_fan` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: true\n"] pub fn dead_tube_coral_wall_fan() -> Self { let mut block = Self { @@ -5383,748 +5720,1489 @@ impl BlockId { block.set_waterlogged(true); block } - #[doc = "Returns an instance of `dead_tube_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn dead_tube_coral_fan() -> Self { + #[doc = "Returns an instance of `sea_pickle` with default state values.\nThe default state values are as follows:\n* `pickles`: 1\n* `waterlogged`: true\n"] + pub fn sea_pickle() -> Self { let mut block = Self { - kind: BlockKind::DeadTubeCoralFan, + kind: BlockKind::SeaPickle, state: 0, }; + block.set_pickles(1i32); block.set_waterlogged(true); block } - #[doc = "Returns an instance of `dead_brain_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn dead_brain_coral_fan() -> Self { + #[doc = "Returns an instance of `blue_ice` with default state values."] + pub fn blue_ice() -> Self { let mut block = Self { - kind: BlockKind::DeadBrainCoralFan, + kind: BlockKind::BlueIce, state: 0, }; - block.set_waterlogged(true); block } - #[doc = "Returns an instance of `dead_bubble_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn dead_bubble_coral_fan() -> Self { + #[doc = "Returns an instance of `conduit` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] + pub fn conduit() -> Self { let mut block = Self { - kind: BlockKind::DeadBubbleCoralFan, + kind: BlockKind::Conduit, state: 0, }; block.set_waterlogged(true); block } - #[doc = "Returns an instance of `dead_fire_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn dead_fire_coral_fan() -> Self { + #[doc = "Returns an instance of `bamboo_sapling` with default state values."] + pub fn bamboo_sapling() -> Self { let mut block = Self { - kind: BlockKind::DeadFireCoralFan, + kind: BlockKind::BambooSapling, state: 0, }; - block.set_waterlogged(true); block } - #[doc = "Returns an instance of `dead_horn_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn dead_horn_coral_fan() -> Self { + #[doc = "Returns an instance of `bamboo` with default state values.\nThe default state values are as follows:\n* `age_0_1`: 0\n* `leaves`: none\n* `stage`: 0\n"] + pub fn bamboo() -> Self { let mut block = Self { - kind: BlockKind::DeadHornCoralFan, + kind: BlockKind::Bamboo, state: 0, }; - block.set_waterlogged(true); + block.set_age_0_1(0i32); + block.set_leaves(Leaves::None); + block.set_stage(0i32); block } - #[doc = "Returns an instance of `tube_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn tube_coral_fan() -> Self { + #[doc = "Returns an instance of `potted_bamboo` with default state values."] + pub fn potted_bamboo() -> Self { let mut block = Self { - kind: BlockKind::TubeCoralFan, + kind: BlockKind::PottedBamboo, state: 0, }; - block.set_waterlogged(true); block } - #[doc = "Returns an instance of `brain_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn brain_coral_fan() -> Self { + #[doc = "Returns an instance of `void_air` with default state values."] + pub fn void_air() -> Self { let mut block = Self { - kind: BlockKind::BrainCoralFan, + kind: BlockKind::VoidAir, state: 0, }; - block.set_waterlogged(true); block } - #[doc = "Returns an instance of `bubble_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn bubble_coral_fan() -> Self { + #[doc = "Returns an instance of `cave_air` with default state values."] + pub fn cave_air() -> Self { let mut block = Self { - kind: BlockKind::BubbleCoralFan, + kind: BlockKind::CaveAir, state: 0, }; - block.set_waterlogged(true); block } - #[doc = "Returns an instance of `fire_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn fire_coral_fan() -> Self { + #[doc = "Returns an instance of `bubble_column` with default state values.\nThe default state values are as follows:\n* `drag`: true\n"] + pub fn bubble_column() -> Self { let mut block = Self { - kind: BlockKind::FireCoralFan, + kind: BlockKind::BubbleColumn, state: 0, }; - block.set_waterlogged(true); + block.set_drag(true); block } - #[doc = "Returns an instance of `horn_coral_fan` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn horn_coral_fan() -> Self { + #[doc = "Returns an instance of `polished_granite_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn polished_granite_stairs() -> Self { let mut block = Self { - kind: BlockKind::HornCoralFan, + kind: BlockKind::PolishedGraniteStairs, state: 0, }; - block.set_waterlogged(true); + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); block } - #[doc = "Returns an instance of `sea_pickle` with default state values.\nThe default state values are as follows:\n* `pickles`: 1\n* `waterlogged`: true\n"] - pub fn sea_pickle() -> Self { + #[doc = "Returns an instance of `smooth_red_sandstone_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn smooth_red_sandstone_stairs() -> Self { let mut block = Self { - kind: BlockKind::SeaPickle, + kind: BlockKind::SmoothRedSandstoneStairs, state: 0, }; - block.set_pickles(1i32); - block.set_waterlogged(true); + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); block } - #[doc = "Returns an instance of `blue_ice` with default state values."] - pub fn blue_ice() -> Self { + #[doc = "Returns an instance of `mossy_stone_brick_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn mossy_stone_brick_stairs() -> Self { let mut block = Self { - kind: BlockKind::BlueIce, + kind: BlockKind::MossyStoneBrickStairs, state: 0, }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); block } - #[doc = "Returns an instance of `conduit` with default state values.\nThe default state values are as follows:\n* `waterlogged`: true\n"] - pub fn conduit() -> Self { + #[doc = "Returns an instance of `polished_diorite_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn polished_diorite_stairs() -> Self { let mut block = Self { - kind: BlockKind::Conduit, + kind: BlockKind::PolishedDioriteStairs, state: 0, }; - block.set_waterlogged(true); + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); block } - #[doc = "Returns an instance of `void_air` with default state values."] - pub fn void_air() -> Self { + #[doc = "Returns an instance of `mossy_cobblestone_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn mossy_cobblestone_stairs() -> Self { let mut block = Self { - kind: BlockKind::VoidAir, + kind: BlockKind::MossyCobblestoneStairs, state: 0, }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); block } - #[doc = "Returns an instance of `cave_air` with default state values."] - pub fn cave_air() -> Self { + #[doc = "Returns an instance of `end_stone_brick_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn end_stone_brick_stairs() -> Self { let mut block = Self { - kind: BlockKind::CaveAir, + kind: BlockKind::EndStoneBrickStairs, state: 0, }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); block } - #[doc = "Returns an instance of `bubble_column` with default state values.\nThe default state values are as follows:\n* `drag`: true\n"] - pub fn bubble_column() -> Self { + #[doc = "Returns an instance of `stone_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn stone_stairs() -> Self { let mut block = Self { - kind: BlockKind::BubbleColumn, + kind: BlockKind::StoneStairs, state: 0, }; - block.set_drag(true); + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); block } - #[doc = "Returns an instance of `structure_block` with default state values.\nThe default state values are as follows:\n* `structure_block_mode`: save\n"] - pub fn structure_block() -> Self { + #[doc = "Returns an instance of `smooth_sandstone_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn smooth_sandstone_stairs() -> Self { let mut block = Self { - kind: BlockKind::StructureBlock, + kind: BlockKind::SmoothSandstoneStairs, state: 0, }; - block.set_structure_block_mode(StructureBlockMode::Save); + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); block } - pub fn age_0_15(self) -> Option { - BLOCK_TABLE.age_0_15(self.kind, self.state) - } - pub fn set_age_0_15(&mut self, age_0_15: i32) -> bool { - match BLOCK_TABLE.set_age_0_15(self.kind, self.state, age_0_15) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `smooth_quartz_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn smooth_quartz_stairs() -> Self { + let mut block = Self { + kind: BlockKind::SmoothQuartzStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block } - pub fn with_age_0_15(mut self, age_0_15: i32) -> Self { - self.set_age_0_15(age_0_15); - self - } - pub fn age_0_2(self) -> Option { - BLOCK_TABLE.age_0_2(self.kind, self.state) + #[doc = "Returns an instance of `granite_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn granite_stairs() -> Self { + let mut block = Self { + kind: BlockKind::GraniteStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block } - pub fn set_age_0_2(&mut self, age_0_2: i32) -> bool { - match BLOCK_TABLE.set_age_0_2(self.kind, self.state, age_0_2) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `andesite_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn andesite_stairs() -> Self { + let mut block = Self { + kind: BlockKind::AndesiteStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block } - pub fn with_age_0_2(mut self, age_0_2: i32) -> Self { - self.set_age_0_2(age_0_2); - self + #[doc = "Returns an instance of `red_nether_brick_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn red_nether_brick_stairs() -> Self { + let mut block = Self { + kind: BlockKind::RedNetherBrickStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block } - pub fn age_0_25(self) -> Option { - BLOCK_TABLE.age_0_25(self.kind, self.state) + #[doc = "Returns an instance of `polished_andesite_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn polished_andesite_stairs() -> Self { + let mut block = Self { + kind: BlockKind::PolishedAndesiteStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block } - pub fn set_age_0_25(&mut self, age_0_25: i32) -> bool { - match BLOCK_TABLE.set_age_0_25(self.kind, self.state, age_0_25) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `diorite_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn diorite_stairs() -> Self { + let mut block = Self { + kind: BlockKind::DioriteStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block } - pub fn with_age_0_25(mut self, age_0_25: i32) -> Self { - self.set_age_0_25(age_0_25); - self + #[doc = "Returns an instance of `polished_granite_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn polished_granite_slab() -> Self { + let mut block = Self { + kind: BlockKind::PolishedGraniteSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn age_0_3(self) -> Option { - BLOCK_TABLE.age_0_3(self.kind, self.state) + #[doc = "Returns an instance of `smooth_red_sandstone_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn smooth_red_sandstone_slab() -> Self { + let mut block = Self { + kind: BlockKind::SmoothRedSandstoneSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn set_age_0_3(&mut self, age_0_3: i32) -> bool { - match BLOCK_TABLE.set_age_0_3(self.kind, self.state, age_0_3) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `mossy_stone_brick_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn mossy_stone_brick_slab() -> Self { + let mut block = Self { + kind: BlockKind::MossyStoneBrickSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn with_age_0_3(mut self, age_0_3: i32) -> Self { - self.set_age_0_3(age_0_3); - self + #[doc = "Returns an instance of `polished_diorite_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn polished_diorite_slab() -> Self { + let mut block = Self { + kind: BlockKind::PolishedDioriteSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn age_0_5(self) -> Option { - BLOCK_TABLE.age_0_5(self.kind, self.state) + #[doc = "Returns an instance of `mossy_cobblestone_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn mossy_cobblestone_slab() -> Self { + let mut block = Self { + kind: BlockKind::MossyCobblestoneSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn set_age_0_5(&mut self, age_0_5: i32) -> bool { - match BLOCK_TABLE.set_age_0_5(self.kind, self.state, age_0_5) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `end_stone_brick_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn end_stone_brick_slab() -> Self { + let mut block = Self { + kind: BlockKind::EndStoneBrickSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn with_age_0_5(mut self, age_0_5: i32) -> Self { - self.set_age_0_5(age_0_5); - self + #[doc = "Returns an instance of `smooth_sandstone_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn smooth_sandstone_slab() -> Self { + let mut block = Self { + kind: BlockKind::SmoothSandstoneSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn age_0_7(self) -> Option { - BLOCK_TABLE.age_0_7(self.kind, self.state) + #[doc = "Returns an instance of `smooth_quartz_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn smooth_quartz_slab() -> Self { + let mut block = Self { + kind: BlockKind::SmoothQuartzSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn set_age_0_7(&mut self, age_0_7: i32) -> bool { - match BLOCK_TABLE.set_age_0_7(self.kind, self.state, age_0_7) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `granite_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn granite_slab() -> Self { + let mut block = Self { + kind: BlockKind::GraniteSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn with_age_0_7(mut self, age_0_7: i32) -> Self { - self.set_age_0_7(age_0_7); - self + #[doc = "Returns an instance of `andesite_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn andesite_slab() -> Self { + let mut block = Self { + kind: BlockKind::AndesiteSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn attached(self) -> Option { - BLOCK_TABLE.attached(self.kind, self.state) + #[doc = "Returns an instance of `red_nether_brick_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn red_nether_brick_slab() -> Self { + let mut block = Self { + kind: BlockKind::RedNetherBrickSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn set_attached(&mut self, attached: bool) -> bool { - match BLOCK_TABLE.set_attached(self.kind, self.state, attached) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `polished_andesite_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn polished_andesite_slab() -> Self { + let mut block = Self { + kind: BlockKind::PolishedAndesiteSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn with_attached(mut self, attached: bool) -> Self { - self.set_attached(attached); - self + #[doc = "Returns an instance of `diorite_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn diorite_slab() -> Self { + let mut block = Self { + kind: BlockKind::DioriteSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn axis_xyz(self) -> Option { - BLOCK_TABLE.axis_xyz(self.kind, self.state) + #[doc = "Returns an instance of `brick_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn brick_wall() -> Self { + let mut block = Self { + kind: BlockKind::BrickWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn set_axis_xyz(&mut self, axis_xyz: AxisXyz) -> bool { - match BLOCK_TABLE.set_axis_xyz(self.kind, self.state, axis_xyz) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `prismarine_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn prismarine_wall() -> Self { + let mut block = Self { + kind: BlockKind::PrismarineWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn with_axis_xyz(mut self, axis_xyz: AxisXyz) -> Self { - self.set_axis_xyz(axis_xyz); - self + #[doc = "Returns an instance of `red_sandstone_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn red_sandstone_wall() -> Self { + let mut block = Self { + kind: BlockKind::RedSandstoneWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn axis_xz(self) -> Option { - BLOCK_TABLE.axis_xz(self.kind, self.state) + #[doc = "Returns an instance of `mossy_stone_brick_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn mossy_stone_brick_wall() -> Self { + let mut block = Self { + kind: BlockKind::MossyStoneBrickWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn set_axis_xz(&mut self, axis_xz: AxisXz) -> bool { - match BLOCK_TABLE.set_axis_xz(self.kind, self.state, axis_xz) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `granite_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn granite_wall() -> Self { + let mut block = Self { + kind: BlockKind::GraniteWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn with_axis_xz(mut self, axis_xz: AxisXz) -> Self { - self.set_axis_xz(axis_xz); - self - } - pub fn bites(self) -> Option { - BLOCK_TABLE.bites(self.kind, self.state) + #[doc = "Returns an instance of `stone_brick_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn stone_brick_wall() -> Self { + let mut block = Self { + kind: BlockKind::StoneBrickWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn set_bites(&mut self, bites: i32) -> bool { - match BLOCK_TABLE.set_bites(self.kind, self.state, bites) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `nether_brick_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn nether_brick_wall() -> Self { + let mut block = Self { + kind: BlockKind::NetherBrickWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn with_bites(mut self, bites: i32) -> Self { - self.set_bites(bites); - self + #[doc = "Returns an instance of `andesite_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn andesite_wall() -> Self { + let mut block = Self { + kind: BlockKind::AndesiteWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn cauldron_level(self) -> Option { - BLOCK_TABLE.cauldron_level(self.kind, self.state) + #[doc = "Returns an instance of `red_nether_brick_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn red_nether_brick_wall() -> Self { + let mut block = Self { + kind: BlockKind::RedNetherBrickWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn set_cauldron_level(&mut self, cauldron_level: i32) -> bool { - match BLOCK_TABLE.set_cauldron_level(self.kind, self.state, cauldron_level) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `sandstone_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn sandstone_wall() -> Self { + let mut block = Self { + kind: BlockKind::SandstoneWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn with_cauldron_level(mut self, cauldron_level: i32) -> Self { - self.set_cauldron_level(cauldron_level); - self + #[doc = "Returns an instance of `end_stone_brick_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn end_stone_brick_wall() -> Self { + let mut block = Self { + kind: BlockKind::EndStoneBrickWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn chest_kind(self) -> Option { - BLOCK_TABLE.chest_kind(self.kind, self.state) + #[doc = "Returns an instance of `diorite_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn diorite_wall() -> Self { + let mut block = Self { + kind: BlockKind::DioriteWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block } - pub fn set_chest_kind(&mut self, chest_kind: ChestKind) -> bool { - match BLOCK_TABLE.set_chest_kind(self.kind, self.state, chest_kind) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `scaffolding` with default state values.\nThe default state values are as follows:\n* `bottom`: false\n* `distance_0_7`: 7\n* `waterlogged`: false\n"] + pub fn scaffolding() -> Self { + let mut block = Self { + kind: BlockKind::Scaffolding, + state: 0, + }; + block.set_bottom(false); + block.set_distance_0_7(7i32); + block.set_waterlogged(false); + block } - pub fn with_chest_kind(mut self, chest_kind: ChestKind) -> Self { - self.set_chest_kind(chest_kind); - self + #[doc = "Returns an instance of `loom` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn loom() -> Self { + let mut block = Self { + kind: BlockKind::Loom, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block } - pub fn comparator_mode(self) -> Option { - BLOCK_TABLE.comparator_mode(self.kind, self.state) + #[doc = "Returns an instance of `barrel` with default state values.\nThe default state values are as follows:\n* `facing_cubic`: north\n* `open`: false\n"] + pub fn barrel() -> Self { + let mut block = Self { + kind: BlockKind::Barrel, + state: 0, + }; + block.set_facing_cubic(FacingCubic::North); + block.set_open(false); + block } - pub fn set_comparator_mode(&mut self, comparator_mode: ComparatorMode) -> bool { - match BLOCK_TABLE.set_comparator_mode(self.kind, self.state, comparator_mode) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `smoker` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `lit`: false\n"] + pub fn smoker() -> Self { + let mut block = Self { + kind: BlockKind::Smoker, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_lit(false); + block } - pub fn with_comparator_mode(mut self, comparator_mode: ComparatorMode) -> Self { - self.set_comparator_mode(comparator_mode); - self + #[doc = "Returns an instance of `blast_furnace` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `lit`: false\n"] + pub fn blast_furnace() -> Self { + let mut block = Self { + kind: BlockKind::BlastFurnace, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_lit(false); + block } - pub fn conditional(self) -> Option { - BLOCK_TABLE.conditional(self.kind, self.state) + #[doc = "Returns an instance of `cartography_table` with default state values."] + pub fn cartography_table() -> Self { + let mut block = Self { + kind: BlockKind::CartographyTable, + state: 0, + }; + block } - pub fn set_conditional(&mut self, conditional: bool) -> bool { - match BLOCK_TABLE.set_conditional(self.kind, self.state, conditional) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `fletching_table` with default state values."] + pub fn fletching_table() -> Self { + let mut block = Self { + kind: BlockKind::FletchingTable, + state: 0, + }; + block } - pub fn with_conditional(mut self, conditional: bool) -> Self { - self.set_conditional(conditional); - self + #[doc = "Returns an instance of `grindstone` with default state values.\nThe default state values are as follows:\n* `face`: wall\n* `facing_cardinal`: north\n"] + pub fn grindstone() -> Self { + let mut block = Self { + kind: BlockKind::Grindstone, + state: 0, + }; + block.set_face(Face::Wall); + block.set_facing_cardinal(FacingCardinal::North); + block } - pub fn delay(self) -> Option { - BLOCK_TABLE.delay(self.kind, self.state) + #[doc = "Returns an instance of `lectern` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `has_book`: false\n* `powered`: false\n"] + pub fn lectern() -> Self { + let mut block = Self { + kind: BlockKind::Lectern, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_has_book(false); + block.set_powered(false); + block } - pub fn set_delay(&mut self, delay: i32) -> bool { - match BLOCK_TABLE.set_delay(self.kind, self.state, delay) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `smithing_table` with default state values."] + pub fn smithing_table() -> Self { + let mut block = Self { + kind: BlockKind::SmithingTable, + state: 0, + }; + block } - pub fn with_delay(mut self, delay: i32) -> Self { - self.set_delay(delay); - self + #[doc = "Returns an instance of `stonecutter` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n"] + pub fn stonecutter() -> Self { + let mut block = Self { + kind: BlockKind::Stonecutter, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block } - pub fn disarmed(self) -> Option { - BLOCK_TABLE.disarmed(self.kind, self.state) + #[doc = "Returns an instance of `bell` with default state values.\nThe default state values are as follows:\n* `attachment`: floor\n* `facing_cardinal`: north\n* `powered`: false\n"] + pub fn bell() -> Self { + let mut block = Self { + kind: BlockKind::Bell, + state: 0, + }; + block.set_attachment(Attachment::Floor); + block.set_facing_cardinal(FacingCardinal::North); + block.set_powered(false); + block } - pub fn set_disarmed(&mut self, disarmed: bool) -> bool { - match BLOCK_TABLE.set_disarmed(self.kind, self.state, disarmed) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `lantern` with default state values.\nThe default state values are as follows:\n* `hanging`: false\n* `waterlogged`: false\n"] + pub fn lantern() -> Self { + let mut block = Self { + kind: BlockKind::Lantern, + state: 0, + }; + block.set_hanging(false); + block.set_waterlogged(false); + block } - pub fn with_disarmed(mut self, disarmed: bool) -> Self { - self.set_disarmed(disarmed); - self + #[doc = "Returns an instance of `soul_lantern` with default state values.\nThe default state values are as follows:\n* `hanging`: false\n* `waterlogged`: false\n"] + pub fn soul_lantern() -> Self { + let mut block = Self { + kind: BlockKind::SoulLantern, + state: 0, + }; + block.set_hanging(false); + block.set_waterlogged(false); + block } - pub fn distance(self) -> Option { - BLOCK_TABLE.distance(self.kind, self.state) + #[doc = "Returns an instance of `campfire` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `lit`: true\n* `signal_fire`: false\n* `waterlogged`: false\n"] + pub fn campfire() -> Self { + let mut block = Self { + kind: BlockKind::Campfire, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_lit(true); + block.set_signal_fire(false); + block.set_waterlogged(false); + block } - pub fn set_distance(&mut self, distance: i32) -> bool { - match BLOCK_TABLE.set_distance(self.kind, self.state, distance) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `soul_campfire` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `lit`: true\n* `signal_fire`: false\n* `waterlogged`: false\n"] + pub fn soul_campfire() -> Self { + let mut block = Self { + kind: BlockKind::SoulCampfire, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_lit(true); + block.set_signal_fire(false); + block.set_waterlogged(false); + block } - pub fn with_distance(mut self, distance: i32) -> Self { - self.set_distance(distance); - self + #[doc = "Returns an instance of `sweet_berry_bush` with default state values.\nThe default state values are as follows:\n* `age_0_3`: 0\n"] + pub fn sweet_berry_bush() -> Self { + let mut block = Self { + kind: BlockKind::SweetBerryBush, + state: 0, + }; + block.set_age_0_3(0i32); + block } - pub fn down(self) -> Option { - BLOCK_TABLE.down(self.kind, self.state) + #[doc = "Returns an instance of `warped_stem` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn warped_stem() -> Self { + let mut block = Self { + kind: BlockKind::WarpedStem, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block } - pub fn set_down(&mut self, down: bool) -> bool { - match BLOCK_TABLE.set_down(self.kind, self.state, down) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `stripped_warped_stem` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn stripped_warped_stem() -> Self { + let mut block = Self { + kind: BlockKind::StrippedWarpedStem, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block } - pub fn with_down(mut self, down: bool) -> Self { - self.set_down(down); - self - } - pub fn drag(self) -> Option { - BLOCK_TABLE.drag(self.kind, self.state) - } - pub fn set_drag(&mut self, drag: bool) -> bool { - match BLOCK_TABLE.set_drag(self.kind, self.state, drag) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `warped_hyphae` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn warped_hyphae() -> Self { + let mut block = Self { + kind: BlockKind::WarpedHyphae, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block } - pub fn with_drag(mut self, drag: bool) -> Self { - self.set_drag(drag); - self + #[doc = "Returns an instance of `stripped_warped_hyphae` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn stripped_warped_hyphae() -> Self { + let mut block = Self { + kind: BlockKind::StrippedWarpedHyphae, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block } - pub fn east_connected(self) -> Option { - BLOCK_TABLE.east_connected(self.kind, self.state) + #[doc = "Returns an instance of `warped_nylium` with default state values."] + pub fn warped_nylium() -> Self { + let mut block = Self { + kind: BlockKind::WarpedNylium, + state: 0, + }; + block } - pub fn set_east_connected(&mut self, east_connected: bool) -> bool { - match BLOCK_TABLE.set_east_connected(self.kind, self.state, east_connected) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `warped_fungus` with default state values."] + pub fn warped_fungus() -> Self { + let mut block = Self { + kind: BlockKind::WarpedFungus, + state: 0, + }; + block } - pub fn with_east_connected(mut self, east_connected: bool) -> Self { - self.set_east_connected(east_connected); - self + #[doc = "Returns an instance of `warped_wart_block` with default state values."] + pub fn warped_wart_block() -> Self { + let mut block = Self { + kind: BlockKind::WarpedWartBlock, + state: 0, + }; + block } - pub fn east_wire(self) -> Option { - BLOCK_TABLE.east_wire(self.kind, self.state) + #[doc = "Returns an instance of `warped_roots` with default state values."] + pub fn warped_roots() -> Self { + let mut block = Self { + kind: BlockKind::WarpedRoots, + state: 0, + }; + block } - pub fn set_east_wire(&mut self, east_wire: EastWire) -> bool { - match BLOCK_TABLE.set_east_wire(self.kind, self.state, east_wire) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `nether_sprouts` with default state values."] + pub fn nether_sprouts() -> Self { + let mut block = Self { + kind: BlockKind::NetherSprouts, + state: 0, + }; + block } - pub fn with_east_wire(mut self, east_wire: EastWire) -> Self { - self.set_east_wire(east_wire); - self + #[doc = "Returns an instance of `crimson_stem` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn crimson_stem() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonStem, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block } - pub fn eggs(self) -> Option { - BLOCK_TABLE.eggs(self.kind, self.state) + #[doc = "Returns an instance of `stripped_crimson_stem` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn stripped_crimson_stem() -> Self { + let mut block = Self { + kind: BlockKind::StrippedCrimsonStem, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block } - pub fn set_eggs(&mut self, eggs: i32) -> bool { - match BLOCK_TABLE.set_eggs(self.kind, self.state, eggs) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `crimson_hyphae` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn crimson_hyphae() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonHyphae, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block } - pub fn with_eggs(mut self, eggs: i32) -> Self { - self.set_eggs(eggs); - self + #[doc = "Returns an instance of `stripped_crimson_hyphae` with default state values.\nThe default state values are as follows:\n* `axis_xyz`: y\n"] + pub fn stripped_crimson_hyphae() -> Self { + let mut block = Self { + kind: BlockKind::StrippedCrimsonHyphae, + state: 0, + }; + block.set_axis_xyz(AxisXyz::Y); + block } - pub fn enabled(self) -> Option { - BLOCK_TABLE.enabled(self.kind, self.state) + #[doc = "Returns an instance of `crimson_nylium` with default state values."] + pub fn crimson_nylium() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonNylium, + state: 0, + }; + block } - pub fn set_enabled(&mut self, enabled: bool) -> bool { - match BLOCK_TABLE.set_enabled(self.kind, self.state, enabled) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `crimson_fungus` with default state values."] + pub fn crimson_fungus() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonFungus, + state: 0, + }; + block } - pub fn with_enabled(mut self, enabled: bool) -> Self { - self.set_enabled(enabled); - self + #[doc = "Returns an instance of `shroomlight` with default state values."] + pub fn shroomlight() -> Self { + let mut block = Self { + kind: BlockKind::Shroomlight, + state: 0, + }; + block } - pub fn extended(self) -> Option { - BLOCK_TABLE.extended(self.kind, self.state) + #[doc = "Returns an instance of `weeping_vines` with default state values.\nThe default state values are as follows:\n* `age_0_25`: 0\n"] + pub fn weeping_vines() -> Self { + let mut block = Self { + kind: BlockKind::WeepingVines, + state: 0, + }; + block.set_age_0_25(0i32); + block } - pub fn set_extended(&mut self, extended: bool) -> bool { - match BLOCK_TABLE.set_extended(self.kind, self.state, extended) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `weeping_vines_plant` with default state values."] + pub fn weeping_vines_plant() -> Self { + let mut block = Self { + kind: BlockKind::WeepingVinesPlant, + state: 0, + }; + block } - pub fn with_extended(mut self, extended: bool) -> Self { - self.set_extended(extended); - self + #[doc = "Returns an instance of `twisting_vines` with default state values.\nThe default state values are as follows:\n* `age_0_25`: 0\n"] + pub fn twisting_vines() -> Self { + let mut block = Self { + kind: BlockKind::TwistingVines, + state: 0, + }; + block.set_age_0_25(0i32); + block } - pub fn eye(self) -> Option { - BLOCK_TABLE.eye(self.kind, self.state) + #[doc = "Returns an instance of `twisting_vines_plant` with default state values."] + pub fn twisting_vines_plant() -> Self { + let mut block = Self { + kind: BlockKind::TwistingVinesPlant, + state: 0, + }; + block } - pub fn set_eye(&mut self, eye: bool) -> bool { - match BLOCK_TABLE.set_eye(self.kind, self.state, eye) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `crimson_roots` with default state values."] + pub fn crimson_roots() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonRoots, + state: 0, + }; + block } - pub fn with_eye(mut self, eye: bool) -> Self { - self.set_eye(eye); - self + #[doc = "Returns an instance of `crimson_planks` with default state values."] + pub fn crimson_planks() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonPlanks, + state: 0, + }; + block } - pub fn face(self) -> Option { - BLOCK_TABLE.face(self.kind, self.state) + #[doc = "Returns an instance of `warped_planks` with default state values."] + pub fn warped_planks() -> Self { + let mut block = Self { + kind: BlockKind::WarpedPlanks, + state: 0, + }; + block } - pub fn set_face(&mut self, face: Face) -> bool { - match BLOCK_TABLE.set_face(self.kind, self.state, face) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `crimson_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn crimson_slab() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn with_face(mut self, face: Face) -> Self { - self.set_face(face); - self + #[doc = "Returns an instance of `warped_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn warped_slab() -> Self { + let mut block = Self { + kind: BlockKind::WarpedSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block } - pub fn facing_cardinal(self) -> Option { - BLOCK_TABLE.facing_cardinal(self.kind, self.state) + #[doc = "Returns an instance of `crimson_pressure_plate` with default state values.\nThe default state values are as follows:\n* `powered`: false\n"] + pub fn crimson_pressure_plate() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonPressurePlate, + state: 0, + }; + block.set_powered(false); + block } - pub fn set_facing_cardinal(&mut self, facing_cardinal: FacingCardinal) -> bool { - match BLOCK_TABLE.set_facing_cardinal(self.kind, self.state, facing_cardinal) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `warped_pressure_plate` with default state values.\nThe default state values are as follows:\n* `powered`: false\n"] + pub fn warped_pressure_plate() -> Self { + let mut block = Self { + kind: BlockKind::WarpedPressurePlate, + state: 0, + }; + block.set_powered(false); + block } - pub fn with_facing_cardinal(mut self, facing_cardinal: FacingCardinal) -> Self { - self.set_facing_cardinal(facing_cardinal); - self + #[doc = "Returns an instance of `crimson_fence` with default state values.\nThe default state values are as follows:\n* `east_connected`: false\n* `north_connected`: false\n* `south_connected`: false\n* `waterlogged`: false\n* `west_connected`: false\n"] + pub fn crimson_fence() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonFence, + state: 0, + }; + block.set_east_connected(false); + block.set_north_connected(false); + block.set_south_connected(false); + block.set_waterlogged(false); + block.set_west_connected(false); + block } - pub fn facing_cardinal_and_down(self) -> Option { - BLOCK_TABLE.facing_cardinal_and_down(self.kind, self.state) + #[doc = "Returns an instance of `warped_fence` with default state values.\nThe default state values are as follows:\n* `east_connected`: false\n* `north_connected`: false\n* `south_connected`: false\n* `waterlogged`: false\n* `west_connected`: false\n"] + pub fn warped_fence() -> Self { + let mut block = Self { + kind: BlockKind::WarpedFence, + state: 0, + }; + block.set_east_connected(false); + block.set_north_connected(false); + block.set_south_connected(false); + block.set_waterlogged(false); + block.set_west_connected(false); + block } - pub fn set_facing_cardinal_and_down( - &mut self, - facing_cardinal_and_down: FacingCardinalAndDown, - ) -> bool { - match BLOCK_TABLE.set_facing_cardinal_and_down( - self.kind, - self.state, - facing_cardinal_and_down, - ) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } - } - pub fn with_facing_cardinal_and_down( - mut self, - facing_cardinal_and_down: FacingCardinalAndDown, - ) -> Self { - self.set_facing_cardinal_and_down(facing_cardinal_and_down); - self + #[doc = "Returns an instance of `crimson_trapdoor` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `open`: false\n* `powered`: false\n* `waterlogged`: false\n"] + pub fn crimson_trapdoor() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonTrapdoor, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_open(false); + block.set_powered(false); + block.set_waterlogged(false); + block } - pub fn facing_cubic(self) -> Option { - BLOCK_TABLE.facing_cubic(self.kind, self.state) + #[doc = "Returns an instance of `warped_trapdoor` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `open`: false\n* `powered`: false\n* `waterlogged`: false\n"] + pub fn warped_trapdoor() -> Self { + let mut block = Self { + kind: BlockKind::WarpedTrapdoor, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_open(false); + block.set_powered(false); + block.set_waterlogged(false); + block } - pub fn set_facing_cubic(&mut self, facing_cubic: FacingCubic) -> bool { - match BLOCK_TABLE.set_facing_cubic(self.kind, self.state, facing_cubic) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `crimson_fence_gate` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `in_wall`: false\n* `open`: false\n* `powered`: false\n"] + pub fn crimson_fence_gate() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonFenceGate, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_in_wall(false); + block.set_open(false); + block.set_powered(false); + block } - pub fn with_facing_cubic(mut self, facing_cubic: FacingCubic) -> Self { - self.set_facing_cubic(facing_cubic); - self + #[doc = "Returns an instance of `warped_fence_gate` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `in_wall`: false\n* `open`: false\n* `powered`: false\n"] + pub fn warped_fence_gate() -> Self { + let mut block = Self { + kind: BlockKind::WarpedFenceGate, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_in_wall(false); + block.set_open(false); + block.set_powered(false); + block } - pub fn half_top_bottom(self) -> Option { - BLOCK_TABLE.half_top_bottom(self.kind, self.state) + #[doc = "Returns an instance of `crimson_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn crimson_stairs() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block } - pub fn set_half_top_bottom(&mut self, half_top_bottom: HalfTopBottom) -> bool { - match BLOCK_TABLE.set_half_top_bottom(self.kind, self.state, half_top_bottom) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `warped_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn warped_stairs() -> Self { + let mut block = Self { + kind: BlockKind::WarpedStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block } - pub fn with_half_top_bottom(mut self, half_top_bottom: HalfTopBottom) -> Self { - self.set_half_top_bottom(half_top_bottom); - self + #[doc = "Returns an instance of `crimson_button` with default state values.\nThe default state values are as follows:\n* `face`: wall\n* `facing_cardinal`: north\n* `powered`: false\n"] + pub fn crimson_button() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonButton, + state: 0, + }; + block.set_face(Face::Wall); + block.set_facing_cardinal(FacingCardinal::North); + block.set_powered(false); + block } - pub fn half_upper_lower(self) -> Option { - BLOCK_TABLE.half_upper_lower(self.kind, self.state) + #[doc = "Returns an instance of `warped_button` with default state values.\nThe default state values are as follows:\n* `face`: wall\n* `facing_cardinal`: north\n* `powered`: false\n"] + pub fn warped_button() -> Self { + let mut block = Self { + kind: BlockKind::WarpedButton, + state: 0, + }; + block.set_face(Face::Wall); + block.set_facing_cardinal(FacingCardinal::North); + block.set_powered(false); + block } - pub fn set_half_upper_lower(&mut self, half_upper_lower: HalfUpperLower) -> bool { - match BLOCK_TABLE.set_half_upper_lower(self.kind, self.state, half_upper_lower) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `crimson_door` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_upper_lower`: lower\n* `hinge`: left\n* `open`: false\n* `powered`: false\n"] + pub fn crimson_door() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonDoor, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_upper_lower(HalfUpperLower::Lower); + block.set_hinge(Hinge::Left); + block.set_open(false); + block.set_powered(false); + block } - pub fn with_half_upper_lower(mut self, half_upper_lower: HalfUpperLower) -> Self { - self.set_half_upper_lower(half_upper_lower); - self + #[doc = "Returns an instance of `warped_door` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_upper_lower`: lower\n* `hinge`: left\n* `open`: false\n* `powered`: false\n"] + pub fn warped_door() -> Self { + let mut block = Self { + kind: BlockKind::WarpedDoor, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_upper_lower(HalfUpperLower::Lower); + block.set_hinge(Hinge::Left); + block.set_open(false); + block.set_powered(false); + block } - pub fn has_bottle_0(self) -> Option { - BLOCK_TABLE.has_bottle_0(self.kind, self.state) + #[doc = "Returns an instance of `crimson_sign` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n* `waterlogged`: false\n"] + pub fn crimson_sign() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonSign, + state: 0, + }; + block.set_rotation(0i32); + block.set_waterlogged(false); + block } - pub fn set_has_bottle_0(&mut self, has_bottle_0: bool) -> bool { - match BLOCK_TABLE.set_has_bottle_0(self.kind, self.state, has_bottle_0) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `warped_sign` with default state values.\nThe default state values are as follows:\n* `rotation`: 0\n* `waterlogged`: false\n"] + pub fn warped_sign() -> Self { + let mut block = Self { + kind: BlockKind::WarpedSign, + state: 0, + }; + block.set_rotation(0i32); + block.set_waterlogged(false); + block } - pub fn with_has_bottle_0(mut self, has_bottle_0: bool) -> Self { - self.set_has_bottle_0(has_bottle_0); - self + #[doc = "Returns an instance of `crimson_wall_sign` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: false\n"] + pub fn crimson_wall_sign() -> Self { + let mut block = Self { + kind: BlockKind::CrimsonWallSign, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_waterlogged(false); + block } - pub fn has_bottle_1(self) -> Option { - BLOCK_TABLE.has_bottle_1(self.kind, self.state) + #[doc = "Returns an instance of `warped_wall_sign` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `waterlogged`: false\n"] + pub fn warped_wall_sign() -> Self { + let mut block = Self { + kind: BlockKind::WarpedWallSign, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_waterlogged(false); + block } - pub fn set_has_bottle_1(&mut self, has_bottle_1: bool) -> bool { - match BLOCK_TABLE.set_has_bottle_1(self.kind, self.state, has_bottle_1) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `structure_block` with default state values.\nThe default state values are as follows:\n* `structure_block_mode`: save\n"] + pub fn structure_block() -> Self { + let mut block = Self { + kind: BlockKind::StructureBlock, + state: 0, + }; + block.set_structure_block_mode(StructureBlockMode::Save); + block } - pub fn with_has_bottle_1(mut self, has_bottle_1: bool) -> Self { - self.set_has_bottle_1(has_bottle_1); - self + #[doc = "Returns an instance of `jigsaw` with default state values.\nThe default state values are as follows:\n* `orientation`: north_up\n"] + pub fn jigsaw() -> Self { + let mut block = Self { + kind: BlockKind::Jigsaw, + state: 0, + }; + block.set_orientation(Orientation::NorthUp); + block } - pub fn has_bottle_2(self) -> Option { - BLOCK_TABLE.has_bottle_2(self.kind, self.state) + #[doc = "Returns an instance of `composter` with default state values.\nThe default state values are as follows:\n* `level_0_8`: 0\n"] + pub fn composter() -> Self { + let mut block = Self { + kind: BlockKind::Composter, + state: 0, + }; + block.set_level_0_8(0i32); + block } - pub fn set_has_bottle_2(&mut self, has_bottle_2: bool) -> bool { - match BLOCK_TABLE.set_has_bottle_2(self.kind, self.state, has_bottle_2) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `target` with default state values.\nThe default state values are as follows:\n* `power`: 0\n"] + pub fn target() -> Self { + let mut block = Self { + kind: BlockKind::Target, + state: 0, + }; + block.set_power(0i32); + block } - pub fn with_has_bottle_2(mut self, has_bottle_2: bool) -> Self { - self.set_has_bottle_2(has_bottle_2); - self + #[doc = "Returns an instance of `bee_nest` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `honey_level`: 0\n"] + pub fn bee_nest() -> Self { + let mut block = Self { + kind: BlockKind::BeeNest, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_honey_level(0i32); + block } - pub fn has_record(self) -> Option { - BLOCK_TABLE.has_record(self.kind, self.state) + #[doc = "Returns an instance of `beehive` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `honey_level`: 0\n"] + pub fn beehive() -> Self { + let mut block = Self { + kind: BlockKind::Beehive, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_honey_level(0i32); + block } - pub fn set_has_record(&mut self, has_record: bool) -> bool { - match BLOCK_TABLE.set_has_record(self.kind, self.state, has_record) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `honey_block` with default state values."] + pub fn honey_block() -> Self { + let mut block = Self { + kind: BlockKind::HoneyBlock, + state: 0, + }; + block } - pub fn with_has_record(mut self, has_record: bool) -> Self { - self.set_has_record(has_record); - self + #[doc = "Returns an instance of `honeycomb_block` with default state values."] + pub fn honeycomb_block() -> Self { + let mut block = Self { + kind: BlockKind::HoneycombBlock, + state: 0, + }; + block } - pub fn hatch(self) -> Option { - BLOCK_TABLE.hatch(self.kind, self.state) + #[doc = "Returns an instance of `netherite_block` with default state values."] + pub fn netherite_block() -> Self { + let mut block = Self { + kind: BlockKind::NetheriteBlock, + state: 0, + }; + block } - pub fn set_hatch(&mut self, hatch: i32) -> bool { - match BLOCK_TABLE.set_hatch(self.kind, self.state, hatch) { - Some(new_state) => { - self.state = new_state; - true - } - None => false, - } + #[doc = "Returns an instance of `ancient_debris` with default state values."] + pub fn ancient_debris() -> Self { + let mut block = Self { + kind: BlockKind::AncientDebris, + state: 0, + }; + block } - pub fn with_hatch(mut self, hatch: i32) -> Self { - self.set_hatch(hatch); - self + #[doc = "Returns an instance of `crying_obsidian` with default state values."] + pub fn crying_obsidian() -> Self { + let mut block = Self { + kind: BlockKind::CryingObsidian, + state: 0, + }; + block } - pub fn hinge(self) -> Option { - BLOCK_TABLE.hinge(self.kind, self.state) + #[doc = "Returns an instance of `respawn_anchor` with default state values.\nThe default state values are as follows:\n* `charges`: 0\n"] + pub fn respawn_anchor() -> Self { + let mut block = Self { + kind: BlockKind::RespawnAnchor, + state: 0, + }; + block.set_charges(0i32); + block } - pub fn set_hinge(&mut self, hinge: Hinge) -> bool { - match BLOCK_TABLE.set_hinge(self.kind, self.state, hinge) { + #[doc = "Returns an instance of `potted_crimson_fungus` with default state values."] + pub fn potted_crimson_fungus() -> Self { + let mut block = Self { + kind: BlockKind::PottedCrimsonFungus, + state: 0, + }; + block + } + #[doc = "Returns an instance of `potted_warped_fungus` with default state values."] + pub fn potted_warped_fungus() -> Self { + let mut block = Self { + kind: BlockKind::PottedWarpedFungus, + state: 0, + }; + block + } + #[doc = "Returns an instance of `potted_crimson_roots` with default state values."] + pub fn potted_crimson_roots() -> Self { + let mut block = Self { + kind: BlockKind::PottedCrimsonRoots, + state: 0, + }; + block + } + #[doc = "Returns an instance of `potted_warped_roots` with default state values."] + pub fn potted_warped_roots() -> Self { + let mut block = Self { + kind: BlockKind::PottedWarpedRoots, + state: 0, + }; + block + } + #[doc = "Returns an instance of `lodestone` with default state values."] + pub fn lodestone() -> Self { + let mut block = Self { + kind: BlockKind::Lodestone, + state: 0, + }; + block + } + #[doc = "Returns an instance of `blackstone` with default state values."] + pub fn blackstone() -> Self { + let mut block = Self { + kind: BlockKind::Blackstone, + state: 0, + }; + block + } + #[doc = "Returns an instance of `blackstone_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn blackstone_stairs() -> Self { + let mut block = Self { + kind: BlockKind::BlackstoneStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `blackstone_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn blackstone_wall() -> Self { + let mut block = Self { + kind: BlockKind::BlackstoneWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block + } + #[doc = "Returns an instance of `blackstone_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn blackstone_slab() -> Self { + let mut block = Self { + kind: BlockKind::BlackstoneSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `polished_blackstone` with default state values."] + pub fn polished_blackstone() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstone, + state: 0, + }; + block + } + #[doc = "Returns an instance of `polished_blackstone_bricks` with default state values."] + pub fn polished_blackstone_bricks() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstoneBricks, + state: 0, + }; + block + } + #[doc = "Returns an instance of `cracked_polished_blackstone_bricks` with default state values."] + pub fn cracked_polished_blackstone_bricks() -> Self { + let mut block = Self { + kind: BlockKind::CrackedPolishedBlackstoneBricks, + state: 0, + }; + block + } + #[doc = "Returns an instance of `chiseled_polished_blackstone` with default state values."] + pub fn chiseled_polished_blackstone() -> Self { + let mut block = Self { + kind: BlockKind::ChiseledPolishedBlackstone, + state: 0, + }; + block + } + #[doc = "Returns an instance of `polished_blackstone_brick_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn polished_blackstone_brick_slab() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstoneBrickSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `polished_blackstone_brick_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn polished_blackstone_brick_stairs() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstoneBrickStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `polished_blackstone_brick_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn polished_blackstone_brick_wall() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstoneBrickWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block + } + #[doc = "Returns an instance of `gilded_blackstone` with default state values."] + pub fn gilded_blackstone() -> Self { + let mut block = Self { + kind: BlockKind::GildedBlackstone, + state: 0, + }; + block + } + #[doc = "Returns an instance of `polished_blackstone_stairs` with default state values.\nThe default state values are as follows:\n* `facing_cardinal`: north\n* `half_top_bottom`: bottom\n* `stairs_shape`: straight\n* `waterlogged`: false\n"] + pub fn polished_blackstone_stairs() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstoneStairs, + state: 0, + }; + block.set_facing_cardinal(FacingCardinal::North); + block.set_half_top_bottom(HalfTopBottom::Bottom); + block.set_stairs_shape(StairsShape::Straight); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `polished_blackstone_slab` with default state values.\nThe default state values are as follows:\n* `slab_kind`: bottom\n* `waterlogged`: false\n"] + pub fn polished_blackstone_slab() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstoneSlab, + state: 0, + }; + block.set_slab_kind(SlabKind::Bottom); + block.set_waterlogged(false); + block + } + #[doc = "Returns an instance of `polished_blackstone_pressure_plate` with default state values.\nThe default state values are as follows:\n* `powered`: false\n"] + pub fn polished_blackstone_pressure_plate() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstonePressurePlate, + state: 0, + }; + block.set_powered(false); + block + } + #[doc = "Returns an instance of `polished_blackstone_button` with default state values.\nThe default state values are as follows:\n* `face`: wall\n* `facing_cardinal`: north\n* `powered`: false\n"] + pub fn polished_blackstone_button() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstoneButton, + state: 0, + }; + block.set_face(Face::Wall); + block.set_facing_cardinal(FacingCardinal::North); + block.set_powered(false); + block + } + #[doc = "Returns an instance of `polished_blackstone_wall` with default state values.\nThe default state values are as follows:\n* `east_nlt`: none\n* `north_nlt`: none\n* `south_nlt`: none\n* `up`: true\n* `waterlogged`: false\n* `west_nlt`: none\n"] + pub fn polished_blackstone_wall() -> Self { + let mut block = Self { + kind: BlockKind::PolishedBlackstoneWall, + state: 0, + }; + block.set_east_nlt(EastNlt::None); + block.set_north_nlt(NorthNlt::None); + block.set_south_nlt(SouthNlt::None); + block.set_up(true); + block.set_waterlogged(false); + block.set_west_nlt(WestNlt::None); + block + } + #[doc = "Returns an instance of `chiseled_nether_bricks` with default state values."] + pub fn chiseled_nether_bricks() -> Self { + let mut block = Self { + kind: BlockKind::ChiseledNetherBricks, + state: 0, + }; + block + } + #[doc = "Returns an instance of `cracked_nether_bricks` with default state values."] + pub fn cracked_nether_bricks() -> Self { + let mut block = Self { + kind: BlockKind::CrackedNetherBricks, + state: 0, + }; + block + } + #[doc = "Returns an instance of `quartz_bricks` with default state values."] + pub fn quartz_bricks() -> Self { + let mut block = Self { + kind: BlockKind::QuartzBricks, + state: 0, + }; + block + } + pub fn age_0_1(self) -> Option { + BLOCK_TABLE.age_0_1(self.kind, self.state) + } + pub fn set_age_0_1(&mut self, age_0_1: i32) -> bool { + match BLOCK_TABLE.set_age_0_1(self.kind, self.state, age_0_1) { Some(new_state) => { self.state = new_state; true @@ -6132,15 +7210,15 @@ impl BlockId { None => false, } } - pub fn with_hinge(mut self, hinge: Hinge) -> Self { - self.set_hinge(hinge); + pub fn with_age_0_1(mut self, age_0_1: i32) -> Self { + self.set_age_0_1(age_0_1); self } - pub fn in_wall(self) -> Option { - BLOCK_TABLE.in_wall(self.kind, self.state) + pub fn age_0_15(self) -> Option { + BLOCK_TABLE.age_0_15(self.kind, self.state) } - pub fn set_in_wall(&mut self, in_wall: bool) -> bool { - match BLOCK_TABLE.set_in_wall(self.kind, self.state, in_wall) { + pub fn set_age_0_15(&mut self, age_0_15: i32) -> bool { + match BLOCK_TABLE.set_age_0_15(self.kind, self.state, age_0_15) { Some(new_state) => { self.state = new_state; true @@ -6148,15 +7226,15 @@ impl BlockId { None => false, } } - pub fn with_in_wall(mut self, in_wall: bool) -> Self { - self.set_in_wall(in_wall); + pub fn with_age_0_15(mut self, age_0_15: i32) -> Self { + self.set_age_0_15(age_0_15); self } - pub fn instrument(self) -> Option { - BLOCK_TABLE.instrument(self.kind, self.state) + pub fn age_0_2(self) -> Option { + BLOCK_TABLE.age_0_2(self.kind, self.state) } - pub fn set_instrument(&mut self, instrument: Instrument) -> bool { - match BLOCK_TABLE.set_instrument(self.kind, self.state, instrument) { + pub fn set_age_0_2(&mut self, age_0_2: i32) -> bool { + match BLOCK_TABLE.set_age_0_2(self.kind, self.state, age_0_2) { Some(new_state) => { self.state = new_state; true @@ -6164,15 +7242,15 @@ impl BlockId { None => false, } } - pub fn with_instrument(mut self, instrument: Instrument) -> Self { - self.set_instrument(instrument); + pub fn with_age_0_2(mut self, age_0_2: i32) -> Self { + self.set_age_0_2(age_0_2); self } - pub fn inverted(self) -> Option { - BLOCK_TABLE.inverted(self.kind, self.state) + pub fn age_0_25(self) -> Option { + BLOCK_TABLE.age_0_25(self.kind, self.state) } - pub fn set_inverted(&mut self, inverted: bool) -> bool { - match BLOCK_TABLE.set_inverted(self.kind, self.state, inverted) { + pub fn set_age_0_25(&mut self, age_0_25: i32) -> bool { + match BLOCK_TABLE.set_age_0_25(self.kind, self.state, age_0_25) { Some(new_state) => { self.state = new_state; true @@ -6180,15 +7258,15 @@ impl BlockId { None => false, } } - pub fn with_inverted(mut self, inverted: bool) -> Self { - self.set_inverted(inverted); + pub fn with_age_0_25(mut self, age_0_25: i32) -> Self { + self.set_age_0_25(age_0_25); self } - pub fn layers(self) -> Option { - BLOCK_TABLE.layers(self.kind, self.state) + pub fn age_0_3(self) -> Option { + BLOCK_TABLE.age_0_3(self.kind, self.state) } - pub fn set_layers(&mut self, layers: i32) -> bool { - match BLOCK_TABLE.set_layers(self.kind, self.state, layers) { + pub fn set_age_0_3(&mut self, age_0_3: i32) -> bool { + match BLOCK_TABLE.set_age_0_3(self.kind, self.state, age_0_3) { Some(new_state) => { self.state = new_state; true @@ -6196,15 +7274,15 @@ impl BlockId { None => false, } } - pub fn with_layers(mut self, layers: i32) -> Self { - self.set_layers(layers); + pub fn with_age_0_3(mut self, age_0_3: i32) -> Self { + self.set_age_0_3(age_0_3); self } - pub fn lit(self) -> Option { - BLOCK_TABLE.lit(self.kind, self.state) + pub fn age_0_5(self) -> Option { + BLOCK_TABLE.age_0_5(self.kind, self.state) } - pub fn set_lit(&mut self, lit: bool) -> bool { - match BLOCK_TABLE.set_lit(self.kind, self.state, lit) { + pub fn set_age_0_5(&mut self, age_0_5: i32) -> bool { + match BLOCK_TABLE.set_age_0_5(self.kind, self.state, age_0_5) { Some(new_state) => { self.state = new_state; true @@ -6212,15 +7290,15 @@ impl BlockId { None => false, } } - pub fn with_lit(mut self, lit: bool) -> Self { - self.set_lit(lit); + pub fn with_age_0_5(mut self, age_0_5: i32) -> Self { + self.set_age_0_5(age_0_5); self } - pub fn locked(self) -> Option { - BLOCK_TABLE.locked(self.kind, self.state) + pub fn age_0_7(self) -> Option { + BLOCK_TABLE.age_0_7(self.kind, self.state) } - pub fn set_locked(&mut self, locked: bool) -> bool { - match BLOCK_TABLE.set_locked(self.kind, self.state, locked) { + pub fn set_age_0_7(&mut self, age_0_7: i32) -> bool { + match BLOCK_TABLE.set_age_0_7(self.kind, self.state, age_0_7) { Some(new_state) => { self.state = new_state; true @@ -6228,15 +7306,15 @@ impl BlockId { None => false, } } - pub fn with_locked(mut self, locked: bool) -> Self { - self.set_locked(locked); + pub fn with_age_0_7(mut self, age_0_7: i32) -> Self { + self.set_age_0_7(age_0_7); self } - pub fn moisture(self) -> Option { - BLOCK_TABLE.moisture(self.kind, self.state) + pub fn attached(self) -> Option { + BLOCK_TABLE.attached(self.kind, self.state) } - pub fn set_moisture(&mut self, moisture: i32) -> bool { - match BLOCK_TABLE.set_moisture(self.kind, self.state, moisture) { + pub fn set_attached(&mut self, attached: bool) -> bool { + match BLOCK_TABLE.set_attached(self.kind, self.state, attached) { Some(new_state) => { self.state = new_state; true @@ -6244,15 +7322,15 @@ impl BlockId { None => false, } } - pub fn with_moisture(mut self, moisture: i32) -> Self { - self.set_moisture(moisture); + pub fn with_attached(mut self, attached: bool) -> Self { + self.set_attached(attached); self } - pub fn north_connected(self) -> Option { - BLOCK_TABLE.north_connected(self.kind, self.state) + pub fn attachment(self) -> Option { + BLOCK_TABLE.attachment(self.kind, self.state) } - pub fn set_north_connected(&mut self, north_connected: bool) -> bool { - match BLOCK_TABLE.set_north_connected(self.kind, self.state, north_connected) { + pub fn set_attachment(&mut self, attachment: Attachment) -> bool { + match BLOCK_TABLE.set_attachment(self.kind, self.state, attachment) { Some(new_state) => { self.state = new_state; true @@ -6260,15 +7338,15 @@ impl BlockId { None => false, } } - pub fn with_north_connected(mut self, north_connected: bool) -> Self { - self.set_north_connected(north_connected); + pub fn with_attachment(mut self, attachment: Attachment) -> Self { + self.set_attachment(attachment); self } - pub fn north_wire(self) -> Option { - BLOCK_TABLE.north_wire(self.kind, self.state) + pub fn axis_xyz(self) -> Option { + BLOCK_TABLE.axis_xyz(self.kind, self.state) } - pub fn set_north_wire(&mut self, north_wire: NorthWire) -> bool { - match BLOCK_TABLE.set_north_wire(self.kind, self.state, north_wire) { + pub fn set_axis_xyz(&mut self, axis_xyz: AxisXyz) -> bool { + match BLOCK_TABLE.set_axis_xyz(self.kind, self.state, axis_xyz) { Some(new_state) => { self.state = new_state; true @@ -6276,15 +7354,15 @@ impl BlockId { None => false, } } - pub fn with_north_wire(mut self, north_wire: NorthWire) -> Self { - self.set_north_wire(north_wire); + pub fn with_axis_xyz(mut self, axis_xyz: AxisXyz) -> Self { + self.set_axis_xyz(axis_xyz); self } - pub fn note(self) -> Option { - BLOCK_TABLE.note(self.kind, self.state) + pub fn axis_xz(self) -> Option { + BLOCK_TABLE.axis_xz(self.kind, self.state) } - pub fn set_note(&mut self, note: i32) -> bool { - match BLOCK_TABLE.set_note(self.kind, self.state, note) { + pub fn set_axis_xz(&mut self, axis_xz: AxisXz) -> bool { + match BLOCK_TABLE.set_axis_xz(self.kind, self.state, axis_xz) { Some(new_state) => { self.state = new_state; true @@ -6292,15 +7370,15 @@ impl BlockId { None => false, } } - pub fn with_note(mut self, note: i32) -> Self { - self.set_note(note); + pub fn with_axis_xz(mut self, axis_xz: AxisXz) -> Self { + self.set_axis_xz(axis_xz); self } - pub fn occupied(self) -> Option { - BLOCK_TABLE.occupied(self.kind, self.state) + pub fn bites(self) -> Option { + BLOCK_TABLE.bites(self.kind, self.state) } - pub fn set_occupied(&mut self, occupied: bool) -> bool { - match BLOCK_TABLE.set_occupied(self.kind, self.state, occupied) { + pub fn set_bites(&mut self, bites: i32) -> bool { + match BLOCK_TABLE.set_bites(self.kind, self.state, bites) { Some(new_state) => { self.state = new_state; true @@ -6308,15 +7386,15 @@ impl BlockId { None => false, } } - pub fn with_occupied(mut self, occupied: bool) -> Self { - self.set_occupied(occupied); + pub fn with_bites(mut self, bites: i32) -> Self { + self.set_bites(bites); self } - pub fn open(self) -> Option { - BLOCK_TABLE.open(self.kind, self.state) + pub fn bottom(self) -> Option { + BLOCK_TABLE.bottom(self.kind, self.state) } - pub fn set_open(&mut self, open: bool) -> bool { - match BLOCK_TABLE.set_open(self.kind, self.state, open) { + pub fn set_bottom(&mut self, bottom: bool) -> bool { + match BLOCK_TABLE.set_bottom(self.kind, self.state, bottom) { Some(new_state) => { self.state = new_state; true @@ -6324,15 +7402,15 @@ impl BlockId { None => false, } } - pub fn with_open(mut self, open: bool) -> Self { - self.set_open(open); + pub fn with_bottom(mut self, bottom: bool) -> Self { + self.set_bottom(bottom); self } - pub fn part(self) -> Option { - BLOCK_TABLE.part(self.kind, self.state) + pub fn cauldron_level(self) -> Option { + BLOCK_TABLE.cauldron_level(self.kind, self.state) } - pub fn set_part(&mut self, part: Part) -> bool { - match BLOCK_TABLE.set_part(self.kind, self.state, part) { + pub fn set_cauldron_level(&mut self, cauldron_level: i32) -> bool { + match BLOCK_TABLE.set_cauldron_level(self.kind, self.state, cauldron_level) { Some(new_state) => { self.state = new_state; true @@ -6340,15 +7418,15 @@ impl BlockId { None => false, } } - pub fn with_part(mut self, part: Part) -> Self { - self.set_part(part); + pub fn with_cauldron_level(mut self, cauldron_level: i32) -> Self { + self.set_cauldron_level(cauldron_level); self } - pub fn persistent(self) -> Option { - BLOCK_TABLE.persistent(self.kind, self.state) + pub fn charges(self) -> Option { + BLOCK_TABLE.charges(self.kind, self.state) } - pub fn set_persistent(&mut self, persistent: bool) -> bool { - match BLOCK_TABLE.set_persistent(self.kind, self.state, persistent) { + pub fn set_charges(&mut self, charges: i32) -> bool { + match BLOCK_TABLE.set_charges(self.kind, self.state, charges) { Some(new_state) => { self.state = new_state; true @@ -6356,15 +7434,15 @@ impl BlockId { None => false, } } - pub fn with_persistent(mut self, persistent: bool) -> Self { - self.set_persistent(persistent); + pub fn with_charges(mut self, charges: i32) -> Self { + self.set_charges(charges); self } - pub fn pickles(self) -> Option { - BLOCK_TABLE.pickles(self.kind, self.state) + pub fn chest_kind(self) -> Option { + BLOCK_TABLE.chest_kind(self.kind, self.state) } - pub fn set_pickles(&mut self, pickles: i32) -> bool { - match BLOCK_TABLE.set_pickles(self.kind, self.state, pickles) { + pub fn set_chest_kind(&mut self, chest_kind: ChestKind) -> bool { + match BLOCK_TABLE.set_chest_kind(self.kind, self.state, chest_kind) { Some(new_state) => { self.state = new_state; true @@ -6372,15 +7450,15 @@ impl BlockId { None => false, } } - pub fn with_pickles(mut self, pickles: i32) -> Self { - self.set_pickles(pickles); + pub fn with_chest_kind(mut self, chest_kind: ChestKind) -> Self { + self.set_chest_kind(chest_kind); self } - pub fn piston_kind(self) -> Option { - BLOCK_TABLE.piston_kind(self.kind, self.state) + pub fn comparator_mode(self) -> Option { + BLOCK_TABLE.comparator_mode(self.kind, self.state) } - pub fn set_piston_kind(&mut self, piston_kind: PistonKind) -> bool { - match BLOCK_TABLE.set_piston_kind(self.kind, self.state, piston_kind) { + pub fn set_comparator_mode(&mut self, comparator_mode: ComparatorMode) -> bool { + match BLOCK_TABLE.set_comparator_mode(self.kind, self.state, comparator_mode) { Some(new_state) => { self.state = new_state; true @@ -6388,15 +7466,15 @@ impl BlockId { None => false, } } - pub fn with_piston_kind(mut self, piston_kind: PistonKind) -> Self { - self.set_piston_kind(piston_kind); + pub fn with_comparator_mode(mut self, comparator_mode: ComparatorMode) -> Self { + self.set_comparator_mode(comparator_mode); self } - pub fn power(self) -> Option { - BLOCK_TABLE.power(self.kind, self.state) + pub fn conditional(self) -> Option { + BLOCK_TABLE.conditional(self.kind, self.state) } - pub fn set_power(&mut self, power: i32) -> bool { - match BLOCK_TABLE.set_power(self.kind, self.state, power) { + pub fn set_conditional(&mut self, conditional: bool) -> bool { + match BLOCK_TABLE.set_conditional(self.kind, self.state, conditional) { Some(new_state) => { self.state = new_state; true @@ -6404,15 +7482,15 @@ impl BlockId { None => false, } } - pub fn with_power(mut self, power: i32) -> Self { - self.set_power(power); + pub fn with_conditional(mut self, conditional: bool) -> Self { + self.set_conditional(conditional); self } - pub fn powered(self) -> Option { - BLOCK_TABLE.powered(self.kind, self.state) + pub fn delay(self) -> Option { + BLOCK_TABLE.delay(self.kind, self.state) } - pub fn set_powered(&mut self, powered: bool) -> bool { - match BLOCK_TABLE.set_powered(self.kind, self.state, powered) { + pub fn set_delay(&mut self, delay: i32) -> bool { + match BLOCK_TABLE.set_delay(self.kind, self.state, delay) { Some(new_state) => { self.state = new_state; true @@ -6420,15 +7498,15 @@ impl BlockId { None => false, } } - pub fn with_powered(mut self, powered: bool) -> Self { - self.set_powered(powered); + pub fn with_delay(mut self, delay: i32) -> Self { + self.set_delay(delay); self } - pub fn powered_rail_shape(self) -> Option { - BLOCK_TABLE.powered_rail_shape(self.kind, self.state) + pub fn disarmed(self) -> Option { + BLOCK_TABLE.disarmed(self.kind, self.state) } - pub fn set_powered_rail_shape(&mut self, powered_rail_shape: PoweredRailShape) -> bool { - match BLOCK_TABLE.set_powered_rail_shape(self.kind, self.state, powered_rail_shape) { + pub fn set_disarmed(&mut self, disarmed: bool) -> bool { + match BLOCK_TABLE.set_disarmed(self.kind, self.state, disarmed) { Some(new_state) => { self.state = new_state; true @@ -6436,15 +7514,15 @@ impl BlockId { None => false, } } - pub fn with_powered_rail_shape(mut self, powered_rail_shape: PoweredRailShape) -> Self { - self.set_powered_rail_shape(powered_rail_shape); + pub fn with_disarmed(mut self, disarmed: bool) -> Self { + self.set_disarmed(disarmed); self } - pub fn rail_shape(self) -> Option { - BLOCK_TABLE.rail_shape(self.kind, self.state) + pub fn distance_0_7(self) -> Option { + BLOCK_TABLE.distance_0_7(self.kind, self.state) } - pub fn set_rail_shape(&mut self, rail_shape: RailShape) -> bool { - match BLOCK_TABLE.set_rail_shape(self.kind, self.state, rail_shape) { + pub fn set_distance_0_7(&mut self, distance_0_7: i32) -> bool { + match BLOCK_TABLE.set_distance_0_7(self.kind, self.state, distance_0_7) { Some(new_state) => { self.state = new_state; true @@ -6452,15 +7530,15 @@ impl BlockId { None => false, } } - pub fn with_rail_shape(mut self, rail_shape: RailShape) -> Self { - self.set_rail_shape(rail_shape); + pub fn with_distance_0_7(mut self, distance_0_7: i32) -> Self { + self.set_distance_0_7(distance_0_7); self } - pub fn rotation(self) -> Option { - BLOCK_TABLE.rotation(self.kind, self.state) + pub fn distance_1_7(self) -> Option { + BLOCK_TABLE.distance_1_7(self.kind, self.state) } - pub fn set_rotation(&mut self, rotation: i32) -> bool { - match BLOCK_TABLE.set_rotation(self.kind, self.state, rotation) { + pub fn set_distance_1_7(&mut self, distance_1_7: i32) -> bool { + match BLOCK_TABLE.set_distance_1_7(self.kind, self.state, distance_1_7) { Some(new_state) => { self.state = new_state; true @@ -6468,15 +7546,15 @@ impl BlockId { None => false, } } - pub fn with_rotation(mut self, rotation: i32) -> Self { - self.set_rotation(rotation); + pub fn with_distance_1_7(mut self, distance_1_7: i32) -> Self { + self.set_distance_1_7(distance_1_7); self } - pub fn short(self) -> Option { - BLOCK_TABLE.short(self.kind, self.state) + pub fn down(self) -> Option { + BLOCK_TABLE.down(self.kind, self.state) } - pub fn set_short(&mut self, short: bool) -> bool { - match BLOCK_TABLE.set_short(self.kind, self.state, short) { + pub fn set_down(&mut self, down: bool) -> bool { + match BLOCK_TABLE.set_down(self.kind, self.state, down) { Some(new_state) => { self.state = new_state; true @@ -6484,15 +7562,15 @@ impl BlockId { None => false, } } - pub fn with_short(mut self, short: bool) -> Self { - self.set_short(short); + pub fn with_down(mut self, down: bool) -> Self { + self.set_down(down); self } - pub fn slab_kind(self) -> Option { - BLOCK_TABLE.slab_kind(self.kind, self.state) + pub fn drag(self) -> Option { + BLOCK_TABLE.drag(self.kind, self.state) } - pub fn set_slab_kind(&mut self, slab_kind: SlabKind) -> bool { - match BLOCK_TABLE.set_slab_kind(self.kind, self.state, slab_kind) { + pub fn set_drag(&mut self, drag: bool) -> bool { + match BLOCK_TABLE.set_drag(self.kind, self.state, drag) { Some(new_state) => { self.state = new_state; true @@ -6500,15 +7578,15 @@ impl BlockId { None => false, } } - pub fn with_slab_kind(mut self, slab_kind: SlabKind) -> Self { - self.set_slab_kind(slab_kind); + pub fn with_drag(mut self, drag: bool) -> Self { + self.set_drag(drag); self } - pub fn snowy(self) -> Option { - BLOCK_TABLE.snowy(self.kind, self.state) + pub fn east_connected(self) -> Option { + BLOCK_TABLE.east_connected(self.kind, self.state) } - pub fn set_snowy(&mut self, snowy: bool) -> bool { - match BLOCK_TABLE.set_snowy(self.kind, self.state, snowy) { + pub fn set_east_connected(&mut self, east_connected: bool) -> bool { + match BLOCK_TABLE.set_east_connected(self.kind, self.state, east_connected) { Some(new_state) => { self.state = new_state; true @@ -6516,15 +7594,15 @@ impl BlockId { None => false, } } - pub fn with_snowy(mut self, snowy: bool) -> Self { - self.set_snowy(snowy); + pub fn with_east_connected(mut self, east_connected: bool) -> Self { + self.set_east_connected(east_connected); self } - pub fn south_connected(self) -> Option { - BLOCK_TABLE.south_connected(self.kind, self.state) + pub fn east_nlt(self) -> Option { + BLOCK_TABLE.east_nlt(self.kind, self.state) } - pub fn set_south_connected(&mut self, south_connected: bool) -> bool { - match BLOCK_TABLE.set_south_connected(self.kind, self.state, south_connected) { + pub fn set_east_nlt(&mut self, east_nlt: EastNlt) -> bool { + match BLOCK_TABLE.set_east_nlt(self.kind, self.state, east_nlt) { Some(new_state) => { self.state = new_state; true @@ -6532,15 +7610,15 @@ impl BlockId { None => false, } } - pub fn with_south_connected(mut self, south_connected: bool) -> Self { - self.set_south_connected(south_connected); + pub fn with_east_nlt(mut self, east_nlt: EastNlt) -> Self { + self.set_east_nlt(east_nlt); self } - pub fn south_wire(self) -> Option { - BLOCK_TABLE.south_wire(self.kind, self.state) + pub fn east_wire(self) -> Option { + BLOCK_TABLE.east_wire(self.kind, self.state) } - pub fn set_south_wire(&mut self, south_wire: SouthWire) -> bool { - match BLOCK_TABLE.set_south_wire(self.kind, self.state, south_wire) { + pub fn set_east_wire(&mut self, east_wire: EastWire) -> bool { + match BLOCK_TABLE.set_east_wire(self.kind, self.state, east_wire) { Some(new_state) => { self.state = new_state; true @@ -6548,15 +7626,15 @@ impl BlockId { None => false, } } - pub fn with_south_wire(mut self, south_wire: SouthWire) -> Self { - self.set_south_wire(south_wire); + pub fn with_east_wire(mut self, east_wire: EastWire) -> Self { + self.set_east_wire(east_wire); self } - pub fn stage(self) -> Option { - BLOCK_TABLE.stage(self.kind, self.state) + pub fn eggs(self) -> Option { + BLOCK_TABLE.eggs(self.kind, self.state) } - pub fn set_stage(&mut self, stage: i32) -> bool { - match BLOCK_TABLE.set_stage(self.kind, self.state, stage) { + pub fn set_eggs(&mut self, eggs: i32) -> bool { + match BLOCK_TABLE.set_eggs(self.kind, self.state, eggs) { Some(new_state) => { self.state = new_state; true @@ -6564,15 +7642,15 @@ impl BlockId { None => false, } } - pub fn with_stage(mut self, stage: i32) -> Self { - self.set_stage(stage); + pub fn with_eggs(mut self, eggs: i32) -> Self { + self.set_eggs(eggs); self } - pub fn stairs_shape(self) -> Option { - BLOCK_TABLE.stairs_shape(self.kind, self.state) + pub fn enabled(self) -> Option { + BLOCK_TABLE.enabled(self.kind, self.state) } - pub fn set_stairs_shape(&mut self, stairs_shape: StairsShape) -> bool { - match BLOCK_TABLE.set_stairs_shape(self.kind, self.state, stairs_shape) { + pub fn set_enabled(&mut self, enabled: bool) -> bool { + match BLOCK_TABLE.set_enabled(self.kind, self.state, enabled) { Some(new_state) => { self.state = new_state; true @@ -6580,15 +7658,15 @@ impl BlockId { None => false, } } - pub fn with_stairs_shape(mut self, stairs_shape: StairsShape) -> Self { - self.set_stairs_shape(stairs_shape); + pub fn with_enabled(mut self, enabled: bool) -> Self { + self.set_enabled(enabled); self } - pub fn structure_block_mode(self) -> Option { - BLOCK_TABLE.structure_block_mode(self.kind, self.state) + pub fn extended(self) -> Option { + BLOCK_TABLE.extended(self.kind, self.state) } - pub fn set_structure_block_mode(&mut self, structure_block_mode: StructureBlockMode) -> bool { - match BLOCK_TABLE.set_structure_block_mode(self.kind, self.state, structure_block_mode) { + pub fn set_extended(&mut self, extended: bool) -> bool { + match BLOCK_TABLE.set_extended(self.kind, self.state, extended) { Some(new_state) => { self.state = new_state; true @@ -6596,15 +7674,15 @@ impl BlockId { None => false, } } - pub fn with_structure_block_mode(mut self, structure_block_mode: StructureBlockMode) -> Self { - self.set_structure_block_mode(structure_block_mode); + pub fn with_extended(mut self, extended: bool) -> Self { + self.set_extended(extended); self } - pub fn triggered(self) -> Option { - BLOCK_TABLE.triggered(self.kind, self.state) + pub fn eye(self) -> Option { + BLOCK_TABLE.eye(self.kind, self.state) } - pub fn set_triggered(&mut self, triggered: bool) -> bool { - match BLOCK_TABLE.set_triggered(self.kind, self.state, triggered) { + pub fn set_eye(&mut self, eye: bool) -> bool { + match BLOCK_TABLE.set_eye(self.kind, self.state, eye) { Some(new_state) => { self.state = new_state; true @@ -6612,15 +7690,15 @@ impl BlockId { None => false, } } - pub fn with_triggered(mut self, triggered: bool) -> Self { - self.set_triggered(triggered); + pub fn with_eye(mut self, eye: bool) -> Self { + self.set_eye(eye); self } - pub fn unstable(self) -> Option { - BLOCK_TABLE.unstable(self.kind, self.state) + pub fn face(self) -> Option { + BLOCK_TABLE.face(self.kind, self.state) } - pub fn set_unstable(&mut self, unstable: bool) -> bool { - match BLOCK_TABLE.set_unstable(self.kind, self.state, unstable) { + pub fn set_face(&mut self, face: Face) -> bool { + match BLOCK_TABLE.set_face(self.kind, self.state, face) { Some(new_state) => { self.state = new_state; true @@ -6628,15 +7706,15 @@ impl BlockId { None => false, } } - pub fn with_unstable(mut self, unstable: bool) -> Self { - self.set_unstable(unstable); + pub fn with_face(mut self, face: Face) -> Self { + self.set_face(face); self } - pub fn up(self) -> Option { - BLOCK_TABLE.up(self.kind, self.state) + pub fn facing_cardinal(self) -> Option { + BLOCK_TABLE.facing_cardinal(self.kind, self.state) } - pub fn set_up(&mut self, up: bool) -> bool { - match BLOCK_TABLE.set_up(self.kind, self.state, up) { + pub fn set_facing_cardinal(&mut self, facing_cardinal: FacingCardinal) -> bool { + match BLOCK_TABLE.set_facing_cardinal(self.kind, self.state, facing_cardinal) { Some(new_state) => { self.state = new_state; true @@ -6644,15 +7722,22 @@ impl BlockId { None => false, } } - pub fn with_up(mut self, up: bool) -> Self { - self.set_up(up); + pub fn with_facing_cardinal(mut self, facing_cardinal: FacingCardinal) -> Self { + self.set_facing_cardinal(facing_cardinal); self } - pub fn water_level(self) -> Option { - BLOCK_TABLE.water_level(self.kind, self.state) + pub fn facing_cardinal_and_down(self) -> Option { + BLOCK_TABLE.facing_cardinal_and_down(self.kind, self.state) } - pub fn set_water_level(&mut self, water_level: i32) -> bool { - match BLOCK_TABLE.set_water_level(self.kind, self.state, water_level) { + pub fn set_facing_cardinal_and_down( + &mut self, + facing_cardinal_and_down: FacingCardinalAndDown, + ) -> bool { + match BLOCK_TABLE.set_facing_cardinal_and_down( + self.kind, + self.state, + facing_cardinal_and_down, + ) { Some(new_state) => { self.state = new_state; true @@ -6660,15 +7745,18 @@ impl BlockId { None => false, } } - pub fn with_water_level(mut self, water_level: i32) -> Self { - self.set_water_level(water_level); + pub fn with_facing_cardinal_and_down( + mut self, + facing_cardinal_and_down: FacingCardinalAndDown, + ) -> Self { + self.set_facing_cardinal_and_down(facing_cardinal_and_down); self } - pub fn waterlogged(self) -> Option { - BLOCK_TABLE.waterlogged(self.kind, self.state) + pub fn facing_cubic(self) -> Option { + BLOCK_TABLE.facing_cubic(self.kind, self.state) } - pub fn set_waterlogged(&mut self, waterlogged: bool) -> bool { - match BLOCK_TABLE.set_waterlogged(self.kind, self.state, waterlogged) { + pub fn set_facing_cubic(&mut self, facing_cubic: FacingCubic) -> bool { + match BLOCK_TABLE.set_facing_cubic(self.kind, self.state, facing_cubic) { Some(new_state) => { self.state = new_state; true @@ -6676,15 +7764,15 @@ impl BlockId { None => false, } } - pub fn with_waterlogged(mut self, waterlogged: bool) -> Self { - self.set_waterlogged(waterlogged); + pub fn with_facing_cubic(mut self, facing_cubic: FacingCubic) -> Self { + self.set_facing_cubic(facing_cubic); self } - pub fn west_connected(self) -> Option { - BLOCK_TABLE.west_connected(self.kind, self.state) + pub fn half_top_bottom(self) -> Option { + BLOCK_TABLE.half_top_bottom(self.kind, self.state) } - pub fn set_west_connected(&mut self, west_connected: bool) -> bool { - match BLOCK_TABLE.set_west_connected(self.kind, self.state, west_connected) { + pub fn set_half_top_bottom(&mut self, half_top_bottom: HalfTopBottom) -> bool { + match BLOCK_TABLE.set_half_top_bottom(self.kind, self.state, half_top_bottom) { Some(new_state) => { self.state = new_state; true @@ -6692,15 +7780,15 @@ impl BlockId { None => false, } } - pub fn with_west_connected(mut self, west_connected: bool) -> Self { - self.set_west_connected(west_connected); + pub fn with_half_top_bottom(mut self, half_top_bottom: HalfTopBottom) -> Self { + self.set_half_top_bottom(half_top_bottom); self } - pub fn west_wire(self) -> Option { - BLOCK_TABLE.west_wire(self.kind, self.state) + pub fn half_upper_lower(self) -> Option { + BLOCK_TABLE.half_upper_lower(self.kind, self.state) } - pub fn set_west_wire(&mut self, west_wire: WestWire) -> bool { - match BLOCK_TABLE.set_west_wire(self.kind, self.state, west_wire) { + pub fn set_half_upper_lower(&mut self, half_upper_lower: HalfUpperLower) -> bool { + match BLOCK_TABLE.set_half_upper_lower(self.kind, self.state, half_upper_lower) { Some(new_state) => { self.state = new_state; true @@ -6708,186 +7796,1033 @@ impl BlockId { None => false, } } - pub fn with_west_wire(mut self, west_wire: WestWire) -> Self { - self.set_west_wire(west_wire); + pub fn with_half_upper_lower(mut self, half_upper_lower: HalfUpperLower) -> Self { + self.set_half_upper_lower(half_upper_lower); self } - #[doc = "Returns the identifier of this block. For example, returns `minecraft::air` for an air block."] - pub fn identifier(self) -> &'static str { - match self.kind { - BlockKind::Air => "minecraft:air", - BlockKind::Stone => "minecraft:stone", - BlockKind::Granite => "minecraft:granite", - BlockKind::PolishedGranite => "minecraft:polished_granite", - BlockKind::Diorite => "minecraft:diorite", - BlockKind::PolishedDiorite => "minecraft:polished_diorite", - BlockKind::Andesite => "minecraft:andesite", - BlockKind::PolishedAndesite => "minecraft:polished_andesite", - BlockKind::GrassBlock => "minecraft:grass_block", - BlockKind::Dirt => "minecraft:dirt", - BlockKind::CoarseDirt => "minecraft:coarse_dirt", - BlockKind::Podzol => "minecraft:podzol", - BlockKind::Cobblestone => "minecraft:cobblestone", - BlockKind::OakPlanks => "minecraft:oak_planks", - BlockKind::SprucePlanks => "minecraft:spruce_planks", - BlockKind::BirchPlanks => "minecraft:birch_planks", - BlockKind::JunglePlanks => "minecraft:jungle_planks", - BlockKind::AcaciaPlanks => "minecraft:acacia_planks", - BlockKind::DarkOakPlanks => "minecraft:dark_oak_planks", - BlockKind::OakSapling => "minecraft:oak_sapling", - BlockKind::SpruceSapling => "minecraft:spruce_sapling", - BlockKind::BirchSapling => "minecraft:birch_sapling", - BlockKind::JungleSapling => "minecraft:jungle_sapling", - BlockKind::AcaciaSapling => "minecraft:acacia_sapling", - BlockKind::DarkOakSapling => "minecraft:dark_oak_sapling", - BlockKind::Bedrock => "minecraft:bedrock", - BlockKind::Water => "minecraft:water", - BlockKind::Lava => "minecraft:lava", - BlockKind::Sand => "minecraft:sand", - BlockKind::RedSand => "minecraft:red_sand", - BlockKind::Gravel => "minecraft:gravel", - BlockKind::GoldOre => "minecraft:gold_ore", - BlockKind::IronOre => "minecraft:iron_ore", - BlockKind::CoalOre => "minecraft:coal_ore", - BlockKind::OakLog => "minecraft:oak_log", - BlockKind::SpruceLog => "minecraft:spruce_log", - BlockKind::BirchLog => "minecraft:birch_log", - BlockKind::JungleLog => "minecraft:jungle_log", - BlockKind::AcaciaLog => "minecraft:acacia_log", - BlockKind::DarkOakLog => "minecraft:dark_oak_log", - BlockKind::StrippedSpruceLog => "minecraft:stripped_spruce_log", - BlockKind::StrippedBirchLog => "minecraft:stripped_birch_log", - BlockKind::StrippedJungleLog => "minecraft:stripped_jungle_log", - BlockKind::StrippedAcaciaLog => "minecraft:stripped_acacia_log", - BlockKind::StrippedDarkOakLog => "minecraft:stripped_dark_oak_log", - BlockKind::StrippedOakLog => "minecraft:stripped_oak_log", - BlockKind::OakWood => "minecraft:oak_wood", - BlockKind::SpruceWood => "minecraft:spruce_wood", - BlockKind::BirchWood => "minecraft:birch_wood", - BlockKind::JungleWood => "minecraft:jungle_wood", - BlockKind::AcaciaWood => "minecraft:acacia_wood", - BlockKind::DarkOakWood => "minecraft:dark_oak_wood", - BlockKind::StrippedOakWood => "minecraft:stripped_oak_wood", - BlockKind::StrippedSpruceWood => "minecraft:stripped_spruce_wood", - BlockKind::StrippedBirchWood => "minecraft:stripped_birch_wood", - BlockKind::StrippedJungleWood => "minecraft:stripped_jungle_wood", - BlockKind::StrippedAcaciaWood => "minecraft:stripped_acacia_wood", - BlockKind::StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood", - BlockKind::OakLeaves => "minecraft:oak_leaves", - BlockKind::SpruceLeaves => "minecraft:spruce_leaves", - BlockKind::BirchLeaves => "minecraft:birch_leaves", - BlockKind::JungleLeaves => "minecraft:jungle_leaves", - BlockKind::AcaciaLeaves => "minecraft:acacia_leaves", - BlockKind::DarkOakLeaves => "minecraft:dark_oak_leaves", - BlockKind::Sponge => "minecraft:sponge", - BlockKind::WetSponge => "minecraft:wet_sponge", - BlockKind::Glass => "minecraft:glass", - BlockKind::LapisOre => "minecraft:lapis_ore", - BlockKind::LapisBlock => "minecraft:lapis_block", - BlockKind::Dispenser => "minecraft:dispenser", - BlockKind::Sandstone => "minecraft:sandstone", - BlockKind::ChiseledSandstone => "minecraft:chiseled_sandstone", - BlockKind::CutSandstone => "minecraft:cut_sandstone", - BlockKind::NoteBlock => "minecraft:note_block", - BlockKind::WhiteBed => "minecraft:white_bed", - BlockKind::OrangeBed => "minecraft:orange_bed", - BlockKind::MagentaBed => "minecraft:magenta_bed", - BlockKind::LightBlueBed => "minecraft:light_blue_bed", - BlockKind::YellowBed => "minecraft:yellow_bed", - BlockKind::LimeBed => "minecraft:lime_bed", - BlockKind::PinkBed => "minecraft:pink_bed", - BlockKind::GrayBed => "minecraft:gray_bed", - BlockKind::LightGrayBed => "minecraft:light_gray_bed", - BlockKind::CyanBed => "minecraft:cyan_bed", - BlockKind::PurpleBed => "minecraft:purple_bed", - BlockKind::BlueBed => "minecraft:blue_bed", - BlockKind::BrownBed => "minecraft:brown_bed", - BlockKind::GreenBed => "minecraft:green_bed", - BlockKind::RedBed => "minecraft:red_bed", - BlockKind::BlackBed => "minecraft:black_bed", - BlockKind::PoweredRail => "minecraft:powered_rail", - BlockKind::DetectorRail => "minecraft:detector_rail", - BlockKind::StickyPiston => "minecraft:sticky_piston", - BlockKind::Cobweb => "minecraft:cobweb", - BlockKind::Grass => "minecraft:grass", - BlockKind::Fern => "minecraft:fern", - BlockKind::DeadBush => "minecraft:dead_bush", - BlockKind::Seagrass => "minecraft:seagrass", - BlockKind::TallSeagrass => "minecraft:tall_seagrass", - BlockKind::Piston => "minecraft:piston", - BlockKind::PistonHead => "minecraft:piston_head", - BlockKind::WhiteWool => "minecraft:white_wool", - BlockKind::OrangeWool => "minecraft:orange_wool", - BlockKind::MagentaWool => "minecraft:magenta_wool", - BlockKind::LightBlueWool => "minecraft:light_blue_wool", - BlockKind::YellowWool => "minecraft:yellow_wool", - BlockKind::LimeWool => "minecraft:lime_wool", - BlockKind::PinkWool => "minecraft:pink_wool", - BlockKind::GrayWool => "minecraft:gray_wool", - BlockKind::LightGrayWool => "minecraft:light_gray_wool", - BlockKind::CyanWool => "minecraft:cyan_wool", - BlockKind::PurpleWool => "minecraft:purple_wool", - BlockKind::BlueWool => "minecraft:blue_wool", - BlockKind::BrownWool => "minecraft:brown_wool", - BlockKind::GreenWool => "minecraft:green_wool", - BlockKind::RedWool => "minecraft:red_wool", - BlockKind::BlackWool => "minecraft:black_wool", - BlockKind::MovingPiston => "minecraft:moving_piston", - BlockKind::Dandelion => "minecraft:dandelion", - BlockKind::Poppy => "minecraft:poppy", - BlockKind::BlueOrchid => "minecraft:blue_orchid", - BlockKind::Allium => "minecraft:allium", - BlockKind::AzureBluet => "minecraft:azure_bluet", - BlockKind::RedTulip => "minecraft:red_tulip", - BlockKind::OrangeTulip => "minecraft:orange_tulip", - BlockKind::WhiteTulip => "minecraft:white_tulip", - BlockKind::PinkTulip => "minecraft:pink_tulip", - BlockKind::OxeyeDaisy => "minecraft:oxeye_daisy", - BlockKind::BrownMushroom => "minecraft:brown_mushroom", - BlockKind::RedMushroom => "minecraft:red_mushroom", - BlockKind::GoldBlock => "minecraft:gold_block", - BlockKind::IronBlock => "minecraft:iron_block", - BlockKind::Bricks => "minecraft:bricks", - BlockKind::Tnt => "minecraft:tnt", - BlockKind::Bookshelf => "minecraft:bookshelf", - BlockKind::MossyCobblestone => "minecraft:mossy_cobblestone", - BlockKind::Obsidian => "minecraft:obsidian", - BlockKind::Torch => "minecraft:torch", - BlockKind::WallTorch => "minecraft:wall_torch", - BlockKind::Fire => "minecraft:fire", - BlockKind::Spawner => "minecraft:spawner", - BlockKind::OakStairs => "minecraft:oak_stairs", - BlockKind::Chest => "minecraft:chest", - BlockKind::RedstoneWire => "minecraft:redstone_wire", - BlockKind::DiamondOre => "minecraft:diamond_ore", - BlockKind::DiamondBlock => "minecraft:diamond_block", - BlockKind::CraftingTable => "minecraft:crafting_table", - BlockKind::Wheat => "minecraft:wheat", - BlockKind::Farmland => "minecraft:farmland", - BlockKind::Furnace => "minecraft:furnace", - BlockKind::Sign => "minecraft:sign", - BlockKind::OakDoor => "minecraft:oak_door", - BlockKind::Ladder => "minecraft:ladder", - BlockKind::Rail => "minecraft:rail", - BlockKind::CobblestoneStairs => "minecraft:cobblestone_stairs", - BlockKind::WallSign => "minecraft:wall_sign", - BlockKind::Lever => "minecraft:lever", - BlockKind::StonePressurePlate => "minecraft:stone_pressure_plate", - BlockKind::IronDoor => "minecraft:iron_door", - BlockKind::OakPressurePlate => "minecraft:oak_pressure_plate", - BlockKind::SprucePressurePlate => "minecraft:spruce_pressure_plate", - BlockKind::BirchPressurePlate => "minecraft:birch_pressure_plate", - BlockKind::JunglePressurePlate => "minecraft:jungle_pressure_plate", - BlockKind::AcaciaPressurePlate => "minecraft:acacia_pressure_plate", - BlockKind::DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate", - BlockKind::RedstoneOre => "minecraft:redstone_ore", - BlockKind::RedstoneTorch => "minecraft:redstone_torch", - BlockKind::RedstoneWallTorch => "minecraft:redstone_wall_torch", - BlockKind::StoneButton => "minecraft:stone_button", - BlockKind::Snow => "minecraft:snow", - BlockKind::Ice => "minecraft:ice", - BlockKind::SnowBlock => "minecraft:snow_block", - BlockKind::Cactus => "minecraft:cactus", + pub fn hanging(self) -> Option { + BLOCK_TABLE.hanging(self.kind, self.state) + } + pub fn set_hanging(&mut self, hanging: bool) -> bool { + match BLOCK_TABLE.set_hanging(self.kind, self.state, hanging) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_hanging(mut self, hanging: bool) -> Self { + self.set_hanging(hanging); + self + } + pub fn has_book(self) -> Option { + BLOCK_TABLE.has_book(self.kind, self.state) + } + pub fn set_has_book(&mut self, has_book: bool) -> bool { + match BLOCK_TABLE.set_has_book(self.kind, self.state, has_book) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_has_book(mut self, has_book: bool) -> Self { + self.set_has_book(has_book); + self + } + pub fn has_bottle_0(self) -> Option { + BLOCK_TABLE.has_bottle_0(self.kind, self.state) + } + pub fn set_has_bottle_0(&mut self, has_bottle_0: bool) -> bool { + match BLOCK_TABLE.set_has_bottle_0(self.kind, self.state, has_bottle_0) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_has_bottle_0(mut self, has_bottle_0: bool) -> Self { + self.set_has_bottle_0(has_bottle_0); + self + } + pub fn has_bottle_1(self) -> Option { + BLOCK_TABLE.has_bottle_1(self.kind, self.state) + } + pub fn set_has_bottle_1(&mut self, has_bottle_1: bool) -> bool { + match BLOCK_TABLE.set_has_bottle_1(self.kind, self.state, has_bottle_1) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_has_bottle_1(mut self, has_bottle_1: bool) -> Self { + self.set_has_bottle_1(has_bottle_1); + self + } + pub fn has_bottle_2(self) -> Option { + BLOCK_TABLE.has_bottle_2(self.kind, self.state) + } + pub fn set_has_bottle_2(&mut self, has_bottle_2: bool) -> bool { + match BLOCK_TABLE.set_has_bottle_2(self.kind, self.state, has_bottle_2) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_has_bottle_2(mut self, has_bottle_2: bool) -> Self { + self.set_has_bottle_2(has_bottle_2); + self + } + pub fn has_record(self) -> Option { + BLOCK_TABLE.has_record(self.kind, self.state) + } + pub fn set_has_record(&mut self, has_record: bool) -> bool { + match BLOCK_TABLE.set_has_record(self.kind, self.state, has_record) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_has_record(mut self, has_record: bool) -> Self { + self.set_has_record(has_record); + self + } + pub fn hatch(self) -> Option { + BLOCK_TABLE.hatch(self.kind, self.state) + } + pub fn set_hatch(&mut self, hatch: i32) -> bool { + match BLOCK_TABLE.set_hatch(self.kind, self.state, hatch) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_hatch(mut self, hatch: i32) -> Self { + self.set_hatch(hatch); + self + } + pub fn hinge(self) -> Option { + BLOCK_TABLE.hinge(self.kind, self.state) + } + pub fn set_hinge(&mut self, hinge: Hinge) -> bool { + match BLOCK_TABLE.set_hinge(self.kind, self.state, hinge) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_hinge(mut self, hinge: Hinge) -> Self { + self.set_hinge(hinge); + self + } + pub fn honey_level(self) -> Option { + BLOCK_TABLE.honey_level(self.kind, self.state) + } + pub fn set_honey_level(&mut self, honey_level: i32) -> bool { + match BLOCK_TABLE.set_honey_level(self.kind, self.state, honey_level) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_honey_level(mut self, honey_level: i32) -> Self { + self.set_honey_level(honey_level); + self + } + pub fn in_wall(self) -> Option { + BLOCK_TABLE.in_wall(self.kind, self.state) + } + pub fn set_in_wall(&mut self, in_wall: bool) -> bool { + match BLOCK_TABLE.set_in_wall(self.kind, self.state, in_wall) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_in_wall(mut self, in_wall: bool) -> Self { + self.set_in_wall(in_wall); + self + } + pub fn instrument(self) -> Option { + BLOCK_TABLE.instrument(self.kind, self.state) + } + pub fn set_instrument(&mut self, instrument: Instrument) -> bool { + match BLOCK_TABLE.set_instrument(self.kind, self.state, instrument) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_instrument(mut self, instrument: Instrument) -> Self { + self.set_instrument(instrument); + self + } + pub fn inverted(self) -> Option { + BLOCK_TABLE.inverted(self.kind, self.state) + } + pub fn set_inverted(&mut self, inverted: bool) -> bool { + match BLOCK_TABLE.set_inverted(self.kind, self.state, inverted) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_inverted(mut self, inverted: bool) -> Self { + self.set_inverted(inverted); + self + } + pub fn layers(self) -> Option { + BLOCK_TABLE.layers(self.kind, self.state) + } + pub fn set_layers(&mut self, layers: i32) -> bool { + match BLOCK_TABLE.set_layers(self.kind, self.state, layers) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_layers(mut self, layers: i32) -> Self { + self.set_layers(layers); + self + } + pub fn leaves(self) -> Option { + BLOCK_TABLE.leaves(self.kind, self.state) + } + pub fn set_leaves(&mut self, leaves: Leaves) -> bool { + match BLOCK_TABLE.set_leaves(self.kind, self.state, leaves) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_leaves(mut self, leaves: Leaves) -> Self { + self.set_leaves(leaves); + self + } + pub fn level_0_8(self) -> Option { + BLOCK_TABLE.level_0_8(self.kind, self.state) + } + pub fn set_level_0_8(&mut self, level_0_8: i32) -> bool { + match BLOCK_TABLE.set_level_0_8(self.kind, self.state, level_0_8) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_level_0_8(mut self, level_0_8: i32) -> Self { + self.set_level_0_8(level_0_8); + self + } + pub fn lit(self) -> Option { + BLOCK_TABLE.lit(self.kind, self.state) + } + pub fn set_lit(&mut self, lit: bool) -> bool { + match BLOCK_TABLE.set_lit(self.kind, self.state, lit) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_lit(mut self, lit: bool) -> Self { + self.set_lit(lit); + self + } + pub fn locked(self) -> Option { + BLOCK_TABLE.locked(self.kind, self.state) + } + pub fn set_locked(&mut self, locked: bool) -> bool { + match BLOCK_TABLE.set_locked(self.kind, self.state, locked) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_locked(mut self, locked: bool) -> Self { + self.set_locked(locked); + self + } + pub fn moisture(self) -> Option { + BLOCK_TABLE.moisture(self.kind, self.state) + } + pub fn set_moisture(&mut self, moisture: i32) -> bool { + match BLOCK_TABLE.set_moisture(self.kind, self.state, moisture) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_moisture(mut self, moisture: i32) -> Self { + self.set_moisture(moisture); + self + } + pub fn north_connected(self) -> Option { + BLOCK_TABLE.north_connected(self.kind, self.state) + } + pub fn set_north_connected(&mut self, north_connected: bool) -> bool { + match BLOCK_TABLE.set_north_connected(self.kind, self.state, north_connected) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_north_connected(mut self, north_connected: bool) -> Self { + self.set_north_connected(north_connected); + self + } + pub fn north_nlt(self) -> Option { + BLOCK_TABLE.north_nlt(self.kind, self.state) + } + pub fn set_north_nlt(&mut self, north_nlt: NorthNlt) -> bool { + match BLOCK_TABLE.set_north_nlt(self.kind, self.state, north_nlt) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_north_nlt(mut self, north_nlt: NorthNlt) -> Self { + self.set_north_nlt(north_nlt); + self + } + pub fn north_wire(self) -> Option { + BLOCK_TABLE.north_wire(self.kind, self.state) + } + pub fn set_north_wire(&mut self, north_wire: NorthWire) -> bool { + match BLOCK_TABLE.set_north_wire(self.kind, self.state, north_wire) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_north_wire(mut self, north_wire: NorthWire) -> Self { + self.set_north_wire(north_wire); + self + } + pub fn note(self) -> Option { + BLOCK_TABLE.note(self.kind, self.state) + } + pub fn set_note(&mut self, note: i32) -> bool { + match BLOCK_TABLE.set_note(self.kind, self.state, note) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_note(mut self, note: i32) -> Self { + self.set_note(note); + self + } + pub fn occupied(self) -> Option { + BLOCK_TABLE.occupied(self.kind, self.state) + } + pub fn set_occupied(&mut self, occupied: bool) -> bool { + match BLOCK_TABLE.set_occupied(self.kind, self.state, occupied) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_occupied(mut self, occupied: bool) -> Self { + self.set_occupied(occupied); + self + } + pub fn open(self) -> Option { + BLOCK_TABLE.open(self.kind, self.state) + } + pub fn set_open(&mut self, open: bool) -> bool { + match BLOCK_TABLE.set_open(self.kind, self.state, open) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_open(mut self, open: bool) -> Self { + self.set_open(open); + self + } + pub fn orientation(self) -> Option { + BLOCK_TABLE.orientation(self.kind, self.state) + } + pub fn set_orientation(&mut self, orientation: Orientation) -> bool { + match BLOCK_TABLE.set_orientation(self.kind, self.state, orientation) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_orientation(mut self, orientation: Orientation) -> Self { + self.set_orientation(orientation); + self + } + pub fn part(self) -> Option { + BLOCK_TABLE.part(self.kind, self.state) + } + pub fn set_part(&mut self, part: Part) -> bool { + match BLOCK_TABLE.set_part(self.kind, self.state, part) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_part(mut self, part: Part) -> Self { + self.set_part(part); + self + } + pub fn persistent(self) -> Option { + BLOCK_TABLE.persistent(self.kind, self.state) + } + pub fn set_persistent(&mut self, persistent: bool) -> bool { + match BLOCK_TABLE.set_persistent(self.kind, self.state, persistent) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_persistent(mut self, persistent: bool) -> Self { + self.set_persistent(persistent); + self + } + pub fn pickles(self) -> Option { + BLOCK_TABLE.pickles(self.kind, self.state) + } + pub fn set_pickles(&mut self, pickles: i32) -> bool { + match BLOCK_TABLE.set_pickles(self.kind, self.state, pickles) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_pickles(mut self, pickles: i32) -> Self { + self.set_pickles(pickles); + self + } + pub fn piston_kind(self) -> Option { + BLOCK_TABLE.piston_kind(self.kind, self.state) + } + pub fn set_piston_kind(&mut self, piston_kind: PistonKind) -> bool { + match BLOCK_TABLE.set_piston_kind(self.kind, self.state, piston_kind) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_piston_kind(mut self, piston_kind: PistonKind) -> Self { + self.set_piston_kind(piston_kind); + self + } + pub fn power(self) -> Option { + BLOCK_TABLE.power(self.kind, self.state) + } + pub fn set_power(&mut self, power: i32) -> bool { + match BLOCK_TABLE.set_power(self.kind, self.state, power) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_power(mut self, power: i32) -> Self { + self.set_power(power); + self + } + pub fn powered(self) -> Option { + BLOCK_TABLE.powered(self.kind, self.state) + } + pub fn set_powered(&mut self, powered: bool) -> bool { + match BLOCK_TABLE.set_powered(self.kind, self.state, powered) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_powered(mut self, powered: bool) -> Self { + self.set_powered(powered); + self + } + pub fn powered_rail_shape(self) -> Option { + BLOCK_TABLE.powered_rail_shape(self.kind, self.state) + } + pub fn set_powered_rail_shape(&mut self, powered_rail_shape: PoweredRailShape) -> bool { + match BLOCK_TABLE.set_powered_rail_shape(self.kind, self.state, powered_rail_shape) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_powered_rail_shape(mut self, powered_rail_shape: PoweredRailShape) -> Self { + self.set_powered_rail_shape(powered_rail_shape); + self + } + pub fn rail_shape(self) -> Option { + BLOCK_TABLE.rail_shape(self.kind, self.state) + } + pub fn set_rail_shape(&mut self, rail_shape: RailShape) -> bool { + match BLOCK_TABLE.set_rail_shape(self.kind, self.state, rail_shape) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_rail_shape(mut self, rail_shape: RailShape) -> Self { + self.set_rail_shape(rail_shape); + self + } + pub fn rotation(self) -> Option { + BLOCK_TABLE.rotation(self.kind, self.state) + } + pub fn set_rotation(&mut self, rotation: i32) -> bool { + match BLOCK_TABLE.set_rotation(self.kind, self.state, rotation) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_rotation(mut self, rotation: i32) -> Self { + self.set_rotation(rotation); + self + } + pub fn short(self) -> Option { + BLOCK_TABLE.short(self.kind, self.state) + } + pub fn set_short(&mut self, short: bool) -> bool { + match BLOCK_TABLE.set_short(self.kind, self.state, short) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_short(mut self, short: bool) -> Self { + self.set_short(short); + self + } + pub fn signal_fire(self) -> Option { + BLOCK_TABLE.signal_fire(self.kind, self.state) + } + pub fn set_signal_fire(&mut self, signal_fire: bool) -> bool { + match BLOCK_TABLE.set_signal_fire(self.kind, self.state, signal_fire) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_signal_fire(mut self, signal_fire: bool) -> Self { + self.set_signal_fire(signal_fire); + self + } + pub fn slab_kind(self) -> Option { + BLOCK_TABLE.slab_kind(self.kind, self.state) + } + pub fn set_slab_kind(&mut self, slab_kind: SlabKind) -> bool { + match BLOCK_TABLE.set_slab_kind(self.kind, self.state, slab_kind) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_slab_kind(mut self, slab_kind: SlabKind) -> Self { + self.set_slab_kind(slab_kind); + self + } + pub fn snowy(self) -> Option { + BLOCK_TABLE.snowy(self.kind, self.state) + } + pub fn set_snowy(&mut self, snowy: bool) -> bool { + match BLOCK_TABLE.set_snowy(self.kind, self.state, snowy) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_snowy(mut self, snowy: bool) -> Self { + self.set_snowy(snowy); + self + } + pub fn south_connected(self) -> Option { + BLOCK_TABLE.south_connected(self.kind, self.state) + } + pub fn set_south_connected(&mut self, south_connected: bool) -> bool { + match BLOCK_TABLE.set_south_connected(self.kind, self.state, south_connected) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_south_connected(mut self, south_connected: bool) -> Self { + self.set_south_connected(south_connected); + self + } + pub fn south_nlt(self) -> Option { + BLOCK_TABLE.south_nlt(self.kind, self.state) + } + pub fn set_south_nlt(&mut self, south_nlt: SouthNlt) -> bool { + match BLOCK_TABLE.set_south_nlt(self.kind, self.state, south_nlt) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_south_nlt(mut self, south_nlt: SouthNlt) -> Self { + self.set_south_nlt(south_nlt); + self + } + pub fn south_wire(self) -> Option { + BLOCK_TABLE.south_wire(self.kind, self.state) + } + pub fn set_south_wire(&mut self, south_wire: SouthWire) -> bool { + match BLOCK_TABLE.set_south_wire(self.kind, self.state, south_wire) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_south_wire(mut self, south_wire: SouthWire) -> Self { + self.set_south_wire(south_wire); + self + } + pub fn stage(self) -> Option { + BLOCK_TABLE.stage(self.kind, self.state) + } + pub fn set_stage(&mut self, stage: i32) -> bool { + match BLOCK_TABLE.set_stage(self.kind, self.state, stage) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_stage(mut self, stage: i32) -> Self { + self.set_stage(stage); + self + } + pub fn stairs_shape(self) -> Option { + BLOCK_TABLE.stairs_shape(self.kind, self.state) + } + pub fn set_stairs_shape(&mut self, stairs_shape: StairsShape) -> bool { + match BLOCK_TABLE.set_stairs_shape(self.kind, self.state, stairs_shape) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_stairs_shape(mut self, stairs_shape: StairsShape) -> Self { + self.set_stairs_shape(stairs_shape); + self + } + pub fn structure_block_mode(self) -> Option { + BLOCK_TABLE.structure_block_mode(self.kind, self.state) + } + pub fn set_structure_block_mode(&mut self, structure_block_mode: StructureBlockMode) -> bool { + match BLOCK_TABLE.set_structure_block_mode(self.kind, self.state, structure_block_mode) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_structure_block_mode(mut self, structure_block_mode: StructureBlockMode) -> Self { + self.set_structure_block_mode(structure_block_mode); + self + } + pub fn triggered(self) -> Option { + BLOCK_TABLE.triggered(self.kind, self.state) + } + pub fn set_triggered(&mut self, triggered: bool) -> bool { + match BLOCK_TABLE.set_triggered(self.kind, self.state, triggered) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_triggered(mut self, triggered: bool) -> Self { + self.set_triggered(triggered); + self + } + pub fn unstable(self) -> Option { + BLOCK_TABLE.unstable(self.kind, self.state) + } + pub fn set_unstable(&mut self, unstable: bool) -> bool { + match BLOCK_TABLE.set_unstable(self.kind, self.state, unstable) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_unstable(mut self, unstable: bool) -> Self { + self.set_unstable(unstable); + self + } + pub fn up(self) -> Option { + BLOCK_TABLE.up(self.kind, self.state) + } + pub fn set_up(&mut self, up: bool) -> bool { + match BLOCK_TABLE.set_up(self.kind, self.state, up) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_up(mut self, up: bool) -> Self { + self.set_up(up); + self + } + pub fn water_level(self) -> Option { + BLOCK_TABLE.water_level(self.kind, self.state) + } + pub fn set_water_level(&mut self, water_level: i32) -> bool { + match BLOCK_TABLE.set_water_level(self.kind, self.state, water_level) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_water_level(mut self, water_level: i32) -> Self { + self.set_water_level(water_level); + self + } + pub fn waterlogged(self) -> Option { + BLOCK_TABLE.waterlogged(self.kind, self.state) + } + pub fn set_waterlogged(&mut self, waterlogged: bool) -> bool { + match BLOCK_TABLE.set_waterlogged(self.kind, self.state, waterlogged) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_waterlogged(mut self, waterlogged: bool) -> Self { + self.set_waterlogged(waterlogged); + self + } + pub fn west_connected(self) -> Option { + BLOCK_TABLE.west_connected(self.kind, self.state) + } + pub fn set_west_connected(&mut self, west_connected: bool) -> bool { + match BLOCK_TABLE.set_west_connected(self.kind, self.state, west_connected) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_west_connected(mut self, west_connected: bool) -> Self { + self.set_west_connected(west_connected); + self + } + pub fn west_nlt(self) -> Option { + BLOCK_TABLE.west_nlt(self.kind, self.state) + } + pub fn set_west_nlt(&mut self, west_nlt: WestNlt) -> bool { + match BLOCK_TABLE.set_west_nlt(self.kind, self.state, west_nlt) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_west_nlt(mut self, west_nlt: WestNlt) -> Self { + self.set_west_nlt(west_nlt); + self + } + pub fn west_wire(self) -> Option { + BLOCK_TABLE.west_wire(self.kind, self.state) + } + pub fn set_west_wire(&mut self, west_wire: WestWire) -> bool { + match BLOCK_TABLE.set_west_wire(self.kind, self.state, west_wire) { + Some(new_state) => { + self.state = new_state; + true + } + None => false, + } + } + pub fn with_west_wire(mut self, west_wire: WestWire) -> Self { + self.set_west_wire(west_wire); + self + } + #[doc = "Returns the identifier of this block. For example, returns `minecraft::air` for an air block."] + pub fn identifier(self) -> &'static str { + match self.kind { + BlockKind::Air => "minecraft:air", + BlockKind::Stone => "minecraft:stone", + BlockKind::Granite => "minecraft:granite", + BlockKind::PolishedGranite => "minecraft:polished_granite", + BlockKind::Diorite => "minecraft:diorite", + BlockKind::PolishedDiorite => "minecraft:polished_diorite", + BlockKind::Andesite => "minecraft:andesite", + BlockKind::PolishedAndesite => "minecraft:polished_andesite", + BlockKind::GrassBlock => "minecraft:grass_block", + BlockKind::Dirt => "minecraft:dirt", + BlockKind::CoarseDirt => "minecraft:coarse_dirt", + BlockKind::Podzol => "minecraft:podzol", + BlockKind::Cobblestone => "minecraft:cobblestone", + BlockKind::OakPlanks => "minecraft:oak_planks", + BlockKind::SprucePlanks => "minecraft:spruce_planks", + BlockKind::BirchPlanks => "minecraft:birch_planks", + BlockKind::JunglePlanks => "minecraft:jungle_planks", + BlockKind::AcaciaPlanks => "minecraft:acacia_planks", + BlockKind::DarkOakPlanks => "minecraft:dark_oak_planks", + BlockKind::OakSapling => "minecraft:oak_sapling", + BlockKind::SpruceSapling => "minecraft:spruce_sapling", + BlockKind::BirchSapling => "minecraft:birch_sapling", + BlockKind::JungleSapling => "minecraft:jungle_sapling", + BlockKind::AcaciaSapling => "minecraft:acacia_sapling", + BlockKind::DarkOakSapling => "minecraft:dark_oak_sapling", + BlockKind::Bedrock => "minecraft:bedrock", + BlockKind::Water => "minecraft:water", + BlockKind::Lava => "minecraft:lava", + BlockKind::Sand => "minecraft:sand", + BlockKind::RedSand => "minecraft:red_sand", + BlockKind::Gravel => "minecraft:gravel", + BlockKind::GoldOre => "minecraft:gold_ore", + BlockKind::IronOre => "minecraft:iron_ore", + BlockKind::CoalOre => "minecraft:coal_ore", + BlockKind::NetherGoldOre => "minecraft:nether_gold_ore", + BlockKind::OakLog => "minecraft:oak_log", + BlockKind::SpruceLog => "minecraft:spruce_log", + BlockKind::BirchLog => "minecraft:birch_log", + BlockKind::JungleLog => "minecraft:jungle_log", + BlockKind::AcaciaLog => "minecraft:acacia_log", + BlockKind::DarkOakLog => "minecraft:dark_oak_log", + BlockKind::StrippedSpruceLog => "minecraft:stripped_spruce_log", + BlockKind::StrippedBirchLog => "minecraft:stripped_birch_log", + BlockKind::StrippedJungleLog => "minecraft:stripped_jungle_log", + BlockKind::StrippedAcaciaLog => "minecraft:stripped_acacia_log", + BlockKind::StrippedDarkOakLog => "minecraft:stripped_dark_oak_log", + BlockKind::StrippedOakLog => "minecraft:stripped_oak_log", + BlockKind::OakWood => "minecraft:oak_wood", + BlockKind::SpruceWood => "minecraft:spruce_wood", + BlockKind::BirchWood => "minecraft:birch_wood", + BlockKind::JungleWood => "minecraft:jungle_wood", + BlockKind::AcaciaWood => "minecraft:acacia_wood", + BlockKind::DarkOakWood => "minecraft:dark_oak_wood", + BlockKind::StrippedOakWood => "minecraft:stripped_oak_wood", + BlockKind::StrippedSpruceWood => "minecraft:stripped_spruce_wood", + BlockKind::StrippedBirchWood => "minecraft:stripped_birch_wood", + BlockKind::StrippedJungleWood => "minecraft:stripped_jungle_wood", + BlockKind::StrippedAcaciaWood => "minecraft:stripped_acacia_wood", + BlockKind::StrippedDarkOakWood => "minecraft:stripped_dark_oak_wood", + BlockKind::OakLeaves => "minecraft:oak_leaves", + BlockKind::SpruceLeaves => "minecraft:spruce_leaves", + BlockKind::BirchLeaves => "minecraft:birch_leaves", + BlockKind::JungleLeaves => "minecraft:jungle_leaves", + BlockKind::AcaciaLeaves => "minecraft:acacia_leaves", + BlockKind::DarkOakLeaves => "minecraft:dark_oak_leaves", + BlockKind::Sponge => "minecraft:sponge", + BlockKind::WetSponge => "minecraft:wet_sponge", + BlockKind::Glass => "minecraft:glass", + BlockKind::LapisOre => "minecraft:lapis_ore", + BlockKind::LapisBlock => "minecraft:lapis_block", + BlockKind::Dispenser => "minecraft:dispenser", + BlockKind::Sandstone => "minecraft:sandstone", + BlockKind::ChiseledSandstone => "minecraft:chiseled_sandstone", + BlockKind::CutSandstone => "minecraft:cut_sandstone", + BlockKind::NoteBlock => "minecraft:note_block", + BlockKind::WhiteBed => "minecraft:white_bed", + BlockKind::OrangeBed => "minecraft:orange_bed", + BlockKind::MagentaBed => "minecraft:magenta_bed", + BlockKind::LightBlueBed => "minecraft:light_blue_bed", + BlockKind::YellowBed => "minecraft:yellow_bed", + BlockKind::LimeBed => "minecraft:lime_bed", + BlockKind::PinkBed => "minecraft:pink_bed", + BlockKind::GrayBed => "minecraft:gray_bed", + BlockKind::LightGrayBed => "minecraft:light_gray_bed", + BlockKind::CyanBed => "minecraft:cyan_bed", + BlockKind::PurpleBed => "minecraft:purple_bed", + BlockKind::BlueBed => "minecraft:blue_bed", + BlockKind::BrownBed => "minecraft:brown_bed", + BlockKind::GreenBed => "minecraft:green_bed", + BlockKind::RedBed => "minecraft:red_bed", + BlockKind::BlackBed => "minecraft:black_bed", + BlockKind::PoweredRail => "minecraft:powered_rail", + BlockKind::DetectorRail => "minecraft:detector_rail", + BlockKind::StickyPiston => "minecraft:sticky_piston", + BlockKind::Cobweb => "minecraft:cobweb", + BlockKind::Grass => "minecraft:grass", + BlockKind::Fern => "minecraft:fern", + BlockKind::DeadBush => "minecraft:dead_bush", + BlockKind::Seagrass => "minecraft:seagrass", + BlockKind::TallSeagrass => "minecraft:tall_seagrass", + BlockKind::Piston => "minecraft:piston", + BlockKind::PistonHead => "minecraft:piston_head", + BlockKind::WhiteWool => "minecraft:white_wool", + BlockKind::OrangeWool => "minecraft:orange_wool", + BlockKind::MagentaWool => "minecraft:magenta_wool", + BlockKind::LightBlueWool => "minecraft:light_blue_wool", + BlockKind::YellowWool => "minecraft:yellow_wool", + BlockKind::LimeWool => "minecraft:lime_wool", + BlockKind::PinkWool => "minecraft:pink_wool", + BlockKind::GrayWool => "minecraft:gray_wool", + BlockKind::LightGrayWool => "minecraft:light_gray_wool", + BlockKind::CyanWool => "minecraft:cyan_wool", + BlockKind::PurpleWool => "minecraft:purple_wool", + BlockKind::BlueWool => "minecraft:blue_wool", + BlockKind::BrownWool => "minecraft:brown_wool", + BlockKind::GreenWool => "minecraft:green_wool", + BlockKind::RedWool => "minecraft:red_wool", + BlockKind::BlackWool => "minecraft:black_wool", + BlockKind::MovingPiston => "minecraft:moving_piston", + BlockKind::Dandelion => "minecraft:dandelion", + BlockKind::Poppy => "minecraft:poppy", + BlockKind::BlueOrchid => "minecraft:blue_orchid", + BlockKind::Allium => "minecraft:allium", + BlockKind::AzureBluet => "minecraft:azure_bluet", + BlockKind::RedTulip => "minecraft:red_tulip", + BlockKind::OrangeTulip => "minecraft:orange_tulip", + BlockKind::WhiteTulip => "minecraft:white_tulip", + BlockKind::PinkTulip => "minecraft:pink_tulip", + BlockKind::OxeyeDaisy => "minecraft:oxeye_daisy", + BlockKind::Cornflower => "minecraft:cornflower", + BlockKind::WitherRose => "minecraft:wither_rose", + BlockKind::LilyOfTheValley => "minecraft:lily_of_the_valley", + BlockKind::BrownMushroom => "minecraft:brown_mushroom", + BlockKind::RedMushroom => "minecraft:red_mushroom", + BlockKind::GoldBlock => "minecraft:gold_block", + BlockKind::IronBlock => "minecraft:iron_block", + BlockKind::Bricks => "minecraft:bricks", + BlockKind::Tnt => "minecraft:tnt", + BlockKind::Bookshelf => "minecraft:bookshelf", + BlockKind::MossyCobblestone => "minecraft:mossy_cobblestone", + BlockKind::Obsidian => "minecraft:obsidian", + BlockKind::Torch => "minecraft:torch", + BlockKind::WallTorch => "minecraft:wall_torch", + BlockKind::Fire => "minecraft:fire", + BlockKind::SoulFire => "minecraft:soul_fire", + BlockKind::Spawner => "minecraft:spawner", + BlockKind::OakStairs => "minecraft:oak_stairs", + BlockKind::Chest => "minecraft:chest", + BlockKind::RedstoneWire => "minecraft:redstone_wire", + BlockKind::DiamondOre => "minecraft:diamond_ore", + BlockKind::DiamondBlock => "minecraft:diamond_block", + BlockKind::CraftingTable => "minecraft:crafting_table", + BlockKind::Wheat => "minecraft:wheat", + BlockKind::Farmland => "minecraft:farmland", + BlockKind::Furnace => "minecraft:furnace", + BlockKind::OakSign => "minecraft:oak_sign", + BlockKind::SpruceSign => "minecraft:spruce_sign", + BlockKind::BirchSign => "minecraft:birch_sign", + BlockKind::AcaciaSign => "minecraft:acacia_sign", + BlockKind::JungleSign => "minecraft:jungle_sign", + BlockKind::DarkOakSign => "minecraft:dark_oak_sign", + BlockKind::OakDoor => "minecraft:oak_door", + BlockKind::Ladder => "minecraft:ladder", + BlockKind::Rail => "minecraft:rail", + BlockKind::CobblestoneStairs => "minecraft:cobblestone_stairs", + BlockKind::OakWallSign => "minecraft:oak_wall_sign", + BlockKind::SpruceWallSign => "minecraft:spruce_wall_sign", + BlockKind::BirchWallSign => "minecraft:birch_wall_sign", + BlockKind::AcaciaWallSign => "minecraft:acacia_wall_sign", + BlockKind::JungleWallSign => "minecraft:jungle_wall_sign", + BlockKind::DarkOakWallSign => "minecraft:dark_oak_wall_sign", + BlockKind::Lever => "minecraft:lever", + BlockKind::StonePressurePlate => "minecraft:stone_pressure_plate", + BlockKind::IronDoor => "minecraft:iron_door", + BlockKind::OakPressurePlate => "minecraft:oak_pressure_plate", + BlockKind::SprucePressurePlate => "minecraft:spruce_pressure_plate", + BlockKind::BirchPressurePlate => "minecraft:birch_pressure_plate", + BlockKind::JunglePressurePlate => "minecraft:jungle_pressure_plate", + BlockKind::AcaciaPressurePlate => "minecraft:acacia_pressure_plate", + BlockKind::DarkOakPressurePlate => "minecraft:dark_oak_pressure_plate", + BlockKind::RedstoneOre => "minecraft:redstone_ore", + BlockKind::RedstoneTorch => "minecraft:redstone_torch", + BlockKind::RedstoneWallTorch => "minecraft:redstone_wall_torch", + BlockKind::StoneButton => "minecraft:stone_button", + BlockKind::Snow => "minecraft:snow", + BlockKind::Ice => "minecraft:ice", + BlockKind::SnowBlock => "minecraft:snow_block", + BlockKind::Cactus => "minecraft:cactus", BlockKind::Clay => "minecraft:clay", BlockKind::SugarCane => "minecraft:sugar_cane", BlockKind::Jukebox => "minecraft:jukebox", @@ -6895,6 +8830,11 @@ impl BlockId { BlockKind::Pumpkin => "minecraft:pumpkin", BlockKind::Netherrack => "minecraft:netherrack", BlockKind::SoulSand => "minecraft:soul_sand", + BlockKind::SoulSoil => "minecraft:soul_soil", + BlockKind::Basalt => "minecraft:basalt", + BlockKind::PolishedBasalt => "minecraft:polished_basalt", + BlockKind::SoulTorch => "minecraft:soul_torch", + BlockKind::SoulWallTorch => "minecraft:soul_wall_torch", BlockKind::Glowstone => "minecraft:glowstone", BlockKind::NetherPortal => "minecraft:nether_portal", BlockKind::CarvedPumpkin => "minecraft:carved_pumpkin", @@ -6923,20 +8863,21 @@ impl BlockId { BlockKind::JungleTrapdoor => "minecraft:jungle_trapdoor", BlockKind::AcaciaTrapdoor => "minecraft:acacia_trapdoor", BlockKind::DarkOakTrapdoor => "minecraft:dark_oak_trapdoor", + BlockKind::StoneBricks => "minecraft:stone_bricks", + BlockKind::MossyStoneBricks => "minecraft:mossy_stone_bricks", + BlockKind::CrackedStoneBricks => "minecraft:cracked_stone_bricks", + BlockKind::ChiseledStoneBricks => "minecraft:chiseled_stone_bricks", BlockKind::InfestedStone => "minecraft:infested_stone", BlockKind::InfestedCobblestone => "minecraft:infested_cobblestone", BlockKind::InfestedStoneBricks => "minecraft:infested_stone_bricks", BlockKind::InfestedMossyStoneBricks => "minecraft:infested_mossy_stone_bricks", BlockKind::InfestedCrackedStoneBricks => "minecraft:infested_cracked_stone_bricks", BlockKind::InfestedChiseledStoneBricks => "minecraft:infested_chiseled_stone_bricks", - BlockKind::StoneBricks => "minecraft:stone_bricks", - BlockKind::MossyStoneBricks => "minecraft:mossy_stone_bricks", - BlockKind::CrackedStoneBricks => "minecraft:cracked_stone_bricks", - BlockKind::ChiseledStoneBricks => "minecraft:chiseled_stone_bricks", BlockKind::BrownMushroomBlock => "minecraft:brown_mushroom_block", BlockKind::RedMushroomBlock => "minecraft:red_mushroom_block", BlockKind::MushroomStem => "minecraft:mushroom_stem", BlockKind::IronBars => "minecraft:iron_bars", + BlockKind::Chain => "minecraft:chain", BlockKind::GlassPane => "minecraft:glass_pane", BlockKind::Melon => "minecraft:melon", BlockKind::AttachedPumpkinStem => "minecraft:attached_pumpkin_stem", @@ -6993,6 +8934,9 @@ impl BlockId { BlockKind::PottedWhiteTulip => "minecraft:potted_white_tulip", BlockKind::PottedPinkTulip => "minecraft:potted_pink_tulip", BlockKind::PottedOxeyeDaisy => "minecraft:potted_oxeye_daisy", + BlockKind::PottedCornflower => "minecraft:potted_cornflower", + BlockKind::PottedLilyOfTheValley => "minecraft:potted_lily_of_the_valley", + BlockKind::PottedWitherRose => "minecraft:potted_wither_rose", BlockKind::PottedRedMushroom => "minecraft:potted_red_mushroom", BlockKind::PottedBrownMushroom => "minecraft:potted_brown_mushroom", BlockKind::PottedDeadBush => "minecraft:potted_dead_bush", @@ -7005,18 +8949,18 @@ impl BlockId { BlockKind::JungleButton => "minecraft:jungle_button", BlockKind::AcaciaButton => "minecraft:acacia_button", BlockKind::DarkOakButton => "minecraft:dark_oak_button", - BlockKind::SkeletonWallSkull => "minecraft:skeleton_wall_skull", BlockKind::SkeletonSkull => "minecraft:skeleton_skull", - BlockKind::WitherSkeletonWallSkull => "minecraft:wither_skeleton_wall_skull", + BlockKind::SkeletonWallSkull => "minecraft:skeleton_wall_skull", BlockKind::WitherSkeletonSkull => "minecraft:wither_skeleton_skull", - BlockKind::ZombieWallHead => "minecraft:zombie_wall_head", + BlockKind::WitherSkeletonWallSkull => "minecraft:wither_skeleton_wall_skull", BlockKind::ZombieHead => "minecraft:zombie_head", - BlockKind::PlayerWallHead => "minecraft:player_wall_head", + BlockKind::ZombieWallHead => "minecraft:zombie_wall_head", BlockKind::PlayerHead => "minecraft:player_head", - BlockKind::CreeperWallHead => "minecraft:creeper_wall_head", + BlockKind::PlayerWallHead => "minecraft:player_wall_head", BlockKind::CreeperHead => "minecraft:creeper_head", - BlockKind::DragonWallHead => "minecraft:dragon_wall_head", + BlockKind::CreeperWallHead => "minecraft:creeper_wall_head", BlockKind::DragonHead => "minecraft:dragon_head", + BlockKind::DragonWallHead => "minecraft:dragon_wall_head", BlockKind::Anvil => "minecraft:anvil", BlockKind::ChippedAnvil => "minecraft:chipped_anvil", BlockKind::DamagedAnvil => "minecraft:damaged_anvil", @@ -7150,7 +9094,9 @@ impl BlockId { BlockKind::AcaciaSlab => "minecraft:acacia_slab", BlockKind::DarkOakSlab => "minecraft:dark_oak_slab", BlockKind::StoneSlab => "minecraft:stone_slab", + BlockKind::SmoothStoneSlab => "minecraft:smooth_stone_slab", BlockKind::SandstoneSlab => "minecraft:sandstone_slab", + BlockKind::CutSandstoneSlab => "minecraft:cut_sandstone_slab", BlockKind::PetrifiedOakSlab => "minecraft:petrified_oak_slab", BlockKind::CobblestoneSlab => "minecraft:cobblestone_slab", BlockKind::BrickSlab => "minecraft:brick_slab", @@ -7158,6 +9104,7 @@ impl BlockId { BlockKind::NetherBrickSlab => "minecraft:nether_brick_slab", BlockKind::QuartzSlab => "minecraft:quartz_slab", BlockKind::RedSandstoneSlab => "minecraft:red_sandstone_slab", + BlockKind::CutRedSandstoneSlab => "minecraft:cut_red_sandstone_slab", BlockKind::PurpurSlab => "minecraft:purpur_slab", BlockKind::SmoothStone => "minecraft:smooth_stone", BlockKind::SmoothSandstone => "minecraft:smooth_sandstone", @@ -7286,16 +9233,6 @@ impl BlockId { BlockKind::BubbleCoral => "minecraft:bubble_coral", BlockKind::FireCoral => "minecraft:fire_coral", BlockKind::HornCoral => "minecraft:horn_coral", - BlockKind::DeadTubeCoralWallFan => "minecraft:dead_tube_coral_wall_fan", - BlockKind::DeadBrainCoralWallFan => "minecraft:dead_brain_coral_wall_fan", - BlockKind::DeadBubbleCoralWallFan => "minecraft:dead_bubble_coral_wall_fan", - BlockKind::DeadFireCoralWallFan => "minecraft:dead_fire_coral_wall_fan", - BlockKind::DeadHornCoralWallFan => "minecraft:dead_horn_coral_wall_fan", - BlockKind::TubeCoralWallFan => "minecraft:tube_coral_wall_fan", - BlockKind::BrainCoralWallFan => "minecraft:brain_coral_wall_fan", - BlockKind::BubbleCoralWallFan => "minecraft:bubble_coral_wall_fan", - BlockKind::FireCoralWallFan => "minecraft:fire_coral_wall_fan", - BlockKind::HornCoralWallFan => "minecraft:horn_coral_wall_fan", BlockKind::DeadTubeCoralFan => "minecraft:dead_tube_coral_fan", BlockKind::DeadBrainCoralFan => "minecraft:dead_brain_coral_fan", BlockKind::DeadBubbleCoralFan => "minecraft:dead_bubble_coral_fan", @@ -7306,819 +9243,3015 @@ impl BlockId { BlockKind::BubbleCoralFan => "minecraft:bubble_coral_fan", BlockKind::FireCoralFan => "minecraft:fire_coral_fan", BlockKind::HornCoralFan => "minecraft:horn_coral_fan", + BlockKind::DeadTubeCoralWallFan => "minecraft:dead_tube_coral_wall_fan", + BlockKind::DeadBrainCoralWallFan => "minecraft:dead_brain_coral_wall_fan", + BlockKind::DeadBubbleCoralWallFan => "minecraft:dead_bubble_coral_wall_fan", + BlockKind::DeadFireCoralWallFan => "minecraft:dead_fire_coral_wall_fan", + BlockKind::DeadHornCoralWallFan => "minecraft:dead_horn_coral_wall_fan", + BlockKind::TubeCoralWallFan => "minecraft:tube_coral_wall_fan", + BlockKind::BrainCoralWallFan => "minecraft:brain_coral_wall_fan", + BlockKind::BubbleCoralWallFan => "minecraft:bubble_coral_wall_fan", + BlockKind::FireCoralWallFan => "minecraft:fire_coral_wall_fan", + BlockKind::HornCoralWallFan => "minecraft:horn_coral_wall_fan", BlockKind::SeaPickle => "minecraft:sea_pickle", BlockKind::BlueIce => "minecraft:blue_ice", BlockKind::Conduit => "minecraft:conduit", + BlockKind::BambooSapling => "minecraft:bamboo_sapling", + BlockKind::Bamboo => "minecraft:bamboo", + BlockKind::PottedBamboo => "minecraft:potted_bamboo", BlockKind::VoidAir => "minecraft:void_air", BlockKind::CaveAir => "minecraft:cave_air", BlockKind::BubbleColumn => "minecraft:bubble_column", + BlockKind::PolishedGraniteStairs => "minecraft:polished_granite_stairs", + BlockKind::SmoothRedSandstoneStairs => "minecraft:smooth_red_sandstone_stairs", + BlockKind::MossyStoneBrickStairs => "minecraft:mossy_stone_brick_stairs", + BlockKind::PolishedDioriteStairs => "minecraft:polished_diorite_stairs", + BlockKind::MossyCobblestoneStairs => "minecraft:mossy_cobblestone_stairs", + BlockKind::EndStoneBrickStairs => "minecraft:end_stone_brick_stairs", + BlockKind::StoneStairs => "minecraft:stone_stairs", + BlockKind::SmoothSandstoneStairs => "minecraft:smooth_sandstone_stairs", + BlockKind::SmoothQuartzStairs => "minecraft:smooth_quartz_stairs", + BlockKind::GraniteStairs => "minecraft:granite_stairs", + BlockKind::AndesiteStairs => "minecraft:andesite_stairs", + BlockKind::RedNetherBrickStairs => "minecraft:red_nether_brick_stairs", + BlockKind::PolishedAndesiteStairs => "minecraft:polished_andesite_stairs", + BlockKind::DioriteStairs => "minecraft:diorite_stairs", + BlockKind::PolishedGraniteSlab => "minecraft:polished_granite_slab", + BlockKind::SmoothRedSandstoneSlab => "minecraft:smooth_red_sandstone_slab", + BlockKind::MossyStoneBrickSlab => "minecraft:mossy_stone_brick_slab", + BlockKind::PolishedDioriteSlab => "minecraft:polished_diorite_slab", + BlockKind::MossyCobblestoneSlab => "minecraft:mossy_cobblestone_slab", + BlockKind::EndStoneBrickSlab => "minecraft:end_stone_brick_slab", + BlockKind::SmoothSandstoneSlab => "minecraft:smooth_sandstone_slab", + BlockKind::SmoothQuartzSlab => "minecraft:smooth_quartz_slab", + BlockKind::GraniteSlab => "minecraft:granite_slab", + BlockKind::AndesiteSlab => "minecraft:andesite_slab", + BlockKind::RedNetherBrickSlab => "minecraft:red_nether_brick_slab", + BlockKind::PolishedAndesiteSlab => "minecraft:polished_andesite_slab", + BlockKind::DioriteSlab => "minecraft:diorite_slab", + BlockKind::BrickWall => "minecraft:brick_wall", + BlockKind::PrismarineWall => "minecraft:prismarine_wall", + BlockKind::RedSandstoneWall => "minecraft:red_sandstone_wall", + BlockKind::MossyStoneBrickWall => "minecraft:mossy_stone_brick_wall", + BlockKind::GraniteWall => "minecraft:granite_wall", + BlockKind::StoneBrickWall => "minecraft:stone_brick_wall", + BlockKind::NetherBrickWall => "minecraft:nether_brick_wall", + BlockKind::AndesiteWall => "minecraft:andesite_wall", + BlockKind::RedNetherBrickWall => "minecraft:red_nether_brick_wall", + BlockKind::SandstoneWall => "minecraft:sandstone_wall", + BlockKind::EndStoneBrickWall => "minecraft:end_stone_brick_wall", + BlockKind::DioriteWall => "minecraft:diorite_wall", + BlockKind::Scaffolding => "minecraft:scaffolding", + BlockKind::Loom => "minecraft:loom", + BlockKind::Barrel => "minecraft:barrel", + BlockKind::Smoker => "minecraft:smoker", + BlockKind::BlastFurnace => "minecraft:blast_furnace", + BlockKind::CartographyTable => "minecraft:cartography_table", + BlockKind::FletchingTable => "minecraft:fletching_table", + BlockKind::Grindstone => "minecraft:grindstone", + BlockKind::Lectern => "minecraft:lectern", + BlockKind::SmithingTable => "minecraft:smithing_table", + BlockKind::Stonecutter => "minecraft:stonecutter", + BlockKind::Bell => "minecraft:bell", + BlockKind::Lantern => "minecraft:lantern", + BlockKind::SoulLantern => "minecraft:soul_lantern", + BlockKind::Campfire => "minecraft:campfire", + BlockKind::SoulCampfire => "minecraft:soul_campfire", + BlockKind::SweetBerryBush => "minecraft:sweet_berry_bush", + BlockKind::WarpedStem => "minecraft:warped_stem", + BlockKind::StrippedWarpedStem => "minecraft:stripped_warped_stem", + BlockKind::WarpedHyphae => "minecraft:warped_hyphae", + BlockKind::StrippedWarpedHyphae => "minecraft:stripped_warped_hyphae", + BlockKind::WarpedNylium => "minecraft:warped_nylium", + BlockKind::WarpedFungus => "minecraft:warped_fungus", + BlockKind::WarpedWartBlock => "minecraft:warped_wart_block", + BlockKind::WarpedRoots => "minecraft:warped_roots", + BlockKind::NetherSprouts => "minecraft:nether_sprouts", + BlockKind::CrimsonStem => "minecraft:crimson_stem", + BlockKind::StrippedCrimsonStem => "minecraft:stripped_crimson_stem", + BlockKind::CrimsonHyphae => "minecraft:crimson_hyphae", + BlockKind::StrippedCrimsonHyphae => "minecraft:stripped_crimson_hyphae", + BlockKind::CrimsonNylium => "minecraft:crimson_nylium", + BlockKind::CrimsonFungus => "minecraft:crimson_fungus", + BlockKind::Shroomlight => "minecraft:shroomlight", + BlockKind::WeepingVines => "minecraft:weeping_vines", + BlockKind::WeepingVinesPlant => "minecraft:weeping_vines_plant", + BlockKind::TwistingVines => "minecraft:twisting_vines", + BlockKind::TwistingVinesPlant => "minecraft:twisting_vines_plant", + BlockKind::CrimsonRoots => "minecraft:crimson_roots", + BlockKind::CrimsonPlanks => "minecraft:crimson_planks", + BlockKind::WarpedPlanks => "minecraft:warped_planks", + BlockKind::CrimsonSlab => "minecraft:crimson_slab", + BlockKind::WarpedSlab => "minecraft:warped_slab", + BlockKind::CrimsonPressurePlate => "minecraft:crimson_pressure_plate", + BlockKind::WarpedPressurePlate => "minecraft:warped_pressure_plate", + BlockKind::CrimsonFence => "minecraft:crimson_fence", + BlockKind::WarpedFence => "minecraft:warped_fence", + BlockKind::CrimsonTrapdoor => "minecraft:crimson_trapdoor", + BlockKind::WarpedTrapdoor => "minecraft:warped_trapdoor", + BlockKind::CrimsonFenceGate => "minecraft:crimson_fence_gate", + BlockKind::WarpedFenceGate => "minecraft:warped_fence_gate", + BlockKind::CrimsonStairs => "minecraft:crimson_stairs", + BlockKind::WarpedStairs => "minecraft:warped_stairs", + BlockKind::CrimsonButton => "minecraft:crimson_button", + BlockKind::WarpedButton => "minecraft:warped_button", + BlockKind::CrimsonDoor => "minecraft:crimson_door", + BlockKind::WarpedDoor => "minecraft:warped_door", + BlockKind::CrimsonSign => "minecraft:crimson_sign", + BlockKind::WarpedSign => "minecraft:warped_sign", + BlockKind::CrimsonWallSign => "minecraft:crimson_wall_sign", + BlockKind::WarpedWallSign => "minecraft:warped_wall_sign", BlockKind::StructureBlock => "minecraft:structure_block", + BlockKind::Jigsaw => "minecraft:jigsaw", + BlockKind::Composter => "minecraft:composter", + BlockKind::Target => "minecraft:target", + BlockKind::BeeNest => "minecraft:bee_nest", + BlockKind::Beehive => "minecraft:beehive", + BlockKind::HoneyBlock => "minecraft:honey_block", + BlockKind::HoneycombBlock => "minecraft:honeycomb_block", + BlockKind::NetheriteBlock => "minecraft:netherite_block", + BlockKind::AncientDebris => "minecraft:ancient_debris", + BlockKind::CryingObsidian => "minecraft:crying_obsidian", + BlockKind::RespawnAnchor => "minecraft:respawn_anchor", + BlockKind::PottedCrimsonFungus => "minecraft:potted_crimson_fungus", + BlockKind::PottedWarpedFungus => "minecraft:potted_warped_fungus", + BlockKind::PottedCrimsonRoots => "minecraft:potted_crimson_roots", + BlockKind::PottedWarpedRoots => "minecraft:potted_warped_roots", + BlockKind::Lodestone => "minecraft:lodestone", + BlockKind::Blackstone => "minecraft:blackstone", + BlockKind::BlackstoneStairs => "minecraft:blackstone_stairs", + BlockKind::BlackstoneWall => "minecraft:blackstone_wall", + BlockKind::BlackstoneSlab => "minecraft:blackstone_slab", + BlockKind::PolishedBlackstone => "minecraft:polished_blackstone", + BlockKind::PolishedBlackstoneBricks => "minecraft:polished_blackstone_bricks", + BlockKind::CrackedPolishedBlackstoneBricks => { + "minecraft:cracked_polished_blackstone_bricks" + } + BlockKind::ChiseledPolishedBlackstone => "minecraft:chiseled_polished_blackstone", + BlockKind::PolishedBlackstoneBrickSlab => "minecraft:polished_blackstone_brick_slab", + BlockKind::PolishedBlackstoneBrickStairs => { + "minecraft:polished_blackstone_brick_stairs" + } + BlockKind::PolishedBlackstoneBrickWall => "minecraft:polished_blackstone_brick_wall", + BlockKind::GildedBlackstone => "minecraft:gilded_blackstone", + BlockKind::PolishedBlackstoneStairs => "minecraft:polished_blackstone_stairs", + BlockKind::PolishedBlackstoneSlab => "minecraft:polished_blackstone_slab", + BlockKind::PolishedBlackstonePressurePlate => { + "minecraft:polished_blackstone_pressure_plate" + } + BlockKind::PolishedBlackstoneButton => "minecraft:polished_blackstone_button", + BlockKind::PolishedBlackstoneWall => "minecraft:polished_blackstone_wall", + BlockKind::ChiseledNetherBricks => "minecraft:chiseled_nether_bricks", + BlockKind::CrackedNetherBricks => "minecraft:cracked_nether_bricks", + BlockKind::QuartzBricks => "minecraft:quartz_bricks", + } + } + #[doc = "Returns a mapping from property name to property value for this block. Used to serialize blocks in vanilla world saves."] + pub fn to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + match self.kind { + BlockKind::Air => self.air_to_properties_map(), + BlockKind::Stone => self.stone_to_properties_map(), + BlockKind::Granite => self.granite_to_properties_map(), + BlockKind::PolishedGranite => self.polished_granite_to_properties_map(), + BlockKind::Diorite => self.diorite_to_properties_map(), + BlockKind::PolishedDiorite => self.polished_diorite_to_properties_map(), + BlockKind::Andesite => self.andesite_to_properties_map(), + BlockKind::PolishedAndesite => self.polished_andesite_to_properties_map(), + BlockKind::GrassBlock => self.grass_block_to_properties_map(), + BlockKind::Dirt => self.dirt_to_properties_map(), + BlockKind::CoarseDirt => self.coarse_dirt_to_properties_map(), + BlockKind::Podzol => self.podzol_to_properties_map(), + BlockKind::Cobblestone => self.cobblestone_to_properties_map(), + BlockKind::OakPlanks => self.oak_planks_to_properties_map(), + BlockKind::SprucePlanks => self.spruce_planks_to_properties_map(), + BlockKind::BirchPlanks => self.birch_planks_to_properties_map(), + BlockKind::JunglePlanks => self.jungle_planks_to_properties_map(), + BlockKind::AcaciaPlanks => self.acacia_planks_to_properties_map(), + BlockKind::DarkOakPlanks => self.dark_oak_planks_to_properties_map(), + BlockKind::OakSapling => self.oak_sapling_to_properties_map(), + BlockKind::SpruceSapling => self.spruce_sapling_to_properties_map(), + BlockKind::BirchSapling => self.birch_sapling_to_properties_map(), + BlockKind::JungleSapling => self.jungle_sapling_to_properties_map(), + BlockKind::AcaciaSapling => self.acacia_sapling_to_properties_map(), + BlockKind::DarkOakSapling => self.dark_oak_sapling_to_properties_map(), + BlockKind::Bedrock => self.bedrock_to_properties_map(), + BlockKind::Water => self.water_to_properties_map(), + BlockKind::Lava => self.lava_to_properties_map(), + BlockKind::Sand => self.sand_to_properties_map(), + BlockKind::RedSand => self.red_sand_to_properties_map(), + BlockKind::Gravel => self.gravel_to_properties_map(), + BlockKind::GoldOre => self.gold_ore_to_properties_map(), + BlockKind::IronOre => self.iron_ore_to_properties_map(), + BlockKind::CoalOre => self.coal_ore_to_properties_map(), + BlockKind::NetherGoldOre => self.nether_gold_ore_to_properties_map(), + BlockKind::OakLog => self.oak_log_to_properties_map(), + BlockKind::SpruceLog => self.spruce_log_to_properties_map(), + BlockKind::BirchLog => self.birch_log_to_properties_map(), + BlockKind::JungleLog => self.jungle_log_to_properties_map(), + BlockKind::AcaciaLog => self.acacia_log_to_properties_map(), + BlockKind::DarkOakLog => self.dark_oak_log_to_properties_map(), + BlockKind::StrippedSpruceLog => self.stripped_spruce_log_to_properties_map(), + BlockKind::StrippedBirchLog => self.stripped_birch_log_to_properties_map(), + BlockKind::StrippedJungleLog => self.stripped_jungle_log_to_properties_map(), + BlockKind::StrippedAcaciaLog => self.stripped_acacia_log_to_properties_map(), + BlockKind::StrippedDarkOakLog => self.stripped_dark_oak_log_to_properties_map(), + BlockKind::StrippedOakLog => self.stripped_oak_log_to_properties_map(), + BlockKind::OakWood => self.oak_wood_to_properties_map(), + BlockKind::SpruceWood => self.spruce_wood_to_properties_map(), + BlockKind::BirchWood => self.birch_wood_to_properties_map(), + BlockKind::JungleWood => self.jungle_wood_to_properties_map(), + BlockKind::AcaciaWood => self.acacia_wood_to_properties_map(), + BlockKind::DarkOakWood => self.dark_oak_wood_to_properties_map(), + BlockKind::StrippedOakWood => self.stripped_oak_wood_to_properties_map(), + BlockKind::StrippedSpruceWood => self.stripped_spruce_wood_to_properties_map(), + BlockKind::StrippedBirchWood => self.stripped_birch_wood_to_properties_map(), + BlockKind::StrippedJungleWood => self.stripped_jungle_wood_to_properties_map(), + BlockKind::StrippedAcaciaWood => self.stripped_acacia_wood_to_properties_map(), + BlockKind::StrippedDarkOakWood => self.stripped_dark_oak_wood_to_properties_map(), + BlockKind::OakLeaves => self.oak_leaves_to_properties_map(), + BlockKind::SpruceLeaves => self.spruce_leaves_to_properties_map(), + BlockKind::BirchLeaves => self.birch_leaves_to_properties_map(), + BlockKind::JungleLeaves => self.jungle_leaves_to_properties_map(), + BlockKind::AcaciaLeaves => self.acacia_leaves_to_properties_map(), + BlockKind::DarkOakLeaves => self.dark_oak_leaves_to_properties_map(), + BlockKind::Sponge => self.sponge_to_properties_map(), + BlockKind::WetSponge => self.wet_sponge_to_properties_map(), + BlockKind::Glass => self.glass_to_properties_map(), + BlockKind::LapisOre => self.lapis_ore_to_properties_map(), + BlockKind::LapisBlock => self.lapis_block_to_properties_map(), + BlockKind::Dispenser => self.dispenser_to_properties_map(), + BlockKind::Sandstone => self.sandstone_to_properties_map(), + BlockKind::ChiseledSandstone => self.chiseled_sandstone_to_properties_map(), + BlockKind::CutSandstone => self.cut_sandstone_to_properties_map(), + BlockKind::NoteBlock => self.note_block_to_properties_map(), + BlockKind::WhiteBed => self.white_bed_to_properties_map(), + BlockKind::OrangeBed => self.orange_bed_to_properties_map(), + BlockKind::MagentaBed => self.magenta_bed_to_properties_map(), + BlockKind::LightBlueBed => self.light_blue_bed_to_properties_map(), + BlockKind::YellowBed => self.yellow_bed_to_properties_map(), + BlockKind::LimeBed => self.lime_bed_to_properties_map(), + BlockKind::PinkBed => self.pink_bed_to_properties_map(), + BlockKind::GrayBed => self.gray_bed_to_properties_map(), + BlockKind::LightGrayBed => self.light_gray_bed_to_properties_map(), + BlockKind::CyanBed => self.cyan_bed_to_properties_map(), + BlockKind::PurpleBed => self.purple_bed_to_properties_map(), + BlockKind::BlueBed => self.blue_bed_to_properties_map(), + BlockKind::BrownBed => self.brown_bed_to_properties_map(), + BlockKind::GreenBed => self.green_bed_to_properties_map(), + BlockKind::RedBed => self.red_bed_to_properties_map(), + BlockKind::BlackBed => self.black_bed_to_properties_map(), + BlockKind::PoweredRail => self.powered_rail_to_properties_map(), + BlockKind::DetectorRail => self.detector_rail_to_properties_map(), + BlockKind::StickyPiston => self.sticky_piston_to_properties_map(), + BlockKind::Cobweb => self.cobweb_to_properties_map(), + BlockKind::Grass => self.grass_to_properties_map(), + BlockKind::Fern => self.fern_to_properties_map(), + BlockKind::DeadBush => self.dead_bush_to_properties_map(), + BlockKind::Seagrass => self.seagrass_to_properties_map(), + BlockKind::TallSeagrass => self.tall_seagrass_to_properties_map(), + BlockKind::Piston => self.piston_to_properties_map(), + BlockKind::PistonHead => self.piston_head_to_properties_map(), + BlockKind::WhiteWool => self.white_wool_to_properties_map(), + BlockKind::OrangeWool => self.orange_wool_to_properties_map(), + BlockKind::MagentaWool => self.magenta_wool_to_properties_map(), + BlockKind::LightBlueWool => self.light_blue_wool_to_properties_map(), + BlockKind::YellowWool => self.yellow_wool_to_properties_map(), + BlockKind::LimeWool => self.lime_wool_to_properties_map(), + BlockKind::PinkWool => self.pink_wool_to_properties_map(), + BlockKind::GrayWool => self.gray_wool_to_properties_map(), + BlockKind::LightGrayWool => self.light_gray_wool_to_properties_map(), + BlockKind::CyanWool => self.cyan_wool_to_properties_map(), + BlockKind::PurpleWool => self.purple_wool_to_properties_map(), + BlockKind::BlueWool => self.blue_wool_to_properties_map(), + BlockKind::BrownWool => self.brown_wool_to_properties_map(), + BlockKind::GreenWool => self.green_wool_to_properties_map(), + BlockKind::RedWool => self.red_wool_to_properties_map(), + BlockKind::BlackWool => self.black_wool_to_properties_map(), + BlockKind::MovingPiston => self.moving_piston_to_properties_map(), + BlockKind::Dandelion => self.dandelion_to_properties_map(), + BlockKind::Poppy => self.poppy_to_properties_map(), + BlockKind::BlueOrchid => self.blue_orchid_to_properties_map(), + BlockKind::Allium => self.allium_to_properties_map(), + BlockKind::AzureBluet => self.azure_bluet_to_properties_map(), + BlockKind::RedTulip => self.red_tulip_to_properties_map(), + BlockKind::OrangeTulip => self.orange_tulip_to_properties_map(), + BlockKind::WhiteTulip => self.white_tulip_to_properties_map(), + BlockKind::PinkTulip => self.pink_tulip_to_properties_map(), + BlockKind::OxeyeDaisy => self.oxeye_daisy_to_properties_map(), + BlockKind::Cornflower => self.cornflower_to_properties_map(), + BlockKind::WitherRose => self.wither_rose_to_properties_map(), + BlockKind::LilyOfTheValley => self.lily_of_the_valley_to_properties_map(), + BlockKind::BrownMushroom => self.brown_mushroom_to_properties_map(), + BlockKind::RedMushroom => self.red_mushroom_to_properties_map(), + BlockKind::GoldBlock => self.gold_block_to_properties_map(), + BlockKind::IronBlock => self.iron_block_to_properties_map(), + BlockKind::Bricks => self.bricks_to_properties_map(), + BlockKind::Tnt => self.tnt_to_properties_map(), + BlockKind::Bookshelf => self.bookshelf_to_properties_map(), + BlockKind::MossyCobblestone => self.mossy_cobblestone_to_properties_map(), + BlockKind::Obsidian => self.obsidian_to_properties_map(), + BlockKind::Torch => self.torch_to_properties_map(), + BlockKind::WallTorch => self.wall_torch_to_properties_map(), + BlockKind::Fire => self.fire_to_properties_map(), + BlockKind::SoulFire => self.soul_fire_to_properties_map(), + BlockKind::Spawner => self.spawner_to_properties_map(), + BlockKind::OakStairs => self.oak_stairs_to_properties_map(), + BlockKind::Chest => self.chest_to_properties_map(), + BlockKind::RedstoneWire => self.redstone_wire_to_properties_map(), + BlockKind::DiamondOre => self.diamond_ore_to_properties_map(), + BlockKind::DiamondBlock => self.diamond_block_to_properties_map(), + BlockKind::CraftingTable => self.crafting_table_to_properties_map(), + BlockKind::Wheat => self.wheat_to_properties_map(), + BlockKind::Farmland => self.farmland_to_properties_map(), + BlockKind::Furnace => self.furnace_to_properties_map(), + BlockKind::OakSign => self.oak_sign_to_properties_map(), + BlockKind::SpruceSign => self.spruce_sign_to_properties_map(), + BlockKind::BirchSign => self.birch_sign_to_properties_map(), + BlockKind::AcaciaSign => self.acacia_sign_to_properties_map(), + BlockKind::JungleSign => self.jungle_sign_to_properties_map(), + BlockKind::DarkOakSign => self.dark_oak_sign_to_properties_map(), + BlockKind::OakDoor => self.oak_door_to_properties_map(), + BlockKind::Ladder => self.ladder_to_properties_map(), + BlockKind::Rail => self.rail_to_properties_map(), + BlockKind::CobblestoneStairs => self.cobblestone_stairs_to_properties_map(), + BlockKind::OakWallSign => self.oak_wall_sign_to_properties_map(), + BlockKind::SpruceWallSign => self.spruce_wall_sign_to_properties_map(), + BlockKind::BirchWallSign => self.birch_wall_sign_to_properties_map(), + BlockKind::AcaciaWallSign => self.acacia_wall_sign_to_properties_map(), + BlockKind::JungleWallSign => self.jungle_wall_sign_to_properties_map(), + BlockKind::DarkOakWallSign => self.dark_oak_wall_sign_to_properties_map(), + BlockKind::Lever => self.lever_to_properties_map(), + BlockKind::StonePressurePlate => self.stone_pressure_plate_to_properties_map(), + BlockKind::IronDoor => self.iron_door_to_properties_map(), + BlockKind::OakPressurePlate => self.oak_pressure_plate_to_properties_map(), + BlockKind::SprucePressurePlate => self.spruce_pressure_plate_to_properties_map(), + BlockKind::BirchPressurePlate => self.birch_pressure_plate_to_properties_map(), + BlockKind::JunglePressurePlate => self.jungle_pressure_plate_to_properties_map(), + BlockKind::AcaciaPressurePlate => self.acacia_pressure_plate_to_properties_map(), + BlockKind::DarkOakPressurePlate => self.dark_oak_pressure_plate_to_properties_map(), + BlockKind::RedstoneOre => self.redstone_ore_to_properties_map(), + BlockKind::RedstoneTorch => self.redstone_torch_to_properties_map(), + BlockKind::RedstoneWallTorch => self.redstone_wall_torch_to_properties_map(), + BlockKind::StoneButton => self.stone_button_to_properties_map(), + BlockKind::Snow => self.snow_to_properties_map(), + BlockKind::Ice => self.ice_to_properties_map(), + BlockKind::SnowBlock => self.snow_block_to_properties_map(), + BlockKind::Cactus => self.cactus_to_properties_map(), + BlockKind::Clay => self.clay_to_properties_map(), + BlockKind::SugarCane => self.sugar_cane_to_properties_map(), + BlockKind::Jukebox => self.jukebox_to_properties_map(), + BlockKind::OakFence => self.oak_fence_to_properties_map(), + BlockKind::Pumpkin => self.pumpkin_to_properties_map(), + BlockKind::Netherrack => self.netherrack_to_properties_map(), + BlockKind::SoulSand => self.soul_sand_to_properties_map(), + BlockKind::SoulSoil => self.soul_soil_to_properties_map(), + BlockKind::Basalt => self.basalt_to_properties_map(), + BlockKind::PolishedBasalt => self.polished_basalt_to_properties_map(), + BlockKind::SoulTorch => self.soul_torch_to_properties_map(), + BlockKind::SoulWallTorch => self.soul_wall_torch_to_properties_map(), + BlockKind::Glowstone => self.glowstone_to_properties_map(), + BlockKind::NetherPortal => self.nether_portal_to_properties_map(), + BlockKind::CarvedPumpkin => self.carved_pumpkin_to_properties_map(), + BlockKind::JackOLantern => self.jack_o_lantern_to_properties_map(), + BlockKind::Cake => self.cake_to_properties_map(), + BlockKind::Repeater => self.repeater_to_properties_map(), + BlockKind::WhiteStainedGlass => self.white_stained_glass_to_properties_map(), + BlockKind::OrangeStainedGlass => self.orange_stained_glass_to_properties_map(), + BlockKind::MagentaStainedGlass => self.magenta_stained_glass_to_properties_map(), + BlockKind::LightBlueStainedGlass => self.light_blue_stained_glass_to_properties_map(), + BlockKind::YellowStainedGlass => self.yellow_stained_glass_to_properties_map(), + BlockKind::LimeStainedGlass => self.lime_stained_glass_to_properties_map(), + BlockKind::PinkStainedGlass => self.pink_stained_glass_to_properties_map(), + BlockKind::GrayStainedGlass => self.gray_stained_glass_to_properties_map(), + BlockKind::LightGrayStainedGlass => self.light_gray_stained_glass_to_properties_map(), + BlockKind::CyanStainedGlass => self.cyan_stained_glass_to_properties_map(), + BlockKind::PurpleStainedGlass => self.purple_stained_glass_to_properties_map(), + BlockKind::BlueStainedGlass => self.blue_stained_glass_to_properties_map(), + BlockKind::BrownStainedGlass => self.brown_stained_glass_to_properties_map(), + BlockKind::GreenStainedGlass => self.green_stained_glass_to_properties_map(), + BlockKind::RedStainedGlass => self.red_stained_glass_to_properties_map(), + BlockKind::BlackStainedGlass => self.black_stained_glass_to_properties_map(), + BlockKind::OakTrapdoor => self.oak_trapdoor_to_properties_map(), + BlockKind::SpruceTrapdoor => self.spruce_trapdoor_to_properties_map(), + BlockKind::BirchTrapdoor => self.birch_trapdoor_to_properties_map(), + BlockKind::JungleTrapdoor => self.jungle_trapdoor_to_properties_map(), + BlockKind::AcaciaTrapdoor => self.acacia_trapdoor_to_properties_map(), + BlockKind::DarkOakTrapdoor => self.dark_oak_trapdoor_to_properties_map(), + BlockKind::StoneBricks => self.stone_bricks_to_properties_map(), + BlockKind::MossyStoneBricks => self.mossy_stone_bricks_to_properties_map(), + BlockKind::CrackedStoneBricks => self.cracked_stone_bricks_to_properties_map(), + BlockKind::ChiseledStoneBricks => self.chiseled_stone_bricks_to_properties_map(), + BlockKind::InfestedStone => self.infested_stone_to_properties_map(), + BlockKind::InfestedCobblestone => self.infested_cobblestone_to_properties_map(), + BlockKind::InfestedStoneBricks => self.infested_stone_bricks_to_properties_map(), + BlockKind::InfestedMossyStoneBricks => { + self.infested_mossy_stone_bricks_to_properties_map() + } + BlockKind::InfestedCrackedStoneBricks => { + self.infested_cracked_stone_bricks_to_properties_map() + } + BlockKind::InfestedChiseledStoneBricks => { + self.infested_chiseled_stone_bricks_to_properties_map() + } + BlockKind::BrownMushroomBlock => self.brown_mushroom_block_to_properties_map(), + BlockKind::RedMushroomBlock => self.red_mushroom_block_to_properties_map(), + BlockKind::MushroomStem => self.mushroom_stem_to_properties_map(), + BlockKind::IronBars => self.iron_bars_to_properties_map(), + BlockKind::Chain => self.chain_to_properties_map(), + BlockKind::GlassPane => self.glass_pane_to_properties_map(), + BlockKind::Melon => self.melon_to_properties_map(), + BlockKind::AttachedPumpkinStem => self.attached_pumpkin_stem_to_properties_map(), + BlockKind::AttachedMelonStem => self.attached_melon_stem_to_properties_map(), + BlockKind::PumpkinStem => self.pumpkin_stem_to_properties_map(), + BlockKind::MelonStem => self.melon_stem_to_properties_map(), + BlockKind::Vine => self.vine_to_properties_map(), + BlockKind::OakFenceGate => self.oak_fence_gate_to_properties_map(), + BlockKind::BrickStairs => self.brick_stairs_to_properties_map(), + BlockKind::StoneBrickStairs => self.stone_brick_stairs_to_properties_map(), + BlockKind::Mycelium => self.mycelium_to_properties_map(), + BlockKind::LilyPad => self.lily_pad_to_properties_map(), + BlockKind::NetherBricks => self.nether_bricks_to_properties_map(), + BlockKind::NetherBrickFence => self.nether_brick_fence_to_properties_map(), + BlockKind::NetherBrickStairs => self.nether_brick_stairs_to_properties_map(), + BlockKind::NetherWart => self.nether_wart_to_properties_map(), + BlockKind::EnchantingTable => self.enchanting_table_to_properties_map(), + BlockKind::BrewingStand => self.brewing_stand_to_properties_map(), + BlockKind::Cauldron => self.cauldron_to_properties_map(), + BlockKind::EndPortal => self.end_portal_to_properties_map(), + BlockKind::EndPortalFrame => self.end_portal_frame_to_properties_map(), + BlockKind::EndStone => self.end_stone_to_properties_map(), + BlockKind::DragonEgg => self.dragon_egg_to_properties_map(), + BlockKind::RedstoneLamp => self.redstone_lamp_to_properties_map(), + BlockKind::Cocoa => self.cocoa_to_properties_map(), + BlockKind::SandstoneStairs => self.sandstone_stairs_to_properties_map(), + BlockKind::EmeraldOre => self.emerald_ore_to_properties_map(), + BlockKind::EnderChest => self.ender_chest_to_properties_map(), + BlockKind::TripwireHook => self.tripwire_hook_to_properties_map(), + BlockKind::Tripwire => self.tripwire_to_properties_map(), + BlockKind::EmeraldBlock => self.emerald_block_to_properties_map(), + BlockKind::SpruceStairs => self.spruce_stairs_to_properties_map(), + BlockKind::BirchStairs => self.birch_stairs_to_properties_map(), + BlockKind::JungleStairs => self.jungle_stairs_to_properties_map(), + BlockKind::CommandBlock => self.command_block_to_properties_map(), + BlockKind::Beacon => self.beacon_to_properties_map(), + BlockKind::CobblestoneWall => self.cobblestone_wall_to_properties_map(), + BlockKind::MossyCobblestoneWall => self.mossy_cobblestone_wall_to_properties_map(), + BlockKind::FlowerPot => self.flower_pot_to_properties_map(), + BlockKind::PottedOakSapling => self.potted_oak_sapling_to_properties_map(), + BlockKind::PottedSpruceSapling => self.potted_spruce_sapling_to_properties_map(), + BlockKind::PottedBirchSapling => self.potted_birch_sapling_to_properties_map(), + BlockKind::PottedJungleSapling => self.potted_jungle_sapling_to_properties_map(), + BlockKind::PottedAcaciaSapling => self.potted_acacia_sapling_to_properties_map(), + BlockKind::PottedDarkOakSapling => self.potted_dark_oak_sapling_to_properties_map(), + BlockKind::PottedFern => self.potted_fern_to_properties_map(), + BlockKind::PottedDandelion => self.potted_dandelion_to_properties_map(), + BlockKind::PottedPoppy => self.potted_poppy_to_properties_map(), + BlockKind::PottedBlueOrchid => self.potted_blue_orchid_to_properties_map(), + BlockKind::PottedAllium => self.potted_allium_to_properties_map(), + BlockKind::PottedAzureBluet => self.potted_azure_bluet_to_properties_map(), + BlockKind::PottedRedTulip => self.potted_red_tulip_to_properties_map(), + BlockKind::PottedOrangeTulip => self.potted_orange_tulip_to_properties_map(), + BlockKind::PottedWhiteTulip => self.potted_white_tulip_to_properties_map(), + BlockKind::PottedPinkTulip => self.potted_pink_tulip_to_properties_map(), + BlockKind::PottedOxeyeDaisy => self.potted_oxeye_daisy_to_properties_map(), + BlockKind::PottedCornflower => self.potted_cornflower_to_properties_map(), + BlockKind::PottedLilyOfTheValley => self.potted_lily_of_the_valley_to_properties_map(), + BlockKind::PottedWitherRose => self.potted_wither_rose_to_properties_map(), + BlockKind::PottedRedMushroom => self.potted_red_mushroom_to_properties_map(), + BlockKind::PottedBrownMushroom => self.potted_brown_mushroom_to_properties_map(), + BlockKind::PottedDeadBush => self.potted_dead_bush_to_properties_map(), + BlockKind::PottedCactus => self.potted_cactus_to_properties_map(), + BlockKind::Carrots => self.carrots_to_properties_map(), + BlockKind::Potatoes => self.potatoes_to_properties_map(), + BlockKind::OakButton => self.oak_button_to_properties_map(), + BlockKind::SpruceButton => self.spruce_button_to_properties_map(), + BlockKind::BirchButton => self.birch_button_to_properties_map(), + BlockKind::JungleButton => self.jungle_button_to_properties_map(), + BlockKind::AcaciaButton => self.acacia_button_to_properties_map(), + BlockKind::DarkOakButton => self.dark_oak_button_to_properties_map(), + BlockKind::SkeletonSkull => self.skeleton_skull_to_properties_map(), + BlockKind::SkeletonWallSkull => self.skeleton_wall_skull_to_properties_map(), + BlockKind::WitherSkeletonSkull => self.wither_skeleton_skull_to_properties_map(), + BlockKind::WitherSkeletonWallSkull => { + self.wither_skeleton_wall_skull_to_properties_map() + } + BlockKind::ZombieHead => self.zombie_head_to_properties_map(), + BlockKind::ZombieWallHead => self.zombie_wall_head_to_properties_map(), + BlockKind::PlayerHead => self.player_head_to_properties_map(), + BlockKind::PlayerWallHead => self.player_wall_head_to_properties_map(), + BlockKind::CreeperHead => self.creeper_head_to_properties_map(), + BlockKind::CreeperWallHead => self.creeper_wall_head_to_properties_map(), + BlockKind::DragonHead => self.dragon_head_to_properties_map(), + BlockKind::DragonWallHead => self.dragon_wall_head_to_properties_map(), + BlockKind::Anvil => self.anvil_to_properties_map(), + BlockKind::ChippedAnvil => self.chipped_anvil_to_properties_map(), + BlockKind::DamagedAnvil => self.damaged_anvil_to_properties_map(), + BlockKind::TrappedChest => self.trapped_chest_to_properties_map(), + BlockKind::LightWeightedPressurePlate => { + self.light_weighted_pressure_plate_to_properties_map() + } + BlockKind::HeavyWeightedPressurePlate => { + self.heavy_weighted_pressure_plate_to_properties_map() + } + BlockKind::Comparator => self.comparator_to_properties_map(), + BlockKind::DaylightDetector => self.daylight_detector_to_properties_map(), + BlockKind::RedstoneBlock => self.redstone_block_to_properties_map(), + BlockKind::NetherQuartzOre => self.nether_quartz_ore_to_properties_map(), + BlockKind::Hopper => self.hopper_to_properties_map(), + BlockKind::QuartzBlock => self.quartz_block_to_properties_map(), + BlockKind::ChiseledQuartzBlock => self.chiseled_quartz_block_to_properties_map(), + BlockKind::QuartzPillar => self.quartz_pillar_to_properties_map(), + BlockKind::QuartzStairs => self.quartz_stairs_to_properties_map(), + BlockKind::ActivatorRail => self.activator_rail_to_properties_map(), + BlockKind::Dropper => self.dropper_to_properties_map(), + BlockKind::WhiteTerracotta => self.white_terracotta_to_properties_map(), + BlockKind::OrangeTerracotta => self.orange_terracotta_to_properties_map(), + BlockKind::MagentaTerracotta => self.magenta_terracotta_to_properties_map(), + BlockKind::LightBlueTerracotta => self.light_blue_terracotta_to_properties_map(), + BlockKind::YellowTerracotta => self.yellow_terracotta_to_properties_map(), + BlockKind::LimeTerracotta => self.lime_terracotta_to_properties_map(), + BlockKind::PinkTerracotta => self.pink_terracotta_to_properties_map(), + BlockKind::GrayTerracotta => self.gray_terracotta_to_properties_map(), + BlockKind::LightGrayTerracotta => self.light_gray_terracotta_to_properties_map(), + BlockKind::CyanTerracotta => self.cyan_terracotta_to_properties_map(), + BlockKind::PurpleTerracotta => self.purple_terracotta_to_properties_map(), + BlockKind::BlueTerracotta => self.blue_terracotta_to_properties_map(), + BlockKind::BrownTerracotta => self.brown_terracotta_to_properties_map(), + BlockKind::GreenTerracotta => self.green_terracotta_to_properties_map(), + BlockKind::RedTerracotta => self.red_terracotta_to_properties_map(), + BlockKind::BlackTerracotta => self.black_terracotta_to_properties_map(), + BlockKind::WhiteStainedGlassPane => self.white_stained_glass_pane_to_properties_map(), + BlockKind::OrangeStainedGlassPane => self.orange_stained_glass_pane_to_properties_map(), + BlockKind::MagentaStainedGlassPane => { + self.magenta_stained_glass_pane_to_properties_map() + } + BlockKind::LightBlueStainedGlassPane => { + self.light_blue_stained_glass_pane_to_properties_map() + } + BlockKind::YellowStainedGlassPane => self.yellow_stained_glass_pane_to_properties_map(), + BlockKind::LimeStainedGlassPane => self.lime_stained_glass_pane_to_properties_map(), + BlockKind::PinkStainedGlassPane => self.pink_stained_glass_pane_to_properties_map(), + BlockKind::GrayStainedGlassPane => self.gray_stained_glass_pane_to_properties_map(), + BlockKind::LightGrayStainedGlassPane => { + self.light_gray_stained_glass_pane_to_properties_map() + } + BlockKind::CyanStainedGlassPane => self.cyan_stained_glass_pane_to_properties_map(), + BlockKind::PurpleStainedGlassPane => self.purple_stained_glass_pane_to_properties_map(), + BlockKind::BlueStainedGlassPane => self.blue_stained_glass_pane_to_properties_map(), + BlockKind::BrownStainedGlassPane => self.brown_stained_glass_pane_to_properties_map(), + BlockKind::GreenStainedGlassPane => self.green_stained_glass_pane_to_properties_map(), + BlockKind::RedStainedGlassPane => self.red_stained_glass_pane_to_properties_map(), + BlockKind::BlackStainedGlassPane => self.black_stained_glass_pane_to_properties_map(), + BlockKind::AcaciaStairs => self.acacia_stairs_to_properties_map(), + BlockKind::DarkOakStairs => self.dark_oak_stairs_to_properties_map(), + BlockKind::SlimeBlock => self.slime_block_to_properties_map(), + BlockKind::Barrier => self.barrier_to_properties_map(), + BlockKind::IronTrapdoor => self.iron_trapdoor_to_properties_map(), + BlockKind::Prismarine => self.prismarine_to_properties_map(), + BlockKind::PrismarineBricks => self.prismarine_bricks_to_properties_map(), + BlockKind::DarkPrismarine => self.dark_prismarine_to_properties_map(), + BlockKind::PrismarineStairs => self.prismarine_stairs_to_properties_map(), + BlockKind::PrismarineBrickStairs => self.prismarine_brick_stairs_to_properties_map(), + BlockKind::DarkPrismarineStairs => self.dark_prismarine_stairs_to_properties_map(), + BlockKind::PrismarineSlab => self.prismarine_slab_to_properties_map(), + BlockKind::PrismarineBrickSlab => self.prismarine_brick_slab_to_properties_map(), + BlockKind::DarkPrismarineSlab => self.dark_prismarine_slab_to_properties_map(), + BlockKind::SeaLantern => self.sea_lantern_to_properties_map(), + BlockKind::HayBlock => self.hay_block_to_properties_map(), + BlockKind::WhiteCarpet => self.white_carpet_to_properties_map(), + BlockKind::OrangeCarpet => self.orange_carpet_to_properties_map(), + BlockKind::MagentaCarpet => self.magenta_carpet_to_properties_map(), + BlockKind::LightBlueCarpet => self.light_blue_carpet_to_properties_map(), + BlockKind::YellowCarpet => self.yellow_carpet_to_properties_map(), + BlockKind::LimeCarpet => self.lime_carpet_to_properties_map(), + BlockKind::PinkCarpet => self.pink_carpet_to_properties_map(), + BlockKind::GrayCarpet => self.gray_carpet_to_properties_map(), + BlockKind::LightGrayCarpet => self.light_gray_carpet_to_properties_map(), + BlockKind::CyanCarpet => self.cyan_carpet_to_properties_map(), + BlockKind::PurpleCarpet => self.purple_carpet_to_properties_map(), + BlockKind::BlueCarpet => self.blue_carpet_to_properties_map(), + BlockKind::BrownCarpet => self.brown_carpet_to_properties_map(), + BlockKind::GreenCarpet => self.green_carpet_to_properties_map(), + BlockKind::RedCarpet => self.red_carpet_to_properties_map(), + BlockKind::BlackCarpet => self.black_carpet_to_properties_map(), + BlockKind::Terracotta => self.terracotta_to_properties_map(), + BlockKind::CoalBlock => self.coal_block_to_properties_map(), + BlockKind::PackedIce => self.packed_ice_to_properties_map(), + BlockKind::Sunflower => self.sunflower_to_properties_map(), + BlockKind::Lilac => self.lilac_to_properties_map(), + BlockKind::RoseBush => self.rose_bush_to_properties_map(), + BlockKind::Peony => self.peony_to_properties_map(), + BlockKind::TallGrass => self.tall_grass_to_properties_map(), + BlockKind::LargeFern => self.large_fern_to_properties_map(), + BlockKind::WhiteBanner => self.white_banner_to_properties_map(), + BlockKind::OrangeBanner => self.orange_banner_to_properties_map(), + BlockKind::MagentaBanner => self.magenta_banner_to_properties_map(), + BlockKind::LightBlueBanner => self.light_blue_banner_to_properties_map(), + BlockKind::YellowBanner => self.yellow_banner_to_properties_map(), + BlockKind::LimeBanner => self.lime_banner_to_properties_map(), + BlockKind::PinkBanner => self.pink_banner_to_properties_map(), + BlockKind::GrayBanner => self.gray_banner_to_properties_map(), + BlockKind::LightGrayBanner => self.light_gray_banner_to_properties_map(), + BlockKind::CyanBanner => self.cyan_banner_to_properties_map(), + BlockKind::PurpleBanner => self.purple_banner_to_properties_map(), + BlockKind::BlueBanner => self.blue_banner_to_properties_map(), + BlockKind::BrownBanner => self.brown_banner_to_properties_map(), + BlockKind::GreenBanner => self.green_banner_to_properties_map(), + BlockKind::RedBanner => self.red_banner_to_properties_map(), + BlockKind::BlackBanner => self.black_banner_to_properties_map(), + BlockKind::WhiteWallBanner => self.white_wall_banner_to_properties_map(), + BlockKind::OrangeWallBanner => self.orange_wall_banner_to_properties_map(), + BlockKind::MagentaWallBanner => self.magenta_wall_banner_to_properties_map(), + BlockKind::LightBlueWallBanner => self.light_blue_wall_banner_to_properties_map(), + BlockKind::YellowWallBanner => self.yellow_wall_banner_to_properties_map(), + BlockKind::LimeWallBanner => self.lime_wall_banner_to_properties_map(), + BlockKind::PinkWallBanner => self.pink_wall_banner_to_properties_map(), + BlockKind::GrayWallBanner => self.gray_wall_banner_to_properties_map(), + BlockKind::LightGrayWallBanner => self.light_gray_wall_banner_to_properties_map(), + BlockKind::CyanWallBanner => self.cyan_wall_banner_to_properties_map(), + BlockKind::PurpleWallBanner => self.purple_wall_banner_to_properties_map(), + BlockKind::BlueWallBanner => self.blue_wall_banner_to_properties_map(), + BlockKind::BrownWallBanner => self.brown_wall_banner_to_properties_map(), + BlockKind::GreenWallBanner => self.green_wall_banner_to_properties_map(), + BlockKind::RedWallBanner => self.red_wall_banner_to_properties_map(), + BlockKind::BlackWallBanner => self.black_wall_banner_to_properties_map(), + BlockKind::RedSandstone => self.red_sandstone_to_properties_map(), + BlockKind::ChiseledRedSandstone => self.chiseled_red_sandstone_to_properties_map(), + BlockKind::CutRedSandstone => self.cut_red_sandstone_to_properties_map(), + BlockKind::RedSandstoneStairs => self.red_sandstone_stairs_to_properties_map(), + BlockKind::OakSlab => self.oak_slab_to_properties_map(), + BlockKind::SpruceSlab => self.spruce_slab_to_properties_map(), + BlockKind::BirchSlab => self.birch_slab_to_properties_map(), + BlockKind::JungleSlab => self.jungle_slab_to_properties_map(), + BlockKind::AcaciaSlab => self.acacia_slab_to_properties_map(), + BlockKind::DarkOakSlab => self.dark_oak_slab_to_properties_map(), + BlockKind::StoneSlab => self.stone_slab_to_properties_map(), + BlockKind::SmoothStoneSlab => self.smooth_stone_slab_to_properties_map(), + BlockKind::SandstoneSlab => self.sandstone_slab_to_properties_map(), + BlockKind::CutSandstoneSlab => self.cut_sandstone_slab_to_properties_map(), + BlockKind::PetrifiedOakSlab => self.petrified_oak_slab_to_properties_map(), + BlockKind::CobblestoneSlab => self.cobblestone_slab_to_properties_map(), + BlockKind::BrickSlab => self.brick_slab_to_properties_map(), + BlockKind::StoneBrickSlab => self.stone_brick_slab_to_properties_map(), + BlockKind::NetherBrickSlab => self.nether_brick_slab_to_properties_map(), + BlockKind::QuartzSlab => self.quartz_slab_to_properties_map(), + BlockKind::RedSandstoneSlab => self.red_sandstone_slab_to_properties_map(), + BlockKind::CutRedSandstoneSlab => self.cut_red_sandstone_slab_to_properties_map(), + BlockKind::PurpurSlab => self.purpur_slab_to_properties_map(), + BlockKind::SmoothStone => self.smooth_stone_to_properties_map(), + BlockKind::SmoothSandstone => self.smooth_sandstone_to_properties_map(), + BlockKind::SmoothQuartz => self.smooth_quartz_to_properties_map(), + BlockKind::SmoothRedSandstone => self.smooth_red_sandstone_to_properties_map(), + BlockKind::SpruceFenceGate => self.spruce_fence_gate_to_properties_map(), + BlockKind::BirchFenceGate => self.birch_fence_gate_to_properties_map(), + BlockKind::JungleFenceGate => self.jungle_fence_gate_to_properties_map(), + BlockKind::AcaciaFenceGate => self.acacia_fence_gate_to_properties_map(), + BlockKind::DarkOakFenceGate => self.dark_oak_fence_gate_to_properties_map(), + BlockKind::SpruceFence => self.spruce_fence_to_properties_map(), + BlockKind::BirchFence => self.birch_fence_to_properties_map(), + BlockKind::JungleFence => self.jungle_fence_to_properties_map(), + BlockKind::AcaciaFence => self.acacia_fence_to_properties_map(), + BlockKind::DarkOakFence => self.dark_oak_fence_to_properties_map(), + BlockKind::SpruceDoor => self.spruce_door_to_properties_map(), + BlockKind::BirchDoor => self.birch_door_to_properties_map(), + BlockKind::JungleDoor => self.jungle_door_to_properties_map(), + BlockKind::AcaciaDoor => self.acacia_door_to_properties_map(), + BlockKind::DarkOakDoor => self.dark_oak_door_to_properties_map(), + BlockKind::EndRod => self.end_rod_to_properties_map(), + BlockKind::ChorusPlant => self.chorus_plant_to_properties_map(), + BlockKind::ChorusFlower => self.chorus_flower_to_properties_map(), + BlockKind::PurpurBlock => self.purpur_block_to_properties_map(), + BlockKind::PurpurPillar => self.purpur_pillar_to_properties_map(), + BlockKind::PurpurStairs => self.purpur_stairs_to_properties_map(), + BlockKind::EndStoneBricks => self.end_stone_bricks_to_properties_map(), + BlockKind::Beetroots => self.beetroots_to_properties_map(), + BlockKind::GrassPath => self.grass_path_to_properties_map(), + BlockKind::EndGateway => self.end_gateway_to_properties_map(), + BlockKind::RepeatingCommandBlock => self.repeating_command_block_to_properties_map(), + BlockKind::ChainCommandBlock => self.chain_command_block_to_properties_map(), + BlockKind::FrostedIce => self.frosted_ice_to_properties_map(), + BlockKind::MagmaBlock => self.magma_block_to_properties_map(), + BlockKind::NetherWartBlock => self.nether_wart_block_to_properties_map(), + BlockKind::RedNetherBricks => self.red_nether_bricks_to_properties_map(), + BlockKind::BoneBlock => self.bone_block_to_properties_map(), + BlockKind::StructureVoid => self.structure_void_to_properties_map(), + BlockKind::Observer => self.observer_to_properties_map(), + BlockKind::ShulkerBox => self.shulker_box_to_properties_map(), + BlockKind::WhiteShulkerBox => self.white_shulker_box_to_properties_map(), + BlockKind::OrangeShulkerBox => self.orange_shulker_box_to_properties_map(), + BlockKind::MagentaShulkerBox => self.magenta_shulker_box_to_properties_map(), + BlockKind::LightBlueShulkerBox => self.light_blue_shulker_box_to_properties_map(), + BlockKind::YellowShulkerBox => self.yellow_shulker_box_to_properties_map(), + BlockKind::LimeShulkerBox => self.lime_shulker_box_to_properties_map(), + BlockKind::PinkShulkerBox => self.pink_shulker_box_to_properties_map(), + BlockKind::GrayShulkerBox => self.gray_shulker_box_to_properties_map(), + BlockKind::LightGrayShulkerBox => self.light_gray_shulker_box_to_properties_map(), + BlockKind::CyanShulkerBox => self.cyan_shulker_box_to_properties_map(), + BlockKind::PurpleShulkerBox => self.purple_shulker_box_to_properties_map(), + BlockKind::BlueShulkerBox => self.blue_shulker_box_to_properties_map(), + BlockKind::BrownShulkerBox => self.brown_shulker_box_to_properties_map(), + BlockKind::GreenShulkerBox => self.green_shulker_box_to_properties_map(), + BlockKind::RedShulkerBox => self.red_shulker_box_to_properties_map(), + BlockKind::BlackShulkerBox => self.black_shulker_box_to_properties_map(), + BlockKind::WhiteGlazedTerracotta => self.white_glazed_terracotta_to_properties_map(), + BlockKind::OrangeGlazedTerracotta => self.orange_glazed_terracotta_to_properties_map(), + BlockKind::MagentaGlazedTerracotta => { + self.magenta_glazed_terracotta_to_properties_map() + } + BlockKind::LightBlueGlazedTerracotta => { + self.light_blue_glazed_terracotta_to_properties_map() + } + BlockKind::YellowGlazedTerracotta => self.yellow_glazed_terracotta_to_properties_map(), + BlockKind::LimeGlazedTerracotta => self.lime_glazed_terracotta_to_properties_map(), + BlockKind::PinkGlazedTerracotta => self.pink_glazed_terracotta_to_properties_map(), + BlockKind::GrayGlazedTerracotta => self.gray_glazed_terracotta_to_properties_map(), + BlockKind::LightGrayGlazedTerracotta => { + self.light_gray_glazed_terracotta_to_properties_map() + } + BlockKind::CyanGlazedTerracotta => self.cyan_glazed_terracotta_to_properties_map(), + BlockKind::PurpleGlazedTerracotta => self.purple_glazed_terracotta_to_properties_map(), + BlockKind::BlueGlazedTerracotta => self.blue_glazed_terracotta_to_properties_map(), + BlockKind::BrownGlazedTerracotta => self.brown_glazed_terracotta_to_properties_map(), + BlockKind::GreenGlazedTerracotta => self.green_glazed_terracotta_to_properties_map(), + BlockKind::RedGlazedTerracotta => self.red_glazed_terracotta_to_properties_map(), + BlockKind::BlackGlazedTerracotta => self.black_glazed_terracotta_to_properties_map(), + BlockKind::WhiteConcrete => self.white_concrete_to_properties_map(), + BlockKind::OrangeConcrete => self.orange_concrete_to_properties_map(), + BlockKind::MagentaConcrete => self.magenta_concrete_to_properties_map(), + BlockKind::LightBlueConcrete => self.light_blue_concrete_to_properties_map(), + BlockKind::YellowConcrete => self.yellow_concrete_to_properties_map(), + BlockKind::LimeConcrete => self.lime_concrete_to_properties_map(), + BlockKind::PinkConcrete => self.pink_concrete_to_properties_map(), + BlockKind::GrayConcrete => self.gray_concrete_to_properties_map(), + BlockKind::LightGrayConcrete => self.light_gray_concrete_to_properties_map(), + BlockKind::CyanConcrete => self.cyan_concrete_to_properties_map(), + BlockKind::PurpleConcrete => self.purple_concrete_to_properties_map(), + BlockKind::BlueConcrete => self.blue_concrete_to_properties_map(), + BlockKind::BrownConcrete => self.brown_concrete_to_properties_map(), + BlockKind::GreenConcrete => self.green_concrete_to_properties_map(), + BlockKind::RedConcrete => self.red_concrete_to_properties_map(), + BlockKind::BlackConcrete => self.black_concrete_to_properties_map(), + BlockKind::WhiteConcretePowder => self.white_concrete_powder_to_properties_map(), + BlockKind::OrangeConcretePowder => self.orange_concrete_powder_to_properties_map(), + BlockKind::MagentaConcretePowder => self.magenta_concrete_powder_to_properties_map(), + BlockKind::LightBlueConcretePowder => { + self.light_blue_concrete_powder_to_properties_map() + } + BlockKind::YellowConcretePowder => self.yellow_concrete_powder_to_properties_map(), + BlockKind::LimeConcretePowder => self.lime_concrete_powder_to_properties_map(), + BlockKind::PinkConcretePowder => self.pink_concrete_powder_to_properties_map(), + BlockKind::GrayConcretePowder => self.gray_concrete_powder_to_properties_map(), + BlockKind::LightGrayConcretePowder => { + self.light_gray_concrete_powder_to_properties_map() + } + BlockKind::CyanConcretePowder => self.cyan_concrete_powder_to_properties_map(), + BlockKind::PurpleConcretePowder => self.purple_concrete_powder_to_properties_map(), + BlockKind::BlueConcretePowder => self.blue_concrete_powder_to_properties_map(), + BlockKind::BrownConcretePowder => self.brown_concrete_powder_to_properties_map(), + BlockKind::GreenConcretePowder => self.green_concrete_powder_to_properties_map(), + BlockKind::RedConcretePowder => self.red_concrete_powder_to_properties_map(), + BlockKind::BlackConcretePowder => self.black_concrete_powder_to_properties_map(), + BlockKind::Kelp => self.kelp_to_properties_map(), + BlockKind::KelpPlant => self.kelp_plant_to_properties_map(), + BlockKind::DriedKelpBlock => self.dried_kelp_block_to_properties_map(), + BlockKind::TurtleEgg => self.turtle_egg_to_properties_map(), + BlockKind::DeadTubeCoralBlock => self.dead_tube_coral_block_to_properties_map(), + BlockKind::DeadBrainCoralBlock => self.dead_brain_coral_block_to_properties_map(), + BlockKind::DeadBubbleCoralBlock => self.dead_bubble_coral_block_to_properties_map(), + BlockKind::DeadFireCoralBlock => self.dead_fire_coral_block_to_properties_map(), + BlockKind::DeadHornCoralBlock => self.dead_horn_coral_block_to_properties_map(), + BlockKind::TubeCoralBlock => self.tube_coral_block_to_properties_map(), + BlockKind::BrainCoralBlock => self.brain_coral_block_to_properties_map(), + BlockKind::BubbleCoralBlock => self.bubble_coral_block_to_properties_map(), + BlockKind::FireCoralBlock => self.fire_coral_block_to_properties_map(), + BlockKind::HornCoralBlock => self.horn_coral_block_to_properties_map(), + BlockKind::DeadTubeCoral => self.dead_tube_coral_to_properties_map(), + BlockKind::DeadBrainCoral => self.dead_brain_coral_to_properties_map(), + BlockKind::DeadBubbleCoral => self.dead_bubble_coral_to_properties_map(), + BlockKind::DeadFireCoral => self.dead_fire_coral_to_properties_map(), + BlockKind::DeadHornCoral => self.dead_horn_coral_to_properties_map(), + BlockKind::TubeCoral => self.tube_coral_to_properties_map(), + BlockKind::BrainCoral => self.brain_coral_to_properties_map(), + BlockKind::BubbleCoral => self.bubble_coral_to_properties_map(), + BlockKind::FireCoral => self.fire_coral_to_properties_map(), + BlockKind::HornCoral => self.horn_coral_to_properties_map(), + BlockKind::DeadTubeCoralFan => self.dead_tube_coral_fan_to_properties_map(), + BlockKind::DeadBrainCoralFan => self.dead_brain_coral_fan_to_properties_map(), + BlockKind::DeadBubbleCoralFan => self.dead_bubble_coral_fan_to_properties_map(), + BlockKind::DeadFireCoralFan => self.dead_fire_coral_fan_to_properties_map(), + BlockKind::DeadHornCoralFan => self.dead_horn_coral_fan_to_properties_map(), + BlockKind::TubeCoralFan => self.tube_coral_fan_to_properties_map(), + BlockKind::BrainCoralFan => self.brain_coral_fan_to_properties_map(), + BlockKind::BubbleCoralFan => self.bubble_coral_fan_to_properties_map(), + BlockKind::FireCoralFan => self.fire_coral_fan_to_properties_map(), + BlockKind::HornCoralFan => self.horn_coral_fan_to_properties_map(), + BlockKind::DeadTubeCoralWallFan => self.dead_tube_coral_wall_fan_to_properties_map(), + BlockKind::DeadBrainCoralWallFan => self.dead_brain_coral_wall_fan_to_properties_map(), + BlockKind::DeadBubbleCoralWallFan => { + self.dead_bubble_coral_wall_fan_to_properties_map() + } + BlockKind::DeadFireCoralWallFan => self.dead_fire_coral_wall_fan_to_properties_map(), + BlockKind::DeadHornCoralWallFan => self.dead_horn_coral_wall_fan_to_properties_map(), + BlockKind::TubeCoralWallFan => self.tube_coral_wall_fan_to_properties_map(), + BlockKind::BrainCoralWallFan => self.brain_coral_wall_fan_to_properties_map(), + BlockKind::BubbleCoralWallFan => self.bubble_coral_wall_fan_to_properties_map(), + BlockKind::FireCoralWallFan => self.fire_coral_wall_fan_to_properties_map(), + BlockKind::HornCoralWallFan => self.horn_coral_wall_fan_to_properties_map(), + BlockKind::SeaPickle => self.sea_pickle_to_properties_map(), + BlockKind::BlueIce => self.blue_ice_to_properties_map(), + BlockKind::Conduit => self.conduit_to_properties_map(), + BlockKind::BambooSapling => self.bamboo_sapling_to_properties_map(), + BlockKind::Bamboo => self.bamboo_to_properties_map(), + BlockKind::PottedBamboo => self.potted_bamboo_to_properties_map(), + BlockKind::VoidAir => self.void_air_to_properties_map(), + BlockKind::CaveAir => self.cave_air_to_properties_map(), + BlockKind::BubbleColumn => self.bubble_column_to_properties_map(), + BlockKind::PolishedGraniteStairs => self.polished_granite_stairs_to_properties_map(), + BlockKind::SmoothRedSandstoneStairs => { + self.smooth_red_sandstone_stairs_to_properties_map() + } + BlockKind::MossyStoneBrickStairs => self.mossy_stone_brick_stairs_to_properties_map(), + BlockKind::PolishedDioriteStairs => self.polished_diorite_stairs_to_properties_map(), + BlockKind::MossyCobblestoneStairs => self.mossy_cobblestone_stairs_to_properties_map(), + BlockKind::EndStoneBrickStairs => self.end_stone_brick_stairs_to_properties_map(), + BlockKind::StoneStairs => self.stone_stairs_to_properties_map(), + BlockKind::SmoothSandstoneStairs => self.smooth_sandstone_stairs_to_properties_map(), + BlockKind::SmoothQuartzStairs => self.smooth_quartz_stairs_to_properties_map(), + BlockKind::GraniteStairs => self.granite_stairs_to_properties_map(), + BlockKind::AndesiteStairs => self.andesite_stairs_to_properties_map(), + BlockKind::RedNetherBrickStairs => self.red_nether_brick_stairs_to_properties_map(), + BlockKind::PolishedAndesiteStairs => self.polished_andesite_stairs_to_properties_map(), + BlockKind::DioriteStairs => self.diorite_stairs_to_properties_map(), + BlockKind::PolishedGraniteSlab => self.polished_granite_slab_to_properties_map(), + BlockKind::SmoothRedSandstoneSlab => self.smooth_red_sandstone_slab_to_properties_map(), + BlockKind::MossyStoneBrickSlab => self.mossy_stone_brick_slab_to_properties_map(), + BlockKind::PolishedDioriteSlab => self.polished_diorite_slab_to_properties_map(), + BlockKind::MossyCobblestoneSlab => self.mossy_cobblestone_slab_to_properties_map(), + BlockKind::EndStoneBrickSlab => self.end_stone_brick_slab_to_properties_map(), + BlockKind::SmoothSandstoneSlab => self.smooth_sandstone_slab_to_properties_map(), + BlockKind::SmoothQuartzSlab => self.smooth_quartz_slab_to_properties_map(), + BlockKind::GraniteSlab => self.granite_slab_to_properties_map(), + BlockKind::AndesiteSlab => self.andesite_slab_to_properties_map(), + BlockKind::RedNetherBrickSlab => self.red_nether_brick_slab_to_properties_map(), + BlockKind::PolishedAndesiteSlab => self.polished_andesite_slab_to_properties_map(), + BlockKind::DioriteSlab => self.diorite_slab_to_properties_map(), + BlockKind::BrickWall => self.brick_wall_to_properties_map(), + BlockKind::PrismarineWall => self.prismarine_wall_to_properties_map(), + BlockKind::RedSandstoneWall => self.red_sandstone_wall_to_properties_map(), + BlockKind::MossyStoneBrickWall => self.mossy_stone_brick_wall_to_properties_map(), + BlockKind::GraniteWall => self.granite_wall_to_properties_map(), + BlockKind::StoneBrickWall => self.stone_brick_wall_to_properties_map(), + BlockKind::NetherBrickWall => self.nether_brick_wall_to_properties_map(), + BlockKind::AndesiteWall => self.andesite_wall_to_properties_map(), + BlockKind::RedNetherBrickWall => self.red_nether_brick_wall_to_properties_map(), + BlockKind::SandstoneWall => self.sandstone_wall_to_properties_map(), + BlockKind::EndStoneBrickWall => self.end_stone_brick_wall_to_properties_map(), + BlockKind::DioriteWall => self.diorite_wall_to_properties_map(), + BlockKind::Scaffolding => self.scaffolding_to_properties_map(), + BlockKind::Loom => self.loom_to_properties_map(), + BlockKind::Barrel => self.barrel_to_properties_map(), + BlockKind::Smoker => self.smoker_to_properties_map(), + BlockKind::BlastFurnace => self.blast_furnace_to_properties_map(), + BlockKind::CartographyTable => self.cartography_table_to_properties_map(), + BlockKind::FletchingTable => self.fletching_table_to_properties_map(), + BlockKind::Grindstone => self.grindstone_to_properties_map(), + BlockKind::Lectern => self.lectern_to_properties_map(), + BlockKind::SmithingTable => self.smithing_table_to_properties_map(), + BlockKind::Stonecutter => self.stonecutter_to_properties_map(), + BlockKind::Bell => self.bell_to_properties_map(), + BlockKind::Lantern => self.lantern_to_properties_map(), + BlockKind::SoulLantern => self.soul_lantern_to_properties_map(), + BlockKind::Campfire => self.campfire_to_properties_map(), + BlockKind::SoulCampfire => self.soul_campfire_to_properties_map(), + BlockKind::SweetBerryBush => self.sweet_berry_bush_to_properties_map(), + BlockKind::WarpedStem => self.warped_stem_to_properties_map(), + BlockKind::StrippedWarpedStem => self.stripped_warped_stem_to_properties_map(), + BlockKind::WarpedHyphae => self.warped_hyphae_to_properties_map(), + BlockKind::StrippedWarpedHyphae => self.stripped_warped_hyphae_to_properties_map(), + BlockKind::WarpedNylium => self.warped_nylium_to_properties_map(), + BlockKind::WarpedFungus => self.warped_fungus_to_properties_map(), + BlockKind::WarpedWartBlock => self.warped_wart_block_to_properties_map(), + BlockKind::WarpedRoots => self.warped_roots_to_properties_map(), + BlockKind::NetherSprouts => self.nether_sprouts_to_properties_map(), + BlockKind::CrimsonStem => self.crimson_stem_to_properties_map(), + BlockKind::StrippedCrimsonStem => self.stripped_crimson_stem_to_properties_map(), + BlockKind::CrimsonHyphae => self.crimson_hyphae_to_properties_map(), + BlockKind::StrippedCrimsonHyphae => self.stripped_crimson_hyphae_to_properties_map(), + BlockKind::CrimsonNylium => self.crimson_nylium_to_properties_map(), + BlockKind::CrimsonFungus => self.crimson_fungus_to_properties_map(), + BlockKind::Shroomlight => self.shroomlight_to_properties_map(), + BlockKind::WeepingVines => self.weeping_vines_to_properties_map(), + BlockKind::WeepingVinesPlant => self.weeping_vines_plant_to_properties_map(), + BlockKind::TwistingVines => self.twisting_vines_to_properties_map(), + BlockKind::TwistingVinesPlant => self.twisting_vines_plant_to_properties_map(), + BlockKind::CrimsonRoots => self.crimson_roots_to_properties_map(), + BlockKind::CrimsonPlanks => self.crimson_planks_to_properties_map(), + BlockKind::WarpedPlanks => self.warped_planks_to_properties_map(), + BlockKind::CrimsonSlab => self.crimson_slab_to_properties_map(), + BlockKind::WarpedSlab => self.warped_slab_to_properties_map(), + BlockKind::CrimsonPressurePlate => self.crimson_pressure_plate_to_properties_map(), + BlockKind::WarpedPressurePlate => self.warped_pressure_plate_to_properties_map(), + BlockKind::CrimsonFence => self.crimson_fence_to_properties_map(), + BlockKind::WarpedFence => self.warped_fence_to_properties_map(), + BlockKind::CrimsonTrapdoor => self.crimson_trapdoor_to_properties_map(), + BlockKind::WarpedTrapdoor => self.warped_trapdoor_to_properties_map(), + BlockKind::CrimsonFenceGate => self.crimson_fence_gate_to_properties_map(), + BlockKind::WarpedFenceGate => self.warped_fence_gate_to_properties_map(), + BlockKind::CrimsonStairs => self.crimson_stairs_to_properties_map(), + BlockKind::WarpedStairs => self.warped_stairs_to_properties_map(), + BlockKind::CrimsonButton => self.crimson_button_to_properties_map(), + BlockKind::WarpedButton => self.warped_button_to_properties_map(), + BlockKind::CrimsonDoor => self.crimson_door_to_properties_map(), + BlockKind::WarpedDoor => self.warped_door_to_properties_map(), + BlockKind::CrimsonSign => self.crimson_sign_to_properties_map(), + BlockKind::WarpedSign => self.warped_sign_to_properties_map(), + BlockKind::CrimsonWallSign => self.crimson_wall_sign_to_properties_map(), + BlockKind::WarpedWallSign => self.warped_wall_sign_to_properties_map(), + BlockKind::StructureBlock => self.structure_block_to_properties_map(), + BlockKind::Jigsaw => self.jigsaw_to_properties_map(), + BlockKind::Composter => self.composter_to_properties_map(), + BlockKind::Target => self.target_to_properties_map(), + BlockKind::BeeNest => self.bee_nest_to_properties_map(), + BlockKind::Beehive => self.beehive_to_properties_map(), + BlockKind::HoneyBlock => self.honey_block_to_properties_map(), + BlockKind::HoneycombBlock => self.honeycomb_block_to_properties_map(), + BlockKind::NetheriteBlock => self.netherite_block_to_properties_map(), + BlockKind::AncientDebris => self.ancient_debris_to_properties_map(), + BlockKind::CryingObsidian => self.crying_obsidian_to_properties_map(), + BlockKind::RespawnAnchor => self.respawn_anchor_to_properties_map(), + BlockKind::PottedCrimsonFungus => self.potted_crimson_fungus_to_properties_map(), + BlockKind::PottedWarpedFungus => self.potted_warped_fungus_to_properties_map(), + BlockKind::PottedCrimsonRoots => self.potted_crimson_roots_to_properties_map(), + BlockKind::PottedWarpedRoots => self.potted_warped_roots_to_properties_map(), + BlockKind::Lodestone => self.lodestone_to_properties_map(), + BlockKind::Blackstone => self.blackstone_to_properties_map(), + BlockKind::BlackstoneStairs => self.blackstone_stairs_to_properties_map(), + BlockKind::BlackstoneWall => self.blackstone_wall_to_properties_map(), + BlockKind::BlackstoneSlab => self.blackstone_slab_to_properties_map(), + BlockKind::PolishedBlackstone => self.polished_blackstone_to_properties_map(), + BlockKind::PolishedBlackstoneBricks => { + self.polished_blackstone_bricks_to_properties_map() + } + BlockKind::CrackedPolishedBlackstoneBricks => { + self.cracked_polished_blackstone_bricks_to_properties_map() + } + BlockKind::ChiseledPolishedBlackstone => { + self.chiseled_polished_blackstone_to_properties_map() + } + BlockKind::PolishedBlackstoneBrickSlab => { + self.polished_blackstone_brick_slab_to_properties_map() + } + BlockKind::PolishedBlackstoneBrickStairs => { + self.polished_blackstone_brick_stairs_to_properties_map() + } + BlockKind::PolishedBlackstoneBrickWall => { + self.polished_blackstone_brick_wall_to_properties_map() + } + BlockKind::GildedBlackstone => self.gilded_blackstone_to_properties_map(), + BlockKind::PolishedBlackstoneStairs => { + self.polished_blackstone_stairs_to_properties_map() + } + BlockKind::PolishedBlackstoneSlab => self.polished_blackstone_slab_to_properties_map(), + BlockKind::PolishedBlackstonePressurePlate => { + self.polished_blackstone_pressure_plate_to_properties_map() + } + BlockKind::PolishedBlackstoneButton => { + self.polished_blackstone_button_to_properties_map() + } + BlockKind::PolishedBlackstoneWall => self.polished_blackstone_wall_to_properties_map(), + BlockKind::ChiseledNetherBricks => self.chiseled_nether_bricks_to_properties_map(), + BlockKind::CrackedNetherBricks => self.cracked_nether_bricks_to_properties_map(), + BlockKind::QuartzBricks => self.quartz_bricks_to_properties_map(), } } - #[doc = "Returns a mapping from property name to property value for this block. Used to serialize blocks in vanilla world saves."] - pub fn to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - match self.kind { - BlockKind::Air => self.air_to_properties_map(), - BlockKind::Stone => self.stone_to_properties_map(), - BlockKind::Granite => self.granite_to_properties_map(), - BlockKind::PolishedGranite => self.polished_granite_to_properties_map(), - BlockKind::Diorite => self.diorite_to_properties_map(), - BlockKind::PolishedDiorite => self.polished_diorite_to_properties_map(), - BlockKind::Andesite => self.andesite_to_properties_map(), - BlockKind::PolishedAndesite => self.polished_andesite_to_properties_map(), - BlockKind::GrassBlock => self.grass_block_to_properties_map(), - BlockKind::Dirt => self.dirt_to_properties_map(), - BlockKind::CoarseDirt => self.coarse_dirt_to_properties_map(), - BlockKind::Podzol => self.podzol_to_properties_map(), - BlockKind::Cobblestone => self.cobblestone_to_properties_map(), - BlockKind::OakPlanks => self.oak_planks_to_properties_map(), - BlockKind::SprucePlanks => self.spruce_planks_to_properties_map(), - BlockKind::BirchPlanks => self.birch_planks_to_properties_map(), - BlockKind::JunglePlanks => self.jungle_planks_to_properties_map(), - BlockKind::AcaciaPlanks => self.acacia_planks_to_properties_map(), - BlockKind::DarkOakPlanks => self.dark_oak_planks_to_properties_map(), - BlockKind::OakSapling => self.oak_sapling_to_properties_map(), - BlockKind::SpruceSapling => self.spruce_sapling_to_properties_map(), - BlockKind::BirchSapling => self.birch_sapling_to_properties_map(), - BlockKind::JungleSapling => self.jungle_sapling_to_properties_map(), - BlockKind::AcaciaSapling => self.acacia_sapling_to_properties_map(), - BlockKind::DarkOakSapling => self.dark_oak_sapling_to_properties_map(), - BlockKind::Bedrock => self.bedrock_to_properties_map(), - BlockKind::Water => self.water_to_properties_map(), - BlockKind::Lava => self.lava_to_properties_map(), - BlockKind::Sand => self.sand_to_properties_map(), - BlockKind::RedSand => self.red_sand_to_properties_map(), - BlockKind::Gravel => self.gravel_to_properties_map(), - BlockKind::GoldOre => self.gold_ore_to_properties_map(), - BlockKind::IronOre => self.iron_ore_to_properties_map(), - BlockKind::CoalOre => self.coal_ore_to_properties_map(), - BlockKind::OakLog => self.oak_log_to_properties_map(), - BlockKind::SpruceLog => self.spruce_log_to_properties_map(), - BlockKind::BirchLog => self.birch_log_to_properties_map(), - BlockKind::JungleLog => self.jungle_log_to_properties_map(), - BlockKind::AcaciaLog => self.acacia_log_to_properties_map(), - BlockKind::DarkOakLog => self.dark_oak_log_to_properties_map(), - BlockKind::StrippedSpruceLog => self.stripped_spruce_log_to_properties_map(), - BlockKind::StrippedBirchLog => self.stripped_birch_log_to_properties_map(), - BlockKind::StrippedJungleLog => self.stripped_jungle_log_to_properties_map(), - BlockKind::StrippedAcaciaLog => self.stripped_acacia_log_to_properties_map(), - BlockKind::StrippedDarkOakLog => self.stripped_dark_oak_log_to_properties_map(), - BlockKind::StrippedOakLog => self.stripped_oak_log_to_properties_map(), - BlockKind::OakWood => self.oak_wood_to_properties_map(), - BlockKind::SpruceWood => self.spruce_wood_to_properties_map(), - BlockKind::BirchWood => self.birch_wood_to_properties_map(), - BlockKind::JungleWood => self.jungle_wood_to_properties_map(), - BlockKind::AcaciaWood => self.acacia_wood_to_properties_map(), - BlockKind::DarkOakWood => self.dark_oak_wood_to_properties_map(), - BlockKind::StrippedOakWood => self.stripped_oak_wood_to_properties_map(), - BlockKind::StrippedSpruceWood => self.stripped_spruce_wood_to_properties_map(), - BlockKind::StrippedBirchWood => self.stripped_birch_wood_to_properties_map(), - BlockKind::StrippedJungleWood => self.stripped_jungle_wood_to_properties_map(), - BlockKind::StrippedAcaciaWood => self.stripped_acacia_wood_to_properties_map(), - BlockKind::StrippedDarkOakWood => self.stripped_dark_oak_wood_to_properties_map(), - BlockKind::OakLeaves => self.oak_leaves_to_properties_map(), - BlockKind::SpruceLeaves => self.spruce_leaves_to_properties_map(), - BlockKind::BirchLeaves => self.birch_leaves_to_properties_map(), - BlockKind::JungleLeaves => self.jungle_leaves_to_properties_map(), - BlockKind::AcaciaLeaves => self.acacia_leaves_to_properties_map(), - BlockKind::DarkOakLeaves => self.dark_oak_leaves_to_properties_map(), - BlockKind::Sponge => self.sponge_to_properties_map(), - BlockKind::WetSponge => self.wet_sponge_to_properties_map(), - BlockKind::Glass => self.glass_to_properties_map(), - BlockKind::LapisOre => self.lapis_ore_to_properties_map(), - BlockKind::LapisBlock => self.lapis_block_to_properties_map(), - BlockKind::Dispenser => self.dispenser_to_properties_map(), - BlockKind::Sandstone => self.sandstone_to_properties_map(), - BlockKind::ChiseledSandstone => self.chiseled_sandstone_to_properties_map(), - BlockKind::CutSandstone => self.cut_sandstone_to_properties_map(), - BlockKind::NoteBlock => self.note_block_to_properties_map(), - BlockKind::WhiteBed => self.white_bed_to_properties_map(), - BlockKind::OrangeBed => self.orange_bed_to_properties_map(), - BlockKind::MagentaBed => self.magenta_bed_to_properties_map(), - BlockKind::LightBlueBed => self.light_blue_bed_to_properties_map(), - BlockKind::YellowBed => self.yellow_bed_to_properties_map(), - BlockKind::LimeBed => self.lime_bed_to_properties_map(), - BlockKind::PinkBed => self.pink_bed_to_properties_map(), - BlockKind::GrayBed => self.gray_bed_to_properties_map(), - BlockKind::LightGrayBed => self.light_gray_bed_to_properties_map(), - BlockKind::CyanBed => self.cyan_bed_to_properties_map(), - BlockKind::PurpleBed => self.purple_bed_to_properties_map(), - BlockKind::BlueBed => self.blue_bed_to_properties_map(), - BlockKind::BrownBed => self.brown_bed_to_properties_map(), - BlockKind::GreenBed => self.green_bed_to_properties_map(), - BlockKind::RedBed => self.red_bed_to_properties_map(), - BlockKind::BlackBed => self.black_bed_to_properties_map(), - BlockKind::PoweredRail => self.powered_rail_to_properties_map(), - BlockKind::DetectorRail => self.detector_rail_to_properties_map(), - BlockKind::StickyPiston => self.sticky_piston_to_properties_map(), - BlockKind::Cobweb => self.cobweb_to_properties_map(), - BlockKind::Grass => self.grass_to_properties_map(), - BlockKind::Fern => self.fern_to_properties_map(), - BlockKind::DeadBush => self.dead_bush_to_properties_map(), - BlockKind::Seagrass => self.seagrass_to_properties_map(), - BlockKind::TallSeagrass => self.tall_seagrass_to_properties_map(), - BlockKind::Piston => self.piston_to_properties_map(), - BlockKind::PistonHead => self.piston_head_to_properties_map(), - BlockKind::WhiteWool => self.white_wool_to_properties_map(), - BlockKind::OrangeWool => self.orange_wool_to_properties_map(), - BlockKind::MagentaWool => self.magenta_wool_to_properties_map(), - BlockKind::LightBlueWool => self.light_blue_wool_to_properties_map(), - BlockKind::YellowWool => self.yellow_wool_to_properties_map(), - BlockKind::LimeWool => self.lime_wool_to_properties_map(), - BlockKind::PinkWool => self.pink_wool_to_properties_map(), - BlockKind::GrayWool => self.gray_wool_to_properties_map(), - BlockKind::LightGrayWool => self.light_gray_wool_to_properties_map(), - BlockKind::CyanWool => self.cyan_wool_to_properties_map(), - BlockKind::PurpleWool => self.purple_wool_to_properties_map(), - BlockKind::BlueWool => self.blue_wool_to_properties_map(), - BlockKind::BrownWool => self.brown_wool_to_properties_map(), - BlockKind::GreenWool => self.green_wool_to_properties_map(), - BlockKind::RedWool => self.red_wool_to_properties_map(), - BlockKind::BlackWool => self.black_wool_to_properties_map(), - BlockKind::MovingPiston => self.moving_piston_to_properties_map(), - BlockKind::Dandelion => self.dandelion_to_properties_map(), - BlockKind::Poppy => self.poppy_to_properties_map(), - BlockKind::BlueOrchid => self.blue_orchid_to_properties_map(), - BlockKind::Allium => self.allium_to_properties_map(), - BlockKind::AzureBluet => self.azure_bluet_to_properties_map(), - BlockKind::RedTulip => self.red_tulip_to_properties_map(), - BlockKind::OrangeTulip => self.orange_tulip_to_properties_map(), - BlockKind::WhiteTulip => self.white_tulip_to_properties_map(), - BlockKind::PinkTulip => self.pink_tulip_to_properties_map(), - BlockKind::OxeyeDaisy => self.oxeye_daisy_to_properties_map(), - BlockKind::BrownMushroom => self.brown_mushroom_to_properties_map(), - BlockKind::RedMushroom => self.red_mushroom_to_properties_map(), - BlockKind::GoldBlock => self.gold_block_to_properties_map(), - BlockKind::IronBlock => self.iron_block_to_properties_map(), - BlockKind::Bricks => self.bricks_to_properties_map(), - BlockKind::Tnt => self.tnt_to_properties_map(), - BlockKind::Bookshelf => self.bookshelf_to_properties_map(), - BlockKind::MossyCobblestone => self.mossy_cobblestone_to_properties_map(), - BlockKind::Obsidian => self.obsidian_to_properties_map(), - BlockKind::Torch => self.torch_to_properties_map(), - BlockKind::WallTorch => self.wall_torch_to_properties_map(), - BlockKind::Fire => self.fire_to_properties_map(), - BlockKind::Spawner => self.spawner_to_properties_map(), - BlockKind::OakStairs => self.oak_stairs_to_properties_map(), - BlockKind::Chest => self.chest_to_properties_map(), - BlockKind::RedstoneWire => self.redstone_wire_to_properties_map(), - BlockKind::DiamondOre => self.diamond_ore_to_properties_map(), - BlockKind::DiamondBlock => self.diamond_block_to_properties_map(), - BlockKind::CraftingTable => self.crafting_table_to_properties_map(), - BlockKind::Wheat => self.wheat_to_properties_map(), - BlockKind::Farmland => self.farmland_to_properties_map(), - BlockKind::Furnace => self.furnace_to_properties_map(), - BlockKind::Sign => self.sign_to_properties_map(), - BlockKind::OakDoor => self.oak_door_to_properties_map(), - BlockKind::Ladder => self.ladder_to_properties_map(), - BlockKind::Rail => self.rail_to_properties_map(), - BlockKind::CobblestoneStairs => self.cobblestone_stairs_to_properties_map(), - BlockKind::WallSign => self.wall_sign_to_properties_map(), - BlockKind::Lever => self.lever_to_properties_map(), - BlockKind::StonePressurePlate => self.stone_pressure_plate_to_properties_map(), - BlockKind::IronDoor => self.iron_door_to_properties_map(), - BlockKind::OakPressurePlate => self.oak_pressure_plate_to_properties_map(), - BlockKind::SprucePressurePlate => self.spruce_pressure_plate_to_properties_map(), - BlockKind::BirchPressurePlate => self.birch_pressure_plate_to_properties_map(), - BlockKind::JunglePressurePlate => self.jungle_pressure_plate_to_properties_map(), - BlockKind::AcaciaPressurePlate => self.acacia_pressure_plate_to_properties_map(), - BlockKind::DarkOakPressurePlate => self.dark_oak_pressure_plate_to_properties_map(), - BlockKind::RedstoneOre => self.redstone_ore_to_properties_map(), - BlockKind::RedstoneTorch => self.redstone_torch_to_properties_map(), - BlockKind::RedstoneWallTorch => self.redstone_wall_torch_to_properties_map(), - BlockKind::StoneButton => self.stone_button_to_properties_map(), - BlockKind::Snow => self.snow_to_properties_map(), - BlockKind::Ice => self.ice_to_properties_map(), - BlockKind::SnowBlock => self.snow_block_to_properties_map(), - BlockKind::Cactus => self.cactus_to_properties_map(), - BlockKind::Clay => self.clay_to_properties_map(), - BlockKind::SugarCane => self.sugar_cane_to_properties_map(), - BlockKind::Jukebox => self.jukebox_to_properties_map(), - BlockKind::OakFence => self.oak_fence_to_properties_map(), - BlockKind::Pumpkin => self.pumpkin_to_properties_map(), - BlockKind::Netherrack => self.netherrack_to_properties_map(), - BlockKind::SoulSand => self.soul_sand_to_properties_map(), - BlockKind::Glowstone => self.glowstone_to_properties_map(), - BlockKind::NetherPortal => self.nether_portal_to_properties_map(), - BlockKind::CarvedPumpkin => self.carved_pumpkin_to_properties_map(), - BlockKind::JackOLantern => self.jack_o_lantern_to_properties_map(), - BlockKind::Cake => self.cake_to_properties_map(), - BlockKind::Repeater => self.repeater_to_properties_map(), - BlockKind::WhiteStainedGlass => self.white_stained_glass_to_properties_map(), - BlockKind::OrangeStainedGlass => self.orange_stained_glass_to_properties_map(), - BlockKind::MagentaStainedGlass => self.magenta_stained_glass_to_properties_map(), - BlockKind::LightBlueStainedGlass => self.light_blue_stained_glass_to_properties_map(), - BlockKind::YellowStainedGlass => self.yellow_stained_glass_to_properties_map(), - BlockKind::LimeStainedGlass => self.lime_stained_glass_to_properties_map(), - BlockKind::PinkStainedGlass => self.pink_stained_glass_to_properties_map(), - BlockKind::GrayStainedGlass => self.gray_stained_glass_to_properties_map(), - BlockKind::LightGrayStainedGlass => self.light_gray_stained_glass_to_properties_map(), - BlockKind::CyanStainedGlass => self.cyan_stained_glass_to_properties_map(), - BlockKind::PurpleStainedGlass => self.purple_stained_glass_to_properties_map(), - BlockKind::BlueStainedGlass => self.blue_stained_glass_to_properties_map(), - BlockKind::BrownStainedGlass => self.brown_stained_glass_to_properties_map(), - BlockKind::GreenStainedGlass => self.green_stained_glass_to_properties_map(), - BlockKind::RedStainedGlass => self.red_stained_glass_to_properties_map(), - BlockKind::BlackStainedGlass => self.black_stained_glass_to_properties_map(), - BlockKind::OakTrapdoor => self.oak_trapdoor_to_properties_map(), - BlockKind::SpruceTrapdoor => self.spruce_trapdoor_to_properties_map(), - BlockKind::BirchTrapdoor => self.birch_trapdoor_to_properties_map(), - BlockKind::JungleTrapdoor => self.jungle_trapdoor_to_properties_map(), - BlockKind::AcaciaTrapdoor => self.acacia_trapdoor_to_properties_map(), - BlockKind::DarkOakTrapdoor => self.dark_oak_trapdoor_to_properties_map(), - BlockKind::InfestedStone => self.infested_stone_to_properties_map(), - BlockKind::InfestedCobblestone => self.infested_cobblestone_to_properties_map(), - BlockKind::InfestedStoneBricks => self.infested_stone_bricks_to_properties_map(), - BlockKind::InfestedMossyStoneBricks => { - self.infested_mossy_stone_bricks_to_properties_map() + fn air_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn stone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn granite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn polished_granite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn diorite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn polished_diorite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn andesite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn polished_andesite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn grass_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let snowy = self.snowy().unwrap(); + map.insert("snowy", { + match snowy { + true => "true", + false => "false", + } + }); + map + } + fn dirt_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn coarse_dirt_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn podzol_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let snowy = self.snowy().unwrap(); + map.insert("snowy", { + match snowy { + true => "true", + false => "false", + } + }); + map + } + fn cobblestone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn oak_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn spruce_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn birch_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn jungle_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn acacia_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn dark_oak_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn oak_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let stage = self.stage().unwrap(); + map.insert("stage", { + match stage { + 0i32 => "0", + 1i32 => "1", + _ => "unknown", + } + }); + map + } + fn spruce_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let stage = self.stage().unwrap(); + map.insert("stage", { + match stage { + 0i32 => "0", + 1i32 => "1", + _ => "unknown", + } + }); + map + } + fn birch_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let stage = self.stage().unwrap(); + map.insert("stage", { + match stage { + 0i32 => "0", + 1i32 => "1", + _ => "unknown", + } + }); + map + } + fn jungle_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let stage = self.stage().unwrap(); + map.insert("stage", { + match stage { + 0i32 => "0", + 1i32 => "1", + _ => "unknown", + } + }); + map + } + fn acacia_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let stage = self.stage().unwrap(); + map.insert("stage", { + match stage { + 0i32 => "0", + 1i32 => "1", + _ => "unknown", + } + }); + map + } + fn dark_oak_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let stage = self.stage().unwrap(); + map.insert("stage", { + match stage { + 0i32 => "0", + 1i32 => "1", + _ => "unknown", + } + }); + map + } + fn bedrock_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn water_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let water_level = self.water_level().unwrap(); + map.insert("level", { + match water_level { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); + map + } + fn lava_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let water_level = self.water_level().unwrap(); + map.insert("level", { + match water_level { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); + map + } + fn sand_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn red_sand_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn gravel_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn gold_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn iron_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn coal_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn nether_gold_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn oak_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn spruce_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn birch_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn jungle_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn acacia_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn dark_oak_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_spruce_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_birch_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_jungle_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_acacia_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_dark_oak_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_oak_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn oak_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn spruce_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn birch_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn jungle_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn acacia_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn dark_oak_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_oak_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_spruce_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_birch_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_jungle_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_acacia_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn stripped_dark_oak_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn oak_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let distance_1_7 = self.distance_1_7().unwrap(); + map.insert("distance", { + match distance_1_7 { + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", + } + }); + let persistent = self.persistent().unwrap(); + map.insert("persistent", { + match persistent { + true => "true", + false => "false", + } + }); + map + } + fn spruce_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let distance_1_7 = self.distance_1_7().unwrap(); + map.insert("distance", { + match distance_1_7 { + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", + } + }); + let persistent = self.persistent().unwrap(); + map.insert("persistent", { + match persistent { + true => "true", + false => "false", + } + }); + map + } + fn birch_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let distance_1_7 = self.distance_1_7().unwrap(); + map.insert("distance", { + match distance_1_7 { + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", + } + }); + let persistent = self.persistent().unwrap(); + map.insert("persistent", { + match persistent { + true => "true", + false => "false", + } + }); + map + } + fn jungle_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let distance_1_7 = self.distance_1_7().unwrap(); + map.insert("distance", { + match distance_1_7 { + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", + } + }); + let persistent = self.persistent().unwrap(); + map.insert("persistent", { + match persistent { + true => "true", + false => "false", + } + }); + map + } + fn acacia_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let distance_1_7 = self.distance_1_7().unwrap(); + map.insert("distance", { + match distance_1_7 { + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", + } + }); + let persistent = self.persistent().unwrap(); + map.insert("persistent", { + match persistent { + true => "true", + false => "false", + } + }); + map + } + fn dark_oak_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let distance_1_7 = self.distance_1_7().unwrap(); + map.insert("distance", { + match distance_1_7 { + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", + } + }); + let persistent = self.persistent().unwrap(); + map.insert("persistent", { + match persistent { + true => "true", + false => "false", + } + }); + map + } + fn sponge_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn wet_sponge_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn lapis_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn lapis_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn dispenser_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); + let triggered = self.triggered().unwrap(); + map.insert("triggered", { + match triggered { + true => "true", + false => "false", + } + }); + map + } + fn sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn chiseled_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn cut_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn note_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let instrument = self.instrument().unwrap(); + map.insert("instrument", { instrument.as_str() }); + let note = self.note().unwrap(); + map.insert("note", { + match note { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + 16i32 => "16", + 17i32 => "17", + 18i32 => "18", + 19i32 => "19", + 20i32 => "20", + 21i32 => "21", + 22i32 => "22", + 23i32 => "23", + 24i32 => "24", + _ => "unknown", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + map + } + fn white_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn orange_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn magenta_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn light_blue_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn yellow_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn lime_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn pink_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn gray_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn light_gray_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn cyan_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn purple_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn blue_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn brown_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn green_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn red_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn black_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let occupied = self.occupied().unwrap(); + map.insert("occupied", { + match occupied { + true => "true", + false => "false", + } + }); + let part = self.part().unwrap(); + map.insert("part", { part.as_str() }); + map + } + fn powered_rail_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + let powered_rail_shape = self.powered_rail_shape().unwrap(); + map.insert("shape", { powered_rail_shape.as_str() }); + map + } + fn detector_rail_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + let powered_rail_shape = self.powered_rail_shape().unwrap(); + map.insert("shape", { powered_rail_shape.as_str() }); + map + } + fn sticky_piston_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let extended = self.extended().unwrap(); + map.insert("extended", { + match extended { + true => "true", + false => "false", + } + }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); + map + } + fn cobweb_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn grass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn fern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn dead_bush_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn seagrass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn tall_seagrass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + map + } + fn piston_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let extended = self.extended().unwrap(); + map.insert("extended", { + match extended { + true => "true", + false => "false", + } + }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); + map + } + fn piston_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); + let piston_kind = self.piston_kind().unwrap(); + map.insert("type", { piston_kind.as_str() }); + let short = self.short().unwrap(); + map.insert("short", { + match short { + true => "true", + false => "false", + } + }); + map + } + fn white_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn orange_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn magenta_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn light_blue_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn yellow_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn lime_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn pink_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn gray_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn light_gray_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn cyan_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn purple_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn blue_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn brown_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn green_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn red_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn black_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn moving_piston_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); + let piston_kind = self.piston_kind().unwrap(); + map.insert("type", { piston_kind.as_str() }); + map + } + fn dandelion_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn poppy_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn blue_orchid_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn allium_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn azure_bluet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn red_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn orange_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn white_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn pink_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn oxeye_daisy_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn cornflower_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn wither_rose_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn lily_of_the_valley_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn brown_mushroom_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn red_mushroom_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn gold_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn iron_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn tnt_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let unstable = self.unstable().unwrap(); + map.insert("unstable", { + match unstable { + true => "true", + false => "false", + } + }); + map + } + fn bookshelf_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn mossy_cobblestone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn obsidian_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn wall_torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + map + } + fn fire_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let age_0_15 = self.age_0_15().unwrap(); + map.insert("age", { + match age_0_15 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { + true => "true", + false => "false", + } + }); + map + } + fn soul_fire_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn spawner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn oak_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + map + } + fn chest_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let chest_kind = self.chest_kind().unwrap(); + map.insert("type", { chest_kind.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + map + } + fn redstone_wire_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let east_wire = self.east_wire().unwrap(); + map.insert("east", { east_wire.as_str() }); + let north_wire = self.north_wire().unwrap(); + map.insert("north", { north_wire.as_str() }); + let power = self.power().unwrap(); + map.insert("power", { + match power { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); + let south_wire = self.south_wire().unwrap(); + map.insert("south", { south_wire.as_str() }); + let west_wire = self.west_wire().unwrap(); + map.insert("west", { west_wire.as_str() }); + map + } + fn diamond_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn diamond_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn crafting_table_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn wheat_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let age_0_7 = self.age_0_7().unwrap(); + map.insert("age", { + match age_0_7 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", + } + }); + map + } + fn farmland_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let moisture = self.moisture().unwrap(); + map.insert("moisture", { + match moisture { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", + } + }); + map + } + fn furnace_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let lit = self.lit().unwrap(); + map.insert("lit", { + match lit { + true => "true", + false => "false", + } + }); + map + } + fn oak_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + map + } + fn spruce_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + map + } + fn birch_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } - BlockKind::InfestedCrackedStoneBricks => { - self.infested_cracked_stone_bricks_to_properties_map() + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } - BlockKind::InfestedChiseledStoneBricks => { - self.infested_chiseled_stone_bricks_to_properties_map() + }); + map + } + fn acacia_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } - BlockKind::StoneBricks => self.stone_bricks_to_properties_map(), - BlockKind::MossyStoneBricks => self.mossy_stone_bricks_to_properties_map(), - BlockKind::CrackedStoneBricks => self.cracked_stone_bricks_to_properties_map(), - BlockKind::ChiseledStoneBricks => self.chiseled_stone_bricks_to_properties_map(), - BlockKind::BrownMushroomBlock => self.brown_mushroom_block_to_properties_map(), - BlockKind::RedMushroomBlock => self.red_mushroom_block_to_properties_map(), - BlockKind::MushroomStem => self.mushroom_stem_to_properties_map(), - BlockKind::IronBars => self.iron_bars_to_properties_map(), - BlockKind::GlassPane => self.glass_pane_to_properties_map(), - BlockKind::Melon => self.melon_to_properties_map(), - BlockKind::AttachedPumpkinStem => self.attached_pumpkin_stem_to_properties_map(), - BlockKind::AttachedMelonStem => self.attached_melon_stem_to_properties_map(), - BlockKind::PumpkinStem => self.pumpkin_stem_to_properties_map(), - BlockKind::MelonStem => self.melon_stem_to_properties_map(), - BlockKind::Vine => self.vine_to_properties_map(), - BlockKind::OakFenceGate => self.oak_fence_gate_to_properties_map(), - BlockKind::BrickStairs => self.brick_stairs_to_properties_map(), - BlockKind::StoneBrickStairs => self.stone_brick_stairs_to_properties_map(), - BlockKind::Mycelium => self.mycelium_to_properties_map(), - BlockKind::LilyPad => self.lily_pad_to_properties_map(), - BlockKind::NetherBricks => self.nether_bricks_to_properties_map(), - BlockKind::NetherBrickFence => self.nether_brick_fence_to_properties_map(), - BlockKind::NetherBrickStairs => self.nether_brick_stairs_to_properties_map(), - BlockKind::NetherWart => self.nether_wart_to_properties_map(), - BlockKind::EnchantingTable => self.enchanting_table_to_properties_map(), - BlockKind::BrewingStand => self.brewing_stand_to_properties_map(), - BlockKind::Cauldron => self.cauldron_to_properties_map(), - BlockKind::EndPortal => self.end_portal_to_properties_map(), - BlockKind::EndPortalFrame => self.end_portal_frame_to_properties_map(), - BlockKind::EndStone => self.end_stone_to_properties_map(), - BlockKind::DragonEgg => self.dragon_egg_to_properties_map(), - BlockKind::RedstoneLamp => self.redstone_lamp_to_properties_map(), - BlockKind::Cocoa => self.cocoa_to_properties_map(), - BlockKind::SandstoneStairs => self.sandstone_stairs_to_properties_map(), - BlockKind::EmeraldOre => self.emerald_ore_to_properties_map(), - BlockKind::EnderChest => self.ender_chest_to_properties_map(), - BlockKind::TripwireHook => self.tripwire_hook_to_properties_map(), - BlockKind::Tripwire => self.tripwire_to_properties_map(), - BlockKind::EmeraldBlock => self.emerald_block_to_properties_map(), - BlockKind::SpruceStairs => self.spruce_stairs_to_properties_map(), - BlockKind::BirchStairs => self.birch_stairs_to_properties_map(), - BlockKind::JungleStairs => self.jungle_stairs_to_properties_map(), - BlockKind::CommandBlock => self.command_block_to_properties_map(), - BlockKind::Beacon => self.beacon_to_properties_map(), - BlockKind::CobblestoneWall => self.cobblestone_wall_to_properties_map(), - BlockKind::MossyCobblestoneWall => self.mossy_cobblestone_wall_to_properties_map(), - BlockKind::FlowerPot => self.flower_pot_to_properties_map(), - BlockKind::PottedOakSapling => self.potted_oak_sapling_to_properties_map(), - BlockKind::PottedSpruceSapling => self.potted_spruce_sapling_to_properties_map(), - BlockKind::PottedBirchSapling => self.potted_birch_sapling_to_properties_map(), - BlockKind::PottedJungleSapling => self.potted_jungle_sapling_to_properties_map(), - BlockKind::PottedAcaciaSapling => self.potted_acacia_sapling_to_properties_map(), - BlockKind::PottedDarkOakSapling => self.potted_dark_oak_sapling_to_properties_map(), - BlockKind::PottedFern => self.potted_fern_to_properties_map(), - BlockKind::PottedDandelion => self.potted_dandelion_to_properties_map(), - BlockKind::PottedPoppy => self.potted_poppy_to_properties_map(), - BlockKind::PottedBlueOrchid => self.potted_blue_orchid_to_properties_map(), - BlockKind::PottedAllium => self.potted_allium_to_properties_map(), - BlockKind::PottedAzureBluet => self.potted_azure_bluet_to_properties_map(), - BlockKind::PottedRedTulip => self.potted_red_tulip_to_properties_map(), - BlockKind::PottedOrangeTulip => self.potted_orange_tulip_to_properties_map(), - BlockKind::PottedWhiteTulip => self.potted_white_tulip_to_properties_map(), - BlockKind::PottedPinkTulip => self.potted_pink_tulip_to_properties_map(), - BlockKind::PottedOxeyeDaisy => self.potted_oxeye_daisy_to_properties_map(), - BlockKind::PottedRedMushroom => self.potted_red_mushroom_to_properties_map(), - BlockKind::PottedBrownMushroom => self.potted_brown_mushroom_to_properties_map(), - BlockKind::PottedDeadBush => self.potted_dead_bush_to_properties_map(), - BlockKind::PottedCactus => self.potted_cactus_to_properties_map(), - BlockKind::Carrots => self.carrots_to_properties_map(), - BlockKind::Potatoes => self.potatoes_to_properties_map(), - BlockKind::OakButton => self.oak_button_to_properties_map(), - BlockKind::SpruceButton => self.spruce_button_to_properties_map(), - BlockKind::BirchButton => self.birch_button_to_properties_map(), - BlockKind::JungleButton => self.jungle_button_to_properties_map(), - BlockKind::AcaciaButton => self.acacia_button_to_properties_map(), - BlockKind::DarkOakButton => self.dark_oak_button_to_properties_map(), - BlockKind::SkeletonWallSkull => self.skeleton_wall_skull_to_properties_map(), - BlockKind::SkeletonSkull => self.skeleton_skull_to_properties_map(), - BlockKind::WitherSkeletonWallSkull => { - self.wither_skeleton_wall_skull_to_properties_map() + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } - BlockKind::WitherSkeletonSkull => self.wither_skeleton_skull_to_properties_map(), - BlockKind::ZombieWallHead => self.zombie_wall_head_to_properties_map(), - BlockKind::ZombieHead => self.zombie_head_to_properties_map(), - BlockKind::PlayerWallHead => self.player_wall_head_to_properties_map(), - BlockKind::PlayerHead => self.player_head_to_properties_map(), - BlockKind::CreeperWallHead => self.creeper_wall_head_to_properties_map(), - BlockKind::CreeperHead => self.creeper_head_to_properties_map(), - BlockKind::DragonWallHead => self.dragon_wall_head_to_properties_map(), - BlockKind::DragonHead => self.dragon_head_to_properties_map(), - BlockKind::Anvil => self.anvil_to_properties_map(), - BlockKind::ChippedAnvil => self.chipped_anvil_to_properties_map(), - BlockKind::DamagedAnvil => self.damaged_anvil_to_properties_map(), - BlockKind::TrappedChest => self.trapped_chest_to_properties_map(), - BlockKind::LightWeightedPressurePlate => { - self.light_weighted_pressure_plate_to_properties_map() + }); + map + } + fn jungle_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + map + } + fn dark_oak_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + map + } + fn oak_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + let hinge = self.hinge().unwrap(); + map.insert("hinge", { hinge.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + map + } + fn ladder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + map + } + fn rail_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let rail_shape = self.rail_shape().unwrap(); + map.insert("shape", { rail_shape.as_str() }); + map + } + fn cobblestone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } - BlockKind::HeavyWeightedPressurePlate => { - self.heavy_weighted_pressure_plate_to_properties_map() + }); + map + } + fn oak_wall_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } - BlockKind::Comparator => self.comparator_to_properties_map(), - BlockKind::DaylightDetector => self.daylight_detector_to_properties_map(), - BlockKind::RedstoneBlock => self.redstone_block_to_properties_map(), - BlockKind::NetherQuartzOre => self.nether_quartz_ore_to_properties_map(), - BlockKind::Hopper => self.hopper_to_properties_map(), - BlockKind::QuartzBlock => self.quartz_block_to_properties_map(), - BlockKind::ChiseledQuartzBlock => self.chiseled_quartz_block_to_properties_map(), - BlockKind::QuartzPillar => self.quartz_pillar_to_properties_map(), - BlockKind::QuartzStairs => self.quartz_stairs_to_properties_map(), - BlockKind::ActivatorRail => self.activator_rail_to_properties_map(), - BlockKind::Dropper => self.dropper_to_properties_map(), - BlockKind::WhiteTerracotta => self.white_terracotta_to_properties_map(), - BlockKind::OrangeTerracotta => self.orange_terracotta_to_properties_map(), - BlockKind::MagentaTerracotta => self.magenta_terracotta_to_properties_map(), - BlockKind::LightBlueTerracotta => self.light_blue_terracotta_to_properties_map(), - BlockKind::YellowTerracotta => self.yellow_terracotta_to_properties_map(), - BlockKind::LimeTerracotta => self.lime_terracotta_to_properties_map(), - BlockKind::PinkTerracotta => self.pink_terracotta_to_properties_map(), - BlockKind::GrayTerracotta => self.gray_terracotta_to_properties_map(), - BlockKind::LightGrayTerracotta => self.light_gray_terracotta_to_properties_map(), - BlockKind::CyanTerracotta => self.cyan_terracotta_to_properties_map(), - BlockKind::PurpleTerracotta => self.purple_terracotta_to_properties_map(), - BlockKind::BlueTerracotta => self.blue_terracotta_to_properties_map(), - BlockKind::BrownTerracotta => self.brown_terracotta_to_properties_map(), - BlockKind::GreenTerracotta => self.green_terracotta_to_properties_map(), - BlockKind::RedTerracotta => self.red_terracotta_to_properties_map(), - BlockKind::BlackTerracotta => self.black_terracotta_to_properties_map(), - BlockKind::WhiteStainedGlassPane => self.white_stained_glass_pane_to_properties_map(), - BlockKind::OrangeStainedGlassPane => self.orange_stained_glass_pane_to_properties_map(), - BlockKind::MagentaStainedGlassPane => { - self.magenta_stained_glass_pane_to_properties_map() + }); + map + } + fn spruce_wall_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } - BlockKind::LightBlueStainedGlassPane => { - self.light_blue_stained_glass_pane_to_properties_map() + }); + map + } + fn birch_wall_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } - BlockKind::YellowStainedGlassPane => self.yellow_stained_glass_pane_to_properties_map(), - BlockKind::LimeStainedGlassPane => self.lime_stained_glass_pane_to_properties_map(), - BlockKind::PinkStainedGlassPane => self.pink_stained_glass_pane_to_properties_map(), - BlockKind::GrayStainedGlassPane => self.gray_stained_glass_pane_to_properties_map(), - BlockKind::LightGrayStainedGlassPane => { - self.light_gray_stained_glass_pane_to_properties_map() + }); + map + } + fn acacia_wall_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } - BlockKind::CyanStainedGlassPane => self.cyan_stained_glass_pane_to_properties_map(), - BlockKind::PurpleStainedGlassPane => self.purple_stained_glass_pane_to_properties_map(), - BlockKind::BlueStainedGlassPane => self.blue_stained_glass_pane_to_properties_map(), - BlockKind::BrownStainedGlassPane => self.brown_stained_glass_pane_to_properties_map(), - BlockKind::GreenStainedGlassPane => self.green_stained_glass_pane_to_properties_map(), - BlockKind::RedStainedGlassPane => self.red_stained_glass_pane_to_properties_map(), - BlockKind::BlackStainedGlassPane => self.black_stained_glass_pane_to_properties_map(), - BlockKind::AcaciaStairs => self.acacia_stairs_to_properties_map(), - BlockKind::DarkOakStairs => self.dark_oak_stairs_to_properties_map(), - BlockKind::SlimeBlock => self.slime_block_to_properties_map(), - BlockKind::Barrier => self.barrier_to_properties_map(), - BlockKind::IronTrapdoor => self.iron_trapdoor_to_properties_map(), - BlockKind::Prismarine => self.prismarine_to_properties_map(), - BlockKind::PrismarineBricks => self.prismarine_bricks_to_properties_map(), - BlockKind::DarkPrismarine => self.dark_prismarine_to_properties_map(), - BlockKind::PrismarineStairs => self.prismarine_stairs_to_properties_map(), - BlockKind::PrismarineBrickStairs => self.prismarine_brick_stairs_to_properties_map(), - BlockKind::DarkPrismarineStairs => self.dark_prismarine_stairs_to_properties_map(), - BlockKind::PrismarineSlab => self.prismarine_slab_to_properties_map(), - BlockKind::PrismarineBrickSlab => self.prismarine_brick_slab_to_properties_map(), - BlockKind::DarkPrismarineSlab => self.dark_prismarine_slab_to_properties_map(), - BlockKind::SeaLantern => self.sea_lantern_to_properties_map(), - BlockKind::HayBlock => self.hay_block_to_properties_map(), - BlockKind::WhiteCarpet => self.white_carpet_to_properties_map(), - BlockKind::OrangeCarpet => self.orange_carpet_to_properties_map(), - BlockKind::MagentaCarpet => self.magenta_carpet_to_properties_map(), - BlockKind::LightBlueCarpet => self.light_blue_carpet_to_properties_map(), - BlockKind::YellowCarpet => self.yellow_carpet_to_properties_map(), - BlockKind::LimeCarpet => self.lime_carpet_to_properties_map(), - BlockKind::PinkCarpet => self.pink_carpet_to_properties_map(), - BlockKind::GrayCarpet => self.gray_carpet_to_properties_map(), - BlockKind::LightGrayCarpet => self.light_gray_carpet_to_properties_map(), - BlockKind::CyanCarpet => self.cyan_carpet_to_properties_map(), - BlockKind::PurpleCarpet => self.purple_carpet_to_properties_map(), - BlockKind::BlueCarpet => self.blue_carpet_to_properties_map(), - BlockKind::BrownCarpet => self.brown_carpet_to_properties_map(), - BlockKind::GreenCarpet => self.green_carpet_to_properties_map(), - BlockKind::RedCarpet => self.red_carpet_to_properties_map(), - BlockKind::BlackCarpet => self.black_carpet_to_properties_map(), - BlockKind::Terracotta => self.terracotta_to_properties_map(), - BlockKind::CoalBlock => self.coal_block_to_properties_map(), - BlockKind::PackedIce => self.packed_ice_to_properties_map(), - BlockKind::Sunflower => self.sunflower_to_properties_map(), - BlockKind::Lilac => self.lilac_to_properties_map(), - BlockKind::RoseBush => self.rose_bush_to_properties_map(), - BlockKind::Peony => self.peony_to_properties_map(), - BlockKind::TallGrass => self.tall_grass_to_properties_map(), - BlockKind::LargeFern => self.large_fern_to_properties_map(), - BlockKind::WhiteBanner => self.white_banner_to_properties_map(), - BlockKind::OrangeBanner => self.orange_banner_to_properties_map(), - BlockKind::MagentaBanner => self.magenta_banner_to_properties_map(), - BlockKind::LightBlueBanner => self.light_blue_banner_to_properties_map(), - BlockKind::YellowBanner => self.yellow_banner_to_properties_map(), - BlockKind::LimeBanner => self.lime_banner_to_properties_map(), - BlockKind::PinkBanner => self.pink_banner_to_properties_map(), - BlockKind::GrayBanner => self.gray_banner_to_properties_map(), - BlockKind::LightGrayBanner => self.light_gray_banner_to_properties_map(), - BlockKind::CyanBanner => self.cyan_banner_to_properties_map(), - BlockKind::PurpleBanner => self.purple_banner_to_properties_map(), - BlockKind::BlueBanner => self.blue_banner_to_properties_map(), - BlockKind::BrownBanner => self.brown_banner_to_properties_map(), - BlockKind::GreenBanner => self.green_banner_to_properties_map(), - BlockKind::RedBanner => self.red_banner_to_properties_map(), - BlockKind::BlackBanner => self.black_banner_to_properties_map(), - BlockKind::WhiteWallBanner => self.white_wall_banner_to_properties_map(), - BlockKind::OrangeWallBanner => self.orange_wall_banner_to_properties_map(), - BlockKind::MagentaWallBanner => self.magenta_wall_banner_to_properties_map(), - BlockKind::LightBlueWallBanner => self.light_blue_wall_banner_to_properties_map(), - BlockKind::YellowWallBanner => self.yellow_wall_banner_to_properties_map(), - BlockKind::LimeWallBanner => self.lime_wall_banner_to_properties_map(), - BlockKind::PinkWallBanner => self.pink_wall_banner_to_properties_map(), - BlockKind::GrayWallBanner => self.gray_wall_banner_to_properties_map(), - BlockKind::LightGrayWallBanner => self.light_gray_wall_banner_to_properties_map(), - BlockKind::CyanWallBanner => self.cyan_wall_banner_to_properties_map(), - BlockKind::PurpleWallBanner => self.purple_wall_banner_to_properties_map(), - BlockKind::BlueWallBanner => self.blue_wall_banner_to_properties_map(), - BlockKind::BrownWallBanner => self.brown_wall_banner_to_properties_map(), - BlockKind::GreenWallBanner => self.green_wall_banner_to_properties_map(), - BlockKind::RedWallBanner => self.red_wall_banner_to_properties_map(), - BlockKind::BlackWallBanner => self.black_wall_banner_to_properties_map(), - BlockKind::RedSandstone => self.red_sandstone_to_properties_map(), - BlockKind::ChiseledRedSandstone => self.chiseled_red_sandstone_to_properties_map(), - BlockKind::CutRedSandstone => self.cut_red_sandstone_to_properties_map(), - BlockKind::RedSandstoneStairs => self.red_sandstone_stairs_to_properties_map(), - BlockKind::OakSlab => self.oak_slab_to_properties_map(), - BlockKind::SpruceSlab => self.spruce_slab_to_properties_map(), - BlockKind::BirchSlab => self.birch_slab_to_properties_map(), - BlockKind::JungleSlab => self.jungle_slab_to_properties_map(), - BlockKind::AcaciaSlab => self.acacia_slab_to_properties_map(), - BlockKind::DarkOakSlab => self.dark_oak_slab_to_properties_map(), - BlockKind::StoneSlab => self.stone_slab_to_properties_map(), - BlockKind::SandstoneSlab => self.sandstone_slab_to_properties_map(), - BlockKind::PetrifiedOakSlab => self.petrified_oak_slab_to_properties_map(), - BlockKind::CobblestoneSlab => self.cobblestone_slab_to_properties_map(), - BlockKind::BrickSlab => self.brick_slab_to_properties_map(), - BlockKind::StoneBrickSlab => self.stone_brick_slab_to_properties_map(), - BlockKind::NetherBrickSlab => self.nether_brick_slab_to_properties_map(), - BlockKind::QuartzSlab => self.quartz_slab_to_properties_map(), - BlockKind::RedSandstoneSlab => self.red_sandstone_slab_to_properties_map(), - BlockKind::PurpurSlab => self.purpur_slab_to_properties_map(), - BlockKind::SmoothStone => self.smooth_stone_to_properties_map(), - BlockKind::SmoothSandstone => self.smooth_sandstone_to_properties_map(), - BlockKind::SmoothQuartz => self.smooth_quartz_to_properties_map(), - BlockKind::SmoothRedSandstone => self.smooth_red_sandstone_to_properties_map(), - BlockKind::SpruceFenceGate => self.spruce_fence_gate_to_properties_map(), - BlockKind::BirchFenceGate => self.birch_fence_gate_to_properties_map(), - BlockKind::JungleFenceGate => self.jungle_fence_gate_to_properties_map(), - BlockKind::AcaciaFenceGate => self.acacia_fence_gate_to_properties_map(), - BlockKind::DarkOakFenceGate => self.dark_oak_fence_gate_to_properties_map(), - BlockKind::SpruceFence => self.spruce_fence_to_properties_map(), - BlockKind::BirchFence => self.birch_fence_to_properties_map(), - BlockKind::JungleFence => self.jungle_fence_to_properties_map(), - BlockKind::AcaciaFence => self.acacia_fence_to_properties_map(), - BlockKind::DarkOakFence => self.dark_oak_fence_to_properties_map(), - BlockKind::SpruceDoor => self.spruce_door_to_properties_map(), - BlockKind::BirchDoor => self.birch_door_to_properties_map(), - BlockKind::JungleDoor => self.jungle_door_to_properties_map(), - BlockKind::AcaciaDoor => self.acacia_door_to_properties_map(), - BlockKind::DarkOakDoor => self.dark_oak_door_to_properties_map(), - BlockKind::EndRod => self.end_rod_to_properties_map(), - BlockKind::ChorusPlant => self.chorus_plant_to_properties_map(), - BlockKind::ChorusFlower => self.chorus_flower_to_properties_map(), - BlockKind::PurpurBlock => self.purpur_block_to_properties_map(), - BlockKind::PurpurPillar => self.purpur_pillar_to_properties_map(), - BlockKind::PurpurStairs => self.purpur_stairs_to_properties_map(), - BlockKind::EndStoneBricks => self.end_stone_bricks_to_properties_map(), - BlockKind::Beetroots => self.beetroots_to_properties_map(), - BlockKind::GrassPath => self.grass_path_to_properties_map(), - BlockKind::EndGateway => self.end_gateway_to_properties_map(), - BlockKind::RepeatingCommandBlock => self.repeating_command_block_to_properties_map(), - BlockKind::ChainCommandBlock => self.chain_command_block_to_properties_map(), - BlockKind::FrostedIce => self.frosted_ice_to_properties_map(), - BlockKind::MagmaBlock => self.magma_block_to_properties_map(), - BlockKind::NetherWartBlock => self.nether_wart_block_to_properties_map(), - BlockKind::RedNetherBricks => self.red_nether_bricks_to_properties_map(), - BlockKind::BoneBlock => self.bone_block_to_properties_map(), - BlockKind::StructureVoid => self.structure_void_to_properties_map(), - BlockKind::Observer => self.observer_to_properties_map(), - BlockKind::ShulkerBox => self.shulker_box_to_properties_map(), - BlockKind::WhiteShulkerBox => self.white_shulker_box_to_properties_map(), - BlockKind::OrangeShulkerBox => self.orange_shulker_box_to_properties_map(), - BlockKind::MagentaShulkerBox => self.magenta_shulker_box_to_properties_map(), - BlockKind::LightBlueShulkerBox => self.light_blue_shulker_box_to_properties_map(), - BlockKind::YellowShulkerBox => self.yellow_shulker_box_to_properties_map(), - BlockKind::LimeShulkerBox => self.lime_shulker_box_to_properties_map(), - BlockKind::PinkShulkerBox => self.pink_shulker_box_to_properties_map(), - BlockKind::GrayShulkerBox => self.gray_shulker_box_to_properties_map(), - BlockKind::LightGrayShulkerBox => self.light_gray_shulker_box_to_properties_map(), - BlockKind::CyanShulkerBox => self.cyan_shulker_box_to_properties_map(), - BlockKind::PurpleShulkerBox => self.purple_shulker_box_to_properties_map(), - BlockKind::BlueShulkerBox => self.blue_shulker_box_to_properties_map(), - BlockKind::BrownShulkerBox => self.brown_shulker_box_to_properties_map(), - BlockKind::GreenShulkerBox => self.green_shulker_box_to_properties_map(), - BlockKind::RedShulkerBox => self.red_shulker_box_to_properties_map(), - BlockKind::BlackShulkerBox => self.black_shulker_box_to_properties_map(), - BlockKind::WhiteGlazedTerracotta => self.white_glazed_terracotta_to_properties_map(), - BlockKind::OrangeGlazedTerracotta => self.orange_glazed_terracotta_to_properties_map(), - BlockKind::MagentaGlazedTerracotta => { - self.magenta_glazed_terracotta_to_properties_map() + }); + map + } + fn jungle_wall_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } - BlockKind::LightBlueGlazedTerracotta => { - self.light_blue_glazed_terracotta_to_properties_map() + }); + map + } + fn dark_oak_wall_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } - BlockKind::YellowGlazedTerracotta => self.yellow_glazed_terracotta_to_properties_map(), - BlockKind::LimeGlazedTerracotta => self.lime_glazed_terracotta_to_properties_map(), - BlockKind::PinkGlazedTerracotta => self.pink_glazed_terracotta_to_properties_map(), - BlockKind::GrayGlazedTerracotta => self.gray_glazed_terracotta_to_properties_map(), - BlockKind::LightGrayGlazedTerracotta => { - self.light_gray_glazed_terracotta_to_properties_map() + }); + map + } + fn lever_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", } - BlockKind::CyanGlazedTerracotta => self.cyan_glazed_terracotta_to_properties_map(), - BlockKind::PurpleGlazedTerracotta => self.purple_glazed_terracotta_to_properties_map(), - BlockKind::BlueGlazedTerracotta => self.blue_glazed_terracotta_to_properties_map(), - BlockKind::BrownGlazedTerracotta => self.brown_glazed_terracotta_to_properties_map(), - BlockKind::GreenGlazedTerracotta => self.green_glazed_terracotta_to_properties_map(), - BlockKind::RedGlazedTerracotta => self.red_glazed_terracotta_to_properties_map(), - BlockKind::BlackGlazedTerracotta => self.black_glazed_terracotta_to_properties_map(), - BlockKind::WhiteConcrete => self.white_concrete_to_properties_map(), - BlockKind::OrangeConcrete => self.orange_concrete_to_properties_map(), - BlockKind::MagentaConcrete => self.magenta_concrete_to_properties_map(), - BlockKind::LightBlueConcrete => self.light_blue_concrete_to_properties_map(), - BlockKind::YellowConcrete => self.yellow_concrete_to_properties_map(), - BlockKind::LimeConcrete => self.lime_concrete_to_properties_map(), - BlockKind::PinkConcrete => self.pink_concrete_to_properties_map(), - BlockKind::GrayConcrete => self.gray_concrete_to_properties_map(), - BlockKind::LightGrayConcrete => self.light_gray_concrete_to_properties_map(), - BlockKind::CyanConcrete => self.cyan_concrete_to_properties_map(), - BlockKind::PurpleConcrete => self.purple_concrete_to_properties_map(), - BlockKind::BlueConcrete => self.blue_concrete_to_properties_map(), - BlockKind::BrownConcrete => self.brown_concrete_to_properties_map(), - BlockKind::GreenConcrete => self.green_concrete_to_properties_map(), - BlockKind::RedConcrete => self.red_concrete_to_properties_map(), - BlockKind::BlackConcrete => self.black_concrete_to_properties_map(), - BlockKind::WhiteConcretePowder => self.white_concrete_powder_to_properties_map(), - BlockKind::OrangeConcretePowder => self.orange_concrete_powder_to_properties_map(), - BlockKind::MagentaConcretePowder => self.magenta_concrete_powder_to_properties_map(), - BlockKind::LightBlueConcretePowder => { - self.light_blue_concrete_powder_to_properties_map() + }); + map + } + fn stone_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", } - BlockKind::YellowConcretePowder => self.yellow_concrete_powder_to_properties_map(), - BlockKind::LimeConcretePowder => self.lime_concrete_powder_to_properties_map(), - BlockKind::PinkConcretePowder => self.pink_concrete_powder_to_properties_map(), - BlockKind::GrayConcretePowder => self.gray_concrete_powder_to_properties_map(), - BlockKind::LightGrayConcretePowder => { - self.light_gray_concrete_powder_to_properties_map() + }); + map + } + fn iron_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + let hinge = self.hinge().unwrap(); + map.insert("hinge", { hinge.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", } - BlockKind::CyanConcretePowder => self.cyan_concrete_powder_to_properties_map(), - BlockKind::PurpleConcretePowder => self.purple_concrete_powder_to_properties_map(), - BlockKind::BlueConcretePowder => self.blue_concrete_powder_to_properties_map(), - BlockKind::BrownConcretePowder => self.brown_concrete_powder_to_properties_map(), - BlockKind::GreenConcretePowder => self.green_concrete_powder_to_properties_map(), - BlockKind::RedConcretePowder => self.red_concrete_powder_to_properties_map(), - BlockKind::BlackConcretePowder => self.black_concrete_powder_to_properties_map(), - BlockKind::Kelp => self.kelp_to_properties_map(), - BlockKind::KelpPlant => self.kelp_plant_to_properties_map(), - BlockKind::DriedKelpBlock => self.dried_kelp_block_to_properties_map(), - BlockKind::TurtleEgg => self.turtle_egg_to_properties_map(), - BlockKind::DeadTubeCoralBlock => self.dead_tube_coral_block_to_properties_map(), - BlockKind::DeadBrainCoralBlock => self.dead_brain_coral_block_to_properties_map(), - BlockKind::DeadBubbleCoralBlock => self.dead_bubble_coral_block_to_properties_map(), - BlockKind::DeadFireCoralBlock => self.dead_fire_coral_block_to_properties_map(), - BlockKind::DeadHornCoralBlock => self.dead_horn_coral_block_to_properties_map(), - BlockKind::TubeCoralBlock => self.tube_coral_block_to_properties_map(), - BlockKind::BrainCoralBlock => self.brain_coral_block_to_properties_map(), - BlockKind::BubbleCoralBlock => self.bubble_coral_block_to_properties_map(), - BlockKind::FireCoralBlock => self.fire_coral_block_to_properties_map(), - BlockKind::HornCoralBlock => self.horn_coral_block_to_properties_map(), - BlockKind::DeadTubeCoral => self.dead_tube_coral_to_properties_map(), - BlockKind::DeadBrainCoral => self.dead_brain_coral_to_properties_map(), - BlockKind::DeadBubbleCoral => self.dead_bubble_coral_to_properties_map(), - BlockKind::DeadFireCoral => self.dead_fire_coral_to_properties_map(), - BlockKind::DeadHornCoral => self.dead_horn_coral_to_properties_map(), - BlockKind::TubeCoral => self.tube_coral_to_properties_map(), - BlockKind::BrainCoral => self.brain_coral_to_properties_map(), - BlockKind::BubbleCoral => self.bubble_coral_to_properties_map(), - BlockKind::FireCoral => self.fire_coral_to_properties_map(), - BlockKind::HornCoral => self.horn_coral_to_properties_map(), - BlockKind::DeadTubeCoralWallFan => self.dead_tube_coral_wall_fan_to_properties_map(), - BlockKind::DeadBrainCoralWallFan => self.dead_brain_coral_wall_fan_to_properties_map(), - BlockKind::DeadBubbleCoralWallFan => { - self.dead_bubble_coral_wall_fan_to_properties_map() + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", } - BlockKind::DeadFireCoralWallFan => self.dead_fire_coral_wall_fan_to_properties_map(), - BlockKind::DeadHornCoralWallFan => self.dead_horn_coral_wall_fan_to_properties_map(), - BlockKind::TubeCoralWallFan => self.tube_coral_wall_fan_to_properties_map(), - BlockKind::BrainCoralWallFan => self.brain_coral_wall_fan_to_properties_map(), - BlockKind::BubbleCoralWallFan => self.bubble_coral_wall_fan_to_properties_map(), - BlockKind::FireCoralWallFan => self.fire_coral_wall_fan_to_properties_map(), - BlockKind::HornCoralWallFan => self.horn_coral_wall_fan_to_properties_map(), - BlockKind::DeadTubeCoralFan => self.dead_tube_coral_fan_to_properties_map(), - BlockKind::DeadBrainCoralFan => self.dead_brain_coral_fan_to_properties_map(), - BlockKind::DeadBubbleCoralFan => self.dead_bubble_coral_fan_to_properties_map(), - BlockKind::DeadFireCoralFan => self.dead_fire_coral_fan_to_properties_map(), - BlockKind::DeadHornCoralFan => self.dead_horn_coral_fan_to_properties_map(), - BlockKind::TubeCoralFan => self.tube_coral_fan_to_properties_map(), - BlockKind::BrainCoralFan => self.brain_coral_fan_to_properties_map(), - BlockKind::BubbleCoralFan => self.bubble_coral_fan_to_properties_map(), - BlockKind::FireCoralFan => self.fire_coral_fan_to_properties_map(), - BlockKind::HornCoralFan => self.horn_coral_fan_to_properties_map(), - BlockKind::SeaPickle => self.sea_pickle_to_properties_map(), - BlockKind::BlueIce => self.blue_ice_to_properties_map(), - BlockKind::Conduit => self.conduit_to_properties_map(), - BlockKind::VoidAir => self.void_air_to_properties_map(), - BlockKind::CaveAir => self.cave_air_to_properties_map(), - BlockKind::BubbleColumn => self.bubble_column_to_properties_map(), - BlockKind::StructureBlock => self.structure_block_to_properties_map(), - } + }); + map } - fn air_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn oak_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn stone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn spruce_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn granite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn birch_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + map + } + fn jungle_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn polished_granite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn acacia_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + map + } + fn dark_oak_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + map + } + fn redstone_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let lit = self.lit().unwrap(); + map.insert("lit", { + match lit { + true => "true", + false => "false", + } + }); + map + } + fn redstone_torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let lit = self.lit().unwrap(); + map.insert("lit", { + match lit { + true => "true", + false => "false", + } + }); + map + } + fn redstone_wall_torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let lit = self.lit().unwrap(); + map.insert("lit", { + match lit { + true => "true", + false => "false", + } + }); map } - fn diorite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stone_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn polished_diorite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn snow_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let layers = self.layers().unwrap(); + map.insert("layers", { + match layers { + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + _ => "unknown", + } + }); map } - fn andesite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn ice_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn polished_andesite_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn snow_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn grass_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cactus_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let snowy = self.snowy().unwrap(); - map.insert("snowy", { - match snowy { - true => "true", - false => "false", + let age_0_15 = self.age_0_15().unwrap(); + map.insert("age", { + match age_0_15 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } }); map } - fn dirt_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn clay_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn coarse_dirt_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn sugar_cane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let age_0_15 = self.age_0_15().unwrap(); + map.insert("age", { + match age_0_15 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); map } - fn podzol_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn jukebox_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let snowy = self.snowy().unwrap(); - map.insert("snowy", { - match snowy { + let has_record = self.has_record().unwrap(); + map.insert("has_record", { + match has_record { true => "true", false => "false", } }); map } - fn cobblestone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn oak_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn oak_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { + true => "true", + false => "false", + } + }); map } - fn spruce_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pumpkin_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn birch_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn netherrack_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn jungle_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn soul_sand_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn acacia_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn soul_soil_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn dark_oak_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn basalt_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn oak_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_basalt_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let stage = self.stage().unwrap(); - map.insert("stage", { - match stage { - 0i32 => "0", - 1i32 => "1", - _ => "unknown", - } - }); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn spruce_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn soul_torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let stage = self.stage().unwrap(); - map.insert("stage", { - match stage { - 0i32 => "0", - 1i32 => "1", - _ => "unknown", - } - }); map } - fn birch_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn soul_wall_torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let stage = self.stage().unwrap(); - map.insert("stage", { - match stage { - 0i32 => "0", - 1i32 => "1", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn jungle_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn glowstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let stage = self.stage().unwrap(); - map.insert("stage", { - match stage { - 0i32 => "0", - 1i32 => "1", - _ => "unknown", - } - }); map } - fn acacia_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn nether_portal_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let stage = self.stage().unwrap(); - map.insert("stage", { - match stage { - 0i32 => "0", - 1i32 => "1", - _ => "unknown", - } - }); + let axis_xz = self.axis_xz().unwrap(); + map.insert("axis", { axis_xz.as_str() }); map } - fn dark_oak_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn carved_pumpkin_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let stage = self.stage().unwrap(); - map.insert("stage", { - match stage { - 0i32 => "0", - 1i32 => "1", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn bedrock_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn jack_o_lantern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn water_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cake_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let water_level = self.water_level().unwrap(); - map.insert("level", { - match water_level { + let bites = self.bites().unwrap(); + map.insert("bites", { + match bites { 0i32 => "0", 1i32 => "1", 2i32 => "2", @@ -8126,702 +12259,661 @@ impl BlockId { 4i32 => "4", 5i32 => "5", 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", _ => "unknown", } }); map } - fn lava_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn repeater_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let water_level = self.water_level().unwrap(); - map.insert("level", { - match water_level { - 0i32 => "0", + let delay = self.delay().unwrap(); + map.insert("delay", { + match delay { 1i32 => "1", 2i32 => "2", 3i32 => "3", 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", _ => "unknown", } }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let locked = self.locked().unwrap(); + map.insert("locked", { + match locked { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn sand_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn white_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn red_sand_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn orange_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn gravel_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magenta_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn gold_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_blue_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn iron_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn yellow_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn coal_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lime_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn oak_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn spruce_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn birch_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn jungle_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn acacia_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purple_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn dark_oak_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blue_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_spruce_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brown_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_birch_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn green_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_jungle_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_acacia_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn black_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_dark_oak_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn oak_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn stripped_oak_log_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn spruce_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn oak_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn birch_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn spruce_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn jungle_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn birch_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn acacia_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn jungle_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dark_oak_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn acacia_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn dark_oak_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn mossy_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn cracked_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn chiseled_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_oak_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn infested_stone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_spruce_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn infested_cobblestone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_birch_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn infested_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_jungle_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn infested_mossy_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_acacia_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn infested_cracked_stone_bricks_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn stripped_dark_oak_wood_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn infested_chiseled_stone_bricks_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn oak_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brown_mushroom_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let distance = self.distance().unwrap(); - map.insert("distance", { - match distance { - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - _ => "unknown", + let down = self.down().unwrap(); + map.insert("down", { + match down { + true => "true", + false => "false", } }); - let persistent = self.persistent().unwrap(); - map.insert("persistent", { - match persistent { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { true => "true", false => "false", } }); - map - } - fn spruce_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let distance = self.distance().unwrap(); - map.insert("distance", { - match distance { - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - _ => "unknown", + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", } }); - let persistent = self.persistent().unwrap(); - map.insert("persistent", { - match persistent { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - map - } - fn birch_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let distance = self.distance().unwrap(); - map.insert("distance", { - match distance { - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - _ => "unknown", + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", } }); - let persistent = self.persistent().unwrap(); - map.insert("persistent", { - match persistent { + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); map } - fn jungle_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_mushroom_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let distance = self.distance().unwrap(); - map.insert("distance", { - match distance { - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - _ => "unknown", + let down = self.down().unwrap(); + map.insert("down", { + match down { + true => "true", + false => "false", } }); - let persistent = self.persistent().unwrap(); - map.insert("persistent", { - match persistent { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { true => "true", false => "false", } }); - map - } - fn acacia_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let distance = self.distance().unwrap(); - map.insert("distance", { - match distance { - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - _ => "unknown", + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", } }); - let persistent = self.persistent().unwrap(); - map.insert("persistent", { - match persistent { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - map - } - fn dark_oak_leaves_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let distance = self.distance().unwrap(); - map.insert("distance", { - match distance { - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - _ => "unknown", + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", } }); - let persistent = self.persistent().unwrap(); - map.insert("persistent", { - match persistent { + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); map } - fn sponge_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn wet_sponge_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn lapis_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn lapis_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn dispenser_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn mushroom_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); - let triggered = self.triggered().unwrap(); - map.insert("triggered", { - match triggered { + let down = self.down().unwrap(); + map.insert("down", { + match down { true => "true", false => "false", } }); - map - } - fn sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn chiseled_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn cut_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn note_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let instrument = self.instrument().unwrap(); - map.insert("instrument", { instrument.as_str() }); - let note = self.note().unwrap(); - map.insert("note", { - match note { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - 16i32 => "16", - 17i32 => "17", - 18i32 => "18", - 19i32 => "19", - 20i32 => "20", - 21i32 => "21", - 22i32 => "22", - 23i32 => "23", - 24i32 => "24", - _ => "unknown", + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", } }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - map - } - fn white_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let up = self.up().unwrap(); + map.insert("up", { + match up { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); - map - } - fn orange_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); map } - fn magenta_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn iron_bars_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); - map - } - fn light_blue_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); - map - } - fn yellow_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); - map - } - fn lime_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); - map - } - fn pink_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); map } - fn gray_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn chain_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); map } - fn light_gray_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); - map - } - fn cyan_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); map } - fn purple_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn melon_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn attached_pumpkin_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { - true => "true", - false => "false", - } - }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); map } - fn blue_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn attached_melon_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { - true => "true", - false => "false", + map + } + fn pumpkin_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let age_0_7 = self.age_0_7().unwrap(); + map.insert("age", { + match age_0_7 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); map } - fn brown_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn melon_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { - true => "true", - false => "false", + let age_0_7 = self.age_0_7().unwrap(); + map.insert("age", { + match age_0_7 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); map } - fn green_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn vine_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); + let up = self.up().unwrap(); + map.insert("up", { + match up { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); - map - } - fn red_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); map } - fn black_bed_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn oak_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let occupied = self.occupied().unwrap(); - map.insert("occupied", { - match occupied { + let in_wall = self.in_wall().unwrap(); + map.insert("in_wall", { + match in_wall { true => "true", false => "false", } }); - let part = self.part().unwrap(); - map.insert("part", { part.as_str() }); - map - } - fn powered_rail_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let open = self.open().unwrap(); + map.insert("open", { + match open { true => "true", false => "false", } }); - let powered_rail_shape = self.powered_rail_shape().unwrap(); - map.insert("shape", { powered_rail_shape.as_str() }); - map - } - fn detector_rail_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); let powered = self.powered().unwrap(); map.insert("powered", { match powered { @@ -8829,266 +12921,63 @@ impl BlockId { false => "false", } }); - let powered_rail_shape = self.powered_rail_shape().unwrap(); - map.insert("shape", { powered_rail_shape.as_str() }); - map - } - fn sticky_piston_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let extended = self.extended().unwrap(); - map.insert("extended", { - match extended { - true => "true", - false => "false", - } - }); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); - map - } - fn cobweb_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn grass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn fern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn dead_bush_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn seagrass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn tall_seagrass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); map } - fn piston_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let extended = self.extended().unwrap(); - map.insert("extended", { - match extended { + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); map } - fn piston_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stone_brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); - let piston_kind = self.piston_kind().unwrap(); - map.insert("type", { piston_kind.as_str() }); - let short = self.short().unwrap(); - map.insert("short", { - match short { + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn white_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn orange_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn magenta_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn light_blue_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn yellow_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn lime_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn pink_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn gray_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn light_gray_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn cyan_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn purple_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn blue_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn brown_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn green_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn red_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn black_wool_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn moving_piston_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); - let piston_kind = self.piston_kind().unwrap(); - map.insert("type", { piston_kind.as_str() }); - map - } - fn dandelion_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn poppy_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn blue_orchid_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn allium_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn azure_bluet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn red_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn orange_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn white_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn pink_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn oxeye_daisy_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn brown_mushroom_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn red_mushroom_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn gold_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn iron_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn tnt_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let unstable = self.unstable().unwrap(); - map.insert("unstable", { - match unstable { + fn mycelium_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let snowy = self.snowy().unwrap(); + map.insert("snowy", { + match snowy { true => "true", false => "false", } }); map } - fn bookshelf_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn mossy_cobblestone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn obsidian_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lily_pad_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn wall_torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn nether_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn fire_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn nether_brick_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_15 = self.age_0_15().unwrap(); - map.insert("age", { - match age_0_15 { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); let east_connected = self.east_connected().unwrap(); map.insert("east", { match east_connected { @@ -9110,9 +12999,9 @@ impl BlockId { false => "false", } }); - let up = self.up().unwrap(); - map.insert("up", { - match up { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } @@ -9126,11 +13015,7 @@ impl BlockId { }); map } - fn spawner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn oak_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn nether_brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); @@ -9147,160 +13032,194 @@ impl BlockId { }); map } - fn chest_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn nether_wart_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let chest_kind = self.chest_kind().unwrap(); - map.insert("type", { chest_kind.as_str() }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let age_0_3 = self.age_0_3().unwrap(); + map.insert("age", { + match age_0_3 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + _ => "unknown", + } + }); + map + } + fn enchanting_table_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn brewing_stand_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let has_bottle_0 = self.has_bottle_0().unwrap(); + map.insert("has_bottle_0", { + match has_bottle_0 { + true => "true", + false => "false", + } + }); + let has_bottle_1 = self.has_bottle_1().unwrap(); + map.insert("has_bottle_1", { + match has_bottle_1 { + true => "true", + false => "false", + } + }); + let has_bottle_2 = self.has_bottle_2().unwrap(); + map.insert("has_bottle_2", { + match has_bottle_2 { true => "true", false => "false", } }); map } - fn redstone_wire_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cauldron_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_wire = self.east_wire().unwrap(); - map.insert("east", { east_wire.as_str() }); - let north_wire = self.north_wire().unwrap(); - map.insert("north", { north_wire.as_str() }); - let power = self.power().unwrap(); - map.insert("power", { - match power { + let cauldron_level = self.cauldron_level().unwrap(); + map.insert("level", { + match cauldron_level { 0i32 => "0", 1i32 => "1", 2i32 => "2", 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", _ => "unknown", } }); - let south_wire = self.south_wire().unwrap(); - map.insert("south", { south_wire.as_str() }); - let west_wire = self.west_wire().unwrap(); - map.insert("west", { west_wire.as_str() }); map } - fn diamond_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn end_portal_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn diamond_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn end_portal_frame_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let eye = self.eye().unwrap(); + map.insert("eye", { + match eye { + true => "true", + false => "false", + } + }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn crafting_table_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn end_stone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn wheat_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dragon_egg_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_7 = self.age_0_7().unwrap(); + map + } + fn redstone_lamp_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let lit = self.lit().unwrap(); + map.insert("lit", { + match lit { + true => "true", + false => "false", + } + }); + map + } + fn cocoa_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let age_0_2 = self.age_0_2().unwrap(); map.insert("age", { - match age_0_7 { + match age_0_2 { 0i32 => "0", 1i32 => "1", 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", _ => "unknown", } }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn farmland_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn sandstone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let moisture = self.moisture().unwrap(); - map.insert("moisture", { - match moisture { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - _ => "unknown", + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } }); map } - fn furnace_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn emerald_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn ender_chest_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let lit = self.lit().unwrap(); - map.insert("lit", { - match lit { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn tripwire_hook_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", + let attached = self.attached().unwrap(); + map.insert("attached", { + match attached { + true => "true", + false => "false", + } + }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); + map + } + fn tripwire_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let attached = self.attached().unwrap(); + map.insert("attached", { + match attached { + true => "true", + false => "false", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let disarmed = self.disarmed().unwrap(); + map.insert("disarmed", { + match disarmed { true => "true", false => "false", } }); - map - } - fn oak_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); - let hinge = self.hinge().unwrap(); - map.insert("hinge", { hinge.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { true => "true", false => "false", } @@ -9312,28 +13231,27 @@ impl BlockId { false => "false", } }); - map - } - fn ladder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); map } - fn rail_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn emerald_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rail_shape = self.rail_shape().unwrap(); - map.insert("shape", { rail_shape.as_str() }); map } - fn cobblestone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn spruce_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); @@ -9350,10 +13268,14 @@ impl BlockId { }); map } - fn wall_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn birch_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -9363,91 +13285,234 @@ impl BlockId { }); map } - fn lever_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn jungle_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let face = self.face().unwrap(); - map.insert("face", { face.as_str() }); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn stone_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn command_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let conditional = self.conditional().unwrap(); + map.insert("conditional", { + match conditional { true => "true", false => "false", } }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn iron_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn beacon_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); - let hinge = self.hinge().unwrap(); - map.insert("hinge", { hinge.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { + map + } + fn cobblestone_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { true => "true", false => "false", } }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn oak_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn mossy_cobblestone_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn spruce_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn flower_pot_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", + map + } + fn potted_oak_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_spruce_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_birch_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_jungle_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_acacia_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_dark_oak_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_fern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_dandelion_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_poppy_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_blue_orchid_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_allium_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_azure_bluet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_red_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_orange_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_white_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_pink_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_oxeye_daisy_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_cornflower_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_lily_of_the_valley_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_wither_rose_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_red_mushroom_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_brown_mushroom_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_dead_bush_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_cactus_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn carrots_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let age_0_7 = self.age_0_7().unwrap(); + map.insert("age", { + match age_0_7 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", } }); map } - fn birch_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn potatoes_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", + let age_0_7 = self.age_0_7().unwrap(); + map.insert("age", { + match age_0_7 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", } }); map } - fn jungle_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn oak_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); let powered = self.powered().unwrap(); map.insert("powered", { match powered { @@ -9457,8 +13522,12 @@ impl BlockId { }); map } - fn acacia_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn spruce_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); let powered = self.powered().unwrap(); map.insert("powered", { match powered { @@ -9468,8 +13537,12 @@ impl BlockId { }); map } - fn dark_oak_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn birch_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); let powered = self.powered().unwrap(); map.insert("powered", { match powered { @@ -9479,42 +13552,37 @@ impl BlockId { }); map } - fn redstone_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let lit = self.lit().unwrap(); - map.insert("lit", { - match lit { - true => "true", - false => "false", - } - }); - map - } - fn redstone_torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn jungle_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let lit = self.lit().unwrap(); - map.insert("lit", { - match lit { + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn redstone_wall_torch_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn acacia_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let lit = self.lit().unwrap(); - map.insert("lit", { - match lit { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn stone_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dark_oak_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let face = self.face().unwrap(); map.insert("face", { face.as_str() }); @@ -9529,37 +13597,11 @@ impl BlockId { }); map } - fn snow_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let layers = self.layers().unwrap(); - map.insert("layers", { - match layers { - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - _ => "unknown", - } - }); - map - } - fn ice_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn snow_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn cactus_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn skeleton_skull_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_15 = self.age_0_15().unwrap(); - map.insert("age", { - match age_0_15 { + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { 0i32 => "0", 1i32 => "1", 2i32 => "2", @@ -9581,15 +13623,17 @@ impl BlockId { }); map } - fn clay_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn skeleton_wall_skull_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn sugar_cane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn wither_skeleton_skull_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_15 = self.age_0_15().unwrap(); - map.insert("age", { - match age_0_15 { + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { 0i32 => "0", 1i32 => "1", 2i32 => "2", @@ -9611,95 +13655,17 @@ impl BlockId { }); map } - fn jukebox_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let has_record = self.has_record().unwrap(); - map.insert("has_record", { - match has_record { - true => "true", - false => "false", - } - }); - map - } - fn oak_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { - true => "true", - false => "false", - } - }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { - true => "true", - false => "false", - } - }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { - true => "true", - false => "false", - } - }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { - true => "true", - false => "false", - } - }); - map - } - fn pumpkin_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn netherrack_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn soul_sand_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn glowstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn nether_portal_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let axis_xz = self.axis_xz().unwrap(); - map.insert("axis", { axis_xz.as_str() }); - map - } - fn carved_pumpkin_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn jack_o_lantern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn wither_skeleton_wall_skull_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); map } - fn cake_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn zombie_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let bites = self.bites().unwrap(); - map.insert("bites", { - match bites { + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { 0i32 => "0", 1i32 => "1", 2i32 => "2", @@ -9707,125 +13673,146 @@ impl BlockId { 4i32 => "4", 5i32 => "5", 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", _ => "unknown", } }); map } - fn repeater_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn zombie_wall_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let delay = self.delay().unwrap(); - map.insert("delay", { - match delay { - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - _ => "unknown", - } - }); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let locked = self.locked().unwrap(); - map.insert("locked", { - match locked { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); - map - } - fn white_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn orange_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn magenta_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn light_blue_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn yellow_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn lime_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn pink_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); map } - fn gray_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn player_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); map } - fn light_gray_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn player_wall_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn cyan_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn creeper_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); map } - fn purple_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn creeper_wall_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn blue_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dragon_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); map } - fn brown_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dragon_wall_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn green_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn anvil_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn red_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn chipped_anvil_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn black_stained_glass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn damaged_anvil_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn oak_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn trapped_chest_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let chest_kind = self.chest_kind().unwrap(); + map.insert("type", { chest_kind.as_str() }); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -9835,48 +13822,68 @@ impl BlockId { }); map } - fn spruce_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_weighted_pressure_plate_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", + let power = self.power().unwrap(); + map.insert("power", { + match power { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", + map + } + fn heavy_weighted_pressure_plate_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let power = self.power().unwrap(); + map.insert("power", { + match power { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } }); map } - fn birch_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn comparator_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let comparator_mode = self.comparator_mode().unwrap(); + map.insert("mode", { comparator_mode.as_str() }); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); let powered = self.powered().unwrap(); map.insert("powered", { match powered { @@ -9884,64 +13891,84 @@ impl BlockId { false => "false", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn jungle_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn daylight_detector_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { + let inverted = self.inverted().unwrap(); + map.insert("inverted", { + match inverted { true => "true", false => "false", } }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", + let power = self.power().unwrap(); + map.insert("power", { + match power { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + map + } + fn redstone_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn nether_quartz_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn hopper_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let enabled = self.enabled().unwrap(); + map.insert("enabled", { + match enabled { true => "true", false => "false", } }); + let facing_cardinal_and_down = self.facing_cardinal_and_down().unwrap(); + map.insert("facing", { facing_cardinal_and_down.as_str() }); map } - fn acacia_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn quartz_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn chiseled_quartz_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn quartz_pillar_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn quartz_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); let half_top_bottom = self.half_top_bottom().unwrap(); map.insert("half", { half_top_bottom.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -9951,19 +13978,8 @@ impl BlockId { }); map } - fn dark_oak_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn activator_rail_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); let powered = self.powered().unwrap(); map.insert("powered", { match powered { @@ -9971,68 +13987,89 @@ impl BlockId { false => "false", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let powered_rail_shape = self.powered_rail_shape().unwrap(); + map.insert("shape", { powered_rail_shape.as_str() }); + map + } + fn dropper_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); + let triggered = self.triggered().unwrap(); + map.insert("triggered", { + match triggered { true => "true", false => "false", } }); map } - fn infested_stone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn white_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn infested_cobblestone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn orange_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn infested_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magenta_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn infested_mossy_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_blue_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn infested_cracked_stone_bricks_to_properties_map( - self, - ) -> BTreeMap<&'static str, &'static str> { + fn yellow_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn infested_chiseled_stone_bricks_to_properties_map( - self, - ) -> BTreeMap<&'static str, &'static str> { + fn lime_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn mossy_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn cracked_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn chiseled_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn brown_mushroom_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purple_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn blue_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn brown_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn green_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn red_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn black_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn white_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let down = self.down().unwrap(); - map.insert("down", { - match down { - true => "true", - false => "false", - } - }); let east_connected = self.east_connected().unwrap(); map.insert("east", { match east_connected { @@ -10054,9 +14091,9 @@ impl BlockId { false => "false", } }); - let up = self.up().unwrap(); - map.insert("up", { - match up { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } @@ -10070,15 +14107,8 @@ impl BlockId { }); map } - fn red_mushroom_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn orange_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let down = self.down().unwrap(); - map.insert("down", { - match down { - true => "true", - false => "false", - } - }); let east_connected = self.east_connected().unwrap(); map.insert("east", { match east_connected { @@ -10100,9 +14130,9 @@ impl BlockId { false => "false", } }); - let up = self.up().unwrap(); - map.insert("up", { - match up { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } @@ -10116,15 +14146,49 @@ impl BlockId { }); map } - fn mushroom_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magenta_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let down = self.down().unwrap(); - map.insert("down", { - match down { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); + map + } + fn light_blue_stained_glass_pane_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { match east_connected { @@ -10146,9 +14210,9 @@ impl BlockId { false => "false", } }); - let up = self.up().unwrap(); - map.insert("up", { - match up { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } @@ -10162,7 +14226,7 @@ impl BlockId { }); map } - fn iron_bars_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn yellow_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { @@ -10201,7 +14265,7 @@ impl BlockId { }); map } - fn glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lime_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { @@ -10240,59 +14304,46 @@ impl BlockId { }); map } - fn melon_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn attached_pumpkin_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn attached_melon_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn pumpkin_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_7 = self.age_0_7().unwrap(); - map.insert("age", { - match age_0_7 { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - _ => "unknown", + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", } }); - map - } - fn melon_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let age_0_7 = self.age_0_7().unwrap(); - map.insert("age", { - match age_0_7 { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - _ => "unknown", + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { + true => "true", + false => "false", } }); map } - fn vine_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { @@ -10315,9 +14366,9 @@ impl BlockId { false => "false", } }); - let up = self.up().unwrap(); - map.insert("up", { - match up { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } @@ -10331,41 +14382,31 @@ impl BlockId { }); map } - fn oak_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_stained_glass_pane_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let in_wall = self.in_wall().unwrap(); - map.insert("in_wall", { - match in_wall { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { true => "true", false => "false", } }); - let open = self.open().unwrap(); - map.insert("open", { - match open { + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { true => "true", false => "false", } }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - map - } - fn brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -10373,16 +14414,38 @@ impl BlockId { false => "false", } }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { + true => "true", + false => "false", + } + }); map } - fn stone_brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -10390,28 +14453,16 @@ impl BlockId { false => "false", } }); - map - } - fn mycelium_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let snowy = self.snowy().unwrap(); - map.insert("snowy", { - match snowy { + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); map } - fn lily_pad_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn nether_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn nether_brick_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purple_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { @@ -10450,139 +14501,68 @@ impl BlockId { }); map } - fn nether_brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blue_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { true => "true", false => "false", } }); - map - } - fn nether_wart_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let age_0_3 = self.age_0_3().unwrap(); - map.insert("age", { - match age_0_3 { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - _ => "unknown", - } - }); - map - } - fn enchanting_table_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn brewing_stand_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let has_bottle_0 = self.has_bottle_0().unwrap(); - map.insert("has_bottle_0", { - match has_bottle_0 { + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { true => "true", false => "false", } }); - let has_bottle_1 = self.has_bottle_1().unwrap(); - map.insert("has_bottle_1", { - match has_bottle_1 { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - let has_bottle_2 = self.has_bottle_2().unwrap(); - map.insert("has_bottle_2", { - match has_bottle_2 { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - map - } - fn cauldron_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let cauldron_level = self.cauldron_level().unwrap(); - map.insert("level", { - match cauldron_level { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - _ => "unknown", + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { + true => "true", + false => "false", } }); map } - fn end_portal_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn end_portal_frame_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brown_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let eye = self.eye().unwrap(); - map.insert("eye", { - match eye { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { true => "true", false => "false", } }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn end_stone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn dragon_egg_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn redstone_lamp_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let lit = self.lit().unwrap(); - map.insert("lit", { - match lit { + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { true => "true", false => "false", } }); - map - } - fn cocoa_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let age_0_2 = self.age_0_2().unwrap(); - map.insert("age", { - match age_0_2 { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - _ => "unknown", + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", } }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn sandstone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -10590,61 +14570,56 @@ impl BlockId { false => "false", } }); - map - } - fn emerald_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn ender_chest_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); map } - fn tripwire_hook_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn green_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let attached = self.attached().unwrap(); - map.insert("attached", { - match attached { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { true => "true", false => "false", } }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { true => "true", false => "false", } }); - map - } - fn tripwire_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let attached = self.attached().unwrap(); - map.insert("attached", { - match attached { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - let disarmed = self.disarmed().unwrap(); - map.insert("disarmed", { - match disarmed { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); + map + } + fn red_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { match east_connected { @@ -10659,16 +14634,16 @@ impl BlockId { false => "false", } }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } @@ -10682,18 +14657,29 @@ impl BlockId { }); map } - fn emerald_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn spruce_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn black_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -10701,9 +14687,16 @@ impl BlockId { false => "false", } }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { + true => "true", + false => "false", + } + }); map } - fn birch_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn acacia_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); @@ -10720,7 +14713,7 @@ impl BlockId { }); map } - fn jungle_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dark_oak_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); @@ -10737,49 +14730,30 @@ impl BlockId { }); map } - fn command_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn slime_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let conditional = self.conditional().unwrap(); - map.insert("conditional", { - match conditional { - true => "true", - false => "false", - } - }); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); map } - fn beacon_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn barrier_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn cobblestone_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn iron_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { - true => "true", - false => "false", - } - }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { - true => "true", - false => "false", - } - }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { true => "true", false => "false", } }); - let up = self.up().unwrap(); - map.insert("up", { - match up { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } @@ -10791,45 +14765,88 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { - true => "true", - false => "false", - } - }); map } - fn mossy_cobblestone_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn prismarine_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + map + } + fn prismarine_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn dark_prismarine_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn prismarine_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + map + } + fn prismarine_brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + map + } + fn dark_prismarine_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let up = self.up().unwrap(); - map.insert("up", { - match up { + map + } + fn prismarine_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + map + } + fn prismarine_brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -10837,108 +14854,148 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn dark_prismarine_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn flower_pot_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn sea_lantern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn hay_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); + map + } + fn white_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn orange_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn magenta_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_oak_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_blue_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_spruce_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn yellow_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_birch_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lime_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_jungle_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_acacia_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_dark_oak_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_fern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_dandelion_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purple_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_poppy_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blue_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_blue_orchid_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brown_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_allium_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn green_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_azure_bluet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_red_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn black_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_orange_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_white_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn coal_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_pink_tulip_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn packed_ice_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn potted_oxeye_daisy_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn sunflower_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); map } - fn potted_red_mushroom_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lilac_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); map } - fn potted_brown_mushroom_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn rose_bush_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); map } - fn potted_dead_bush_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn peony_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); map } - fn potted_cactus_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn tall_grass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); map } - fn carrots_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn large_fern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_7 = self.age_0_7().unwrap(); - map.insert("age", { - match age_0_7 { + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + map + } + fn white_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { 0i32 => "0", 1i32 => "1", 2i32 => "2", @@ -10947,16 +15004,24 @@ impl BlockId { 5i32 => "5", 6i32 => "6", 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", _ => "unknown", } }); map } - fn potatoes_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn orange_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_7 = self.age_0_7().unwrap(); - map.insert("age", { - match age_0_7 { + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { 0i32 => "0", 1i32 => "1", 2i32 => "2", @@ -10965,108 +15030,124 @@ impl BlockId { 5i32 => "5", 6i32 => "6", 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", _ => "unknown", } }); map } - fn oak_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let face = self.face().unwrap(); - map.insert("face", { face.as_str() }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); - map - } - fn spruce_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let face = self.face().unwrap(); - map.insert("face", { face.as_str() }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); - map - } - fn birch_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magenta_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let face = self.face().unwrap(); - map.insert("face", { face.as_str() }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } }); map } - fn jungle_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_blue_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let face = self.face().unwrap(); - map.insert("face", { face.as_str() }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } }); map } - fn acacia_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn yellow_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let face = self.face().unwrap(); - map.insert("face", { face.as_str() }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } }); map } - fn dark_oak_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lime_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let face = self.face().unwrap(); - map.insert("face", { face.as_str() }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } - }); - map - } - fn skeleton_wall_skull_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + }); map } - fn skeleton_skull_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let rotation = self.rotation().unwrap(); map.insert("rotation", { @@ -11092,13 +15173,7 @@ impl BlockId { }); map } - fn wither_skeleton_wall_skull_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn wither_skeleton_skull_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let rotation = self.rotation().unwrap(); map.insert("rotation", { @@ -11124,13 +15199,7 @@ impl BlockId { }); map } - fn zombie_wall_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn zombie_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let rotation = self.rotation().unwrap(); map.insert("rotation", { @@ -11156,13 +15225,7 @@ impl BlockId { }); map } - fn player_wall_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn player_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let rotation = self.rotation().unwrap(); map.insert("rotation", { @@ -11188,13 +15251,7 @@ impl BlockId { }); map } - fn creeper_wall_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn creeper_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purple_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let rotation = self.rotation().unwrap(); map.insert("rotation", { @@ -11220,13 +15277,7 @@ impl BlockId { }); map } - fn dragon_wall_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn dragon_head_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blue_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let rotation = self.rotation().unwrap(); map.insert("rotation", { @@ -11252,46 +15303,11 @@ impl BlockId { }); map } - fn anvil_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn chipped_anvil_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn damaged_anvil_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - map - } - fn trapped_chest_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let chest_kind = self.chest_kind().unwrap(); - map.insert("type", { chest_kind.as_str() }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); - map - } - fn light_weighted_pressure_plate_to_properties_map( - self, - ) -> BTreeMap<&'static str, &'static str> { + fn brown_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let power = self.power().unwrap(); - map.insert("power", { - match power { + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { 0i32 => "0", 1i32 => "1", 2i32 => "2", @@ -11313,13 +15329,11 @@ impl BlockId { }); map } - fn heavy_weighted_pressure_plate_to_properties_map( - self, - ) -> BTreeMap<&'static str, &'static str> { + fn green_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let power = self.power().unwrap(); - map.insert("power", { - match power { + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { 0i32 => "0", 1i32 => "1", 2i32 => "2", @@ -11341,33 +15355,11 @@ impl BlockId { }); map } - fn comparator_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let comparator_mode = self.comparator_mode().unwrap(); - map.insert("mode", { comparator_mode.as_str() }); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); - map - } - fn daylight_detector_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let inverted = self.inverted().unwrap(); - map.insert("inverted", { - match inverted { - true => "true", - false => "false", - } - }); - let power = self.power().unwrap(); - map.insert("power", { - match power { + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { 0i32 => "0", 1i32 => "1", 2i32 => "2", @@ -11389,171 +15381,148 @@ impl BlockId { }); map } - fn redstone_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn nether_quartz_ore_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn hopper_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn black_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let enabled = self.enabled().unwrap(); - map.insert("enabled", { - match enabled { - true => "true", - false => "false", + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", } }); - let facing_cardinal_and_down = self.facing_cardinal_and_down().unwrap(); - map.insert("facing", { facing_cardinal_and_down.as_str() }); - map - } - fn quartz_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn chiseled_quartz_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn quartz_pillar_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn quartz_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn white_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn activator_rail_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn orange_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); - let powered_rail_shape = self.powered_rail_shape().unwrap(); - map.insert("shape", { powered_rail_shape.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn dropper_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magenta_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); - let triggered = self.triggered().unwrap(); - map.insert("triggered", { - match triggered { - true => "true", - false => "false", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn white_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_blue_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn orange_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn yellow_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn magenta_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lime_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn light_blue_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn yellow_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn lime_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn pink_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn gray_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purple_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn light_gray_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blue_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn cyan_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brown_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn purple_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn green_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn blue_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn brown_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn black_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn green_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn red_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn chiseled_red_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn black_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cut_red_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn white_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_sandstone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { - true => "true", - false => "false", - } - }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { - true => "true", - false => "false", - } - }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { - true => "true", - false => "false", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -11561,38 +15530,12 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { - true => "true", - false => "false", - } - }); map } - fn orange_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn oak_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { - true => "true", - false => "false", - } - }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { - true => "true", - false => "false", - } - }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { - true => "true", - false => "false", - } - }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -11600,38 +15543,12 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { - true => "true", - false => "false", - } - }); map } - fn magenta_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn spruce_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { - true => "true", - false => "false", - } - }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { - true => "true", - false => "false", - } - }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { - true => "true", - false => "false", - } - }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -11639,40 +15556,12 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { - true => "true", - false => "false", - } - }); map } - fn light_blue_stained_glass_pane_to_properties_map( - self, - ) -> BTreeMap<&'static str, &'static str> { + fn birch_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { - true => "true", - false => "false", - } - }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { - true => "true", - false => "false", - } - }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { - true => "true", - false => "false", - } - }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -11680,38 +15569,64 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn jungle_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn yellow_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn acacia_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + map + } + fn dark_oak_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + map + } + fn stone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + map + } + fn smooth_stone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -11719,38 +15634,64 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn sandstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn lime_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cut_sandstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + map + } + fn petrified_oak_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + map + } + fn cobblestone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + map + } + fn brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -11758,38 +15699,64 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn stone_brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn pink_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn nether_brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + map + } + fn quartz_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + map + } + fn red_sandstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + map + } + fn cut_red_sandstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -11797,135 +15764,173 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn purpur_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn gray_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn smooth_stone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + map + } + fn smooth_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn smooth_quartz_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn smooth_red_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn spruce_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let in_wall = self.in_wall().unwrap(); + map.insert("in_wall", { + match in_wall { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + let open = self.open().unwrap(); + map.insert("open", { + match open { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + map + } + fn birch_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let in_wall = self.in_wall().unwrap(); + map.insert("in_wall", { + match in_wall { true => "true", false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + let open = self.open().unwrap(); + map.insert("open", { + match open { true => "true", false => "false", } }); - map - } - fn light_gray_stained_glass_pane_to_properties_map( - self, - ) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + map + } + fn jungle_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let in_wall = self.in_wall().unwrap(); + map.insert("in_wall", { + match in_wall { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + let open = self.open().unwrap(); + map.insert("open", { + match open { true => "true", false => "false", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn acacia_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let in_wall = self.in_wall().unwrap(); + map.insert("in_wall", { + match in_wall { true => "true", false => "false", } }); - map - } - fn cyan_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + let open = self.open().unwrap(); + map.insert("open", { + match open { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + map + } + fn dark_oak_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let in_wall = self.in_wall().unwrap(); + map.insert("in_wall", { + match in_wall { true => "true", false => "false", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let open = self.open().unwrap(); + map.insert("open", { + match open { true => "true", false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn purple_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn spruce_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { @@ -11964,7 +15969,7 @@ impl BlockId { }); map } - fn blue_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn birch_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { @@ -12003,7 +16008,7 @@ impl BlockId { }); map } - fn brown_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn jungle_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { @@ -12042,7 +16047,7 @@ impl BlockId { }); map } - fn green_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn acacia_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { @@ -12081,7 +16086,7 @@ impl BlockId { }); map } - fn red_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dark_oak_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let east_connected = self.east_connected().unwrap(); map.insert("east", { @@ -12120,93 +16125,110 @@ impl BlockId { }); map } - fn black_stained_glass_pane_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn spruce_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { - true => "true", - false => "false", - } - }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + let hinge = self.hinge().unwrap(); + map.insert("hinge", { hinge.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + map + } + fn birch_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + let hinge = self.hinge().unwrap(); + map.insert("hinge", { hinge.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { true => "true", false => "false", - } - }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn acacia_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn jungle_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + let hinge = self.hinge().unwrap(); + map.insert("hinge", { hinge.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn dark_oak_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn acacia_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + let hinge = self.hinge().unwrap(); + map.insert("hinge", { hinge.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn slime_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn barrier_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn iron_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dark_oak_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + let hinge = self.hinge().unwrap(); + map.insert("hinge", { hinge.as_str() }); let open = self.open().unwrap(); map.insert("open", { match open { @@ -12221,1201 +16243,643 @@ impl BlockId { false => "false", } }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); - map - } - fn prismarine_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn prismarine_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); map } - fn dark_prismarine_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn end_rod_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn prismarine_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn chorus_plant_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let down = self.down().unwrap(); + map.insert("down", { + match down { true => "true", false => "false", } }); - map - } - fn prismarine_brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { true => "true", false => "false", } }); - map - } - fn dark_prismarine_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { true => "true", false => "false", } }); - map - } - fn prismarine_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - map - } - fn prismarine_brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let up = self.up().unwrap(); + map.insert("up", { + match up { true => "true", false => "false", } }); - map - } - fn dark_prismarine_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { true => "true", false => "false", } }); map } - fn sea_lantern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn chorus_flower_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let age_0_5 = self.age_0_5().unwrap(); + map.insert("age", { + match age_0_5 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + _ => "unknown", + } + }); map } - fn hay_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purpur_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn white_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purpur_pillar_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn orange_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purpur_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn magenta_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn end_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn light_blue_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn beetroots_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let age_0_3 = self.age_0_3().unwrap(); + map.insert("age", { + match age_0_3 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + _ => "unknown", + } + }); map } - fn yellow_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn grass_path_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn lime_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn end_gateway_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn pink_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn repeating_command_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let conditional = self.conditional().unwrap(); + map.insert("conditional", { + match conditional { + true => "true", + false => "false", + } + }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn gray_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn chain_command_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let conditional = self.conditional().unwrap(); + map.insert("conditional", { + match conditional { + true => "true", + false => "false", + } + }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn light_gray_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn frosted_ice_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let age_0_3 = self.age_0_3().unwrap(); + map.insert("age", { + match age_0_3 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + _ => "unknown", + } + }); map } - fn cyan_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magma_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn purple_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn nether_wart_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn blue_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_nether_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn brown_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn bone_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn green_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn structure_void_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn red_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn observer_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn black_carpet_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn white_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn coal_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn orange_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn packed_ice_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magenta_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn sunflower_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_blue_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn lilac_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn yellow_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn rose_bush_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lime_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn peony_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn tall_grass_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn large_fern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn white_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn orange_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purple_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn magenta_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blue_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn light_blue_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brown_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn yellow_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn green_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn lime_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn pink_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + fn black_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); map } - fn gray_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn white_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn light_gray_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn orange_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn cyan_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magenta_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn purple_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_blue_glazed_terracotta_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn blue_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn yellow_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn brown_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lime_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn green_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn red_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn black_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_glazed_terracotta_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let rotation = self.rotation().unwrap(); - map.insert("rotation", { - match rotation { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - 5i32 => "5", - 6i32 => "6", - 7i32 => "7", - 8i32 => "8", - 9i32 => "9", - 10i32 => "10", - 11i32 => "11", - 12i32 => "12", - 13i32 => "13", - 14i32 => "14", - 15i32 => "15", - _ => "unknown", - } - }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn white_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + map + } + fn purple_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + map + } + fn blue_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); map } - fn orange_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brown_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); map } - fn magenta_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn green_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); map } - fn light_blue_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); map } - fn yellow_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn black_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); map } - fn lime_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn white_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn pink_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn orange_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn gray_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magenta_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn light_gray_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_blue_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn cyan_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn yellow_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn purple_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lime_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn blue_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn brown_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn green_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn red_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn black_wall_banner_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purple_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); map } - fn red_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blue_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn chiseled_red_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brown_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn cut_red_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn green_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn red_sandstone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn oak_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn black_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn spruce_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn white_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn birch_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn orange_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn jungle_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn magenta_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn acacia_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_blue_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn dark_oak_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn yellow_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn stone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lime_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn sandstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn pink_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn petrified_oak_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gray_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn cobblestone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn light_gray_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cyan_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn stone_brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn purple_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", + map + } + fn blue_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn brown_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn green_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn red_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn black_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn kelp_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let age_0_25 = self.age_0_25().unwrap(); + map.insert("age", { + match age_0_25 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + 16i32 => "16", + 17i32 => "17", + 18i32 => "18", + 19i32 => "19", + 20i32 => "20", + 21i32 => "21", + 22i32 => "22", + 23i32 => "23", + 24i32 => "24", + 25i32 => "25", + _ => "unknown", } }); map } - fn nether_brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn kelp_plant_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn quartz_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dried_kelp_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); map } - fn red_sandstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn turtle_egg_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", + let eggs = self.eggs().unwrap(); + map.insert("eggs", { + match eggs { + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + _ => "unknown", } }); - map - } - fn purpur_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let slab_kind = self.slab_kind().unwrap(); - map.insert("type", { slab_kind.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", + let hatch = self.hatch().unwrap(); + map.insert("hatch", { + match hatch { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + _ => "unknown", } }); map } - fn smooth_stone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn smooth_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn smooth_quartz_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_tube_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn smooth_red_sandstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_brain_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn spruce_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_bubble_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let in_wall = self.in_wall().unwrap(); - map.insert("in_wall", { - match in_wall { - true => "true", - false => "false", - } - }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); map } - fn birch_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_fire_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let in_wall = self.in_wall().unwrap(); - map.insert("in_wall", { - match in_wall { - true => "true", - false => "false", - } - }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); map } - fn jungle_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_horn_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let in_wall = self.in_wall().unwrap(); - map.insert("in_wall", { - match in_wall { - true => "true", - false => "false", - } - }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); map } - fn acacia_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn tube_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let in_wall = self.in_wall().unwrap(); - map.insert("in_wall", { - match in_wall { - true => "true", - false => "false", - } - }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); map } - fn dark_oak_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brain_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let in_wall = self.in_wall().unwrap(); - map.insert("in_wall", { - match in_wall { - true => "true", - false => "false", - } - }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { - true => "true", - false => "false", - } - }); map } - fn spruce_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn bubble_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { - true => "true", - false => "false", - } - }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { - true => "true", - false => "false", - } - }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { - true => "true", - false => "false", - } - }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", - } - }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { - true => "true", - false => "false", - } - }); map } - fn birch_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { - true => "true", - false => "false", - } - }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { - true => "true", - false => "false", - } - }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { - true => "true", - false => "false", - } - }); + fn fire_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn horn_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn dead_tube_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -13423,38 +16887,43 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { - true => "true", - false => "false", - } - }); map } - fn jungle_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_brain_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + map + } + fn dead_bubble_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + map + } + fn dead_fire_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + map + } + fn dead_horn_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -13462,38 +16931,54 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn tube_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn acacia_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brain_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + map + } + fn bubble_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + map + } + fn fire_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + map + } + fn horn_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -13501,38 +16986,54 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn dead_tube_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn dark_oak_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_brain_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + map + } + fn dead_bubble_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + map + } + fn dead_fire_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + map + } + fn dead_horn_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -13540,221 +17041,220 @@ impl BlockId { false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn tube_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn spruce_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brain_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); - let hinge = self.hinge().unwrap(); - map.insert("hinge", { hinge.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + map + } + fn bubble_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn birch_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn fire_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); - let hinge = self.hinge().unwrap(); - map.insert("hinge", { hinge.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + map + } + fn horn_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn jungle_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_tube_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); - let hinge = self.hinge().unwrap(); - map.insert("hinge", { hinge.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn acacia_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_brain_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); - let hinge = self.hinge().unwrap(); - map.insert("hinge", { hinge.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn dark_oak_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_bubble_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let half_upper_lower = self.half_upper_lower().unwrap(); - map.insert("half", { half_upper_lower.as_str() }); - let hinge = self.hinge().unwrap(); - map.insert("hinge", { hinge.as_str() }); - let open = self.open().unwrap(); - map.insert("open", { - match open { - true => "true", - false => "false", - } - }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn end_rod_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_fire_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn chorus_plant_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn dead_horn_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let down = self.down().unwrap(); - map.insert("down", { - match down { + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let east_connected = self.east_connected().unwrap(); - map.insert("east", { - match east_connected { + map + } + fn tube_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let north_connected = self.north_connected().unwrap(); - map.insert("north", { - match north_connected { + map + } + fn brain_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let south_connected = self.south_connected().unwrap(); - map.insert("south", { - match south_connected { + map + } + fn bubble_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let up = self.up().unwrap(); - map.insert("up", { - match up { + map + } + fn fire_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let west_connected = self.west_connected().unwrap(); - map.insert("west", { - match west_connected { + map + } + fn horn_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn chorus_flower_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn sea_pickle_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_5 = self.age_0_5().unwrap(); - map.insert("age", { - match age_0_5 { - 0i32 => "0", + let pickles = self.pickles().unwrap(); + map.insert("pickles", { + match pickles { 1i32 => "1", 2i32 => "2", 3i32 => "3", 4i32 => "4", - 5i32 => "5", _ => "unknown", } }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn purpur_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn purpur_pillar_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blue_ice_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); map } - fn purpur_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn conduit_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let half_top_bottom = self.half_top_bottom().unwrap(); - map.insert("half", { half_top_bottom.as_str() }); - let stairs_shape = self.stairs_shape().unwrap(); - map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -13764,438 +17264,1097 @@ impl BlockId { }); map } - fn end_stone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn bamboo_sapling_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn beetroots_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn bamboo_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_3 = self.age_0_3().unwrap(); + let age_0_1 = self.age_0_1().unwrap(); map.insert("age", { - match age_0_3 { + match age_0_1 { + 0i32 => "0", + 1i32 => "1", + _ => "unknown", + } + }); + let leaves = self.leaves().unwrap(); + map.insert("leaves", { leaves.as_str() }); + let stage = self.stage().unwrap(); + map.insert("stage", { + match stage { 0i32 => "0", 1i32 => "1", - 2i32 => "2", - 3i32 => "3", _ => "unknown", } }); map } - fn grass_path_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn potted_bamboo_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn end_gateway_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn void_air_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn repeating_command_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cave_air_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let conditional = self.conditional().unwrap(); - map.insert("conditional", { - match conditional { + map + } + fn bubble_column_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let drag = self.drag().unwrap(); + map.insert("drag", { + match drag { true => "true", false => "false", } }); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); map } - fn chain_command_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_granite_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let conditional = self.conditional().unwrap(); - map.insert("conditional", { - match conditional { + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); map } - fn frosted_ice_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn smooth_red_sandstone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let age_0_3 = self.age_0_3().unwrap(); - map.insert("age", { - match age_0_3 { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - _ => "unknown", + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", } }); map } - fn magma_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn mossy_stone_brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn nether_wart_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_diorite_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn red_nether_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn mossy_cobblestone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn bone_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn end_stone_brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let axis_xyz = self.axis_xyz().unwrap(); - map.insert("axis", { axis_xyz.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn structure_void_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn observer_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn smooth_sandstone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); - let powered = self.powered().unwrap(); - map.insert("powered", { - match powered { + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); map } - fn shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn smooth_quartz_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn white_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn granite_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn orange_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn andesite_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn magenta_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_nether_brick_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn light_blue_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_andesite_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn yellow_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn diorite_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn lime_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_granite_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn pink_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn smooth_red_sandstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn gray_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn mossy_stone_brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn light_gray_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_diorite_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn cyan_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn mossy_cobblestone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn purple_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn end_stone_brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn blue_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn smooth_sandstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn brown_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn smooth_quartz_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn green_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn granite_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn red_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn andesite_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn black_shulker_box_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_nether_brick_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cubic = self.facing_cubic().unwrap(); - map.insert("facing", { facing_cubic.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn white_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_andesite_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn orange_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn diorite_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn magenta_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn brick_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn light_blue_glazed_terracotta_to_properties_map( - self, - ) -> BTreeMap<&'static str, &'static str> { + fn prismarine_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn yellow_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_sandstone_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn lime_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn mossy_stone_brick_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn pink_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn granite_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn gray_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stone_brick_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn light_gray_glazed_terracotta_to_properties_map( - self, - ) -> BTreeMap<&'static str, &'static str> { + fn nether_brick_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn cyan_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn andesite_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn purple_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn red_nether_brick_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn blue_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn sandstone_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn brown_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn end_stone_brick_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn green_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn diorite_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn red_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn scaffolding_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let bottom = self.bottom().unwrap(); + map.insert("bottom", { + match bottom { + true => "true", + false => "false", + } + }); + let distance_0_7 = self.distance_0_7().unwrap(); + map.insert("distance", { + match distance_0_7 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + _ => "unknown", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn black_glazed_terracotta_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn loom_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); map } - fn white_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn orange_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn barrel_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cubic = self.facing_cubic().unwrap(); + map.insert("facing", { facing_cubic.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); map } - fn magenta_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn smoker_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let lit = self.lit().unwrap(); + map.insert("lit", { + match lit { + true => "true", + false => "false", + } + }); map } - fn light_blue_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blast_furnace_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let lit = self.lit().unwrap(); + map.insert("lit", { + match lit { + true => "true", + false => "false", + } + }); map } - fn yellow_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn cartography_table_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn lime_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn fletching_table_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn pink_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn grindstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn gray_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lectern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let has_book = self.has_book().unwrap(); + map.insert("has_book", { + match has_book { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn light_gray_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn smithing_table_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn cyan_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stonecutter_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); map } - fn purple_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn bell_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let attachment = self.attachment().unwrap(); + map.insert("attachment", { attachment.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn blue_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn lantern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let hanging = self.hanging().unwrap(); + map.insert("hanging", { + match hanging { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn brown_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn soul_lantern_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let hanging = self.hanging().unwrap(); + map.insert("hanging", { + match hanging { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn green_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn campfire_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let lit = self.lit().unwrap(); + map.insert("lit", { + match lit { + true => "true", + false => "false", + } + }); + let signal_fire = self.signal_fire().unwrap(); + map.insert("signal_fire", { + match signal_fire { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn red_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn soul_campfire_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let lit = self.lit().unwrap(); + map.insert("lit", { + match lit { + true => "true", + false => "false", + } + }); + let signal_fire = self.signal_fire().unwrap(); + map.insert("signal_fire", { + match signal_fire { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn black_concrete_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn sweet_berry_bush_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let age_0_3 = self.age_0_3().unwrap(); + map.insert("age", { + match age_0_3 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + _ => "unknown", + } + }); map } - fn white_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn orange_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stripped_warped_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn magenta_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_hyphae_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn light_blue_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stripped_warped_hyphae_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn yellow_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_nylium_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn lime_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_fungus_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn pink_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_wart_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn gray_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_roots_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn light_gray_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn nether_sprouts_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn cyan_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn purple_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stripped_crimson_stem_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn blue_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_hyphae_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn brown_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn stripped_crimson_hyphae_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let axis_xyz = self.axis_xyz().unwrap(); + map.insert("axis", { axis_xyz.as_str() }); map } - fn green_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_nylium_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn red_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_fungus_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn black_concrete_powder_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn shroomlight_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn kelp_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn weeping_vines_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let age_0_25 = self.age_0_25().unwrap(); map.insert("age", { @@ -14231,90 +18390,133 @@ impl BlockId { }); map } - fn kelp_plant_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn dried_kelp_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn weeping_vines_plant_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn turtle_egg_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn twisting_vines_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let eggs = self.eggs().unwrap(); - map.insert("eggs", { - match eggs { + let age_0_25 = self.age_0_25().unwrap(); + map.insert("age", { + match age_0_25 { + 0i32 => "0", 1i32 => "1", 2i32 => "2", 3i32 => "3", 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + 16i32 => "16", + 17i32 => "17", + 18i32 => "18", + 19i32 => "19", + 20i32 => "20", + 21i32 => "21", + 22i32 => "22", + 23i32 => "23", + 24i32 => "24", + 25i32 => "25", _ => "unknown", } }); - let hatch = self.hatch().unwrap(); - map.insert("hatch", { - match hatch { - 0i32 => "0", - 1i32 => "1", - 2i32 => "2", - _ => "unknown", - } - }); - map - } - fn dead_tube_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn dead_brain_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); map } - fn dead_bubble_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn twisting_vines_plant_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn dead_fire_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_roots_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn dead_horn_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn tube_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_planks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); map } - fn brain_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn bubble_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { + true => "true", + false => "false", + } + }); map } - fn fire_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn horn_coral_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_pressure_plate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn dead_tube_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { true => "true", false => "false", } }); - map - } - fn dead_brain_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14322,10 +18524,38 @@ impl BlockId { false => "false", } }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { + true => "true", + false => "false", + } + }); map } - fn dead_bubble_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_fence_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let east_connected = self.east_connected().unwrap(); + map.insert("east", { + match east_connected { + true => "true", + false => "false", + } + }); + let north_connected = self.north_connected().unwrap(); + map.insert("north", { + match north_connected { + true => "true", + false => "false", + } + }); + let south_connected = self.south_connected().unwrap(); + map.insert("south", { + match south_connected { + true => "true", + false => "false", + } + }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14333,10 +18563,35 @@ impl BlockId { false => "false", } }); + let west_connected = self.west_connected().unwrap(); + map.insert("west", { + match west_connected { + true => "true", + false => "false", + } + }); map } - fn dead_fire_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14346,8 +18601,26 @@ impl BlockId { }); map } - fn dead_horn_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_trapdoor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14357,30 +18630,68 @@ impl BlockId { }); map } - fn tube_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let in_wall = self.in_wall().unwrap(); + map.insert("in_wall", { + match in_wall { + true => "true", + false => "false", + } + }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn brain_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_fence_gate_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let in_wall = self.in_wall().unwrap(); + map.insert("in_wall", { + match in_wall { + true => "true", + false => "false", + } + }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn bubble_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14390,8 +18701,14 @@ impl BlockId { }); map } - fn fire_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14401,60 +18718,108 @@ impl BlockId { }); map } - fn horn_coral_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn dead_tube_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn dead_brain_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + let hinge = self.hinge().unwrap(); + map.insert("hinge", { hinge.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn dead_bubble_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_door_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let half_upper_lower = self.half_upper_lower().unwrap(); + map.insert("half", { half_upper_lower.as_str() }); + let hinge = self.hinge().unwrap(); + map.insert("hinge", { hinge.as_str() }); + let open = self.open().unwrap(); + map.insert("open", { + match open { + true => "true", + false => "false", + } + }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn dead_fire_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14464,10 +18829,30 @@ impl BlockId { }); map } - fn dead_horn_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); + let rotation = self.rotation().unwrap(); + map.insert("rotation", { + match rotation { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14477,7 +18862,7 @@ impl BlockId { }); map } - fn tube_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn crimson_wall_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); @@ -14490,7 +18875,7 @@ impl BlockId { }); map } - fn brain_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn warped_wall_sign_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); @@ -14503,58 +18888,166 @@ impl BlockId { }); map } - fn bubble_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn structure_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let facing_cardinal = self.facing_cardinal().unwrap(); - map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", + let structure_block_mode = self.structure_block_mode().unwrap(); + map.insert("mode", { structure_block_mode.as_str() }); + map + } + fn jigsaw_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let orientation = self.orientation().unwrap(); + map.insert("orientation", { orientation.as_str() }); + map + } + fn composter_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let level_0_8 = self.level_0_8().unwrap(); + map.insert("level", { + match level_0_8 { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + _ => "unknown", } }); map } - fn fire_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn target_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let power = self.power().unwrap(); + map.insert("power", { + match power { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + 6i32 => "6", + 7i32 => "7", + 8i32 => "8", + 9i32 => "9", + 10i32 => "10", + 11i32 => "11", + 12i32 => "12", + 13i32 => "13", + 14i32 => "14", + 15i32 => "15", + _ => "unknown", + } + }); + map + } + fn bee_nest_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", + let honey_level = self.honey_level().unwrap(); + map.insert("honey_level", { + match honey_level { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + _ => "unknown", } }); map } - fn horn_coral_wall_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn beehive_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); let facing_cardinal = self.facing_cardinal().unwrap(); map.insert("facing", { facing_cardinal.as_str() }); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", + let honey_level = self.honey_level().unwrap(); + map.insert("honey_level", { + match honey_level { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + 5i32 => "5", + _ => "unknown", } }); map } - fn dead_tube_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn honey_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { - true => "true", - false => "false", + map + } + fn honeycomb_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn netherite_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn ancient_debris_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn crying_obsidian_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn respawn_anchor_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + let charges = self.charges().unwrap(); + map.insert("charges", { + match charges { + 0i32 => "0", + 1i32 => "1", + 2i32 => "2", + 3i32 => "3", + 4i32 => "4", + _ => "unknown", } }); map } - fn dead_brain_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn potted_crimson_fungus_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_warped_fungus_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_crimson_roots_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn potted_warped_roots_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn lodestone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn blackstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn blackstone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14564,19 +19057,21 @@ impl BlockId { }); map } - fn dead_bubble_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blackstone_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { true => "true", false => "false", } }); - map - } - fn dead_fire_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14584,10 +19079,14 @@ impl BlockId { false => "false", } }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn dead_horn_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn blackstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14597,8 +19096,32 @@ impl BlockId { }); map } - fn tube_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_blackstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn polished_blackstone_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn cracked_polished_blackstone_bricks_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn chiseled_polished_blackstone_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn polished_blackstone_brick_slab_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14608,8 +19131,16 @@ impl BlockId { }); map } - fn brain_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_blackstone_brick_stairs_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14619,19 +19150,23 @@ impl BlockId { }); map } - fn bubble_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_blackstone_brick_wall_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { true => "true", false => "false", } }); - map - } - fn fire_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14639,10 +19174,22 @@ impl BlockId { false => "false", } }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn horn_coral_fan_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn gilded_blackstone_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn polished_blackstone_stairs_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let half_top_bottom = self.half_top_bottom().unwrap(); + map.insert("half", { half_top_bottom.as_str() }); + let stairs_shape = self.stairs_shape().unwrap(); + map.insert("shape", { stairs_shape.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14652,18 +19199,10 @@ impl BlockId { }); map } - fn sea_pickle_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_blackstone_slab_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let pickles = self.pickles().unwrap(); - map.insert("pickles", { - match pickles { - 1i32 => "1", - 2i32 => "2", - 3i32 => "3", - 4i32 => "4", - _ => "unknown", - } - }); + let slab_kind = self.slab_kind().unwrap(); + map.insert("type", { slab_kind.as_str() }); let waterlogged = self.waterlogged().unwrap(); map.insert("waterlogged", { match waterlogged { @@ -14673,44 +19212,70 @@ impl BlockId { }); map } - fn blue_ice_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn conduit_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_blackstone_pressure_plate_to_properties_map( + self, + ) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let waterlogged = self.waterlogged().unwrap(); - map.insert("waterlogged", { - match waterlogged { + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { true => "true", false => "false", } }); map } - fn void_air_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { - let mut map = BTreeMap::new(); - map - } - fn cave_air_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_blackstone_button_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); + let face = self.face().unwrap(); + map.insert("face", { face.as_str() }); + let facing_cardinal = self.facing_cardinal().unwrap(); + map.insert("facing", { facing_cardinal.as_str() }); + let powered = self.powered().unwrap(); + map.insert("powered", { + match powered { + true => "true", + false => "false", + } + }); map } - fn bubble_column_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn polished_blackstone_wall_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let drag = self.drag().unwrap(); - map.insert("drag", { - match drag { + let east_nlt = self.east_nlt().unwrap(); + map.insert("east", { east_nlt.as_str() }); + let north_nlt = self.north_nlt().unwrap(); + map.insert("north", { north_nlt.as_str() }); + let south_nlt = self.south_nlt().unwrap(); + map.insert("south", { south_nlt.as_str() }); + let up = self.up().unwrap(); + map.insert("up", { + match up { + true => "true", + false => "false", + } + }); + let waterlogged = self.waterlogged().unwrap(); + map.insert("waterlogged", { + match waterlogged { true => "true", false => "false", } }); + let west_nlt = self.west_nlt().unwrap(); + map.insert("west", { west_nlt.as_str() }); map } - fn structure_block_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + fn chiseled_nether_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn cracked_nether_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { + let mut map = BTreeMap::new(); + map + } + fn quartz_bricks_to_properties_map(self) -> BTreeMap<&'static str, &'static str> { let mut map = BTreeMap::new(); - let structure_block_mode = self.structure_block_mode().unwrap(); - map.insert("mode", { structure_block_mode.as_str() }); map } #[doc = "Attempts to convert a block kind identifier (e.g. `minecraft::air`) and properties map to a `BlockId`."] @@ -14779,6 +19344,9 @@ impl BlockId { "minecraft:gold_ore" => Self::gold_ore_from_identifier_and_properties(properties), "minecraft:iron_ore" => Self::iron_ore_from_identifier_and_properties(properties), "minecraft:coal_ore" => Self::coal_ore_from_identifier_and_properties(properties), + "minecraft:nether_gold_ore" => { + Self::nether_gold_ore_from_identifier_and_properties(properties) + } "minecraft:oak_log" => Self::oak_log_from_identifier_and_properties(properties), "minecraft:spruce_log" => Self::spruce_log_from_identifier_and_properties(properties), "minecraft:birch_log" => Self::birch_log_from_identifier_and_properties(properties), @@ -14937,6 +19505,11 @@ impl BlockId { "minecraft:white_tulip" => Self::white_tulip_from_identifier_and_properties(properties), "minecraft:pink_tulip" => Self::pink_tulip_from_identifier_and_properties(properties), "minecraft:oxeye_daisy" => Self::oxeye_daisy_from_identifier_and_properties(properties), + "minecraft:cornflower" => Self::cornflower_from_identifier_and_properties(properties), + "minecraft:wither_rose" => Self::wither_rose_from_identifier_and_properties(properties), + "minecraft:lily_of_the_valley" => { + Self::lily_of_the_valley_from_identifier_and_properties(properties) + } "minecraft:brown_mushroom" => { Self::brown_mushroom_from_identifier_and_properties(properties) } @@ -14955,6 +19528,7 @@ impl BlockId { "minecraft:torch" => Self::torch_from_identifier_and_properties(properties), "minecraft:wall_torch" => Self::wall_torch_from_identifier_and_properties(properties), "minecraft:fire" => Self::fire_from_identifier_and_properties(properties), + "minecraft:soul_fire" => Self::soul_fire_from_identifier_and_properties(properties), "minecraft:spawner" => Self::spawner_from_identifier_and_properties(properties), "minecraft:oak_stairs" => Self::oak_stairs_from_identifier_and_properties(properties), "minecraft:chest" => Self::chest_from_identifier_and_properties(properties), @@ -14971,14 +19545,38 @@ impl BlockId { "minecraft:wheat" => Self::wheat_from_identifier_and_properties(properties), "minecraft:farmland" => Self::farmland_from_identifier_and_properties(properties), "minecraft:furnace" => Self::furnace_from_identifier_and_properties(properties), - "minecraft:sign" => Self::sign_from_identifier_and_properties(properties), + "minecraft:oak_sign" => Self::oak_sign_from_identifier_and_properties(properties), + "minecraft:spruce_sign" => Self::spruce_sign_from_identifier_and_properties(properties), + "minecraft:birch_sign" => Self::birch_sign_from_identifier_and_properties(properties), + "minecraft:acacia_sign" => Self::acacia_sign_from_identifier_and_properties(properties), + "minecraft:jungle_sign" => Self::jungle_sign_from_identifier_and_properties(properties), + "minecraft:dark_oak_sign" => { + Self::dark_oak_sign_from_identifier_and_properties(properties) + } "minecraft:oak_door" => Self::oak_door_from_identifier_and_properties(properties), "minecraft:ladder" => Self::ladder_from_identifier_and_properties(properties), "minecraft:rail" => Self::rail_from_identifier_and_properties(properties), "minecraft:cobblestone_stairs" => { Self::cobblestone_stairs_from_identifier_and_properties(properties) } - "minecraft:wall_sign" => Self::wall_sign_from_identifier_and_properties(properties), + "minecraft:oak_wall_sign" => { + Self::oak_wall_sign_from_identifier_and_properties(properties) + } + "minecraft:spruce_wall_sign" => { + Self::spruce_wall_sign_from_identifier_and_properties(properties) + } + "minecraft:birch_wall_sign" => { + Self::birch_wall_sign_from_identifier_and_properties(properties) + } + "minecraft:acacia_wall_sign" => { + Self::acacia_wall_sign_from_identifier_and_properties(properties) + } + "minecraft:jungle_wall_sign" => { + Self::jungle_wall_sign_from_identifier_and_properties(properties) + } + "minecraft:dark_oak_wall_sign" => { + Self::dark_oak_wall_sign_from_identifier_and_properties(properties) + } "minecraft:lever" => Self::lever_from_identifier_and_properties(properties), "minecraft:stone_pressure_plate" => { Self::stone_pressure_plate_from_identifier_and_properties(properties) @@ -15025,6 +19623,15 @@ impl BlockId { "minecraft:pumpkin" => Self::pumpkin_from_identifier_and_properties(properties), "minecraft:netherrack" => Self::netherrack_from_identifier_and_properties(properties), "minecraft:soul_sand" => Self::soul_sand_from_identifier_and_properties(properties), + "minecraft:soul_soil" => Self::soul_soil_from_identifier_and_properties(properties), + "minecraft:basalt" => Self::basalt_from_identifier_and_properties(properties), + "minecraft:polished_basalt" => { + Self::polished_basalt_from_identifier_and_properties(properties) + } + "minecraft:soul_torch" => Self::soul_torch_from_identifier_and_properties(properties), + "minecraft:soul_wall_torch" => { + Self::soul_wall_torch_from_identifier_and_properties(properties) + } "minecraft:glowstone" => Self::glowstone_from_identifier_and_properties(properties), "minecraft:nether_portal" => { Self::nether_portal_from_identifier_and_properties(properties) @@ -15103,6 +19710,18 @@ impl BlockId { "minecraft:dark_oak_trapdoor" => { Self::dark_oak_trapdoor_from_identifier_and_properties(properties) } + "minecraft:stone_bricks" => { + Self::stone_bricks_from_identifier_and_properties(properties) + } + "minecraft:mossy_stone_bricks" => { + Self::mossy_stone_bricks_from_identifier_and_properties(properties) + } + "minecraft:cracked_stone_bricks" => { + Self::cracked_stone_bricks_from_identifier_and_properties(properties) + } + "minecraft:chiseled_stone_bricks" => { + Self::chiseled_stone_bricks_from_identifier_and_properties(properties) + } "minecraft:infested_stone" => { Self::infested_stone_from_identifier_and_properties(properties) } @@ -15121,18 +19740,6 @@ impl BlockId { "minecraft:infested_chiseled_stone_bricks" => { Self::infested_chiseled_stone_bricks_from_identifier_and_properties(properties) } - "minecraft:stone_bricks" => { - Self::stone_bricks_from_identifier_and_properties(properties) - } - "minecraft:mossy_stone_bricks" => { - Self::mossy_stone_bricks_from_identifier_and_properties(properties) - } - "minecraft:cracked_stone_bricks" => { - Self::cracked_stone_bricks_from_identifier_and_properties(properties) - } - "minecraft:chiseled_stone_bricks" => { - Self::chiseled_stone_bricks_from_identifier_and_properties(properties) - } "minecraft:brown_mushroom_block" => { Self::brown_mushroom_block_from_identifier_and_properties(properties) } @@ -15143,6 +19750,7 @@ impl BlockId { Self::mushroom_stem_from_identifier_and_properties(properties) } "minecraft:iron_bars" => Self::iron_bars_from_identifier_and_properties(properties), + "minecraft:chain" => Self::chain_from_identifier_and_properties(properties), "minecraft:glass_pane" => Self::glass_pane_from_identifier_and_properties(properties), "minecraft:melon" => Self::melon_from_identifier_and_properties(properties), "minecraft:attached_pumpkin_stem" => { @@ -15275,6 +19883,15 @@ impl BlockId { "minecraft:potted_oxeye_daisy" => { Self::potted_oxeye_daisy_from_identifier_and_properties(properties) } + "minecraft:potted_cornflower" => { + Self::potted_cornflower_from_identifier_and_properties(properties) + } + "minecraft:potted_lily_of_the_valley" => { + Self::potted_lily_of_the_valley_from_identifier_and_properties(properties) + } + "minecraft:potted_wither_rose" => { + Self::potted_wither_rose_from_identifier_and_properties(properties) + } "minecraft:potted_red_mushroom" => { Self::potted_red_mushroom_from_identifier_and_properties(properties) } @@ -15305,36 +19922,36 @@ impl BlockId { "minecraft:dark_oak_button" => { Self::dark_oak_button_from_identifier_and_properties(properties) } - "minecraft:skeleton_wall_skull" => { - Self::skeleton_wall_skull_from_identifier_and_properties(properties) - } "minecraft:skeleton_skull" => { Self::skeleton_skull_from_identifier_and_properties(properties) } - "minecraft:wither_skeleton_wall_skull" => { - Self::wither_skeleton_wall_skull_from_identifier_and_properties(properties) + "minecraft:skeleton_wall_skull" => { + Self::skeleton_wall_skull_from_identifier_and_properties(properties) } "minecraft:wither_skeleton_skull" => { Self::wither_skeleton_skull_from_identifier_and_properties(properties) } + "minecraft:wither_skeleton_wall_skull" => { + Self::wither_skeleton_wall_skull_from_identifier_and_properties(properties) + } + "minecraft:zombie_head" => Self::zombie_head_from_identifier_and_properties(properties), "minecraft:zombie_wall_head" => { Self::zombie_wall_head_from_identifier_and_properties(properties) } - "minecraft:zombie_head" => Self::zombie_head_from_identifier_and_properties(properties), + "minecraft:player_head" => Self::player_head_from_identifier_and_properties(properties), "minecraft:player_wall_head" => { Self::player_wall_head_from_identifier_and_properties(properties) } - "minecraft:player_head" => Self::player_head_from_identifier_and_properties(properties), - "minecraft:creeper_wall_head" => { - Self::creeper_wall_head_from_identifier_and_properties(properties) - } "minecraft:creeper_head" => { Self::creeper_head_from_identifier_and_properties(properties) } + "minecraft:creeper_wall_head" => { + Self::creeper_wall_head_from_identifier_and_properties(properties) + } + "minecraft:dragon_head" => Self::dragon_head_from_identifier_and_properties(properties), "minecraft:dragon_wall_head" => { Self::dragon_wall_head_from_identifier_and_properties(properties) } - "minecraft:dragon_head" => Self::dragon_head_from_identifier_and_properties(properties), "minecraft:anvil" => Self::anvil_from_identifier_and_properties(properties), "minecraft:chipped_anvil" => { Self::chipped_anvil_from_identifier_and_properties(properties) @@ -15662,9 +20279,15 @@ impl BlockId { Self::dark_oak_slab_from_identifier_and_properties(properties) } "minecraft:stone_slab" => Self::stone_slab_from_identifier_and_properties(properties), + "minecraft:smooth_stone_slab" => { + Self::smooth_stone_slab_from_identifier_and_properties(properties) + } "minecraft:sandstone_slab" => { Self::sandstone_slab_from_identifier_and_properties(properties) } + "minecraft:cut_sandstone_slab" => { + Self::cut_sandstone_slab_from_identifier_and_properties(properties) + } "minecraft:petrified_oak_slab" => { Self::petrified_oak_slab_from_identifier_and_properties(properties) } @@ -15682,6 +20305,9 @@ impl BlockId { "minecraft:red_sandstone_slab" => { Self::red_sandstone_slab_from_identifier_and_properties(properties) } + "minecraft:cut_red_sandstone_slab" => { + Self::cut_red_sandstone_slab_from_identifier_and_properties(properties) + } "minecraft:purpur_slab" => Self::purpur_slab_from_identifier_and_properties(properties), "minecraft:smooth_stone" => { Self::smooth_stone_from_identifier_and_properties(properties) @@ -16020,1261 +20646,3240 @@ impl BlockId { "minecraft:bubble_coral" => { Self::bubble_coral_from_identifier_and_properties(properties) } - "minecraft:fire_coral" => Self::fire_coral_from_identifier_and_properties(properties), - "minecraft:horn_coral" => Self::horn_coral_from_identifier_and_properties(properties), - "minecraft:dead_tube_coral_wall_fan" => { - Self::dead_tube_coral_wall_fan_from_identifier_and_properties(properties) + "minecraft:fire_coral" => Self::fire_coral_from_identifier_and_properties(properties), + "minecraft:horn_coral" => Self::horn_coral_from_identifier_and_properties(properties), + "minecraft:dead_tube_coral_fan" => { + Self::dead_tube_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:dead_brain_coral_fan" => { + Self::dead_brain_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:dead_bubble_coral_fan" => { + Self::dead_bubble_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:dead_fire_coral_fan" => { + Self::dead_fire_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:dead_horn_coral_fan" => { + Self::dead_horn_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:tube_coral_fan" => { + Self::tube_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:brain_coral_fan" => { + Self::brain_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:bubble_coral_fan" => { + Self::bubble_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:fire_coral_fan" => { + Self::fire_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:horn_coral_fan" => { + Self::horn_coral_fan_from_identifier_and_properties(properties) + } + "minecraft:dead_tube_coral_wall_fan" => { + Self::dead_tube_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:dead_brain_coral_wall_fan" => { + Self::dead_brain_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:dead_bubble_coral_wall_fan" => { + Self::dead_bubble_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:dead_fire_coral_wall_fan" => { + Self::dead_fire_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:dead_horn_coral_wall_fan" => { + Self::dead_horn_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:tube_coral_wall_fan" => { + Self::tube_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:brain_coral_wall_fan" => { + Self::brain_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:bubble_coral_wall_fan" => { + Self::bubble_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:fire_coral_wall_fan" => { + Self::fire_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:horn_coral_wall_fan" => { + Self::horn_coral_wall_fan_from_identifier_and_properties(properties) + } + "minecraft:sea_pickle" => Self::sea_pickle_from_identifier_and_properties(properties), + "minecraft:blue_ice" => Self::blue_ice_from_identifier_and_properties(properties), + "minecraft:conduit" => Self::conduit_from_identifier_and_properties(properties), + "minecraft:bamboo_sapling" => { + Self::bamboo_sapling_from_identifier_and_properties(properties) + } + "minecraft:bamboo" => Self::bamboo_from_identifier_and_properties(properties), + "minecraft:potted_bamboo" => { + Self::potted_bamboo_from_identifier_and_properties(properties) + } + "minecraft:void_air" => Self::void_air_from_identifier_and_properties(properties), + "minecraft:cave_air" => Self::cave_air_from_identifier_and_properties(properties), + "minecraft:bubble_column" => { + Self::bubble_column_from_identifier_and_properties(properties) + } + "minecraft:polished_granite_stairs" => { + Self::polished_granite_stairs_from_identifier_and_properties(properties) + } + "minecraft:smooth_red_sandstone_stairs" => { + Self::smooth_red_sandstone_stairs_from_identifier_and_properties(properties) + } + "minecraft:mossy_stone_brick_stairs" => { + Self::mossy_stone_brick_stairs_from_identifier_and_properties(properties) + } + "minecraft:polished_diorite_stairs" => { + Self::polished_diorite_stairs_from_identifier_and_properties(properties) + } + "minecraft:mossy_cobblestone_stairs" => { + Self::mossy_cobblestone_stairs_from_identifier_and_properties(properties) + } + "minecraft:end_stone_brick_stairs" => { + Self::end_stone_brick_stairs_from_identifier_and_properties(properties) + } + "minecraft:stone_stairs" => { + Self::stone_stairs_from_identifier_and_properties(properties) + } + "minecraft:smooth_sandstone_stairs" => { + Self::smooth_sandstone_stairs_from_identifier_and_properties(properties) + } + "minecraft:smooth_quartz_stairs" => { + Self::smooth_quartz_stairs_from_identifier_and_properties(properties) + } + "minecraft:granite_stairs" => { + Self::granite_stairs_from_identifier_and_properties(properties) + } + "minecraft:andesite_stairs" => { + Self::andesite_stairs_from_identifier_and_properties(properties) + } + "minecraft:red_nether_brick_stairs" => { + Self::red_nether_brick_stairs_from_identifier_and_properties(properties) + } + "minecraft:polished_andesite_stairs" => { + Self::polished_andesite_stairs_from_identifier_and_properties(properties) + } + "minecraft:diorite_stairs" => { + Self::diorite_stairs_from_identifier_and_properties(properties) + } + "minecraft:polished_granite_slab" => { + Self::polished_granite_slab_from_identifier_and_properties(properties) + } + "minecraft:smooth_red_sandstone_slab" => { + Self::smooth_red_sandstone_slab_from_identifier_and_properties(properties) + } + "minecraft:mossy_stone_brick_slab" => { + Self::mossy_stone_brick_slab_from_identifier_and_properties(properties) + } + "minecraft:polished_diorite_slab" => { + Self::polished_diorite_slab_from_identifier_and_properties(properties) + } + "minecraft:mossy_cobblestone_slab" => { + Self::mossy_cobblestone_slab_from_identifier_and_properties(properties) + } + "minecraft:end_stone_brick_slab" => { + Self::end_stone_brick_slab_from_identifier_and_properties(properties) + } + "minecraft:smooth_sandstone_slab" => { + Self::smooth_sandstone_slab_from_identifier_and_properties(properties) + } + "minecraft:smooth_quartz_slab" => { + Self::smooth_quartz_slab_from_identifier_and_properties(properties) + } + "minecraft:granite_slab" => { + Self::granite_slab_from_identifier_and_properties(properties) + } + "minecraft:andesite_slab" => { + Self::andesite_slab_from_identifier_and_properties(properties) + } + "minecraft:red_nether_brick_slab" => { + Self::red_nether_brick_slab_from_identifier_and_properties(properties) + } + "minecraft:polished_andesite_slab" => { + Self::polished_andesite_slab_from_identifier_and_properties(properties) + } + "minecraft:diorite_slab" => { + Self::diorite_slab_from_identifier_and_properties(properties) + } + "minecraft:brick_wall" => Self::brick_wall_from_identifier_and_properties(properties), + "minecraft:prismarine_wall" => { + Self::prismarine_wall_from_identifier_and_properties(properties) + } + "minecraft:red_sandstone_wall" => { + Self::red_sandstone_wall_from_identifier_and_properties(properties) + } + "minecraft:mossy_stone_brick_wall" => { + Self::mossy_stone_brick_wall_from_identifier_and_properties(properties) + } + "minecraft:granite_wall" => { + Self::granite_wall_from_identifier_and_properties(properties) + } + "minecraft:stone_brick_wall" => { + Self::stone_brick_wall_from_identifier_and_properties(properties) + } + "minecraft:nether_brick_wall" => { + Self::nether_brick_wall_from_identifier_and_properties(properties) + } + "minecraft:andesite_wall" => { + Self::andesite_wall_from_identifier_and_properties(properties) + } + "minecraft:red_nether_brick_wall" => { + Self::red_nether_brick_wall_from_identifier_and_properties(properties) + } + "minecraft:sandstone_wall" => { + Self::sandstone_wall_from_identifier_and_properties(properties) + } + "minecraft:end_stone_brick_wall" => { + Self::end_stone_brick_wall_from_identifier_and_properties(properties) + } + "minecraft:diorite_wall" => { + Self::diorite_wall_from_identifier_and_properties(properties) + } + "minecraft:scaffolding" => Self::scaffolding_from_identifier_and_properties(properties), + "minecraft:loom" => Self::loom_from_identifier_and_properties(properties), + "minecraft:barrel" => Self::barrel_from_identifier_and_properties(properties), + "minecraft:smoker" => Self::smoker_from_identifier_and_properties(properties), + "minecraft:blast_furnace" => { + Self::blast_furnace_from_identifier_and_properties(properties) + } + "minecraft:cartography_table" => { + Self::cartography_table_from_identifier_and_properties(properties) + } + "minecraft:fletching_table" => { + Self::fletching_table_from_identifier_and_properties(properties) + } + "minecraft:grindstone" => Self::grindstone_from_identifier_and_properties(properties), + "minecraft:lectern" => Self::lectern_from_identifier_and_properties(properties), + "minecraft:smithing_table" => { + Self::smithing_table_from_identifier_and_properties(properties) + } + "minecraft:stonecutter" => Self::stonecutter_from_identifier_and_properties(properties), + "minecraft:bell" => Self::bell_from_identifier_and_properties(properties), + "minecraft:lantern" => Self::lantern_from_identifier_and_properties(properties), + "minecraft:soul_lantern" => { + Self::soul_lantern_from_identifier_and_properties(properties) + } + "minecraft:campfire" => Self::campfire_from_identifier_and_properties(properties), + "minecraft:soul_campfire" => { + Self::soul_campfire_from_identifier_and_properties(properties) + } + "minecraft:sweet_berry_bush" => { + Self::sweet_berry_bush_from_identifier_and_properties(properties) + } + "minecraft:warped_stem" => Self::warped_stem_from_identifier_and_properties(properties), + "minecraft:stripped_warped_stem" => { + Self::stripped_warped_stem_from_identifier_and_properties(properties) + } + "minecraft:warped_hyphae" => { + Self::warped_hyphae_from_identifier_and_properties(properties) + } + "minecraft:stripped_warped_hyphae" => { + Self::stripped_warped_hyphae_from_identifier_and_properties(properties) + } + "minecraft:warped_nylium" => { + Self::warped_nylium_from_identifier_and_properties(properties) + } + "minecraft:warped_fungus" => { + Self::warped_fungus_from_identifier_and_properties(properties) + } + "minecraft:warped_wart_block" => { + Self::warped_wart_block_from_identifier_and_properties(properties) + } + "minecraft:warped_roots" => { + Self::warped_roots_from_identifier_and_properties(properties) + } + "minecraft:nether_sprouts" => { + Self::nether_sprouts_from_identifier_and_properties(properties) + } + "minecraft:crimson_stem" => { + Self::crimson_stem_from_identifier_and_properties(properties) + } + "minecraft:stripped_crimson_stem" => { + Self::stripped_crimson_stem_from_identifier_and_properties(properties) + } + "minecraft:crimson_hyphae" => { + Self::crimson_hyphae_from_identifier_and_properties(properties) + } + "minecraft:stripped_crimson_hyphae" => { + Self::stripped_crimson_hyphae_from_identifier_and_properties(properties) + } + "minecraft:crimson_nylium" => { + Self::crimson_nylium_from_identifier_and_properties(properties) + } + "minecraft:crimson_fungus" => { + Self::crimson_fungus_from_identifier_and_properties(properties) + } + "minecraft:shroomlight" => Self::shroomlight_from_identifier_and_properties(properties), + "minecraft:weeping_vines" => { + Self::weeping_vines_from_identifier_and_properties(properties) + } + "minecraft:weeping_vines_plant" => { + Self::weeping_vines_plant_from_identifier_and_properties(properties) + } + "minecraft:twisting_vines" => { + Self::twisting_vines_from_identifier_and_properties(properties) + } + "minecraft:twisting_vines_plant" => { + Self::twisting_vines_plant_from_identifier_and_properties(properties) + } + "minecraft:crimson_roots" => { + Self::crimson_roots_from_identifier_and_properties(properties) + } + "minecraft:crimson_planks" => { + Self::crimson_planks_from_identifier_and_properties(properties) + } + "minecraft:warped_planks" => { + Self::warped_planks_from_identifier_and_properties(properties) + } + "minecraft:crimson_slab" => { + Self::crimson_slab_from_identifier_and_properties(properties) + } + "minecraft:warped_slab" => Self::warped_slab_from_identifier_and_properties(properties), + "minecraft:crimson_pressure_plate" => { + Self::crimson_pressure_plate_from_identifier_and_properties(properties) + } + "minecraft:warped_pressure_plate" => { + Self::warped_pressure_plate_from_identifier_and_properties(properties) + } + "minecraft:crimson_fence" => { + Self::crimson_fence_from_identifier_and_properties(properties) + } + "minecraft:warped_fence" => { + Self::warped_fence_from_identifier_and_properties(properties) + } + "minecraft:crimson_trapdoor" => { + Self::crimson_trapdoor_from_identifier_and_properties(properties) + } + "minecraft:warped_trapdoor" => { + Self::warped_trapdoor_from_identifier_and_properties(properties) + } + "minecraft:crimson_fence_gate" => { + Self::crimson_fence_gate_from_identifier_and_properties(properties) + } + "minecraft:warped_fence_gate" => { + Self::warped_fence_gate_from_identifier_and_properties(properties) + } + "minecraft:crimson_stairs" => { + Self::crimson_stairs_from_identifier_and_properties(properties) + } + "minecraft:warped_stairs" => { + Self::warped_stairs_from_identifier_and_properties(properties) + } + "minecraft:crimson_button" => { + Self::crimson_button_from_identifier_and_properties(properties) + } + "minecraft:warped_button" => { + Self::warped_button_from_identifier_and_properties(properties) + } + "minecraft:crimson_door" => { + Self::crimson_door_from_identifier_and_properties(properties) + } + "minecraft:warped_door" => Self::warped_door_from_identifier_and_properties(properties), + "minecraft:crimson_sign" => { + Self::crimson_sign_from_identifier_and_properties(properties) + } + "minecraft:warped_sign" => Self::warped_sign_from_identifier_and_properties(properties), + "minecraft:crimson_wall_sign" => { + Self::crimson_wall_sign_from_identifier_and_properties(properties) + } + "minecraft:warped_wall_sign" => { + Self::warped_wall_sign_from_identifier_and_properties(properties) + } + "minecraft:structure_block" => { + Self::structure_block_from_identifier_and_properties(properties) + } + "minecraft:jigsaw" => Self::jigsaw_from_identifier_and_properties(properties), + "minecraft:composter" => Self::composter_from_identifier_and_properties(properties), + "minecraft:target" => Self::target_from_identifier_and_properties(properties), + "minecraft:bee_nest" => Self::bee_nest_from_identifier_and_properties(properties), + "minecraft:beehive" => Self::beehive_from_identifier_and_properties(properties), + "minecraft:honey_block" => Self::honey_block_from_identifier_and_properties(properties), + "minecraft:honeycomb_block" => { + Self::honeycomb_block_from_identifier_and_properties(properties) + } + "minecraft:netherite_block" => { + Self::netherite_block_from_identifier_and_properties(properties) + } + "minecraft:ancient_debris" => { + Self::ancient_debris_from_identifier_and_properties(properties) + } + "minecraft:crying_obsidian" => { + Self::crying_obsidian_from_identifier_and_properties(properties) + } + "minecraft:respawn_anchor" => { + Self::respawn_anchor_from_identifier_and_properties(properties) + } + "minecraft:potted_crimson_fungus" => { + Self::potted_crimson_fungus_from_identifier_and_properties(properties) + } + "minecraft:potted_warped_fungus" => { + Self::potted_warped_fungus_from_identifier_and_properties(properties) + } + "minecraft:potted_crimson_roots" => { + Self::potted_crimson_roots_from_identifier_and_properties(properties) + } + "minecraft:potted_warped_roots" => { + Self::potted_warped_roots_from_identifier_and_properties(properties) + } + "minecraft:lodestone" => Self::lodestone_from_identifier_and_properties(properties), + "minecraft:blackstone" => Self::blackstone_from_identifier_and_properties(properties), + "minecraft:blackstone_stairs" => { + Self::blackstone_stairs_from_identifier_and_properties(properties) + } + "minecraft:blackstone_wall" => { + Self::blackstone_wall_from_identifier_and_properties(properties) + } + "minecraft:blackstone_slab" => { + Self::blackstone_slab_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone" => { + Self::polished_blackstone_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone_bricks" => { + Self::polished_blackstone_bricks_from_identifier_and_properties(properties) + } + "minecraft:cracked_polished_blackstone_bricks" => { + Self::cracked_polished_blackstone_bricks_from_identifier_and_properties(properties) + } + "minecraft:chiseled_polished_blackstone" => { + Self::chiseled_polished_blackstone_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone_brick_slab" => { + Self::polished_blackstone_brick_slab_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone_brick_stairs" => { + Self::polished_blackstone_brick_stairs_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone_brick_wall" => { + Self::polished_blackstone_brick_wall_from_identifier_and_properties(properties) + } + "minecraft:gilded_blackstone" => { + Self::gilded_blackstone_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone_stairs" => { + Self::polished_blackstone_stairs_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone_slab" => { + Self::polished_blackstone_slab_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone_pressure_plate" => { + Self::polished_blackstone_pressure_plate_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone_button" => { + Self::polished_blackstone_button_from_identifier_and_properties(properties) + } + "minecraft:polished_blackstone_wall" => { + Self::polished_blackstone_wall_from_identifier_and_properties(properties) } - "minecraft:dead_brain_coral_wall_fan" => { - Self::dead_brain_coral_wall_fan_from_identifier_and_properties(properties) + "minecraft:chiseled_nether_bricks" => { + Self::chiseled_nether_bricks_from_identifier_and_properties(properties) } - "minecraft:dead_bubble_coral_wall_fan" => { - Self::dead_bubble_coral_wall_fan_from_identifier_and_properties(properties) + "minecraft:cracked_nether_bricks" => { + Self::cracked_nether_bricks_from_identifier_and_properties(properties) } - "minecraft:dead_fire_coral_wall_fan" => { - Self::dead_fire_coral_wall_fan_from_identifier_and_properties(properties) + "minecraft:quartz_bricks" => { + Self::quartz_bricks_from_identifier_and_properties(properties) } - "minecraft:dead_horn_coral_wall_fan" => { - Self::dead_horn_coral_wall_fan_from_identifier_and_properties(properties) + _ => None, + } + } + fn air_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::air(); + Some(block) + } + fn stone_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::stone(); + Some(block) + } + fn granite_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::granite(); + Some(block) + } + fn polished_granite_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::polished_granite(); + Some(block) + } + fn diorite_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::diorite(); + Some(block) + } + fn polished_diorite_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::polished_diorite(); + Some(block) + } + fn andesite_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::andesite(); + Some(block) + } + fn polished_andesite_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::polished_andesite(); + Some(block) + } + fn grass_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::grass_block(); + let snowy = map.get("snowy")?; + let snowy = bool::from_str(snowy).ok()?; + block.set_snowy(snowy); + Some(block) + } + fn dirt_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::dirt(); + Some(block) + } + fn coarse_dirt_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::coarse_dirt(); + Some(block) + } + fn podzol_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::podzol(); + let snowy = map.get("snowy")?; + let snowy = bool::from_str(snowy).ok()?; + block.set_snowy(snowy); + Some(block) + } + fn cobblestone_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cobblestone(); + Some(block) + } + fn oak_planks_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_planks(); + Some(block) + } + fn spruce_planks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::spruce_planks(); + Some(block) + } + fn birch_planks_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_planks(); + Some(block) + } + fn jungle_planks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::jungle_planks(); + Some(block) + } + fn acacia_planks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::acacia_planks(); + Some(block) + } + fn dark_oak_planks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_oak_planks(); + Some(block) + } + fn oak_sapling_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_sapling(); + let stage = map.get("stage")?; + let stage = { + let x = i32::from_str(stage).ok()?; + if !(0i32..=1i32).contains(&x) { + return None; } - "minecraft:tube_coral_wall_fan" => { - Self::tube_coral_wall_fan_from_identifier_and_properties(properties) + x + }; + block.set_stage(stage); + Some(block) + } + fn spruce_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::spruce_sapling(); + let stage = map.get("stage")?; + let stage = { + let x = i32::from_str(stage).ok()?; + if !(0i32..=1i32).contains(&x) { + return None; } - "minecraft:brain_coral_wall_fan" => { - Self::brain_coral_wall_fan_from_identifier_and_properties(properties) + x + }; + block.set_stage(stage); + Some(block) + } + fn birch_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::birch_sapling(); + let stage = map.get("stage")?; + let stage = { + let x = i32::from_str(stage).ok()?; + if !(0i32..=1i32).contains(&x) { + return None; } - "minecraft:bubble_coral_wall_fan" => { - Self::bubble_coral_wall_fan_from_identifier_and_properties(properties) + x + }; + block.set_stage(stage); + Some(block) + } + fn jungle_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::jungle_sapling(); + let stage = map.get("stage")?; + let stage = { + let x = i32::from_str(stage).ok()?; + if !(0i32..=1i32).contains(&x) { + return None; } - "minecraft:fire_coral_wall_fan" => { - Self::fire_coral_wall_fan_from_identifier_and_properties(properties) + x + }; + block.set_stage(stage); + Some(block) + } + fn acacia_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::acacia_sapling(); + let stage = map.get("stage")?; + let stage = { + let x = i32::from_str(stage).ok()?; + if !(0i32..=1i32).contains(&x) { + return None; } - "minecraft:horn_coral_wall_fan" => { - Self::horn_coral_wall_fan_from_identifier_and_properties(properties) + x + }; + block.set_stage(stage); + Some(block) + } + fn dark_oak_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_oak_sapling(); + let stage = map.get("stage")?; + let stage = { + let x = i32::from_str(stage).ok()?; + if !(0i32..=1i32).contains(&x) { + return None; + } + x + }; + block.set_stage(stage); + Some(block) + } + fn bedrock_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::bedrock(); + Some(block) + } + fn water_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::water(); + let water_level = map.get("level")?; + let water_level = { + let x = i32::from_str(water_level).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_water_level(water_level); + Some(block) + } + fn lava_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lava(); + let water_level = map.get("level")?; + let water_level = { + let x = i32::from_str(water_level).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_water_level(water_level); + Some(block) + } + fn sand_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::sand(); + Some(block) + } + fn red_sand_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::red_sand(); + Some(block) + } + fn gravel_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::gravel(); + Some(block) + } + fn gold_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::gold_ore(); + Some(block) + } + fn iron_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::iron_ore(); + Some(block) + } + fn coal_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::coal_ore(); + Some(block) + } + fn nether_gold_ore_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::nether_gold_ore(); + Some(block) + } + fn oak_log_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn spruce_log_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::spruce_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn birch_log_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn jungle_log_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::jungle_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn acacia_log_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::acacia_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn dark_oak_log_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::dark_oak_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_spruce_log_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_spruce_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_birch_log_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_birch_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_jungle_log_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_jungle_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_acacia_log_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_acacia_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_dark_oak_log_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_dark_oak_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_oak_log_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_oak_log(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn oak_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn spruce_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::spruce_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn birch_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn jungle_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::jungle_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn acacia_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::acacia_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn dark_oak_wood_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_oak_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_oak_wood_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_oak_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_spruce_wood_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_spruce_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_birch_wood_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_birch_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_jungle_wood_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_jungle_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_acacia_wood_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_acacia_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn stripped_dark_oak_wood_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stripped_dark_oak_wood(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn oak_leaves_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_leaves(); + let distance_1_7 = map.get("distance")?; + let distance_1_7 = { + let x = i32::from_str(distance_1_7).ok()?; + if !(1i32..=7i32).contains(&x) { + return None; } - "minecraft:dead_tube_coral_fan" => { - Self::dead_tube_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_distance_1_7(distance_1_7); + let persistent = map.get("persistent")?; + let persistent = bool::from_str(persistent).ok()?; + block.set_persistent(persistent); + Some(block) + } + fn spruce_leaves_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::spruce_leaves(); + let distance_1_7 = map.get("distance")?; + let distance_1_7 = { + let x = i32::from_str(distance_1_7).ok()?; + if !(1i32..=7i32).contains(&x) { + return None; } - "minecraft:dead_brain_coral_fan" => { - Self::dead_brain_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_distance_1_7(distance_1_7); + let persistent = map.get("persistent")?; + let persistent = bool::from_str(persistent).ok()?; + block.set_persistent(persistent); + Some(block) + } + fn birch_leaves_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_leaves(); + let distance_1_7 = map.get("distance")?; + let distance_1_7 = { + let x = i32::from_str(distance_1_7).ok()?; + if !(1i32..=7i32).contains(&x) { + return None; } - "minecraft:dead_bubble_coral_fan" => { - Self::dead_bubble_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_distance_1_7(distance_1_7); + let persistent = map.get("persistent")?; + let persistent = bool::from_str(persistent).ok()?; + block.set_persistent(persistent); + Some(block) + } + fn jungle_leaves_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::jungle_leaves(); + let distance_1_7 = map.get("distance")?; + let distance_1_7 = { + let x = i32::from_str(distance_1_7).ok()?; + if !(1i32..=7i32).contains(&x) { + return None; } - "minecraft:dead_fire_coral_fan" => { - Self::dead_fire_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_distance_1_7(distance_1_7); + let persistent = map.get("persistent")?; + let persistent = bool::from_str(persistent).ok()?; + block.set_persistent(persistent); + Some(block) + } + fn acacia_leaves_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::acacia_leaves(); + let distance_1_7 = map.get("distance")?; + let distance_1_7 = { + let x = i32::from_str(distance_1_7).ok()?; + if !(1i32..=7i32).contains(&x) { + return None; } - "minecraft:dead_horn_coral_fan" => { - Self::dead_horn_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_distance_1_7(distance_1_7); + let persistent = map.get("persistent")?; + let persistent = bool::from_str(persistent).ok()?; + block.set_persistent(persistent); + Some(block) + } + fn dark_oak_leaves_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_oak_leaves(); + let distance_1_7 = map.get("distance")?; + let distance_1_7 = { + let x = i32::from_str(distance_1_7).ok()?; + if !(1i32..=7i32).contains(&x) { + return None; } - "minecraft:tube_coral_fan" => { - Self::tube_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_distance_1_7(distance_1_7); + let persistent = map.get("persistent")?; + let persistent = bool::from_str(persistent).ok()?; + block.set_persistent(persistent); + Some(block) + } + fn sponge_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::sponge(); + Some(block) + } + fn wet_sponge_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::wet_sponge(); + Some(block) + } + fn glass_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::glass(); + Some(block) + } + fn lapis_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lapis_ore(); + Some(block) + } + fn lapis_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lapis_block(); + Some(block) + } + fn dispenser_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::dispenser(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + let triggered = map.get("triggered")?; + let triggered = bool::from_str(triggered).ok()?; + block.set_triggered(triggered); + Some(block) + } + fn sandstone_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::sandstone(); + Some(block) + } + fn chiseled_sandstone_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::chiseled_sandstone(); + Some(block) + } + fn cut_sandstone_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::cut_sandstone(); + Some(block) + } + fn note_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::note_block(); + let instrument = map.get("instrument")?; + let instrument = Instrument::from_str(instrument).ok()?; + block.set_instrument(instrument); + let note = map.get("note")?; + let note = { + let x = i32::from_str(note).ok()?; + if !(0i32..=24i32).contains(&x) { + return None; } - "minecraft:brain_coral_fan" => { - Self::brain_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_note(note); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + Some(block) + } + fn white_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::white_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn orange_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::orange_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn magenta_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::magenta_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn light_blue_bed_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_blue_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn yellow_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::yellow_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn lime_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lime_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn pink_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::pink_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn gray_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::gray_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn light_gray_bed_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_gray_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn cyan_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cyan_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn purple_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::purple_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn blue_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::blue_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn brown_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::brown_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn green_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::green_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn red_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::red_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn black_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::black_bed(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let occupied = map.get("occupied")?; + let occupied = bool::from_str(occupied).ok()?; + block.set_occupied(occupied); + let part = map.get("part")?; + let part = Part::from_str(part).ok()?; + block.set_part(part); + Some(block) + } + fn powered_rail_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::powered_rail(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let powered_rail_shape = map.get("shape")?; + let powered_rail_shape = PoweredRailShape::from_str(powered_rail_shape).ok()?; + block.set_powered_rail_shape(powered_rail_shape); + Some(block) + } + fn detector_rail_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::detector_rail(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let powered_rail_shape = map.get("shape")?; + let powered_rail_shape = PoweredRailShape::from_str(powered_rail_shape).ok()?; + block.set_powered_rail_shape(powered_rail_shape); + Some(block) + } + fn sticky_piston_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::sticky_piston(); + let extended = map.get("extended")?; + let extended = bool::from_str(extended).ok()?; + block.set_extended(extended); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + Some(block) + } + fn cobweb_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cobweb(); + Some(block) + } + fn grass_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::grass(); + Some(block) + } + fn fern_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::fern(); + Some(block) + } + fn dead_bush_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::dead_bush(); + Some(block) + } + fn seagrass_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::seagrass(); + Some(block) + } + fn tall_seagrass_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::tall_seagrass(); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + Some(block) + } + fn piston_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::piston(); + let extended = map.get("extended")?; + let extended = bool::from_str(extended).ok()?; + block.set_extended(extended); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + Some(block) + } + fn piston_head_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::piston_head(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + let piston_kind = map.get("type")?; + let piston_kind = PistonKind::from_str(piston_kind).ok()?; + block.set_piston_kind(piston_kind); + let short = map.get("short")?; + let short = bool::from_str(short).ok()?; + block.set_short(short); + Some(block) + } + fn white_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::white_wool(); + Some(block) + } + fn orange_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::orange_wool(); + Some(block) + } + fn magenta_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::magenta_wool(); + Some(block) + } + fn light_blue_wool_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_blue_wool(); + Some(block) + } + fn yellow_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::yellow_wool(); + Some(block) + } + fn lime_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lime_wool(); + Some(block) + } + fn pink_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::pink_wool(); + Some(block) + } + fn gray_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::gray_wool(); + Some(block) + } + fn light_gray_wool_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_gray_wool(); + Some(block) + } + fn cyan_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cyan_wool(); + Some(block) + } + fn purple_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::purple_wool(); + Some(block) + } + fn blue_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::blue_wool(); + Some(block) + } + fn brown_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::brown_wool(); + Some(block) + } + fn green_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::green_wool(); + Some(block) + } + fn red_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::red_wool(); + Some(block) + } + fn black_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::black_wool(); + Some(block) + } + fn moving_piston_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::moving_piston(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + let piston_kind = map.get("type")?; + let piston_kind = PistonKind::from_str(piston_kind).ok()?; + block.set_piston_kind(piston_kind); + Some(block) + } + fn dandelion_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::dandelion(); + Some(block) + } + fn poppy_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::poppy(); + Some(block) + } + fn blue_orchid_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::blue_orchid(); + Some(block) + } + fn allium_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::allium(); + Some(block) + } + fn azure_bluet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::azure_bluet(); + Some(block) + } + fn red_tulip_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::red_tulip(); + Some(block) + } + fn orange_tulip_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::orange_tulip(); + Some(block) + } + fn white_tulip_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::white_tulip(); + Some(block) + } + fn pink_tulip_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::pink_tulip(); + Some(block) + } + fn oxeye_daisy_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oxeye_daisy(); + Some(block) + } + fn cornflower_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cornflower(); + Some(block) + } + fn wither_rose_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::wither_rose(); + Some(block) + } + fn lily_of_the_valley_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::lily_of_the_valley(); + Some(block) + } + fn brown_mushroom_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::brown_mushroom(); + Some(block) + } + fn red_mushroom_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::red_mushroom(); + Some(block) + } + fn gold_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::gold_block(); + Some(block) + } + fn iron_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::iron_block(); + Some(block) + } + fn bricks_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::bricks(); + Some(block) + } + fn tnt_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::tnt(); + let unstable = map.get("unstable")?; + let unstable = bool::from_str(unstable).ok()?; + block.set_unstable(unstable); + Some(block) + } + fn bookshelf_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::bookshelf(); + Some(block) + } + fn mossy_cobblestone_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::mossy_cobblestone(); + Some(block) + } + fn obsidian_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::obsidian(); + Some(block) + } + fn torch_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::torch(); + Some(block) + } + fn wall_torch_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::wall_torch(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + Some(block) + } + fn fire_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::fire(); + let age_0_15 = map.get("age")?; + let age_0_15 = { + let x = i32::from_str(age_0_15).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; } - "minecraft:bubble_coral_fan" => { - Self::bubble_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_age_0_15(age_0_15); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); + Some(block) + } + fn soul_fire_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::soul_fire(); + Some(block) + } + fn spawner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::spawner(); + Some(block) + } + fn oak_stairs_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn chest_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::chest(); + let chest_kind = map.get("type")?; + let chest_kind = ChestKind::from_str(chest_kind).ok()?; + block.set_chest_kind(chest_kind); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn redstone_wire_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::redstone_wire(); + let east_wire = map.get("east")?; + let east_wire = EastWire::from_str(east_wire).ok()?; + block.set_east_wire(east_wire); + let north_wire = map.get("north")?; + let north_wire = NorthWire::from_str(north_wire).ok()?; + block.set_north_wire(north_wire); + let power = map.get("power")?; + let power = { + let x = i32::from_str(power).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; } - "minecraft:fire_coral_fan" => { - Self::fire_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_power(power); + let south_wire = map.get("south")?; + let south_wire = SouthWire::from_str(south_wire).ok()?; + block.set_south_wire(south_wire); + let west_wire = map.get("west")?; + let west_wire = WestWire::from_str(west_wire).ok()?; + block.set_west_wire(west_wire); + Some(block) + } + fn diamond_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::diamond_ore(); + Some(block) + } + fn diamond_block_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::diamond_block(); + Some(block) + } + fn crafting_table_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::crafting_table(); + Some(block) + } + fn wheat_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::wheat(); + let age_0_7 = map.get("age")?; + let age_0_7 = { + let x = i32::from_str(age_0_7).ok()?; + if !(0i32..=7i32).contains(&x) { + return None; } - "minecraft:horn_coral_fan" => { - Self::horn_coral_fan_from_identifier_and_properties(properties) + x + }; + block.set_age_0_7(age_0_7); + Some(block) + } + fn farmland_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::farmland(); + let moisture = map.get("moisture")?; + let moisture = { + let x = i32::from_str(moisture).ok()?; + if !(0i32..=7i32).contains(&x) { + return None; } - "minecraft:sea_pickle" => Self::sea_pickle_from_identifier_and_properties(properties), - "minecraft:blue_ice" => Self::blue_ice_from_identifier_and_properties(properties), - "minecraft:conduit" => Self::conduit_from_identifier_and_properties(properties), - "minecraft:void_air" => Self::void_air_from_identifier_and_properties(properties), - "minecraft:cave_air" => Self::cave_air_from_identifier_and_properties(properties), - "minecraft:bubble_column" => { - Self::bubble_column_from_identifier_and_properties(properties) + x + }; + block.set_moisture(moisture); + Some(block) + } + fn furnace_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::furnace(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let lit = map.get("lit")?; + let lit = bool::from_str(lit).ok()?; + block.set_lit(lit); + Some(block) + } + fn oak_sign_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_sign(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; } - "minecraft:structure_block" => { - Self::structure_block_from_identifier_and_properties(properties) + x + }; + block.set_rotation(rotation); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn spruce_sign_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::spruce_sign(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; } - _ => None, - } + x + }; + block.set_rotation(rotation); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) } - fn air_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::air(); + fn birch_sign_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_sign(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn stone_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::stone(); + fn acacia_sign_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::acacia_sign(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn granite_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::granite(); + fn jungle_sign_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::jungle_sign(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn polished_granite_from_identifier_and_properties( + fn dark_oak_sign_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::polished_granite(); + let mut block = BlockId::dark_oak_sign(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn diorite_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::diorite(); + fn oak_door_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_door(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + let hinge = map.get("hinge")?; + let hinge = Hinge::from_str(hinge).ok()?; + block.set_hinge(hinge); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn polished_diorite_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::polished_diorite(); + fn ladder_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::ladder(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn andesite_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::andesite(); + fn rail_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::rail(); + let rail_shape = map.get("shape")?; + let rail_shape = RailShape::from_str(rail_shape).ok()?; + block.set_rail_shape(rail_shape); Some(block) } - fn polished_andesite_from_identifier_and_properties( + fn cobblestone_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::polished_andesite(); + let mut block = BlockId::cobblestone_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn grass_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::grass_block(); - let snowy = map.get("snowy")?; - let snowy = bool::from_str(snowy).ok()?; - block.set_snowy(snowy); + fn oak_wall_sign_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::oak_wall_sign(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn dirt_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::dirt(); + fn spruce_wall_sign_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::spruce_wall_sign(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn coarse_dirt_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::coarse_dirt(); + fn birch_wall_sign_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::birch_wall_sign(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn podzol_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::podzol(); - let snowy = map.get("snowy")?; - let snowy = bool::from_str(snowy).ok()?; - block.set_snowy(snowy); + fn acacia_wall_sign_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::acacia_wall_sign(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn cobblestone_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cobblestone(); + fn jungle_wall_sign_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::jungle_wall_sign(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn oak_planks_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_planks(); + fn dark_oak_wall_sign_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_oak_wall_sign(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn spruce_planks_from_identifier_and_properties( + fn lever_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lever(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + Some(block) + } + fn stone_pressure_plate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::spruce_planks(); + let mut block = BlockId::stone_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn birch_planks_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::birch_planks(); + fn iron_door_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::iron_door(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + let hinge = map.get("hinge")?; + let hinge = Hinge::from_str(hinge).ok()?; + block.set_hinge(hinge); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn jungle_planks_from_identifier_and_properties( + fn oak_pressure_plate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::jungle_planks(); + let mut block = BlockId::oak_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn acacia_planks_from_identifier_and_properties( + fn spruce_pressure_plate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::acacia_planks(); + let mut block = BlockId::spruce_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn dark_oak_planks_from_identifier_and_properties( + fn birch_pressure_plate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_planks(); + let mut block = BlockId::birch_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn oak_sapling_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_sapling(); - let stage = map.get("stage")?; - let stage = { - let x = i32::from_str(stage).ok()?; - if !(0i32..=1i32).contains(&x) { - return None; - } - x - }; - block.set_stage(stage); + fn jungle_pressure_plate_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::jungle_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn spruce_sapling_from_identifier_and_properties( + fn acacia_pressure_plate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::spruce_sapling(); - let stage = map.get("stage")?; - let stage = { - let x = i32::from_str(stage).ok()?; - if !(0i32..=1i32).contains(&x) { - return None; - } - x - }; - block.set_stage(stage); + let mut block = BlockId::acacia_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn birch_sapling_from_identifier_and_properties( + fn dark_oak_pressure_plate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::birch_sapling(); - let stage = map.get("stage")?; - let stage = { - let x = i32::from_str(stage).ok()?; - if !(0i32..=1i32).contains(&x) { - return None; - } - x - }; - block.set_stage(stage); + let mut block = BlockId::dark_oak_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn jungle_sapling_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::jungle_sapling(); - let stage = map.get("stage")?; - let stage = { - let x = i32::from_str(stage).ok()?; - if !(0i32..=1i32).contains(&x) { - return None; - } - x - }; - block.set_stage(stage); + fn redstone_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::redstone_ore(); + let lit = map.get("lit")?; + let lit = bool::from_str(lit).ok()?; + block.set_lit(lit); Some(block) } - fn acacia_sapling_from_identifier_and_properties( + fn redstone_torch_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::acacia_sapling(); - let stage = map.get("stage")?; - let stage = { - let x = i32::from_str(stage).ok()?; - if !(0i32..=1i32).contains(&x) { - return None; - } - x - }; - block.set_stage(stage); + let mut block = BlockId::redstone_torch(); + let lit = map.get("lit")?; + let lit = bool::from_str(lit).ok()?; + block.set_lit(lit); Some(block) } - fn dark_oak_sapling_from_identifier_and_properties( + fn redstone_wall_torch_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_sapling(); - let stage = map.get("stage")?; - let stage = { - let x = i32::from_str(stage).ok()?; - if !(0i32..=1i32).contains(&x) { + let mut block = BlockId::redstone_wall_torch(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let lit = map.get("lit")?; + let lit = bool::from_str(lit).ok()?; + block.set_lit(lit); + Some(block) + } + fn stone_button_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::stone_button(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + Some(block) + } + fn snow_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::snow(); + let layers = map.get("layers")?; + let layers = { + let x = i32::from_str(layers).ok()?; + if !(1i32..=8i32).contains(&x) { return None; } x }; - block.set_stage(stage); + block.set_layers(layers); Some(block) } - fn bedrock_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::bedrock(); + fn ice_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::ice(); Some(block) } - fn water_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::water(); - let water_level = map.get("level")?; - let water_level = { - let x = i32::from_str(water_level).ok()?; + fn snow_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::snow_block(); + Some(block) + } + fn cactus_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cactus(); + let age_0_15 = map.get("age")?; + let age_0_15 = { + let x = i32::from_str(age_0_15).ok()?; if !(0i32..=15i32).contains(&x) { return None; } x }; - block.set_water_level(water_level); + block.set_age_0_15(age_0_15); Some(block) } - fn lava_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lava(); - let water_level = map.get("level")?; - let water_level = { - let x = i32::from_str(water_level).ok()?; + fn clay_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::clay(); + Some(block) + } + fn sugar_cane_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::sugar_cane(); + let age_0_15 = map.get("age")?; + let age_0_15 = { + let x = i32::from_str(age_0_15).ok()?; if !(0i32..=15i32).contains(&x) { return None; } x }; - block.set_water_level(water_level); + block.set_age_0_15(age_0_15); Some(block) } - fn sand_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::sand(); + fn jukebox_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::jukebox(); + let has_record = map.get("has_record")?; + let has_record = bool::from_str(has_record).ok()?; + block.set_has_record(has_record); Some(block) } - fn red_sand_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::red_sand(); + fn oak_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_fence(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn gravel_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::gravel(); + fn pumpkin_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::pumpkin(); Some(block) } - fn gold_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::gold_ore(); + fn netherrack_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::netherrack(); Some(block) } - fn iron_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::iron_ore(); + fn soul_sand_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::soul_sand(); Some(block) } - fn coal_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::coal_ore(); + fn soul_soil_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::soul_soil(); Some(block) } - fn oak_log_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_log(); + fn basalt_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::basalt(); let axis_xyz = map.get("axis")?; let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; block.set_axis_xyz(axis_xyz); Some(block) } - fn spruce_log_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::spruce_log(); + fn polished_basalt_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::polished_basalt(); let axis_xyz = map.get("axis")?; let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; block.set_axis_xyz(axis_xyz); Some(block) } - fn birch_log_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::birch_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + fn soul_torch_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::soul_torch(); Some(block) } - fn jungle_log_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::jungle_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + fn soul_wall_torch_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::soul_wall_torch(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn acacia_log_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::acacia_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + fn glowstone_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::glowstone(); Some(block) } - fn dark_oak_log_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::dark_oak_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + fn nether_portal_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::nether_portal(); + let axis_xz = map.get("axis")?; + let axis_xz = AxisXz::from_str(axis_xz).ok()?; + block.set_axis_xz(axis_xz); Some(block) } - fn stripped_spruce_log_from_identifier_and_properties( + fn carved_pumpkin_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_spruce_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::carved_pumpkin(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn stripped_birch_log_from_identifier_and_properties( + fn jack_o_lantern_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_birch_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::jack_o_lantern(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + Some(block) + } + fn cake_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cake(); + let bites = map.get("bites")?; + let bites = { + let x = i32::from_str(bites).ok()?; + if !(0i32..=6i32).contains(&x) { + return None; + } + x + }; + block.set_bites(bites); + Some(block) + } + fn repeater_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::repeater(); + let delay = map.get("delay")?; + let delay = { + let x = i32::from_str(delay).ok()?; + if !(1i32..=4i32).contains(&x) { + return None; + } + x + }; + block.set_delay(delay); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let locked = map.get("locked")?; + let locked = bool::from_str(locked).ok()?; + block.set_locked(locked); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn stripped_jungle_log_from_identifier_and_properties( + fn white_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_jungle_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::white_stained_glass(); Some(block) } - fn stripped_acacia_log_from_identifier_and_properties( + fn orange_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_acacia_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::orange_stained_glass(); Some(block) } - fn stripped_dark_oak_log_from_identifier_and_properties( + fn magenta_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_dark_oak_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::magenta_stained_glass(); Some(block) } - fn stripped_oak_log_from_identifier_and_properties( + fn light_blue_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_oak_log(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); - Some(block) - } - fn oak_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); - Some(block) - } - fn spruce_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::spruce_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::light_blue_stained_glass(); Some(block) } - fn birch_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::birch_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + fn yellow_stained_glass_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::yellow_stained_glass(); Some(block) } - fn jungle_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::jungle_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + fn lime_stained_glass_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::lime_stained_glass(); Some(block) } - fn acacia_wood_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::acacia_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + fn pink_stained_glass_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::pink_stained_glass(); Some(block) } - fn dark_oak_wood_from_identifier_and_properties( + fn gray_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::gray_stained_glass(); Some(block) } - fn stripped_oak_wood_from_identifier_and_properties( + fn light_gray_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_oak_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::light_gray_stained_glass(); Some(block) } - fn stripped_spruce_wood_from_identifier_and_properties( + fn cyan_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_spruce_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::cyan_stained_glass(); Some(block) } - fn stripped_birch_wood_from_identifier_and_properties( + fn purple_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_birch_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::purple_stained_glass(); Some(block) } - fn stripped_jungle_wood_from_identifier_and_properties( + fn blue_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_jungle_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::blue_stained_glass(); Some(block) } - fn stripped_acacia_wood_from_identifier_and_properties( + fn brown_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_acacia_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::brown_stained_glass(); Some(block) } - fn stripped_dark_oak_wood_from_identifier_and_properties( + fn green_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stripped_dark_oak_wood(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::green_stained_glass(); Some(block) } - fn oak_leaves_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_leaves(); - let distance = map.get("distance")?; - let distance = { - let x = i32::from_str(distance).ok()?; - if !(1i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_distance(distance); - let persistent = map.get("persistent")?; - let persistent = bool::from_str(persistent).ok()?; - block.set_persistent(persistent); + fn red_stained_glass_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::red_stained_glass(); Some(block) } - fn spruce_leaves_from_identifier_and_properties( + fn black_stained_glass_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::spruce_leaves(); - let distance = map.get("distance")?; - let distance = { - let x = i32::from_str(distance).ok()?; - if !(1i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_distance(distance); - let persistent = map.get("persistent")?; - let persistent = bool::from_str(persistent).ok()?; - block.set_persistent(persistent); + let mut block = BlockId::black_stained_glass(); Some(block) } - fn birch_leaves_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::birch_leaves(); - let distance = map.get("distance")?; - let distance = { - let x = i32::from_str(distance).ok()?; - if !(1i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_distance(distance); - let persistent = map.get("persistent")?; - let persistent = bool::from_str(persistent).ok()?; - block.set_persistent(persistent); + fn oak_trapdoor_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_trapdoor(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn jungle_leaves_from_identifier_and_properties( + fn spruce_trapdoor_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::jungle_leaves(); - let distance = map.get("distance")?; - let distance = { - let x = i32::from_str(distance).ok()?; - if !(1i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_distance(distance); - let persistent = map.get("persistent")?; - let persistent = bool::from_str(persistent).ok()?; - block.set_persistent(persistent); + let mut block = BlockId::spruce_trapdoor(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn acacia_leaves_from_identifier_and_properties( + fn birch_trapdoor_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::acacia_leaves(); - let distance = map.get("distance")?; - let distance = { - let x = i32::from_str(distance).ok()?; - if !(1i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_distance(distance); - let persistent = map.get("persistent")?; - let persistent = bool::from_str(persistent).ok()?; - block.set_persistent(persistent); + let mut block = BlockId::birch_trapdoor(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn dark_oak_leaves_from_identifier_and_properties( + fn jungle_trapdoor_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_leaves(); - let distance = map.get("distance")?; - let distance = { - let x = i32::from_str(distance).ok()?; - if !(1i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_distance(distance); - let persistent = map.get("persistent")?; - let persistent = bool::from_str(persistent).ok()?; - block.set_persistent(persistent); + let mut block = BlockId::jungle_trapdoor(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn sponge_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::sponge(); + fn acacia_trapdoor_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::acacia_trapdoor(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn wet_sponge_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::wet_sponge(); + fn dark_oak_trapdoor_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_oak_trapdoor(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn glass_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::glass(); + fn stone_bricks_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::stone_bricks(); Some(block) } - fn lapis_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lapis_ore(); + fn mossy_stone_bricks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::mossy_stone_bricks(); Some(block) } - fn lapis_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lapis_block(); + fn cracked_stone_bricks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::cracked_stone_bricks(); Some(block) } - fn dispenser_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::dispenser(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); - let triggered = map.get("triggered")?; - let triggered = bool::from_str(triggered).ok()?; - block.set_triggered(triggered); + fn chiseled_stone_bricks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::chiseled_stone_bricks(); Some(block) } - fn sandstone_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::sandstone(); + fn infested_stone_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::infested_stone(); Some(block) } - fn chiseled_sandstone_from_identifier_and_properties( + fn infested_cobblestone_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::chiseled_sandstone(); + let mut block = BlockId::infested_cobblestone(); Some(block) } - fn cut_sandstone_from_identifier_and_properties( + fn infested_stone_bricks_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cut_sandstone(); + let mut block = BlockId::infested_stone_bricks(); Some(block) } - fn note_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::note_block(); - let instrument = map.get("instrument")?; - let instrument = Instrument::from_str(instrument).ok()?; - block.set_instrument(instrument); - let note = map.get("note")?; - let note = { - let x = i32::from_str(note).ok()?; - if !(0i32..=24i32).contains(&x) { - return None; - } - x - }; - block.set_note(note); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + fn infested_mossy_stone_bricks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::infested_mossy_stone_bricks(); Some(block) } - fn white_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::white_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn infested_cracked_stone_bricks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::infested_cracked_stone_bricks(); Some(block) } - fn orange_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::orange_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn infested_chiseled_stone_bricks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::infested_chiseled_stone_bricks(); Some(block) } - fn magenta_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::magenta_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn brown_mushroom_block_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::brown_mushroom_block(); + let down = map.get("down")?; + let down = bool::from_str(down).ok()?; + block.set_down(down); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn light_blue_bed_from_identifier_and_properties( + fn red_mushroom_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + let mut block = BlockId::red_mushroom_block(); + let down = map.get("down")?; + let down = bool::from_str(down).ok()?; + block.set_down(down); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn yellow_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::yellow_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn mushroom_stem_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::mushroom_stem(); + let down = map.get("down")?; + let down = bool::from_str(down).ok()?; + block.set_down(down); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn lime_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lime_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn iron_bars_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::iron_bars(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn pink_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::pink_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn chain_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::chain(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn gray_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::gray_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn glass_pane_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn light_gray_bed_from_identifier_and_properties( + fn melon_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::melon(); + Some(block) + } + fn attached_pumpkin_stem_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_bed(); + let mut block = BlockId::attached_pumpkin_stem(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); Some(block) } - fn cyan_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cyan_bed(); + fn attached_melon_stem_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::attached_melon_stem(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); Some(block) } - fn purple_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::purple_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn pumpkin_stem_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::pumpkin_stem(); + let age_0_7 = map.get("age")?; + let age_0_7 = { + let x = i32::from_str(age_0_7).ok()?; + if !(0i32..=7i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_7(age_0_7); Some(block) } - fn blue_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::blue_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn melon_stem_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::melon_stem(); + let age_0_7 = map.get("age")?; + let age_0_7 = { + let x = i32::from_str(age_0_7).ok()?; + if !(0i32..=7i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_7(age_0_7); Some(block) } - fn brown_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::brown_bed(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + fn vine_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::vine(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn green_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::green_bed(); + fn oak_fence_gate_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::oak_fence_gate(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + let in_wall = map.get("in_wall")?; + let in_wall = bool::from_str(in_wall).ok()?; + block.set_in_wall(in_wall); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn red_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::red_bed(); + fn brick_stairs_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::brick_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn black_bed_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::black_bed(); + fn stone_brick_stairs_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stone_brick_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let occupied = map.get("occupied")?; - let occupied = bool::from_str(occupied).ok()?; - block.set_occupied(occupied); - let part = map.get("part")?; - let part = Part::from_str(part).ok()?; - block.set_part(part); - Some(block) - } - fn powered_rail_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::powered_rail(); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - let powered_rail_shape = map.get("shape")?; - let powered_rail_shape = PoweredRailShape::from_str(powered_rail_shape).ok()?; - block.set_powered_rail_shape(powered_rail_shape); - Some(block) - } - fn detector_rail_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::detector_rail(); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - let powered_rail_shape = map.get("shape")?; - let powered_rail_shape = PoweredRailShape::from_str(powered_rail_shape).ok()?; - block.set_powered_rail_shape(powered_rail_shape); - Some(block) - } - fn sticky_piston_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::sticky_piston(); - let extended = map.get("extended")?; - let extended = bool::from_str(extended).ok()?; - block.set_extended(extended); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); - Some(block) - } - fn cobweb_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cobweb(); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn grass_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::grass(); + fn mycelium_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::mycelium(); + let snowy = map.get("snowy")?; + let snowy = bool::from_str(snowy).ok()?; + block.set_snowy(snowy); Some(block) - } - fn fern_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::fern(); + } + fn lily_pad_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lily_pad(); Some(block) } - fn dead_bush_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::dead_bush(); + fn nether_bricks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::nether_bricks(); Some(block) } - fn seagrass_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::seagrass(); + fn nether_brick_fence_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::nether_brick_fence(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn tall_seagrass_from_identifier_and_properties( + fn nether_brick_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::tall_seagrass(); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); + let mut block = BlockId::nether_brick_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn piston_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::piston(); - let extended = map.get("extended")?; - let extended = bool::from_str(extended).ok()?; - block.set_extended(extended); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + fn nether_wart_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::nether_wart(); + let age_0_3 = map.get("age")?; + let age_0_3 = { + let x = i32::from_str(age_0_3).ok()?; + if !(0i32..=3i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_3(age_0_3); Some(block) } - fn piston_head_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::piston_head(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); - let piston_kind = map.get("type")?; - let piston_kind = PistonKind::from_str(piston_kind).ok()?; - block.set_piston_kind(piston_kind); - let short = map.get("short")?; - let short = bool::from_str(short).ok()?; - block.set_short(short); + fn enchanting_table_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::enchanting_table(); Some(block) } - fn white_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::white_wool(); + fn brewing_stand_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::brewing_stand(); + let has_bottle_0 = map.get("has_bottle_0")?; + let has_bottle_0 = bool::from_str(has_bottle_0).ok()?; + block.set_has_bottle_0(has_bottle_0); + let has_bottle_1 = map.get("has_bottle_1")?; + let has_bottle_1 = bool::from_str(has_bottle_1).ok()?; + block.set_has_bottle_1(has_bottle_1); + let has_bottle_2 = map.get("has_bottle_2")?; + let has_bottle_2 = bool::from_str(has_bottle_2).ok()?; + block.set_has_bottle_2(has_bottle_2); Some(block) } - fn orange_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::orange_wool(); + fn cauldron_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cauldron(); + let cauldron_level = map.get("level")?; + let cauldron_level = { + let x = i32::from_str(cauldron_level).ok()?; + if !(0i32..=3i32).contains(&x) { + return None; + } + x + }; + block.set_cauldron_level(cauldron_level); Some(block) } - fn magenta_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::magenta_wool(); + fn end_portal_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::end_portal(); Some(block) } - fn light_blue_wool_from_identifier_and_properties( + fn end_portal_frame_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_wool(); + let mut block = BlockId::end_portal_frame(); + let eye = map.get("eye")?; + let eye = bool::from_str(eye).ok()?; + block.set_eye(eye); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn yellow_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::yellow_wool(); + fn end_stone_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::end_stone(); Some(block) } - fn lime_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lime_wool(); + fn dragon_egg_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::dragon_egg(); Some(block) } - fn pink_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::pink_wool(); + fn redstone_lamp_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::redstone_lamp(); + let lit = map.get("lit")?; + let lit = bool::from_str(lit).ok()?; + block.set_lit(lit); Some(block) } - fn gray_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::gray_wool(); + fn cocoa_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cocoa(); + let age_0_2 = map.get("age")?; + let age_0_2 = { + let x = i32::from_str(age_0_2).ok()?; + if !(0i32..=2i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_2(age_0_2); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn light_gray_wool_from_identifier_and_properties( + fn sandstone_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_wool(); + let mut block = BlockId::sandstone_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn cyan_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cyan_wool(); + fn emerald_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::emerald_ore(); Some(block) } - fn purple_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::purple_wool(); + fn ender_chest_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::ender_chest(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn blue_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::blue_wool(); + fn tripwire_hook_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::tripwire_hook(); + let attached = map.get("attached")?; + let attached = bool::from_str(attached).ok()?; + block.set_attached(attached); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn brown_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::brown_wool(); + fn tripwire_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::tripwire(); + let attached = map.get("attached")?; + let attached = bool::from_str(attached).ok()?; + block.set_attached(attached); + let disarmed = map.get("disarmed")?; + let disarmed = bool::from_str(disarmed).ok()?; + block.set_disarmed(disarmed); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn green_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::green_wool(); + fn emerald_block_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::emerald_block(); Some(block) } - fn red_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::red_wool(); + fn spruce_stairs_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::spruce_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn birch_stairs_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn black_wool_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::black_wool(); + fn jungle_stairs_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::jungle_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn moving_piston_from_identifier_and_properties( + fn command_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::moving_piston(); + let mut block = BlockId::command_block(); + let conditional = map.get("conditional")?; + let conditional = bool::from_str(conditional).ok()?; + block.set_conditional(conditional); let facing_cubic = map.get("facing")?; let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; block.set_facing_cubic(facing_cubic); - let piston_kind = map.get("type")?; - let piston_kind = PistonKind::from_str(piston_kind).ok()?; - block.set_piston_kind(piston_kind); - Some(block) - } - fn dandelion_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::dandelion(); - Some(block) - } - fn poppy_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::poppy(); Some(block) } - fn blue_orchid_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::blue_orchid(); - Some(block) - } - fn allium_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::allium(); - Some(block) - } - fn azure_bluet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::azure_bluet(); + fn beacon_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::beacon(); Some(block) } - fn red_tulip_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::red_tulip(); + fn cobblestone_wall_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::cobblestone_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn orange_tulip_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::orange_tulip(); + fn mossy_cobblestone_wall_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::mossy_cobblestone_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn white_tulip_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::white_tulip(); + fn flower_pot_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::flower_pot(); Some(block) } - fn pink_tulip_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::pink_tulip(); + fn potted_oak_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_oak_sapling(); Some(block) } - fn oxeye_daisy_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oxeye_daisy(); + fn potted_spruce_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_spruce_sapling(); Some(block) } - fn brown_mushroom_from_identifier_and_properties( + fn potted_birch_sapling_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brown_mushroom(); + let mut block = BlockId::potted_birch_sapling(); Some(block) } - fn red_mushroom_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::red_mushroom(); + fn potted_jungle_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_jungle_sapling(); Some(block) } - fn gold_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::gold_block(); + fn potted_acacia_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_acacia_sapling(); Some(block) } - fn iron_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::iron_block(); + fn potted_dark_oak_sapling_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_dark_oak_sapling(); Some(block) } - fn bricks_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::bricks(); + fn potted_fern_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::potted_fern(); Some(block) } - fn tnt_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::tnt(); - let unstable = map.get("unstable")?; - let unstable = bool::from_str(unstable).ok()?; - block.set_unstable(unstable); + fn potted_dandelion_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_dandelion(); Some(block) } - fn bookshelf_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::bookshelf(); + fn potted_poppy_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::potted_poppy(); Some(block) } - fn mossy_cobblestone_from_identifier_and_properties( + fn potted_blue_orchid_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::mossy_cobblestone(); - Some(block) - } - fn obsidian_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::obsidian(); + let mut block = BlockId::potted_blue_orchid(); Some(block) } - fn torch_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::torch(); + fn potted_allium_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_allium(); Some(block) } - fn wall_torch_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::wall_torch(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + fn potted_azure_bluet_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_azure_bluet(); Some(block) } - fn fire_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::fire(); - let age_0_15 = map.get("age")?; - let age_0_15 = { - let x = i32::from_str(age_0_15).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_age_0_15(age_0_15); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let up = map.get("up")?; - let up = bool::from_str(up).ok()?; - block.set_up(up); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + fn potted_red_tulip_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_red_tulip(); Some(block) } - fn spawner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::spawner(); + fn potted_orange_tulip_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_orange_tulip(); Some(block) } - fn oak_stairs_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_stairs(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + fn potted_white_tulip_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_white_tulip(); Some(block) } - fn chest_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::chest(); - let chest_kind = map.get("type")?; - let chest_kind = ChestKind::from_str(chest_kind).ok()?; - block.set_chest_kind(chest_kind); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + fn potted_pink_tulip_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_pink_tulip(); Some(block) } - fn redstone_wire_from_identifier_and_properties( + fn potted_oxeye_daisy_from_identifier_and_properties( map: &BTreeMap, - ) -> Option { - let mut block = BlockId::redstone_wire(); - let east_wire = map.get("east")?; - let east_wire = EastWire::from_str(east_wire).ok()?; - block.set_east_wire(east_wire); - let north_wire = map.get("north")?; - let north_wire = NorthWire::from_str(north_wire).ok()?; - block.set_north_wire(north_wire); - let power = map.get("power")?; - let power = { - let x = i32::from_str(power).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_power(power); - let south_wire = map.get("south")?; - let south_wire = SouthWire::from_str(south_wire).ok()?; - block.set_south_wire(south_wire); - let west_wire = map.get("west")?; - let west_wire = WestWire::from_str(west_wire).ok()?; - block.set_west_wire(west_wire); + ) -> Option { + let mut block = BlockId::potted_oxeye_daisy(); Some(block) } - fn diamond_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::diamond_ore(); + fn potted_cornflower_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_cornflower(); Some(block) } - fn diamond_block_from_identifier_and_properties( + fn potted_lily_of_the_valley_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::diamond_block(); + let mut block = BlockId::potted_lily_of_the_valley(); Some(block) } - fn crafting_table_from_identifier_and_properties( + fn potted_wither_rose_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::crafting_table(); + let mut block = BlockId::potted_wither_rose(); Some(block) } - fn wheat_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::wheat(); + fn potted_red_mushroom_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_red_mushroom(); + Some(block) + } + fn potted_brown_mushroom_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_brown_mushroom(); + Some(block) + } + fn potted_dead_bush_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_dead_bush(); + Some(block) + } + fn potted_cactus_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_cactus(); + Some(block) + } + fn carrots_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::carrots(); let age_0_7 = map.get("age")?; let age_0_7 = { let x = i32::from_str(age_0_7).ok()?; @@ -17286,111 +23891,94 @@ impl BlockId { block.set_age_0_7(age_0_7); Some(block) } - fn farmland_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::farmland(); - let moisture = map.get("moisture")?; - let moisture = { - let x = i32::from_str(moisture).ok()?; + fn potatoes_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::potatoes(); + let age_0_7 = map.get("age")?; + let age_0_7 = { + let x = i32::from_str(age_0_7).ok()?; if !(0i32..=7i32).contains(&x) { return None; } x }; - block.set_moisture(moisture); + block.set_age_0_7(age_0_7); Some(block) } - fn furnace_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::furnace(); + fn oak_button_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_button(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let lit = map.get("lit")?; - let lit = bool::from_str(lit).ok()?; - block.set_lit(lit); - Some(block) - } - fn sign_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::sign(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn oak_door_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_door(); + fn spruce_button_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::spruce_button(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); - let hinge = map.get("hinge")?; - let hinge = Hinge::from_str(hinge).ok()?; - block.set_hinge(hinge); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); let powered = map.get("powered")?; let powered = bool::from_str(powered).ok()?; block.set_powered(powered); Some(block) } - fn ladder_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::ladder(); + fn birch_button_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_button(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - Some(block) - } - fn rail_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::rail(); - let rail_shape = map.get("shape")?; - let rail_shape = RailShape::from_str(rail_shape).ok()?; - block.set_rail_shape(rail_shape); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn cobblestone_stairs_from_identifier_and_properties( + fn jungle_button_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cobblestone_stairs(); + let mut block = BlockId::jungle_button(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn wall_sign_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::wall_sign(); + fn acacia_button_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::acacia_button(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn lever_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lever(); + fn dark_oak_button_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_oak_button(); let face = map.get("face")?; let face = Face::from_str(face).ok()?; block.set_face(face); @@ -17402,569 +23990,656 @@ impl BlockId { block.set_powered(powered); Some(block) } - fn stone_pressure_plate_from_identifier_and_properties( + fn skeleton_skull_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stone_pressure_plate(); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::skeleton_skull(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn iron_door_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::iron_door(); + fn skeleton_wall_skull_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::skeleton_wall_skull(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); - let hinge = map.get("hinge")?; - let hinge = Hinge::from_str(hinge).ok()?; - block.set_hinge(hinge); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); Some(block) } - fn oak_pressure_plate_from_identifier_and_properties( + fn wither_skeleton_skull_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::oak_pressure_plate(); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::wither_skeleton_skull(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn spruce_pressure_plate_from_identifier_and_properties( + fn wither_skeleton_wall_skull_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::spruce_pressure_plate(); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::wither_skeleton_wall_skull(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn birch_pressure_plate_from_identifier_and_properties( + fn zombie_head_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::zombie_head(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); + Some(block) + } + fn zombie_wall_head_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::birch_pressure_plate(); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::zombie_wall_head(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + Some(block) + } + fn player_head_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::player_head(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); + Some(block) + } + fn player_wall_head_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::player_wall_head(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn jungle_pressure_plate_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::jungle_pressure_plate(); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + fn creeper_head_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::creeper_head(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn acacia_pressure_plate_from_identifier_and_properties( + fn creeper_wall_head_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::acacia_pressure_plate(); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::creeper_wall_head(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn dark_oak_pressure_plate_from_identifier_and_properties( + fn dragon_head_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::dragon_head(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); + Some(block) + } + fn dragon_wall_head_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_pressure_plate(); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::dragon_wall_head(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn redstone_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::redstone_ore(); - let lit = map.get("lit")?; - let lit = bool::from_str(lit).ok()?; - block.set_lit(lit); + fn anvil_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::anvil(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn redstone_torch_from_identifier_and_properties( + fn chipped_anvil_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::redstone_torch(); - let lit = map.get("lit")?; - let lit = bool::from_str(lit).ok()?; - block.set_lit(lit); + let mut block = BlockId::chipped_anvil(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn redstone_wall_torch_from_identifier_and_properties( + fn damaged_anvil_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::redstone_wall_torch(); + let mut block = BlockId::damaged_anvil(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let lit = map.get("lit")?; - let lit = bool::from_str(lit).ok()?; - block.set_lit(lit); Some(block) } - fn stone_button_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::stone_button(); - let face = map.get("face")?; - let face = Face::from_str(face).ok()?; - block.set_face(face); + fn trapped_chest_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::trapped_chest(); + let chest_kind = map.get("type")?; + let chest_kind = ChestKind::from_str(chest_kind).ok()?; + block.set_chest_kind(chest_kind); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn snow_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::snow(); - let layers = map.get("layers")?; - let layers = { - let x = i32::from_str(layers).ok()?; - if !(1i32..=8i32).contains(&x) { + fn light_weighted_pressure_plate_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_weighted_pressure_plate(); + let power = map.get("power")?; + let power = { + let x = i32::from_str(power).ok()?; + if !(0i32..=15i32).contains(&x) { return None; } x }; - block.set_layers(layers); - Some(block) - } - fn ice_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::ice(); - Some(block) - } - fn snow_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::snow_block(); + block.set_power(power); Some(block) } - fn cactus_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cactus(); - let age_0_15 = map.get("age")?; - let age_0_15 = { - let x = i32::from_str(age_0_15).ok()?; + fn heavy_weighted_pressure_plate_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::heavy_weighted_pressure_plate(); + let power = map.get("power")?; + let power = { + let x = i32::from_str(power).ok()?; if !(0i32..=15i32).contains(&x) { return None; } x }; - block.set_age_0_15(age_0_15); + block.set_power(power); Some(block) } - fn clay_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::clay(); + fn comparator_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::comparator(); + let comparator_mode = map.get("mode")?; + let comparator_mode = ComparatorMode::from_str(comparator_mode).ok()?; + block.set_comparator_mode(comparator_mode); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn sugar_cane_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::sugar_cane(); - let age_0_15 = map.get("age")?; - let age_0_15 = { - let x = i32::from_str(age_0_15).ok()?; + fn daylight_detector_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::daylight_detector(); + let inverted = map.get("inverted")?; + let inverted = bool::from_str(inverted).ok()?; + block.set_inverted(inverted); + let power = map.get("power")?; + let power = { + let x = i32::from_str(power).ok()?; if !(0i32..=15i32).contains(&x) { return None; } x }; - block.set_age_0_15(age_0_15); - Some(block) - } - fn jukebox_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::jukebox(); - let has_record = map.get("has_record")?; - let has_record = bool::from_str(has_record).ok()?; - block.set_has_record(has_record); - Some(block) - } - fn oak_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_fence(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); - Some(block) - } - fn pumpkin_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::pumpkin(); + block.set_power(power); Some(block) } - fn netherrack_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::netherrack(); + fn redstone_block_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::redstone_block(); Some(block) } - fn soul_sand_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::soul_sand(); + fn nether_quartz_ore_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::nether_quartz_ore(); Some(block) } - fn glowstone_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::glowstone(); + fn hopper_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::hopper(); + let enabled = map.get("enabled")?; + let enabled = bool::from_str(enabled).ok()?; + block.set_enabled(enabled); + let facing_cardinal_and_down = map.get("facing")?; + let facing_cardinal_and_down = + FacingCardinalAndDown::from_str(facing_cardinal_and_down).ok()?; + block.set_facing_cardinal_and_down(facing_cardinal_and_down); Some(block) } - fn nether_portal_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::nether_portal(); - let axis_xz = map.get("axis")?; - let axis_xz = AxisXz::from_str(axis_xz).ok()?; - block.set_axis_xz(axis_xz); + fn quartz_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::quartz_block(); Some(block) } - fn carved_pumpkin_from_identifier_and_properties( + fn chiseled_quartz_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::carved_pumpkin(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::chiseled_quartz_block(); Some(block) } - fn jack_o_lantern_from_identifier_and_properties( + fn quartz_pillar_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::jack_o_lantern(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - Some(block) - } - fn cake_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cake(); - let bites = map.get("bites")?; - let bites = { - let x = i32::from_str(bites).ok()?; - if !(0i32..=6i32).contains(&x) { - return None; - } - x - }; - block.set_bites(bites); + let mut block = BlockId::quartz_pillar(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn repeater_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::repeater(); - let delay = map.get("delay")?; - let delay = { - let x = i32::from_str(delay).ok()?; - if !(1i32..=4i32).contains(&x) { - return None; - } - x - }; - block.set_delay(delay); + fn quartz_stairs_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::quartz_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let locked = map.get("locked")?; - let locked = bool::from_str(locked).ok()?; - block.set_locked(locked); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn activator_rail_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::activator_rail(); let powered = map.get("powered")?; let powered = bool::from_str(powered).ok()?; block.set_powered(powered); + let powered_rail_shape = map.get("shape")?; + let powered_rail_shape = PoweredRailShape::from_str(powered_rail_shape).ok()?; + block.set_powered_rail_shape(powered_rail_shape); Some(block) } - fn white_stained_glass_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::white_stained_glass(); + fn dropper_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::dropper(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + let triggered = map.get("triggered")?; + let triggered = bool::from_str(triggered).ok()?; + block.set_triggered(triggered); Some(block) } - fn orange_stained_glass_from_identifier_and_properties( + fn white_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::orange_stained_glass(); + let mut block = BlockId::white_terracotta(); Some(block) } - fn magenta_stained_glass_from_identifier_and_properties( + fn orange_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::magenta_stained_glass(); + let mut block = BlockId::orange_terracotta(); Some(block) } - fn light_blue_stained_glass_from_identifier_and_properties( + fn magenta_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_stained_glass(); + let mut block = BlockId::magenta_terracotta(); Some(block) } - fn yellow_stained_glass_from_identifier_and_properties( + fn light_blue_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::yellow_stained_glass(); + let mut block = BlockId::light_blue_terracotta(); Some(block) } - fn lime_stained_glass_from_identifier_and_properties( + fn yellow_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::lime_stained_glass(); + let mut block = BlockId::yellow_terracotta(); Some(block) } - fn pink_stained_glass_from_identifier_and_properties( + fn lime_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::pink_stained_glass(); + let mut block = BlockId::lime_terracotta(); Some(block) } - fn gray_stained_glass_from_identifier_and_properties( + fn pink_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::gray_stained_glass(); + let mut block = BlockId::pink_terracotta(); Some(block) } - fn light_gray_stained_glass_from_identifier_and_properties( + fn gray_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_stained_glass(); + let mut block = BlockId::gray_terracotta(); Some(block) } - fn cyan_stained_glass_from_identifier_and_properties( + fn light_gray_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cyan_stained_glass(); + let mut block = BlockId::light_gray_terracotta(); Some(block) } - fn purple_stained_glass_from_identifier_and_properties( + fn cyan_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purple_stained_glass(); + let mut block = BlockId::cyan_terracotta(); Some(block) } - fn blue_stained_glass_from_identifier_and_properties( + fn purple_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::blue_stained_glass(); + let mut block = BlockId::purple_terracotta(); Some(block) } - fn brown_stained_glass_from_identifier_and_properties( + fn blue_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brown_stained_glass(); + let mut block = BlockId::blue_terracotta(); Some(block) } - fn green_stained_glass_from_identifier_and_properties( + fn brown_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::green_stained_glass(); + let mut block = BlockId::brown_terracotta(); Some(block) } - fn red_stained_glass_from_identifier_and_properties( + fn green_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_stained_glass(); + let mut block = BlockId::green_terracotta(); Some(block) } - fn black_stained_glass_from_identifier_and_properties( + fn red_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::black_stained_glass(); - Some(block) - } - fn oak_trapdoor_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_trapdoor(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::red_terracotta(); Some(block) } - fn spruce_trapdoor_from_identifier_and_properties( + fn black_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::spruce_trapdoor(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::black_terracotta(); Some(block) } - fn birch_trapdoor_from_identifier_and_properties( + fn white_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::birch_trapdoor(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::white_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn jungle_trapdoor_from_identifier_and_properties( + fn orange_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::jungle_trapdoor(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::orange_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn acacia_trapdoor_from_identifier_and_properties( + fn magenta_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::acacia_trapdoor(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::magenta_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn dark_oak_trapdoor_from_identifier_and_properties( + fn light_blue_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_trapdoor(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::light_blue_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn infested_stone_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::infested_stone(); - Some(block) - } - fn infested_cobblestone_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::infested_cobblestone(); - Some(block) - } - fn infested_stone_bricks_from_identifier_and_properties( + fn yellow_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::infested_stone_bricks(); + let mut block = BlockId::yellow_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn infested_mossy_stone_bricks_from_identifier_and_properties( + fn lime_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::infested_mossy_stone_bricks(); + let mut block = BlockId::lime_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn infested_cracked_stone_bricks_from_identifier_and_properties( + fn pink_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::infested_cracked_stone_bricks(); + let mut block = BlockId::pink_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn infested_chiseled_stone_bricks_from_identifier_and_properties( + fn gray_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::infested_chiseled_stone_bricks(); - Some(block) - } - fn stone_bricks_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::stone_bricks(); + let mut block = BlockId::gray_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn mossy_stone_bricks_from_identifier_and_properties( + fn light_gray_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::mossy_stone_bricks(); + let mut block = BlockId::light_gray_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn cracked_stone_bricks_from_identifier_and_properties( + fn cyan_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cracked_stone_bricks(); + let mut block = BlockId::cyan_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn chiseled_stone_bricks_from_identifier_and_properties( + fn purple_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::chiseled_stone_bricks(); + let mut block = BlockId::purple_stained_glass_pane(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn brown_mushroom_block_from_identifier_and_properties( + fn blue_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brown_mushroom_block(); - let down = map.get("down")?; - let down = bool::from_str(down).ok()?; - block.set_down(down); + let mut block = BlockId::blue_stained_glass_pane(); let east_connected = map.get("east")?; let east_connected = bool::from_str(east_connected).ok()?; block.set_east_connected(east_connected); @@ -17974,21 +24649,18 @@ impl BlockId { let south_connected = map.get("south")?; let south_connected = bool::from_str(south_connected).ok()?; block.set_south_connected(south_connected); - let up = map.get("up")?; - let up = bool::from_str(up).ok()?; - block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); let west_connected = map.get("west")?; let west_connected = bool::from_str(west_connected).ok()?; block.set_west_connected(west_connected); Some(block) } - fn red_mushroom_block_from_identifier_and_properties( + fn brown_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_mushroom_block(); - let down = map.get("down")?; - let down = bool::from_str(down).ok()?; - block.set_down(down); + let mut block = BlockId::brown_stained_glass_pane(); let east_connected = map.get("east")?; let east_connected = bool::from_str(east_connected).ok()?; block.set_east_connected(east_connected); @@ -17998,21 +24670,18 @@ impl BlockId { let south_connected = map.get("south")?; let south_connected = bool::from_str(south_connected).ok()?; block.set_south_connected(south_connected); - let up = map.get("up")?; - let up = bool::from_str(up).ok()?; - block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); let west_connected = map.get("west")?; let west_connected = bool::from_str(west_connected).ok()?; block.set_west_connected(west_connected); Some(block) } - fn mushroom_stem_from_identifier_and_properties( + fn green_stained_glass_pane_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::mushroom_stem(); - let down = map.get("down")?; - let down = bool::from_str(down).ok()?; - block.set_down(down); + let mut block = BlockId::green_stained_glass_pane(); let east_connected = map.get("east")?; let east_connected = bool::from_str(east_connected).ok()?; block.set_east_connected(east_connected); @@ -18022,16 +24691,18 @@ impl BlockId { let south_connected = map.get("south")?; let south_connected = bool::from_str(south_connected).ok()?; block.set_south_connected(south_connected); - let up = map.get("up")?; - let up = bool::from_str(up).ok()?; - block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); let west_connected = map.get("west")?; let west_connected = bool::from_str(west_connected).ok()?; block.set_west_connected(west_connected); Some(block) } - fn iron_bars_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::iron_bars(); + fn red_stained_glass_pane_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::red_stained_glass_pane(); let east_connected = map.get("east")?; let east_connected = bool::from_str(east_connected).ok()?; block.set_east_connected(east_connected); @@ -18049,8 +24720,10 @@ impl BlockId { block.set_west_connected(west_connected); Some(block) } - fn glass_pane_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::glass_pane(); + fn black_stained_glass_pane_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::black_stained_glass_pane(); let east_connected = map.get("east")?; let east_connected = bool::from_str(east_connected).ok()?; block.set_east_connected(east_connected); @@ -18068,93 +24741,91 @@ impl BlockId { block.set_west_connected(west_connected); Some(block) } - fn melon_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::melon(); - Some(block) - } - fn attached_pumpkin_stem_from_identifier_and_properties( + fn acacia_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::attached_pumpkin_stem(); + let mut block = BlockId::acacia_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn attached_melon_stem_from_identifier_and_properties( + fn dark_oak_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::attached_melon_stem(); + let mut block = BlockId::dark_oak_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn pumpkin_stem_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::pumpkin_stem(); - let age_0_7 = map.get("age")?; - let age_0_7 = { - let x = i32::from_str(age_0_7).ok()?; - if !(0i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_age_0_7(age_0_7); - Some(block) - } - fn melon_stem_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::melon_stem(); - let age_0_7 = map.get("age")?; - let age_0_7 = { - let x = i32::from_str(age_0_7).ok()?; - if !(0i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_age_0_7(age_0_7); - Some(block) - } - fn vine_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::vine(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let up = map.get("up")?; - let up = bool::from_str(up).ok()?; - block.set_up(up); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + fn slime_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::slime_block(); Some(block) } - fn oak_fence_gate_from_identifier_and_properties( + fn barrier_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::barrier(); + Some(block) + } + fn iron_trapdoor_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::oak_fence_gate(); + let mut block = BlockId::iron_trapdoor(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let in_wall = map.get("in_wall")?; - let in_wall = bool::from_str(in_wall).ok()?; - block.set_in_wall(in_wall); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); let open = map.get("open")?; let open = bool::from_str(open).ok()?; block.set_open(open); let powered = map.get("powered")?; let powered = bool::from_str(powered).ok()?; block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn brick_stairs_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::brick_stairs(); + fn prismarine_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::prismarine(); + Some(block) + } + fn prismarine_bricks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::prismarine_bricks(); + Some(block) + } + fn dark_prismarine_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_prismarine(); + Some(block) + } + fn prismarine_stairs_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::prismarine_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); @@ -18169,10 +24840,28 @@ impl BlockId { block.set_waterlogged(waterlogged); Some(block) } - fn stone_brick_stairs_from_identifier_and_properties( + fn prismarine_brick_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stone_brick_stairs(); + let mut block = BlockId::prismarine_brick_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn dark_prismarine_stairs_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_prismarine_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); @@ -18187,2594 +24876,2332 @@ impl BlockId { block.set_waterlogged(waterlogged); Some(block) } - fn mycelium_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::mycelium(); - let snowy = map.get("snowy")?; - let snowy = bool::from_str(snowy).ok()?; - block.set_snowy(snowy); + fn prismarine_slab_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::prismarine_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn prismarine_brick_slab_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::prismarine_brick_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn dark_prismarine_slab_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dark_prismarine_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn sea_lantern_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::sea_lantern(); + Some(block) + } + fn hay_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::hay_block(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); + Some(block) + } + fn white_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::white_carpet(); + Some(block) + } + fn orange_carpet_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::orange_carpet(); + Some(block) + } + fn magenta_carpet_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::magenta_carpet(); + Some(block) + } + fn light_blue_carpet_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_blue_carpet(); + Some(block) + } + fn yellow_carpet_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::yellow_carpet(); + Some(block) + } + fn lime_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lime_carpet(); + Some(block) + } + fn pink_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::pink_carpet(); + Some(block) + } + fn gray_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::gray_carpet(); + Some(block) + } + fn light_gray_carpet_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_gray_carpet(); + Some(block) + } + fn cyan_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cyan_carpet(); + Some(block) + } + fn purple_carpet_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::purple_carpet(); + Some(block) + } + fn blue_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::blue_carpet(); + Some(block) + } + fn brown_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::brown_carpet(); + Some(block) + } + fn green_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::green_carpet(); + Some(block) + } + fn red_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::red_carpet(); + Some(block) + } + fn black_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::black_carpet(); + Some(block) + } + fn terracotta_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::terracotta(); + Some(block) + } + fn coal_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::coal_block(); + Some(block) + } + fn packed_ice_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::packed_ice(); + Some(block) + } + fn sunflower_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::sunflower(); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + Some(block) + } + fn lilac_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lilac(); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + Some(block) + } + fn rose_bush_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::rose_bush(); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + Some(block) + } + fn peony_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::peony(); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + Some(block) + } + fn tall_grass_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::tall_grass(); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + Some(block) + } + fn large_fern_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::large_fern(); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + Some(block) + } + fn white_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::white_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn lily_pad_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lily_pad(); + fn orange_banner_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::orange_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn nether_bricks_from_identifier_and_properties( + fn magenta_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::nether_bricks(); + let mut block = BlockId::magenta_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn nether_brick_fence_from_identifier_and_properties( + fn light_blue_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::nether_brick_fence(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::light_blue_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn nether_brick_stairs_from_identifier_and_properties( + fn yellow_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::nether_brick_stairs(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::yellow_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn nether_wart_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::nether_wart(); - let age_0_3 = map.get("age")?; - let age_0_3 = { - let x = i32::from_str(age_0_3).ok()?; - if !(0i32..=3i32).contains(&x) { + fn lime_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lime_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { return None; } x }; - block.set_age_0_3(age_0_3); + block.set_rotation(rotation); Some(block) } - fn enchanting_table_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::enchanting_table(); + fn pink_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::pink_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn brewing_stand_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::brewing_stand(); - let has_bottle_0 = map.get("has_bottle_0")?; - let has_bottle_0 = bool::from_str(has_bottle_0).ok()?; - block.set_has_bottle_0(has_bottle_0); - let has_bottle_1 = map.get("has_bottle_1")?; - let has_bottle_1 = bool::from_str(has_bottle_1).ok()?; - block.set_has_bottle_1(has_bottle_1); - let has_bottle_2 = map.get("has_bottle_2")?; - let has_bottle_2 = bool::from_str(has_bottle_2).ok()?; - block.set_has_bottle_2(has_bottle_2); + fn gray_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::gray_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn cauldron_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cauldron(); - let cauldron_level = map.get("level")?; - let cauldron_level = { - let x = i32::from_str(cauldron_level).ok()?; - if !(0i32..=3i32).contains(&x) { + fn light_gray_banner_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_gray_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { return None; } x }; - block.set_cauldron_level(cauldron_level); + block.set_rotation(rotation); Some(block) } - fn end_portal_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::end_portal(); + fn cyan_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cyan_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn end_portal_frame_from_identifier_and_properties( + fn purple_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::end_portal_frame(); - let eye = map.get("eye")?; - let eye = bool::from_str(eye).ok()?; - block.set_eye(eye); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::purple_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn end_stone_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::end_stone(); + fn blue_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::blue_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn dragon_egg_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::dragon_egg(); + fn brown_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::brown_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn redstone_lamp_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::redstone_lamp(); - let lit = map.get("lit")?; - let lit = bool::from_str(lit).ok()?; - block.set_lit(lit); + fn green_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::green_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); + Some(block) + } + fn red_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::red_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); Some(block) } - fn cocoa_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cocoa(); - let age_0_2 = map.get("age")?; - let age_0_2 = { - let x = i32::from_str(age_0_2).ok()?; - if !(0i32..=2i32).contains(&x) { + fn black_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::black_banner(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { return None; } x }; - block.set_age_0_2(age_0_2); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + block.set_rotation(rotation); Some(block) } - fn sandstone_stairs_from_identifier_and_properties( + fn white_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::sandstone_stairs(); + let mut block = BlockId::white_wall_banner(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - Some(block) - } - fn emerald_ore_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::emerald_ore(); Some(block) } - fn ender_chest_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::ender_chest(); + fn orange_wall_banner_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::orange_wall_banner(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); Some(block) } - fn tripwire_hook_from_identifier_and_properties( + fn magenta_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::tripwire_hook(); - let attached = map.get("attached")?; - let attached = bool::from_str(attached).ok()?; - block.set_attached(attached); + let mut block = BlockId::magenta_wall_banner(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - Some(block) - } - fn tripwire_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::tripwire(); - let attached = map.get("attached")?; - let attached = bool::from_str(attached).ok()?; - block.set_attached(attached); - let disarmed = map.get("disarmed")?; - let disarmed = bool::from_str(disarmed).ok()?; - block.set_disarmed(disarmed); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); - Some(block) - } - fn emerald_block_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::emerald_block(); Some(block) } - fn spruce_stairs_from_identifier_and_properties( + fn light_blue_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::spruce_stairs(); + let mut block = BlockId::light_blue_wall_banner(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); Some(block) } - fn birch_stairs_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::birch_stairs(); + fn yellow_wall_banner_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::yellow_wall_banner(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); Some(block) } - fn jungle_stairs_from_identifier_and_properties( + fn lime_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::jungle_stairs(); + let mut block = BlockId::lime_wall_banner(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); Some(block) } - fn command_block_from_identifier_and_properties( + fn pink_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::command_block(); - let conditional = map.get("conditional")?; - let conditional = bool::from_str(conditional).ok()?; - block.set_conditional(conditional); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); - Some(block) - } - fn beacon_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::beacon(); + let mut block = BlockId::pink_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn cobblestone_wall_from_identifier_and_properties( + fn gray_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cobblestone_wall(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let up = map.get("up")?; - let up = bool::from_str(up).ok()?; - block.set_up(up); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::gray_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn mossy_cobblestone_wall_from_identifier_and_properties( + fn light_gray_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::mossy_cobblestone_wall(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let up = map.get("up")?; - let up = bool::from_str(up).ok()?; - block.set_up(up); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); - Some(block) - } - fn flower_pot_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::flower_pot(); + let mut block = BlockId::light_gray_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn potted_oak_sapling_from_identifier_and_properties( + fn cyan_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_oak_sapling(); + let mut block = BlockId::cyan_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn potted_spruce_sapling_from_identifier_and_properties( + fn purple_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_spruce_sapling(); + let mut block = BlockId::purple_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn potted_birch_sapling_from_identifier_and_properties( + fn blue_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_birch_sapling(); + let mut block = BlockId::blue_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn potted_jungle_sapling_from_identifier_and_properties( + fn brown_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_jungle_sapling(); + let mut block = BlockId::brown_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn potted_acacia_sapling_from_identifier_and_properties( + fn green_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_acacia_sapling(); + let mut block = BlockId::green_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn potted_dark_oak_sapling_from_identifier_and_properties( + fn red_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_dark_oak_sapling(); - Some(block) - } - fn potted_fern_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::potted_fern(); + let mut block = BlockId::red_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn potted_dandelion_from_identifier_and_properties( + fn black_wall_banner_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_dandelion(); - Some(block) - } - fn potted_poppy_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::potted_poppy(); + let mut block = BlockId::black_wall_banner(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn potted_blue_orchid_from_identifier_and_properties( + fn red_sandstone_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_blue_orchid(); + let mut block = BlockId::red_sandstone(); Some(block) } - fn potted_allium_from_identifier_and_properties( + fn chiseled_red_sandstone_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_allium(); + let mut block = BlockId::chiseled_red_sandstone(); Some(block) } - fn potted_azure_bluet_from_identifier_and_properties( + fn cut_red_sandstone_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_azure_bluet(); + let mut block = BlockId::cut_red_sandstone(); Some(block) } - fn potted_red_tulip_from_identifier_and_properties( + fn red_sandstone_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_red_tulip(); + let mut block = BlockId::red_sandstone_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn potted_orange_tulip_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::potted_orange_tulip(); + fn oak_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::oak_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn potted_white_tulip_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::potted_white_tulip(); + fn spruce_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::spruce_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn potted_pink_tulip_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::potted_pink_tulip(); + fn birch_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn potted_oxeye_daisy_from_identifier_and_properties( + fn jungle_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::jungle_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn acacia_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::acacia_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn dark_oak_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_oxeye_daisy(); + let mut block = BlockId::dark_oak_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn potted_red_mushroom_from_identifier_and_properties( + fn stone_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::stone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn smooth_stone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_red_mushroom(); + let mut block = BlockId::smooth_stone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn potted_brown_mushroom_from_identifier_and_properties( + fn sandstone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_brown_mushroom(); + let mut block = BlockId::sandstone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn potted_dead_bush_from_identifier_and_properties( + fn cut_sandstone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_dead_bush(); + let mut block = BlockId::cut_sandstone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn potted_cactus_from_identifier_and_properties( + fn petrified_oak_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::potted_cactus(); + let mut block = BlockId::petrified_oak_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn carrots_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::carrots(); - let age_0_7 = map.get("age")?; - let age_0_7 = { - let x = i32::from_str(age_0_7).ok()?; - if !(0i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_age_0_7(age_0_7); + fn cobblestone_slab_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::cobblestone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn potatoes_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::potatoes(); - let age_0_7 = map.get("age")?; - let age_0_7 = { - let x = i32::from_str(age_0_7).ok()?; - if !(0i32..=7i32).contains(&x) { - return None; - } - x - }; - block.set_age_0_7(age_0_7); + fn brick_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::brick_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn oak_button_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_button(); - let face = map.get("face")?; - let face = Face::from_str(face).ok()?; - block.set_face(face); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + fn stone_brick_slab_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::stone_brick_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn spruce_button_from_identifier_and_properties( + fn nether_brick_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::spruce_button(); - let face = map.get("face")?; - let face = Face::from_str(face).ok()?; - block.set_face(face); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::nether_brick_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn birch_button_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::birch_button(); - let face = map.get("face")?; - let face = Face::from_str(face).ok()?; - block.set_face(face); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + fn quartz_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::quartz_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn jungle_button_from_identifier_and_properties( + fn red_sandstone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::jungle_button(); - let face = map.get("face")?; - let face = Face::from_str(face).ok()?; - block.set_face(face); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::red_sandstone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn acacia_button_from_identifier_and_properties( + fn cut_red_sandstone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::acacia_button(); - let face = map.get("face")?; - let face = Face::from_str(face).ok()?; - block.set_face(face); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::cut_red_sandstone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn dark_oak_button_from_identifier_and_properties( + fn purpur_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::purpur_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn smooth_stone_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::smooth_stone(); + Some(block) + } + fn smooth_sandstone_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_button(); - let face = map.get("face")?; - let face = Face::from_str(face).ok()?; - block.set_face(face); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let mut block = BlockId::smooth_sandstone(); Some(block) } - fn skeleton_wall_skull_from_identifier_and_properties( + fn smooth_quartz_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::skeleton_wall_skull(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::smooth_quartz(); Some(block) } - fn skeleton_skull_from_identifier_and_properties( + fn smooth_red_sandstone_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::skeleton_skull(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + let mut block = BlockId::smooth_red_sandstone(); Some(block) } - fn wither_skeleton_wall_skull_from_identifier_and_properties( + fn spruce_fence_gate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::wither_skeleton_wall_skull(); + let mut block = BlockId::spruce_fence_gate(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let in_wall = map.get("in_wall")?; + let in_wall = bool::from_str(in_wall).ok()?; + block.set_in_wall(in_wall); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn wither_skeleton_skull_from_identifier_and_properties( + fn birch_fence_gate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::wither_skeleton_skull(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + let mut block = BlockId::birch_fence_gate(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let in_wall = map.get("in_wall")?; + let in_wall = bool::from_str(in_wall).ok()?; + block.set_in_wall(in_wall); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn zombie_wall_head_from_identifier_and_properties( + fn jungle_fence_gate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::zombie_wall_head(); + let mut block = BlockId::jungle_fence_gate(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let in_wall = map.get("in_wall")?; + let in_wall = bool::from_str(in_wall).ok()?; + block.set_in_wall(in_wall); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn zombie_head_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::zombie_head(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); - Some(block) - } - fn player_wall_head_from_identifier_and_properties( + fn acacia_fence_gate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::player_wall_head(); + let mut block = BlockId::acacia_fence_gate(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let in_wall = map.get("in_wall")?; + let in_wall = bool::from_str(in_wall).ok()?; + block.set_in_wall(in_wall); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn player_head_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::player_head(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); - Some(block) - } - fn creeper_wall_head_from_identifier_and_properties( + fn dark_oak_fence_gate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::creeper_wall_head(); + let mut block = BlockId::dark_oak_fence_gate(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let in_wall = map.get("in_wall")?; + let in_wall = bool::from_str(in_wall).ok()?; + block.set_in_wall(in_wall); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn creeper_head_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::creeper_head(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn spruce_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::spruce_fence(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn dragon_wall_head_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::dragon_wall_head(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + fn birch_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_fence(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn dragon_head_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::dragon_head(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn jungle_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::jungle_fence(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn anvil_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::anvil(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + fn acacia_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::acacia_fence(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn chipped_anvil_from_identifier_and_properties( + fn dark_oak_fence_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::chipped_anvil(); + let mut block = BlockId::dark_oak_fence(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); + Some(block) + } + fn spruce_door_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::spruce_door(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + let hinge = map.get("hinge")?; + let hinge = Hinge::from_str(hinge).ok()?; + block.set_hinge(hinge); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn damaged_anvil_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::damaged_anvil(); + fn birch_door_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::birch_door(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + let hinge = map.get("hinge")?; + let hinge = Hinge::from_str(hinge).ok()?; + block.set_hinge(hinge); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn trapped_chest_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::trapped_chest(); - let chest_kind = map.get("type")?; - let chest_kind = ChestKind::from_str(chest_kind).ok()?; - block.set_chest_kind(chest_kind); + fn jungle_door_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::jungle_door(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - Some(block) - } - fn light_weighted_pressure_plate_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::light_weighted_pressure_plate(); - let power = map.get("power")?; - let power = { - let x = i32::from_str(power).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_power(power); - Some(block) - } - fn heavy_weighted_pressure_plate_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::heavy_weighted_pressure_plate(); - let power = map.get("power")?; - let power = { - let x = i32::from_str(power).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_power(power); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + let hinge = map.get("hinge")?; + let hinge = Hinge::from_str(hinge).ok()?; + block.set_hinge(hinge); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn comparator_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::comparator(); - let comparator_mode = map.get("mode")?; - let comparator_mode = ComparatorMode::from_str(comparator_mode).ok()?; - block.set_comparator_mode(comparator_mode); + fn acacia_door_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::acacia_door(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + let hinge = map.get("hinge")?; + let hinge = Hinge::from_str(hinge).ok()?; + block.set_hinge(hinge); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); let powered = map.get("powered")?; let powered = bool::from_str(powered).ok()?; block.set_powered(powered); Some(block) } - fn daylight_detector_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::daylight_detector(); - let inverted = map.get("inverted")?; - let inverted = bool::from_str(inverted).ok()?; - block.set_inverted(inverted); - let power = map.get("power")?; - let power = { - let x = i32::from_str(power).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_power(power); - Some(block) - } - fn redstone_block_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::redstone_block(); - Some(block) - } - fn nether_quartz_ore_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::nether_quartz_ore(); - Some(block) - } - fn hopper_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::hopper(); - let enabled = map.get("enabled")?; - let enabled = bool::from_str(enabled).ok()?; - block.set_enabled(enabled); - let facing_cardinal_and_down = map.get("facing")?; - let facing_cardinal_and_down = - FacingCardinalAndDown::from_str(facing_cardinal_and_down).ok()?; - block.set_facing_cardinal_and_down(facing_cardinal_and_down); - Some(block) - } - fn quartz_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::quartz_block(); - Some(block) - } - fn chiseled_quartz_block_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::chiseled_quartz_block(); - Some(block) - } - fn quartz_pillar_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::quartz_pillar(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); - Some(block) - } - fn quartz_stairs_from_identifier_and_properties( + fn dark_oak_door_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::quartz_stairs(); + let mut block = BlockId::dark_oak_door(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - Some(block) - } - fn activator_rail_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::activator_rail(); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + let hinge = map.get("hinge")?; + let hinge = Hinge::from_str(hinge).ok()?; + block.set_hinge(hinge); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); let powered = map.get("powered")?; let powered = bool::from_str(powered).ok()?; block.set_powered(powered); - let powered_rail_shape = map.get("shape")?; - let powered_rail_shape = PoweredRailShape::from_str(powered_rail_shape).ok()?; - block.set_powered_rail_shape(powered_rail_shape); Some(block) } - fn dropper_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::dropper(); + fn end_rod_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::end_rod(); let facing_cubic = map.get("facing")?; let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; block.set_facing_cubic(facing_cubic); - let triggered = map.get("triggered")?; - let triggered = bool::from_str(triggered).ok()?; - block.set_triggered(triggered); Some(block) } - fn white_terracotta_from_identifier_and_properties( + fn chorus_plant_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::chorus_plant(); + let down = map.get("down")?; + let down = bool::from_str(down).ok()?; + block.set_down(down); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); + Some(block) + } + fn chorus_flower_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::white_terracotta(); + let mut block = BlockId::chorus_flower(); + let age_0_5 = map.get("age")?; + let age_0_5 = { + let x = i32::from_str(age_0_5).ok()?; + if !(0i32..=5i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_5(age_0_5); Some(block) } - fn orange_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::orange_terracotta(); + fn purpur_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::purpur_block(); Some(block) } - fn magenta_terracotta_from_identifier_and_properties( + fn purpur_pillar_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::magenta_terracotta(); + let mut block = BlockId::purpur_pillar(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn light_blue_terracotta_from_identifier_and_properties( + fn purpur_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_terracotta(); + let mut block = BlockId::purpur_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn yellow_terracotta_from_identifier_and_properties( + fn end_stone_bricks_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::yellow_terracotta(); + let mut block = BlockId::end_stone_bricks(); Some(block) } - fn lime_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::lime_terracotta(); + fn beetroots_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::beetroots(); + let age_0_3 = map.get("age")?; + let age_0_3 = { + let x = i32::from_str(age_0_3).ok()?; + if !(0i32..=3i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_3(age_0_3); Some(block) } - fn pink_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::pink_terracotta(); + fn grass_path_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::grass_path(); Some(block) } - fn gray_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::gray_terracotta(); + fn end_gateway_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::end_gateway(); Some(block) } - fn light_gray_terracotta_from_identifier_and_properties( + fn repeating_command_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_terracotta(); + let mut block = BlockId::repeating_command_block(); + let conditional = map.get("conditional")?; + let conditional = bool::from_str(conditional).ok()?; + block.set_conditional(conditional); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn cyan_terracotta_from_identifier_and_properties( + fn chain_command_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cyan_terracotta(); + let mut block = BlockId::chain_command_block(); + let conditional = map.get("conditional")?; + let conditional = bool::from_str(conditional).ok()?; + block.set_conditional(conditional); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn purple_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::purple_terracotta(); + fn frosted_ice_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::frosted_ice(); + let age_0_3 = map.get("age")?; + let age_0_3 = { + let x = i32::from_str(age_0_3).ok()?; + if !(0i32..=3i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_3(age_0_3); Some(block) } - fn blue_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::blue_terracotta(); + fn magma_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::magma_block(); Some(block) } - fn brown_terracotta_from_identifier_and_properties( + fn nether_wart_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brown_terracotta(); + let mut block = BlockId::nether_wart_block(); Some(block) } - fn green_terracotta_from_identifier_and_properties( + fn red_nether_bricks_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::green_terracotta(); + let mut block = BlockId::red_nether_bricks(); Some(block) } - fn red_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::red_terracotta(); + fn bone_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::bone_block(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn black_terracotta_from_identifier_and_properties( + fn structure_void_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::black_terracotta(); + let mut block = BlockId::structure_void(); Some(block) } - fn white_stained_glass_pane_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::white_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + fn observer_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::observer(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn orange_stained_glass_pane_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::orange_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + fn shulker_box_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn magenta_stained_glass_pane_from_identifier_and_properties( + fn white_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::magenta_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::white_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn light_blue_stained_glass_pane_from_identifier_and_properties( + fn orange_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::orange_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn yellow_stained_glass_pane_from_identifier_and_properties( + fn magenta_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::yellow_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::magenta_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + Some(block) + } + fn light_blue_shulker_box_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_blue_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn lime_stained_glass_pane_from_identifier_and_properties( + fn yellow_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::lime_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::yellow_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn pink_stained_glass_pane_from_identifier_and_properties( + fn lime_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::pink_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::lime_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn gray_stained_glass_pane_from_identifier_and_properties( + fn pink_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::gray_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::pink_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn light_gray_stained_glass_pane_from_identifier_and_properties( + fn gray_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::gray_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn cyan_stained_glass_pane_from_identifier_and_properties( + fn light_gray_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cyan_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::light_gray_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn purple_stained_glass_pane_from_identifier_and_properties( + fn cyan_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purple_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::cyan_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn blue_stained_glass_pane_from_identifier_and_properties( + fn purple_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::blue_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::purple_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn brown_stained_glass_pane_from_identifier_and_properties( + fn blue_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brown_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::blue_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn green_stained_glass_pane_from_identifier_and_properties( + fn brown_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::green_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::brown_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn red_stained_glass_pane_from_identifier_and_properties( + fn green_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::green_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn black_stained_glass_pane_from_identifier_and_properties( + fn red_shulker_box_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::black_stained_glass_pane(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::red_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + Some(block) + } + fn black_shulker_box_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::black_shulker_box(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); Some(block) } - fn acacia_stairs_from_identifier_and_properties( + fn white_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::acacia_stairs(); + let mut block = BlockId::white_glazed_terracotta(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); Some(block) } - fn dark_oak_stairs_from_identifier_and_properties( + fn orange_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_stairs(); + let mut block = BlockId::orange_glazed_terracotta(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - Some(block) - } - fn slime_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::slime_block(); - Some(block) - } - fn barrier_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::barrier(); Some(block) } - fn iron_trapdoor_from_identifier_and_properties( + fn magenta_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::iron_trapdoor(); + let mut block = BlockId::magenta_glazed_terracotta(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - Some(block) - } - fn prismarine_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::prismarine(); Some(block) } - fn prismarine_bricks_from_identifier_and_properties( + fn light_blue_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::prismarine_bricks(); + let mut block = BlockId::light_blue_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn dark_prismarine_from_identifier_and_properties( + fn yellow_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_prismarine(); + let mut block = BlockId::yellow_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn prismarine_stairs_from_identifier_and_properties( + fn lime_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::prismarine_stairs(); + let mut block = BlockId::lime_glazed_terracotta(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); Some(block) } - fn prismarine_brick_stairs_from_identifier_and_properties( + fn pink_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::prismarine_brick_stairs(); + let mut block = BlockId::pink_glazed_terracotta(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); Some(block) } - fn dark_prismarine_stairs_from_identifier_and_properties( + fn gray_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_prismarine_stairs(); + let mut block = BlockId::gray_glazed_terracotta(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); Some(block) } - fn prismarine_slab_from_identifier_and_properties( + fn light_gray_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::prismarine_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::light_gray_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn prismarine_brick_slab_from_identifier_and_properties( + fn cyan_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::prismarine_brick_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::cyan_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn dark_prismarine_slab_from_identifier_and_properties( + fn purple_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_prismarine_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - Some(block) - } - fn sea_lantern_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::sea_lantern(); - Some(block) - } - fn hay_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::hay_block(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); - Some(block) - } - fn white_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::white_carpet(); + let mut block = BlockId::purple_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn orange_carpet_from_identifier_and_properties( + fn blue_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::orange_carpet(); + let mut block = BlockId::blue_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn magenta_carpet_from_identifier_and_properties( + fn brown_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::magenta_carpet(); + let mut block = BlockId::brown_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn light_blue_carpet_from_identifier_and_properties( + fn green_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_carpet(); + let mut block = BlockId::green_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn yellow_carpet_from_identifier_and_properties( + fn red_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::yellow_carpet(); - Some(block) - } - fn lime_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lime_carpet(); - Some(block) - } - fn pink_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::pink_carpet(); - Some(block) - } - fn gray_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::gray_carpet(); + let mut block = BlockId::red_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn light_gray_carpet_from_identifier_and_properties( + fn black_glazed_terracotta_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_carpet(); - Some(block) - } - fn cyan_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cyan_carpet(); + let mut block = BlockId::black_glazed_terracotta(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); Some(block) } - fn purple_carpet_from_identifier_and_properties( + fn white_concrete_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purple_carpet(); - Some(block) - } - fn blue_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::blue_carpet(); - Some(block) - } - fn brown_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::brown_carpet(); - Some(block) - } - fn green_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::green_carpet(); - Some(block) - } - fn red_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::red_carpet(); + let mut block = BlockId::white_concrete(); Some(block) } - fn black_carpet_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::black_carpet(); + fn orange_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::orange_concrete(); Some(block) } - fn terracotta_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::terracotta(); + fn magenta_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::magenta_concrete(); Some(block) } - fn coal_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::coal_block(); + fn light_blue_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_blue_concrete(); Some(block) } - fn packed_ice_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::packed_ice(); + fn yellow_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::yellow_concrete(); Some(block) } - fn sunflower_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::sunflower(); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); + fn lime_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::lime_concrete(); Some(block) } - fn lilac_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lilac(); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); + fn pink_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::pink_concrete(); Some(block) } - fn rose_bush_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::rose_bush(); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); + fn gray_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::gray_concrete(); Some(block) } - fn peony_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::peony(); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); + fn light_gray_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_gray_concrete(); Some(block) } - fn tall_grass_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::tall_grass(); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); + fn cyan_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::cyan_concrete(); Some(block) } - fn large_fern_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::large_fern(); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); + fn purple_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::purple_concrete(); Some(block) } - fn white_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::white_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn blue_concrete_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::blue_concrete(); Some(block) } - fn orange_banner_from_identifier_and_properties( + fn brown_concrete_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::orange_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + let mut block = BlockId::brown_concrete(); Some(block) } - fn magenta_banner_from_identifier_and_properties( + fn green_concrete_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::magenta_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + let mut block = BlockId::green_concrete(); Some(block) } - fn light_blue_banner_from_identifier_and_properties( + fn red_concrete_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::red_concrete(); + Some(block) + } + fn black_concrete_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + let mut block = BlockId::black_concrete(); Some(block) } - fn yellow_banner_from_identifier_and_properties( + fn white_concrete_powder_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::yellow_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + let mut block = BlockId::white_concrete_powder(); Some(block) } - fn lime_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::lime_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn orange_concrete_powder_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::orange_concrete_powder(); Some(block) } - fn pink_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::pink_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn magenta_concrete_powder_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::magenta_concrete_powder(); Some(block) } - fn gray_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::gray_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn light_blue_concrete_powder_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_blue_concrete_powder(); Some(block) } - fn light_gray_banner_from_identifier_and_properties( + fn yellow_concrete_powder_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + let mut block = BlockId::yellow_concrete_powder(); Some(block) } - fn cyan_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cyan_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn lime_concrete_powder_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::lime_concrete_powder(); Some(block) } - fn purple_banner_from_identifier_and_properties( + fn pink_concrete_powder_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purple_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + let mut block = BlockId::pink_concrete_powder(); Some(block) } - fn blue_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::blue_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn gray_concrete_powder_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::gray_concrete_powder(); Some(block) } - fn brown_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::brown_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn light_gray_concrete_powder_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::light_gray_concrete_powder(); Some(block) } - fn green_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::green_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn cyan_concrete_powder_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::cyan_concrete_powder(); Some(block) } - fn red_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::red_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn purple_concrete_powder_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::purple_concrete_powder(); Some(block) } - fn black_banner_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::black_banner(); - let rotation = map.get("rotation")?; - let rotation = { - let x = i32::from_str(rotation).ok()?; - if !(0i32..=15i32).contains(&x) { - return None; - } - x - }; - block.set_rotation(rotation); + fn blue_concrete_powder_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::blue_concrete_powder(); Some(block) } - fn white_wall_banner_from_identifier_and_properties( + fn brown_concrete_powder_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::white_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::brown_concrete_powder(); Some(block) } - fn orange_wall_banner_from_identifier_and_properties( + fn green_concrete_powder_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::orange_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::green_concrete_powder(); Some(block) } - fn magenta_wall_banner_from_identifier_and_properties( + fn red_concrete_powder_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::magenta_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::red_concrete_powder(); Some(block) } - fn light_blue_wall_banner_from_identifier_and_properties( + fn black_concrete_powder_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::black_concrete_powder(); Some(block) } - fn yellow_wall_banner_from_identifier_and_properties( + fn kelp_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::kelp(); + let age_0_25 = map.get("age")?; + let age_0_25 = { + let x = i32::from_str(age_0_25).ok()?; + if !(0i32..=25i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_25(age_0_25); + Some(block) + } + fn kelp_plant_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::kelp_plant(); + Some(block) + } + fn dried_kelp_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::yellow_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::dried_kelp_block(); Some(block) } - fn lime_wall_banner_from_identifier_and_properties( + fn turtle_egg_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::turtle_egg(); + let eggs = map.get("eggs")?; + let eggs = { + let x = i32::from_str(eggs).ok()?; + if !(1i32..=4i32).contains(&x) { + return None; + } + x + }; + block.set_eggs(eggs); + let hatch = map.get("hatch")?; + let hatch = { + let x = i32::from_str(hatch).ok()?; + if !(0i32..=2i32).contains(&x) { + return None; + } + x + }; + block.set_hatch(hatch); + Some(block) + } + fn dead_tube_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::lime_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::dead_tube_coral_block(); Some(block) } - fn pink_wall_banner_from_identifier_and_properties( + fn dead_brain_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::pink_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::dead_brain_coral_block(); Some(block) } - fn gray_wall_banner_from_identifier_and_properties( + fn dead_bubble_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::gray_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::dead_bubble_coral_block(); Some(block) } - fn light_gray_wall_banner_from_identifier_and_properties( + fn dead_fire_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::dead_fire_coral_block(); Some(block) } - fn cyan_wall_banner_from_identifier_and_properties( + fn dead_horn_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cyan_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::dead_horn_coral_block(); Some(block) } - fn purple_wall_banner_from_identifier_and_properties( + fn tube_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purple_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::tube_coral_block(); Some(block) } - fn blue_wall_banner_from_identifier_and_properties( + fn brain_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::blue_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::brain_coral_block(); Some(block) } - fn brown_wall_banner_from_identifier_and_properties( + fn bubble_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brown_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::bubble_coral_block(); Some(block) } - fn green_wall_banner_from_identifier_and_properties( + fn fire_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::green_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::fire_coral_block(); Some(block) } - fn red_wall_banner_from_identifier_and_properties( + fn horn_coral_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::horn_coral_block(); Some(block) } - fn black_wall_banner_from_identifier_and_properties( + fn dead_tube_coral_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::black_wall_banner(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::dead_tube_coral(); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn red_sandstone_from_identifier_and_properties( + fn dead_brain_coral_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_sandstone(); + let mut block = BlockId::dead_brain_coral(); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn chiseled_red_sandstone_from_identifier_and_properties( + fn dead_bubble_coral_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::chiseled_red_sandstone(); + let mut block = BlockId::dead_bubble_coral(); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn cut_red_sandstone_from_identifier_and_properties( + fn dead_fire_coral_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cut_red_sandstone(); + let mut block = BlockId::dead_fire_coral(); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn red_sandstone_stairs_from_identifier_and_properties( + fn dead_horn_coral_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_sandstone_stairs(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_top_bottom = map.get("half")?; - let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; - block.set_half_top_bottom(half_top_bottom); - let stairs_shape = map.get("shape")?; - let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; - block.set_stairs_shape(stairs_shape); + let mut block = BlockId::dead_horn_coral(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn oak_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::oak_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + fn tube_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::tube_coral(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn spruce_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::spruce_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + fn brain_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::brain_coral(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn birch_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::birch_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + fn bubble_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::bubble_coral(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn jungle_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::jungle_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + fn fire_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::fire_coral(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn acacia_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::acacia_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + fn horn_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::horn_coral(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn dark_oak_slab_from_identifier_and_properties( + fn dead_tube_coral_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + let mut block = BlockId::dead_tube_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn stone_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::stone_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + fn dead_brain_coral_fan_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dead_brain_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn sandstone_slab_from_identifier_and_properties( + fn dead_bubble_coral_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::sandstone_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + let mut block = BlockId::dead_bubble_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn petrified_oak_slab_from_identifier_and_properties( + fn dead_fire_coral_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::petrified_oak_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + let mut block = BlockId::dead_fire_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn cobblestone_slab_from_identifier_and_properties( + fn dead_horn_coral_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cobblestone_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + let mut block = BlockId::dead_horn_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn brick_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::brick_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + fn tube_coral_fan_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::tube_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn stone_brick_slab_from_identifier_and_properties( + fn brain_coral_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::stone_brick_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + let mut block = BlockId::brain_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn nether_brick_slab_from_identifier_and_properties( + fn bubble_coral_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::nether_brick_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + let mut block = BlockId::bubble_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn quartz_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::quartz_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + fn fire_coral_fan_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::fire_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn red_sandstone_slab_from_identifier_and_properties( + fn horn_coral_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_sandstone_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + let mut block = BlockId::horn_coral_fan(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn purpur_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::purpur_slab(); - let slab_kind = map.get("type")?; - let slab_kind = SlabKind::from_str(slab_kind).ok()?; - block.set_slab_kind(slab_kind); + fn dead_tube_coral_wall_fan_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::dead_tube_coral_wall_fan(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn smooth_stone_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::smooth_stone(); - Some(block) - } - fn smooth_sandstone_from_identifier_and_properties( + fn dead_brain_coral_wall_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::smooth_sandstone(); + let mut block = BlockId::dead_brain_coral_wall_fan(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn smooth_quartz_from_identifier_and_properties( + fn dead_bubble_coral_wall_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::smooth_quartz(); + let mut block = BlockId::dead_bubble_coral_wall_fan(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn smooth_red_sandstone_from_identifier_and_properties( + fn dead_fire_coral_wall_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::smooth_red_sandstone(); + let mut block = BlockId::dead_fire_coral_wall_fan(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn spruce_fence_gate_from_identifier_and_properties( + fn dead_horn_coral_wall_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::spruce_fence_gate(); + let mut block = BlockId::dead_horn_coral_wall_fan(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let in_wall = map.get("in_wall")?; - let in_wall = bool::from_str(in_wall).ok()?; - block.set_in_wall(in_wall); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn birch_fence_gate_from_identifier_and_properties( + fn tube_coral_wall_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::birch_fence_gate(); + let mut block = BlockId::tube_coral_wall_fan(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let in_wall = map.get("in_wall")?; - let in_wall = bool::from_str(in_wall).ok()?; - block.set_in_wall(in_wall); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn jungle_fence_gate_from_identifier_and_properties( + fn brain_coral_wall_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::jungle_fence_gate(); + let mut block = BlockId::brain_coral_wall_fan(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let in_wall = map.get("in_wall")?; - let in_wall = bool::from_str(in_wall).ok()?; - block.set_in_wall(in_wall); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn acacia_fence_gate_from_identifier_and_properties( + fn bubble_coral_wall_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::acacia_fence_gate(); + let mut block = BlockId::bubble_coral_wall_fan(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let in_wall = map.get("in_wall")?; - let in_wall = bool::from_str(in_wall).ok()?; - block.set_in_wall(in_wall); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn dark_oak_fence_gate_from_identifier_and_properties( + fn fire_coral_wall_fan_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_fence_gate(); + let mut block = BlockId::fire_coral_wall_fan(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let in_wall = map.get("in_wall")?; - let in_wall = bool::from_str(in_wall).ok()?; - block.set_in_wall(in_wall); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - Some(block) - } - fn spruce_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::spruce_fence(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); Some(block) } - fn birch_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::birch_fence(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); + fn horn_coral_wall_fan_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::horn_coral_wall_fan(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); Some(block) } - fn jungle_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::jungle_fence(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); + fn sea_pickle_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::sea_pickle(); + let pickles = map.get("pickles")?; + let pickles = { + let x = i32::from_str(pickles).ok()?; + if !(1i32..=4i32).contains(&x) { + return None; + } + x + }; + block.set_pickles(pickles); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); Some(block) } - fn acacia_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::acacia_fence(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); + fn blue_ice_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::blue_ice(); + Some(block) + } + fn conduit_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::conduit(); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); Some(block) } - fn dark_oak_fence_from_identifier_and_properties( + fn bamboo_sapling_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_fence(); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let mut block = BlockId::bamboo_sapling(); Some(block) } - fn spruce_door_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::spruce_door(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); - let hinge = map.get("hinge")?; - let hinge = Hinge::from_str(hinge).ok()?; - block.set_hinge(hinge); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + fn bamboo_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::bamboo(); + let age_0_1 = map.get("age")?; + let age_0_1 = { + let x = i32::from_str(age_0_1).ok()?; + if !(0i32..=1i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_1(age_0_1); + let leaves = map.get("leaves")?; + let leaves = Leaves::from_str(leaves).ok()?; + block.set_leaves(leaves); + let stage = map.get("stage")?; + let stage = { + let x = i32::from_str(stage).ok()?; + if !(0i32..=1i32).contains(&x) { + return None; + } + x + }; + block.set_stage(stage); Some(block) } - fn birch_door_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::birch_door(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); - let hinge = map.get("hinge")?; - let hinge = Hinge::from_str(hinge).ok()?; - block.set_hinge(hinge); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + fn potted_bamboo_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::potted_bamboo(); Some(block) } - fn jungle_door_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::jungle_door(); + fn void_air_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::void_air(); + Some(block) + } + fn cave_air_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::cave_air(); + Some(block) + } + fn bubble_column_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::bubble_column(); + let drag = map.get("drag")?; + let drag = bool::from_str(drag).ok()?; + block.set_drag(drag); + Some(block) + } + fn polished_granite_stairs_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::polished_granite_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); - let hinge = map.get("hinge")?; - let hinge = Hinge::from_str(hinge).ok()?; - block.set_hinge(hinge); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn acacia_door_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::acacia_door(); + fn smooth_red_sandstone_stairs_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::smooth_red_sandstone_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); - let hinge = map.get("hinge")?; - let hinge = Hinge::from_str(hinge).ok()?; - block.set_hinge(hinge); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn dark_oak_door_from_identifier_and_properties( + fn mossy_stone_brick_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dark_oak_door(); + let mut block = BlockId::mossy_stone_brick_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); - let half_upper_lower = map.get("half")?; - let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; - block.set_half_upper_lower(half_upper_lower); - let hinge = map.get("hinge")?; - let hinge = Hinge::from_str(hinge).ok()?; - block.set_hinge(hinge); - let open = map.get("open")?; - let open = bool::from_str(open).ok()?; - block.set_open(open); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - Some(block) - } - fn end_rod_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::end_rod(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); - Some(block) - } - fn chorus_plant_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::chorus_plant(); - let down = map.get("down")?; - let down = bool::from_str(down).ok()?; - block.set_down(down); - let east_connected = map.get("east")?; - let east_connected = bool::from_str(east_connected).ok()?; - block.set_east_connected(east_connected); - let north_connected = map.get("north")?; - let north_connected = bool::from_str(north_connected).ok()?; - block.set_north_connected(north_connected); - let south_connected = map.get("south")?; - let south_connected = bool::from_str(south_connected).ok()?; - block.set_south_connected(south_connected); - let up = map.get("up")?; - let up = bool::from_str(up).ok()?; - block.set_up(up); - let west_connected = map.get("west")?; - let west_connected = bool::from_str(west_connected).ok()?; - block.set_west_connected(west_connected); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn chorus_flower_from_identifier_and_properties( + fn polished_diorite_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::chorus_flower(); - let age_0_5 = map.get("age")?; - let age_0_5 = { - let x = i32::from_str(age_0_5).ok()?; - if !(0i32..=5i32).contains(&x) { - return None; - } - x - }; - block.set_age_0_5(age_0_5); - Some(block) - } - fn purpur_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::purpur_block(); + let mut block = BlockId::polished_diorite_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn purpur_pillar_from_identifier_and_properties( + fn mossy_cobblestone_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purpur_pillar(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::mossy_cobblestone_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn purpur_stairs_from_identifier_and_properties( + fn end_stone_brick_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purpur_stairs(); + let mut block = BlockId::end_stone_brick_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); @@ -20789,1040 +27216,1639 @@ impl BlockId { block.set_waterlogged(waterlogged); Some(block) } - fn end_stone_bricks_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::end_stone_bricks(); - Some(block) - } - fn beetroots_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::beetroots(); - let age_0_3 = map.get("age")?; - let age_0_3 = { - let x = i32::from_str(age_0_3).ok()?; - if !(0i32..=3i32).contains(&x) { - return None; - } - x - }; - block.set_age_0_3(age_0_3); - Some(block) - } - fn grass_path_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::grass_path(); - Some(block) - } - fn end_gateway_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::end_gateway(); - Some(block) - } - fn repeating_command_block_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::repeating_command_block(); - let conditional = map.get("conditional")?; - let conditional = bool::from_str(conditional).ok()?; - block.set_conditional(conditional); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); - Some(block) - } - fn chain_command_block_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::chain_command_block(); - let conditional = map.get("conditional")?; - let conditional = bool::from_str(conditional).ok()?; - block.set_conditional(conditional); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); - Some(block) - } - fn frosted_ice_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::frosted_ice(); - let age_0_3 = map.get("age")?; - let age_0_3 = { - let x = i32::from_str(age_0_3).ok()?; - if !(0i32..=3i32).contains(&x) { - return None; - } - x - }; - block.set_age_0_3(age_0_3); - Some(block) - } - fn magma_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::magma_block(); + fn stone_stairs_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::stone_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn nether_wart_block_from_identifier_and_properties( + fn smooth_sandstone_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::nether_wart_block(); + let mut block = BlockId::smooth_sandstone_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn red_nether_bricks_from_identifier_and_properties( + fn smooth_quartz_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_nether_bricks(); - Some(block) - } - fn bone_block_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::bone_block(); - let axis_xyz = map.get("axis")?; - let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; - block.set_axis_xyz(axis_xyz); + let mut block = BlockId::smooth_quartz_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn structure_void_from_identifier_and_properties( + fn granite_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::structure_void(); - Some(block) - } - fn observer_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::observer(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); - let powered = map.get("powered")?; - let powered = bool::from_str(powered).ok()?; - block.set_powered(powered); - Some(block) - } - fn shulker_box_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::granite_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn white_shulker_box_from_identifier_and_properties( + fn andesite_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::white_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::andesite_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn orange_shulker_box_from_identifier_and_properties( + fn red_nether_brick_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::orange_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::red_nether_brick_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn magenta_shulker_box_from_identifier_and_properties( + fn polished_andesite_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::magenta_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::polished_andesite_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn light_blue_shulker_box_from_identifier_and_properties( + fn diorite_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::diorite_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn yellow_shulker_box_from_identifier_and_properties( + fn polished_granite_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::yellow_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::polished_granite_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn lime_shulker_box_from_identifier_and_properties( + fn smooth_red_sandstone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::lime_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::smooth_red_sandstone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn pink_shulker_box_from_identifier_and_properties( + fn mossy_stone_brick_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::pink_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::mossy_stone_brick_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn gray_shulker_box_from_identifier_and_properties( + fn polished_diorite_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::gray_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::polished_diorite_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn light_gray_shulker_box_from_identifier_and_properties( + fn mossy_cobblestone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::mossy_cobblestone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn cyan_shulker_box_from_identifier_and_properties( + fn end_stone_brick_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cyan_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::end_stone_brick_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn purple_shulker_box_from_identifier_and_properties( + fn smooth_sandstone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purple_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::smooth_sandstone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn blue_shulker_box_from_identifier_and_properties( + fn smooth_quartz_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::blue_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::smooth_quartz_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn brown_shulker_box_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::brown_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + fn granite_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::granite_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn green_shulker_box_from_identifier_and_properties( + fn andesite_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::green_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::andesite_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn red_shulker_box_from_identifier_and_properties( + fn red_nether_brick_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::red_nether_brick_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn black_shulker_box_from_identifier_and_properties( + fn polished_andesite_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::black_shulker_box(); - let facing_cubic = map.get("facing")?; - let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; - block.set_facing_cubic(facing_cubic); + let mut block = BlockId::polished_andesite_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn white_glazed_terracotta_from_identifier_and_properties( + fn diorite_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::diorite_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn brick_wall_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::brick_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); + Some(block) + } + fn prismarine_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::white_glazed_terracotta(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::prismarine_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn orange_glazed_terracotta_from_identifier_and_properties( + fn red_sandstone_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::orange_glazed_terracotta(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::red_sandstone_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn magenta_glazed_terracotta_from_identifier_and_properties( + fn mossy_stone_brick_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::magenta_glazed_terracotta(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::mossy_stone_brick_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); + Some(block) + } + fn granite_wall_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::granite_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn light_blue_glazed_terracotta_from_identifier_and_properties( + fn stone_brick_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_glazed_terracotta(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::stone_brick_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn yellow_glazed_terracotta_from_identifier_and_properties( + fn nether_brick_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::yellow_glazed_terracotta(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::nether_brick_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn lime_glazed_terracotta_from_identifier_and_properties( + fn andesite_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::lime_glazed_terracotta(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::andesite_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn pink_glazed_terracotta_from_identifier_and_properties( + fn red_nether_brick_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::pink_glazed_terracotta(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::red_nether_brick_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn gray_glazed_terracotta_from_identifier_and_properties( + fn sandstone_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::gray_glazed_terracotta(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::sandstone_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn light_gray_glazed_terracotta_from_identifier_and_properties( + fn end_stone_brick_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_glazed_terracotta(); + let mut block = BlockId::end_stone_brick_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); + Some(block) + } + fn diorite_wall_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::diorite_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); + Some(block) + } + fn scaffolding_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::scaffolding(); + let bottom = map.get("bottom")?; + let bottom = bool::from_str(bottom).ok()?; + block.set_bottom(bottom); + let distance_0_7 = map.get("distance")?; + let distance_0_7 = { + let x = i32::from_str(distance_0_7).ok()?; + if !(0i32..=7i32).contains(&x) { + return None; + } + x + }; + block.set_distance_0_7(distance_0_7); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + Some(block) + } + fn loom_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::loom(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); Some(block) } - fn cyan_glazed_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::cyan_glazed_terracotta(); + fn barrel_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::barrel(); + let facing_cubic = map.get("facing")?; + let facing_cubic = FacingCubic::from_str(facing_cubic).ok()?; + block.set_facing_cubic(facing_cubic); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + Some(block) + } + fn smoker_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::smoker(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let lit = map.get("lit")?; + let lit = bool::from_str(lit).ok()?; + block.set_lit(lit); Some(block) } - fn purple_glazed_terracotta_from_identifier_and_properties( + fn blast_furnace_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purple_glazed_terracotta(); + let mut block = BlockId::blast_furnace(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let lit = map.get("lit")?; + let lit = bool::from_str(lit).ok()?; + block.set_lit(lit); Some(block) } - fn blue_glazed_terracotta_from_identifier_and_properties( + fn cartography_table_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::blue_glazed_terracotta(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::cartography_table(); Some(block) } - fn brown_glazed_terracotta_from_identifier_and_properties( + fn fletching_table_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brown_glazed_terracotta(); + let mut block = BlockId::fletching_table(); + Some(block) + } + fn grindstone_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::grindstone(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); Some(block) } - fn green_glazed_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::green_glazed_terracotta(); + fn lectern_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lectern(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let has_book = map.get("has_book")?; + let has_book = bool::from_str(has_book).ok()?; + block.set_has_book(has_book); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn red_glazed_terracotta_from_identifier_and_properties( + fn smithing_table_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_glazed_terracotta(); + let mut block = BlockId::smithing_table(); + Some(block) + } + fn stonecutter_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::stonecutter(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); Some(block) } - fn black_glazed_terracotta_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::black_glazed_terracotta(); + fn bell_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::bell(); + let attachment = map.get("attachment")?; + let attachment = Attachment::from_str(attachment).ok()?; + block.set_attachment(attachment); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn white_concrete_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::white_concrete(); + fn lantern_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lantern(); + let hanging = map.get("hanging")?; + let hanging = bool::from_str(hanging).ok()?; + block.set_hanging(hanging); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn orange_concrete_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::orange_concrete(); + fn soul_lantern_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::soul_lantern(); + let hanging = map.get("hanging")?; + let hanging = bool::from_str(hanging).ok()?; + block.set_hanging(hanging); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn magenta_concrete_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::magenta_concrete(); + fn campfire_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::campfire(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let lit = map.get("lit")?; + let lit = bool::from_str(lit).ok()?; + block.set_lit(lit); + let signal_fire = map.get("signal_fire")?; + let signal_fire = bool::from_str(signal_fire).ok()?; + block.set_signal_fire(signal_fire); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn light_blue_concrete_from_identifier_and_properties( + fn soul_campfire_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_concrete(); + let mut block = BlockId::soul_campfire(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let lit = map.get("lit")?; + let lit = bool::from_str(lit).ok()?; + block.set_lit(lit); + let signal_fire = map.get("signal_fire")?; + let signal_fire = bool::from_str(signal_fire).ok()?; + block.set_signal_fire(signal_fire); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn yellow_concrete_from_identifier_and_properties( + fn sweet_berry_bush_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::yellow_concrete(); + let mut block = BlockId::sweet_berry_bush(); + let age_0_3 = map.get("age")?; + let age_0_3 = { + let x = i32::from_str(age_0_3).ok()?; + if !(0i32..=3i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_3(age_0_3); Some(block) } - fn lime_concrete_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::lime_concrete(); + fn warped_stem_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::warped_stem(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn pink_concrete_from_identifier_and_properties( + fn stripped_warped_stem_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::pink_concrete(); + let mut block = BlockId::stripped_warped_stem(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn gray_concrete_from_identifier_and_properties( + fn warped_hyphae_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::gray_concrete(); + let mut block = BlockId::warped_hyphae(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn light_gray_concrete_from_identifier_and_properties( + fn stripped_warped_hyphae_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_concrete(); + let mut block = BlockId::stripped_warped_hyphae(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn cyan_concrete_from_identifier_and_properties( + fn warped_nylium_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cyan_concrete(); + let mut block = BlockId::warped_nylium(); Some(block) } - fn purple_concrete_from_identifier_and_properties( + fn warped_fungus_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purple_concrete(); + let mut block = BlockId::warped_fungus(); Some(block) } - fn blue_concrete_from_identifier_and_properties( + fn warped_wart_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::blue_concrete(); + let mut block = BlockId::warped_wart_block(); Some(block) } - fn brown_concrete_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::brown_concrete(); + fn warped_roots_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::warped_roots(); Some(block) } - fn green_concrete_from_identifier_and_properties( + fn nether_sprouts_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::green_concrete(); + let mut block = BlockId::nether_sprouts(); Some(block) } - fn red_concrete_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::red_concrete(); + fn crimson_stem_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::crimson_stem(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn black_concrete_from_identifier_and_properties( + fn stripped_crimson_stem_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::black_concrete(); + let mut block = BlockId::stripped_crimson_stem(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn white_concrete_powder_from_identifier_and_properties( + fn crimson_hyphae_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::white_concrete_powder(); + let mut block = BlockId::crimson_hyphae(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn orange_concrete_powder_from_identifier_and_properties( + fn stripped_crimson_hyphae_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::orange_concrete_powder(); + let mut block = BlockId::stripped_crimson_hyphae(); + let axis_xyz = map.get("axis")?; + let axis_xyz = AxisXyz::from_str(axis_xyz).ok()?; + block.set_axis_xyz(axis_xyz); Some(block) } - fn magenta_concrete_powder_from_identifier_and_properties( + fn crimson_nylium_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::magenta_concrete_powder(); + let mut block = BlockId::crimson_nylium(); Some(block) } - fn light_blue_concrete_powder_from_identifier_and_properties( + fn crimson_fungus_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_blue_concrete_powder(); + let mut block = BlockId::crimson_fungus(); Some(block) } - fn yellow_concrete_powder_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::yellow_concrete_powder(); + fn shroomlight_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::shroomlight(); Some(block) } - fn lime_concrete_powder_from_identifier_and_properties( + fn weeping_vines_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::lime_concrete_powder(); + let mut block = BlockId::weeping_vines(); + let age_0_25 = map.get("age")?; + let age_0_25 = { + let x = i32::from_str(age_0_25).ok()?; + if !(0i32..=25i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_25(age_0_25); Some(block) } - fn pink_concrete_powder_from_identifier_and_properties( + fn weeping_vines_plant_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::pink_concrete_powder(); + let mut block = BlockId::weeping_vines_plant(); Some(block) } - fn gray_concrete_powder_from_identifier_and_properties( + fn twisting_vines_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::gray_concrete_powder(); + let mut block = BlockId::twisting_vines(); + let age_0_25 = map.get("age")?; + let age_0_25 = { + let x = i32::from_str(age_0_25).ok()?; + if !(0i32..=25i32).contains(&x) { + return None; + } + x + }; + block.set_age_0_25(age_0_25); Some(block) } - fn light_gray_concrete_powder_from_identifier_and_properties( + fn twisting_vines_plant_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::light_gray_concrete_powder(); + let mut block = BlockId::twisting_vines_plant(); Some(block) } - fn cyan_concrete_powder_from_identifier_and_properties( + fn crimson_roots_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::cyan_concrete_powder(); + let mut block = BlockId::crimson_roots(); Some(block) } - fn purple_concrete_powder_from_identifier_and_properties( + fn crimson_planks_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::purple_concrete_powder(); + let mut block = BlockId::crimson_planks(); Some(block) } - fn blue_concrete_powder_from_identifier_and_properties( + fn warped_planks_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::blue_concrete_powder(); + let mut block = BlockId::warped_planks(); Some(block) } - fn brown_concrete_powder_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::brown_concrete_powder(); + fn crimson_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::crimson_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn green_concrete_powder_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::green_concrete_powder(); + fn warped_slab_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::warped_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn red_concrete_powder_from_identifier_and_properties( + fn crimson_pressure_plate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::red_concrete_powder(); + let mut block = BlockId::crimson_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn black_concrete_powder_from_identifier_and_properties( + fn warped_pressure_plate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::black_concrete_powder(); - Some(block) - } - fn kelp_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::kelp(); - let age_0_25 = map.get("age")?; - let age_0_25 = { - let x = i32::from_str(age_0_25).ok()?; - if !(0i32..=25i32).contains(&x) { - return None; - } - x - }; - block.set_age_0_25(age_0_25); - Some(block) - } - fn kelp_plant_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::kelp_plant(); + let mut block = BlockId::warped_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn dried_kelp_block_from_identifier_and_properties( + fn crimson_fence_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dried_kelp_block(); + let mut block = BlockId::crimson_fence(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn turtle_egg_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::turtle_egg(); - let eggs = map.get("eggs")?; - let eggs = { - let x = i32::from_str(eggs).ok()?; - if !(1i32..=4i32).contains(&x) { - return None; - } - x - }; - block.set_eggs(eggs); - let hatch = map.get("hatch")?; - let hatch = { - let x = i32::from_str(hatch).ok()?; - if !(0i32..=2i32).contains(&x) { - return None; - } - x - }; - block.set_hatch(hatch); + fn warped_fence_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::warped_fence(); + let east_connected = map.get("east")?; + let east_connected = bool::from_str(east_connected).ok()?; + block.set_east_connected(east_connected); + let north_connected = map.get("north")?; + let north_connected = bool::from_str(north_connected).ok()?; + block.set_north_connected(north_connected); + let south_connected = map.get("south")?; + let south_connected = bool::from_str(south_connected).ok()?; + block.set_south_connected(south_connected); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); + let west_connected = map.get("west")?; + let west_connected = bool::from_str(west_connected).ok()?; + block.set_west_connected(west_connected); Some(block) } - fn dead_tube_coral_block_from_identifier_and_properties( + fn crimson_trapdoor_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_tube_coral_block(); + let mut block = BlockId::crimson_trapdoor(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn dead_brain_coral_block_from_identifier_and_properties( + fn warped_trapdoor_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_brain_coral_block(); + let mut block = BlockId::warped_trapdoor(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn dead_bubble_coral_block_from_identifier_and_properties( + fn crimson_fence_gate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_bubble_coral_block(); + let mut block = BlockId::crimson_fence_gate(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let in_wall = map.get("in_wall")?; + let in_wall = bool::from_str(in_wall).ok()?; + block.set_in_wall(in_wall); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn dead_fire_coral_block_from_identifier_and_properties( + fn warped_fence_gate_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_fire_coral_block(); + let mut block = BlockId::warped_fence_gate(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let in_wall = map.get("in_wall")?; + let in_wall = bool::from_str(in_wall).ok()?; + block.set_in_wall(in_wall); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn dead_horn_coral_block_from_identifier_and_properties( + fn crimson_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_horn_coral_block(); + let mut block = BlockId::crimson_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn tube_coral_block_from_identifier_and_properties( + fn warped_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::tube_coral_block(); + let mut block = BlockId::warped_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); + let waterlogged = map.get("waterlogged")?; + let waterlogged = bool::from_str(waterlogged).ok()?; + block.set_waterlogged(waterlogged); Some(block) } - fn brain_coral_block_from_identifier_and_properties( + fn crimson_button_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brain_coral_block(); + let mut block = BlockId::crimson_button(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn bubble_coral_block_from_identifier_and_properties( + fn warped_button_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::bubble_coral_block(); + let mut block = BlockId::warped_button(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn fire_coral_block_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::fire_coral_block(); + fn crimson_door_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::crimson_door(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + let hinge = map.get("hinge")?; + let hinge = Hinge::from_str(hinge).ok()?; + block.set_hinge(hinge); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn horn_coral_block_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::horn_coral_block(); + fn warped_door_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::warped_door(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_upper_lower = map.get("half")?; + let half_upper_lower = HalfUpperLower::from_str(half_upper_lower).ok()?; + block.set_half_upper_lower(half_upper_lower); + let hinge = map.get("hinge")?; + let hinge = Hinge::from_str(hinge).ok()?; + block.set_hinge(hinge); + let open = map.get("open")?; + let open = bool::from_str(open).ok()?; + block.set_open(open); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn dead_tube_coral_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::dead_tube_coral(); + fn crimson_sign_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::crimson_sign(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn dead_brain_coral_from_identifier_and_properties( - map: &BTreeMap, - ) -> Option { - let mut block = BlockId::dead_brain_coral(); + fn warped_sign_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::warped_sign(); + let rotation = map.get("rotation")?; + let rotation = { + let x = i32::from_str(rotation).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_rotation(rotation); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn dead_bubble_coral_from_identifier_and_properties( + fn crimson_wall_sign_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_bubble_coral(); + let mut block = BlockId::crimson_wall_sign(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn dead_fire_coral_from_identifier_and_properties( + fn warped_wall_sign_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_fire_coral(); + let mut block = BlockId::warped_wall_sign(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn dead_horn_coral_from_identifier_and_properties( + fn structure_block_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_horn_coral(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::structure_block(); + let structure_block_mode = map.get("mode")?; + let structure_block_mode = StructureBlockMode::from_str(structure_block_mode).ok()?; + block.set_structure_block_mode(structure_block_mode); Some(block) } - fn tube_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::tube_coral(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + fn jigsaw_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::jigsaw(); + let orientation = map.get("orientation")?; + let orientation = Orientation::from_str(orientation).ok()?; + block.set_orientation(orientation); Some(block) } - fn brain_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::brain_coral(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + fn composter_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::composter(); + let level_0_8 = map.get("level")?; + let level_0_8 = { + let x = i32::from_str(level_0_8).ok()?; + if !(0i32..=8i32).contains(&x) { + return None; + } + x + }; + block.set_level_0_8(level_0_8); Some(block) } - fn bubble_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::bubble_coral(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + fn target_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::target(); + let power = map.get("power")?; + let power = { + let x = i32::from_str(power).ok()?; + if !(0i32..=15i32).contains(&x) { + return None; + } + x + }; + block.set_power(power); Some(block) } - fn fire_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::fire_coral(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + fn bee_nest_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::bee_nest(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let honey_level = map.get("honey_level")?; + let honey_level = { + let x = i32::from_str(honey_level).ok()?; + if !(0i32..=5i32).contains(&x) { + return None; + } + x + }; + block.set_honey_level(honey_level); + Some(block) + } + fn beehive_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::beehive(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let honey_level = map.get("honey_level")?; + let honey_level = { + let x = i32::from_str(honey_level).ok()?; + if !(0i32..=5i32).contains(&x) { + return None; + } + x + }; + block.set_honey_level(honey_level); + Some(block) + } + fn honey_block_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::honey_block(); + Some(block) + } + fn honeycomb_block_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::honeycomb_block(); Some(block) } - fn horn_coral_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::horn_coral(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + fn netherite_block_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::netherite_block(); Some(block) } - fn dead_tube_coral_wall_fan_from_identifier_and_properties( + fn ancient_debris_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_tube_coral_wall_fan(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::ancient_debris(); Some(block) } - fn dead_brain_coral_wall_fan_from_identifier_and_properties( + fn crying_obsidian_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_brain_coral_wall_fan(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::crying_obsidian(); Some(block) } - fn dead_bubble_coral_wall_fan_from_identifier_and_properties( + fn respawn_anchor_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_bubble_coral_wall_fan(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::respawn_anchor(); + let charges = map.get("charges")?; + let charges = { + let x = i32::from_str(charges).ok()?; + if !(0i32..=4i32).contains(&x) { + return None; + } + x + }; + block.set_charges(charges); Some(block) } - fn dead_fire_coral_wall_fan_from_identifier_and_properties( + fn potted_crimson_fungus_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_fire_coral_wall_fan(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::potted_crimson_fungus(); Some(block) } - fn dead_horn_coral_wall_fan_from_identifier_and_properties( + fn potted_warped_fungus_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_horn_coral_wall_fan(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::potted_warped_fungus(); Some(block) } - fn tube_coral_wall_fan_from_identifier_and_properties( + fn potted_crimson_roots_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::tube_coral_wall_fan(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::potted_crimson_roots(); Some(block) } - fn brain_coral_wall_fan_from_identifier_and_properties( + fn potted_warped_roots_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brain_coral_wall_fan(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::potted_warped_roots(); Some(block) } - fn bubble_coral_wall_fan_from_identifier_and_properties( + fn lodestone_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::lodestone(); + Some(block) + } + fn blackstone_from_identifier_and_properties(map: &BTreeMap) -> Option { + let mut block = BlockId::blackstone(); + Some(block) + } + fn blackstone_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::bubble_coral_wall_fan(); + let mut block = BlockId::blackstone_stairs(); let facing_cardinal = map.get("facing")?; let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn fire_coral_wall_fan_from_identifier_and_properties( + fn blackstone_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::fire_coral_wall_fan(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::blackstone_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn horn_coral_wall_fan_from_identifier_and_properties( + fn blackstone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::horn_coral_wall_fan(); - let facing_cardinal = map.get("facing")?; - let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; - block.set_facing_cardinal(facing_cardinal); + let mut block = BlockId::blackstone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn dead_tube_coral_fan_from_identifier_and_properties( + fn polished_blackstone_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_tube_coral_fan(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::polished_blackstone(); Some(block) } - fn dead_brain_coral_fan_from_identifier_and_properties( + fn polished_blackstone_bricks_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_brain_coral_fan(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::polished_blackstone_bricks(); Some(block) } - fn dead_bubble_coral_fan_from_identifier_and_properties( + fn cracked_polished_blackstone_bricks_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_bubble_coral_fan(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::cracked_polished_blackstone_bricks(); Some(block) } - fn dead_fire_coral_fan_from_identifier_and_properties( + fn chiseled_polished_blackstone_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_fire_coral_fan(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::chiseled_polished_blackstone(); Some(block) } - fn dead_horn_coral_fan_from_identifier_and_properties( + fn polished_blackstone_brick_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::dead_horn_coral_fan(); + let mut block = BlockId::polished_blackstone_brick_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn tube_coral_fan_from_identifier_and_properties( + fn polished_blackstone_brick_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::tube_coral_fan(); + let mut block = BlockId::polished_blackstone_brick_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn brain_coral_fan_from_identifier_and_properties( + fn polished_blackstone_brick_wall_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::brain_coral_fan(); + let mut block = BlockId::polished_blackstone_brick_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn bubble_coral_fan_from_identifier_and_properties( + fn gilded_blackstone_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::bubble_coral_fan(); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + let mut block = BlockId::gilded_blackstone(); Some(block) } - fn fire_coral_fan_from_identifier_and_properties( + fn polished_blackstone_stairs_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::fire_coral_fan(); + let mut block = BlockId::polished_blackstone_stairs(); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let half_top_bottom = map.get("half")?; + let half_top_bottom = HalfTopBottom::from_str(half_top_bottom).ok()?; + block.set_half_top_bottom(half_top_bottom); + let stairs_shape = map.get("shape")?; + let stairs_shape = StairsShape::from_str(stairs_shape).ok()?; + block.set_stairs_shape(stairs_shape); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn horn_coral_fan_from_identifier_and_properties( + fn polished_blackstone_slab_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::horn_coral_fan(); + let mut block = BlockId::polished_blackstone_slab(); + let slab_kind = map.get("type")?; + let slab_kind = SlabKind::from_str(slab_kind).ok()?; + block.set_slab_kind(slab_kind); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); Some(block) } - fn sea_pickle_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::sea_pickle(); - let pickles = map.get("pickles")?; - let pickles = { - let x = i32::from_str(pickles).ok()?; - if !(1i32..=4i32).contains(&x) { - return None; - } - x - }; - block.set_pickles(pickles); - let waterlogged = map.get("waterlogged")?; - let waterlogged = bool::from_str(waterlogged).ok()?; - block.set_waterlogged(waterlogged); + fn polished_blackstone_pressure_plate_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::polished_blackstone_pressure_plate(); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn blue_ice_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::blue_ice(); + fn polished_blackstone_button_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::polished_blackstone_button(); + let face = map.get("face")?; + let face = Face::from_str(face).ok()?; + block.set_face(face); + let facing_cardinal = map.get("facing")?; + let facing_cardinal = FacingCardinal::from_str(facing_cardinal).ok()?; + block.set_facing_cardinal(facing_cardinal); + let powered = map.get("powered")?; + let powered = bool::from_str(powered).ok()?; + block.set_powered(powered); Some(block) } - fn conduit_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::conduit(); + fn polished_blackstone_wall_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::polished_blackstone_wall(); + let east_nlt = map.get("east")?; + let east_nlt = EastNlt::from_str(east_nlt).ok()?; + block.set_east_nlt(east_nlt); + let north_nlt = map.get("north")?; + let north_nlt = NorthNlt::from_str(north_nlt).ok()?; + block.set_north_nlt(north_nlt); + let south_nlt = map.get("south")?; + let south_nlt = SouthNlt::from_str(south_nlt).ok()?; + block.set_south_nlt(south_nlt); + let up = map.get("up")?; + let up = bool::from_str(up).ok()?; + block.set_up(up); let waterlogged = map.get("waterlogged")?; let waterlogged = bool::from_str(waterlogged).ok()?; block.set_waterlogged(waterlogged); + let west_nlt = map.get("west")?; + let west_nlt = WestNlt::from_str(west_nlt).ok()?; + block.set_west_nlt(west_nlt); Some(block) } - fn void_air_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::void_air(); - Some(block) - } - fn cave_air_from_identifier_and_properties(map: &BTreeMap) -> Option { - let mut block = BlockId::cave_air(); + fn chiseled_nether_bricks_from_identifier_and_properties( + map: &BTreeMap, + ) -> Option { + let mut block = BlockId::chiseled_nether_bricks(); Some(block) } - fn bubble_column_from_identifier_and_properties( + fn cracked_nether_bricks_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::bubble_column(); - let drag = map.get("drag")?; - let drag = bool::from_str(drag).ok()?; - block.set_drag(drag); + let mut block = BlockId::cracked_nether_bricks(); Some(block) } - fn structure_block_from_identifier_and_properties( + fn quartz_bricks_from_identifier_and_properties( map: &BTreeMap, ) -> Option { - let mut block = BlockId::structure_block(); - let structure_block_mode = map.get("mode")?; - let structure_block_mode = StructureBlockMode::from_str(structure_block_mode).ok()?; - block.set_structure_block_mode(structure_block_mode); + let mut block = BlockId::quartz_bricks(); Some(block) } #[doc = "Attempts to convert a block identifier to a block with default property values."] @@ -21862,6 +28888,7 @@ impl BlockId { "minecraft:gold_ore" => Some(Self::gold_ore()), "minecraft:iron_ore" => Some(Self::iron_ore()), "minecraft:coal_ore" => Some(Self::coal_ore()), + "minecraft:nether_gold_ore" => Some(Self::nether_gold_ore()), "minecraft:oak_log" => Some(Self::oak_log()), "minecraft:spruce_log" => Some(Self::spruce_log()), "minecraft:birch_log" => Some(Self::birch_log()), @@ -21956,6 +28983,9 @@ impl BlockId { "minecraft:white_tulip" => Some(Self::white_tulip()), "minecraft:pink_tulip" => Some(Self::pink_tulip()), "minecraft:oxeye_daisy" => Some(Self::oxeye_daisy()), + "minecraft:cornflower" => Some(Self::cornflower()), + "minecraft:wither_rose" => Some(Self::wither_rose()), + "minecraft:lily_of_the_valley" => Some(Self::lily_of_the_valley()), "minecraft:brown_mushroom" => Some(Self::brown_mushroom()), "minecraft:red_mushroom" => Some(Self::red_mushroom()), "minecraft:gold_block" => Some(Self::gold_block()), @@ -21968,6 +28998,7 @@ impl BlockId { "minecraft:torch" => Some(Self::torch()), "minecraft:wall_torch" => Some(Self::wall_torch()), "minecraft:fire" => Some(Self::fire()), + "minecraft:soul_fire" => Some(Self::soul_fire()), "minecraft:spawner" => Some(Self::spawner()), "minecraft:oak_stairs" => Some(Self::oak_stairs()), "minecraft:chest" => Some(Self::chest()), @@ -21978,12 +29009,22 @@ impl BlockId { "minecraft:wheat" => Some(Self::wheat()), "minecraft:farmland" => Some(Self::farmland()), "minecraft:furnace" => Some(Self::furnace()), - "minecraft:sign" => Some(Self::sign()), + "minecraft:oak_sign" => Some(Self::oak_sign()), + "minecraft:spruce_sign" => Some(Self::spruce_sign()), + "minecraft:birch_sign" => Some(Self::birch_sign()), + "minecraft:acacia_sign" => Some(Self::acacia_sign()), + "minecraft:jungle_sign" => Some(Self::jungle_sign()), + "minecraft:dark_oak_sign" => Some(Self::dark_oak_sign()), "minecraft:oak_door" => Some(Self::oak_door()), "minecraft:ladder" => Some(Self::ladder()), "minecraft:rail" => Some(Self::rail()), "minecraft:cobblestone_stairs" => Some(Self::cobblestone_stairs()), - "minecraft:wall_sign" => Some(Self::wall_sign()), + "minecraft:oak_wall_sign" => Some(Self::oak_wall_sign()), + "minecraft:spruce_wall_sign" => Some(Self::spruce_wall_sign()), + "minecraft:birch_wall_sign" => Some(Self::birch_wall_sign()), + "minecraft:acacia_wall_sign" => Some(Self::acacia_wall_sign()), + "minecraft:jungle_wall_sign" => Some(Self::jungle_wall_sign()), + "minecraft:dark_oak_wall_sign" => Some(Self::dark_oak_wall_sign()), "minecraft:lever" => Some(Self::lever()), "minecraft:stone_pressure_plate" => Some(Self::stone_pressure_plate()), "minecraft:iron_door" => Some(Self::iron_door()), @@ -22008,6 +29049,11 @@ impl BlockId { "minecraft:pumpkin" => Some(Self::pumpkin()), "minecraft:netherrack" => Some(Self::netherrack()), "minecraft:soul_sand" => Some(Self::soul_sand()), + "minecraft:soul_soil" => Some(Self::soul_soil()), + "minecraft:basalt" => Some(Self::basalt()), + "minecraft:polished_basalt" => Some(Self::polished_basalt()), + "minecraft:soul_torch" => Some(Self::soul_torch()), + "minecraft:soul_wall_torch" => Some(Self::soul_wall_torch()), "minecraft:glowstone" => Some(Self::glowstone()), "minecraft:nether_portal" => Some(Self::nether_portal()), "minecraft:carved_pumpkin" => Some(Self::carved_pumpkin()), @@ -22036,6 +29082,10 @@ impl BlockId { "minecraft:jungle_trapdoor" => Some(Self::jungle_trapdoor()), "minecraft:acacia_trapdoor" => Some(Self::acacia_trapdoor()), "minecraft:dark_oak_trapdoor" => Some(Self::dark_oak_trapdoor()), + "minecraft:stone_bricks" => Some(Self::stone_bricks()), + "minecraft:mossy_stone_bricks" => Some(Self::mossy_stone_bricks()), + "minecraft:cracked_stone_bricks" => Some(Self::cracked_stone_bricks()), + "minecraft:chiseled_stone_bricks" => Some(Self::chiseled_stone_bricks()), "minecraft:infested_stone" => Some(Self::infested_stone()), "minecraft:infested_cobblestone" => Some(Self::infested_cobblestone()), "minecraft:infested_stone_bricks" => Some(Self::infested_stone_bricks()), @@ -22046,14 +29096,11 @@ impl BlockId { "minecraft:infested_chiseled_stone_bricks" => { Some(Self::infested_chiseled_stone_bricks()) } - "minecraft:stone_bricks" => Some(Self::stone_bricks()), - "minecraft:mossy_stone_bricks" => Some(Self::mossy_stone_bricks()), - "minecraft:cracked_stone_bricks" => Some(Self::cracked_stone_bricks()), - "minecraft:chiseled_stone_bricks" => Some(Self::chiseled_stone_bricks()), "minecraft:brown_mushroom_block" => Some(Self::brown_mushroom_block()), "minecraft:red_mushroom_block" => Some(Self::red_mushroom_block()), "minecraft:mushroom_stem" => Some(Self::mushroom_stem()), "minecraft:iron_bars" => Some(Self::iron_bars()), + "minecraft:chain" => Some(Self::chain()), "minecraft:glass_pane" => Some(Self::glass_pane()), "minecraft:melon" => Some(Self::melon()), "minecraft:attached_pumpkin_stem" => Some(Self::attached_pumpkin_stem()), @@ -22110,6 +29157,9 @@ impl BlockId { "minecraft:potted_white_tulip" => Some(Self::potted_white_tulip()), "minecraft:potted_pink_tulip" => Some(Self::potted_pink_tulip()), "minecraft:potted_oxeye_daisy" => Some(Self::potted_oxeye_daisy()), + "minecraft:potted_cornflower" => Some(Self::potted_cornflower()), + "minecraft:potted_lily_of_the_valley" => Some(Self::potted_lily_of_the_valley()), + "minecraft:potted_wither_rose" => Some(Self::potted_wither_rose()), "minecraft:potted_red_mushroom" => Some(Self::potted_red_mushroom()), "minecraft:potted_brown_mushroom" => Some(Self::potted_brown_mushroom()), "minecraft:potted_dead_bush" => Some(Self::potted_dead_bush()), @@ -22122,18 +29172,18 @@ impl BlockId { "minecraft:jungle_button" => Some(Self::jungle_button()), "minecraft:acacia_button" => Some(Self::acacia_button()), "minecraft:dark_oak_button" => Some(Self::dark_oak_button()), - "minecraft:skeleton_wall_skull" => Some(Self::skeleton_wall_skull()), "minecraft:skeleton_skull" => Some(Self::skeleton_skull()), - "minecraft:wither_skeleton_wall_skull" => Some(Self::wither_skeleton_wall_skull()), + "minecraft:skeleton_wall_skull" => Some(Self::skeleton_wall_skull()), "minecraft:wither_skeleton_skull" => Some(Self::wither_skeleton_skull()), - "minecraft:zombie_wall_head" => Some(Self::zombie_wall_head()), + "minecraft:wither_skeleton_wall_skull" => Some(Self::wither_skeleton_wall_skull()), "minecraft:zombie_head" => Some(Self::zombie_head()), - "minecraft:player_wall_head" => Some(Self::player_wall_head()), + "minecraft:zombie_wall_head" => Some(Self::zombie_wall_head()), "minecraft:player_head" => Some(Self::player_head()), - "minecraft:creeper_wall_head" => Some(Self::creeper_wall_head()), + "minecraft:player_wall_head" => Some(Self::player_wall_head()), "minecraft:creeper_head" => Some(Self::creeper_head()), - "minecraft:dragon_wall_head" => Some(Self::dragon_wall_head()), + "minecraft:creeper_wall_head" => Some(Self::creeper_wall_head()), "minecraft:dragon_head" => Some(Self::dragon_head()), + "minecraft:dragon_wall_head" => Some(Self::dragon_wall_head()), "minecraft:anvil" => Some(Self::anvil()), "minecraft:chipped_anvil" => Some(Self::chipped_anvil()), "minecraft:damaged_anvil" => Some(Self::damaged_anvil()), @@ -22275,7 +29325,9 @@ impl BlockId { "minecraft:acacia_slab" => Some(Self::acacia_slab()), "minecraft:dark_oak_slab" => Some(Self::dark_oak_slab()), "minecraft:stone_slab" => Some(Self::stone_slab()), + "minecraft:smooth_stone_slab" => Some(Self::smooth_stone_slab()), "minecraft:sandstone_slab" => Some(Self::sandstone_slab()), + "minecraft:cut_sandstone_slab" => Some(Self::cut_sandstone_slab()), "minecraft:petrified_oak_slab" => Some(Self::petrified_oak_slab()), "minecraft:cobblestone_slab" => Some(Self::cobblestone_slab()), "minecraft:brick_slab" => Some(Self::brick_slab()), @@ -22283,6 +29335,7 @@ impl BlockId { "minecraft:nether_brick_slab" => Some(Self::nether_brick_slab()), "minecraft:quartz_slab" => Some(Self::quartz_slab()), "minecraft:red_sandstone_slab" => Some(Self::red_sandstone_slab()), + "minecraft:cut_red_sandstone_slab" => Some(Self::cut_red_sandstone_slab()), "minecraft:purpur_slab" => Some(Self::purpur_slab()), "minecraft:smooth_stone" => Some(Self::smooth_stone()), "minecraft:smooth_sandstone" => Some(Self::smooth_sandstone()), @@ -22411,16 +29464,6 @@ impl BlockId { "minecraft:bubble_coral" => Some(Self::bubble_coral()), "minecraft:fire_coral" => Some(Self::fire_coral()), "minecraft:horn_coral" => Some(Self::horn_coral()), - "minecraft:dead_tube_coral_wall_fan" => Some(Self::dead_tube_coral_wall_fan()), - "minecraft:dead_brain_coral_wall_fan" => Some(Self::dead_brain_coral_wall_fan()), - "minecraft:dead_bubble_coral_wall_fan" => Some(Self::dead_bubble_coral_wall_fan()), - "minecraft:dead_fire_coral_wall_fan" => Some(Self::dead_fire_coral_wall_fan()), - "minecraft:dead_horn_coral_wall_fan" => Some(Self::dead_horn_coral_wall_fan()), - "minecraft:tube_coral_wall_fan" => Some(Self::tube_coral_wall_fan()), - "minecraft:brain_coral_wall_fan" => Some(Self::brain_coral_wall_fan()), - "minecraft:bubble_coral_wall_fan" => Some(Self::bubble_coral_wall_fan()), - "minecraft:fire_coral_wall_fan" => Some(Self::fire_coral_wall_fan()), - "minecraft:horn_coral_wall_fan" => Some(Self::horn_coral_wall_fan()), "minecraft:dead_tube_coral_fan" => Some(Self::dead_tube_coral_fan()), "minecraft:dead_brain_coral_fan" => Some(Self::dead_brain_coral_fan()), "minecraft:dead_bubble_coral_fan" => Some(Self::dead_bubble_coral_fan()), @@ -22431,13 +29474,171 @@ impl BlockId { "minecraft:bubble_coral_fan" => Some(Self::bubble_coral_fan()), "minecraft:fire_coral_fan" => Some(Self::fire_coral_fan()), "minecraft:horn_coral_fan" => Some(Self::horn_coral_fan()), + "minecraft:dead_tube_coral_wall_fan" => Some(Self::dead_tube_coral_wall_fan()), + "minecraft:dead_brain_coral_wall_fan" => Some(Self::dead_brain_coral_wall_fan()), + "minecraft:dead_bubble_coral_wall_fan" => Some(Self::dead_bubble_coral_wall_fan()), + "minecraft:dead_fire_coral_wall_fan" => Some(Self::dead_fire_coral_wall_fan()), + "minecraft:dead_horn_coral_wall_fan" => Some(Self::dead_horn_coral_wall_fan()), + "minecraft:tube_coral_wall_fan" => Some(Self::tube_coral_wall_fan()), + "minecraft:brain_coral_wall_fan" => Some(Self::brain_coral_wall_fan()), + "minecraft:bubble_coral_wall_fan" => Some(Self::bubble_coral_wall_fan()), + "minecraft:fire_coral_wall_fan" => Some(Self::fire_coral_wall_fan()), + "minecraft:horn_coral_wall_fan" => Some(Self::horn_coral_wall_fan()), "minecraft:sea_pickle" => Some(Self::sea_pickle()), "minecraft:blue_ice" => Some(Self::blue_ice()), "minecraft:conduit" => Some(Self::conduit()), + "minecraft:bamboo_sapling" => Some(Self::bamboo_sapling()), + "minecraft:bamboo" => Some(Self::bamboo()), + "minecraft:potted_bamboo" => Some(Self::potted_bamboo()), "minecraft:void_air" => Some(Self::void_air()), "minecraft:cave_air" => Some(Self::cave_air()), "minecraft:bubble_column" => Some(Self::bubble_column()), + "minecraft:polished_granite_stairs" => Some(Self::polished_granite_stairs()), + "minecraft:smooth_red_sandstone_stairs" => Some(Self::smooth_red_sandstone_stairs()), + "minecraft:mossy_stone_brick_stairs" => Some(Self::mossy_stone_brick_stairs()), + "minecraft:polished_diorite_stairs" => Some(Self::polished_diorite_stairs()), + "minecraft:mossy_cobblestone_stairs" => Some(Self::mossy_cobblestone_stairs()), + "minecraft:end_stone_brick_stairs" => Some(Self::end_stone_brick_stairs()), + "minecraft:stone_stairs" => Some(Self::stone_stairs()), + "minecraft:smooth_sandstone_stairs" => Some(Self::smooth_sandstone_stairs()), + "minecraft:smooth_quartz_stairs" => Some(Self::smooth_quartz_stairs()), + "minecraft:granite_stairs" => Some(Self::granite_stairs()), + "minecraft:andesite_stairs" => Some(Self::andesite_stairs()), + "minecraft:red_nether_brick_stairs" => Some(Self::red_nether_brick_stairs()), + "minecraft:polished_andesite_stairs" => Some(Self::polished_andesite_stairs()), + "minecraft:diorite_stairs" => Some(Self::diorite_stairs()), + "minecraft:polished_granite_slab" => Some(Self::polished_granite_slab()), + "minecraft:smooth_red_sandstone_slab" => Some(Self::smooth_red_sandstone_slab()), + "minecraft:mossy_stone_brick_slab" => Some(Self::mossy_stone_brick_slab()), + "minecraft:polished_diorite_slab" => Some(Self::polished_diorite_slab()), + "minecraft:mossy_cobblestone_slab" => Some(Self::mossy_cobblestone_slab()), + "minecraft:end_stone_brick_slab" => Some(Self::end_stone_brick_slab()), + "minecraft:smooth_sandstone_slab" => Some(Self::smooth_sandstone_slab()), + "minecraft:smooth_quartz_slab" => Some(Self::smooth_quartz_slab()), + "minecraft:granite_slab" => Some(Self::granite_slab()), + "minecraft:andesite_slab" => Some(Self::andesite_slab()), + "minecraft:red_nether_brick_slab" => Some(Self::red_nether_brick_slab()), + "minecraft:polished_andesite_slab" => Some(Self::polished_andesite_slab()), + "minecraft:diorite_slab" => Some(Self::diorite_slab()), + "minecraft:brick_wall" => Some(Self::brick_wall()), + "minecraft:prismarine_wall" => Some(Self::prismarine_wall()), + "minecraft:red_sandstone_wall" => Some(Self::red_sandstone_wall()), + "minecraft:mossy_stone_brick_wall" => Some(Self::mossy_stone_brick_wall()), + "minecraft:granite_wall" => Some(Self::granite_wall()), + "minecraft:stone_brick_wall" => Some(Self::stone_brick_wall()), + "minecraft:nether_brick_wall" => Some(Self::nether_brick_wall()), + "minecraft:andesite_wall" => Some(Self::andesite_wall()), + "minecraft:red_nether_brick_wall" => Some(Self::red_nether_brick_wall()), + "minecraft:sandstone_wall" => Some(Self::sandstone_wall()), + "minecraft:end_stone_brick_wall" => Some(Self::end_stone_brick_wall()), + "minecraft:diorite_wall" => Some(Self::diorite_wall()), + "minecraft:scaffolding" => Some(Self::scaffolding()), + "minecraft:loom" => Some(Self::loom()), + "minecraft:barrel" => Some(Self::barrel()), + "minecraft:smoker" => Some(Self::smoker()), + "minecraft:blast_furnace" => Some(Self::blast_furnace()), + "minecraft:cartography_table" => Some(Self::cartography_table()), + "minecraft:fletching_table" => Some(Self::fletching_table()), + "minecraft:grindstone" => Some(Self::grindstone()), + "minecraft:lectern" => Some(Self::lectern()), + "minecraft:smithing_table" => Some(Self::smithing_table()), + "minecraft:stonecutter" => Some(Self::stonecutter()), + "minecraft:bell" => Some(Self::bell()), + "minecraft:lantern" => Some(Self::lantern()), + "minecraft:soul_lantern" => Some(Self::soul_lantern()), + "minecraft:campfire" => Some(Self::campfire()), + "minecraft:soul_campfire" => Some(Self::soul_campfire()), + "minecraft:sweet_berry_bush" => Some(Self::sweet_berry_bush()), + "minecraft:warped_stem" => Some(Self::warped_stem()), + "minecraft:stripped_warped_stem" => Some(Self::stripped_warped_stem()), + "minecraft:warped_hyphae" => Some(Self::warped_hyphae()), + "minecraft:stripped_warped_hyphae" => Some(Self::stripped_warped_hyphae()), + "minecraft:warped_nylium" => Some(Self::warped_nylium()), + "minecraft:warped_fungus" => Some(Self::warped_fungus()), + "minecraft:warped_wart_block" => Some(Self::warped_wart_block()), + "minecraft:warped_roots" => Some(Self::warped_roots()), + "minecraft:nether_sprouts" => Some(Self::nether_sprouts()), + "minecraft:crimson_stem" => Some(Self::crimson_stem()), + "minecraft:stripped_crimson_stem" => Some(Self::stripped_crimson_stem()), + "minecraft:crimson_hyphae" => Some(Self::crimson_hyphae()), + "minecraft:stripped_crimson_hyphae" => Some(Self::stripped_crimson_hyphae()), + "minecraft:crimson_nylium" => Some(Self::crimson_nylium()), + "minecraft:crimson_fungus" => Some(Self::crimson_fungus()), + "minecraft:shroomlight" => Some(Self::shroomlight()), + "minecraft:weeping_vines" => Some(Self::weeping_vines()), + "minecraft:weeping_vines_plant" => Some(Self::weeping_vines_plant()), + "minecraft:twisting_vines" => Some(Self::twisting_vines()), + "minecraft:twisting_vines_plant" => Some(Self::twisting_vines_plant()), + "minecraft:crimson_roots" => Some(Self::crimson_roots()), + "minecraft:crimson_planks" => Some(Self::crimson_planks()), + "minecraft:warped_planks" => Some(Self::warped_planks()), + "minecraft:crimson_slab" => Some(Self::crimson_slab()), + "minecraft:warped_slab" => Some(Self::warped_slab()), + "minecraft:crimson_pressure_plate" => Some(Self::crimson_pressure_plate()), + "minecraft:warped_pressure_plate" => Some(Self::warped_pressure_plate()), + "minecraft:crimson_fence" => Some(Self::crimson_fence()), + "minecraft:warped_fence" => Some(Self::warped_fence()), + "minecraft:crimson_trapdoor" => Some(Self::crimson_trapdoor()), + "minecraft:warped_trapdoor" => Some(Self::warped_trapdoor()), + "minecraft:crimson_fence_gate" => Some(Self::crimson_fence_gate()), + "minecraft:warped_fence_gate" => Some(Self::warped_fence_gate()), + "minecraft:crimson_stairs" => Some(Self::crimson_stairs()), + "minecraft:warped_stairs" => Some(Self::warped_stairs()), + "minecraft:crimson_button" => Some(Self::crimson_button()), + "minecraft:warped_button" => Some(Self::warped_button()), + "minecraft:crimson_door" => Some(Self::crimson_door()), + "minecraft:warped_door" => Some(Self::warped_door()), + "minecraft:crimson_sign" => Some(Self::crimson_sign()), + "minecraft:warped_sign" => Some(Self::warped_sign()), + "minecraft:crimson_wall_sign" => Some(Self::crimson_wall_sign()), + "minecraft:warped_wall_sign" => Some(Self::warped_wall_sign()), "minecraft:structure_block" => Some(Self::structure_block()), + "minecraft:jigsaw" => Some(Self::jigsaw()), + "minecraft:composter" => Some(Self::composter()), + "minecraft:target" => Some(Self::target()), + "minecraft:bee_nest" => Some(Self::bee_nest()), + "minecraft:beehive" => Some(Self::beehive()), + "minecraft:honey_block" => Some(Self::honey_block()), + "minecraft:honeycomb_block" => Some(Self::honeycomb_block()), + "minecraft:netherite_block" => Some(Self::netherite_block()), + "minecraft:ancient_debris" => Some(Self::ancient_debris()), + "minecraft:crying_obsidian" => Some(Self::crying_obsidian()), + "minecraft:respawn_anchor" => Some(Self::respawn_anchor()), + "minecraft:potted_crimson_fungus" => Some(Self::potted_crimson_fungus()), + "minecraft:potted_warped_fungus" => Some(Self::potted_warped_fungus()), + "minecraft:potted_crimson_roots" => Some(Self::potted_crimson_roots()), + "minecraft:potted_warped_roots" => Some(Self::potted_warped_roots()), + "minecraft:lodestone" => Some(Self::lodestone()), + "minecraft:blackstone" => Some(Self::blackstone()), + "minecraft:blackstone_stairs" => Some(Self::blackstone_stairs()), + "minecraft:blackstone_wall" => Some(Self::blackstone_wall()), + "minecraft:blackstone_slab" => Some(Self::blackstone_slab()), + "minecraft:polished_blackstone" => Some(Self::polished_blackstone()), + "minecraft:polished_blackstone_bricks" => Some(Self::polished_blackstone_bricks()), + "minecraft:cracked_polished_blackstone_bricks" => { + Some(Self::cracked_polished_blackstone_bricks()) + } + "minecraft:chiseled_polished_blackstone" => Some(Self::chiseled_polished_blackstone()), + "minecraft:polished_blackstone_brick_slab" => { + Some(Self::polished_blackstone_brick_slab()) + } + "minecraft:polished_blackstone_brick_stairs" => { + Some(Self::polished_blackstone_brick_stairs()) + } + "minecraft:polished_blackstone_brick_wall" => { + Some(Self::polished_blackstone_brick_wall()) + } + "minecraft:gilded_blackstone" => Some(Self::gilded_blackstone()), + "minecraft:polished_blackstone_stairs" => Some(Self::polished_blackstone_stairs()), + "minecraft:polished_blackstone_slab" => Some(Self::polished_blackstone_slab()), + "minecraft:polished_blackstone_pressure_plate" => { + Some(Self::polished_blackstone_pressure_plate()) + } + "minecraft:polished_blackstone_button" => Some(Self::polished_blackstone_button()), + "minecraft:polished_blackstone_wall" => Some(Self::polished_blackstone_wall()), + "minecraft:chiseled_nether_bricks" => Some(Self::chiseled_nether_bricks()), + "minecraft:cracked_nether_bricks" => Some(Self::cracked_nether_bricks()), + "minecraft:quartz_bricks" => Some(Self::quartz_bricks()), _ => None, } } diff --git a/core/blocks/src/generated/mod.rs b/crates/blocks/src/generated/mod.rs similarity index 100% rename from core/blocks/src/generated/mod.rs rename to crates/blocks/src/generated/mod.rs diff --git a/core/blocks/src/generated/properties.rs b/crates/blocks/src/generated/properties.rs similarity index 69% rename from core/blocks/src/generated/properties.rs rename to crates/blocks/src/generated/properties.rs index 79a45207b..2f3838a73 100644 --- a/core/blocks/src/generated/properties.rs +++ b/crates/blocks/src/generated/properties.rs @@ -1,5 +1,12 @@ use crate::{BlockId, BlockKind}; impl BlockId { + #[doc = "Determines whether or not a block has the `age_0_1` property."] + pub fn has_age_0_1(self) -> bool { + match self.kind() { + BlockKind::Bamboo => true, + _ => false, + } + } #[doc = "Determines whether or not a block has the `age_0_15` property."] pub fn has_age_0_15(self) -> bool { match self.kind() { @@ -17,14 +24,17 @@ impl BlockId { #[doc = "Determines whether or not a block has the `age_0_25` property."] pub fn has_age_0_25(self) -> bool { match self.kind() { - BlockKind::Kelp => true, + BlockKind::Kelp | BlockKind::WeepingVines | BlockKind::TwistingVines => true, _ => false, } } #[doc = "Determines whether or not a block has the `age_0_3` property."] pub fn has_age_0_3(self) -> bool { match self.kind() { - BlockKind::NetherWart | BlockKind::Beetroots | BlockKind::FrostedIce => true, + BlockKind::NetherWart + | BlockKind::Beetroots + | BlockKind::FrostedIce + | BlockKind::SweetBerryBush => true, _ => false, } } @@ -53,6 +63,13 @@ impl BlockId { _ => false, } } + #[doc = "Determines whether or not a block has the `attachment` property."] + pub fn has_attachment(self) -> bool { + match self.kind() { + BlockKind::Bell => true, + _ => false, + } + } #[doc = "Determines whether or not a block has the `axis_xyz` property."] pub fn has_axis_xyz(self) -> bool { match self.kind() { @@ -80,10 +97,21 @@ impl BlockId { | BlockKind::StrippedJungleWood | BlockKind::StrippedAcaciaWood | BlockKind::StrippedDarkOakWood + | BlockKind::Basalt + | BlockKind::PolishedBasalt + | BlockKind::Chain | BlockKind::QuartzPillar | BlockKind::HayBlock | BlockKind::PurpurPillar - | BlockKind::BoneBlock => true, + | BlockKind::BoneBlock + | BlockKind::WarpedStem + | BlockKind::StrippedWarpedStem + | BlockKind::WarpedHyphae + | BlockKind::StrippedWarpedHyphae + | BlockKind::CrimsonStem + | BlockKind::StrippedCrimsonStem + | BlockKind::CrimsonHyphae + | BlockKind::StrippedCrimsonHyphae => true, _ => false, } } @@ -101,6 +129,13 @@ impl BlockId { _ => false, } } + #[doc = "Determines whether or not a block has the `bottom` property."] + pub fn has_bottom(self) -> bool { + match self.kind() { + BlockKind::Scaffolding => true, + _ => false, + } + } #[doc = "Determines whether or not a block has the `cauldron_level` property."] pub fn has_cauldron_level(self) -> bool { match self.kind() { @@ -108,6 +143,13 @@ impl BlockId { _ => false, } } + #[doc = "Determines whether or not a block has the `charges` property."] + pub fn has_charges(self) -> bool { + match self.kind() { + BlockKind::RespawnAnchor => true, + _ => false, + } + } #[doc = "Determines whether or not a block has the `chest_kind` property."] pub fn has_chest_kind(self) -> bool { match self.kind() { @@ -145,8 +187,15 @@ impl BlockId { _ => false, } } - #[doc = "Determines whether or not a block has the `distance` property."] - pub fn has_distance(self) -> bool { + #[doc = "Determines whether or not a block has the `distance_0_7` property."] + pub fn has_distance_0_7(self) -> bool { + match self.kind() { + BlockKind::Scaffolding => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `distance_1_7` property."] + pub fn has_distance_1_7(self) -> bool { match self.kind() { BlockKind::OakLeaves | BlockKind::SpruceLeaves @@ -187,8 +236,6 @@ impl BlockId { | BlockKind::Vine | BlockKind::NetherBrickFence | BlockKind::Tripwire - | BlockKind::CobblestoneWall - | BlockKind::MossyCobblestoneWall | BlockKind::WhiteStainedGlassPane | BlockKind::OrangeStainedGlassPane | BlockKind::MagentaStainedGlassPane @@ -210,7 +257,32 @@ impl BlockId { | BlockKind::JungleFence | BlockKind::AcaciaFence | BlockKind::DarkOakFence - | BlockKind::ChorusPlant => true, + | BlockKind::ChorusPlant + | BlockKind::CrimsonFence + | BlockKind::WarpedFence => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `east_nlt` property."] + pub fn has_east_nlt(self) -> bool { + match self.kind() { + BlockKind::CobblestoneWall + | BlockKind::MossyCobblestoneWall + | BlockKind::BrickWall + | BlockKind::PrismarineWall + | BlockKind::RedSandstoneWall + | BlockKind::MossyStoneBrickWall + | BlockKind::GraniteWall + | BlockKind::StoneBrickWall + | BlockKind::NetherBrickWall + | BlockKind::AndesiteWall + | BlockKind::RedNetherBrickWall + | BlockKind::SandstoneWall + | BlockKind::EndStoneBrickWall + | BlockKind::DioriteWall + | BlockKind::BlackstoneWall + | BlockKind::PolishedBlackstoneBrickWall + | BlockKind::PolishedBlackstoneWall => true, _ => false, } } @@ -259,7 +331,11 @@ impl BlockId { | BlockKind::BirchButton | BlockKind::JungleButton | BlockKind::AcaciaButton - | BlockKind::DarkOakButton => true, + | BlockKind::DarkOakButton + | BlockKind::Grindstone + | BlockKind::CrimsonButton + | BlockKind::WarpedButton + | BlockKind::PolishedBlackstoneButton => true, _ => false, } } @@ -289,11 +365,17 @@ impl BlockId { | BlockKind::OakDoor | BlockKind::Ladder | BlockKind::CobblestoneStairs - | BlockKind::WallSign + | BlockKind::OakWallSign + | BlockKind::SpruceWallSign + | BlockKind::BirchWallSign + | BlockKind::AcaciaWallSign + | BlockKind::JungleWallSign + | BlockKind::DarkOakWallSign | BlockKind::Lever | BlockKind::IronDoor | BlockKind::RedstoneWallTorch | BlockKind::StoneButton + | BlockKind::SoulWallTorch | BlockKind::CarvedPumpkin | BlockKind::JackOLantern | BlockKind::Repeater @@ -394,7 +476,48 @@ impl BlockId { | BlockKind::BrainCoralWallFan | BlockKind::BubbleCoralWallFan | BlockKind::FireCoralWallFan - | BlockKind::HornCoralWallFan => true, + | BlockKind::HornCoralWallFan + | BlockKind::PolishedGraniteStairs + | BlockKind::SmoothRedSandstoneStairs + | BlockKind::MossyStoneBrickStairs + | BlockKind::PolishedDioriteStairs + | BlockKind::MossyCobblestoneStairs + | BlockKind::EndStoneBrickStairs + | BlockKind::StoneStairs + | BlockKind::SmoothSandstoneStairs + | BlockKind::SmoothQuartzStairs + | BlockKind::GraniteStairs + | BlockKind::AndesiteStairs + | BlockKind::RedNetherBrickStairs + | BlockKind::PolishedAndesiteStairs + | BlockKind::DioriteStairs + | BlockKind::Loom + | BlockKind::Smoker + | BlockKind::BlastFurnace + | BlockKind::Grindstone + | BlockKind::Lectern + | BlockKind::Stonecutter + | BlockKind::Bell + | BlockKind::Campfire + | BlockKind::SoulCampfire + | BlockKind::CrimsonTrapdoor + | BlockKind::WarpedTrapdoor + | BlockKind::CrimsonFenceGate + | BlockKind::WarpedFenceGate + | BlockKind::CrimsonStairs + | BlockKind::WarpedStairs + | BlockKind::CrimsonButton + | BlockKind::WarpedButton + | BlockKind::CrimsonDoor + | BlockKind::WarpedDoor + | BlockKind::CrimsonWallSign + | BlockKind::WarpedWallSign + | BlockKind::BeeNest + | BlockKind::Beehive + | BlockKind::BlackstoneStairs + | BlockKind::PolishedBlackstoneBrickStairs + | BlockKind::PolishedBlackstoneStairs + | BlockKind::PolishedBlackstoneButton => true, _ => false, } } @@ -435,7 +558,8 @@ impl BlockId { | BlockKind::BrownShulkerBox | BlockKind::GreenShulkerBox | BlockKind::RedShulkerBox - | BlockKind::BlackShulkerBox => true, + | BlockKind::BlackShulkerBox + | BlockKind::Barrel => true, _ => false, } } @@ -465,7 +589,28 @@ impl BlockId { | BlockKind::PrismarineBrickStairs | BlockKind::DarkPrismarineStairs | BlockKind::RedSandstoneStairs - | BlockKind::PurpurStairs => true, + | BlockKind::PurpurStairs + | BlockKind::PolishedGraniteStairs + | BlockKind::SmoothRedSandstoneStairs + | BlockKind::MossyStoneBrickStairs + | BlockKind::PolishedDioriteStairs + | BlockKind::MossyCobblestoneStairs + | BlockKind::EndStoneBrickStairs + | BlockKind::StoneStairs + | BlockKind::SmoothSandstoneStairs + | BlockKind::SmoothQuartzStairs + | BlockKind::GraniteStairs + | BlockKind::AndesiteStairs + | BlockKind::RedNetherBrickStairs + | BlockKind::PolishedAndesiteStairs + | BlockKind::DioriteStairs + | BlockKind::CrimsonTrapdoor + | BlockKind::WarpedTrapdoor + | BlockKind::CrimsonStairs + | BlockKind::WarpedStairs + | BlockKind::BlackstoneStairs + | BlockKind::PolishedBlackstoneBrickStairs + | BlockKind::PolishedBlackstoneStairs => true, _ => false, } } @@ -485,7 +630,23 @@ impl BlockId { | BlockKind::BirchDoor | BlockKind::JungleDoor | BlockKind::AcaciaDoor - | BlockKind::DarkOakDoor => true, + | BlockKind::DarkOakDoor + | BlockKind::CrimsonDoor + | BlockKind::WarpedDoor => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `hanging` property."] + pub fn has_hanging(self) -> bool { + match self.kind() { + BlockKind::Lantern | BlockKind::SoulLantern => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `has_book` property."] + pub fn has_has_book(self) -> bool { + match self.kind() { + BlockKind::Lectern => true, _ => false, } } @@ -533,7 +694,16 @@ impl BlockId { | BlockKind::BirchDoor | BlockKind::JungleDoor | BlockKind::AcaciaDoor - | BlockKind::DarkOakDoor => true, + | BlockKind::DarkOakDoor + | BlockKind::CrimsonDoor + | BlockKind::WarpedDoor => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `honey_level` property."] + pub fn has_honey_level(self) -> bool { + match self.kind() { + BlockKind::BeeNest | BlockKind::Beehive => true, _ => false, } } @@ -545,7 +715,9 @@ impl BlockId { | BlockKind::BirchFenceGate | BlockKind::JungleFenceGate | BlockKind::AcaciaFenceGate - | BlockKind::DarkOakFenceGate => true, + | BlockKind::DarkOakFenceGate + | BlockKind::CrimsonFenceGate + | BlockKind::WarpedFenceGate => true, _ => false, } } @@ -570,6 +742,20 @@ impl BlockId { _ => false, } } + #[doc = "Determines whether or not a block has the `leaves` property."] + pub fn has_leaves(self) -> bool { + match self.kind() { + BlockKind::Bamboo => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `level_0_8` property."] + pub fn has_level_0_8(self) -> bool { + match self.kind() { + BlockKind::Composter => true, + _ => false, + } + } #[doc = "Determines whether or not a block has the `lit` property."] pub fn has_lit(self) -> bool { match self.kind() { @@ -577,7 +763,11 @@ impl BlockId { | BlockKind::RedstoneOre | BlockKind::RedstoneTorch | BlockKind::RedstoneWallTorch - | BlockKind::RedstoneLamp => true, + | BlockKind::RedstoneLamp + | BlockKind::Smoker + | BlockKind::BlastFurnace + | BlockKind::Campfire + | BlockKind::SoulCampfire => true, _ => false, } } @@ -608,8 +798,6 @@ impl BlockId { | BlockKind::Vine | BlockKind::NetherBrickFence | BlockKind::Tripwire - | BlockKind::CobblestoneWall - | BlockKind::MossyCobblestoneWall | BlockKind::WhiteStainedGlassPane | BlockKind::OrangeStainedGlassPane | BlockKind::MagentaStainedGlassPane @@ -631,7 +819,32 @@ impl BlockId { | BlockKind::JungleFence | BlockKind::AcaciaFence | BlockKind::DarkOakFence - | BlockKind::ChorusPlant => true, + | BlockKind::ChorusPlant + | BlockKind::CrimsonFence + | BlockKind::WarpedFence => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `north_nlt` property."] + pub fn has_north_nlt(self) -> bool { + match self.kind() { + BlockKind::CobblestoneWall + | BlockKind::MossyCobblestoneWall + | BlockKind::BrickWall + | BlockKind::PrismarineWall + | BlockKind::RedSandstoneWall + | BlockKind::MossyStoneBrickWall + | BlockKind::GraniteWall + | BlockKind::StoneBrickWall + | BlockKind::NetherBrickWall + | BlockKind::AndesiteWall + | BlockKind::RedNetherBrickWall + | BlockKind::SandstoneWall + | BlockKind::EndStoneBrickWall + | BlockKind::DioriteWall + | BlockKind::BlackstoneWall + | BlockKind::PolishedBlackstoneBrickWall + | BlockKind::PolishedBlackstoneWall => true, _ => false, } } @@ -693,7 +906,21 @@ impl BlockId { | BlockKind::BirchDoor | BlockKind::JungleDoor | BlockKind::AcaciaDoor - | BlockKind::DarkOakDoor => true, + | BlockKind::DarkOakDoor + | BlockKind::Barrel + | BlockKind::CrimsonTrapdoor + | BlockKind::WarpedTrapdoor + | BlockKind::CrimsonFenceGate + | BlockKind::WarpedFenceGate + | BlockKind::CrimsonDoor + | BlockKind::WarpedDoor => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `orientation` property."] + pub fn has_orientation(self) -> bool { + match self.kind() { + BlockKind::Jigsaw => true, _ => false, } } @@ -751,7 +978,8 @@ impl BlockId { BlockKind::RedstoneWire | BlockKind::LightWeightedPressurePlate | BlockKind::HeavyWeightedPressurePlate - | BlockKind::DaylightDetector => true, + | BlockKind::DaylightDetector + | BlockKind::Target => true, _ => false, } } @@ -801,7 +1029,21 @@ impl BlockId { | BlockKind::JungleDoor | BlockKind::AcaciaDoor | BlockKind::DarkOakDoor - | BlockKind::Observer => true, + | BlockKind::Observer + | BlockKind::Lectern + | BlockKind::Bell + | BlockKind::CrimsonPressurePlate + | BlockKind::WarpedPressurePlate + | BlockKind::CrimsonTrapdoor + | BlockKind::WarpedTrapdoor + | BlockKind::CrimsonFenceGate + | BlockKind::WarpedFenceGate + | BlockKind::CrimsonButton + | BlockKind::WarpedButton + | BlockKind::CrimsonDoor + | BlockKind::WarpedDoor + | BlockKind::PolishedBlackstonePressurePlate + | BlockKind::PolishedBlackstoneButton => true, _ => false, } } @@ -822,7 +1064,12 @@ impl BlockId { #[doc = "Determines whether or not a block has the `rotation` property."] pub fn has_rotation(self) -> bool { match self.kind() { - BlockKind::Sign + BlockKind::OakSign + | BlockKind::SpruceSign + | BlockKind::BirchSign + | BlockKind::AcaciaSign + | BlockKind::JungleSign + | BlockKind::DarkOakSign | BlockKind::SkeletonSkull | BlockKind::WitherSkeletonSkull | BlockKind::ZombieHead @@ -844,7 +1091,9 @@ impl BlockId { | BlockKind::BrownBanner | BlockKind::GreenBanner | BlockKind::RedBanner - | BlockKind::BlackBanner => true, + | BlockKind::BlackBanner + | BlockKind::CrimsonSign + | BlockKind::WarpedSign => true, _ => false, } } @@ -855,6 +1104,13 @@ impl BlockId { _ => false, } } + #[doc = "Determines whether or not a block has the `signal_fire` property."] + pub fn has_signal_fire(self) -> bool { + match self.kind() { + BlockKind::Campfire | BlockKind::SoulCampfire => true, + _ => false, + } + } #[doc = "Determines whether or not a block has the `slab_kind` property."] pub fn has_slab_kind(self) -> bool { match self.kind() { @@ -868,7 +1124,9 @@ impl BlockId { | BlockKind::AcaciaSlab | BlockKind::DarkOakSlab | BlockKind::StoneSlab + | BlockKind::SmoothStoneSlab | BlockKind::SandstoneSlab + | BlockKind::CutSandstoneSlab | BlockKind::PetrifiedOakSlab | BlockKind::CobblestoneSlab | BlockKind::BrickSlab @@ -876,7 +1134,26 @@ impl BlockId { | BlockKind::NetherBrickSlab | BlockKind::QuartzSlab | BlockKind::RedSandstoneSlab - | BlockKind::PurpurSlab => true, + | BlockKind::CutRedSandstoneSlab + | BlockKind::PurpurSlab + | BlockKind::PolishedGraniteSlab + | BlockKind::SmoothRedSandstoneSlab + | BlockKind::MossyStoneBrickSlab + | BlockKind::PolishedDioriteSlab + | BlockKind::MossyCobblestoneSlab + | BlockKind::EndStoneBrickSlab + | BlockKind::SmoothSandstoneSlab + | BlockKind::SmoothQuartzSlab + | BlockKind::GraniteSlab + | BlockKind::AndesiteSlab + | BlockKind::RedNetherBrickSlab + | BlockKind::PolishedAndesiteSlab + | BlockKind::DioriteSlab + | BlockKind::CrimsonSlab + | BlockKind::WarpedSlab + | BlockKind::BlackstoneSlab + | BlockKind::PolishedBlackstoneBrickSlab + | BlockKind::PolishedBlackstoneSlab => true, _ => false, } } @@ -900,8 +1177,6 @@ impl BlockId { | BlockKind::Vine | BlockKind::NetherBrickFence | BlockKind::Tripwire - | BlockKind::CobblestoneWall - | BlockKind::MossyCobblestoneWall | BlockKind::WhiteStainedGlassPane | BlockKind::OrangeStainedGlassPane | BlockKind::MagentaStainedGlassPane @@ -923,7 +1198,32 @@ impl BlockId { | BlockKind::JungleFence | BlockKind::AcaciaFence | BlockKind::DarkOakFence - | BlockKind::ChorusPlant => true, + | BlockKind::ChorusPlant + | BlockKind::CrimsonFence + | BlockKind::WarpedFence => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `south_nlt` property."] + pub fn has_south_nlt(self) -> bool { + match self.kind() { + BlockKind::CobblestoneWall + | BlockKind::MossyCobblestoneWall + | BlockKind::BrickWall + | BlockKind::PrismarineWall + | BlockKind::RedSandstoneWall + | BlockKind::MossyStoneBrickWall + | BlockKind::GraniteWall + | BlockKind::StoneBrickWall + | BlockKind::NetherBrickWall + | BlockKind::AndesiteWall + | BlockKind::RedNetherBrickWall + | BlockKind::SandstoneWall + | BlockKind::EndStoneBrickWall + | BlockKind::DioriteWall + | BlockKind::BlackstoneWall + | BlockKind::PolishedBlackstoneBrickWall + | BlockKind::PolishedBlackstoneWall => true, _ => false, } } @@ -942,7 +1242,8 @@ impl BlockId { | BlockKind::BirchSapling | BlockKind::JungleSapling | BlockKind::AcaciaSapling - | BlockKind::DarkOakSapling => true, + | BlockKind::DarkOakSapling + | BlockKind::Bamboo => true, _ => false, } } @@ -965,7 +1266,26 @@ impl BlockId { | BlockKind::PrismarineBrickStairs | BlockKind::DarkPrismarineStairs | BlockKind::RedSandstoneStairs - | BlockKind::PurpurStairs => true, + | BlockKind::PurpurStairs + | BlockKind::PolishedGraniteStairs + | BlockKind::SmoothRedSandstoneStairs + | BlockKind::MossyStoneBrickStairs + | BlockKind::PolishedDioriteStairs + | BlockKind::MossyCobblestoneStairs + | BlockKind::EndStoneBrickStairs + | BlockKind::StoneStairs + | BlockKind::SmoothSandstoneStairs + | BlockKind::SmoothQuartzStairs + | BlockKind::GraniteStairs + | BlockKind::AndesiteStairs + | BlockKind::RedNetherBrickStairs + | BlockKind::PolishedAndesiteStairs + | BlockKind::DioriteStairs + | BlockKind::CrimsonStairs + | BlockKind::WarpedStairs + | BlockKind::BlackstoneStairs + | BlockKind::PolishedBlackstoneBrickStairs + | BlockKind::PolishedBlackstoneStairs => true, _ => false, } } @@ -1000,7 +1320,22 @@ impl BlockId { | BlockKind::Vine | BlockKind::CobblestoneWall | BlockKind::MossyCobblestoneWall - | BlockKind::ChorusPlant => true, + | BlockKind::ChorusPlant + | BlockKind::BrickWall + | BlockKind::PrismarineWall + | BlockKind::RedSandstoneWall + | BlockKind::MossyStoneBrickWall + | BlockKind::GraniteWall + | BlockKind::StoneBrickWall + | BlockKind::NetherBrickWall + | BlockKind::AndesiteWall + | BlockKind::RedNetherBrickWall + | BlockKind::SandstoneWall + | BlockKind::EndStoneBrickWall + | BlockKind::DioriteWall + | BlockKind::BlackstoneWall + | BlockKind::PolishedBlackstoneBrickWall + | BlockKind::PolishedBlackstoneWall => true, _ => false, } } @@ -1016,10 +1351,20 @@ impl BlockId { match self.kind() { BlockKind::OakStairs | BlockKind::Chest - | BlockKind::Sign + | BlockKind::OakSign + | BlockKind::SpruceSign + | BlockKind::BirchSign + | BlockKind::AcaciaSign + | BlockKind::JungleSign + | BlockKind::DarkOakSign | BlockKind::Ladder | BlockKind::CobblestoneStairs - | BlockKind::WallSign + | BlockKind::OakWallSign + | BlockKind::SpruceWallSign + | BlockKind::BirchWallSign + | BlockKind::AcaciaWallSign + | BlockKind::JungleWallSign + | BlockKind::DarkOakWallSign | BlockKind::OakFence | BlockKind::OakTrapdoor | BlockKind::SpruceTrapdoor @@ -1028,6 +1373,7 @@ impl BlockId { | BlockKind::AcaciaTrapdoor | BlockKind::DarkOakTrapdoor | BlockKind::IronBars + | BlockKind::Chain | BlockKind::GlassPane | BlockKind::BrickStairs | BlockKind::StoneBrickStairs @@ -1075,7 +1421,9 @@ impl BlockId { | BlockKind::AcaciaSlab | BlockKind::DarkOakSlab | BlockKind::StoneSlab + | BlockKind::SmoothStoneSlab | BlockKind::SandstoneSlab + | BlockKind::CutSandstoneSlab | BlockKind::PetrifiedOakSlab | BlockKind::CobblestoneSlab | BlockKind::BrickSlab @@ -1083,6 +1431,7 @@ impl BlockId { | BlockKind::NetherBrickSlab | BlockKind::QuartzSlab | BlockKind::RedSandstoneSlab + | BlockKind::CutRedSandstoneSlab | BlockKind::PurpurSlab | BlockKind::SpruceFence | BlockKind::BirchFence @@ -1100,16 +1449,6 @@ impl BlockId { | BlockKind::BubbleCoral | BlockKind::FireCoral | BlockKind::HornCoral - | BlockKind::DeadTubeCoralWallFan - | BlockKind::DeadBrainCoralWallFan - | BlockKind::DeadBubbleCoralWallFan - | BlockKind::DeadFireCoralWallFan - | BlockKind::DeadHornCoralWallFan - | BlockKind::TubeCoralWallFan - | BlockKind::BrainCoralWallFan - | BlockKind::BubbleCoralWallFan - | BlockKind::FireCoralWallFan - | BlockKind::HornCoralWallFan | BlockKind::DeadTubeCoralFan | BlockKind::DeadBrainCoralFan | BlockKind::DeadBubbleCoralFan @@ -1120,8 +1459,83 @@ impl BlockId { | BlockKind::BubbleCoralFan | BlockKind::FireCoralFan | BlockKind::HornCoralFan + | BlockKind::DeadTubeCoralWallFan + | BlockKind::DeadBrainCoralWallFan + | BlockKind::DeadBubbleCoralWallFan + | BlockKind::DeadFireCoralWallFan + | BlockKind::DeadHornCoralWallFan + | BlockKind::TubeCoralWallFan + | BlockKind::BrainCoralWallFan + | BlockKind::BubbleCoralWallFan + | BlockKind::FireCoralWallFan + | BlockKind::HornCoralWallFan | BlockKind::SeaPickle - | BlockKind::Conduit => true, + | BlockKind::Conduit + | BlockKind::PolishedGraniteStairs + | BlockKind::SmoothRedSandstoneStairs + | BlockKind::MossyStoneBrickStairs + | BlockKind::PolishedDioriteStairs + | BlockKind::MossyCobblestoneStairs + | BlockKind::EndStoneBrickStairs + | BlockKind::StoneStairs + | BlockKind::SmoothSandstoneStairs + | BlockKind::SmoothQuartzStairs + | BlockKind::GraniteStairs + | BlockKind::AndesiteStairs + | BlockKind::RedNetherBrickStairs + | BlockKind::PolishedAndesiteStairs + | BlockKind::DioriteStairs + | BlockKind::PolishedGraniteSlab + | BlockKind::SmoothRedSandstoneSlab + | BlockKind::MossyStoneBrickSlab + | BlockKind::PolishedDioriteSlab + | BlockKind::MossyCobblestoneSlab + | BlockKind::EndStoneBrickSlab + | BlockKind::SmoothSandstoneSlab + | BlockKind::SmoothQuartzSlab + | BlockKind::GraniteSlab + | BlockKind::AndesiteSlab + | BlockKind::RedNetherBrickSlab + | BlockKind::PolishedAndesiteSlab + | BlockKind::DioriteSlab + | BlockKind::BrickWall + | BlockKind::PrismarineWall + | BlockKind::RedSandstoneWall + | BlockKind::MossyStoneBrickWall + | BlockKind::GraniteWall + | BlockKind::StoneBrickWall + | BlockKind::NetherBrickWall + | BlockKind::AndesiteWall + | BlockKind::RedNetherBrickWall + | BlockKind::SandstoneWall + | BlockKind::EndStoneBrickWall + | BlockKind::DioriteWall + | BlockKind::Scaffolding + | BlockKind::Lantern + | BlockKind::SoulLantern + | BlockKind::Campfire + | BlockKind::SoulCampfire + | BlockKind::CrimsonSlab + | BlockKind::WarpedSlab + | BlockKind::CrimsonFence + | BlockKind::WarpedFence + | BlockKind::CrimsonTrapdoor + | BlockKind::WarpedTrapdoor + | BlockKind::CrimsonStairs + | BlockKind::WarpedStairs + | BlockKind::CrimsonSign + | BlockKind::WarpedSign + | BlockKind::CrimsonWallSign + | BlockKind::WarpedWallSign + | BlockKind::BlackstoneStairs + | BlockKind::BlackstoneWall + | BlockKind::BlackstoneSlab + | BlockKind::PolishedBlackstoneBrickSlab + | BlockKind::PolishedBlackstoneBrickStairs + | BlockKind::PolishedBlackstoneBrickWall + | BlockKind::PolishedBlackstoneStairs + | BlockKind::PolishedBlackstoneSlab + | BlockKind::PolishedBlackstoneWall => true, _ => false, } } @@ -1138,8 +1552,6 @@ impl BlockId { | BlockKind::Vine | BlockKind::NetherBrickFence | BlockKind::Tripwire - | BlockKind::CobblestoneWall - | BlockKind::MossyCobblestoneWall | BlockKind::WhiteStainedGlassPane | BlockKind::OrangeStainedGlassPane | BlockKind::MagentaStainedGlassPane @@ -1161,7 +1573,32 @@ impl BlockId { | BlockKind::JungleFence | BlockKind::AcaciaFence | BlockKind::DarkOakFence - | BlockKind::ChorusPlant => true, + | BlockKind::ChorusPlant + | BlockKind::CrimsonFence + | BlockKind::WarpedFence => true, + _ => false, + } + } + #[doc = "Determines whether or not a block has the `west_nlt` property."] + pub fn has_west_nlt(self) -> bool { + match self.kind() { + BlockKind::CobblestoneWall + | BlockKind::MossyCobblestoneWall + | BlockKind::BrickWall + | BlockKind::PrismarineWall + | BlockKind::RedSandstoneWall + | BlockKind::MossyStoneBrickWall + | BlockKind::GraniteWall + | BlockKind::StoneBrickWall + | BlockKind::NetherBrickWall + | BlockKind::AndesiteWall + | BlockKind::RedNetherBrickWall + | BlockKind::SandstoneWall + | BlockKind::EndStoneBrickWall + | BlockKind::DioriteWall + | BlockKind::BlackstoneWall + | BlockKind::PolishedBlackstoneBrickWall + | BlockKind::PolishedBlackstoneWall => true, _ => false, } } diff --git a/core/blocks/src/generated/table.dat b/crates/blocks/src/generated/table.dat similarity index 58% rename from core/blocks/src/generated/table.dat rename to crates/blocks/src/generated/table.dat index d404aa381..9033f810e 100644 Binary files a/core/blocks/src/generated/table.dat and b/crates/blocks/src/generated/table.dat differ diff --git a/core/blocks/src/generated/table.rs b/crates/blocks/src/generated/table.rs similarity index 79% rename from core/blocks/src/generated/table.rs rename to crates/blocks/src/generated/table.rs index a9b5659f2..ea078a60b 100644 --- a/core/blocks/src/generated/table.rs +++ b/crates/blocks/src/generated/table.rs @@ -4,6 +4,7 @@ use std::convert::TryFrom; use std::str::FromStr; #[derive(Debug, Deserialize)] pub struct BlockTable { + age_0_1: Vec<(u16, u16)>, age_0_15: Vec<(u16, u16)>, age_0_2: Vec<(u16, u16)>, age_0_25: Vec<(u16, u16)>, @@ -11,19 +12,24 @@ pub struct BlockTable { age_0_5: Vec<(u16, u16)>, age_0_7: Vec<(u16, u16)>, attached: Vec<(u16, u16)>, + attachment: Vec<(u16, u16)>, axis_xyz: Vec<(u16, u16)>, axis_xz: Vec<(u16, u16)>, bites: Vec<(u16, u16)>, + bottom: Vec<(u16, u16)>, cauldron_level: Vec<(u16, u16)>, + charges: Vec<(u16, u16)>, chest_kind: Vec<(u16, u16)>, comparator_mode: Vec<(u16, u16)>, conditional: Vec<(u16, u16)>, delay: Vec<(u16, u16)>, disarmed: Vec<(u16, u16)>, - distance: Vec<(u16, u16)>, + distance_0_7: Vec<(u16, u16)>, + distance_1_7: Vec<(u16, u16)>, down: Vec<(u16, u16)>, drag: Vec<(u16, u16)>, east_connected: Vec<(u16, u16)>, + east_nlt: Vec<(u16, u16)>, east_wire: Vec<(u16, u16)>, eggs: Vec<(u16, u16)>, enabled: Vec<(u16, u16)>, @@ -35,24 +41,31 @@ pub struct BlockTable { facing_cubic: Vec<(u16, u16)>, half_top_bottom: Vec<(u16, u16)>, half_upper_lower: Vec<(u16, u16)>, + hanging: Vec<(u16, u16)>, + has_book: Vec<(u16, u16)>, has_bottle_0: Vec<(u16, u16)>, has_bottle_1: Vec<(u16, u16)>, has_bottle_2: Vec<(u16, u16)>, has_record: Vec<(u16, u16)>, hatch: Vec<(u16, u16)>, hinge: Vec<(u16, u16)>, + honey_level: Vec<(u16, u16)>, in_wall: Vec<(u16, u16)>, instrument: Vec<(u16, u16)>, inverted: Vec<(u16, u16)>, layers: Vec<(u16, u16)>, + leaves: Vec<(u16, u16)>, + level_0_8: Vec<(u16, u16)>, lit: Vec<(u16, u16)>, locked: Vec<(u16, u16)>, moisture: Vec<(u16, u16)>, north_connected: Vec<(u16, u16)>, + north_nlt: Vec<(u16, u16)>, north_wire: Vec<(u16, u16)>, note: Vec<(u16, u16)>, occupied: Vec<(u16, u16)>, open: Vec<(u16, u16)>, + orientation: Vec<(u16, u16)>, part: Vec<(u16, u16)>, persistent: Vec<(u16, u16)>, pickles: Vec<(u16, u16)>, @@ -63,9 +76,11 @@ pub struct BlockTable { rail_shape: Vec<(u16, u16)>, rotation: Vec<(u16, u16)>, short: Vec<(u16, u16)>, + signal_fire: Vec<(u16, u16)>, slab_kind: Vec<(u16, u16)>, snowy: Vec<(u16, u16)>, south_connected: Vec<(u16, u16)>, + south_nlt: Vec<(u16, u16)>, south_wire: Vec<(u16, u16)>, stage: Vec<(u16, u16)>, stairs_shape: Vec<(u16, u16)>, @@ -76,9 +91,29 @@ pub struct BlockTable { water_level: Vec<(u16, u16)>, waterlogged: Vec<(u16, u16)>, west_connected: Vec<(u16, u16)>, + west_nlt: Vec<(u16, u16)>, west_wire: Vec<(u16, u16)>, } impl BlockTable { + #[doc = "Retrieves the `age_0_1` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn age_0_1(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.age_0_1[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some({ x as i32 + 0i32 }) + } + #[doc = "Updates the state value for the given block kind such that its `age_0_1` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_age_0_1(&self, kind: BlockKind, state: u16, value: i32) -> Option { + let (offset_coefficient, stride) = self.age_0_1[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 - 0u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `age_0_15` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn age_0_15(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.age_0_15[kind as u16 as usize]; @@ -212,6 +247,25 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `attachment` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn attachment(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.attachment[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(Attachment::try_from(x).expect("invalid block state")) + } + #[doc = "Updates the state value for the given block kind such that its `attachment` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_attachment(&self, kind: BlockKind, state: u16, value: Attachment) -> Option { + let (offset_coefficient, stride) = self.attachment[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `axis_xyz` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn axis_xyz(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.axis_xyz[kind as u16 as usize]; @@ -269,6 +323,25 @@ impl BlockTable { let new = ({ value as u16 - 0u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `bottom` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn bottom(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.bottom[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(if x == 0 { false } else { true }) + } + #[doc = "Updates the state value for the given block kind such that its `bottom` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_bottom(&self, kind: BlockKind, state: u16, value: bool) -> Option { + let (offset_coefficient, stride) = self.bottom[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `cauldron_level` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn cauldron_level(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.cauldron_level[kind as u16 as usize]; @@ -288,6 +361,25 @@ impl BlockTable { let new = ({ value as u16 - 0u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `charges` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn charges(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.charges[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some({ x as i32 + 0i32 }) + } + #[doc = "Updates the state value for the given block kind such that its `charges` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_charges(&self, kind: BlockKind, state: u16, value: i32) -> Option { + let (offset_coefficient, stride) = self.charges[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 - 0u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `chest_kind` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn chest_kind(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.chest_kind[kind as u16 as usize]; @@ -388,18 +480,37 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } - #[doc = "Retrieves the `distance` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] - pub fn distance(&self, kind: BlockKind, state: u16) -> Option { - let (offset_coefficient, stride) = self.distance[kind as u16 as usize]; + #[doc = "Retrieves the `distance_0_7` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn distance_0_7(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.distance_0_7[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some({ x as i32 + 0i32 }) + } + #[doc = "Updates the state value for the given block kind such that its `distance_0_7` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_distance_0_7(&self, kind: BlockKind, state: u16, value: i32) -> Option { + let (offset_coefficient, stride) = self.distance_0_7[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 - 0u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } + #[doc = "Retrieves the `distance_1_7` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn distance_1_7(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.distance_1_7[kind as u16 as usize]; if offset_coefficient == 0 { return None; } let x = crate::n_dimensional_index(state, offset_coefficient, stride); Some({ x as i32 + 1i32 }) } - #[doc = "Updates the state value for the given block kind such that its `distance` value is updated. Returns the new state,\n or `None` if the block does not have this property."] - pub fn set_distance(&self, kind: BlockKind, state: u16, value: i32) -> Option { - let (offset_coefficient, stride) = self.distance[kind as u16 as usize]; + #[doc = "Updates the state value for the given block kind such that its `distance_1_7` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_distance_1_7(&self, kind: BlockKind, state: u16, value: i32) -> Option { + let (offset_coefficient, stride) = self.distance_1_7[kind as u16 as usize]; if offset_coefficient == 0 { return None; } @@ -464,6 +575,25 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `east_nlt` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn east_nlt(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.east_nlt[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(EastNlt::try_from(x).expect("invalid block state")) + } + #[doc = "Updates the state value for the given block kind such that its `east_nlt` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_east_nlt(&self, kind: BlockKind, state: u16, value: EastNlt) -> Option { + let (offset_coefficient, stride) = self.east_nlt[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `east_wire` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn east_wire(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.east_wire[kind as u16 as usize]; @@ -697,6 +827,44 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `hanging` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn hanging(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.hanging[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(if x == 0 { false } else { true }) + } + #[doc = "Updates the state value for the given block kind such that its `hanging` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_hanging(&self, kind: BlockKind, state: u16, value: bool) -> Option { + let (offset_coefficient, stride) = self.hanging[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } + #[doc = "Retrieves the `has_book` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn has_book(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.has_book[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(if x == 0 { false } else { true }) + } + #[doc = "Updates the state value for the given block kind such that its `has_book` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_has_book(&self, kind: BlockKind, state: u16, value: bool) -> Option { + let (offset_coefficient, stride) = self.has_book[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `has_bottle_0` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn has_bottle_0(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.has_bottle_0[kind as u16 as usize]; @@ -811,6 +979,25 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `honey_level` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn honey_level(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.honey_level[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some({ x as i32 + 0i32 }) + } + #[doc = "Updates the state value for the given block kind such that its `honey_level` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_honey_level(&self, kind: BlockKind, state: u16, value: i32) -> Option { + let (offset_coefficient, stride) = self.honey_level[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 - 0u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `in_wall` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn in_wall(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.in_wall[kind as u16 as usize]; @@ -887,6 +1074,44 @@ impl BlockTable { let new = ({ value as u16 - 1u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `leaves` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn leaves(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.leaves[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(Leaves::try_from(x).expect("invalid block state")) + } + #[doc = "Updates the state value for the given block kind such that its `leaves` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_leaves(&self, kind: BlockKind, state: u16, value: Leaves) -> Option { + let (offset_coefficient, stride) = self.leaves[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } + #[doc = "Retrieves the `level_0_8` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn level_0_8(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.level_0_8[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some({ x as i32 + 0i32 }) + } + #[doc = "Updates the state value for the given block kind such that its `level_0_8` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_level_0_8(&self, kind: BlockKind, state: u16, value: i32) -> Option { + let (offset_coefficient, stride) = self.level_0_8[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 - 0u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `lit` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn lit(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.lit[kind as u16 as usize]; @@ -963,6 +1188,25 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `north_nlt` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn north_nlt(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.north_nlt[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(NorthNlt::try_from(x).expect("invalid block state")) + } + #[doc = "Updates the state value for the given block kind such that its `north_nlt` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_north_nlt(&self, kind: BlockKind, state: u16, value: NorthNlt) -> Option { + let (offset_coefficient, stride) = self.north_nlt[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `north_wire` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn north_wire(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.north_wire[kind as u16 as usize]; @@ -1039,6 +1283,25 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `orientation` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn orientation(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.orientation[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(Orientation::try_from(x).expect("invalid block state")) + } + #[doc = "Updates the state value for the given block kind such that its `orientation` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_orientation(&self, kind: BlockKind, state: u16, value: Orientation) -> Option { + let (offset_coefficient, stride) = self.orientation[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `part` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn part(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.part[kind as u16 as usize]; @@ -1234,6 +1497,25 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `signal_fire` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn signal_fire(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.signal_fire[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(if x == 0 { false } else { true }) + } + #[doc = "Updates the state value for the given block kind such that its `signal_fire` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_signal_fire(&self, kind: BlockKind, state: u16, value: bool) -> Option { + let (offset_coefficient, stride) = self.signal_fire[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `slab_kind` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn slab_kind(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.slab_kind[kind as u16 as usize]; @@ -1291,6 +1573,25 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `south_nlt` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn south_nlt(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.south_nlt[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(SouthNlt::try_from(x).expect("invalid block state")) + } + #[doc = "Updates the state value for the given block kind such that its `south_nlt` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_south_nlt(&self, kind: BlockKind, state: u16, value: SouthNlt) -> Option { + let (offset_coefficient, stride) = self.south_nlt[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `south_wire` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn south_wire(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.south_wire[kind as u16 as usize]; @@ -1486,6 +1787,25 @@ impl BlockTable { let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; Some(new as u16) } + #[doc = "Retrieves the `west_nlt` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] + pub fn west_nlt(&self, kind: BlockKind, state: u16) -> Option { + let (offset_coefficient, stride) = self.west_nlt[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let x = crate::n_dimensional_index(state, offset_coefficient, stride); + Some(WestNlt::try_from(x).expect("invalid block state")) + } + #[doc = "Updates the state value for the given block kind such that its `west_nlt` value is updated. Returns the new state,\n or `None` if the block does not have this property."] + pub fn set_west_nlt(&self, kind: BlockKind, state: u16, value: WestNlt) -> Option { + let (offset_coefficient, stride) = self.west_nlt[kind as u16 as usize]; + if offset_coefficient == 0 { + return None; + } + let old = crate::n_dimensional_index(state, offset_coefficient, stride) as i32; + let new = ({ value as u16 } as i32 - old) * stride as i32 + state as i32; + Some(new as u16) + } #[doc = "Retrieves the `west_wire` value for the given block kind with the given state value.\n Returns the value of the property, or `None` if it does not exist."] pub fn west_wire(&self, kind: BlockKind, state: u16) -> Option { let (offset_coefficient, stride) = self.west_wire[kind as u16 as usize]; @@ -1508,6 +1828,51 @@ impl BlockTable { } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] #[repr(u16)] +pub enum Attachment { + Floor, + Ceiling, + SingleWall, + DoubleWall, +} +impl TryFrom for Attachment { + type Error = anyhow::Error; + fn try_from(value: u16) -> anyhow::Result { + match value { + 0u16 => Ok(Attachment::Floor), + 1u16 => Ok(Attachment::Ceiling), + 2u16 => Ok(Attachment::SingleWall), + 3u16 => Ok(Attachment::DoubleWall), + x => Err(anyhow::anyhow!("invalid value {} for Attachment", x)), + } + } +} +impl FromStr for Attachment { + type Err = anyhow::Error; + fn from_str(s: &str) -> anyhow::Result { + match s { + "floor" => Ok(Attachment::Floor), + "ceiling" => Ok(Attachment::Ceiling), + "single_wall" => Ok(Attachment::SingleWall), + "double_wall" => Ok(Attachment::DoubleWall), + _ => Err(anyhow::anyhow!( + "invalid value for {}", + stringify!(Attachment) + )), + } + } +} +impl Attachment { + pub fn as_str(self) -> &'static str { + match self { + Attachment::Floor => "floor", + Attachment::Ceiling => "ceiling", + Attachment::SingleWall => "single_wall", + Attachment::DoubleWall => "double_wall", + } + } +} +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +#[repr(u16)] pub enum AxisXyz { X, Y, @@ -1658,6 +2023,44 @@ impl ComparatorMode { } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] #[repr(u16)] +pub enum EastNlt { + None, + Low, + Tall, +} +impl TryFrom for EastNlt { + type Error = anyhow::Error; + fn try_from(value: u16) -> anyhow::Result { + match value { + 0u16 => Ok(EastNlt::None), + 1u16 => Ok(EastNlt::Low), + 2u16 => Ok(EastNlt::Tall), + x => Err(anyhow::anyhow!("invalid value {} for EastNlt", x)), + } + } +} +impl FromStr for EastNlt { + type Err = anyhow::Error; + fn from_str(s: &str) -> anyhow::Result { + match s { + "none" => Ok(EastNlt::None), + "low" => Ok(EastNlt::Low), + "tall" => Ok(EastNlt::Tall), + _ => Err(anyhow::anyhow!("invalid value for {}", stringify!(EastNlt))), + } + } +} +impl EastNlt { + pub fn as_str(self) -> &'static str { + match self { + EastNlt::None => "none", + EastNlt::Low => "low", + EastNlt::Tall => "tall", + } + } +} +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +#[repr(u16)] pub enum EastWire { Up, Side, @@ -2006,6 +2409,12 @@ pub enum Instrument { Guitar, Chime, Xylophone, + IronXylophone, + CowBell, + Didgeridoo, + Bit, + Banjo, + Pling, } impl TryFrom for Instrument { type Error = anyhow::Error; @@ -2021,6 +2430,12 @@ impl TryFrom for Instrument { 7u16 => Ok(Instrument::Guitar), 8u16 => Ok(Instrument::Chime), 9u16 => Ok(Instrument::Xylophone), + 10u16 => Ok(Instrument::IronXylophone), + 11u16 => Ok(Instrument::CowBell), + 12u16 => Ok(Instrument::Didgeridoo), + 13u16 => Ok(Instrument::Bit), + 14u16 => Ok(Instrument::Banjo), + 15u16 => Ok(Instrument::Pling), x => Err(anyhow::anyhow!("invalid value {} for Instrument", x)), } } @@ -2039,6 +2454,12 @@ impl FromStr for Instrument { "guitar" => Ok(Instrument::Guitar), "chime" => Ok(Instrument::Chime), "xylophone" => Ok(Instrument::Xylophone), + "iron_xylophone" => Ok(Instrument::IronXylophone), + "cow_bell" => Ok(Instrument::CowBell), + "didgeridoo" => Ok(Instrument::Didgeridoo), + "bit" => Ok(Instrument::Bit), + "banjo" => Ok(Instrument::Banjo), + "pling" => Ok(Instrument::Pling), _ => Err(anyhow::anyhow!( "invalid value for {}", stringify!(Instrument) @@ -2059,6 +2480,91 @@ impl Instrument { Instrument::Guitar => "guitar", Instrument::Chime => "chime", Instrument::Xylophone => "xylophone", + Instrument::IronXylophone => "iron_xylophone", + Instrument::CowBell => "cow_bell", + Instrument::Didgeridoo => "didgeridoo", + Instrument::Bit => "bit", + Instrument::Banjo => "banjo", + Instrument::Pling => "pling", + } + } +} +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +#[repr(u16)] +pub enum Leaves { + None, + Small, + Large, +} +impl TryFrom for Leaves { + type Error = anyhow::Error; + fn try_from(value: u16) -> anyhow::Result { + match value { + 0u16 => Ok(Leaves::None), + 1u16 => Ok(Leaves::Small), + 2u16 => Ok(Leaves::Large), + x => Err(anyhow::anyhow!("invalid value {} for Leaves", x)), + } + } +} +impl FromStr for Leaves { + type Err = anyhow::Error; + fn from_str(s: &str) -> anyhow::Result { + match s { + "none" => Ok(Leaves::None), + "small" => Ok(Leaves::Small), + "large" => Ok(Leaves::Large), + _ => Err(anyhow::anyhow!("invalid value for {}", stringify!(Leaves))), + } + } +} +impl Leaves { + pub fn as_str(self) -> &'static str { + match self { + Leaves::None => "none", + Leaves::Small => "small", + Leaves::Large => "large", + } + } +} +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +#[repr(u16)] +pub enum NorthNlt { + None, + Low, + Tall, +} +impl TryFrom for NorthNlt { + type Error = anyhow::Error; + fn try_from(value: u16) -> anyhow::Result { + match value { + 0u16 => Ok(NorthNlt::None), + 1u16 => Ok(NorthNlt::Low), + 2u16 => Ok(NorthNlt::Tall), + x => Err(anyhow::anyhow!("invalid value {} for NorthNlt", x)), + } + } +} +impl FromStr for NorthNlt { + type Err = anyhow::Error; + fn from_str(s: &str) -> anyhow::Result { + match s { + "none" => Ok(NorthNlt::None), + "low" => Ok(NorthNlt::Low), + "tall" => Ok(NorthNlt::Tall), + _ => Err(anyhow::anyhow!( + "invalid value for {}", + stringify!(NorthNlt) + )), + } + } +} +impl NorthNlt { + pub fn as_str(self) -> &'static str { + match self { + NorthNlt::None => "none", + NorthNlt::Low => "low", + NorthNlt::Tall => "tall", } } } @@ -2105,6 +2611,83 @@ impl NorthWire { } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] #[repr(u16)] +pub enum Orientation { + DownEast, + DownNorth, + DownSouth, + DownWest, + UpEast, + UpNorth, + UpSouth, + UpWest, + WestUp, + EastUp, + NorthUp, + SouthUp, +} +impl TryFrom for Orientation { + type Error = anyhow::Error; + fn try_from(value: u16) -> anyhow::Result { + match value { + 0u16 => Ok(Orientation::DownEast), + 1u16 => Ok(Orientation::DownNorth), + 2u16 => Ok(Orientation::DownSouth), + 3u16 => Ok(Orientation::DownWest), + 4u16 => Ok(Orientation::UpEast), + 5u16 => Ok(Orientation::UpNorth), + 6u16 => Ok(Orientation::UpSouth), + 7u16 => Ok(Orientation::UpWest), + 8u16 => Ok(Orientation::WestUp), + 9u16 => Ok(Orientation::EastUp), + 10u16 => Ok(Orientation::NorthUp), + 11u16 => Ok(Orientation::SouthUp), + x => Err(anyhow::anyhow!("invalid value {} for Orientation", x)), + } + } +} +impl FromStr for Orientation { + type Err = anyhow::Error; + fn from_str(s: &str) -> anyhow::Result { + match s { + "down_east" => Ok(Orientation::DownEast), + "down_north" => Ok(Orientation::DownNorth), + "down_south" => Ok(Orientation::DownSouth), + "down_west" => Ok(Orientation::DownWest), + "up_east" => Ok(Orientation::UpEast), + "up_north" => Ok(Orientation::UpNorth), + "up_south" => Ok(Orientation::UpSouth), + "up_west" => Ok(Orientation::UpWest), + "west_up" => Ok(Orientation::WestUp), + "east_up" => Ok(Orientation::EastUp), + "north_up" => Ok(Orientation::NorthUp), + "south_up" => Ok(Orientation::SouthUp), + _ => Err(anyhow::anyhow!( + "invalid value for {}", + stringify!(Orientation) + )), + } + } +} +impl Orientation { + pub fn as_str(self) -> &'static str { + match self { + Orientation::DownEast => "down_east", + Orientation::DownNorth => "down_north", + Orientation::DownSouth => "down_south", + Orientation::DownWest => "down_west", + Orientation::UpEast => "up_east", + Orientation::UpNorth => "up_north", + Orientation::UpSouth => "up_south", + Orientation::UpWest => "up_west", + Orientation::WestUp => "west_up", + Orientation::EastUp => "east_up", + Orientation::NorthUp => "north_up", + Orientation::SouthUp => "south_up", + } + } +} +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +#[repr(u16)] pub enum Part { Head, Foot, @@ -2339,6 +2922,47 @@ impl SlabKind { } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] #[repr(u16)] +pub enum SouthNlt { + None, + Low, + Tall, +} +impl TryFrom for SouthNlt { + type Error = anyhow::Error; + fn try_from(value: u16) -> anyhow::Result { + match value { + 0u16 => Ok(SouthNlt::None), + 1u16 => Ok(SouthNlt::Low), + 2u16 => Ok(SouthNlt::Tall), + x => Err(anyhow::anyhow!("invalid value {} for SouthNlt", x)), + } + } +} +impl FromStr for SouthNlt { + type Err = anyhow::Error; + fn from_str(s: &str) -> anyhow::Result { + match s { + "none" => Ok(SouthNlt::None), + "low" => Ok(SouthNlt::Low), + "tall" => Ok(SouthNlt::Tall), + _ => Err(anyhow::anyhow!( + "invalid value for {}", + stringify!(SouthNlt) + )), + } + } +} +impl SouthNlt { + pub fn as_str(self) -> &'static str { + match self { + SouthNlt::None => "none", + SouthNlt::Low => "low", + SouthNlt::Tall => "tall", + } + } +} +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +#[repr(u16)] pub enum SouthWire { Up, Side, @@ -2477,6 +3101,44 @@ impl StructureBlockMode { } #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] #[repr(u16)] +pub enum WestNlt { + None, + Low, + Tall, +} +impl TryFrom for WestNlt { + type Error = anyhow::Error; + fn try_from(value: u16) -> anyhow::Result { + match value { + 0u16 => Ok(WestNlt::None), + 1u16 => Ok(WestNlt::Low), + 2u16 => Ok(WestNlt::Tall), + x => Err(anyhow::anyhow!("invalid value {} for WestNlt", x)), + } + } +} +impl FromStr for WestNlt { + type Err = anyhow::Error; + fn from_str(s: &str) -> anyhow::Result { + match s { + "none" => Ok(WestNlt::None), + "low" => Ok(WestNlt::Low), + "tall" => Ok(WestNlt::Tall), + _ => Err(anyhow::anyhow!("invalid value for {}", stringify!(WestNlt))), + } + } +} +impl WestNlt { + pub fn as_str(self) -> &'static str { + match self { + WestNlt::None => "none", + WestNlt::Low => "low", + WestNlt::Tall => "tall", + } + } +} +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +#[repr(u16)] pub enum WestWire { Up, Side, diff --git a/crates/blocks/src/generated/vanilla_ids.dat b/crates/blocks/src/generated/vanilla_ids.dat new file mode 100644 index 000000000..fd1c60abd Binary files /dev/null and b/crates/blocks/src/generated/vanilla_ids.dat differ diff --git a/core/blocks/src/lib.rs b/crates/blocks/src/lib.rs similarity index 93% rename from core/blocks/src/lib.rs rename to crates/blocks/src/lib.rs index 58d990690..5716f92c3 100644 --- a/core/blocks/src/lib.rs +++ b/crates/blocks/src/lib.rs @@ -2,8 +2,7 @@ use num_traits::FromPrimitive; use std::convert::TryFrom; use thiserror::Error; -pub use feather_definitions::BlockKind; -pub use feather_definitions::SimplifiedBlockKind; +pub use feather_generated::{BlockKind, SimplifiedBlockKind}; pub mod categories; mod directions; @@ -60,12 +59,21 @@ pub use crate::generated::table::*; use std::collections::HashSet; -#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, Default)] +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] pub struct BlockId { kind: BlockKind, state: u16, } +impl Default for BlockId { + fn default() -> Self { + BlockId { + kind: BlockKind::Air, + state: 0, + } + } +} + impl BlockId { /// Returns the kind of this block. pub fn kind(self) -> BlockKind { @@ -78,7 +86,7 @@ impl BlockId { /// and is mainly intended to make `match`ing on the block type easier. /// This mapping in no way stable right now. pub fn simplified_kind(self) -> SimplifiedBlockKind { - self.kind.to_simplified_kind() + self.kind.simplified_kind() } /// Returns the vanilla state ID for this block. @@ -86,6 +94,7 @@ impl BlockId { VANILLA_ID_TABLE[self.kind as u16 as usize][self.state as usize] } + /* /// Returns the vanilla fluid ID for this block in case it is a fluid. /// The fluid ID is used in the Tags packet. pub fn vanilla_fluid_id(self) -> Option { @@ -103,6 +112,7 @@ impl BlockId { None } } + */ /// Returns the block corresponding to the given vanilla ID. /// @@ -165,13 +175,13 @@ mod tests { fn vanilla_ids() { let block = BlockId::rose_bush().with_half_upper_lower(HalfUpperLower::Lower); - assert_eq!(block.vanilla_id(), 6848); + assert_eq!(block.vanilla_id(), 7894); // will have to be changed whenever we update to a newer MC version assert_eq!(BlockId::from_vanilla_id(block.vanilla_id()), block); let block = BlockId::structure_block().with_structure_block_mode(StructureBlockMode::Corner); - assert_eq!(block.vanilla_id(), 8597); + assert_eq!(block.vanilla_id(), 15745); assert_eq!(BlockId::from_vanilla_id(block.vanilla_id()), block); let mut block = BlockId::redstone_wire(); @@ -187,7 +197,7 @@ mod tests { assert_eq!(block.east_wire(), Some(EastWire::Side)); assert_eq!(block.north_wire(), Some(NorthWire::Up)); - assert_eq!(block.vanilla_id(), 2207); + assert_eq!(block.vanilla_id(), 2512); assert_eq!(BlockId::from_vanilla_id(block.vanilla_id()), block); } diff --git a/core/blocks/src/wall_blocks.rs b/crates/blocks/src/wall_blocks.rs similarity index 77% rename from core/blocks/src/wall_blocks.rs rename to crates/blocks/src/wall_blocks.rs index 6d91dd62e..268f31781 100644 --- a/core/blocks/src/wall_blocks.rs +++ b/crates/blocks/src/wall_blocks.rs @@ -5,7 +5,14 @@ impl BlockId { match self.kind() { BlockKind::Torch => Some(BlockId::wall_torch()), BlockKind::RedstoneTorch => Some(BlockId::redstone_wall_torch()), - BlockKind::Sign => Some(BlockId::wall_sign()), + BlockKind::OakSign => Some(BlockId::oak_wall_sign()), + BlockKind::SpruceSign => Some(BlockId::spruce_wall_sign()), + BlockKind::AcaciaSign => Some(BlockId::acacia_wall_sign()), + BlockKind::BirchSign => Some(BlockId::birch_wall_sign()), + BlockKind::CrimsonSign => Some(BlockId::crimson_wall_sign()), + BlockKind::DarkOakSign => Some(BlockId::dark_oak_wall_sign()), + BlockKind::JungleSign => Some(BlockId::jungle_wall_sign()), + BlockKind::WarpedSign => Some(BlockId::warped_wall_sign()), BlockKind::SkeletonSkull => Some(BlockId::skeleton_wall_skull()), BlockKind::WitherSkeletonSkull => Some(BlockId::wither_skeleton_wall_skull()), BlockKind::ZombieHead => Some(BlockId::zombie_wall_head()), diff --git a/crates/common/Cargo.toml b/crates/common/Cargo.toml new file mode 100644 index 000000000..b506bec22 --- /dev/null +++ b/crates/common/Cargo.toml @@ -0,0 +1,22 @@ +[package] +name = "feather-common" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" + +[dependencies] +base = { path = "../base", package = "feather-base" } +generated = { path = "../generated", package = "feather-generated" } +ecs = { path = "../ecs", package = "feather-ecs" } +utils = { path = "../utils", package = "feather-utils" } +blocks = { path = "../blocks", package = "feather-blocks" } + +smartstring = "0.2" +uuid = { version = "0.8", features = ["v4"] } +log = "0.4" +itertools = "0.10" +anyhow = "1" +ahash = "0.7" +parking_lot = "0.11" +flume = "0.10" +quill-common = { git = "https://github.com/feather-rs/quill" } diff --git a/crates/common/src/chat.rs b/crates/common/src/chat.rs new file mode 100644 index 000000000..13ca07bfa --- /dev/null +++ b/crates/common/src/chat.rs @@ -0,0 +1,106 @@ +use base::Text; + +/// An entity's "mailbox" for receiving chat messages. +/// +/// Internally stores a list of [`ChatMessage`]s. +/// It is up to the user to flush the mailbox. +/// (`feather-server` flushes mailboxes by sending chat packets.) +#[derive(Debug)] +pub struct ChatBox { + messages: Vec, + preference: ChatPreference, +} + +impl ChatBox { + pub fn new(preference: ChatPreference) -> Self { + Self { + messages: Vec::new(), + preference, + } + } + + pub fn set_preference(&mut self, preference: ChatPreference) { + self.preference = preference; + } + + pub fn send(&mut self, message: ChatMessage) { + self.messages.push(message); + } + + pub fn send_chat(&mut self, message: impl Into) { + self.send(ChatMessage::new(ChatKind::PlayerChat, message.into())); + } + + pub fn send_system(&mut self, message: impl Into) { + self.send(ChatMessage::new(ChatKind::System, message.into())); + } + + pub fn send_above_hotbar(&mut self, message: impl Into) { + self.send(ChatMessage::new(ChatKind::AboveHotbar, message.into())); + } + + /// Drains messages in the mailbox. + pub fn drain(&mut self) -> impl Iterator + '_ { + let preference = self.preference; + self.messages + .drain(..) + .filter(move |msg| msg.kind.should_send(preference)) + } +} + +/// Represents a chat message. +#[derive(Debug, Clone)] +pub struct ChatMessage { + kind: ChatKind, + message: Text, +} + +impl ChatMessage { + pub fn new(kind: ChatKind, message: Text) -> Self { + Self { kind, message } + } + + pub fn kind(&self) -> ChatKind { + self.kind + } + + pub fn text(&self) -> &Text { + &self.message + } +} + +/// Kind of chat message. The client determines whether +/// to display a message based on this kind. +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +pub enum ChatKind { + /// A player chat message or similar. + PlayerChat, + /// The output of a command or other messages + /// not originating from players. + System, + /// A message displayed above the hotbar. + AboveHotbar, +} + +impl ChatKind { + pub fn should_send(self, preference: ChatPreference) -> bool { + match self { + ChatKind::PlayerChat => preference == ChatPreference::All, + ChatKind::System => preference >= ChatPreference::System, + ChatKind::AboveHotbar => true, + } + } +} + +/// A player's chat preference. +/// Determines which [`ChatKind`]s will +/// be sent to this player. +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum ChatPreference { + /// Receive only game info messages. + GameInfoOnly, + /// Receive only messages from commands and game info messages. + System, + /// Receive all messages. + All, +} diff --git a/crates/common/src/chunk_entities.rs b/crates/common/src/chunk_entities.rs new file mode 100644 index 000000000..0b666a392 --- /dev/null +++ b/crates/common/src/chunk_entities.rs @@ -0,0 +1,100 @@ +use ahash::AHashMap; +use base::{ChunkPosition, Position}; +use ecs::{Entity, SysResult, SystemExecutor}; +use utils::vec_remove_item; + +use crate::{ + events::{ChunkCrossEvent, EntityCreateEvent, EntityRemoveEvent}, + Game, +}; + +pub fn register(systems: &mut SystemExecutor) { + systems.add_system(update_chunk_entities); +} + +/// A spatial index to look up entities within a given chunk. +#[derive(Default)] +pub struct ChunkEntities { + entities: AHashMap>, +} + +impl ChunkEntities { + /// Returns the entities in the given chunk. + pub fn entities_in_chunk(&self, chunk: ChunkPosition) -> &[Entity] { + self.entities + .get(&chunk) + .map(Vec::as_slice) + .unwrap_or_default() + } + + fn update( + &mut self, + entity: Entity, + old_chunk: Option, + new_chunk: ChunkPosition, + ) { + if let Some(old_chunk) = old_chunk { + if let Some(vec) = self.entities.get_mut(&old_chunk) { + vec_remove_item(vec, &entity); + } + } + + self.entities.entry(new_chunk).or_default().push(entity); + } + + fn remove_entity(&mut self, entity: Entity, chunk: ChunkPosition) { + if let Some(vec) = self.entities.get_mut(&chunk) { + vec_remove_item(vec, &entity); + } + } +} + +fn update_chunk_entities(game: &mut Game) -> SysResult { + // Entities that have crossed chunks + let mut events = Vec::new(); + for (entity, (old_chunk, &position)) in + game.ecs.query::<(&mut ChunkPosition, &Position)>().iter() + { + let new_chunk = position.chunk(); + if position.chunk() != *old_chunk { + game.chunk_entities + .update(entity, Some(*old_chunk), new_chunk); + events.push(( + entity, + ChunkCrossEvent { + old_chunk: *old_chunk, + new_chunk, + }, + )); + + *old_chunk = new_chunk; + } + } + for (entity, event) in events { + game.ecs.insert_entity_event(entity, event)?; + } + + // Entities that have been created + let mut insertions = Vec::new(); + for (entity, (_event, &position)) in game.ecs.query::<(&EntityCreateEvent, &Position)>().iter() + { + let chunk = position.chunk(); + game.chunk_entities.update(entity, None, chunk); + insertions.push((entity, chunk)); + } + // Add ChunkPosition component to new entities + for (entity, chunk) in insertions { + game.ecs.insert(entity, chunk)?; + } + + // Entities that have been destroyed + for (entity, (_event, &chunk)) in game + .ecs + .query::<(&EntityRemoveEvent, &ChunkPosition)>() + .iter() + { + game.chunk_entities.remove_entity(entity, chunk); + } + + Ok(()) +} diff --git a/crates/common/src/chunk_loading.rs b/crates/common/src/chunk_loading.rs new file mode 100644 index 000000000..e43463406 --- /dev/null +++ b/crates/common/src/chunk_loading.rs @@ -0,0 +1,177 @@ +//! Chunk loading and unloading based on player `View`s. + +use std::{ + collections::VecDeque, + mem, + time::{Duration, Instant}, +}; + +use ahash::AHashMap; +use base::ChunkPosition; +use ecs::{Entity, SysResult, SystemExecutor}; +use utils::vec_remove_item; + +use crate::{ + events::{EntityRemoveEvent, ViewUpdateEvent}, + Game, +}; + +pub fn register(game: &mut Game, systems: &mut SystemExecutor) { + game.insert_resource(ChunkLoadState::default()); + systems + .group::() + .add_system(remove_dead_entities) + .add_system(update_tickets_for_players) + .add_system(unload_chunks) + .add_system(load_chunks); +} + +/// Amount of time to wait after a chunk has +/// no tickets until it is unloaded. +const UNLOAD_DELAY: Duration = Duration::from_secs(10); + +#[derive(Default)] +struct ChunkLoadState { + /// Chunks that have been queued for unloading. + chunk_unload_queue: VecDeque, + + chunk_tickets: ChunkTickets, +} + +impl ChunkLoadState { + pub fn remove_ticket(&mut self, chunk: ChunkPosition, ticket: Ticket) { + self.chunk_tickets.remove_ticket(chunk, ticket); + + // If this was the last ticket, then queue the chunk to be + // unloaded. + if self.chunk_tickets.num_tickets(chunk) == 0 { + self.chunk_tickets.remove_chunk(chunk); + self.chunk_unload_queue + .push_back(QueuedChunkUnload::new(chunk)); + } + } +} + +#[derive(Copy, Clone, Debug)] +struct QueuedChunkUnload { + pos: ChunkPosition, + /// Time after which the chunk should be unloaded. + unload_at_time: Instant, +} + +impl QueuedChunkUnload { + pub fn new(pos: ChunkPosition) -> Self { + Self { + pos, + unload_at_time: Instant::now() + UNLOAD_DELAY, + } + } +} + +/// Maintains a list of "tickets" for each loaded chunk. +/// A chunk is queued for unloading when it has no more tickets. +#[derive(Default)] +struct ChunkTickets { + tickets: AHashMap>, + by_entity: AHashMap>, +} + +impl ChunkTickets { + pub fn insert_ticket(&mut self, chunk: ChunkPosition, ticket: Ticket) { + self.tickets.entry(chunk).or_default().push(ticket); + self.by_entity.entry(ticket).or_default().push(chunk); + } + + pub fn remove_ticket(&mut self, chunk: ChunkPosition, ticket: Ticket) { + if let Some(vec) = self.tickets.get_mut(&chunk) { + vec_remove_item(vec, &ticket); + } + vec_remove_item(self.by_entity.get_mut(&ticket).unwrap(), &chunk); + } + + pub fn num_tickets(&self, chunk: ChunkPosition) -> usize { + match self.tickets.get(&chunk) { + Some(vec) => vec.len(), + None => 0, + } + } + + pub fn take_entity_tickets(&mut self, ticket: Ticket) -> Vec { + self.by_entity + .get_mut(&ticket) + .map(mem::take) + .unwrap_or_default() + } + + pub fn remove_chunk(&mut self, pos: ChunkPosition) { + self.tickets.remove(&pos); + } +} + +/// ID of a chunk ticket that keeps a chunk loaded. +/// +/// Currently just represents an entity, the player +/// that is keeping this chunk loaded. +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +struct Ticket(Entity); + +/// System to populate chunk tickets based on players' views. +fn update_tickets_for_players(game: &mut Game, state: &mut ChunkLoadState) -> SysResult { + for (player, event) in game.ecs.query::<&ViewUpdateEvent>().iter() { + let player_ticket = Ticket(player); + + // Remove old tickets + for &old_chunk in &event.old_chunks { + state.remove_ticket(old_chunk, player_ticket); + } + + // Create new tickets + for &new_chunk in &event.new_chunks { + state.chunk_tickets.insert_ticket(new_chunk, player_ticket); + + // Load if needed + if !game.world.is_chunk_loaded(new_chunk) && !game.world.is_chunk_loading(new_chunk) { + game.world.queue_chunk_load(new_chunk); + } + } + } + Ok(()) +} + +/// System to unload chunks from the `ChunkUnloadQueue`. +fn unload_chunks(game: &mut Game, state: &mut ChunkLoadState) -> SysResult { + while let Some(&unload) = state.chunk_unload_queue.get(0) { + if unload.unload_at_time > Instant::now() { + // None of the remaining chunks in the queue are + // ready for unloading, because the queue is ordered + // by time. + break; + } + + state.chunk_unload_queue.pop_front(); + + // If the chunk has acquired new tickets, then abort unloading it. + if state.chunk_tickets.num_tickets(unload.pos) > 0 { + continue; + } + + game.world.unload_chunk(unload.pos); + } + Ok(()) +} + +fn remove_dead_entities(game: &mut Game, state: &mut ChunkLoadState) -> SysResult { + for (entity, _event) in game.ecs.query::<&EntityRemoveEvent>().iter() { + let entity_ticket = Ticket(entity); + for chunk in state.chunk_tickets.take_entity_tickets(entity_ticket) { + state.remove_ticket(chunk, entity_ticket); + } + } + Ok(()) +} + +/// System to call `World::load_chunks` each tick +fn load_chunks(game: &mut Game, _state: &mut ChunkLoadState) -> SysResult { + game.world.load_chunks(&mut game.ecs); + Ok(()) +} diff --git a/crates/common/src/entities.rs b/crates/common/src/entities.rs new file mode 100644 index 000000000..3fa7663fd --- /dev/null +++ b/crates/common/src/entities.rs @@ -0,0 +1,236 @@ +//! Entity implementations. +//! +//! Each entity should be implemented in a submodule of this module. +//! It should export a `build_default(&mut EntityBuilder)` function to +//! add default components for that entity. + +use ecs::EntityBuilder; +use quill_common::{components::OnGround, entity_init::EntityInit}; +use uuid::Uuid; + +/// Adds default components shared between all entities. +fn build_default(builder: &mut EntityBuilder) { + builder.add(Uuid::new_v4()).add(OnGround(true)); +} + +pub mod area_effect_cloud; +pub mod armor_stand; +pub mod arrow; +pub mod bat; +pub mod bee; +pub mod blaze; +pub mod boat; +pub mod cat; +pub mod cave_spider; +pub mod chest_minecart; +pub mod chicken; +pub mod cod; +pub mod command_block_minecart; +pub mod cow; +pub mod creeper; +pub mod dolphin; +pub mod donkey; +pub mod dragon_fireball; +pub mod drowned; +pub mod egg; +pub mod elder_guardian; +pub mod end_crystal; +pub mod ender_dragon; +pub mod ender_pearl; +pub mod enderman; +pub mod endermite; +pub mod evoker; +pub mod evoker_fangs; +pub mod experience_bottle; +pub mod experience_orb; +pub mod eye_of_ender; +pub mod falling_block; +pub mod fireball; +pub mod firework_rocket; +pub mod fishing_bobber; +pub mod fox; +pub mod furnace_minecart; +pub mod ghast; +pub mod giant; +pub mod guardian; +pub mod hoglin; +pub mod hopper_minecart; +pub mod horse; +pub mod husk; +pub mod illusioner; +pub mod iron_golem; +pub mod item; +pub mod item_frame; +pub mod leash_knot; +pub mod lightning_bolt; +pub mod llama; +pub mod llama_spit; +pub mod magma_cube; +pub mod minecart; +pub mod mooshroom; +pub mod mule; +pub mod ocelot; +pub mod painting; +pub mod panda; +pub mod parrot; +pub mod phantom; +pub mod pig; +pub mod piglin; +pub mod piglin_brute; +pub mod pillager; +pub mod player; +pub mod polar_bear; +pub mod potion; +pub mod pufferfish; +pub mod rabbit; +pub mod ravager; +pub mod salmon; +pub mod sheep; +pub mod shulker; +pub mod shulker_bullet; +pub mod silverfish; +pub mod skeleton; +pub mod skeleton_horse; +pub mod slime; +pub mod small_fireball; +pub mod snow_golem; +pub mod snowball; +pub mod spawner_minecart; +pub mod spectral_arrow; +pub mod spider; +pub mod squid; +pub mod stray; +pub mod strider; +pub mod tnt; +pub mod tnt_minecart; +pub mod trader_llama; +pub mod trident; +pub mod tropical_fish; +pub mod turtle; +pub mod vex; +pub mod villager; +pub mod vindicator; +pub mod wandering_trader; +pub mod witch; +pub mod wither; +pub mod wither_skeleton; +pub mod wither_skull; +pub mod wolf; +pub mod zoglin; +pub mod zombie; +pub mod zombie_horse; +pub mod zombie_villager; +pub mod zombified_piglin; + +pub fn add_entity_components(builder: &mut EntityBuilder, init: &EntityInit) { + match init { + EntityInit::AreaEffectCloud => area_effect_cloud::build_default(builder), + EntityInit::ArmorStand => armor_stand::build_default(builder), + EntityInit::Arrow => arrow::build_default(builder), + EntityInit::Bat => bat::build_default(builder), + EntityInit::Bee => bee::build_default(builder), + EntityInit::Blaze => blaze::build_default(builder), + EntityInit::Boat => boat::build_default(builder), + EntityInit::Cat => cat::build_default(builder), + EntityInit::CaveSpider => cave_spider::build_default(builder), + EntityInit::Chicken => chicken::build_default(builder), + EntityInit::Cod => cod::build_default(builder), + EntityInit::Cow => cow::build_default(builder), + EntityInit::Creeper => creeper::build_default(builder), + EntityInit::Dolphin => dolphin::build_default(builder), + EntityInit::Donkey => donkey::build_default(builder), + EntityInit::DragonFireball => dragon_fireball::build_default(builder), + EntityInit::Drowned => drowned::build_default(builder), + EntityInit::ElderGuardian => elder_guardian::build_default(builder), + EntityInit::EndCrystal => end_crystal::build_default(builder), + EntityInit::EnderDragon => ender_dragon::build_default(builder), + EntityInit::Enderman => enderman::build_default(builder), + EntityInit::Endermite => endermite::build_default(builder), + EntityInit::Evoker => evoker::build_default(builder), + EntityInit::EvokerFangs => evoker_fangs::build_default(builder), + EntityInit::ExperienceOrb => experience_orb::build_default(builder), + EntityInit::EyeOfEnder => eye_of_ender::build_default(builder), + EntityInit::FallingBlock => falling_block::build_default(builder), + EntityInit::FireworkRocket => firework_rocket::build_default(builder), + EntityInit::Fox => fox::build_default(builder), + EntityInit::Ghast => ghast::build_default(builder), + EntityInit::Giant => giant::build_default(builder), + EntityInit::Guardian => guardian::build_default(builder), + EntityInit::Hoglin => hoglin::build_default(builder), + EntityInit::Horse => horse::build_default(builder), + EntityInit::Husk => husk::build_default(builder), + EntityInit::Illusioner => illusioner::build_default(builder), + EntityInit::IronGolem => iron_golem::build_default(builder), + EntityInit::Item => item::build_default(builder), + EntityInit::ItemFrame => item_frame::build_default(builder), + EntityInit::Fireball => fireball::build_default(builder), + EntityInit::LeashKnot => leash_knot::build_default(builder), + EntityInit::LightningBolt => lightning_bolt::build_default(builder), + EntityInit::Llama => llama::build_default(builder), + EntityInit::LlamaSpit => llama_spit::build_default(builder), + EntityInit::MagmaCube => magma_cube::build_default(builder), + EntityInit::Minecart => minecart::build_default(builder), + EntityInit::ChestMinecart => chest_minecart::build_default(builder), + EntityInit::CommandBlockMinecart => command_block_minecart::build_default(builder), + EntityInit::FurnaceMinecart => furnace_minecart::build_default(builder), + EntityInit::HopperMinecart => hopper_minecart::build_default(builder), + EntityInit::SpawnerMinecart => spawner_minecart::build_default(builder), + EntityInit::TntMinecart => tnt_minecart::build_default(builder), + EntityInit::Mule => mule::build_default(builder), + EntityInit::Mooshroom => mooshroom::build_default(builder), + EntityInit::Ocelot => ocelot::build_default(builder), + EntityInit::Painting => painting::build_default(builder), + EntityInit::Panda => panda::build_default(builder), + EntityInit::Parrot => parrot::build_default(builder), + EntityInit::Phantom => phantom::build_default(builder), + EntityInit::Pig => pig::build_default(builder), + EntityInit::Piglin => piglin::build_default(builder), + EntityInit::PiglinBrute => piglin_brute::build_default(builder), + EntityInit::Pillager => pillager::build_default(builder), + EntityInit::PolarBear => polar_bear::build_default(builder), + EntityInit::Tnt => tnt::build_default(builder), + EntityInit::Pufferfish => pufferfish::build_default(builder), + EntityInit::Rabbit => rabbit::build_default(builder), + EntityInit::Ravager => ravager::build_default(builder), + EntityInit::Salmon => salmon::build_default(builder), + EntityInit::Sheep => sheep::build_default(builder), + EntityInit::Shulker => shulker::build_default(builder), + EntityInit::ShulkerBullet => shulker_bullet::build_default(builder), + EntityInit::Silverfish => silverfish::build_default(builder), + EntityInit::Skeleton => skeleton::build_default(builder), + EntityInit::SkeletonHorse => skeleton_horse::build_default(builder), + EntityInit::Slime => slime::build_default(builder), + EntityInit::SmallFireball => small_fireball::build_default(builder), + EntityInit::SnowGolem => snow_golem::build_default(builder), + EntityInit::Snowball => snowball::build_default(builder), + EntityInit::SpectralArrow => spectral_arrow::build_default(builder), + EntityInit::Spider => spider::build_default(builder), + EntityInit::Squid => squid::build_default(builder), + EntityInit::Stray => stray::build_default(builder), + EntityInit::Strider => strider::build_default(builder), + EntityInit::Egg => egg::build_default(builder), + EntityInit::EnderPearl => ender_pearl::build_default(builder), + EntityInit::ExperienceBottle => experience_bottle::build_default(builder), + EntityInit::Potion => potion::build_default(builder), + EntityInit::Trident => trident::build_default(builder), + EntityInit::TraderLlama => trader_llama::build_default(builder), + EntityInit::TropicalFish => tropical_fish::build_default(builder), + EntityInit::Turtle => turtle::build_default(builder), + EntityInit::Vex => vex::build_default(builder), + EntityInit::Villager => villager::build_default(builder), + EntityInit::Vindicator => vindicator::build_default(builder), + EntityInit::WanderingTrader => wandering_trader::build_default(builder), + EntityInit::Witch => witch::build_default(builder), + EntityInit::Wither => wither::build_default(builder), + EntityInit::WitherSkeleton => wither_skeleton::build_default(builder), + EntityInit::WitherSkull => wither_skull::build_default(builder), + EntityInit::Wolf => wolf::build_default(builder), + EntityInit::Zoglin => zoglin::build_default(builder), + EntityInit::Zombie => zombie::build_default(builder), + EntityInit::ZombieHorse => zombie_horse::build_default(builder), + EntityInit::ZombieVillager => zombie_villager::build_default(builder), + EntityInit::ZombifiedPiglin => zombified_piglin::build_default(builder), + EntityInit::Player => player::build_default(builder), + EntityInit::FishingBobber => fishing_bobber::build_default(builder), + } +} diff --git a/crates/common/src/entities/area_effect_cloud.rs b/crates/common/src/entities/area_effect_cloud.rs new file mode 100644 index 000000000..974b31a69 --- /dev/null +++ b/crates/common/src/entities/area_effect_cloud.rs @@ -0,0 +1,10 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::AreaEffectCloud; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder + .add(AreaEffectCloud) + .add(EntityKind::AreaEffectCloud); +} diff --git a/crates/common/src/entities/armor_stand.rs b/crates/common/src/entities/armor_stand.rs new file mode 100644 index 000000000..95cdee704 --- /dev/null +++ b/crates/common/src/entities/armor_stand.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ArmorStand; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(ArmorStand).add(EntityKind::ArmorStand); +} diff --git a/crates/common/src/entities/arrow.rs b/crates/common/src/entities/arrow.rs new file mode 100644 index 000000000..9c15209e5 --- /dev/null +++ b/crates/common/src/entities/arrow.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Arrow; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Arrow).add(EntityKind::Arrow); +} diff --git a/crates/common/src/entities/bat.rs b/crates/common/src/entities/bat.rs new file mode 100644 index 000000000..f222c3e21 --- /dev/null +++ b/crates/common/src/entities/bat.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Bat; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Bat).add(EntityKind::Bat); +} diff --git a/crates/common/src/entities/bee.rs b/crates/common/src/entities/bee.rs new file mode 100644 index 000000000..d72385897 --- /dev/null +++ b/crates/common/src/entities/bee.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Bee; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Bee).add(EntityKind::Bee); +} diff --git a/crates/common/src/entities/blaze.rs b/crates/common/src/entities/blaze.rs new file mode 100644 index 000000000..8345ca50b --- /dev/null +++ b/crates/common/src/entities/blaze.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Blaze; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Blaze).add(EntityKind::Blaze); +} diff --git a/crates/common/src/entities/boat.rs b/crates/common/src/entities/boat.rs new file mode 100644 index 000000000..74798544b --- /dev/null +++ b/crates/common/src/entities/boat.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Boat; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Boat).add(EntityKind::Boat); +} diff --git a/crates/common/src/entities/cat.rs b/crates/common/src/entities/cat.rs new file mode 100644 index 000000000..0d046eb71 --- /dev/null +++ b/crates/common/src/entities/cat.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Cat; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Cat).add(EntityKind::Cat); +} diff --git a/crates/common/src/entities/cave_spider.rs b/crates/common/src/entities/cave_spider.rs new file mode 100644 index 000000000..ef2f5079e --- /dev/null +++ b/crates/common/src/entities/cave_spider.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::CaveSpider; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(CaveSpider).add(EntityKind::CaveSpider); +} diff --git a/crates/common/src/entities/chest_minecart.rs b/crates/common/src/entities/chest_minecart.rs new file mode 100644 index 000000000..814cc3a15 --- /dev/null +++ b/crates/common/src/entities/chest_minecart.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ChestMinecart; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(ChestMinecart).add(EntityKind::ChestMinecart); +} diff --git a/crates/common/src/entities/chicken.rs b/crates/common/src/entities/chicken.rs new file mode 100644 index 000000000..acad9f090 --- /dev/null +++ b/crates/common/src/entities/chicken.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Chicken; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Chicken).add(EntityKind::Chicken); +} diff --git a/crates/common/src/entities/cod.rs b/crates/common/src/entities/cod.rs new file mode 100644 index 000000000..f00ab6ced --- /dev/null +++ b/crates/common/src/entities/cod.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Cod; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Cod).add(EntityKind::Cod); +} diff --git a/crates/common/src/entities/command_block_minecart.rs b/crates/common/src/entities/command_block_minecart.rs new file mode 100644 index 000000000..7ee4cf12d --- /dev/null +++ b/crates/common/src/entities/command_block_minecart.rs @@ -0,0 +1,10 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::CommandBlockMinecart; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder + .add(CommandBlockMinecart) + .add(EntityKind::CommandBlockMinecart); +} diff --git a/crates/common/src/entities/cow.rs b/crates/common/src/entities/cow.rs new file mode 100644 index 000000000..0819836c1 --- /dev/null +++ b/crates/common/src/entities/cow.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Cow; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Cow).add(EntityKind::Cow); +} diff --git a/crates/common/src/entities/creeper.rs b/crates/common/src/entities/creeper.rs new file mode 100644 index 000000000..31c416ef2 --- /dev/null +++ b/crates/common/src/entities/creeper.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Creeper; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Creeper).add(EntityKind::Creeper); +} diff --git a/crates/common/src/entities/dolphin.rs b/crates/common/src/entities/dolphin.rs new file mode 100644 index 000000000..ace8dc2d0 --- /dev/null +++ b/crates/common/src/entities/dolphin.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Dolphin; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Dolphin).add(EntityKind::Dolphin); +} diff --git a/crates/common/src/entities/donkey.rs b/crates/common/src/entities/donkey.rs new file mode 100644 index 000000000..e58b5cd26 --- /dev/null +++ b/crates/common/src/entities/donkey.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Donkey; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Donkey).add(EntityKind::Donkey); +} diff --git a/crates/common/src/entities/dragon_fireball.rs b/crates/common/src/entities/dragon_fireball.rs new file mode 100644 index 000000000..63c4121c7 --- /dev/null +++ b/crates/common/src/entities/dragon_fireball.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::DragonFireball; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(DragonFireball).add(EntityKind::DragonFireball); +} diff --git a/crates/common/src/entities/drowned.rs b/crates/common/src/entities/drowned.rs new file mode 100644 index 000000000..c91618ce1 --- /dev/null +++ b/crates/common/src/entities/drowned.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Drowned; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Drowned).add(EntityKind::Drowned); +} diff --git a/crates/common/src/entities/egg.rs b/crates/common/src/entities/egg.rs new file mode 100644 index 000000000..f5ae44457 --- /dev/null +++ b/crates/common/src/entities/egg.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Egg; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Egg).add(EntityKind::Egg); +} diff --git a/crates/common/src/entities/elder_guardian.rs b/crates/common/src/entities/elder_guardian.rs new file mode 100644 index 000000000..b5a642bc9 --- /dev/null +++ b/crates/common/src/entities/elder_guardian.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ElderGuardian; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(ElderGuardian).add(EntityKind::ElderGuardian); +} diff --git a/crates/common/src/entities/end_crystal.rs b/crates/common/src/entities/end_crystal.rs new file mode 100644 index 000000000..84849f55b --- /dev/null +++ b/crates/common/src/entities/end_crystal.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::EndCrystal; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(EndCrystal).add(EntityKind::EndCrystal); +} diff --git a/crates/common/src/entities/ender_dragon.rs b/crates/common/src/entities/ender_dragon.rs new file mode 100644 index 000000000..ef6680a7c --- /dev/null +++ b/crates/common/src/entities/ender_dragon.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::EnderDragon; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(EnderDragon).add(EntityKind::EnderDragon); +} diff --git a/crates/common/src/entities/ender_pearl.rs b/crates/common/src/entities/ender_pearl.rs new file mode 100644 index 000000000..ab1a2e7d2 --- /dev/null +++ b/crates/common/src/entities/ender_pearl.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::EnderPearl; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(EnderPearl).add(EntityKind::EnderPearl); +} diff --git a/crates/common/src/entities/enderman.rs b/crates/common/src/entities/enderman.rs new file mode 100644 index 000000000..833c752b9 --- /dev/null +++ b/crates/common/src/entities/enderman.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Enderman; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Enderman).add(EntityKind::Enderman); +} diff --git a/crates/common/src/entities/endermite.rs b/crates/common/src/entities/endermite.rs new file mode 100644 index 000000000..1676d2014 --- /dev/null +++ b/crates/common/src/entities/endermite.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Endermite; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Endermite).add(EntityKind::Endermite); +} diff --git a/crates/common/src/entities/evoker.rs b/crates/common/src/entities/evoker.rs new file mode 100644 index 000000000..ee2f9d38f --- /dev/null +++ b/crates/common/src/entities/evoker.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Evoker; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Evoker).add(EntityKind::Evoker); +} diff --git a/crates/common/src/entities/evoker_fangs.rs b/crates/common/src/entities/evoker_fangs.rs new file mode 100644 index 000000000..52a94c63b --- /dev/null +++ b/crates/common/src/entities/evoker_fangs.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::EvokerFangs; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(EvokerFangs).add(EntityKind::EvokerFangs); +} diff --git a/crates/common/src/entities/experience_bottle.rs b/crates/common/src/entities/experience_bottle.rs new file mode 100644 index 000000000..eb984d54f --- /dev/null +++ b/crates/common/src/entities/experience_bottle.rs @@ -0,0 +1,10 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ExperienceBottle; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder + .add(ExperienceBottle) + .add(EntityKind::ExperienceBottle); +} diff --git a/crates/common/src/entities/experience_orb.rs b/crates/common/src/entities/experience_orb.rs new file mode 100644 index 000000000..0c696cfb6 --- /dev/null +++ b/crates/common/src/entities/experience_orb.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ExperienceOrb; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(ExperienceOrb).add(EntityKind::ExperienceOrb); +} diff --git a/crates/common/src/entities/eye_of_ender.rs b/crates/common/src/entities/eye_of_ender.rs new file mode 100644 index 000000000..6d6a9eb99 --- /dev/null +++ b/crates/common/src/entities/eye_of_ender.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::EyeOfEnder; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(EyeOfEnder).add(EntityKind::EyeOfEnder); +} diff --git a/crates/common/src/entities/falling_block.rs b/crates/common/src/entities/falling_block.rs new file mode 100644 index 000000000..64eba2aa9 --- /dev/null +++ b/crates/common/src/entities/falling_block.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::FallingBlock; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(FallingBlock).add(EntityKind::FallingBlock); +} diff --git a/crates/common/src/entities/fireball.rs b/crates/common/src/entities/fireball.rs new file mode 100644 index 000000000..232684802 --- /dev/null +++ b/crates/common/src/entities/fireball.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Fireball; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Fireball).add(EntityKind::Fireball); +} diff --git a/crates/common/src/entities/firework_rocket.rs b/crates/common/src/entities/firework_rocket.rs new file mode 100644 index 000000000..c3992dce8 --- /dev/null +++ b/crates/common/src/entities/firework_rocket.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::FireworkRocket; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(FireworkRocket).add(EntityKind::FireworkRocket); +} diff --git a/crates/common/src/entities/fishing_bobber.rs b/crates/common/src/entities/fishing_bobber.rs new file mode 100644 index 000000000..036d7afcc --- /dev/null +++ b/crates/common/src/entities/fishing_bobber.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::FishingBobber; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(FishingBobber).add(EntityKind::FishingBobber); +} diff --git a/crates/common/src/entities/fox.rs b/crates/common/src/entities/fox.rs new file mode 100644 index 000000000..2267ab1e2 --- /dev/null +++ b/crates/common/src/entities/fox.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Fox; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Fox).add(EntityKind::Fox); +} diff --git a/crates/common/src/entities/furnace_minecart.rs b/crates/common/src/entities/furnace_minecart.rs new file mode 100644 index 000000000..d56fa0efc --- /dev/null +++ b/crates/common/src/entities/furnace_minecart.rs @@ -0,0 +1,10 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::FurnaceMinecart; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder + .add(FurnaceMinecart) + .add(EntityKind::FurnaceMinecart); +} diff --git a/crates/common/src/entities/ghast.rs b/crates/common/src/entities/ghast.rs new file mode 100644 index 000000000..687175afa --- /dev/null +++ b/crates/common/src/entities/ghast.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Ghast; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Ghast).add(EntityKind::Ghast); +} diff --git a/crates/common/src/entities/giant.rs b/crates/common/src/entities/giant.rs new file mode 100644 index 000000000..11290d1d1 --- /dev/null +++ b/crates/common/src/entities/giant.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Giant; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Giant).add(EntityKind::Giant); +} diff --git a/crates/common/src/entities/guardian.rs b/crates/common/src/entities/guardian.rs new file mode 100644 index 000000000..04289c4bb --- /dev/null +++ b/crates/common/src/entities/guardian.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Guardian; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Guardian).add(EntityKind::Guardian); +} diff --git a/crates/common/src/entities/hoglin.rs b/crates/common/src/entities/hoglin.rs new file mode 100644 index 000000000..1be5d1dad --- /dev/null +++ b/crates/common/src/entities/hoglin.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Hoglin; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Hoglin).add(EntityKind::Hoglin); +} diff --git a/crates/common/src/entities/hopper_minecart.rs b/crates/common/src/entities/hopper_minecart.rs new file mode 100644 index 000000000..8cf8455fc --- /dev/null +++ b/crates/common/src/entities/hopper_minecart.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::HopperMinecart; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(HopperMinecart).add(EntityKind::HopperMinecart); +} diff --git a/crates/common/src/entities/horse.rs b/crates/common/src/entities/horse.rs new file mode 100644 index 000000000..25dc48d44 --- /dev/null +++ b/crates/common/src/entities/horse.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Horse; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Horse).add(EntityKind::Horse); +} diff --git a/crates/common/src/entities/husk.rs b/crates/common/src/entities/husk.rs new file mode 100644 index 000000000..dc276d868 --- /dev/null +++ b/crates/common/src/entities/husk.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Husk; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Husk).add(EntityKind::Husk); +} diff --git a/crates/common/src/entities/illusioner.rs b/crates/common/src/entities/illusioner.rs new file mode 100644 index 000000000..f188f09fb --- /dev/null +++ b/crates/common/src/entities/illusioner.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Illusioner; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Illusioner).add(EntityKind::Illusioner); +} diff --git a/crates/common/src/entities/iron_golem.rs b/crates/common/src/entities/iron_golem.rs new file mode 100644 index 000000000..ca0c91c9b --- /dev/null +++ b/crates/common/src/entities/iron_golem.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::IronGolem; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(IronGolem).add(EntityKind::IronGolem); +} diff --git a/crates/common/src/entities/item.rs b/crates/common/src/entities/item.rs new file mode 100644 index 000000000..7fe8f4b44 --- /dev/null +++ b/crates/common/src/entities/item.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Item; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Item).add(EntityKind::Item); +} diff --git a/crates/common/src/entities/item_frame.rs b/crates/common/src/entities/item_frame.rs new file mode 100644 index 000000000..cbcac743f --- /dev/null +++ b/crates/common/src/entities/item_frame.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ItemFrame; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(ItemFrame).add(EntityKind::ItemFrame); +} diff --git a/crates/common/src/entities/leash_knot.rs b/crates/common/src/entities/leash_knot.rs new file mode 100644 index 000000000..554df1092 --- /dev/null +++ b/crates/common/src/entities/leash_knot.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::LeashKnot; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(LeashKnot).add(EntityKind::LeashKnot); +} diff --git a/crates/common/src/entities/lightning_bolt.rs b/crates/common/src/entities/lightning_bolt.rs new file mode 100644 index 000000000..6127c561d --- /dev/null +++ b/crates/common/src/entities/lightning_bolt.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::LightningBolt; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(LightningBolt).add(EntityKind::LightningBolt); +} diff --git a/crates/common/src/entities/llama.rs b/crates/common/src/entities/llama.rs new file mode 100644 index 000000000..5929eed9d --- /dev/null +++ b/crates/common/src/entities/llama.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Llama; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Llama).add(EntityKind::Llama); +} diff --git a/crates/common/src/entities/llama_spit.rs b/crates/common/src/entities/llama_spit.rs new file mode 100644 index 000000000..562a3a8be --- /dev/null +++ b/crates/common/src/entities/llama_spit.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::LlamaSpit; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(LlamaSpit).add(EntityKind::LlamaSpit); +} diff --git a/crates/common/src/entities/magma_cube.rs b/crates/common/src/entities/magma_cube.rs new file mode 100644 index 000000000..61831dab9 --- /dev/null +++ b/crates/common/src/entities/magma_cube.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::MagmaCube; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(MagmaCube).add(EntityKind::MagmaCube); +} diff --git a/crates/common/src/entities/minecart.rs b/crates/common/src/entities/minecart.rs new file mode 100644 index 000000000..f28ed8687 --- /dev/null +++ b/crates/common/src/entities/minecart.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Minecart; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Minecart).add(EntityKind::Minecart); +} diff --git a/crates/common/src/entities/mooshroom.rs b/crates/common/src/entities/mooshroom.rs new file mode 100644 index 000000000..984f2c913 --- /dev/null +++ b/crates/common/src/entities/mooshroom.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Mooshroom; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Mooshroom).add(EntityKind::Mooshroom); +} diff --git a/crates/common/src/entities/mule.rs b/crates/common/src/entities/mule.rs new file mode 100644 index 000000000..342387ebc --- /dev/null +++ b/crates/common/src/entities/mule.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Mule; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Mule).add(EntityKind::Mule); +} diff --git a/crates/common/src/entities/ocelot.rs b/crates/common/src/entities/ocelot.rs new file mode 100644 index 000000000..0e1d4c528 --- /dev/null +++ b/crates/common/src/entities/ocelot.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Ocelot; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Ocelot).add(EntityKind::Ocelot); +} diff --git a/crates/common/src/entities/painting.rs b/crates/common/src/entities/painting.rs new file mode 100644 index 000000000..1eaaf6117 --- /dev/null +++ b/crates/common/src/entities/painting.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Painting; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Painting).add(EntityKind::Painting); +} diff --git a/crates/common/src/entities/panda.rs b/crates/common/src/entities/panda.rs new file mode 100644 index 000000000..c63b7e116 --- /dev/null +++ b/crates/common/src/entities/panda.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Panda; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Panda).add(EntityKind::Panda); +} diff --git a/crates/common/src/entities/parrot.rs b/crates/common/src/entities/parrot.rs new file mode 100644 index 000000000..919865d45 --- /dev/null +++ b/crates/common/src/entities/parrot.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Parrot; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Parrot).add(EntityKind::Parrot); +} diff --git a/crates/common/src/entities/phantom.rs b/crates/common/src/entities/phantom.rs new file mode 100644 index 000000000..4339412d7 --- /dev/null +++ b/crates/common/src/entities/phantom.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Phantom; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Phantom).add(EntityKind::Phantom); +} diff --git a/crates/common/src/entities/pig.rs b/crates/common/src/entities/pig.rs new file mode 100644 index 000000000..210cf2c0a --- /dev/null +++ b/crates/common/src/entities/pig.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Pig; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Pig).add(EntityKind::Pig); +} diff --git a/crates/common/src/entities/piglin.rs b/crates/common/src/entities/piglin.rs new file mode 100644 index 000000000..3c759c2e5 --- /dev/null +++ b/crates/common/src/entities/piglin.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Piglin; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Piglin).add(EntityKind::Piglin); +} diff --git a/crates/common/src/entities/piglin_brute.rs b/crates/common/src/entities/piglin_brute.rs new file mode 100644 index 000000000..b9d371464 --- /dev/null +++ b/crates/common/src/entities/piglin_brute.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::PiglinBrute; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(PiglinBrute).add(EntityKind::PiglinBrute); +} diff --git a/crates/common/src/entities/pillager.rs b/crates/common/src/entities/pillager.rs new file mode 100644 index 000000000..3e76f800b --- /dev/null +++ b/crates/common/src/entities/pillager.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Pillager; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Pillager).add(EntityKind::Pillager); +} diff --git a/crates/common/src/entities/player.rs b/crates/common/src/entities/player.rs new file mode 100644 index 000000000..9b831b706 --- /dev/null +++ b/crates/common/src/entities/player.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Player; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Player).add(EntityKind::Player); +} diff --git a/crates/common/src/entities/polar_bear.rs b/crates/common/src/entities/polar_bear.rs new file mode 100644 index 000000000..532bf6791 --- /dev/null +++ b/crates/common/src/entities/polar_bear.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::PolarBear; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(PolarBear).add(EntityKind::PolarBear); +} diff --git a/crates/common/src/entities/potion.rs b/crates/common/src/entities/potion.rs new file mode 100644 index 000000000..cccf07566 --- /dev/null +++ b/crates/common/src/entities/potion.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Potion; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Potion).add(EntityKind::Potion); +} diff --git a/crates/common/src/entities/pufferfish.rs b/crates/common/src/entities/pufferfish.rs new file mode 100644 index 000000000..65c67a85a --- /dev/null +++ b/crates/common/src/entities/pufferfish.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Pufferfish; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Pufferfish).add(EntityKind::Pufferfish); +} diff --git a/crates/common/src/entities/rabbit.rs b/crates/common/src/entities/rabbit.rs new file mode 100644 index 000000000..4b2582fb0 --- /dev/null +++ b/crates/common/src/entities/rabbit.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Rabbit; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Rabbit).add(EntityKind::Rabbit); +} diff --git a/crates/common/src/entities/ravager.rs b/crates/common/src/entities/ravager.rs new file mode 100644 index 000000000..e0d574c73 --- /dev/null +++ b/crates/common/src/entities/ravager.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Ravager; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Ravager).add(EntityKind::Ravager); +} diff --git a/crates/common/src/entities/salmon.rs b/crates/common/src/entities/salmon.rs new file mode 100644 index 000000000..178ef9d21 --- /dev/null +++ b/crates/common/src/entities/salmon.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Salmon; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Salmon).add(EntityKind::Salmon); +} diff --git a/crates/common/src/entities/sheep.rs b/crates/common/src/entities/sheep.rs new file mode 100644 index 000000000..d0ca5449d --- /dev/null +++ b/crates/common/src/entities/sheep.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Sheep; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Sheep).add(EntityKind::Sheep); +} diff --git a/crates/common/src/entities/shulker.rs b/crates/common/src/entities/shulker.rs new file mode 100644 index 000000000..9643d8e29 --- /dev/null +++ b/crates/common/src/entities/shulker.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Shulker; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Shulker).add(EntityKind::Shulker); +} diff --git a/crates/common/src/entities/shulker_bullet.rs b/crates/common/src/entities/shulker_bullet.rs new file mode 100644 index 000000000..796b272b2 --- /dev/null +++ b/crates/common/src/entities/shulker_bullet.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ShulkerBullet; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(ShulkerBullet).add(EntityKind::ShulkerBullet); +} diff --git a/crates/common/src/entities/silverfish.rs b/crates/common/src/entities/silverfish.rs new file mode 100644 index 000000000..ab6e939ab --- /dev/null +++ b/crates/common/src/entities/silverfish.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Silverfish; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Silverfish).add(EntityKind::Silverfish); +} diff --git a/crates/common/src/entities/skeleton.rs b/crates/common/src/entities/skeleton.rs new file mode 100644 index 000000000..6f72c12b3 --- /dev/null +++ b/crates/common/src/entities/skeleton.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Skeleton; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Skeleton).add(EntityKind::Skeleton); +} diff --git a/crates/common/src/entities/skeleton_horse.rs b/crates/common/src/entities/skeleton_horse.rs new file mode 100644 index 000000000..cf8a2c96e --- /dev/null +++ b/crates/common/src/entities/skeleton_horse.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::SkeletonHorse; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(SkeletonHorse).add(EntityKind::SkeletonHorse); +} diff --git a/crates/common/src/entities/slime.rs b/crates/common/src/entities/slime.rs new file mode 100644 index 000000000..809221504 --- /dev/null +++ b/crates/common/src/entities/slime.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Slime; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Slime).add(EntityKind::Slime); +} diff --git a/crates/common/src/entities/small_fireball.rs b/crates/common/src/entities/small_fireball.rs new file mode 100644 index 000000000..f3eac8f9a --- /dev/null +++ b/crates/common/src/entities/small_fireball.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::SmallFireball; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(SmallFireball).add(EntityKind::SmallFireball); +} diff --git a/crates/common/src/entities/snow_golem.rs b/crates/common/src/entities/snow_golem.rs new file mode 100644 index 000000000..01193a73e --- /dev/null +++ b/crates/common/src/entities/snow_golem.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::SnowGolem; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(SnowGolem).add(EntityKind::SnowGolem); +} diff --git a/crates/common/src/entities/snowball.rs b/crates/common/src/entities/snowball.rs new file mode 100644 index 000000000..f5bafff66 --- /dev/null +++ b/crates/common/src/entities/snowball.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Snowball; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Snowball).add(EntityKind::Snowball); +} diff --git a/crates/common/src/entities/spawner_minecart.rs b/crates/common/src/entities/spawner_minecart.rs new file mode 100644 index 000000000..550ccde67 --- /dev/null +++ b/crates/common/src/entities/spawner_minecart.rs @@ -0,0 +1,10 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::SpawnerMinecart; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder + .add(SpawnerMinecart) + .add(EntityKind::SpawnerMinecart); +} diff --git a/crates/common/src/entities/spectral_arrow.rs b/crates/common/src/entities/spectral_arrow.rs new file mode 100644 index 000000000..adc604636 --- /dev/null +++ b/crates/common/src/entities/spectral_arrow.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::SpectralArrow; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(SpectralArrow).add(EntityKind::SpectralArrow); +} diff --git a/crates/common/src/entities/spider.rs b/crates/common/src/entities/spider.rs new file mode 100644 index 000000000..9f1a6c688 --- /dev/null +++ b/crates/common/src/entities/spider.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Spider; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Spider).add(EntityKind::Spider); +} diff --git a/crates/common/src/entities/squid.rs b/crates/common/src/entities/squid.rs new file mode 100644 index 000000000..8743b62a1 --- /dev/null +++ b/crates/common/src/entities/squid.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Squid; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Squid).add(EntityKind::Squid); +} diff --git a/crates/common/src/entities/stray.rs b/crates/common/src/entities/stray.rs new file mode 100644 index 000000000..dd38847aa --- /dev/null +++ b/crates/common/src/entities/stray.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Stray; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Stray).add(EntityKind::Stray); +} diff --git a/crates/common/src/entities/strider.rs b/crates/common/src/entities/strider.rs new file mode 100644 index 000000000..b94f79706 --- /dev/null +++ b/crates/common/src/entities/strider.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Strider; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Strider).add(EntityKind::Strider); +} diff --git a/crates/common/src/entities/tnt.rs b/crates/common/src/entities/tnt.rs new file mode 100644 index 000000000..8adefb369 --- /dev/null +++ b/crates/common/src/entities/tnt.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Tnt; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Tnt).add(EntityKind::Tnt); +} diff --git a/crates/common/src/entities/tnt_minecart.rs b/crates/common/src/entities/tnt_minecart.rs new file mode 100644 index 000000000..77b2bca36 --- /dev/null +++ b/crates/common/src/entities/tnt_minecart.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::TntMinecart; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(TntMinecart).add(EntityKind::TntMinecart); +} diff --git a/crates/common/src/entities/trader_llama.rs b/crates/common/src/entities/trader_llama.rs new file mode 100644 index 000000000..58e0310a4 --- /dev/null +++ b/crates/common/src/entities/trader_llama.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::TraderLlama; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(TraderLlama).add(EntityKind::TraderLlama); +} diff --git a/crates/common/src/entities/trident.rs b/crates/common/src/entities/trident.rs new file mode 100644 index 000000000..b5a9a2bfa --- /dev/null +++ b/crates/common/src/entities/trident.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Trident; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Trident).add(EntityKind::Trident); +} diff --git a/crates/common/src/entities/tropical_fish.rs b/crates/common/src/entities/tropical_fish.rs new file mode 100644 index 000000000..381e50aa0 --- /dev/null +++ b/crates/common/src/entities/tropical_fish.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::TropicalFish; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(TropicalFish).add(EntityKind::TropicalFish); +} diff --git a/crates/common/src/entities/turtle.rs b/crates/common/src/entities/turtle.rs new file mode 100644 index 000000000..16c776443 --- /dev/null +++ b/crates/common/src/entities/turtle.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Turtle; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Turtle).add(EntityKind::Turtle); +} diff --git a/crates/common/src/entities/vex.rs b/crates/common/src/entities/vex.rs new file mode 100644 index 000000000..3a92f1cdf --- /dev/null +++ b/crates/common/src/entities/vex.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Vex; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Vex).add(EntityKind::Vex); +} diff --git a/crates/common/src/entities/villager.rs b/crates/common/src/entities/villager.rs new file mode 100644 index 000000000..5db272b24 --- /dev/null +++ b/crates/common/src/entities/villager.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Villager; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Villager).add(EntityKind::Villager); +} diff --git a/crates/common/src/entities/vindicator.rs b/crates/common/src/entities/vindicator.rs new file mode 100644 index 000000000..fff0ea097 --- /dev/null +++ b/crates/common/src/entities/vindicator.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Vindicator; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Vindicator).add(EntityKind::Vindicator); +} diff --git a/crates/common/src/entities/wandering_trader.rs b/crates/common/src/entities/wandering_trader.rs new file mode 100644 index 000000000..db57b88c1 --- /dev/null +++ b/crates/common/src/entities/wandering_trader.rs @@ -0,0 +1,10 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::WanderingTrader; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder + .add(WanderingTrader) + .add(EntityKind::WanderingTrader); +} diff --git a/crates/common/src/entities/witch.rs b/crates/common/src/entities/witch.rs new file mode 100644 index 000000000..a3161895a --- /dev/null +++ b/crates/common/src/entities/witch.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Witch; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Witch).add(EntityKind::Witch); +} diff --git a/crates/common/src/entities/wither.rs b/crates/common/src/entities/wither.rs new file mode 100644 index 000000000..02fa1fe78 --- /dev/null +++ b/crates/common/src/entities/wither.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Wither; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Wither).add(EntityKind::Wither); +} diff --git a/crates/common/src/entities/wither_skeleton.rs b/crates/common/src/entities/wither_skeleton.rs new file mode 100644 index 000000000..085b9e280 --- /dev/null +++ b/crates/common/src/entities/wither_skeleton.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::WitherSkeleton; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(WitherSkeleton).add(EntityKind::WitherSkeleton); +} diff --git a/crates/common/src/entities/wither_skull.rs b/crates/common/src/entities/wither_skull.rs new file mode 100644 index 000000000..59b871555 --- /dev/null +++ b/crates/common/src/entities/wither_skull.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::WitherSkull; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(WitherSkull).add(EntityKind::WitherSkull); +} diff --git a/crates/common/src/entities/wolf.rs b/crates/common/src/entities/wolf.rs new file mode 100644 index 000000000..cc07cb7db --- /dev/null +++ b/crates/common/src/entities/wolf.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Wolf; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Wolf).add(EntityKind::Wolf); +} diff --git a/crates/common/src/entities/zoglin.rs b/crates/common/src/entities/zoglin.rs new file mode 100644 index 000000000..79d6ab4e5 --- /dev/null +++ b/crates/common/src/entities/zoglin.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Zoglin; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Zoglin).add(EntityKind::Zoglin); +} diff --git a/crates/common/src/entities/zombie.rs b/crates/common/src/entities/zombie.rs new file mode 100644 index 000000000..eeb456878 --- /dev/null +++ b/crates/common/src/entities/zombie.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::Zombie; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(Zombie).add(EntityKind::Zombie); +} diff --git a/crates/common/src/entities/zombie_horse.rs b/crates/common/src/entities/zombie_horse.rs new file mode 100644 index 000000000..44a7e0919 --- /dev/null +++ b/crates/common/src/entities/zombie_horse.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ZombieHorse; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(ZombieHorse).add(EntityKind::ZombieHorse); +} diff --git a/crates/common/src/entities/zombie_villager.rs b/crates/common/src/entities/zombie_villager.rs new file mode 100644 index 000000000..29ae9d02c --- /dev/null +++ b/crates/common/src/entities/zombie_villager.rs @@ -0,0 +1,8 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ZombieVillager; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder.add(ZombieVillager).add(EntityKind::ZombieVillager); +} diff --git a/crates/common/src/entities/zombified_piglin.rs b/crates/common/src/entities/zombified_piglin.rs new file mode 100644 index 000000000..83b300f7b --- /dev/null +++ b/crates/common/src/entities/zombified_piglin.rs @@ -0,0 +1,10 @@ +use base::EntityKind; +use ecs::EntityBuilder; +use quill_common::entities::ZombifiedPiglin; + +pub fn build_default(builder: &mut EntityBuilder) { + super::build_default(builder); + builder + .add(ZombifiedPiglin) + .add(EntityKind::ZombifiedPiglin); +} diff --git a/crates/common/src/entity/player.rs b/crates/common/src/entity/player.rs new file mode 100644 index 000000000..605fa6769 --- /dev/null +++ b/crates/common/src/entity/player.rs @@ -0,0 +1,10 @@ +use base::EntityKind; +use ecs::EntityBuilder; + +/// Marker component. Indicates that an entity is a player. +pub struct Player; + +/// Fills an `EntityBuilder` with components for a player. +pub fn build(builder: &mut EntityBuilder) -> &mut EntityBuilder { + builder.add(Player).add(EntityKind::Player) +} diff --git a/crates/common/src/events.rs b/crates/common/src/events.rs new file mode 100644 index 000000000..39e9f3ffa --- /dev/null +++ b/crates/common/src/events.rs @@ -0,0 +1,72 @@ +use std::sync::Arc; + +use base::{Chunk, ChunkPosition}; +use parking_lot::RwLock; + +use crate::view::View; + +/// Triggered when a player joins the `Game`. +#[derive(Debug)] +pub struct PlayerJoinEvent; + +/// Event triggered when a player changes their `View`, +/// meaning they crossed into a new chunk. +#[derive(Debug)] +pub struct ViewUpdateEvent { + pub old_view: View, + pub new_view: View, + + /// Chunks that are in `new_view` but not `old_view` + pub new_chunks: Vec, + /// Chunks that are in `old_view` but not in `new_view` + pub old_chunks: Vec, +} + +impl ViewUpdateEvent { + pub fn new(old_view: View, new_view: View) -> Self { + let mut this = Self { + old_view, + new_view, + new_chunks: new_view.difference(old_view).collect(), + old_chunks: old_view.difference(new_view).collect(), + }; + this.new_chunks + .sort_unstable_by_key(|chunk| chunk.distance_squared_to(new_view.center())); + this.old_chunks + .sort_unstable_by_key(|chunk| chunk.distance_squared_to(old_view.center())); + this + } +} + +/// Event triggered when an entity crosses into a new chunk. +/// +/// Unlike [`ViewUpdateEvent`], this event triggers for all entities, +/// not just players. +pub struct ChunkCrossEvent { + pub old_chunk: ChunkPosition, + pub new_chunk: ChunkPosition, +} + +/// Triggered when a chunk is loaded. +#[derive(Debug)] +pub struct ChunkLoadEvent { + pub position: ChunkPosition, + pub chunk: Arc>, +} + +/// Triggered when an error occurs while loading a chunk. +#[derive(Debug)] +pub struct ChunkLoadFailEvent { + pub position: ChunkPosition, +} + +/// Triggered when an entity is removed from the world. +/// +/// The entity will remain alive for one tick after it is +/// destroyed to allow systems to observe this event. +#[derive(Debug)] +pub struct EntityRemoveEvent; + +/// Triggered when an entity is added into the world. +#[derive(Debug)] +pub struct EntityCreateEvent; diff --git a/crates/common/src/game.rs b/crates/common/src/game.rs new file mode 100644 index 000000000..c5dd73223 --- /dev/null +++ b/crates/common/src/game.rs @@ -0,0 +1,182 @@ +use std::{cell::RefCell, mem, rc::Rc, sync::Arc}; + +use base::{BlockId, BlockPosition, Position, Text}; +use ecs::{ + Ecs, Entity, EntityBuilder, HasEcs, HasResources, NoSuchEntity, Resources, SysResult, + SystemExecutor, +}; +use quill_common::{entities::Player, entity_init::EntityInit}; + +use crate::{ + chat::{ChatKind, ChatMessage}, + chunk_entities::ChunkEntities, + events::{EntityCreateEvent, EntityRemoveEvent, PlayerJoinEvent}, + ChatBox, World, +}; + +type EntitySpawnCallback = Box; + +/// Stores the entire state of a Minecraft game. +/// +/// This contains: +/// * A [`World`](base::World) containing chunks and blocks. +/// * An [`Ecs`](ecs::Ecs) containing entities. +/// * A [`Resources`](ecs::Resources) containing additional, user-defined data. +/// * A [`SystemExecutor`] to run systems. +/// +/// `feather-common` provides `Game` methods for actions such +/// as "drop item" or "kill entity." These high-level methods +/// should be preferred over raw interaction with the ECS. +pub struct Game { + /// Contains chunks and blocks. + pub world: World, + /// Contains entities, including players. + pub ecs: Ecs, + /// Contains systems. + pub system_executor: Rc>>, + + /// User-defined resources. + /// + /// Stored in an `Arc` for borrow-checker purposes. + pub resources: Arc, + + /// A spatial index to efficiently find which entities are in a given chunk. + pub chunk_entities: ChunkEntities, + + entity_spawn_callbacks: Vec, + + entity_builder: EntityBuilder, +} + +impl Default for Game { + fn default() -> Self { + Self::new() + } +} + +impl Game { + /// Creates a new, empty `Game`. + pub fn new() -> Self { + Self { + world: World::new(), + ecs: Ecs::new(), + system_executor: Rc::new(RefCell::new(SystemExecutor::new())), + resources: Arc::new(Resources::new()), + chunk_entities: ChunkEntities::default(), + entity_spawn_callbacks: Vec::new(), + entity_builder: EntityBuilder::new(), + } + } + + /// Inserts a new resource. + /// + /// An existing resource with type `T` is overriden. + /// + /// # Panics + /// Panics if any resources are currently borrowed. + pub fn insert_resource(&mut self, resource: T) + where + T: 'static, + { + Arc::get_mut(&mut self.resources) + .expect("attempted to insert into resources while resources are borrowed") + .insert(resource); + } + + /// Adds a new entity spawn callback, invoked + /// before an entity is created. + /// + /// This allows you to add components to entities + /// before they are built. + pub fn add_entity_spawn_callback( + &mut self, + callback: impl FnMut(&mut EntityBuilder, &EntityInit) + 'static, + ) { + self.entity_spawn_callbacks.push(Box::new(callback)); + } + + /// Creates an entity builder with the default components + /// for an entity of type `init`. + pub fn create_entity_builder(&mut self, position: Position, init: EntityInit) -> EntityBuilder { + let mut builder = mem::take(&mut self.entity_builder); + builder.add(position); + self.invoke_entity_spawn_callbacks(&mut builder, init); + builder + } + + /// Spawns an entity and returns its [`Entity`](ecs::Entity) handle. + /// + /// Also triggers necessary events, like `EntitySpawnEvent` and `PlayerJoinEvent`. + pub fn spawn_entity(&mut self, mut builder: EntityBuilder) -> Entity { + let entity = self.ecs.spawn(builder.build()); + self.entity_builder = builder; + + self.trigger_entity_spawn_events(entity); + + entity + } + + fn invoke_entity_spawn_callbacks(&mut self, builder: &mut EntityBuilder, init: EntityInit) { + let mut callbacks = mem::take(&mut self.entity_spawn_callbacks); + for callback in &mut callbacks { + callback(builder, &init); + } + self.entity_spawn_callbacks = callbacks; + } + + fn trigger_entity_spawn_events(&mut self, entity: Entity) { + self.ecs + .insert_entity_event(entity, EntityCreateEvent) + .unwrap(); + if self.ecs.get::(entity).is_ok() { + self.ecs + .insert_entity_event(entity, PlayerJoinEvent) + .unwrap(); + } + } + + /// Causes the given entity to be removed on the next tick. + /// In the meantime, triggers `EntityRemoveEvent`. + pub fn remove_entity(&mut self, entity: Entity) -> Result<(), NoSuchEntity> { + self.ecs.defer_despawn(entity); + self.ecs.insert_entity_event(entity, EntityRemoveEvent) + } + + /// Broadcasts a chat message to all entities with + /// a `ChatBox` component (usually just players). + pub fn broadcast_chat(&self, kind: ChatKind, message: impl Into) { + let message = message.into(); + for (_, mailbox) in self.ecs.query::<&mut ChatBox>().iter() { + mailbox.send(ChatMessage::new(kind, message.clone())); + } + } + + /// Utility method to send a message to an entity. + pub fn send_message(&mut self, entity: Entity, message: ChatMessage) -> SysResult { + let mut mailbox = self.ecs.get_mut::(entity)?; + mailbox.send(message); + Ok(()) + } + + /// Breaks the block at the given position, propagating any + /// necessary block updates. + pub fn break_block_at(&mut self, pos: BlockPosition) -> bool { + self.world.set_block_at(pos, BlockId::air()) + } +} + +impl HasResources for Game { + fn resources(&self) -> Arc { + Arc::clone(&self.resources) + } +} + +impl HasEcs for Game { + fn ecs(&self) -> &Ecs { + &self.ecs + } + + fn ecs_mut(&mut self) -> &mut Ecs { + &mut self.ecs + } +} diff --git a/crates/common/src/lib.rs b/crates/common/src/lib.rs new file mode 100644 index 000000000..d9c758b6e --- /dev/null +++ b/crates/common/src/lib.rs @@ -0,0 +1,43 @@ +//! Gameplay functionality: entities, components, systems, game logic, ... +//! +//! This crate implements most functionality that is generic between +//! client and server, i.e., which does not involve interaction with the network. + +#![allow(clippy::unnecessary_wraps)] // systems are required to return Results + +mod game; +use ecs::SystemExecutor; +pub use game::Game; + +mod tick_loop; +pub use tick_loop::TickLoop; + +pub mod view; + +pub mod window; +pub use window::Window; + +pub mod events; + +pub mod world_source; + +pub mod world; +pub use world::World; + +mod chunk_loading; + +mod chunk_entities; + +pub mod chat; +pub use chat::ChatBox; + +pub mod entities; + +/// Registers gameplay systems with the given `Game` and `SystemExecutor`. +pub fn register(game: &mut Game, systems: &mut SystemExecutor) { + view::register(game, systems); + chunk_loading::register(game, systems); + chunk_entities::register(systems); + + game.add_entity_spawn_callback(entities::add_entity_components); +} diff --git a/crates/common/src/tick_loop.rs b/crates/common/src/tick_loop.rs new file mode 100644 index 000000000..8709087c7 --- /dev/null +++ b/crates/common/src/tick_loop.rs @@ -0,0 +1,38 @@ +use std::time::Instant; + +use base::TICK_DURATION; + +/// Utility to invoke a function in a tick loop, once +/// every 50ms. +pub struct TickLoop { + function: Box bool>, +} + +impl TickLoop { + /// Creates a `TickLoop`. The given `function` is called + /// each tick. Returning `true` from `function` causes the + /// tick loop to exit. + pub fn new(function: impl FnMut() -> bool + 'static) -> Self { + Self { + function: Box::new(function), + } + } + + /// Runs the tick loop until the callback returns `true`. + pub fn run(mut self) { + loop { + let start = Instant::now(); + let should_exit = (self.function)(); + if should_exit { + return; + } + + let elapsed = start.elapsed(); + if elapsed > TICK_DURATION { + log::warn!("Tick took too long ({:?})", elapsed); + } else { + std::thread::sleep(TICK_DURATION - elapsed); + } + } + } +} diff --git a/crates/common/src/view.rs b/crates/common/src/view.rs new file mode 100644 index 000000000..325b27a8f --- /dev/null +++ b/crates/common/src/view.rs @@ -0,0 +1,165 @@ +use ahash::AHashSet; +use base::{ChunkPosition, Position}; +use ecs::{SysResult, SystemExecutor}; +use itertools::Either; +use quill_common::components::Name; + +use crate::{ + events::{PlayerJoinEvent, ViewUpdateEvent}, + Game, +}; + +/// Registers systems to update the `View` of a player. +pub fn register(_game: &mut Game, systems: &mut SystemExecutor) { + systems + .add_system(update_player_views) + .add_system(update_view_on_join); +} + +/// Updates players' views when they change chunks. +fn update_player_views(game: &mut Game) -> SysResult { + let mut events = Vec::new(); + for (player, (view, &position, name)) in + game.ecs.query::<(&mut View, &Position, &Name)>().iter() + { + if position.chunk() != view.center() { + let old_view = *view; + let new_view = View::new(position.chunk(), old_view.view_distance); + + let event = ViewUpdateEvent::new(old_view, new_view); + events.push((player, event)); + + *view = new_view; + log::trace!("View of {} has been updated", name); + } + } + + for (player, event) in events { + game.ecs.insert_entity_event(player, event)?; + } + Ok(()) +} + +/// Triggers a ViewUpdateEvent when a player joins the game. +fn update_view_on_join(game: &mut Game) -> SysResult { + let mut events = Vec::new(); + for (player, (&view, name, _)) in game.ecs.query::<(&View, &Name, &PlayerJoinEvent)>().iter() { + let event = ViewUpdateEvent::new(View::empty(), view); + events.push((player, event)); + log::trace!("View of {} has been updated (player joined)", name); + } + for (player, event) in events { + game.ecs.insert_entity_event(player, event)?; + } + Ok(()) +} + +/// The view of a player, representing the set of chunks +/// within their view distance. +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub struct View { + center: ChunkPosition, + view_distance: u32, +} + +impl View { + /// Creates a `View` from a center chunk (the position of the player) + /// and the view distance. + pub fn new(center: ChunkPosition, view_distance: u32) -> Self { + Self { + center, + view_distance, + } + } + + /// Gets the empty view, i.e., the view containing no chunks. + pub fn empty() -> Self { + Self::new(ChunkPosition::new(0, 0), 0) + } + + /// Determines whether this is the empty view. + pub fn is_empty(&self) -> bool { + self.view_distance == 0 + } + + pub fn center(&self) -> ChunkPosition { + self.center + } + + pub fn view_distance(&self) -> u32 { + self.view_distance + } + + pub fn set_center(&mut self, center: ChunkPosition) { + self.center = center; + } + + pub fn set_view_distance(&mut self, view_distance: u32) { + self.view_distance = view_distance; + } + + /// Iterates over chunks visible to the player. + pub fn iter(self) -> impl Iterator { + if self.is_empty() { + Either::Left(std::iter::empty()) + } else { + Either::Right(Self::iter_2d( + self.min_x(), + self.min_z(), + self.max_x(), + self.max_z(), + )) + } + } + + /// Returns the set of chunks that are in `self` but not in `other`. + pub fn difference(self, other: View) -> impl Iterator { + // PERF: consider analytical approach instead of sets + let self_chunks: AHashSet<_> = self.iter().collect(); + let other_chunks: AHashSet<_> = other.iter().collect(); + self_chunks + .difference(&other_chunks) + .copied() + .collect::>() + .into_iter() + } + + /// Determines whether the given chunk is visible. + pub fn contains(&self, pos: ChunkPosition) -> bool { + pos.x >= self.min_x() + && pos.x <= self.max_x() + && pos.z >= self.min_z() + && pos.z <= self.max_z() + } + + fn iter_2d( + min_x: i32, + min_z: i32, + max_x: i32, + max_z: i32, + ) -> impl Iterator { + (min_x..=max_x) + .flat_map(move |x| (min_z..=max_z).map(move |z| (x, z))) + .map(|(x, z)| ChunkPosition { x, z }) + } + + /// Returns the minimum X chunk coordinate. + pub fn min_x(&self) -> i32 { + self.center.x - self.view_distance as i32 + } + + /// Returns the minimum Z coordinate. + pub fn min_z(&self) -> i32 { + self.center.z - self.view_distance as i32 + } + + /// Returns the maximum X coordinate. + pub fn max_x(&self) -> i32 { + self.center.x + self.view_distance as i32 + } + + /// Returns the maximum Z coordinate. + pub fn max_z(&self) -> i32 { + self.center.z + self.view_distance as i32 + } +} diff --git a/crates/common/src/window.rs b/crates/common/src/window.rs new file mode 100644 index 000000000..ccf8548dc --- /dev/null +++ b/crates/common/src/window.rs @@ -0,0 +1,594 @@ +use std::mem; + +use anyhow::{anyhow, bail}; +use base::{Area, Item, ItemStack}; + +use ecs::SysResult; +pub use generated::Window as BackingWindow; +use generated::WindowError; +use parking_lot::MutexGuard; + +/// A player's window. Wraps one or more inventories and handles +/// conversion between protocol and slot indices. +/// +/// Also provides high-level methods to interact with the inventory, +/// like [`right_click`], [`shift_left_click`], etc. +#[derive(Debug)] +pub struct Window { + /// The backing window (contains the `Inventory`s) + inner: BackingWindow, + /// The item currently held by the player's cursor. + cursor_item: Option, + /// Current painting state (mouse drag) + paint_state: Option, +} + +impl Window { + /// Creates a window from the backing window representation. + pub fn new(inner: BackingWindow) -> Self { + Self { + inner, + cursor_item: None, + paint_state: None, + } + } + + /// Left-click a slot in the window. + pub fn left_click(&mut self, slot: usize) -> SysResult { + let mut slot_item = self.inner.item(slot)?; + + // Cases: + // * Either the cursor slot or the clicked slot is empty; swap the two. + // * Both slots are present but are of different types; swap the two. + // * Both slots are present and have the same type; merge the two. + match (slot_item.as_mut(), self.cursor_item.as_mut()) { + (Some(slot_item), Some(cursor_item)) => { + if cursor_item.has_same_type(slot_item) { + slot_item.merge_with(cursor_item); + } else { + mem::swap(slot_item, cursor_item); + } + } + (Some(_), None) => self.cursor_item = slot_item.take(), + (None, Some(_)) => *slot_item = self.cursor_item.take(), + (None, None) => (), + } + + drop(slot_item); + self.refresh(); + + Ok(()) + } + + /// Right-clicks a slot in the window. + pub fn right_click(&mut self, slot: usize) -> SysResult { + let mut slot_item = self.inner.item(slot)?; + + // Cases: + // * Cursor slot is present and clicked slot has the same item type; drop one item in the clicked slot. + // * Clicked slot is present but cursor slot is not; move half the items into the cursor slot. + // * Both slots are present but differ in type; swap the two. + match (slot_item.as_mut(), self.cursor_item.as_mut()) { + (Some(slot_item), Some(cursor_item)) => { + if slot_item.has_same_type(cursor_item) { + cursor_item.transfer_to(1, slot_item); + } else { + mem::swap(slot_item, cursor_item); + } + } + (Some(slot_item), None) => self.cursor_item = Some(slot_item.take_half()), + (None, Some(cursor_item)) => *slot_item = Some(cursor_item.take(1)), + (None, None) => (), + } + + drop(slot_item); + self.refresh(); + + Ok(()) + } + + /// Shift-clicks the given slot. (Either right or left click.) + pub fn shift_click(&mut self, slot: usize) -> SysResult { + let mut slot_item_guard = self.inner.item(slot)?; + let slot_item = match slot_item_guard.as_mut() { + Some(item) => item, + None => return Ok(()), + }; + + let (inventory, slot_area, _) = self.inner.index_to_slot(slot).unwrap(); + // TODO: correctly support non-player windows + let areas_to_try = [ + Area::Hotbar, + Area::Storage, + Area::Helmet, + Area::Chestplate, + Area::Leggings, + Area::Boots, + Area::CraftingInput, + ]; + for &area in &areas_to_try { + if area == slot_area || !will_accept(area, slot_item) { + continue; + } + + // Find slot with same type first + let mut i = 0; + while let Some(mut stack) = inventory.item(area, i) { + if let Some(stack) = stack.as_mut() { + if stack.has_same_type(slot_item) { + slot_item.transfer_to(u32::MAX, stack); + } + } + i += 1; + } + + // If we still haven't moved all the items, transfer to any empty space + i = 0; + while let Some(mut stack) = inventory.item(area, i) { + if stack.is_none() { + *stack = Some(slot_item.take(u32::MAX)); + break; + } + i += 1; + } + + if slot_item.count() == 0 { + break; + } + } + + drop(slot_item_guard); + self.refresh(); + + Ok(()) + } + + /// Starts a left mouse paint operation. + pub fn begin_left_mouse_paint(&mut self) { + self.paint_state = Some(PaintState::new(Mouse::Left)); + } + + /// Starts a right mouse paint operation. + pub fn begin_right_mouse_paint(&mut self) { + self.paint_state = Some(PaintState::new(Mouse::Right)); + } + + /// Adds a slot to the current paint operation. + pub fn add_paint_slot(&mut self, slot: usize) -> SysResult { + if let Some(state) = &mut self.paint_state { + state.add_slot(slot) + } else { + Err(anyhow!("no paint operation was active")) + } + } + + /// Completes and executes the current paint operation. + pub fn end_paint(&mut self) -> SysResult { + if let Some(state) = self.paint_state.take() { + state.finish(self) + } else { + Err(anyhow!("no paint operation was active")) + } + } + + /// Gets the item currently held in the cursor. + pub fn cursor_item(&self) -> Option { + self.cursor_item.clone() + } + + /// Refreshes items by fixing item stacks with count=0. + fn refresh(&mut self) { + Self::refresh_item(&mut self.cursor_item); + let mut i = 0; + while let Ok(mut slot) = self.inner.item(i) { + Self::refresh_item(&mut *slot); + i += 1; + } + } + + fn refresh_item(item: &mut Option) { + if let Some(inner) = item { + if inner.count() == 0 { + *item = None; + } + } + } + + pub fn item(&self, index: usize) -> Result>, WindowError> { + self.inner.item(index) + } + + pub fn set_item(&self, index: usize, item: Option) -> Result<(), WindowError> { + self.inner.set_item(index, item) + } + + pub fn inner(&self) -> &BackingWindow { + &self.inner + } +} + +/// Determines whether the given area will accept the given item +/// for shift-click transfer. +fn will_accept(area: Area, stack: &ItemStack) -> bool { + match area { + Area::Storage => true, + Area::CraftingOutput => false, + Area::CraftingInput => false, + Area::Helmet => matches!( + stack.item(), + Item::LeatherHelmet + | Item::ChainmailHelmet + | Item::GoldenHelmet + | Item::IronHelmet + | Item::DiamondHelmet + | Item::NetheriteHelmet + ), + Area::Chestplate => matches!( + stack.item(), + Item::LeatherChestplate + | Item::ChainmailChestplate + | Item::GoldenChestplate + | Item::IronChestplate + | Item::DiamondChestplate + | Item::NetheriteChestplate + ), + Area::Leggings => matches!( + stack.item(), + Item::LeatherHelmet + | Item::ChainmailLeggings + | Item::GoldenLeggings + | Item::IronLeggings + | Item::DiamondLeggings + | Item::NetheriteLeggings + ), + Area::Boots => matches!( + stack.item(), + Item::LeatherBoots + | Item::ChainmailBoots + | Item::GoldenBoots + | Item::IronBoots + | Item::DiamondBoots + | Item::NetheriteBoots + ), + Area::Hotbar => true, + Area::Offhand => true, + Area::FurnaceIngredient => true, + Area::FurnaceFuel => true, + Area::FurnaceOutput => false, + Area::EnchantmentItem => true, + Area::EnchantmentLapis => stack.item() == Item::LapisLazuli, + Area::BrewingBottle => matches!( + stack.item(), + Item::GlassBottle | Item::Potion | Item::SplashPotion | Item::LingeringPotion + ), + Area::BrewingIngredient => true, + Area::BrewingBlazePowder => stack.item() == Item::BlazePowder, + Area::VillagerInput => true, + Area::VillagerOutput => false, + Area::BeaconPayment => matches!( + stack.item(), + Item::IronIngot + | Item::GoldIngot + | Item::Diamond + | Item::NetheriteIngot + | Item::Emerald + ), + Area::AnvilInput1 => true, + Area::AnvilInput2 => true, + Area::AnvilOutput => false, + Area::Saddle => stack.item() == Item::Saddle, + Area::HorseArmor => matches!( + stack.item(), + Item::LeatherHorseArmor + | Item::IronHorseArmor + | Item::GoldenHorseArmor + | Item::DiamondHorseArmor + ), + Area::LlamaCarpet => true, + Area::CartographyMap => matches!(stack.item(), Item::Map | Item::FilledMap), + Area::CartographyPaper => stack.item() == Item::Paper, + Area::CartographyOutput => false, + Area::GrindstoneInput1 => true, + Area::GrindstoneInput2 => true, + Area::GrindstoneOutput => false, + Area::LecternBook => true, + Area::LoomBanner => true, + Area::LoomDye => true, + Area::LoomPattern => true, + Area::LoomOutput => false, + Area::StonecutterInput => true, + Area::StonecutterOutput => false, + } +} + +/// State for a paint operation (left mouse or right mouse drag). +#[derive(Debug)] +struct PaintState { + mouse: Mouse, + slots: Vec, +} + +impl PaintState { + pub fn new(mouse: Mouse) -> Self { + Self { + mouse, + slots: Vec::new(), + } + } + + pub fn add_slot(&mut self, slot: usize) -> SysResult { + self.slots.push(slot); + if self.slots.len() > 1000 { + bail!("too many paint slots! malicious client?"); + } + Ok(()) + } + + pub fn finish(self, window: &mut Window) -> SysResult { + let cursor_item = match &mut window.cursor_item { + Some(item) => item, + None => bail!("cannot paint without cursor item"), + }; + + match self.mouse { + Mouse::Left => { + let amount = cursor_item.count / self.slots.len() as u32; + let mut remainder = cursor_item.count % self.slots.len() as u32; + + for slot in self.slots { + if window.inner.item(slot)?.is_some() { + bail!("attempted to overwrite item"); + } + + let amount = if amount > 0 { + amount + } else { + let amount = 1.min(remainder); + remainder -= amount; + amount + }; + window + .inner + .set_item(slot, Some(cursor_item.take(amount)))?; + } + } + Mouse::Right => { + for slot in self.slots { + let mut item = window.inner.item(slot)?; + let item = match item.as_mut() { + Some(item) => item, + None => { + *item = Some(cursor_item.take(0)); + item.as_mut().unwrap() + } + }; + cursor_item.transfer_to(1, &mut *item); + } + } + } + + window.refresh(); + Ok(()) + } +} + +#[derive(Debug)] +enum Mouse { + Left, + Right, +} + +#[cfg(test)] +mod tests { + use base::{Inventory, Item}; + + use super::*; + + #[test] + fn window_left_click_swap() { + let mut window = window(); + + window.left_click(0).unwrap(); + assert_eq!(window.cursor_item, None); + + let stack = ItemStack::new(Item::Diamond, 32); + window.set_item(0, Some(stack.clone())).unwrap(); + window.left_click(0).unwrap(); + + assert_eq!(window.cursor_item, Some(stack.clone())); + assert!(window.item(0).unwrap().is_none()); + + window.left_click(1).unwrap(); + assert_eq!(window.cursor_item, None); + assert_eq!(window.item(1).unwrap().as_ref(), Some(&stack)); + } + + #[test] + fn window_left_click_same_item() { + let mut window = window(); + + let item = ItemStack::new(Item::AcaciaSlab, 32); + window.set_item(0, Some(item.clone())).unwrap(); + window.left_click(0).unwrap(); + + window.set_item(1, Some(item)).unwrap(); + window.left_click(1).unwrap(); + + assert_eq!(window.cursor_item, None); + assert_eq!( + window.item(1).unwrap().as_ref(), + Some(&ItemStack::new(Item::AcaciaSlab, 64)) + ); + } + + #[test] + fn window_right_click_pick_up_half() { + let mut window = window(); + let stack = ItemStack::new(Item::GlassPane, 17); + window.set_item(0, Some(stack)).unwrap(); + + window.right_click(0).unwrap(); + assert_eq!(window.cursor_item, Some(ItemStack::new(Item::GlassPane, 9))); + assert_eq!( + window.item(0).unwrap().as_ref(), + Some(&ItemStack::new(Item::GlassPane, 8)) + ); + } + + #[test] + fn window_right_click_drop_one_item() { + let mut window = window(); + let stack = ItemStack::new(Item::GlassPane, 17); + window.cursor_item = Some(stack); + + window.right_click(1).unwrap(); + assert_eq!( + window.cursor_item, + Some(ItemStack::new(Item::GlassPane, 16)) + ); + assert_eq!( + window.item(1).unwrap().as_ref(), + Some(&ItemStack::new(Item::GlassPane, 1)) + ); + } + + #[test] + fn window_right_click_swap() { + let mut window = window(); + let stack1 = ItemStack::new(Item::GlassPane, 17); + let stack2 = ItemStack::new(Item::Diamond, 2); + window.cursor_item = Some(stack1.clone()); + window.set_item(0, Some(stack2.clone())).unwrap(); + + window.right_click(0).unwrap(); + assert_eq!(window.cursor_item, Some(stack2)); + assert_eq!(window.item(0).unwrap().as_ref(), Some(&stack1)); + } + + #[test] + fn window_shift_click_full_hotbar() { + let inventory = Inventory::player(); + for i in 0..9 { + *inventory.item(Area::Hotbar, i).unwrap() = Some(ItemStack::new(Item::EnderPearl, 1)); + } + *inventory.item(Area::Storage, 0).unwrap() = Some(ItemStack::new(Item::AcaciaSign, 1)); + let mut window = Window::new(BackingWindow::Player { + player: inventory.new_handle(), + }); + let index = window + .inner() + .slot_to_index(&inventory, Area::Storage, 0) + .unwrap(); + window.shift_click(index).unwrap(); + assert_eq!( + window.item(index).unwrap().as_ref(), + Some(&ItemStack::new(Item::AcaciaSign, 1)) + ); + } + + #[test] + fn window_shift_click_available_item_in_hotbar() { + let inventory = Inventory::player(); + *inventory.item(Area::Hotbar, 3).unwrap() = Some(ItemStack::new(Item::Stone, 4)); + *inventory.item(Area::Storage, 3).unwrap() = Some(ItemStack::new(Item::Stone, 7)); + let mut window = Window::new(BackingWindow::Player { + player: inventory.new_handle(), + }); + + let index = window + .inner() + .slot_to_index(&inventory, Area::Storage, 3) + .unwrap(); + window.shift_click(index).unwrap(); + + let hotbar_index = window + .inner() + .slot_to_index(&inventory, Area::Hotbar, 3) + .unwrap(); + assert_eq!( + window.item(hotbar_index).unwrap().as_ref(), + Some(&ItemStack::new(Item::Stone, 11)) + ); + assert!(window.item(index).unwrap().is_none()); + } + + #[test] + fn window_shift_click_empty_hotbar() { + let inventory = Inventory::player(); + *inventory.item(Area::Storage, 3).unwrap() = Some(ItemStack::new(Item::Stone, 7)); + let mut window = Window::new(BackingWindow::Player { + player: inventory.new_handle(), + }); + + let storage_index = window + .inner() + .slot_to_index(&inventory, Area::Storage, 3) + .unwrap(); + window.shift_click(storage_index).unwrap(); + let hotbar_index = window + .inner() + .slot_to_index(&inventory, Area::Hotbar, 0) + .unwrap(); + assert_eq!( + window.item(hotbar_index).unwrap().as_ref(), + Some(&ItemStack::new(Item::Stone, 7)) + ); + assert!(window.item(storage_index).unwrap().is_none()); + } + + #[test] + fn left_mouse_paint() { + let mut window = window(); + window + .set_item(0, Some(ItemStack::new(Item::Stone, 64))) + .unwrap(); + window.left_click(0).unwrap(); + + window.begin_left_mouse_paint(); + window.add_paint_slot(0).unwrap(); + window.add_paint_slot(1).unwrap(); + window.add_paint_slot(5).unwrap(); + window.end_paint().unwrap(); + + for &slot in &[0, 1, 5] { + assert_eq!( + window.item(slot).unwrap().as_ref(), + Some(&ItemStack::new(Item::Stone, 21)) + ); + } + assert_eq!(window.cursor_item, Some(ItemStack::new(Item::Stone, 1))); + } + + #[test] + fn right_mouse_paint() { + let mut window = window(); + window + .set_item(0, Some(ItemStack::new(Item::Stone, 64))) + .unwrap(); + window + .set_item(4, Some(ItemStack::new(Item::Stone, 3))) + .unwrap(); + window.left_click(0).unwrap(); + + window.begin_right_mouse_paint(); + window.add_paint_slot(4).unwrap(); + window.add_paint_slot(5).unwrap(); + window.end_paint().unwrap(); + + assert_eq!( + window.item(4).unwrap().as_ref(), + Some(&ItemStack::new(Item::Stone, 4)) + ); + assert_eq!( + window.item(5).unwrap().as_ref(), + Some(&ItemStack::new(Item::Stone, 1)) + ); + assert_eq!(window.cursor_item, Some(ItemStack::new(Item::Stone, 62))); + } + + fn window() -> Window { + Window::new(BackingWindow::Player { + player: Inventory::player(), + }) + } +} diff --git a/crates/common/src/world.rs b/crates/common/src/world.rs new file mode 100644 index 000000000..173870c92 --- /dev/null +++ b/crates/common/src/world.rs @@ -0,0 +1,239 @@ +use ahash::{AHashMap, AHashSet}; +use base::{BlockPosition, Chunk, ChunkPosition, CHUNK_HEIGHT}; +use blocks::BlockId; +use ecs::Ecs; +use parking_lot::{RwLock, RwLockReadGuard, RwLockWriteGuard}; +use std::sync::Arc; + +use crate::{ + events::ChunkLoadEvent, + world_source::{null::NullWorldSource, ChunkLoadResult, WorldSource}, +}; + +/// Stores all blocks and chunks in a world, +/// along with global world data like weather, time, +/// and the [`WorldSource`](crate::world_source::WorldSource). +/// +/// NB: _not_ what most Rust ECSs call "world." +/// This does not store entities; it only contains blocks. +pub struct World { + chunk_map: ChunkMap, + world_source: Box, + loading_chunks: AHashSet, + canceled_chunk_loads: AHashSet, +} + +impl Default for World { + fn default() -> Self { + Self { + chunk_map: ChunkMap::new(), + world_source: Box::new(NullWorldSource::default()), + loading_chunks: AHashSet::new(), + canceled_chunk_loads: AHashSet::new(), + } + } +} + +impl World { + pub fn new() -> Self { + Self::default() + } + + /// Creates a `World` from a `WorldSource` for loading chunks. + pub fn with_source(world_source: impl WorldSource + 'static) -> Self { + Self { + world_source: Box::new(world_source), + ..Default::default() + } + } + + /// Queues the given chunk to be loaded. + pub fn queue_chunk_load(&mut self, pos: ChunkPosition) { + self.loading_chunks.insert(pos); + self.world_source.queue_load(pos); + } + + /// Loads any chunks that have been loaded asynchronously + /// after a call to [`queue_chunk_load`]. + pub fn load_chunks(&mut self, ecs: &mut Ecs) { + while let Some(loaded) = self.world_source.poll_loaded_chunk() { + self.loading_chunks.remove(&loaded.pos); + if self.canceled_chunk_loads.remove(&loaded.pos) { + continue; + } + + let chunk = match loaded.result { + ChunkLoadResult::Missing => { + log::debug!( + "Chunk {:?} is missing; using default empty chunk", + loaded.pos + ); + Chunk::new(loaded.pos) + } + ChunkLoadResult::Error(e) => { + log::error!("Failed to load chunk {:?}: {:?}", loaded.pos, e); + continue; + } + ChunkLoadResult::Loaded { chunk } => chunk, + }; + self.chunk_map.insert_chunk(chunk); + ecs.insert_event(ChunkLoadEvent { + chunk: Arc::clone(&self.chunk_map.0[&loaded.pos]), + position: loaded.pos, + }); + log::trace!("Loaded chunk {:?}", loaded.pos); + } + } + + /// Unloads the given chunk. + pub fn unload_chunk(&mut self, pos: ChunkPosition) { + self.chunk_map.remove_chunk(pos); + if self.is_chunk_loading(pos) { + self.canceled_chunk_loads.insert(pos); + } + + log::trace!("Unloaded chunk {:?}", pos); + } + + /// Returns whether the given chunk is loaded. + pub fn is_chunk_loaded(&self, pos: ChunkPosition) -> bool { + self.chunk_map.0.contains_key(&pos) + } + + /// Returns whether the given chunk is queued to be loaded. + pub fn is_chunk_loading(&self, pos: ChunkPosition) -> bool { + self.loading_chunks.contains(&pos) + } + + /// Sets the block at the given position. + /// + /// Returns `true` if the block was set, or `false` + /// if its chunk was not loaded or the coordinates + /// are out of bounds and thus no operation + /// was performed. + pub fn set_block_at(&self, pos: BlockPosition, block: BlockId) -> bool { + self.chunk_map.set_block_at(pos, block) + } + + /// Retrieves the block at the specified + /// location. If the chunk in which the block + /// exists is not loaded or the coordinates + /// are out of bounds, `None` is returned. + pub fn block_at(&self, pos: BlockPosition) -> Option { + self.chunk_map.block_at(pos) + } + + /// Returns the chunk map. + pub fn chunk_map(&self) -> &ChunkMap { + &self.chunk_map + } + + /// Mutably gets the chunk map. + pub fn chunk_map_mut(&mut self) -> &mut ChunkMap { + &mut self.chunk_map + } +} + +pub type ChunkMapInner = AHashMap>>; + +/// This struct stores all the chunks on the server, +/// so it allows access to blocks and lighting data. +/// +/// Chunks are internally wrapped in `Arc`, +/// allowing multiple systems to access different parts +/// of the world in parallel. Mutable access to this +/// type is only required for inserting and removing +/// chunks. +#[derive(Default)] +pub struct ChunkMap(ChunkMapInner); + +impl ChunkMap { + /// Creates a new, empty world. + pub fn new() -> Self { + Self::default() + } + + /// Retrieves a handle to the chunk at the given + /// position, or `None` if it is not loaded. + pub fn chunk_at(&self, pos: ChunkPosition) -> Option> { + self.0.get(&pos).map(|lock| lock.read()) + } + + /// Retrieves a handle to the chunk at the given + /// position, or `None` if it is not loaded. + pub fn chunk_at_mut(&self, pos: ChunkPosition) -> Option> { + self.0.get(&pos).map(|lock| lock.write()) + } + + /// Returns an `Arc>` at the given position. + pub fn chunk_handle_at(&self, pos: ChunkPosition) -> Option>> { + self.0.get(&pos).map(Arc::clone) + } + + pub fn block_at(&self, pos: BlockPosition) -> Option { + check_coords(pos)?; + let (x, y, z) = chunk_relative_pos(pos); + self.chunk_at(pos.into()) + .map(|chunk| chunk.block_at(x, y, z)) + .flatten() + } + + pub fn set_block_at(&self, pos: BlockPosition, block: BlockId) -> bool { + if check_coords(pos).is_none() { + return false; + } + let (x, y, z) = chunk_relative_pos(pos); + + self.chunk_at_mut(pos.into()) + .map(|mut chunk| chunk.set_block_at(x, y, z, block)) + .is_some() + } + + /// Returns an iterator over chunks. + pub fn iter_chunks(&self) -> impl IntoIterator>> { + self.0.values() + } + + /// Inserts a new chunk into the chunk map. + pub fn insert_chunk(&mut self, chunk: Chunk) { + self.0 + .insert(chunk.position(), Arc::new(RwLock::new(chunk))); + } + + /// Removes the chunk at the given position, returning `true` if it existed. + pub fn remove_chunk(&mut self, pos: ChunkPosition) -> bool { + self.0.remove(&pos).is_some() + } +} + +fn check_coords(pos: BlockPosition) -> Option<()> { + if pos.y >= 0 && pos.y < CHUNK_HEIGHT as i32 { + Some(()) + } else { + None + } +} + +fn chunk_relative_pos(block_pos: BlockPosition) -> (usize, usize, usize) { + ( + block_pos.x as usize & 0xf, + block_pos.y as usize, + block_pos.z as usize & 0xf, + ) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn world_out_of_bounds() { + let mut world = World::new(); + world + .chunk_map_mut() + .insert_chunk(Chunk::new(ChunkPosition::new(0, 0))); + + assert!(world.block_at(BlockPosition::new(0, -1, 0)).is_none()); + assert!(world.block_at(BlockPosition::new(0, 0, 0)).is_some()); + } +} diff --git a/crates/common/src/world_source.rs b/crates/common/src/world_source.rs new file mode 100644 index 000000000..1dda51b20 --- /dev/null +++ b/crates/common/src/world_source.rs @@ -0,0 +1,84 @@ +use base::{Chunk, ChunkPosition}; + +pub mod flat; +pub mod null; +pub mod region; + +/// A chunk loaded from a [`WorldSource`]. +pub struct LoadedChunk { + pub pos: ChunkPosition, + pub result: ChunkLoadResult, +} + +#[derive(Debug)] +#[allow(clippy::large_enum_variant)] +pub enum ChunkLoadResult { + /// The chunk does not exist in this source. + Missing, + /// An error occurred while loading the chunk. + Error(anyhow::Error), + /// Successfully loaded the chunk. + Loaded { chunk: Chunk }, +} + +/// Provides methods to load chunks, entities, and global world data. +pub trait WorldSource: 'static { + /// Enqueues the chunk at `pos` to be loaded. + /// A future call to `poll_loaded_chunk` should + /// return this chunk. + fn queue_load(&mut self, pos: ChunkPosition); + + /// Polls for the next loaded chunk. Should not block + /// + /// The order in which chunks are loaded is not defined. In other + /// words, this method does not need to yield chunks in the + /// same order they were queued for loading. + fn poll_loaded_chunk(&mut self) -> Option; + + /// Creates a `WorldSource` that falls back to `fallback` + /// if chunks in `self` are missing or corrupt. + fn with_fallback(self, fallback: impl WorldSource) -> FallbackWorldSource + where + Self: Sized, + { + FallbackWorldSource { + first: Box::new(self), + fallback: Box::new(fallback), + } + } +} + +/// `WorldSource` wrapping two world sources. Falls back +/// to the second source if the first one is missing a chunk. +pub struct FallbackWorldSource { + first: Box, + fallback: Box, +} + +impl WorldSource for FallbackWorldSource { + fn queue_load(&mut self, pos: ChunkPosition) { + self.first.queue_load(pos); + } + + fn poll_loaded_chunk(&mut self) -> Option { + self.first + .poll_loaded_chunk() + .map(|chunk| { + if matches!( + &chunk.result, + ChunkLoadResult::Error(_) | ChunkLoadResult::Missing + ) { + self.fallback.queue_load(chunk.pos); + log::trace!( + "Chunk load falling back (failure cause: {:?})", + chunk.result + ); + None + } else { + Some(chunk) + } + }) + .flatten() + .or_else(|| self.fallback.poll_loaded_chunk()) + } +} diff --git a/crates/common/src/world_source/flat.rs b/crates/common/src/world_source/flat.rs new file mode 100644 index 000000000..5eb7bdefe --- /dev/null +++ b/crates/common/src/world_source/flat.rs @@ -0,0 +1,54 @@ +use base::{BlockId, Chunk, ChunkPosition, CHUNK_WIDTH}; + +use super::{ChunkLoadResult, LoadedChunk, WorldSource}; + +/// A world source used for debugging that emits +/// only flat chunks and does no IO. +pub struct FlatWorldSource { + archetype: Chunk, + loaded: Vec, +} + +impl Default for FlatWorldSource { + fn default() -> Self { + Self::new() + } +} + +impl FlatWorldSource { + pub fn new() -> Self { + let mut archetype = Chunk::new(ChunkPosition::new(0, 0)); + for y in 0..64 { + for z in 0..CHUNK_WIDTH { + for x in 0..CHUNK_WIDTH { + let block = if y == 63 { + BlockId::grass_block() + } else { + BlockId::stone() + }; + archetype.set_block_at(x, y, z, block); + } + } + } + + Self { + archetype, + loaded: Vec::new(), + } + } +} + +impl WorldSource for FlatWorldSource { + fn queue_load(&mut self, pos: base::ChunkPosition) { + let mut chunk = self.archetype.clone(); + chunk.set_position(pos); + self.loaded.push(LoadedChunk { + pos, + result: ChunkLoadResult::Loaded { chunk }, + }); + } + + fn poll_loaded_chunk(&mut self) -> Option { + self.loaded.pop() + } +} diff --git a/crates/common/src/world_source/null.rs b/crates/common/src/world_source/null.rs new file mode 100644 index 000000000..8a3a929d6 --- /dev/null +++ b/crates/common/src/world_source/null.rs @@ -0,0 +1,22 @@ +use base::ChunkPosition; + +use super::{ChunkLoadResult, LoadedChunk, WorldSource}; + +/// A world source that always yields `ChunkLoadResult::Missing`. +#[derive(Default)] +pub struct NullWorldSource { + loaded: Vec, +} + +impl WorldSource for NullWorldSource { + fn queue_load(&mut self, pos: ChunkPosition) { + self.loaded.push(pos); + } + + fn poll_loaded_chunk(&mut self) -> Option { + self.loaded.pop().map(|pos| LoadedChunk { + pos, + result: ChunkLoadResult::Missing, + }) + } +} diff --git a/crates/common/src/world_source/region.rs b/crates/common/src/world_source/region.rs new file mode 100644 index 000000000..4f1ec64e6 --- /dev/null +++ b/crates/common/src/world_source/region.rs @@ -0,0 +1,170 @@ +use std::{ + collections::hash_map::Entry, + path::PathBuf, + time::{Duration, Instant}, +}; + +use ahash::AHashMap; +use base::{ + anvil::region::{RegionHandle, RegionPosition}, + ChunkPosition, +}; +use flume::{Receiver, Sender}; + +use super::{ChunkLoadResult, LoadedChunk, WorldSource}; + +/// World source loading from a vanilla (Anvil) world. +pub struct RegionWorldSource { + request_sender: Sender, + result_receiver: Receiver, +} + +impl RegionWorldSource { + pub fn new(world_dir: impl Into) -> Self { + let (request_sender, request_receiver) = flume::unbounded(); + let (worker, result_receiver) = Worker::new(world_dir.into(), request_receiver); + + worker.start(); + + Self { + request_sender, + result_receiver, + } + } +} + +impl WorldSource for RegionWorldSource { + fn queue_load(&mut self, pos: ChunkPosition) { + self.request_sender + .send(pos) + .expect("chunk worker panicked"); + } + + fn poll_loaded_chunk(&mut self) -> Option { + self.result_receiver.try_recv().ok() + } +} + +/// Duration to keep a region file open when not in use. +const CACHE_TIME: Duration = Duration::from_secs(60); + +struct OpenRegionFile { + handle: RegionHandle, + last_used: Instant, +} + +impl OpenRegionFile { + pub fn new(handle: RegionHandle) -> Self { + Self { + handle, + last_used: Instant::now(), + } + } + + pub fn should_close(&self) -> bool { + self.last_used.elapsed() >= CACHE_TIME + } +} + +struct Worker { + request_receiver: Receiver, + result_sender: Sender, + world_dir: PathBuf, + region_files: AHashMap, + last_cache_update: Instant, +} + +impl Worker { + pub fn new( + world_dir: PathBuf, + request_receiver: Receiver, + ) -> (Self, Receiver) { + let (result_sender, result_receiver) = flume::bounded(256); + ( + Self { + request_receiver, + result_sender, + world_dir, + region_files: AHashMap::new(), + last_cache_update: Instant::now(), + }, + result_receiver, + ) + } + + pub fn start(self) { + std::thread::Builder::new() + .name("chunk_worker".to_owned()) + .spawn(move || self.run()) + .expect("failed to create chunk worker thread"); + } + + fn run(mut self) { + log::info!("Chunk worker started"); + loop { + match self.request_receiver.recv_timeout(Duration::from_secs(30)) { + Ok(pos) => self.load_chunk(pos), + Err(flume::RecvTimeoutError::Timeout) => (), + Err(flume::RecvTimeoutError::Disconnected) => { + log::info!("Chunk worker shutting down"); + return; + } + } + self.update_cache(); + } + } + + fn load_chunk(&mut self, pos: ChunkPosition) { + let result = self.get_chunk_load_result(pos); + let _ = self.result_sender.send(LoadedChunk { pos, result }); + } + + fn get_chunk_load_result(&mut self, pos: ChunkPosition) -> ChunkLoadResult { + let region = RegionPosition::from_chunk(pos); + let file = match self.region_file_handle(region) { + Some(file) => file, + None => return ChunkLoadResult::Missing, + }; + + let chunk = match file.handle.load_chunk(pos) { + Ok((chunk, _, _)) => chunk, + Err(e) => return ChunkLoadResult::Error(e.into()), + }; + + file.last_used = Instant::now(); + + ChunkLoadResult::Loaded { chunk } + } + + fn region_file_handle(&mut self, region: RegionPosition) -> Option<&mut OpenRegionFile> { + match self.region_files.entry(region) { + Entry::Occupied(e) => Some(e.into_mut()), + Entry::Vacant(e) => { + let handle = base::anvil::region::load_region(&self.world_dir, region); + if let Ok(handle) = handle { + Some(e.insert(OpenRegionFile::new(handle))) + } else { + None + } + } + } + } + + fn update_cache(&mut self) { + if self.last_cache_update.elapsed() >= CACHE_TIME { + let initial_len = self.region_files.len(); + + self.region_files.retain(|_, file| !file.should_close()); + self.last_cache_update = Instant::now(); + + let num_closed = initial_len - self.region_files.len(); + if num_closed != 0 { + log::debug!( + "Closed {} region files ({} still open)", + num_closed, + self.region_files.len() + ); + } + } + } +} diff --git a/crates/datapacks/Cargo.toml b/crates/datapacks/Cargo.toml new file mode 100644 index 000000000..771006a0b --- /dev/null +++ b/crates/datapacks/Cargo.toml @@ -0,0 +1,17 @@ +[package] +name = "feather-datapacks" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" + +[dependencies] +serde = { version = "1", features = ["derive"] } +serde_json = "1" +ahash = "0.4" +smartstring = { version = "0.2", features = ["serde"] } + +ureq = { version = "1", default-features = false, features = ["tls"] } +anyhow = "1" +thiserror = "1" +log = "0.4" +zip = "0.5" diff --git a/crates/datapacks/src/id.rs b/crates/datapacks/src/id.rs new file mode 100644 index 000000000..2ce44bf39 --- /dev/null +++ b/crates/datapacks/src/id.rs @@ -0,0 +1,213 @@ +use crate::DEFAULT_NAMESPACE; +use serde::{de, Deserialize, Serialize}; +use smartstring::{LazyCompact, SmartString}; +use std::{ + fmt::{self, Display}, + str::FromStr, +}; + +/// A namespaced identifier, also known as a "resource location" +/// in Forge. See https://minecraft.gamepedia.com/Namespaced_ID. +/// +/// Namespaced IDs can be parsed using the `FromStr` implementation, +/// and they can be formatted using the `Display` impl or by calling `to_string()`. +#[derive(Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub struct NamespacedId { + // Smart (inlineable) strings are used to reduce heap + // fragmentation and memory usage. + namespace: SmartString, + name: SmartString, +} + +impl NamespacedId { + /// Returns the namespace for this ID. + pub fn namespace(&self) -> &str { + &self.namespace + } + + /// Returns the name for this ID. + pub fn name(&self) -> &str { + &self.name + } +} + +/// Error returned when a namespaced ID was formatted incorrectly. +#[derive(Debug, thiserror::Error, PartialEq)] +pub enum ParseError { + #[error("'{0}' is not a valid character for namespaces")] + InvalidNamespaceChar(char), + #[error("'{0}' is not a valid character for namespaced ID names")] + InvalidNameChar(char), +} + +impl FromStr for NamespacedId { + type Err = ParseError; + + fn from_str(s: &str) -> Result { + // Determine the namespace and name components. + let mut parts = s.split(':'); + let part1 = parts.next().unwrap_or(""); + let part2 = parts.next(); + + let (namespace, name) = if let Some(part2) = part2 { + (part1, part2) + } else { + (DEFAULT_NAMESPACE, part1) + }; + + // Ensure that the namespace and name are legal. + validate_namespace(namespace)?; + validate_name(name)?; + + Ok(NamespacedId { + namespace: SmartString::from(namespace), + name: SmartString::from(name), + }) + } +} + +fn validate_namespace(namespace: &str) -> Result<(), ParseError> { + for c in namespace.chars() { + if !is_valid_namespace_char(c) { + return Err(ParseError::InvalidNamespaceChar(c)); + } + } + Ok(()) +} + +fn validate_name(name: &str) -> Result<(), ParseError> { + for c in name.chars() { + if !is_valid_name_char(c) { + return Err(ParseError::InvalidNameChar(c)); + } + } + Ok(()) +} + +fn is_valid_namespace_char(c: char) -> bool { + c.is_ascii_alphanumeric() || c == '_' || c == '-' +} + +fn is_valid_name_char(c: char) -> bool { + // Names can have some extra characters in addition + // to those allowed for namespaces. + is_valid_namespace_char(c) || c == '/' || c == '.' +} + +impl<'de> Deserialize<'de> for NamespacedId { + fn deserialize(deserializer: D) -> Result + where + D: serde::Deserializer<'de>, + { + let string = SmartString::::deserialize(deserializer)?; + + NamespacedId::from_str(&string).map_err(|e| de::Error::custom(e.to_string())) + } +} + +impl Display for NamespacedId { + fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result { + write!(f, "{}:{}", self.namespace, self.name) + } +} + +impl Serialize for NamespacedId { + fn serialize(&self, serializer: S) -> Result + where + S: serde::Serializer, + { + self.to_string().serialize(serializer) + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn legal_namespace_chars() { + for c in ('a'..='z').chain('A'..='Z').chain('0'..='9') { + assert!(is_valid_name_char(c)); + assert!(is_valid_namespace_char(c)); + } + } + + #[test] + fn legal_name_chars() { + for &c in &['/', '.'] { + assert!(is_valid_name_char(c)); + assert!(!is_valid_namespace_char(c)); + } + } + + #[test] + fn illegal_namespace_chars() { + for &c in &['/', '.', '\\', '\n', '@', '%', '?'] { + assert!(!is_valid_namespace_char(c)); + } + } + + #[test] + fn illegal_name_chars() { + for &c in &['\\', '\n', '@', '%', '?'] { + assert!(!is_valid_namespace_char(c)); + } + } + + #[test] + fn parse_id_with_namespace() { + let id = NamespacedId::from_str("namespace-caelunshun_66:folder/file.ext").unwrap(); + assert_eq!(&id.name, "folder/file.ext"); + assert_eq!(&id.namespace, "namespace-caelunshun_66"); + } + + #[test] + fn parse_id_with_default_namespace() { + let id = NamespacedId::from_str("acacia_leaves-2").unwrap(); + assert_eq!(&id.name, "acacia_leaves-2"); + assert_eq!(&id.namespace, DEFAULT_NAMESPACE); + } + + #[test] + fn parse_empty_id() { + let id = NamespacedId::from_str("").unwrap(); + assert_eq!(id.name(), ""); + assert_eq!(id.namespace(), DEFAULT_NAMESPACE); + } + + #[test] + fn parse_id_with_invalid_namespace() { + assert_eq!( + NamespacedId::from_str("ewhi@iho:name"), + Err(ParseError::InvalidNamespaceChar('@')) + ); + assert_eq!( + NamespacedId::from_str("dir1/dir2:file"), + Err(ParseError::InvalidNamespaceChar('/')) + ); + } + + #[test] + fn parse_id_with_invalid_name() { + assert_eq!( + NamespacedId::from_str("name^"), + Err(ParseError::InvalidNameChar('^')) + ); + assert_eq!( + NamespacedId::from_str("spaces galore"), + Err(ParseError::InvalidNameChar(' ')) + ); + } + + #[test] + fn formatting() { + let id = NamespacedId::from_str("namespace:name").unwrap(); + assert_eq!(id.to_string(), "namespace:name"); + } + + #[test] + fn formatting_default_namespace() { + let id = NamespacedId::from_str("name").unwrap(); + assert_eq!(id.to_string(), "minecraft:name"); + } +} diff --git a/crates/datapacks/src/lib.rs b/crates/datapacks/src/lib.rs new file mode 100644 index 000000000..a0c705819 --- /dev/null +++ b/crates/datapacks/src/lib.rs @@ -0,0 +1,35 @@ +//! Data pack implementation for Feather. +//! +//! Data packs can register loot tables, recipes, advancements, functions, +//! etc. This implementation aims to be compatible with vanilla data packs. +//! +//! This crate also downloads vanilla JARs and assets +//! at startup; see `download_vanilla_assets`. + +use ahash::AHashMap; +use serde::Deserialize; +use smartstring::{LazyCompact, SmartString}; + +mod vanilla; +pub use vanilla::download_vanilla_assets; + +mod id; +pub use id::NamespacedId; + +/// The default namespace for resource locations (NamespacedIds). +pub const DEFAULT_NAMESPACE: &str = "minecraft"; + +/// The pack.mcmeta file at the root of a datapack. +/// +/// Formatted with JSON. +#[derive(Debug, Deserialize)] +pub struct PackMeta { + pub pack_format: i32, + pub description: String, +} + +/// Stores all loaded data packs and their assets. +pub struct Datapacks { + /// The metadata of loaded packs. Keyed by the datapack name. + _meta: AHashMap, PackMeta>, +} diff --git a/crates/datapacks/src/vanilla.rs b/crates/datapacks/src/vanilla.rs new file mode 100644 index 000000000..566cd0f7f --- /dev/null +++ b/crates/datapacks/src/vanilla.rs @@ -0,0 +1,85 @@ +use anyhow::Context; +use std::{ + fs::{self, File}, + io, + path::Path, + time::Duration, +}; +use zip::ZipArchive; + +// Taken from https://www.minecraft.net/en-us/download/server +const JAR_URL: &str = + "https://launcher.mojang.com/v1/objects/c5f6fb23c3876461d46ec380421e42b289789530/server.jar"; +const JAR_NAME: &str = "server-1.16.2.jar"; + +/// Downloads vanilla server/client JARs and assets, used +/// for loot tables, recipes, etc. +/// +/// The server JAR will be placed in `$base/downloaded`. +/// The vanilla datapack will be extracted to `$base/datapacks`. +pub fn download_vanilla_assets(base: &Path) -> anyhow::Result<()> { + let jar = download_jar(base) + .context("failed to download vanilla server JAR") + .context("please make sure you have an Internet connection.")?; + + // NB: JAR files are just glorified ZIP files, so we can use the zip crate + // to process the data. + let mut zip = ZipArchive::new(jar)?; + + create_minecraft_datapack(base, &mut zip)?; + + Ok(()) +} + +fn download_jar(base: &Path) -> anyhow::Result { + log::info!("Downloading vanilla server JAR from {}", JAR_URL); + let mut data = ureq::get(JAR_URL) + .timeout(Duration::from_secs(10)) + .call() + .into_reader(); + + let downloaded_dir = base.join("downloaded"); + fs::create_dir_all(&downloaded_dir)?; + let mut file = File::create(downloaded_dir.join(JAR_NAME))?; + + io::copy(&mut data, &mut file)?; + Ok(file) +} + +fn create_minecraft_datapack(base: &Path, zip: &mut ZipArchive) -> anyhow::Result<()> { + log::info!("Extracting vanilla JAR"); + // We'll create a datapack by copying `pack.mcmeta` and the `data` + // directory to a new datapack called `minecraft`. + let target = base.join("datapacks/minecraft"); + fs::create_dir_all(&target)?; + + // copy pack.mcmeta + { + let mut pack_mcmeta = zip.by_name("pack.mcmeta")?; + let mut pack_mcmeta_target = File::create(target.join("pack.mcmeta"))?; + io::copy(&mut pack_mcmeta, &mut pack_mcmeta_target)?; + } + + // copy data directory + let mut files = Vec::new(); + for file_name in zip.file_names() { + let path = Path::new(file_name); + let path_in_target = fs::canonicalize(target.join(path))?; + if path.starts_with("data") && path_in_target.starts_with(&target) { + files.push((file_name.to_owned(), path_in_target)); + } + } + for (file_name, path_in_target) in files { + let mut reader = zip.by_name(&file_name)?; + + if let Some(parent) = path_in_target.parent() { + fs::create_dir_all(parent)?; + } + let mut writer = File::create(&path_in_target)?; + + io::copy(&mut reader, &mut writer)?; + log::debug!("Extracted {}", file_name); + } + + Ok(()) +} diff --git a/crates/ecs/Cargo.toml b/crates/ecs/Cargo.toml new file mode 100644 index 000000000..58a904946 --- /dev/null +++ b/crates/ecs/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "feather-ecs" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" + +[dependencies] +utils = { path = "../utils", package = "feather-utils" } + +hecs = { git = "https://github.com/feather-rs/feather-hecs" } +anyhow = "1" +thiserror = "1" +log = "0.4" +ahash = "0.7" diff --git a/crates/ecs/src/change.rs b/crates/ecs/src/change.rs new file mode 100644 index 000000000..cf3d71161 --- /dev/null +++ b/crates/ecs/src/change.rs @@ -0,0 +1,54 @@ +use std::{any::TypeId, collections::VecDeque}; + +use ahash::AHashMap; +use hecs::{Component, DynamicBundle, Entity}; + +/// Tracks changes made to certain components. +#[derive(Default)] +pub struct ChangeTracker { + registries: AHashMap, +} + +impl ChangeTracker { + pub fn track_component(&mut self) { + self.registries + .insert(TypeId::of::(), ChangeRegistry::default()); + } + + pub fn on_insert(&mut self, entity: Entity, components: &impl DynamicBundle) { + components.with_ids(|typs| { + for ty in typs { + let registry = self.registries.get_mut(ty); + if let Some(registry) = registry { + registry.mark_changed(entity); + } + } + }); + } + + pub fn iter_changed(&self) -> impl Iterator + '_ { + self.registries.get(&TypeId::of::()) + .unwrap_or_else(|| panic!("Components of type {} are not tracked for changes. Call `Ecs::track_component` to enable change tracking.", std::any::type_name::())) + .changed_entities + .iter() + .copied() + } +} + +#[derive(Default)] +struct ChangeRegistry { + changed_entities: VecDeque, +} + +impl ChangeRegistry { + pub fn mark_changed(&mut self, entity: Entity) { + if !self.changed_entities.contains(&entity) { + self.changed_entities.push_back(entity); + } + } + + #[allow(unused)] + pub fn pop(&mut self) { + self.changed_entities.pop_front(); + } +} diff --git a/crates/ecs/src/event.rs b/crates/ecs/src/event.rs new file mode 100644 index 000000000..3ed66c3d3 --- /dev/null +++ b/crates/ecs/src/event.rs @@ -0,0 +1,77 @@ +use hecs::{Component, Entity, World}; + +/// Function to remove an event from the ECS. +type EventRemoveFn = fn(&mut World, Entity); + +fn entity_event_remove_fn() -> EventRemoveFn { + |ecs, entity| { + let _ = ecs.remove_one::(entity); + } +} + +fn event_remove_fn(world: &mut World, event_entity: Entity) { + let _ = world.despawn(event_entity); +} + +/// Maintains a set of events that need to be removed +/// from entities. +/// +/// An event's lifecycle is as follows: +/// 1. The event is added as a component to its entity +/// by calling `Ecs::insert_event`. The system that +/// inserts the event is called the "triggering system." +/// 2. Each system runs and has exactly one chance to observe +/// the event through a query. +/// 3. Immediately before the triggering system runs again, +/// the event is removed from the entity. +#[derive(Default)] +pub struct EventTracker { + /// Events to remove from entities. + /// + /// Indexed by the index of the triggering system. + events: Vec>, + + current_system_index: usize, +} + +impl EventTracker { + /// Adds an entity event to be tracked. + pub fn insert_entity_event(&mut self, entity: Entity) { + let events_vec = self.current_events_vec(); + events_vec.push((entity, entity_event_remove_fn::())) + } + + /// Adds an event to be tracked. + pub fn insert_event(&mut self, event_entity: Entity) { + let events_vec = self.current_events_vec(); + events_vec.push((event_entity, event_remove_fn)); + } + + /// Adds a custom function to run + /// before the current systems executes again. + #[allow(unused)] + pub fn insert_custom(&mut self, entity: Entity, callback: fn(&mut World, Entity)) { + let events_vec = self.current_events_vec(); + events_vec.push((entity, callback)); + } + + pub fn set_current_system_index(&mut self, index: usize) { + self.current_system_index = index; + } + + /// Deletes events that were triggered on the previous tick + /// by the current system. + pub fn remove_old_events(&mut self, world: &mut World) { + let events_vec = self.current_events_vec(); + for (entity, remove_fn) in events_vec.drain(..) { + remove_fn(world, entity); + } + } + + fn current_events_vec(&mut self) -> &mut Vec<(Entity, EventRemoveFn)> { + while self.events.len() <= self.current_system_index { + self.events.push(Vec::new()); + } + &mut self.events[self.current_system_index] + } +} diff --git a/crates/ecs/src/lib.rs b/crates/ecs/src/lib.rs new file mode 100644 index 000000000..bd3c5437c --- /dev/null +++ b/crates/ecs/src/lib.rs @@ -0,0 +1,218 @@ +//! A lightweight ECS wrapper tailored to Feather's needs. +//! +//! This is implemented as a wrapper around the Bevy Engine's fork of the +//! `hecs` crate, but we've made some interface changes: +//! * A system framework has been implemented, with systems written as plain functions and +//! executed sequentialy. +//! * `World` is renamed to `Ecs` so as to avoid conflict with Minecraft's concept of worlds. +//! * We add support for events based on components. +//! +//! This wrapper library exists in case we need additional features in the ECS. If necessary, +//! we can change the backend crate or fork it as needed, without refactoring the rest of the codebase. + +use change::ChangeTracker; +use event::EventTracker; +use hecs::{Component, DynamicBundle, Fetch, Query, World}; + +#[doc(inline)] +pub use hecs::{ + BuiltEntity, ComponentError, DynamicQuery, DynamicQueryTypes, Entity, EntityBuilder, + MissingComponent, NoSuchEntity, QueryBorrow, Ref, RefMut, +}; + +mod system; +pub use system::{GroupBuilder, HasEcs, HasResources, SysResult, SystemExecutor}; + +mod resources; +pub use resources::{ResourceError, Resources}; + +mod change; +mod event; + +/// Stores entities and their components. This is a wrapper +/// around `hecs::World` with a slightly changed interface +/// and support for events. +/// +/// # Events +/// This struct supports _events_ by adding components to entities. +/// For example, the `EntityDamageEvent` is triggered whenever an +/// entity takes damage. What happens next: +/// 1. The system that damaged the entity adds `EntityDamageEvent` as a component +/// to the entity. +/// 2. All systems get a chance to observe that event by calling [`Ecs::query`] +/// using the `EntityDamageEvent` type. +/// 3. When the system that triggered the event runs again, the component +/// is automatically removed. +/// +/// This ensures that each event is observed exactly once by each system. +/// +/// Events can either be associated with an entity—in which case they +/// are added as a component to the entity—or they can be standalone. +/// For example, `BlockChangeEvent` is not related to any specific +/// entity. These standalone events are entities with only one component—the event. +#[derive(Default)] +pub struct Ecs { + world: World, + event_tracker: EventTracker, + change_tracker: ChangeTracker, +} + +impl Ecs { + pub fn new() -> Self { + Self::default() + } + + /// Returns the inner `hecs::World`. Should be used with caution. + pub fn inner(&self) -> &World { + &self.world + } + + pub fn inner_mut(&mut self) -> &mut World { + &mut self.world + } + + /// Spawns an entity with the provided components. + pub fn spawn(&mut self, components: impl DynamicBundle) -> Entity { + let entity = self.world.reserve_entity(); + self.change_tracker.on_insert(entity, &components); + self.world.insert(entity, components).unwrap(); + entity + } + + /// Returns an `EntityRef` for an entity. + pub fn entity(&self, entity: Entity) -> Result { + self.world.entity(entity).map(EntityRef) + } + + /// Gets a component of an entity. + pub fn get(&self, entity: Entity) -> Result, ComponentError> { + self.world.get(entity) + } + + /// Mutably gets a component of an entity. + pub fn get_mut(&self, entity: Entity) -> Result, ComponentError> { + self.world.get_mut(entity) + } + + /// Adds a component to an entity. + /// + /// Do not use this function to add events. Use [`insert_event`] + /// instead. + pub fn insert( + &mut self, + entity: Entity, + component: impl Component, + ) -> Result<(), NoSuchEntity> { + self.world.insert_one(entity, component) + } + + /// Creates an event not related to any entity. Use + /// `insert_entity_event` for events regarding specific + /// entities (`PlayerJoinEvent`, `EntityDamageEvent`, etc...) + pub fn insert_event(&mut self, event: T) { + let entity = self.world.spawn((event,)); + self.event_tracker.insert_event(entity); + } + + /// Adds an event component to an entity and schedules + /// it to be removed immeditately before the current system + /// runs again. Thus, all systems have exactly one chance + /// to observe the event before it is dropped. + pub fn insert_entity_event( + &mut self, + entity: Entity, + event: T, + ) -> Result<(), NoSuchEntity> { + self.insert(entity, event)?; + self.event_tracker.insert_entity_event::(entity); + Ok(()) + } + + /// Removes a component from an entit and returns it. + pub fn remove(&mut self, entity: Entity) -> Result { + self.world.remove_one(entity) + } + + /// Removes an entity from the ECS. + pub fn despawn(&mut self, entity: Entity) -> Result<(), NoSuchEntity> { + self.world.despawn(entity) + } + + /// Defers removing an entity until before the next time this system + /// runs, allowing it to be observed by systems one last time. + pub fn defer_despawn(&mut self, entity: Entity) { + // a bit of a hack - but this will change once + // hecs allows taking out components of a despawned entity + self.event_tracker.insert_event(entity); + } + + /// Returns an iterator over all entities that match a query parameter. + pub fn query(&self) -> QueryBorrow { + self.world.query() + } + + /// Performs a dynamic query. Used for plugins. + pub fn query_dynamic<'q>(&'q self, types: DynamicQueryTypes<'q>) -> DynamicQuery<'q> { + self.world.query_dynamic(types) + } + + /// Sets the index of the currently executing system, + /// used for event tracking. + pub fn set_current_system_index(&mut self, index: usize) { + self.event_tracker.set_current_system_index(index); + } + + /// Should be called before each system runs. + pub fn remove_old_events(&mut self) { + self.event_tracker.remove_old_events(&mut self.world); + } + + /// Enables change tracking for `T` components. + /// + /// Calling this allows using `query_changed` + /// to iterate over entities whose `T` has changed. + pub fn track_component(&mut self) { + self.change_tracker.track_component::() + } + + /// Iterates over entities whose `T` component + /// changed since the previous time the current + /// system was executed. + /// + /// # Panics + /// Panics if `track_component` was not called for `T`. + pub fn for_each_changed( + &self, + mut function: impl FnMut(&T, <::Fetch as Fetch>::Item), + ) { + for entity in self.change_tracker.iter_changed::() { + let mut query = match self.world.query_one::<(&T, Q)>(entity) { + Ok(q) => q, + Err(_) => continue, + }; + let components = query.get(); + if let Some((tracked, components)) = components { + function(tracked, components); + } + } + } +} + +/// Allows access to all components of a single entity. +pub struct EntityRef<'a>(hecs::EntityRef<'a>); + +impl<'a> EntityRef<'a> { + /// Borrows the component of type `T` from this entity. + pub fn get(&self) -> Result, ComponentError> { + self.0 + .get() + .ok_or_else(|| ComponentError::MissingComponent(MissingComponent::new::())) + } + + /// Uniquely borrows the component of type `T` from this entity. + pub fn get_mut(&self) -> Result, ComponentError> { + self.0 + .get_mut() + .ok_or_else(|| ComponentError::MissingComponent(MissingComponent::new::())) + } +} diff --git a/crates/ecs/src/resources.rs b/crates/ecs/src/resources.rs new file mode 100644 index 000000000..ba9dd1278 --- /dev/null +++ b/crates/ecs/src/resources.rs @@ -0,0 +1,74 @@ +use std::{ + any::{type_name, Any, TypeId}, + cell::{Ref, RefCell, RefMut}, +}; + +use ahash::AHashMap; + +#[derive(Debug, thiserror::Error)] +pub enum ResourceError { + #[error("resource of type '{0}' does not exist")] + Missing(&'static str), + #[error( + "resource of type '{0}' borrowed invalidly (mutably and immutable borrow at the same time)" + )] + Borrow(&'static str), +} + +/// Structure storing _resources_, where each +/// resource is identified by its Rust type. At most +/// one resource of each type can exist. +/// +/// Resources are borrow-checked at runtime using `RefCell`. +#[derive(Default)] +pub struct Resources { + resources: AHashMap>>, +} + +impl Resources { + pub fn new() -> Self { + Self::default() + } + + /// Inserts a new resource into this container. + /// + /// Returns the old resource of the same type, if it existed. + pub fn insert(&mut self, resource: T) -> Option { + self.resources + .insert(TypeId::of::(), RefCell::new(Box::new(resource))) + .map(|resource| *resource.into_inner().downcast::().unwrap()) + } + + /// Removes a resource from the container, returning it. + pub fn remove(&mut self) -> Option { + self.resources + .remove(&TypeId::of::()) + .map(|resource| *resource.into_inner().downcast::().unwrap()) + } + + /// Gets the resource of type `T`. + pub fn get(&self) -> Result, ResourceError> { + let resource = self + .resources + .get(&TypeId::of::()) + .ok_or_else(|| ResourceError::Missing(type_name::()))?; + + resource + .try_borrow() + .map_err(|_| ResourceError::Borrow(type_name::())) + .map(|b| Ref::map(b, |b| b.downcast_ref::().unwrap())) + } + + /// Mutably gets the resource of type `T`. + pub fn get_mut(&self) -> Result, ResourceError> { + let resource = self + .resources + .get(&TypeId::of::()) + .ok_or_else(|| ResourceError::Missing(type_name::()))?; + + resource + .try_borrow_mut() + .map_err(|_| ResourceError::Borrow(type_name::())) + .map(|b| RefMut::map(b, |b| b.downcast_mut::().unwrap())) + } +} diff --git a/crates/ecs/src/system.rs b/crates/ecs/src/system.rs new file mode 100644 index 000000000..3fd8aa840 --- /dev/null +++ b/crates/ecs/src/system.rs @@ -0,0 +1,196 @@ +//! System execution, using a simple "systems as functions" model. + +use std::{any::type_name, marker::PhantomData, sync::Arc}; + +use crate::{Ecs, Resources}; + +/// The result type returned by a system function. +/// +/// When a system encounters an internal error, it should return +/// an error instead of panicking. The system executor will then +/// log an error message to the console and attempt to gracefully +/// recover. +/// +/// Examples of internal errors include: +/// * An entity was missing a component which it was expected to have. +/// (For example, all entities have a `Position` component; if an entity +/// is missing it, then that is valid grounds for a system to return an error.) +/// * IO errors +/// +/// That said, these errors should never happen in production. +pub type SysResult = anyhow::Result; + +type SystemFn = Box SysResult>; + +struct System { + function: SystemFn, + name: String, +} + +impl System { + fn from_fn SysResult + 'static>(f: F) -> Self { + Self { + function: Box::new(f), + name: type_name::().to_owned(), + } + } +} + +/// A type containing a `Resources`. +pub trait HasResources { + fn resources(&self) -> Arc; +} + +/// A type containing an `Ecs`. +pub trait HasEcs { + fn ecs(&self) -> &Ecs; + + fn ecs_mut(&mut self) -> &mut Ecs; +} + +impl HasEcs for Ecs { + fn ecs(&self) -> &Ecs { + self + } + + fn ecs_mut(&mut self) -> &mut Ecs { + self + } +} + +/// An executor for systems. +/// +/// This executor contains a sequence of systems, each +/// of which is simply a function taking an `&mut Input`. +/// +/// Systems may belong to _groups_, where each system +/// gets an additional parameter representing the group state. +/// For example, the `Server` group has state contained in the `Server` +/// struct, so all its systems get `Server` as an extra parameter. +/// +/// Systems run sequentially in the order they are added to the executor. +pub struct SystemExecutor { + systems: Vec>, + + is_first_run: bool, +} + +impl Default for SystemExecutor { + fn default() -> Self { + Self { + systems: Vec::new(), + is_first_run: true, + } + } +} + +impl SystemExecutor { + pub fn new() -> Self { + Self::default() + } + + /// Adds a system to the executor. + pub fn add_system( + &mut self, + system: impl FnMut(&mut Input) -> SysResult + 'static, + ) -> &mut Self { + let system = System::from_fn(system); + self.systems.push(system); + self + } + + pub fn add_system_with_name( + &mut self, + system: impl FnMut(&mut Input) -> SysResult + 'static, + name: &str, + ) { + let mut system = System::from_fn(system); + system.name = name.to_owned(); + self.systems.push(system); + } + + /// Begins a group with the provided group state type. + /// + /// The group state must be added to the `resources`. + pub fn group(&mut self) -> GroupBuilder + where + Input: HasResources, + { + GroupBuilder { + systems: self, + _marker: PhantomData, + } + } + + /// Runs all systems in order. + /// + /// Errors are logged using the `log` crate. + pub fn run(&mut self, input: &mut Input) + where + Input: HasEcs, + { + for (i, system) in self.systems.iter_mut().enumerate() { + input.ecs_mut().set_current_system_index(i); + + // For the first cycle, we don't want to clear + // events because some code may have triggered + // events _before_ the first system run. Without + // this check, these events would be cleared before + // any system could observe them. + if !self.is_first_run { + input.ecs_mut().remove_old_events(); + } + + let result = (system.function)(input); + if let Err(e) = result { + log::error!( + "System {} returned an error; this is a bug: {:?}", + system.name, + e + ); + } + } + + self.is_first_run = false; + } + + /// Gets an iterator over system names. + pub fn system_names(&self) -> impl Iterator + '_ { + self.systems.iter().map(|system| system.name.as_str()) + } +} + +/// Builder for a group. Created with [`SystemExecutor::group`]. +pub struct GroupBuilder<'a, Input, State> { + systems: &'a mut SystemExecutor, + _marker: PhantomData, +} + +impl<'a, Input, State> GroupBuilder<'a, Input, State> +where + Input: HasResources + 'static, + State: 'static, +{ + /// Adds a system to the group. + pub fn add_system SysResult + 'static>( + &mut self, + system: F, + ) -> &mut Self { + let function = Self::make_function(system); + self.systems + .add_system_with_name(function, type_name::()); + self + } + + fn make_function( + mut system: impl FnMut(&mut Input, &mut State) -> SysResult + 'static, + ) -> impl FnMut(&mut Input) -> SysResult + 'static { + move |input: &mut Input| { + let resources = input.resources(); + let mut state = resources + .get_mut::() + .expect("missing state resource for group"); + system(input, &mut *state) + } + } +} diff --git a/crates/ecs/tests/events.rs b/crates/ecs/tests/events.rs new file mode 100644 index 000000000..a9d6895ae --- /dev/null +++ b/crates/ecs/tests/events.rs @@ -0,0 +1,74 @@ +#![allow(clippy::unnecessary_wraps)] + +use feather_ecs::{Ecs, HasEcs, SysResult, SystemExecutor}; + +#[derive(Debug, PartialEq, Eq)] +struct Event { + x: i32, +} + +struct Input { + ecs: Ecs, + is_first_run: bool, +} + +impl HasEcs for Input { + fn ecs(&self) -> &Ecs { + &self.ecs + } + + fn ecs_mut(&mut self) -> &mut Ecs { + &mut self.ecs + } +} + +fn pre_system(input: &mut Input) -> SysResult { + if !input.is_first_run { + let mut query = input.ecs.query::<&Event>(); + assert_eq!(query.iter().next().unwrap().1, &Event { x: 10 }); + } + Ok(()) +} + +fn trigger_system(input: &mut Input) -> SysResult { + if input.is_first_run { + let entity = input.ecs.spawn(()); + let event = Event { x: 10 }; + input.ecs.insert_entity_event(entity, event)?; + } else { + let mut query = input.ecs.query::<&Event>(); + assert_eq!(query.iter().next(), None); + } + + Ok(()) +} + +fn post_system(input: &mut Input) -> SysResult { + let mut query = input.ecs.query::<&Event>(); + let next = query.iter().next(); + if input.is_first_run { + assert_eq!(next.unwrap().1, &Event { x: 10 }); + } else { + assert_eq!(next, None); + } + Ok(()) +} + +#[test] +fn events_observed_once() { + let mut systems = SystemExecutor::::new(); + systems + .add_system(pre_system) + .add_system(trigger_system) + .add_system(post_system); + + let mut input = Input { + ecs: Ecs::new(), + is_first_run: true, + }; + systems.run(&mut input); + input.is_first_run = false; + systems.run(&mut input); + + assert_eq!(input.ecs.inner().len(), 1); +} diff --git a/crates/ecs/tests/random_access.rs b/crates/ecs/tests/random_access.rs new file mode 100644 index 000000000..d36f16308 --- /dev/null +++ b/crates/ecs/tests/random_access.rs @@ -0,0 +1,63 @@ +use feather_ecs::{ComponentError, Ecs, EntityBuilder}; + +#[test] +fn add_simple_entity() { + let mut ecs = Ecs::new(); + let entity = ecs.inner_mut().spawn( + EntityBuilder::new() + .add(10i32) + .add(15u32) + .add(usize::MAX) + .build(), + ); + + assert_eq!(*ecs.get::(entity).unwrap(), 10); + assert_eq!(*ecs.get::(entity).unwrap(), 15); + assert_eq!(*ecs.get::(entity).unwrap(), usize::MAX); + + *ecs.get_mut::(entity).unwrap() = 324; + assert_eq!(*ecs.get::(entity).unwrap(), 324); +} + +#[test] +fn add_remove_entities() { + let mut ecs = Ecs::new(); + let entity = ecs + .inner_mut() + .spawn(EntityBuilder::new().add("test").build()); + + assert_eq!(*ecs.get::<&'static str>(entity).unwrap(), "test"); + + ecs.inner_mut().despawn(entity).unwrap(); + + assert!(matches!( + ecs.get::<&'static str>(entity).err(), + Some(ComponentError::NoSuchEntity) + )); + assert!(ecs.inner_mut().despawn(entity).is_err()); +} + +#[test] +fn fine_grained_borrow_checking() { + let mut ecs = Ecs::new(); + let entity1 = ecs + .inner_mut() + .spawn(EntityBuilder::new().add(()).add(16i32).build()); + let entity2 = ecs + .inner_mut() + .spawn(EntityBuilder::new().add(14i32).build()); + + let mut e1 = ecs.get_mut::(entity1).unwrap(); + let e2 = ecs.get_mut::(entity2).unwrap(); + + assert_eq!(*e1, 16); + assert_eq!(*e2, 14); + + *e1 = 12; + assert_eq!(*e1, 12); + + drop(e1); + assert_eq!(*ecs.get_mut::(entity1).unwrap(), 12); + + assert!(ecs.get_mut::<()>(entity1).is_ok()); +} diff --git a/crates/ecs/tests/systems.rs b/crates/ecs/tests/systems.rs new file mode 100644 index 000000000..40e0a449a --- /dev/null +++ b/crates/ecs/tests/systems.rs @@ -0,0 +1,42 @@ +#![allow(clippy::unnecessary_wraps)] + +use feather_ecs::{Ecs, HasEcs, SysResult, SystemExecutor}; + +struct Input { + x: i32, + ecs: Ecs, +} + +impl HasEcs for Input { + fn ecs(&self) -> &Ecs { + &self.ecs + } + + fn ecs_mut(&mut self) -> &mut Ecs { + &mut self.ecs + } +} + +fn system1(input: &mut Input) -> SysResult { + input.x += 10; + Ok(()) +} + +fn system2(input: &mut Input) -> SysResult { + input.x *= 10; + Ok(()) +} + +#[test] +fn systems_are_executed_in_order() { + let mut executor = SystemExecutor::new(); + executor.add_system(system1); + executor.add_system(system2); + + let mut input = Input { + x: 1, + ecs: Ecs::new(), + }; + executor.run(&mut input); + assert_eq!(input.x, 110); +} diff --git a/crates/generated/Cargo.toml b/crates/generated/Cargo.toml new file mode 100644 index 000000000..43cdab0ff --- /dev/null +++ b/crates/generated/Cargo.toml @@ -0,0 +1,11 @@ +[package] +name = "feather-generated" +version = "0.1.0" +edition = "2018" + +[dependencies] +vek = "0.12" +parking_lot = "0.11" +num-traits = "0.2" +num-derive = "0.3" +thiserror = "1" diff --git a/crates/generated/README.md b/crates/generated/README.md new file mode 100644 index 000000000..4c77b4fba --- /dev/null +++ b/crates/generated/README.md @@ -0,0 +1,24 @@ +# feather-generated + +Code generated from JSON files. + +Code generators are written in Python and live in the `generators` directory. The script `regenerate.sh` +can be used to invoke all generators and regenerate all code. + +Running these scripts requires `rustfmt` and Python 3.6 or greater. Note that code generation +is not a mandatory part of the build process, so you only need to regenerate code after modifying +a generator script. + +`feather-generated` currently provides the following: +* Generated `Biome` enum and ID mappings. +* Generated `BlockKind` enum, which is used by `feather-blocks`. +* Generated `EntityKind` enum and ID mappings. +* Slot conversion functions for inventories, including the `Window` struct. +* Items and associated data (ID mappings, tool mappings, durability, ...) +* The `Particle` struct with protocol ID mappings. + +Data is sourced from two sets of files: +* [`PrimsarineJS/minecraft-data`](https://github.com/PrismarineJS/minecraft-data), which provides the majority +of data. These files live in the `minecraft-data` subdirectory, which is a Git submodule. Make sure +that Git submodules are up to date before running the scripts. +* Feather's own data files, which live in the `feather` directory. diff --git a/crates/generated/feather/entity_metadata.json b/crates/generated/feather/entity_metadata.json new file mode 100644 index 000000000..b99c00349 --- /dev/null +++ b/crates/generated/feather/entity_metadata.json @@ -0,0 +1,346 @@ +{ + "entity": { + "fields": { + "bitmask": { + "type": "u8", + "default": 0 + }, + "air_ticks": { + "type": "VarInt", + "default": 300 + }, + "custom_name": { + "type": "OptChat", + "default": "" + }, + "is_custom_name_visible": { + "type": "bool", + "default": false + }, + "is_silent": { + "type": "bool", + "default": false + }, + "is_gravity_disabled": { + "type": "bool", + "default": false + }, + "pose": { + "type": "Pose", + "default": "Pose::Standing" + } + } + }, + "thrown_egg": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + } + } + }, + "thrown_ender_pearl": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + } + } + }, + "thrown_experience_bottle": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + } + } + }, + "thrown_potion": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + } + } + }, + "snowball": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + } + } + }, + "eye_of_ender": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + } + } + }, + "falling_block": { + "extends": "entity", + "fields": { + "spawn_position": { + "type": "BlockPosition", + "default": "BlockPosition::new(0, 0, 0)" + } + } + }, + "area_effect_cloud": { + "extends": "enity", + "fields": { + "radius": { + "type": "f32", + "default": 0.5 + }, + "color": { + "type": "VarInt", + "default": 0 + }, + "is_single_point": { + "type": "bool", + "default": false + }, + "particle": { + "type": "Particle", + "default": "Particle::Effect" + } + } + }, + "fishing_hook": { + "extends": "entity", + "fields": { + "hooked_entity_id": { + "type": "VarInt", + "default": 0 + } + } + }, + "abstract_arrow": { + "extends": "entity", + "fields": { + "bitmask": { + "type": "u8", + "default": 0 + }, + "owner": { + "type": "OptUuid", + "default": "None" + }, + "piercing_level": { + "type": "u8", + "default": 0 + } + } + }, + "arrow": { + "extends": "abstract_arrow", + "fields": { + "color": { + "type": "VarInt", + "default": -1 + } + } + }, + "spectral_arrow": { + "extends": "abstract_arrow" + }, + "thrown_trident": { + "extends": "abstract_arrow", + "fields": { + "loyalty_level": { + "type": "VarInt", + "default": 0 + }, + "has_enchantment_glint": { + "type": "bool", + "default": false + } + } + }, + "boat": { + "extends": "entity", + "fields": { + "time_since_last_hit": { + "type": "VarInt", + "default": 0 + }, + "forward_direction": { + "type": "VarInt", + "default": 1 + }, + "damage_taken": { + "type": "f32", + "default": 0.0 + }, + "wood_kind": { + "type": "WoodKind", + "default": "WoodKind::Oak" + }, + "is_left_paddle_turning": { + "type": "bool", + "default": false + }, + "is_right_paddle_turning": { + "type": "bool", + "default": false + }, + "splash_timer": { + "type": "VarInt", + "default": 0 + } + } + }, + "end_crystal": { + "extends": "entity", + "fields": { + "beam_target": { + "type": "Option", + "default": "None" + }, + "show_bottom": { + "type": "bool", + "default": true + } + } + }, + "dragon_fireball": { + "extends": "entity" + }, + "small_fireball": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + } + } + }, + "fireball": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + } + } + }, + "wither_skull": { + "extends": "entity", + "fields": { + "is_invulnerable": { + "type": "bool", + "default": false + } + } + }, + "firework_rocket": { + "extends": "entity", + "fields": { + "firework": { + "type": "Slot", + "default": "None" + }, + "user_entity_id": { + "type": "Option", + "default": "None" + }, + "is_shot_at_angle": { + "type": "bool", + "default": false + } + } + }, + "item_frame": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + }, + "rotation": { + "type": "VarInt", + "default": 0 + } + } + }, + "item": { + "extends": "entity", + "fields": { + "item": { + "type": "Slot", + "default": "None" + } + } + }, + "living_entity": { + "extends": "entity", + "fields": { + "hand_states": { + "type": "u8", + "default": 0 + }, + "health": { + "type": "f32", + "default": 1.0 + }, + "potion_effect_color": { + "type": "VarInt", + "default": 0 + }, + "is_potion_effect_ambient": { + "type": "bool", + "default": false + }, + "arrows_stuck": { + "type": "VarInt", + "default": 0 + }, + "absorption_health": { + "type": "VarInt", + "default": 0 + }, + "bed_sleeping_in": { + "type": "Option", + "default": "None" + } + } + }, + "player": { + "extends": "living_entity", + "fields": { + "additional_hearts": { + "type": "f32", + "default": 0.0 + }, + "score": { + "type": "VarInt", + "default": 0 + }, + "displayed_skin_parts": { + "type": "u8", + "default": 0 + }, + "main_hand": { + "type": "Hand", + "default": "Hand::Right" + }, + "left_shoulder_parrot": { + "type": "Nbt", + "default": "Nbt::new(())" + }, + "right_shoulder_parrot": { + "type": "Nbt", + "default": "Nbt::new(())" + } + } + } +} \ No newline at end of file diff --git a/crates/generated/feather/inventory.json b/crates/generated/feather/inventory.json new file mode 100644 index 000000000..37c5346a6 --- /dev/null +++ b/crates/generated/feather/inventory.json @@ -0,0 +1,311 @@ +{ + "areas": [ + "storage", + "crafting_output", + "crafting_input", + "helmet", + "chestplate", + "leggings", + "boots", + "hotbar", + "offhand", + + "furnace_ingredient", + "furnace_fuel", + "furnace_output", + + "enchantment_item", + "enchantment_lapis", + + "brewing_bottle", + "brewing_ingredient", + "brewing_blaze_powder", + + "villager_input", + "villager_output", + + "beacon_payment", + + "anvil_input1", + "anvil_input2", + "anvil_output", + + "saddle", + "horse_armor", + "llama_carpet", + + "cartography_map", + "cartography_paper", + "cartography_output", + + "grindstone_input1", + "grindstone_input2", + "grindstone_output", + + "lectern_book", + + "loom_banner", + "loom_dye", + "loom_pattern", + "loom_output", + + "stonecutter_input", + "stonecutter_output" + ], + + "inventories": { + "player": { + "crafting_input": 4, + "crafting_output": 1, + "helmet": 1, + "chestplate": 1, + "leggings": 1, + "boots": 1, + "storage": 27, + "hotbar": 9 + }, + "chest": { + "storage": 27 + }, + "crafting_table": { + "crafting_input": 9, + "crafting_output": 1 + }, + "furnace": { + "furnace_ingredient": 1, + "furnace_fuel": 1, + "furnace_output": 1 + } + }, + + "windows": { + "player": { + "inventories": ["player"], + "slots": { + "player:crafting_output": 1, + "player:crafting_input": 4, + + "player:helmet": 1, + "player:chestplate": 1, + "player:leggings": 1, + "player:boots": 1, + + "player:storage": 27, + "player:hotbar": 9, + "player:offhand": 1 + } + }, + + "generic_9x1": { + "inventories": ["block", "player"], + "slots": { + "block:storage": 9, + "player:storage": 27, + "player:hotbar": 9 + } + }, + "generic_9x2": { + "inventories": ["block", "player"], + "slots": { + "block:storage": 18, + "player:storage": 27, + "player:hotbar": 9 + } + }, + "generic_9x3": { + "inventories": ["block", "player"], + "slots": { + "block:storage": 27, + "player:storage": 27, + "player:hotbar": 9 + } + }, + "generic_9x4": { + "inventories": ["block", "player"], + "slots": { + "block:storage": 36, + "player:storage": 27, + "player:hotbar": 9 + } + }, + "generic_9x5": { + "inventories": ["block", "player"], + "slots": { + "block:storage": 45, + "player:storage": 27, + "player:hotbar": 9 + } + }, + "generic_9x6": { + "inventories": ["left_chest", "right_chest", "player"], + "slots": { + "left_chest:storage": 27, + "right_chest:storage": 27, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "generic_3x3": { + "inventories": ["block", "player"], + "slots": { + "block:storage": 9, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "crafting": { + "inventories": ["crafting_table", "player"], + "slots": { + "crafting_table:crafting_output": 1, + "crafting_table:crafting_input": 9, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "furnace": { + "inventories": ["furnace", "player"], + "slots": { + "furnace:furnace_ingredient": 1, + "furnace:furnace_fuel": 1, + "furnace:furnace_output": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + "blast_furnace": { + "inventories": ["blast_furnace", "player"], + "slots": { + "blast_furnace:furnace_ingredient": 1, + "blast_furnace:furnace_fuel": 1, + "blast_furnace:furnace_output": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + "smoker": { + "inventories": ["smoker", "player"], + "slots": { + "smoker:furnace_ingredient": 1, + "smoker:furnace_fuel": 1, + "smoker:furnace_output": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "enchantment": { + "inventories": ["enchantment_table", "player"], + "slots": { + "enchantment_table:enchantment_item": 1, + "enchantment_table:enchantment_lapis": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "brewing_stand": { + "inventories": ["brewing_stand", "player"], + "slots": { + "brewing_stand:brewing_bottle": 3, + "brewing_stand:brewing_ingredient": 1, + "brewing_stand:brewing_blaze_powder": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "beacon": { + "inventories": ["beacon", "player"], + "slots": { + "beacon:beacon_payment": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "anvil": { + "inventories": ["anvil", "player"], + "slots": { + "anvil:anvil_input1": 1, + "anvil:anvil_input2": 1, + "anvil:anvil_output": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "hopper": { + "inventories": ["hopper", "player"], + "slots": { + "hopper:storage": 4, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "shulker_box": { + "inventories": ["shulker_box", "player"], + "slots": { + "shulker_box:storage": 27, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "cartography": { + "inventories": ["cartography_table", "player"], + "slots": { + "cartography_table:cartography_map": 1, + "cartography_table:cartography_paper": 1, + "cartography_table:cartography_output": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "grindstone": { + "inventories": ["grindstone", "player"], + "slots": { + "grindstone:grindstone_input1": 1, + "grindstone:grindstone_input2": 1, + "grindstone:grindstone_output": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "lectern": { + "inventories": ["lectern", "player"], + "slots": { + "lectern:lectern_book": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "loom": { + "inventories": ["loom", "player"], + "slots": { + "loom:loom_banner": 1, + "loom:loom_dye": 1, + "loom:loom_pattern": 1, + "loom:loom_output": 1, + "player:storage": 27, + "player:hotbar": 9 + } + }, + + "stonecutter": { + "inventories": ["stonecutter", "player"], + "slots": { + "stonecutter:stonecutter_input": 1, + "stonecutter:stonecutter_output": 1, + "player:storage": 27, + "player:hotbar": 9 + } + } + } +} \ No newline at end of file diff --git a/crates/generated/feather/simplified_block.json b/crates/generated/feather/simplified_block.json new file mode 100644 index 000000000..79d97f792 --- /dev/null +++ b/crates/generated/feather/simplified_block.json @@ -0,0 +1,38 @@ +{ + "regexes": { + "air": "^.*air$", + "planks": "^.+_planks$", + "sapling": "^(\\w+|dark_oak)_sapling$", + "log": "^.+_(log|wood)$", + "leaves": ".+_leaves$", + "bed": "^.+_bed$", + "wool": "^.+_wool$", + "flower": "^(allium|poppy|dandelion|\\w+_(orchid|bluet|tulip|daisy))$", + "wooden_pressure_plate": "^(oak|spruce|birch|jungle|acacia|dark_oak)_pressure_plate$", + "stained_glass": "^.+_stained_glass$", + "wooden_trapdoor": "^(oak|spruce|birch|jungle|acacia|dark_oak)_trapdoor$", + "wooden_button": "^(oak|spruce|birch|jungle|acacia|dark_oak)_button$", + "anvil": "^(\\w+_)?anvil$", + "glazed_teracotta": "^.+_glazed_terracotta$", + "teracotta": "^.*terracotta$", + "stained_glass_pane": "^.+_stained_glass_pane$", + "carpet": "^.+_carpet$", + "wall_banner": "^.+_wall_banner$", + "banner": "^.+_banner$", + "slab": "^.+_slab$", + "stairs": "^.+_stairs$", + "fence_gate": "^.+_fence_gate$", + "fence": "^.+_fence$", + "wooden_door": "^(oak|spruce|birch|jungle|acacia|dark_oak)_door$", + "shulker_box": "^.*shulker_box$", + "concrete": "^.+_concrete$", + "concrete_powder": "^.+_concrete_powder$", + "coral": "^.+_coral$", + "coral_block": "^.+_coral_block$", + "coral_fan": "^.+_coral_fan$", + "coral_wall_fan": "^.+_coral_wall_fan$", + "mushroom": "^\\w+_mushroom$", + "wall_sign": "^.+_wall_sign", + "sign": "^.+_sign" + } +} diff --git a/crates/generated/generators/biome.py b/crates/generated/generators/biome.py new file mode 100644 index 000000000..a95fc1bd0 --- /dev/null +++ b/crates/generated/generators/biome.py @@ -0,0 +1,31 @@ +# Generation of the Biome enum. Uses minecraft-data/biomes.json. +import common + +data = common.load_minecraft_json("biomes.json") + +variants = [] +ids = {} +names = {} +display_names = {} +rainfalls = {} +temperatures = {} + +for biome in data: + variant = common.camel_case(biome['name']) + variants.append(variant) + ids[variant] = biome['id'] + names[variant] = biome['name'] + display_names[variant] = biome['displayName'] + rainfalls[variant] = biome['rainfall'] + temperatures[variant] = biome['temperature'] + + +output = common.generate_enum("Biome", variants) +output += common.generate_enum_property("Biome", "id", "u32", ids, True) +output += common.generate_enum_property("Biome", "name", "&str", names, True, "&'static str") +output += common.generate_enum_property("Biome", "display_name", "&str", display_names, True, "&'static str") +output += common.generate_enum_property("Biome", "rainfall", "f32", rainfalls) +output += common.generate_enum_property("Biome", "temperature", "f32", temperatures) + +common.output("src/biome.rs", output) + diff --git a/crates/generated/generators/block.py b/crates/generated/generators/block.py new file mode 100644 index 000000000..88da4f82f --- /dev/null +++ b/crates/generated/generators/block.py @@ -0,0 +1,96 @@ +import common + +data = common.load_minecraft_json("blocks.json") + +# build item ID => item kind index +item_data = common.load_minecraft_json("items.json") +item_kinds_by_id = {} +for item in item_data: + item_kinds_by_id[item['id']] = common.camel_case(item['name']) + +# Build material name => dig multipliers index +material_data = common.load_minecraft_json("materials.json") +material_dig_multipliers = {} +for name, material in material_data.items(): + dig_multipliers = {} + for item_id, multiplier in material.items(): + dig_multipliers[item_kinds_by_id[int(item_id)]] = float(multiplier) + material_dig_multipliers[name] = dig_multipliers + +# Build material dig multipliers constants +material_constants = "" +material_constant_refs = {} +for name, dig_multipliers in material_dig_multipliers.items(): + dm = "" + for item, multiplier in dig_multipliers.items(): + dm += f"(crate::Item::{item}, {multiplier} as f32)," + constant = f"DIG_MULTIPLIERS_{name}" + material_constants += f"#[allow(dead_code, non_upper_case_globals)] const {constant}: &[(crate::Item, f32)] = &[{dm}];" + material_constant_refs[name] = constant + +blocks = [] +ids = {} +names = {} +display_names = {} +hardnesses = {} +diggables = {} +harvest_tools = {} +transparents = {} +light_emissions = {} +light_filters = {} +dig_multipliers = {} +solids = {} + +for block in data: + variant = common.camel_case(block['name']) + blocks.append(variant) + ids[variant] = block['id'] + names[variant] = block['name'] + display_names[variant] = block['displayName'] + hardnesses[variant] = block['hardness'] + if hardnesses[variant] is None: + hardnesses[variant] = 0 + diggables[variant] = block['diggable'] + transparents[variant] = block['transparent'] + light_emissions[variant] = block['emitLight'] + light_filters[variant] = block['filterLight'] + + solids[variant] = block['boundingBox'] == 'block' + + # Dig multipliers + material = block.get('material') + if material_constant_refs.get(material) is not None: + constant = material_constant_refs[material] + dig_multipliers[variant] = f"{constant}" + else: + dig_multipliers[variant] = "&[]" + + # Harvest tools + ht = "" + for tool_id in block.get('harvestTools', {}): + kind = item_kinds_by_id[int(tool_id)] + ht += f"crate::Item::{kind}," + + if len(ht) == 0: + harvest_tools[variant] = 'None' + else: + harvest_tools[variant] = f""" + const TOOLS: &[crate::Item] = &[{ht}]; + Some(TOOLS) + """ + +output = "#[derive(num_derive::FromPrimitive, num_derive::ToPrimitive)]" + common.generate_enum("BlockKind", blocks) +output += common.generate_enum_property("BlockKind", "id", "u32", ids, True) +output += common.generate_enum_property("BlockKind", "name", "&str", names, True, "&'static str") +output += common.generate_enum_property("BlockKind", "display_name", "&str", display_names, True, "&'static str") +output += common.generate_enum_property("BlockKind", "hardness", "f32", hardnesses) +output += common.generate_enum_property("BlockKind", "diggable", "bool", diggables) +output += common.generate_enum_property("BlockKind", "transparent", "bool", transparents) +output += common.generate_enum_property("BlockKind", "light_emission", "u8", light_emissions) +output += common.generate_enum_property("BlockKind", "light_filter", "u8", light_filters) +output += common.generate_enum_property("BlockKind", "solid", "bool", solids) +output += material_constants +output += common.generate_enum_property("BlockKind", "dig_multipliers", "&'static [(crate::Item, f32)]", dig_multipliers) +output += common.generate_enum_property("BlockKind", "harvest_tools", "Option<&'static [crate::Item]>", harvest_tools) + +common.output("src/block.rs", output) diff --git a/crates/generated/generators/common.py b/crates/generated/generators/common.py new file mode 100644 index 000000000..9cf8ca4d1 --- /dev/null +++ b/crates/generated/generators/common.py @@ -0,0 +1,126 @@ +# Common code shared by most code generators. + +import subprocess +import json +from re import split + + +# Runs rustfmt on a file. +def rustfmt(file_path): + subprocess.run(["rustfmt", file_path]) + + +PRISMARINEJS_BASE_PATH = "minecraft-data/data/pc" +FEATHER_BASE_PATH = "feather" + + +# Loads in a JSON file from the minecraft-data file with the given name. +def load_minecraft_json(name, version="1.16.1"): + file = open(f'{PRISMARINEJS_BASE_PATH}/{version}/{name}') + return json.load(file) + + +# Loads in a JSON file from the feather file with the given name. +def load_feather_json(name): + file = open(f"{FEATHER_BASE_PATH}/{name}") + return json.load(file) + + +# Writes Rust source to an output file, then runs rustfmt. +def output(path, content): + f = open(path, "w") + f.write("// This file is @generated. Please do not edit.\n") + f.write(content) + f.close() + + rustfmt(path) + + +# Generate two functions for an enum, one which maps +# the enum value to some property value and one which +# does the reverse (returning an Option). +def generate_enum_property( + enum, # Identifier of the enum (e.g. "Biome") + property_name, # Name of the property + type_, # The property type (e.g. u32, &str + mapping, # Dictionary mapping from enum variant name => property value expression + reverse=False, # Whether to generate the reverse mapping (property value => Self) + return_type=None, + # Property type that should be returned. This is used when the type has a lifetime, such as &'static str + needs_bindings=False, # Whether to bind enum fields using Enum::Variant { .. } +): + if return_type is None: + return_type = type_ + + self_to_prop = "" + prop_to_self = "" + + # Add quotes to strings + if type_ == "&str": + for key, property_value in mapping.items(): + mapping[key] = f'"{property_value}"' + + # If floats are needed, convert integers to floats + if type_ == "f32" or type_ == "f64": + for key, property_value in mapping.items(): + mapping[key] = f'{property_value} as {type_}' + + # Bools are lowercase in Rust + if type_ == "bool": + for key, property_value in mapping.items(): + mapping[key] = str(property_value).lower() + + for variant, property_value in mapping.items(): + fields = "" + if needs_bindings: + fields = "{ .. }" + self_to_prop += f"{enum}::{variant} {fields} => {{ {property_value} }}," + prop_to_self += f"{property_value} => Some({enum}::{variant})," + + result = f""" + #[allow(warnings)] + #[allow(clippy::all)] + impl {enum} {{ + /// Returns the `{property_name}` property of this `{enum}`. + pub fn {property_name}(&self) -> {return_type} {{ + match self {{ + {self_to_prop} + }} + }} + """ + + if reverse: + result += f""" + /// Gets a `{enum}` by its `{property_name}`. + pub fn from_{property_name}({property_name}: {type_}) -> Option {{ + match {property_name} {{ + {prop_to_self} + _ => None, + }} + }} + """ + + # closing brace + result += "}" + + return result + + +# Generates an enum definition with the provided variants. +def generate_enum(name, variants): + body = "" + for variant in variants: + body += f"{variant}," + + return f""" + #[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] + pub enum {name} {{ + {body} + }} + """ + + +# Converts a string to UpperCamelCase. +def camel_case(string): + return ''.join(a.capitalize() for a in split('([^a-zA-Z0-9])', string) + if a.isalnum()) diff --git a/crates/generated/generators/entity.py b/crates/generated/generators/entity.py new file mode 100644 index 000000000..8c3f6b67d --- /dev/null +++ b/crates/generated/generators/entity.py @@ -0,0 +1,31 @@ +import common + +data = common.load_minecraft_json("entities.json", "1.16.2") + +entities = [] +ids = {} +internal_ids = {} +names = {} +display_names = {} +bboxes = {} + +for entity in data: + variant = common.camel_case(entity['name']) + entities.append(variant) + ids[variant] = entity['id'] + internal_ids[variant] = entity['internalId'] + names[variant] = entity['name'] + display_names[variant] = entity['displayName'] + + width = entity['width'] + height = entity['height'] + bboxes[variant] = f"vek::Aabb {{ min: vek::Vec3::zero(), max: vek::Vec3::new({width} as f64, {height} as f64, {width} as f64), }}" + +output = common.generate_enum("EntityKind", entities) +output += common.generate_enum_property("EntityKind", "id", "u32", ids, True) +output += common.generate_enum_property("EntityKind", "internal_id", "u32", internal_ids, True) +output += common.generate_enum_property("EntityKind", "name", "&str", names, True, "&'static str") +output += common.generate_enum_property("EntityKind", "display_name", "&str", display_names, True, "&'static str") +output += common.generate_enum_property("EntityKind", "bounding_box", "vek::Aabb", bboxes) + +common.output("src/entity.rs", output) diff --git a/crates/generated/generators/inventory.py b/crates/generated/generators/inventory.py new file mode 100644 index 000000000..0c0965f22 --- /dev/null +++ b/crates/generated/generators/inventory.py @@ -0,0 +1,150 @@ +import common +import collections + +data = common.load_feather_json("inventory.json") + +# Areas +areas = [] +for area in data['areas']: + areas.append(common.camel_case(area)) + +# Windows +windows = [] +names = {} +inventories = {} +area_offsets = collections.OrderedDict() + +for name, window in data['windows'].items(): + variant = common.camel_case(name) + windows.append(variant) + + names[variant] = name + inventories[variant] = window['inventories'] + + ao = collections.OrderedDict() + slot_counter = 0 + for inventory_and_area, number_of_slots in window['slots'].items(): + parts = inventory_and_area.split(":") + inventory = parts[0] + area_in_inventory = parts[1] + ao[(inventory, area_in_inventory)] = (slot_counter, number_of_slots) + slot_counter += number_of_slots + area_offsets[variant] = ao + +output = common.generate_enum("Area", areas) + +window = "#[derive(Debug, Clone)] pub enum Window {" +index_to_slot = "#[allow(unused_comparisons)] pub fn index_to_slot(&self, index: usize) -> Option<(&crate::Inventory, Area, usize)> { match self {" +slot_to_index = "pub fn slot_to_index(&self, inventory: &crate::Inventory, area: Area, slot: usize) -> Option { match self {" + +for variant in windows: + window += f"{variant} {{" + for inventory in inventories[variant]: + window += f"{inventory}: crate::Inventory," + window += "}," + + match_pattern = f"Window::{variant} {{" + for inventory in inventories[variant]: + match_pattern += f"{inventory}," + match_pattern += "}" + + index_to_slot += f"{match_pattern} => {{" + first = True + for (inventory, area_in_inventory), (slot_offset, number_of_slots) in area_offsets[variant].items(): + if not first: + index_to_slot += "else" + first = False + + area_in_inventory = common.camel_case(area_in_inventory) + max_slot = slot_offset + number_of_slots + index_to_slot += f""" + if index >= {slot_offset} && index < {max_slot} {{ + let area = Area::{area_in_inventory}; + let slot = index - {slot_offset}; + Some(({inventory}, area, slot)) + }} + """ + index_to_slot += "else { None } }," + + slot_to_index += f"{match_pattern} => {{" + first = True + for (inventory, area_in_inventory), (slot_offset, number_of_slots) in area_offsets[variant].items(): + if not first: + slot_to_index += "else " + first = False + + area_in_inventory = common.camel_case(area_in_inventory) + slot_to_index += f"if area == Area::{area_in_inventory} && {inventory}.ptr_eq(inventory) {{ Some(slot + {slot_offset}) }}" + + slot_to_index += "else { None } }," + + +window += "}" +index_to_slot += "} }" +slot_to_index += "} }" + +output += window +output += f"impl Window {{ {index_to_slot} {slot_to_index} }}" +output += common.generate_enum_property("Window", "name", "&str", names, False, "&'static str", True) + +# Inventories +inventories = [] +for name, areas in data['inventories'].items(): + variant = common.camel_case(name) + inv = { + 'name': name, + 'variant': variant, + 'areas': areas, + } + inventories.append(inv) + + +output += "#[derive(Debug, Clone)] pub enum InventoryBacking {" +for inventory in inventories: + variant = inventory['variant'] + output += f"{variant} {{" + for area_name, area_size in inventory['areas'].items(): + output += f"{area_name}: [T; {area_size}]," + output += "}," +output += "}" + +get_area_fn = "pub fn area_slice(&self, area: Area) -> Option<&[T]> { match self {" +get_areas_fn = "pub fn areas(&self) -> &'static [Area] { match self {" +constructor_fns = "" +inventory_constructor_fns = "" + +for inventory in inventories: + name = inventory['name'] + variant = inventory['variant'] + areas = inventory['areas'] + match_arm = f"InventoryBacking::{variant} {{" + for area in areas: + match_arm += f"{area}," + match_arm += "}" + + get_area_fn += f"{match_arm} => match area {{" + for area in areas: + area_variant = common.camel_case(area) + get_area_fn += f"Area::{area_variant} => Some({area}.as_ref())," + get_area_fn += "_ => None }," + + get_areas_fn += f"\nInventoryBacking::{variant} {{ .. }} => {{static AREAS: [Area; {len(areas)}] = [" + for area in areas: + get_areas_fn += f"Area::{common.camel_case(area)}," + get_areas_fn += f"];\n &AREAS }}," + + constructor_fn = f"pub fn {name}() -> Self where T: Default {{ InventoryBacking::{variant} {{" + for area in areas: + constructor_fn += f"{area}: Default::default()," + + constructor_fn += "} }\n" + constructor_fns += constructor_fn + + inventory_constructor_fns += f"pub fn {name}() -> Self {{ Self {{ backing: std::sync::Arc::new(InventoryBacking::{name}()) }} }}" + +get_area_fn += "} }" +get_areas_fn += "} }" +output += f"impl InventoryBacking {{ {get_area_fn} {get_areas_fn} {constructor_fns} }}" +output += f"impl crate::Inventory {{ {inventory_constructor_fns} }}" + +common.output("src/inventory.rs", output) diff --git a/crates/generated/generators/item.py b/crates/generated/generators/item.py new file mode 100644 index 000000000..207aa8554 --- /dev/null +++ b/crates/generated/generators/item.py @@ -0,0 +1,33 @@ +import common + +data = common.load_minecraft_json("items.json", "1.16.2") + +items = [] +ids = {} +names = {} +display_names = {} +stack_sizes = {} +durabilities = {} + +for item in data: + variant = common.camel_case(item['name']) + items.append(variant) + ids[variant] = item['id'] + names[variant] = item['name'] + display_names[variant] = item['displayName'] + stack_sizes[variant] = item['stackSize'] + + durability = item.get('durability') + if durability is None: + durabilities[variant] = "None" + else: + durabilities[variant] = f"Some({durability})" + +output = common.generate_enum("Item", items) +output += common.generate_enum_property("Item", "id", "u32", ids, True) +output += common.generate_enum_property("Item", "name", "&str", names, True, "&'static str") +output += common.generate_enum_property("Item", "display_name", "&str", display_names, True, "&'static str") +output += common.generate_enum_property("Item", "stack_size", "u32", stack_sizes) +output += common.generate_enum_property("Item", "durability", "Option", durabilities) + +common.output("src/item.rs", output) diff --git a/crates/generated/generators/particle.py b/crates/generated/generators/particle.py new file mode 100644 index 000000000..0bc0fafb2 --- /dev/null +++ b/crates/generated/generators/particle.py @@ -0,0 +1,19 @@ +import common as common + +data = common.load_minecraft_json("particles.json", "1.16") + +particles = [] +ids = {} +names = {} + +for particle in data: + variant = common.camel_case(particle['name']) + particles.append(variant) + ids[variant] = particle['id'] + names[variant] = particle['name'] + +output = common.generate_enum("Particle", particles) +output += common.generate_enum_property("Particle", "id", "u32", ids, True) +output += common.generate_enum_property("Particle", "name", "&str", names, True, "&'static str") + +common.output("src/particle.rs", output) diff --git a/crates/generated/generators/simplified_block.py b/crates/generated/generators/simplified_block.py new file mode 100644 index 000000000..eb94f49f4 --- /dev/null +++ b/crates/generated/generators/simplified_block.py @@ -0,0 +1,35 @@ +import common +import re + +blocks = common.load_minecraft_json("blocks.json") +simplified_block = common.load_feather_json("simplified_block.json") + +regexes = {} +for name, regex in simplified_block['regexes'].items(): + regexes[name] = re.compile(regex) + +variants = [] +mapping = {} +for name in regexes: + variants.append(common.camel_case(name)) + +for block in blocks: + name = block['name'] + block_variant = common.camel_case(name) + + # Detect which SimplifiedBlockKind matches this block. + found = False + for simplified, regex in regexes.items(): + if regex.match(name) is not None: + mapping[block_variant] = "SimplifiedBlockKind::" + common.camel_case(simplified) + found = True + break + + if not found: + # Default to block variant + variants.append(block_variant) + mapping[block_variant] = "SimplifiedBlockKind::" + block_variant + +output = "use crate::BlockKind;" + common.generate_enum("SimplifiedBlockKind", variants) +output += common.generate_enum_property("BlockKind", "simplified_kind", "SimplifiedBlockKind", mapping) +common.output("src/simplified_block.rs", output) diff --git a/crates/generated/minecraft-data b/crates/generated/minecraft-data new file mode 160000 index 000000000..574819802 --- /dev/null +++ b/crates/generated/minecraft-data @@ -0,0 +1 @@ +Subproject commit 574819802a27b70eec7552780879d4cc6ea1cbca diff --git a/crates/generated/regenerate.sh b/crates/generated/regenerate.sh new file mode 100755 index 000000000..e9f24f3e3 --- /dev/null +++ b/crates/generated/regenerate.sh @@ -0,0 +1,15 @@ +generators=( + "biome" + "block" + "entity" + "inventory" + "item" + "particle" + "simplified_block" +) + +for generator in ${generators[@]}; do + python3 generators/$generator.py +done + +cargo fmt diff --git a/crates/generated/src/biome.rs b/crates/generated/src/biome.rs new file mode 100644 index 000000000..2b81c3bc5 --- /dev/null +++ b/crates/generated/src/biome.rs @@ -0,0 +1,783 @@ +// This file is @generated. Please do not edit. + +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum Biome { + Ocean, + Plains, + Desert, + Mountains, + Forest, + Taiga, + Swamp, + River, + NetherWastes, + TheEnd, + FrozenOcean, + FrozenRiver, + SnowyTundra, + SnowyMountains, + MushroomFields, + MushroomFieldShore, + Beach, + DesertHills, + WoodedHills, + TaigaHills, + MountainEdge, + Jungle, + JungleHills, + JungleEdge, + DeepOcean, + StoneShore, + SnowyBeach, + BirchForest, + BirchForestHills, + DarkForest, + SnowyTaiga, + SnowyTaigaHills, + GiantTreeTaiga, + GiantTreeTaigaHills, + WoodedMountains, + Savanna, + SavannaPlateau, + Badlands, + WoodedBadlandsPlateau, + BadlandsPlateau, + SmallEndIslands, + EndMidlands, + EndHighlands, + EndBarrens, + WarmOcean, + LukewarmOcean, + ColdOcean, + DeepWarmOcean, + DeepLukewarmOcean, + DeepColdOcean, + DeepFrozenOcean, + TheVoid, + SunflowerPlains, + DesertLakes, + GravellyMountains, + FlowerForest, + TaigaMountains, + SwampHills, + IceSpikes, + ModifiedJungle, + ModifiedJungleEdge, + TallBirchForest, + TallBirchHills, + DarkForestHills, + SnowyTaigaMountains, + GiantSpruceTaiga, + GiantSpruceTaigaHills, + ModifiedGravellyMountains, + ShatteredSavanna, + ShatteredSavannaPlateau, + ErodedBadlands, + ModifiedWoodedBadlandsPlateau, + ModifiedBadlandsPlateau, + BambooJungle, + BambooJungleHills, + SoulSandValley, + CrimsonForest, + WarpedForest, + BasaltDeltas, +} + +#[allow(warnings)] +#[allow(clippy::all)] +impl Biome { + /// Returns the `id` property of this `Biome`. + pub fn id(&self) -> u32 { + match self { + Biome::Ocean => 0, + Biome::Plains => 1, + Biome::Desert => 2, + Biome::Mountains => 3, + Biome::Forest => 4, + Biome::Taiga => 5, + Biome::Swamp => 6, + Biome::River => 7, + Biome::NetherWastes => 8, + Biome::TheEnd => 9, + Biome::FrozenOcean => 10, + Biome::FrozenRiver => 11, + Biome::SnowyTundra => 12, + Biome::SnowyMountains => 13, + Biome::MushroomFields => 14, + Biome::MushroomFieldShore => 15, + Biome::Beach => 16, + Biome::DesertHills => 17, + Biome::WoodedHills => 18, + Biome::TaigaHills => 19, + Biome::MountainEdge => 20, + Biome::Jungle => 21, + Biome::JungleHills => 22, + Biome::JungleEdge => 23, + Biome::DeepOcean => 24, + Biome::StoneShore => 25, + Biome::SnowyBeach => 26, + Biome::BirchForest => 27, + Biome::BirchForestHills => 28, + Biome::DarkForest => 29, + Biome::SnowyTaiga => 30, + Biome::SnowyTaigaHills => 31, + Biome::GiantTreeTaiga => 32, + Biome::GiantTreeTaigaHills => 33, + Biome::WoodedMountains => 34, + Biome::Savanna => 35, + Biome::SavannaPlateau => 36, + Biome::Badlands => 37, + Biome::WoodedBadlandsPlateau => 38, + Biome::BadlandsPlateau => 39, + Biome::SmallEndIslands => 40, + Biome::EndMidlands => 41, + Biome::EndHighlands => 42, + Biome::EndBarrens => 43, + Biome::WarmOcean => 44, + Biome::LukewarmOcean => 45, + Biome::ColdOcean => 46, + Biome::DeepWarmOcean => 47, + Biome::DeepLukewarmOcean => 48, + Biome::DeepColdOcean => 49, + Biome::DeepFrozenOcean => 50, + Biome::TheVoid => 127, + Biome::SunflowerPlains => 129, + Biome::DesertLakes => 130, + Biome::GravellyMountains => 131, + Biome::FlowerForest => 132, + Biome::TaigaMountains => 133, + Biome::SwampHills => 134, + Biome::IceSpikes => 140, + Biome::ModifiedJungle => 149, + Biome::ModifiedJungleEdge => 151, + Biome::TallBirchForest => 155, + Biome::TallBirchHills => 156, + Biome::DarkForestHills => 157, + Biome::SnowyTaigaMountains => 158, + Biome::GiantSpruceTaiga => 160, + Biome::GiantSpruceTaigaHills => 161, + Biome::ModifiedGravellyMountains => 162, + Biome::ShatteredSavanna => 163, + Biome::ShatteredSavannaPlateau => 164, + Biome::ErodedBadlands => 165, + Biome::ModifiedWoodedBadlandsPlateau => 166, + Biome::ModifiedBadlandsPlateau => 167, + Biome::BambooJungle => 168, + Biome::BambooJungleHills => 169, + Biome::SoulSandValley => 170, + Biome::CrimsonForest => 171, + Biome::WarpedForest => 172, + Biome::BasaltDeltas => 173, + } + } + + /// Gets a `Biome` by its `id`. + pub fn from_id(id: u32) -> Option { + match id { + 0 => Some(Biome::Ocean), + 1 => Some(Biome::Plains), + 2 => Some(Biome::Desert), + 3 => Some(Biome::Mountains), + 4 => Some(Biome::Forest), + 5 => Some(Biome::Taiga), + 6 => Some(Biome::Swamp), + 7 => Some(Biome::River), + 8 => Some(Biome::NetherWastes), + 9 => Some(Biome::TheEnd), + 10 => Some(Biome::FrozenOcean), + 11 => Some(Biome::FrozenRiver), + 12 => Some(Biome::SnowyTundra), + 13 => Some(Biome::SnowyMountains), + 14 => Some(Biome::MushroomFields), + 15 => Some(Biome::MushroomFieldShore), + 16 => Some(Biome::Beach), + 17 => Some(Biome::DesertHills), + 18 => Some(Biome::WoodedHills), + 19 => Some(Biome::TaigaHills), + 20 => Some(Biome::MountainEdge), + 21 => Some(Biome::Jungle), + 22 => Some(Biome::JungleHills), + 23 => Some(Biome::JungleEdge), + 24 => Some(Biome::DeepOcean), + 25 => Some(Biome::StoneShore), + 26 => Some(Biome::SnowyBeach), + 27 => Some(Biome::BirchForest), + 28 => Some(Biome::BirchForestHills), + 29 => Some(Biome::DarkForest), + 30 => Some(Biome::SnowyTaiga), + 31 => Some(Biome::SnowyTaigaHills), + 32 => Some(Biome::GiantTreeTaiga), + 33 => Some(Biome::GiantTreeTaigaHills), + 34 => Some(Biome::WoodedMountains), + 35 => Some(Biome::Savanna), + 36 => Some(Biome::SavannaPlateau), + 37 => Some(Biome::Badlands), + 38 => Some(Biome::WoodedBadlandsPlateau), + 39 => Some(Biome::BadlandsPlateau), + 40 => Some(Biome::SmallEndIslands), + 41 => Some(Biome::EndMidlands), + 42 => Some(Biome::EndHighlands), + 43 => Some(Biome::EndBarrens), + 44 => Some(Biome::WarmOcean), + 45 => Some(Biome::LukewarmOcean), + 46 => Some(Biome::ColdOcean), + 47 => Some(Biome::DeepWarmOcean), + 48 => Some(Biome::DeepLukewarmOcean), + 49 => Some(Biome::DeepColdOcean), + 50 => Some(Biome::DeepFrozenOcean), + 127 => Some(Biome::TheVoid), + 129 => Some(Biome::SunflowerPlains), + 130 => Some(Biome::DesertLakes), + 131 => Some(Biome::GravellyMountains), + 132 => Some(Biome::FlowerForest), + 133 => Some(Biome::TaigaMountains), + 134 => Some(Biome::SwampHills), + 140 => Some(Biome::IceSpikes), + 149 => Some(Biome::ModifiedJungle), + 151 => Some(Biome::ModifiedJungleEdge), + 155 => Some(Biome::TallBirchForest), + 156 => Some(Biome::TallBirchHills), + 157 => Some(Biome::DarkForestHills), + 158 => Some(Biome::SnowyTaigaMountains), + 160 => Some(Biome::GiantSpruceTaiga), + 161 => Some(Biome::GiantSpruceTaigaHills), + 162 => Some(Biome::ModifiedGravellyMountains), + 163 => Some(Biome::ShatteredSavanna), + 164 => Some(Biome::ShatteredSavannaPlateau), + 165 => Some(Biome::ErodedBadlands), + 166 => Some(Biome::ModifiedWoodedBadlandsPlateau), + 167 => Some(Biome::ModifiedBadlandsPlateau), + 168 => Some(Biome::BambooJungle), + 169 => Some(Biome::BambooJungleHills), + 170 => Some(Biome::SoulSandValley), + 171 => Some(Biome::CrimsonForest), + 172 => Some(Biome::WarpedForest), + 173 => Some(Biome::BasaltDeltas), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Biome { + /// Returns the `name` property of this `Biome`. + pub fn name(&self) -> &'static str { + match self { + Biome::Ocean => "ocean", + Biome::Plains => "plains", + Biome::Desert => "desert", + Biome::Mountains => "mountains", + Biome::Forest => "forest", + Biome::Taiga => "taiga", + Biome::Swamp => "swamp", + Biome::River => "river", + Biome::NetherWastes => "nether_wastes", + Biome::TheEnd => "the_end", + Biome::FrozenOcean => "frozen_ocean", + Biome::FrozenRiver => "frozen_river", + Biome::SnowyTundra => "snowy_tundra", + Biome::SnowyMountains => "snowy_mountains", + Biome::MushroomFields => "mushroom_fields", + Biome::MushroomFieldShore => "mushroom_field_shore", + Biome::Beach => "beach", + Biome::DesertHills => "desert_hills", + Biome::WoodedHills => "wooded_hills", + Biome::TaigaHills => "taiga_hills", + Biome::MountainEdge => "mountain_edge", + Biome::Jungle => "jungle", + Biome::JungleHills => "jungle_hills", + Biome::JungleEdge => "jungle_edge", + Biome::DeepOcean => "deep_ocean", + Biome::StoneShore => "stone_shore", + Biome::SnowyBeach => "snowy_beach", + Biome::BirchForest => "birch_forest", + Biome::BirchForestHills => "birch_forest_hills", + Biome::DarkForest => "dark_forest", + Biome::SnowyTaiga => "snowy_taiga", + Biome::SnowyTaigaHills => "snowy_taiga_hills", + Biome::GiantTreeTaiga => "giant_tree_taiga", + Biome::GiantTreeTaigaHills => "giant_tree_taiga_hills", + Biome::WoodedMountains => "wooded_mountains", + Biome::Savanna => "savanna", + Biome::SavannaPlateau => "savanna_plateau", + Biome::Badlands => "badlands", + Biome::WoodedBadlandsPlateau => "wooded_badlands_plateau", + Biome::BadlandsPlateau => "badlands_plateau", + Biome::SmallEndIslands => "small_end_islands", + Biome::EndMidlands => "end_midlands", + Biome::EndHighlands => "end_highlands", + Biome::EndBarrens => "end_barrens", + Biome::WarmOcean => "warm_ocean", + Biome::LukewarmOcean => "lukewarm_ocean", + Biome::ColdOcean => "cold_ocean", + Biome::DeepWarmOcean => "deep_warm_ocean", + Biome::DeepLukewarmOcean => "deep_lukewarm_ocean", + Biome::DeepColdOcean => "deep_cold_ocean", + Biome::DeepFrozenOcean => "deep_frozen_ocean", + Biome::TheVoid => "the_void", + Biome::SunflowerPlains => "sunflower_plains", + Biome::DesertLakes => "desert_lakes", + Biome::GravellyMountains => "gravelly_mountains", + Biome::FlowerForest => "flower_forest", + Biome::TaigaMountains => "taiga_mountains", + Biome::SwampHills => "swamp_hills", + Biome::IceSpikes => "ice_spikes", + Biome::ModifiedJungle => "modified_jungle", + Biome::ModifiedJungleEdge => "modified_jungle_edge", + Biome::TallBirchForest => "tall_birch_forest", + Biome::TallBirchHills => "tall_birch_hills", + Biome::DarkForestHills => "dark_forest_hills", + Biome::SnowyTaigaMountains => "snowy_taiga_mountains", + Biome::GiantSpruceTaiga => "giant_spruce_taiga", + Biome::GiantSpruceTaigaHills => "giant_spruce_taiga_hills", + Biome::ModifiedGravellyMountains => "modified_gravelly_mountains", + Biome::ShatteredSavanna => "shattered_savanna", + Biome::ShatteredSavannaPlateau => "shattered_savanna_plateau", + Biome::ErodedBadlands => "eroded_badlands", + Biome::ModifiedWoodedBadlandsPlateau => "modified_wooded_badlands_plateau", + Biome::ModifiedBadlandsPlateau => "modified_badlands_plateau", + Biome::BambooJungle => "bamboo_jungle", + Biome::BambooJungleHills => "bamboo_jungle_hills", + Biome::SoulSandValley => "soul_sand_valley", + Biome::CrimsonForest => "crimson_forest", + Biome::WarpedForest => "warped_forest", + Biome::BasaltDeltas => "basalt_deltas", + } + } + + /// Gets a `Biome` by its `name`. + pub fn from_name(name: &str) -> Option { + match name { + "ocean" => Some(Biome::Ocean), + "plains" => Some(Biome::Plains), + "desert" => Some(Biome::Desert), + "mountains" => Some(Biome::Mountains), + "forest" => Some(Biome::Forest), + "taiga" => Some(Biome::Taiga), + "swamp" => Some(Biome::Swamp), + "river" => Some(Biome::River), + "nether_wastes" => Some(Biome::NetherWastes), + "the_end" => Some(Biome::TheEnd), + "frozen_ocean" => Some(Biome::FrozenOcean), + "frozen_river" => Some(Biome::FrozenRiver), + "snowy_tundra" => Some(Biome::SnowyTundra), + "snowy_mountains" => Some(Biome::SnowyMountains), + "mushroom_fields" => Some(Biome::MushroomFields), + "mushroom_field_shore" => Some(Biome::MushroomFieldShore), + "beach" => Some(Biome::Beach), + "desert_hills" => Some(Biome::DesertHills), + "wooded_hills" => Some(Biome::WoodedHills), + "taiga_hills" => Some(Biome::TaigaHills), + "mountain_edge" => Some(Biome::MountainEdge), + "jungle" => Some(Biome::Jungle), + "jungle_hills" => Some(Biome::JungleHills), + "jungle_edge" => Some(Biome::JungleEdge), + "deep_ocean" => Some(Biome::DeepOcean), + "stone_shore" => Some(Biome::StoneShore), + "snowy_beach" => Some(Biome::SnowyBeach), + "birch_forest" => Some(Biome::BirchForest), + "birch_forest_hills" => Some(Biome::BirchForestHills), + "dark_forest" => Some(Biome::DarkForest), + "snowy_taiga" => Some(Biome::SnowyTaiga), + "snowy_taiga_hills" => Some(Biome::SnowyTaigaHills), + "giant_tree_taiga" => Some(Biome::GiantTreeTaiga), + "giant_tree_taiga_hills" => Some(Biome::GiantTreeTaigaHills), + "wooded_mountains" => Some(Biome::WoodedMountains), + "savanna" => Some(Biome::Savanna), + "savanna_plateau" => Some(Biome::SavannaPlateau), + "badlands" => Some(Biome::Badlands), + "wooded_badlands_plateau" => Some(Biome::WoodedBadlandsPlateau), + "badlands_plateau" => Some(Biome::BadlandsPlateau), + "small_end_islands" => Some(Biome::SmallEndIslands), + "end_midlands" => Some(Biome::EndMidlands), + "end_highlands" => Some(Biome::EndHighlands), + "end_barrens" => Some(Biome::EndBarrens), + "warm_ocean" => Some(Biome::WarmOcean), + "lukewarm_ocean" => Some(Biome::LukewarmOcean), + "cold_ocean" => Some(Biome::ColdOcean), + "deep_warm_ocean" => Some(Biome::DeepWarmOcean), + "deep_lukewarm_ocean" => Some(Biome::DeepLukewarmOcean), + "deep_cold_ocean" => Some(Biome::DeepColdOcean), + "deep_frozen_ocean" => Some(Biome::DeepFrozenOcean), + "the_void" => Some(Biome::TheVoid), + "sunflower_plains" => Some(Biome::SunflowerPlains), + "desert_lakes" => Some(Biome::DesertLakes), + "gravelly_mountains" => Some(Biome::GravellyMountains), + "flower_forest" => Some(Biome::FlowerForest), + "taiga_mountains" => Some(Biome::TaigaMountains), + "swamp_hills" => Some(Biome::SwampHills), + "ice_spikes" => Some(Biome::IceSpikes), + "modified_jungle" => Some(Biome::ModifiedJungle), + "modified_jungle_edge" => Some(Biome::ModifiedJungleEdge), + "tall_birch_forest" => Some(Biome::TallBirchForest), + "tall_birch_hills" => Some(Biome::TallBirchHills), + "dark_forest_hills" => Some(Biome::DarkForestHills), + "snowy_taiga_mountains" => Some(Biome::SnowyTaigaMountains), + "giant_spruce_taiga" => Some(Biome::GiantSpruceTaiga), + "giant_spruce_taiga_hills" => Some(Biome::GiantSpruceTaigaHills), + "modified_gravelly_mountains" => Some(Biome::ModifiedGravellyMountains), + "shattered_savanna" => Some(Biome::ShatteredSavanna), + "shattered_savanna_plateau" => Some(Biome::ShatteredSavannaPlateau), + "eroded_badlands" => Some(Biome::ErodedBadlands), + "modified_wooded_badlands_plateau" => Some(Biome::ModifiedWoodedBadlandsPlateau), + "modified_badlands_plateau" => Some(Biome::ModifiedBadlandsPlateau), + "bamboo_jungle" => Some(Biome::BambooJungle), + "bamboo_jungle_hills" => Some(Biome::BambooJungleHills), + "soul_sand_valley" => Some(Biome::SoulSandValley), + "crimson_forest" => Some(Biome::CrimsonForest), + "warped_forest" => Some(Biome::WarpedForest), + "basalt_deltas" => Some(Biome::BasaltDeltas), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Biome { + /// Returns the `display_name` property of this `Biome`. + pub fn display_name(&self) -> &'static str { + match self { + Biome::Ocean => "Ocean", + Biome::Plains => "Plains", + Biome::Desert => "Desert", + Biome::Mountains => "Mountains", + Biome::Forest => "Forest", + Biome::Taiga => "Taiga", + Biome::Swamp => "Swamp", + Biome::River => "River", + Biome::NetherWastes => "Nether Wastes", + Biome::TheEnd => "The End", + Biome::FrozenOcean => "Frozen Ocean", + Biome::FrozenRiver => "Frozen River", + Biome::SnowyTundra => "Snowy Tundra", + Biome::SnowyMountains => "Snowy Mountains", + Biome::MushroomFields => "Mushroom Fields", + Biome::MushroomFieldShore => "Mushroom Fields Shore", + Biome::Beach => "Beach", + Biome::DesertHills => "Desert Hills", + Biome::WoodedHills => "Wooded Hills", + Biome::TaigaHills => "Taiga Hills", + Biome::MountainEdge => "Mountain Edge", + Biome::Jungle => "Jungle", + Biome::JungleHills => "Jungle Hills", + Biome::JungleEdge => "Jungle Edge", + Biome::DeepOcean => "Deep Ocean", + Biome::StoneShore => "Stone Shore", + Biome::SnowyBeach => "Snowy Beach", + Biome::BirchForest => "Birch Forest", + Biome::BirchForestHills => "Birch Forest Hills", + Biome::DarkForest => "Dark Forest", + Biome::SnowyTaiga => "Snowy Taiga", + Biome::SnowyTaigaHills => "Snowy Taiga Hills", + Biome::GiantTreeTaiga => "Giant Tree Taiga", + Biome::GiantTreeTaigaHills => "Giant Tree Taiga Hills", + Biome::WoodedMountains => "Wooded Mountains", + Biome::Savanna => "Savanna", + Biome::SavannaPlateau => "Savanna Plateau", + Biome::Badlands => "Badlands", + Biome::WoodedBadlandsPlateau => "Wooded Badlands Plateau", + Biome::BadlandsPlateau => "Badlands Plateau", + Biome::SmallEndIslands => "Small End Islands", + Biome::EndMidlands => "End Midlands", + Biome::EndHighlands => "End Highlands", + Biome::EndBarrens => "End Barrens", + Biome::WarmOcean => "Warm Ocean", + Biome::LukewarmOcean => "Lukewarm Ocean", + Biome::ColdOcean => "Cold Ocean", + Biome::DeepWarmOcean => "Deep Warm Ocean", + Biome::DeepLukewarmOcean => "Deep Lukewarm Ocean", + Biome::DeepColdOcean => "Deep Cold Ocean", + Biome::DeepFrozenOcean => "Deep Frozen Ocean", + Biome::TheVoid => "the_void", + Biome::SunflowerPlains => "Sunflower Plains", + Biome::DesertLakes => "Desert Lakes", + Biome::GravellyMountains => "Gravelly Mountains", + Biome::FlowerForest => "Flower Forest", + Biome::TaigaMountains => "Taiga Mountains", + Biome::SwampHills => "Swamp Hills", + Biome::IceSpikes => "Ice Spikes", + Biome::ModifiedJungle => "Modified Jungle", + Biome::ModifiedJungleEdge => "Modified Jungle Edge", + Biome::TallBirchForest => "Tall Birch Forest", + Biome::TallBirchHills => "Tall Birch Hills", + Biome::DarkForestHills => "Dark Forest Hills", + Biome::SnowyTaigaMountains => "Snowy Taiga Mountains", + Biome::GiantSpruceTaiga => "Giant Spruce Taiga", + Biome::GiantSpruceTaigaHills => "Giant Spruce Taiga Hills", + Biome::ModifiedGravellyMountains => "Gravelly Mountains+", + Biome::ShatteredSavanna => "Shattered Savanna", + Biome::ShatteredSavannaPlateau => "Shattered Savanna Plateau", + Biome::ErodedBadlands => "Eroded Badlands", + Biome::ModifiedWoodedBadlandsPlateau => "Modified Wooded Badlands Plateau", + Biome::ModifiedBadlandsPlateau => "Modified Badlands Plateau", + Biome::BambooJungle => "Bamboo Jungle", + Biome::BambooJungleHills => "Bamboo Jungle Hills", + Biome::SoulSandValley => "Soul Sand Valley", + Biome::CrimsonForest => "Crimson Forest", + Biome::WarpedForest => "Warped Forest", + Biome::BasaltDeltas => "Basalt Deltas", + } + } + + /// Gets a `Biome` by its `display_name`. + pub fn from_display_name(display_name: &str) -> Option { + match display_name { + "Ocean" => Some(Biome::Ocean), + "Plains" => Some(Biome::Plains), + "Desert" => Some(Biome::Desert), + "Mountains" => Some(Biome::Mountains), + "Forest" => Some(Biome::Forest), + "Taiga" => Some(Biome::Taiga), + "Swamp" => Some(Biome::Swamp), + "River" => Some(Biome::River), + "Nether Wastes" => Some(Biome::NetherWastes), + "The End" => Some(Biome::TheEnd), + "Frozen Ocean" => Some(Biome::FrozenOcean), + "Frozen River" => Some(Biome::FrozenRiver), + "Snowy Tundra" => Some(Biome::SnowyTundra), + "Snowy Mountains" => Some(Biome::SnowyMountains), + "Mushroom Fields" => Some(Biome::MushroomFields), + "Mushroom Fields Shore" => Some(Biome::MushroomFieldShore), + "Beach" => Some(Biome::Beach), + "Desert Hills" => Some(Biome::DesertHills), + "Wooded Hills" => Some(Biome::WoodedHills), + "Taiga Hills" => Some(Biome::TaigaHills), + "Mountain Edge" => Some(Biome::MountainEdge), + "Jungle" => Some(Biome::Jungle), + "Jungle Hills" => Some(Biome::JungleHills), + "Jungle Edge" => Some(Biome::JungleEdge), + "Deep Ocean" => Some(Biome::DeepOcean), + "Stone Shore" => Some(Biome::StoneShore), + "Snowy Beach" => Some(Biome::SnowyBeach), + "Birch Forest" => Some(Biome::BirchForest), + "Birch Forest Hills" => Some(Biome::BirchForestHills), + "Dark Forest" => Some(Biome::DarkForest), + "Snowy Taiga" => Some(Biome::SnowyTaiga), + "Snowy Taiga Hills" => Some(Biome::SnowyTaigaHills), + "Giant Tree Taiga" => Some(Biome::GiantTreeTaiga), + "Giant Tree Taiga Hills" => Some(Biome::GiantTreeTaigaHills), + "Wooded Mountains" => Some(Biome::WoodedMountains), + "Savanna" => Some(Biome::Savanna), + "Savanna Plateau" => Some(Biome::SavannaPlateau), + "Badlands" => Some(Biome::Badlands), + "Wooded Badlands Plateau" => Some(Biome::WoodedBadlandsPlateau), + "Badlands Plateau" => Some(Biome::BadlandsPlateau), + "Small End Islands" => Some(Biome::SmallEndIslands), + "End Midlands" => Some(Biome::EndMidlands), + "End Highlands" => Some(Biome::EndHighlands), + "End Barrens" => Some(Biome::EndBarrens), + "Warm Ocean" => Some(Biome::WarmOcean), + "Lukewarm Ocean" => Some(Biome::LukewarmOcean), + "Cold Ocean" => Some(Biome::ColdOcean), + "Deep Warm Ocean" => Some(Biome::DeepWarmOcean), + "Deep Lukewarm Ocean" => Some(Biome::DeepLukewarmOcean), + "Deep Cold Ocean" => Some(Biome::DeepColdOcean), + "Deep Frozen Ocean" => Some(Biome::DeepFrozenOcean), + "the_void" => Some(Biome::TheVoid), + "Sunflower Plains" => Some(Biome::SunflowerPlains), + "Desert Lakes" => Some(Biome::DesertLakes), + "Gravelly Mountains" => Some(Biome::GravellyMountains), + "Flower Forest" => Some(Biome::FlowerForest), + "Taiga Mountains" => Some(Biome::TaigaMountains), + "Swamp Hills" => Some(Biome::SwampHills), + "Ice Spikes" => Some(Biome::IceSpikes), + "Modified Jungle" => Some(Biome::ModifiedJungle), + "Modified Jungle Edge" => Some(Biome::ModifiedJungleEdge), + "Tall Birch Forest" => Some(Biome::TallBirchForest), + "Tall Birch Hills" => Some(Biome::TallBirchHills), + "Dark Forest Hills" => Some(Biome::DarkForestHills), + "Snowy Taiga Mountains" => Some(Biome::SnowyTaigaMountains), + "Giant Spruce Taiga" => Some(Biome::GiantSpruceTaiga), + "Giant Spruce Taiga Hills" => Some(Biome::GiantSpruceTaigaHills), + "Gravelly Mountains+" => Some(Biome::ModifiedGravellyMountains), + "Shattered Savanna" => Some(Biome::ShatteredSavanna), + "Shattered Savanna Plateau" => Some(Biome::ShatteredSavannaPlateau), + "Eroded Badlands" => Some(Biome::ErodedBadlands), + "Modified Wooded Badlands Plateau" => Some(Biome::ModifiedWoodedBadlandsPlateau), + "Modified Badlands Plateau" => Some(Biome::ModifiedBadlandsPlateau), + "Bamboo Jungle" => Some(Biome::BambooJungle), + "Bamboo Jungle Hills" => Some(Biome::BambooJungleHills), + "Soul Sand Valley" => Some(Biome::SoulSandValley), + "Crimson Forest" => Some(Biome::CrimsonForest), + "Warped Forest" => Some(Biome::WarpedForest), + "Basalt Deltas" => Some(Biome::BasaltDeltas), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Biome { + /// Returns the `rainfall` property of this `Biome`. + pub fn rainfall(&self) -> f32 { + match self { + Biome::Ocean => 0.5 as f32, + Biome::Plains => 0.4 as f32, + Biome::Desert => 0 as f32, + Biome::Mountains => 0.3 as f32, + Biome::Forest => 0.8 as f32, + Biome::Taiga => 0.8 as f32, + Biome::Swamp => 0.9 as f32, + Biome::River => 0.5 as f32, + Biome::NetherWastes => 0 as f32, + Biome::TheEnd => 0.5 as f32, + Biome::FrozenOcean => 0.5 as f32, + Biome::FrozenRiver => 0.5 as f32, + Biome::SnowyTundra => 0.5 as f32, + Biome::SnowyMountains => 0.5 as f32, + Biome::MushroomFields => 1 as f32, + Biome::MushroomFieldShore => 1 as f32, + Biome::Beach => 0.4 as f32, + Biome::DesertHills => 0 as f32, + Biome::WoodedHills => 0.8 as f32, + Biome::TaigaHills => 0.8 as f32, + Biome::MountainEdge => 0.3 as f32, + Biome::Jungle => 0.9 as f32, + Biome::JungleHills => 0.9 as f32, + Biome::JungleEdge => 0.8 as f32, + Biome::DeepOcean => 0.5 as f32, + Biome::StoneShore => 0.3 as f32, + Biome::SnowyBeach => 0.3 as f32, + Biome::BirchForest => 0.6 as f32, + Biome::BirchForestHills => 0.6 as f32, + Biome::DarkForest => 0.8 as f32, + Biome::SnowyTaiga => 0.4 as f32, + Biome::SnowyTaigaHills => 0.4 as f32, + Biome::GiantTreeTaiga => 0.8 as f32, + Biome::GiantTreeTaigaHills => 0.8 as f32, + Biome::WoodedMountains => 0.3 as f32, + Biome::Savanna => 0 as f32, + Biome::SavannaPlateau => 0 as f32, + Biome::Badlands => 0 as f32, + Biome::WoodedBadlandsPlateau => 0 as f32, + Biome::BadlandsPlateau => 0 as f32, + Biome::SmallEndIslands => 0.5 as f32, + Biome::EndMidlands => 0.5 as f32, + Biome::EndHighlands => 0.5 as f32, + Biome::EndBarrens => 0.5 as f32, + Biome::WarmOcean => 0.5 as f32, + Biome::LukewarmOcean => 0.5 as f32, + Biome::ColdOcean => 0.5 as f32, + Biome::DeepWarmOcean => 0.5 as f32, + Biome::DeepLukewarmOcean => 0.5 as f32, + Biome::DeepColdOcean => 0.5 as f32, + Biome::DeepFrozenOcean => 0.5 as f32, + Biome::TheVoid => 0.5 as f32, + Biome::SunflowerPlains => 0.4 as f32, + Biome::DesertLakes => 0 as f32, + Biome::GravellyMountains => 0.3 as f32, + Biome::FlowerForest => 0.8 as f32, + Biome::TaigaMountains => 0.8 as f32, + Biome::SwampHills => 0.9 as f32, + Biome::IceSpikes => 0.5 as f32, + Biome::ModifiedJungle => 0.9 as f32, + Biome::ModifiedJungleEdge => 0.8 as f32, + Biome::TallBirchForest => 0.6 as f32, + Biome::TallBirchHills => 0.6 as f32, + Biome::DarkForestHills => 0.8 as f32, + Biome::SnowyTaigaMountains => 0.4 as f32, + Biome::GiantSpruceTaiga => 0.8 as f32, + Biome::GiantSpruceTaigaHills => 0.8 as f32, + Biome::ModifiedGravellyMountains => 0.3 as f32, + Biome::ShatteredSavanna => 0 as f32, + Biome::ShatteredSavannaPlateau => 0 as f32, + Biome::ErodedBadlands => 0 as f32, + Biome::ModifiedWoodedBadlandsPlateau => 0 as f32, + Biome::ModifiedBadlandsPlateau => 0 as f32, + Biome::BambooJungle => 0.9 as f32, + Biome::BambooJungleHills => 0.9 as f32, + Biome::SoulSandValley => 0 as f32, + Biome::CrimsonForest => 0 as f32, + Biome::WarpedForest => 0 as f32, + Biome::BasaltDeltas => 0 as f32, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Biome { + /// Returns the `temperature` property of this `Biome`. + pub fn temperature(&self) -> f32 { + match self { + Biome::Ocean => 0.5 as f32, + Biome::Plains => 0.8 as f32, + Biome::Desert => 2 as f32, + Biome::Mountains => 0.2 as f32, + Biome::Forest => 0.7 as f32, + Biome::Taiga => 0.25 as f32, + Biome::Swamp => 0.8 as f32, + Biome::River => 0.5 as f32, + Biome::NetherWastes => 2 as f32, + Biome::TheEnd => 0.5 as f32, + Biome::FrozenOcean => 0 as f32, + Biome::FrozenRiver => 0 as f32, + Biome::SnowyTundra => 0 as f32, + Biome::SnowyMountains => 0 as f32, + Biome::MushroomFields => 0.9 as f32, + Biome::MushroomFieldShore => 0.9 as f32, + Biome::Beach => 0.8 as f32, + Biome::DesertHills => 2 as f32, + Biome::WoodedHills => 0.7 as f32, + Biome::TaigaHills => 0.25 as f32, + Biome::MountainEdge => 0.2 as f32, + Biome::Jungle => 0.95 as f32, + Biome::JungleHills => 0.95 as f32, + Biome::JungleEdge => 0.95 as f32, + Biome::DeepOcean => 0.5 as f32, + Biome::StoneShore => 0.2 as f32, + Biome::SnowyBeach => 0.05 as f32, + Biome::BirchForest => 0.6 as f32, + Biome::BirchForestHills => 0.6 as f32, + Biome::DarkForest => 0.7 as f32, + Biome::SnowyTaiga => -0.5 as f32, + Biome::SnowyTaigaHills => -0.5 as f32, + Biome::GiantTreeTaiga => 0.3 as f32, + Biome::GiantTreeTaigaHills => 0.3 as f32, + Biome::WoodedMountains => 0.2 as f32, + Biome::Savanna => 1.2 as f32, + Biome::SavannaPlateau => 1 as f32, + Biome::Badlands => 2 as f32, + Biome::WoodedBadlandsPlateau => 2 as f32, + Biome::BadlandsPlateau => 2 as f32, + Biome::SmallEndIslands => 0.5 as f32, + Biome::EndMidlands => 0.5 as f32, + Biome::EndHighlands => 0.5 as f32, + Biome::EndBarrens => 0.5 as f32, + Biome::WarmOcean => 0.5 as f32, + Biome::LukewarmOcean => 0.5 as f32, + Biome::ColdOcean => 0.5 as f32, + Biome::DeepWarmOcean => 0.5 as f32, + Biome::DeepLukewarmOcean => 0.5 as f32, + Biome::DeepColdOcean => 0.5 as f32, + Biome::DeepFrozenOcean => 0.5 as f32, + Biome::TheVoid => 0.5 as f32, + Biome::SunflowerPlains => 0.8 as f32, + Biome::DesertLakes => 2 as f32, + Biome::GravellyMountains => 0.2 as f32, + Biome::FlowerForest => 0.7 as f32, + Biome::TaigaMountains => 0.25 as f32, + Biome::SwampHills => 0.8 as f32, + Biome::IceSpikes => 0 as f32, + Biome::ModifiedJungle => 0.95 as f32, + Biome::ModifiedJungleEdge => 0.95 as f32, + Biome::TallBirchForest => 0.6 as f32, + Biome::TallBirchHills => 0.6 as f32, + Biome::DarkForestHills => 0.7 as f32, + Biome::SnowyTaigaMountains => -0.5 as f32, + Biome::GiantSpruceTaiga => 0.25 as f32, + Biome::GiantSpruceTaigaHills => 0.25 as f32, + Biome::ModifiedGravellyMountains => 0.2 as f32, + Biome::ShatteredSavanna => 1.1 as f32, + Biome::ShatteredSavannaPlateau => 1 as f32, + Biome::ErodedBadlands => 2 as f32, + Biome::ModifiedWoodedBadlandsPlateau => 2 as f32, + Biome::ModifiedBadlandsPlateau => 2 as f32, + Biome::BambooJungle => 0.95 as f32, + Biome::BambooJungleHills => 0.95 as f32, + Biome::SoulSandValley => 2 as f32, + Biome::CrimsonForest => 2 as f32, + Biome::WarpedForest => 2 as f32, + Biome::BasaltDeltas => 2 as f32, + } + } +} diff --git a/crates/generated/src/block.rs b/crates/generated/src/block.rs new file mode 100644 index 000000000..cfb4fad0e --- /dev/null +++ b/crates/generated/src/block.rs @@ -0,0 +1,13705 @@ +// This file is @generated. Please do not edit. +#[derive( + num_derive::FromPrimitive, + num_derive::ToPrimitive, + Copy, + Clone, + Debug, + PartialEq, + Eq, + Hash, + PartialOrd, + Ord, +)] +pub enum BlockKind { + Air, + Stone, + Granite, + PolishedGranite, + Diorite, + PolishedDiorite, + Andesite, + PolishedAndesite, + GrassBlock, + Dirt, + CoarseDirt, + Podzol, + Cobblestone, + OakPlanks, + SprucePlanks, + BirchPlanks, + JunglePlanks, + AcaciaPlanks, + DarkOakPlanks, + OakSapling, + SpruceSapling, + BirchSapling, + JungleSapling, + AcaciaSapling, + DarkOakSapling, + Bedrock, + Water, + Lava, + Sand, + RedSand, + Gravel, + GoldOre, + IronOre, + CoalOre, + NetherGoldOre, + OakLog, + SpruceLog, + BirchLog, + JungleLog, + AcaciaLog, + DarkOakLog, + StrippedSpruceLog, + StrippedBirchLog, + StrippedJungleLog, + StrippedAcaciaLog, + StrippedDarkOakLog, + StrippedOakLog, + OakWood, + SpruceWood, + BirchWood, + JungleWood, + AcaciaWood, + DarkOakWood, + StrippedOakWood, + StrippedSpruceWood, + StrippedBirchWood, + StrippedJungleWood, + StrippedAcaciaWood, + StrippedDarkOakWood, + OakLeaves, + SpruceLeaves, + BirchLeaves, + JungleLeaves, + AcaciaLeaves, + DarkOakLeaves, + Sponge, + WetSponge, + Glass, + LapisOre, + LapisBlock, + Dispenser, + Sandstone, + ChiseledSandstone, + CutSandstone, + NoteBlock, + WhiteBed, + OrangeBed, + MagentaBed, + LightBlueBed, + YellowBed, + LimeBed, + PinkBed, + GrayBed, + LightGrayBed, + CyanBed, + PurpleBed, + BlueBed, + BrownBed, + GreenBed, + RedBed, + BlackBed, + PoweredRail, + DetectorRail, + StickyPiston, + Cobweb, + Grass, + Fern, + DeadBush, + Seagrass, + TallSeagrass, + Piston, + PistonHead, + WhiteWool, + OrangeWool, + MagentaWool, + LightBlueWool, + YellowWool, + LimeWool, + PinkWool, + GrayWool, + LightGrayWool, + CyanWool, + PurpleWool, + BlueWool, + BrownWool, + GreenWool, + RedWool, + BlackWool, + MovingPiston, + Dandelion, + Poppy, + BlueOrchid, + Allium, + AzureBluet, + RedTulip, + OrangeTulip, + WhiteTulip, + PinkTulip, + OxeyeDaisy, + Cornflower, + WitherRose, + LilyOfTheValley, + BrownMushroom, + RedMushroom, + GoldBlock, + IronBlock, + Bricks, + Tnt, + Bookshelf, + MossyCobblestone, + Obsidian, + Torch, + WallTorch, + Fire, + SoulFire, + Spawner, + OakStairs, + Chest, + RedstoneWire, + DiamondOre, + DiamondBlock, + CraftingTable, + Wheat, + Farmland, + Furnace, + OakSign, + SpruceSign, + BirchSign, + AcaciaSign, + JungleSign, + DarkOakSign, + OakDoor, + Ladder, + Rail, + CobblestoneStairs, + OakWallSign, + SpruceWallSign, + BirchWallSign, + AcaciaWallSign, + JungleWallSign, + DarkOakWallSign, + Lever, + StonePressurePlate, + IronDoor, + OakPressurePlate, + SprucePressurePlate, + BirchPressurePlate, + JunglePressurePlate, + AcaciaPressurePlate, + DarkOakPressurePlate, + RedstoneOre, + RedstoneTorch, + RedstoneWallTorch, + StoneButton, + Snow, + Ice, + SnowBlock, + Cactus, + Clay, + SugarCane, + Jukebox, + OakFence, + Pumpkin, + Netherrack, + SoulSand, + SoulSoil, + Basalt, + PolishedBasalt, + SoulTorch, + SoulWallTorch, + Glowstone, + NetherPortal, + CarvedPumpkin, + JackOLantern, + Cake, + Repeater, + WhiteStainedGlass, + OrangeStainedGlass, + MagentaStainedGlass, + LightBlueStainedGlass, + YellowStainedGlass, + LimeStainedGlass, + PinkStainedGlass, + GrayStainedGlass, + LightGrayStainedGlass, + CyanStainedGlass, + PurpleStainedGlass, + BlueStainedGlass, + BrownStainedGlass, + GreenStainedGlass, + RedStainedGlass, + BlackStainedGlass, + OakTrapdoor, + SpruceTrapdoor, + BirchTrapdoor, + JungleTrapdoor, + AcaciaTrapdoor, + DarkOakTrapdoor, + StoneBricks, + MossyStoneBricks, + CrackedStoneBricks, + ChiseledStoneBricks, + InfestedStone, + InfestedCobblestone, + InfestedStoneBricks, + InfestedMossyStoneBricks, + InfestedCrackedStoneBricks, + InfestedChiseledStoneBricks, + BrownMushroomBlock, + RedMushroomBlock, + MushroomStem, + IronBars, + Chain, + GlassPane, + Melon, + AttachedPumpkinStem, + AttachedMelonStem, + PumpkinStem, + MelonStem, + Vine, + OakFenceGate, + BrickStairs, + StoneBrickStairs, + Mycelium, + LilyPad, + NetherBricks, + NetherBrickFence, + NetherBrickStairs, + NetherWart, + EnchantingTable, + BrewingStand, + Cauldron, + EndPortal, + EndPortalFrame, + EndStone, + DragonEgg, + RedstoneLamp, + Cocoa, + SandstoneStairs, + EmeraldOre, + EnderChest, + TripwireHook, + Tripwire, + EmeraldBlock, + SpruceStairs, + BirchStairs, + JungleStairs, + CommandBlock, + Beacon, + CobblestoneWall, + MossyCobblestoneWall, + FlowerPot, + PottedOakSapling, + PottedSpruceSapling, + PottedBirchSapling, + PottedJungleSapling, + PottedAcaciaSapling, + PottedDarkOakSapling, + PottedFern, + PottedDandelion, + PottedPoppy, + PottedBlueOrchid, + PottedAllium, + PottedAzureBluet, + PottedRedTulip, + PottedOrangeTulip, + PottedWhiteTulip, + PottedPinkTulip, + PottedOxeyeDaisy, + PottedCornflower, + PottedLilyOfTheValley, + PottedWitherRose, + PottedRedMushroom, + PottedBrownMushroom, + PottedDeadBush, + PottedCactus, + Carrots, + Potatoes, + OakButton, + SpruceButton, + BirchButton, + JungleButton, + AcaciaButton, + DarkOakButton, + SkeletonSkull, + SkeletonWallSkull, + WitherSkeletonSkull, + WitherSkeletonWallSkull, + ZombieHead, + ZombieWallHead, + PlayerHead, + PlayerWallHead, + CreeperHead, + CreeperWallHead, + DragonHead, + DragonWallHead, + Anvil, + ChippedAnvil, + DamagedAnvil, + TrappedChest, + LightWeightedPressurePlate, + HeavyWeightedPressurePlate, + Comparator, + DaylightDetector, + RedstoneBlock, + NetherQuartzOre, + Hopper, + QuartzBlock, + ChiseledQuartzBlock, + QuartzPillar, + QuartzStairs, + ActivatorRail, + Dropper, + WhiteTerracotta, + OrangeTerracotta, + MagentaTerracotta, + LightBlueTerracotta, + YellowTerracotta, + LimeTerracotta, + PinkTerracotta, + GrayTerracotta, + LightGrayTerracotta, + CyanTerracotta, + PurpleTerracotta, + BlueTerracotta, + BrownTerracotta, + GreenTerracotta, + RedTerracotta, + BlackTerracotta, + WhiteStainedGlassPane, + OrangeStainedGlassPane, + MagentaStainedGlassPane, + LightBlueStainedGlassPane, + YellowStainedGlassPane, + LimeStainedGlassPane, + PinkStainedGlassPane, + GrayStainedGlassPane, + LightGrayStainedGlassPane, + CyanStainedGlassPane, + PurpleStainedGlassPane, + BlueStainedGlassPane, + BrownStainedGlassPane, + GreenStainedGlassPane, + RedStainedGlassPane, + BlackStainedGlassPane, + AcaciaStairs, + DarkOakStairs, + SlimeBlock, + Barrier, + IronTrapdoor, + Prismarine, + PrismarineBricks, + DarkPrismarine, + PrismarineStairs, + PrismarineBrickStairs, + DarkPrismarineStairs, + PrismarineSlab, + PrismarineBrickSlab, + DarkPrismarineSlab, + SeaLantern, + HayBlock, + WhiteCarpet, + OrangeCarpet, + MagentaCarpet, + LightBlueCarpet, + YellowCarpet, + LimeCarpet, + PinkCarpet, + GrayCarpet, + LightGrayCarpet, + CyanCarpet, + PurpleCarpet, + BlueCarpet, + BrownCarpet, + GreenCarpet, + RedCarpet, + BlackCarpet, + Terracotta, + CoalBlock, + PackedIce, + Sunflower, + Lilac, + RoseBush, + Peony, + TallGrass, + LargeFern, + WhiteBanner, + OrangeBanner, + MagentaBanner, + LightBlueBanner, + YellowBanner, + LimeBanner, + PinkBanner, + GrayBanner, + LightGrayBanner, + CyanBanner, + PurpleBanner, + BlueBanner, + BrownBanner, + GreenBanner, + RedBanner, + BlackBanner, + WhiteWallBanner, + OrangeWallBanner, + MagentaWallBanner, + LightBlueWallBanner, + YellowWallBanner, + LimeWallBanner, + PinkWallBanner, + GrayWallBanner, + LightGrayWallBanner, + CyanWallBanner, + PurpleWallBanner, + BlueWallBanner, + BrownWallBanner, + GreenWallBanner, + RedWallBanner, + BlackWallBanner, + RedSandstone, + ChiseledRedSandstone, + CutRedSandstone, + RedSandstoneStairs, + OakSlab, + SpruceSlab, + BirchSlab, + JungleSlab, + AcaciaSlab, + DarkOakSlab, + StoneSlab, + SmoothStoneSlab, + SandstoneSlab, + CutSandstoneSlab, + PetrifiedOakSlab, + CobblestoneSlab, + BrickSlab, + StoneBrickSlab, + NetherBrickSlab, + QuartzSlab, + RedSandstoneSlab, + CutRedSandstoneSlab, + PurpurSlab, + SmoothStone, + SmoothSandstone, + SmoothQuartz, + SmoothRedSandstone, + SpruceFenceGate, + BirchFenceGate, + JungleFenceGate, + AcaciaFenceGate, + DarkOakFenceGate, + SpruceFence, + BirchFence, + JungleFence, + AcaciaFence, + DarkOakFence, + SpruceDoor, + BirchDoor, + JungleDoor, + AcaciaDoor, + DarkOakDoor, + EndRod, + ChorusPlant, + ChorusFlower, + PurpurBlock, + PurpurPillar, + PurpurStairs, + EndStoneBricks, + Beetroots, + GrassPath, + EndGateway, + RepeatingCommandBlock, + ChainCommandBlock, + FrostedIce, + MagmaBlock, + NetherWartBlock, + RedNetherBricks, + BoneBlock, + StructureVoid, + Observer, + ShulkerBox, + WhiteShulkerBox, + OrangeShulkerBox, + MagentaShulkerBox, + LightBlueShulkerBox, + YellowShulkerBox, + LimeShulkerBox, + PinkShulkerBox, + GrayShulkerBox, + LightGrayShulkerBox, + CyanShulkerBox, + PurpleShulkerBox, + BlueShulkerBox, + BrownShulkerBox, + GreenShulkerBox, + RedShulkerBox, + BlackShulkerBox, + WhiteGlazedTerracotta, + OrangeGlazedTerracotta, + MagentaGlazedTerracotta, + LightBlueGlazedTerracotta, + YellowGlazedTerracotta, + LimeGlazedTerracotta, + PinkGlazedTerracotta, + GrayGlazedTerracotta, + LightGrayGlazedTerracotta, + CyanGlazedTerracotta, + PurpleGlazedTerracotta, + BlueGlazedTerracotta, + BrownGlazedTerracotta, + GreenGlazedTerracotta, + RedGlazedTerracotta, + BlackGlazedTerracotta, + WhiteConcrete, + OrangeConcrete, + MagentaConcrete, + LightBlueConcrete, + YellowConcrete, + LimeConcrete, + PinkConcrete, + GrayConcrete, + LightGrayConcrete, + CyanConcrete, + PurpleConcrete, + BlueConcrete, + BrownConcrete, + GreenConcrete, + RedConcrete, + BlackConcrete, + WhiteConcretePowder, + OrangeConcretePowder, + MagentaConcretePowder, + LightBlueConcretePowder, + YellowConcretePowder, + LimeConcretePowder, + PinkConcretePowder, + GrayConcretePowder, + LightGrayConcretePowder, + CyanConcretePowder, + PurpleConcretePowder, + BlueConcretePowder, + BrownConcretePowder, + GreenConcretePowder, + RedConcretePowder, + BlackConcretePowder, + Kelp, + KelpPlant, + DriedKelpBlock, + TurtleEgg, + DeadTubeCoralBlock, + DeadBrainCoralBlock, + DeadBubbleCoralBlock, + DeadFireCoralBlock, + DeadHornCoralBlock, + TubeCoralBlock, + BrainCoralBlock, + BubbleCoralBlock, + FireCoralBlock, + HornCoralBlock, + DeadTubeCoral, + DeadBrainCoral, + DeadBubbleCoral, + DeadFireCoral, + DeadHornCoral, + TubeCoral, + BrainCoral, + BubbleCoral, + FireCoral, + HornCoral, + DeadTubeCoralFan, + DeadBrainCoralFan, + DeadBubbleCoralFan, + DeadFireCoralFan, + DeadHornCoralFan, + TubeCoralFan, + BrainCoralFan, + BubbleCoralFan, + FireCoralFan, + HornCoralFan, + DeadTubeCoralWallFan, + DeadBrainCoralWallFan, + DeadBubbleCoralWallFan, + DeadFireCoralWallFan, + DeadHornCoralWallFan, + TubeCoralWallFan, + BrainCoralWallFan, + BubbleCoralWallFan, + FireCoralWallFan, + HornCoralWallFan, + SeaPickle, + BlueIce, + Conduit, + BambooSapling, + Bamboo, + PottedBamboo, + VoidAir, + CaveAir, + BubbleColumn, + PolishedGraniteStairs, + SmoothRedSandstoneStairs, + MossyStoneBrickStairs, + PolishedDioriteStairs, + MossyCobblestoneStairs, + EndStoneBrickStairs, + StoneStairs, + SmoothSandstoneStairs, + SmoothQuartzStairs, + GraniteStairs, + AndesiteStairs, + RedNetherBrickStairs, + PolishedAndesiteStairs, + DioriteStairs, + PolishedGraniteSlab, + SmoothRedSandstoneSlab, + MossyStoneBrickSlab, + PolishedDioriteSlab, + MossyCobblestoneSlab, + EndStoneBrickSlab, + SmoothSandstoneSlab, + SmoothQuartzSlab, + GraniteSlab, + AndesiteSlab, + RedNetherBrickSlab, + PolishedAndesiteSlab, + DioriteSlab, + BrickWall, + PrismarineWall, + RedSandstoneWall, + MossyStoneBrickWall, + GraniteWall, + StoneBrickWall, + NetherBrickWall, + AndesiteWall, + RedNetherBrickWall, + SandstoneWall, + EndStoneBrickWall, + DioriteWall, + Scaffolding, + Loom, + Barrel, + Smoker, + BlastFurnace, + CartographyTable, + FletchingTable, + Grindstone, + Lectern, + SmithingTable, + Stonecutter, + Bell, + Lantern, + SoulLantern, + Campfire, + SoulCampfire, + SweetBerryBush, + WarpedStem, + StrippedWarpedStem, + WarpedHyphae, + StrippedWarpedHyphae, + WarpedNylium, + WarpedFungus, + WarpedWartBlock, + WarpedRoots, + NetherSprouts, + CrimsonStem, + StrippedCrimsonStem, + CrimsonHyphae, + StrippedCrimsonHyphae, + CrimsonNylium, + CrimsonFungus, + Shroomlight, + WeepingVines, + WeepingVinesPlant, + TwistingVines, + TwistingVinesPlant, + CrimsonRoots, + CrimsonPlanks, + WarpedPlanks, + CrimsonSlab, + WarpedSlab, + CrimsonPressurePlate, + WarpedPressurePlate, + CrimsonFence, + WarpedFence, + CrimsonTrapdoor, + WarpedTrapdoor, + CrimsonFenceGate, + WarpedFenceGate, + CrimsonStairs, + WarpedStairs, + CrimsonButton, + WarpedButton, + CrimsonDoor, + WarpedDoor, + CrimsonSign, + WarpedSign, + CrimsonWallSign, + WarpedWallSign, + StructureBlock, + Jigsaw, + Composter, + Target, + BeeNest, + Beehive, + HoneyBlock, + HoneycombBlock, + NetheriteBlock, + AncientDebris, + CryingObsidian, + RespawnAnchor, + PottedCrimsonFungus, + PottedWarpedFungus, + PottedCrimsonRoots, + PottedWarpedRoots, + Lodestone, + Blackstone, + BlackstoneStairs, + BlackstoneWall, + BlackstoneSlab, + PolishedBlackstone, + PolishedBlackstoneBricks, + CrackedPolishedBlackstoneBricks, + ChiseledPolishedBlackstone, + PolishedBlackstoneBrickSlab, + PolishedBlackstoneBrickStairs, + PolishedBlackstoneBrickWall, + GildedBlackstone, + PolishedBlackstoneStairs, + PolishedBlackstoneSlab, + PolishedBlackstonePressurePlate, + PolishedBlackstoneButton, + PolishedBlackstoneWall, + ChiseledNetherBricks, + CrackedNetherBricks, + QuartzBricks, +} + +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `id` property of this `BlockKind`. + pub fn id(&self) -> u32 { + match self { + BlockKind::Air => 0, + BlockKind::Stone => 1, + BlockKind::Granite => 2, + BlockKind::PolishedGranite => 3, + BlockKind::Diorite => 4, + BlockKind::PolishedDiorite => 5, + BlockKind::Andesite => 6, + BlockKind::PolishedAndesite => 7, + BlockKind::GrassBlock => 8, + BlockKind::Dirt => 9, + BlockKind::CoarseDirt => 10, + BlockKind::Podzol => 11, + BlockKind::Cobblestone => 12, + BlockKind::OakPlanks => 13, + BlockKind::SprucePlanks => 14, + BlockKind::BirchPlanks => 15, + BlockKind::JunglePlanks => 16, + BlockKind::AcaciaPlanks => 17, + BlockKind::DarkOakPlanks => 18, + BlockKind::OakSapling => 19, + BlockKind::SpruceSapling => 20, + BlockKind::BirchSapling => 21, + BlockKind::JungleSapling => 22, + BlockKind::AcaciaSapling => 23, + BlockKind::DarkOakSapling => 24, + BlockKind::Bedrock => 25, + BlockKind::Water => 26, + BlockKind::Lava => 27, + BlockKind::Sand => 28, + BlockKind::RedSand => 29, + BlockKind::Gravel => 30, + BlockKind::GoldOre => 31, + BlockKind::IronOre => 32, + BlockKind::CoalOre => 33, + BlockKind::NetherGoldOre => 34, + BlockKind::OakLog => 35, + BlockKind::SpruceLog => 36, + BlockKind::BirchLog => 37, + BlockKind::JungleLog => 38, + BlockKind::AcaciaLog => 39, + BlockKind::DarkOakLog => 40, + BlockKind::StrippedSpruceLog => 41, + BlockKind::StrippedBirchLog => 42, + BlockKind::StrippedJungleLog => 43, + BlockKind::StrippedAcaciaLog => 44, + BlockKind::StrippedDarkOakLog => 45, + BlockKind::StrippedOakLog => 46, + BlockKind::OakWood => 47, + BlockKind::SpruceWood => 48, + BlockKind::BirchWood => 49, + BlockKind::JungleWood => 50, + BlockKind::AcaciaWood => 51, + BlockKind::DarkOakWood => 52, + BlockKind::StrippedOakWood => 53, + BlockKind::StrippedSpruceWood => 54, + BlockKind::StrippedBirchWood => 55, + BlockKind::StrippedJungleWood => 56, + BlockKind::StrippedAcaciaWood => 57, + BlockKind::StrippedDarkOakWood => 58, + BlockKind::OakLeaves => 59, + BlockKind::SpruceLeaves => 60, + BlockKind::BirchLeaves => 61, + BlockKind::JungleLeaves => 62, + BlockKind::AcaciaLeaves => 63, + BlockKind::DarkOakLeaves => 64, + BlockKind::Sponge => 65, + BlockKind::WetSponge => 66, + BlockKind::Glass => 67, + BlockKind::LapisOre => 68, + BlockKind::LapisBlock => 69, + BlockKind::Dispenser => 70, + BlockKind::Sandstone => 71, + BlockKind::ChiseledSandstone => 72, + BlockKind::CutSandstone => 73, + BlockKind::NoteBlock => 74, + BlockKind::WhiteBed => 75, + BlockKind::OrangeBed => 76, + BlockKind::MagentaBed => 77, + BlockKind::LightBlueBed => 78, + BlockKind::YellowBed => 79, + BlockKind::LimeBed => 80, + BlockKind::PinkBed => 81, + BlockKind::GrayBed => 82, + BlockKind::LightGrayBed => 83, + BlockKind::CyanBed => 84, + BlockKind::PurpleBed => 85, + BlockKind::BlueBed => 86, + BlockKind::BrownBed => 87, + BlockKind::GreenBed => 88, + BlockKind::RedBed => 89, + BlockKind::BlackBed => 90, + BlockKind::PoweredRail => 91, + BlockKind::DetectorRail => 92, + BlockKind::StickyPiston => 93, + BlockKind::Cobweb => 94, + BlockKind::Grass => 95, + BlockKind::Fern => 96, + BlockKind::DeadBush => 97, + BlockKind::Seagrass => 98, + BlockKind::TallSeagrass => 99, + BlockKind::Piston => 100, + BlockKind::PistonHead => 101, + BlockKind::WhiteWool => 102, + BlockKind::OrangeWool => 103, + BlockKind::MagentaWool => 104, + BlockKind::LightBlueWool => 105, + BlockKind::YellowWool => 106, + BlockKind::LimeWool => 107, + BlockKind::PinkWool => 108, + BlockKind::GrayWool => 109, + BlockKind::LightGrayWool => 110, + BlockKind::CyanWool => 111, + BlockKind::PurpleWool => 112, + BlockKind::BlueWool => 113, + BlockKind::BrownWool => 114, + BlockKind::GreenWool => 115, + BlockKind::RedWool => 116, + BlockKind::BlackWool => 117, + BlockKind::MovingPiston => 118, + BlockKind::Dandelion => 119, + BlockKind::Poppy => 120, + BlockKind::BlueOrchid => 121, + BlockKind::Allium => 122, + BlockKind::AzureBluet => 123, + BlockKind::RedTulip => 124, + BlockKind::OrangeTulip => 125, + BlockKind::WhiteTulip => 126, + BlockKind::PinkTulip => 127, + BlockKind::OxeyeDaisy => 128, + BlockKind::Cornflower => 129, + BlockKind::WitherRose => 130, + BlockKind::LilyOfTheValley => 131, + BlockKind::BrownMushroom => 132, + BlockKind::RedMushroom => 133, + BlockKind::GoldBlock => 134, + BlockKind::IronBlock => 135, + BlockKind::Bricks => 136, + BlockKind::Tnt => 137, + BlockKind::Bookshelf => 138, + BlockKind::MossyCobblestone => 139, + BlockKind::Obsidian => 140, + BlockKind::Torch => 141, + BlockKind::WallTorch => 142, + BlockKind::Fire => 143, + BlockKind::SoulFire => 144, + BlockKind::Spawner => 145, + BlockKind::OakStairs => 146, + BlockKind::Chest => 147, + BlockKind::RedstoneWire => 148, + BlockKind::DiamondOre => 149, + BlockKind::DiamondBlock => 150, + BlockKind::CraftingTable => 151, + BlockKind::Wheat => 152, + BlockKind::Farmland => 153, + BlockKind::Furnace => 154, + BlockKind::OakSign => 155, + BlockKind::SpruceSign => 156, + BlockKind::BirchSign => 157, + BlockKind::AcaciaSign => 158, + BlockKind::JungleSign => 159, + BlockKind::DarkOakSign => 160, + BlockKind::OakDoor => 161, + BlockKind::Ladder => 162, + BlockKind::Rail => 163, + BlockKind::CobblestoneStairs => 164, + BlockKind::OakWallSign => 165, + BlockKind::SpruceWallSign => 166, + BlockKind::BirchWallSign => 167, + BlockKind::AcaciaWallSign => 168, + BlockKind::JungleWallSign => 169, + BlockKind::DarkOakWallSign => 170, + BlockKind::Lever => 171, + BlockKind::StonePressurePlate => 172, + BlockKind::IronDoor => 173, + BlockKind::OakPressurePlate => 174, + BlockKind::SprucePressurePlate => 175, + BlockKind::BirchPressurePlate => 176, + BlockKind::JunglePressurePlate => 177, + BlockKind::AcaciaPressurePlate => 178, + BlockKind::DarkOakPressurePlate => 179, + BlockKind::RedstoneOre => 180, + BlockKind::RedstoneTorch => 181, + BlockKind::RedstoneWallTorch => 182, + BlockKind::StoneButton => 183, + BlockKind::Snow => 184, + BlockKind::Ice => 185, + BlockKind::SnowBlock => 186, + BlockKind::Cactus => 187, + BlockKind::Clay => 188, + BlockKind::SugarCane => 189, + BlockKind::Jukebox => 190, + BlockKind::OakFence => 191, + BlockKind::Pumpkin => 192, + BlockKind::Netherrack => 193, + BlockKind::SoulSand => 194, + BlockKind::SoulSoil => 195, + BlockKind::Basalt => 196, + BlockKind::PolishedBasalt => 197, + BlockKind::SoulTorch => 198, + BlockKind::SoulWallTorch => 199, + BlockKind::Glowstone => 200, + BlockKind::NetherPortal => 201, + BlockKind::CarvedPumpkin => 202, + BlockKind::JackOLantern => 203, + BlockKind::Cake => 204, + BlockKind::Repeater => 205, + BlockKind::WhiteStainedGlass => 206, + BlockKind::OrangeStainedGlass => 207, + BlockKind::MagentaStainedGlass => 208, + BlockKind::LightBlueStainedGlass => 209, + BlockKind::YellowStainedGlass => 210, + BlockKind::LimeStainedGlass => 211, + BlockKind::PinkStainedGlass => 212, + BlockKind::GrayStainedGlass => 213, + BlockKind::LightGrayStainedGlass => 214, + BlockKind::CyanStainedGlass => 215, + BlockKind::PurpleStainedGlass => 216, + BlockKind::BlueStainedGlass => 217, + BlockKind::BrownStainedGlass => 218, + BlockKind::GreenStainedGlass => 219, + BlockKind::RedStainedGlass => 220, + BlockKind::BlackStainedGlass => 221, + BlockKind::OakTrapdoor => 222, + BlockKind::SpruceTrapdoor => 223, + BlockKind::BirchTrapdoor => 224, + BlockKind::JungleTrapdoor => 225, + BlockKind::AcaciaTrapdoor => 226, + BlockKind::DarkOakTrapdoor => 227, + BlockKind::StoneBricks => 228, + BlockKind::MossyStoneBricks => 229, + BlockKind::CrackedStoneBricks => 230, + BlockKind::ChiseledStoneBricks => 231, + BlockKind::InfestedStone => 232, + BlockKind::InfestedCobblestone => 233, + BlockKind::InfestedStoneBricks => 234, + BlockKind::InfestedMossyStoneBricks => 235, + BlockKind::InfestedCrackedStoneBricks => 236, + BlockKind::InfestedChiseledStoneBricks => 237, + BlockKind::BrownMushroomBlock => 238, + BlockKind::RedMushroomBlock => 239, + BlockKind::MushroomStem => 240, + BlockKind::IronBars => 241, + BlockKind::Chain => 242, + BlockKind::GlassPane => 243, + BlockKind::Melon => 244, + BlockKind::AttachedPumpkinStem => 245, + BlockKind::AttachedMelonStem => 246, + BlockKind::PumpkinStem => 247, + BlockKind::MelonStem => 248, + BlockKind::Vine => 249, + BlockKind::OakFenceGate => 250, + BlockKind::BrickStairs => 251, + BlockKind::StoneBrickStairs => 252, + BlockKind::Mycelium => 253, + BlockKind::LilyPad => 254, + BlockKind::NetherBricks => 255, + BlockKind::NetherBrickFence => 256, + BlockKind::NetherBrickStairs => 257, + BlockKind::NetherWart => 258, + BlockKind::EnchantingTable => 259, + BlockKind::BrewingStand => 260, + BlockKind::Cauldron => 261, + BlockKind::EndPortal => 262, + BlockKind::EndPortalFrame => 263, + BlockKind::EndStone => 264, + BlockKind::DragonEgg => 265, + BlockKind::RedstoneLamp => 266, + BlockKind::Cocoa => 267, + BlockKind::SandstoneStairs => 268, + BlockKind::EmeraldOre => 269, + BlockKind::EnderChest => 270, + BlockKind::TripwireHook => 271, + BlockKind::Tripwire => 272, + BlockKind::EmeraldBlock => 273, + BlockKind::SpruceStairs => 274, + BlockKind::BirchStairs => 275, + BlockKind::JungleStairs => 276, + BlockKind::CommandBlock => 277, + BlockKind::Beacon => 278, + BlockKind::CobblestoneWall => 279, + BlockKind::MossyCobblestoneWall => 280, + BlockKind::FlowerPot => 281, + BlockKind::PottedOakSapling => 282, + BlockKind::PottedSpruceSapling => 283, + BlockKind::PottedBirchSapling => 284, + BlockKind::PottedJungleSapling => 285, + BlockKind::PottedAcaciaSapling => 286, + BlockKind::PottedDarkOakSapling => 287, + BlockKind::PottedFern => 288, + BlockKind::PottedDandelion => 289, + BlockKind::PottedPoppy => 290, + BlockKind::PottedBlueOrchid => 291, + BlockKind::PottedAllium => 292, + BlockKind::PottedAzureBluet => 293, + BlockKind::PottedRedTulip => 294, + BlockKind::PottedOrangeTulip => 295, + BlockKind::PottedWhiteTulip => 296, + BlockKind::PottedPinkTulip => 297, + BlockKind::PottedOxeyeDaisy => 298, + BlockKind::PottedCornflower => 299, + BlockKind::PottedLilyOfTheValley => 300, + BlockKind::PottedWitherRose => 301, + BlockKind::PottedRedMushroom => 302, + BlockKind::PottedBrownMushroom => 303, + BlockKind::PottedDeadBush => 304, + BlockKind::PottedCactus => 305, + BlockKind::Carrots => 306, + BlockKind::Potatoes => 307, + BlockKind::OakButton => 308, + BlockKind::SpruceButton => 309, + BlockKind::BirchButton => 310, + BlockKind::JungleButton => 311, + BlockKind::AcaciaButton => 312, + BlockKind::DarkOakButton => 313, + BlockKind::SkeletonSkull => 314, + BlockKind::SkeletonWallSkull => 315, + BlockKind::WitherSkeletonSkull => 316, + BlockKind::WitherSkeletonWallSkull => 317, + BlockKind::ZombieHead => 318, + BlockKind::ZombieWallHead => 319, + BlockKind::PlayerHead => 320, + BlockKind::PlayerWallHead => 321, + BlockKind::CreeperHead => 322, + BlockKind::CreeperWallHead => 323, + BlockKind::DragonHead => 324, + BlockKind::DragonWallHead => 325, + BlockKind::Anvil => 326, + BlockKind::ChippedAnvil => 327, + BlockKind::DamagedAnvil => 328, + BlockKind::TrappedChest => 329, + BlockKind::LightWeightedPressurePlate => 330, + BlockKind::HeavyWeightedPressurePlate => 331, + BlockKind::Comparator => 332, + BlockKind::DaylightDetector => 333, + BlockKind::RedstoneBlock => 334, + BlockKind::NetherQuartzOre => 335, + BlockKind::Hopper => 336, + BlockKind::QuartzBlock => 337, + BlockKind::ChiseledQuartzBlock => 338, + BlockKind::QuartzPillar => 339, + BlockKind::QuartzStairs => 340, + BlockKind::ActivatorRail => 341, + BlockKind::Dropper => 342, + BlockKind::WhiteTerracotta => 343, + BlockKind::OrangeTerracotta => 344, + BlockKind::MagentaTerracotta => 345, + BlockKind::LightBlueTerracotta => 346, + BlockKind::YellowTerracotta => 347, + BlockKind::LimeTerracotta => 348, + BlockKind::PinkTerracotta => 349, + BlockKind::GrayTerracotta => 350, + BlockKind::LightGrayTerracotta => 351, + BlockKind::CyanTerracotta => 352, + BlockKind::PurpleTerracotta => 353, + BlockKind::BlueTerracotta => 354, + BlockKind::BrownTerracotta => 355, + BlockKind::GreenTerracotta => 356, + BlockKind::RedTerracotta => 357, + BlockKind::BlackTerracotta => 358, + BlockKind::WhiteStainedGlassPane => 359, + BlockKind::OrangeStainedGlassPane => 360, + BlockKind::MagentaStainedGlassPane => 361, + BlockKind::LightBlueStainedGlassPane => 362, + BlockKind::YellowStainedGlassPane => 363, + BlockKind::LimeStainedGlassPane => 364, + BlockKind::PinkStainedGlassPane => 365, + BlockKind::GrayStainedGlassPane => 366, + BlockKind::LightGrayStainedGlassPane => 367, + BlockKind::CyanStainedGlassPane => 368, + BlockKind::PurpleStainedGlassPane => 369, + BlockKind::BlueStainedGlassPane => 370, + BlockKind::BrownStainedGlassPane => 371, + BlockKind::GreenStainedGlassPane => 372, + BlockKind::RedStainedGlassPane => 373, + BlockKind::BlackStainedGlassPane => 374, + BlockKind::AcaciaStairs => 375, + BlockKind::DarkOakStairs => 376, + BlockKind::SlimeBlock => 377, + BlockKind::Barrier => 378, + BlockKind::IronTrapdoor => 379, + BlockKind::Prismarine => 380, + BlockKind::PrismarineBricks => 381, + BlockKind::DarkPrismarine => 382, + BlockKind::PrismarineStairs => 383, + BlockKind::PrismarineBrickStairs => 384, + BlockKind::DarkPrismarineStairs => 385, + BlockKind::PrismarineSlab => 386, + BlockKind::PrismarineBrickSlab => 387, + BlockKind::DarkPrismarineSlab => 388, + BlockKind::SeaLantern => 389, + BlockKind::HayBlock => 390, + BlockKind::WhiteCarpet => 391, + BlockKind::OrangeCarpet => 392, + BlockKind::MagentaCarpet => 393, + BlockKind::LightBlueCarpet => 394, + BlockKind::YellowCarpet => 395, + BlockKind::LimeCarpet => 396, + BlockKind::PinkCarpet => 397, + BlockKind::GrayCarpet => 398, + BlockKind::LightGrayCarpet => 399, + BlockKind::CyanCarpet => 400, + BlockKind::PurpleCarpet => 401, + BlockKind::BlueCarpet => 402, + BlockKind::BrownCarpet => 403, + BlockKind::GreenCarpet => 404, + BlockKind::RedCarpet => 405, + BlockKind::BlackCarpet => 406, + BlockKind::Terracotta => 407, + BlockKind::CoalBlock => 408, + BlockKind::PackedIce => 409, + BlockKind::Sunflower => 410, + BlockKind::Lilac => 411, + BlockKind::RoseBush => 412, + BlockKind::Peony => 413, + BlockKind::TallGrass => 414, + BlockKind::LargeFern => 415, + BlockKind::WhiteBanner => 416, + BlockKind::OrangeBanner => 417, + BlockKind::MagentaBanner => 418, + BlockKind::LightBlueBanner => 419, + BlockKind::YellowBanner => 420, + BlockKind::LimeBanner => 421, + BlockKind::PinkBanner => 422, + BlockKind::GrayBanner => 423, + BlockKind::LightGrayBanner => 424, + BlockKind::CyanBanner => 425, + BlockKind::PurpleBanner => 426, + BlockKind::BlueBanner => 427, + BlockKind::BrownBanner => 428, + BlockKind::GreenBanner => 429, + BlockKind::RedBanner => 430, + BlockKind::BlackBanner => 431, + BlockKind::WhiteWallBanner => 432, + BlockKind::OrangeWallBanner => 433, + BlockKind::MagentaWallBanner => 434, + BlockKind::LightBlueWallBanner => 435, + BlockKind::YellowWallBanner => 436, + BlockKind::LimeWallBanner => 437, + BlockKind::PinkWallBanner => 438, + BlockKind::GrayWallBanner => 439, + BlockKind::LightGrayWallBanner => 440, + BlockKind::CyanWallBanner => 441, + BlockKind::PurpleWallBanner => 442, + BlockKind::BlueWallBanner => 443, + BlockKind::BrownWallBanner => 444, + BlockKind::GreenWallBanner => 445, + BlockKind::RedWallBanner => 446, + BlockKind::BlackWallBanner => 447, + BlockKind::RedSandstone => 448, + BlockKind::ChiseledRedSandstone => 449, + BlockKind::CutRedSandstone => 450, + BlockKind::RedSandstoneStairs => 451, + BlockKind::OakSlab => 452, + BlockKind::SpruceSlab => 453, + BlockKind::BirchSlab => 454, + BlockKind::JungleSlab => 455, + BlockKind::AcaciaSlab => 456, + BlockKind::DarkOakSlab => 457, + BlockKind::StoneSlab => 458, + BlockKind::SmoothStoneSlab => 459, + BlockKind::SandstoneSlab => 460, + BlockKind::CutSandstoneSlab => 461, + BlockKind::PetrifiedOakSlab => 462, + BlockKind::CobblestoneSlab => 463, + BlockKind::BrickSlab => 464, + BlockKind::StoneBrickSlab => 465, + BlockKind::NetherBrickSlab => 466, + BlockKind::QuartzSlab => 467, + BlockKind::RedSandstoneSlab => 468, + BlockKind::CutRedSandstoneSlab => 469, + BlockKind::PurpurSlab => 470, + BlockKind::SmoothStone => 471, + BlockKind::SmoothSandstone => 472, + BlockKind::SmoothQuartz => 473, + BlockKind::SmoothRedSandstone => 474, + BlockKind::SpruceFenceGate => 475, + BlockKind::BirchFenceGate => 476, + BlockKind::JungleFenceGate => 477, + BlockKind::AcaciaFenceGate => 478, + BlockKind::DarkOakFenceGate => 479, + BlockKind::SpruceFence => 480, + BlockKind::BirchFence => 481, + BlockKind::JungleFence => 482, + BlockKind::AcaciaFence => 483, + BlockKind::DarkOakFence => 484, + BlockKind::SpruceDoor => 485, + BlockKind::BirchDoor => 486, + BlockKind::JungleDoor => 487, + BlockKind::AcaciaDoor => 488, + BlockKind::DarkOakDoor => 489, + BlockKind::EndRod => 490, + BlockKind::ChorusPlant => 491, + BlockKind::ChorusFlower => 492, + BlockKind::PurpurBlock => 493, + BlockKind::PurpurPillar => 494, + BlockKind::PurpurStairs => 495, + BlockKind::EndStoneBricks => 496, + BlockKind::Beetroots => 497, + BlockKind::GrassPath => 498, + BlockKind::EndGateway => 499, + BlockKind::RepeatingCommandBlock => 500, + BlockKind::ChainCommandBlock => 501, + BlockKind::FrostedIce => 502, + BlockKind::MagmaBlock => 503, + BlockKind::NetherWartBlock => 504, + BlockKind::RedNetherBricks => 505, + BlockKind::BoneBlock => 506, + BlockKind::StructureVoid => 507, + BlockKind::Observer => 508, + BlockKind::ShulkerBox => 509, + BlockKind::WhiteShulkerBox => 510, + BlockKind::OrangeShulkerBox => 511, + BlockKind::MagentaShulkerBox => 512, + BlockKind::LightBlueShulkerBox => 513, + BlockKind::YellowShulkerBox => 514, + BlockKind::LimeShulkerBox => 515, + BlockKind::PinkShulkerBox => 516, + BlockKind::GrayShulkerBox => 517, + BlockKind::LightGrayShulkerBox => 518, + BlockKind::CyanShulkerBox => 519, + BlockKind::PurpleShulkerBox => 520, + BlockKind::BlueShulkerBox => 521, + BlockKind::BrownShulkerBox => 522, + BlockKind::GreenShulkerBox => 523, + BlockKind::RedShulkerBox => 524, + BlockKind::BlackShulkerBox => 525, + BlockKind::WhiteGlazedTerracotta => 526, + BlockKind::OrangeGlazedTerracotta => 527, + BlockKind::MagentaGlazedTerracotta => 528, + BlockKind::LightBlueGlazedTerracotta => 529, + BlockKind::YellowGlazedTerracotta => 530, + BlockKind::LimeGlazedTerracotta => 531, + BlockKind::PinkGlazedTerracotta => 532, + BlockKind::GrayGlazedTerracotta => 533, + BlockKind::LightGrayGlazedTerracotta => 534, + BlockKind::CyanGlazedTerracotta => 535, + BlockKind::PurpleGlazedTerracotta => 536, + BlockKind::BlueGlazedTerracotta => 537, + BlockKind::BrownGlazedTerracotta => 538, + BlockKind::GreenGlazedTerracotta => 539, + BlockKind::RedGlazedTerracotta => 540, + BlockKind::BlackGlazedTerracotta => 541, + BlockKind::WhiteConcrete => 542, + BlockKind::OrangeConcrete => 543, + BlockKind::MagentaConcrete => 544, + BlockKind::LightBlueConcrete => 545, + BlockKind::YellowConcrete => 546, + BlockKind::LimeConcrete => 547, + BlockKind::PinkConcrete => 548, + BlockKind::GrayConcrete => 549, + BlockKind::LightGrayConcrete => 550, + BlockKind::CyanConcrete => 551, + BlockKind::PurpleConcrete => 552, + BlockKind::BlueConcrete => 553, + BlockKind::BrownConcrete => 554, + BlockKind::GreenConcrete => 555, + BlockKind::RedConcrete => 556, + BlockKind::BlackConcrete => 557, + BlockKind::WhiteConcretePowder => 558, + BlockKind::OrangeConcretePowder => 559, + BlockKind::MagentaConcretePowder => 560, + BlockKind::LightBlueConcretePowder => 561, + BlockKind::YellowConcretePowder => 562, + BlockKind::LimeConcretePowder => 563, + BlockKind::PinkConcretePowder => 564, + BlockKind::GrayConcretePowder => 565, + BlockKind::LightGrayConcretePowder => 566, + BlockKind::CyanConcretePowder => 567, + BlockKind::PurpleConcretePowder => 568, + BlockKind::BlueConcretePowder => 569, + BlockKind::BrownConcretePowder => 570, + BlockKind::GreenConcretePowder => 571, + BlockKind::RedConcretePowder => 572, + BlockKind::BlackConcretePowder => 573, + BlockKind::Kelp => 574, + BlockKind::KelpPlant => 575, + BlockKind::DriedKelpBlock => 576, + BlockKind::TurtleEgg => 577, + BlockKind::DeadTubeCoralBlock => 578, + BlockKind::DeadBrainCoralBlock => 579, + BlockKind::DeadBubbleCoralBlock => 580, + BlockKind::DeadFireCoralBlock => 581, + BlockKind::DeadHornCoralBlock => 582, + BlockKind::TubeCoralBlock => 583, + BlockKind::BrainCoralBlock => 584, + BlockKind::BubbleCoralBlock => 585, + BlockKind::FireCoralBlock => 586, + BlockKind::HornCoralBlock => 587, + BlockKind::DeadTubeCoral => 588, + BlockKind::DeadBrainCoral => 589, + BlockKind::DeadBubbleCoral => 590, + BlockKind::DeadFireCoral => 591, + BlockKind::DeadHornCoral => 592, + BlockKind::TubeCoral => 593, + BlockKind::BrainCoral => 594, + BlockKind::BubbleCoral => 595, + BlockKind::FireCoral => 596, + BlockKind::HornCoral => 597, + BlockKind::DeadTubeCoralFan => 598, + BlockKind::DeadBrainCoralFan => 599, + BlockKind::DeadBubbleCoralFan => 600, + BlockKind::DeadFireCoralFan => 601, + BlockKind::DeadHornCoralFan => 602, + BlockKind::TubeCoralFan => 603, + BlockKind::BrainCoralFan => 604, + BlockKind::BubbleCoralFan => 605, + BlockKind::FireCoralFan => 606, + BlockKind::HornCoralFan => 607, + BlockKind::DeadTubeCoralWallFan => 608, + BlockKind::DeadBrainCoralWallFan => 609, + BlockKind::DeadBubbleCoralWallFan => 610, + BlockKind::DeadFireCoralWallFan => 611, + BlockKind::DeadHornCoralWallFan => 612, + BlockKind::TubeCoralWallFan => 613, + BlockKind::BrainCoralWallFan => 614, + BlockKind::BubbleCoralWallFan => 615, + BlockKind::FireCoralWallFan => 616, + BlockKind::HornCoralWallFan => 617, + BlockKind::SeaPickle => 618, + BlockKind::BlueIce => 619, + BlockKind::Conduit => 620, + BlockKind::BambooSapling => 621, + BlockKind::Bamboo => 622, + BlockKind::PottedBamboo => 623, + BlockKind::VoidAir => 624, + BlockKind::CaveAir => 625, + BlockKind::BubbleColumn => 626, + BlockKind::PolishedGraniteStairs => 627, + BlockKind::SmoothRedSandstoneStairs => 628, + BlockKind::MossyStoneBrickStairs => 629, + BlockKind::PolishedDioriteStairs => 630, + BlockKind::MossyCobblestoneStairs => 631, + BlockKind::EndStoneBrickStairs => 632, + BlockKind::StoneStairs => 633, + BlockKind::SmoothSandstoneStairs => 634, + BlockKind::SmoothQuartzStairs => 635, + BlockKind::GraniteStairs => 636, + BlockKind::AndesiteStairs => 637, + BlockKind::RedNetherBrickStairs => 638, + BlockKind::PolishedAndesiteStairs => 639, + BlockKind::DioriteStairs => 640, + BlockKind::PolishedGraniteSlab => 641, + BlockKind::SmoothRedSandstoneSlab => 642, + BlockKind::MossyStoneBrickSlab => 643, + BlockKind::PolishedDioriteSlab => 644, + BlockKind::MossyCobblestoneSlab => 645, + BlockKind::EndStoneBrickSlab => 646, + BlockKind::SmoothSandstoneSlab => 647, + BlockKind::SmoothQuartzSlab => 648, + BlockKind::GraniteSlab => 649, + BlockKind::AndesiteSlab => 650, + BlockKind::RedNetherBrickSlab => 651, + BlockKind::PolishedAndesiteSlab => 652, + BlockKind::DioriteSlab => 653, + BlockKind::BrickWall => 654, + BlockKind::PrismarineWall => 655, + BlockKind::RedSandstoneWall => 656, + BlockKind::MossyStoneBrickWall => 657, + BlockKind::GraniteWall => 658, + BlockKind::StoneBrickWall => 659, + BlockKind::NetherBrickWall => 660, + BlockKind::AndesiteWall => 661, + BlockKind::RedNetherBrickWall => 662, + BlockKind::SandstoneWall => 663, + BlockKind::EndStoneBrickWall => 664, + BlockKind::DioriteWall => 665, + BlockKind::Scaffolding => 666, + BlockKind::Loom => 667, + BlockKind::Barrel => 668, + BlockKind::Smoker => 669, + BlockKind::BlastFurnace => 670, + BlockKind::CartographyTable => 671, + BlockKind::FletchingTable => 672, + BlockKind::Grindstone => 673, + BlockKind::Lectern => 674, + BlockKind::SmithingTable => 675, + BlockKind::Stonecutter => 676, + BlockKind::Bell => 677, + BlockKind::Lantern => 678, + BlockKind::SoulLantern => 679, + BlockKind::Campfire => 680, + BlockKind::SoulCampfire => 681, + BlockKind::SweetBerryBush => 682, + BlockKind::WarpedStem => 683, + BlockKind::StrippedWarpedStem => 684, + BlockKind::WarpedHyphae => 685, + BlockKind::StrippedWarpedHyphae => 686, + BlockKind::WarpedNylium => 687, + BlockKind::WarpedFungus => 688, + BlockKind::WarpedWartBlock => 689, + BlockKind::WarpedRoots => 690, + BlockKind::NetherSprouts => 691, + BlockKind::CrimsonStem => 692, + BlockKind::StrippedCrimsonStem => 693, + BlockKind::CrimsonHyphae => 694, + BlockKind::StrippedCrimsonHyphae => 695, + BlockKind::CrimsonNylium => 696, + BlockKind::CrimsonFungus => 697, + BlockKind::Shroomlight => 698, + BlockKind::WeepingVines => 699, + BlockKind::WeepingVinesPlant => 700, + BlockKind::TwistingVines => 701, + BlockKind::TwistingVinesPlant => 702, + BlockKind::CrimsonRoots => 703, + BlockKind::CrimsonPlanks => 704, + BlockKind::WarpedPlanks => 705, + BlockKind::CrimsonSlab => 706, + BlockKind::WarpedSlab => 707, + BlockKind::CrimsonPressurePlate => 708, + BlockKind::WarpedPressurePlate => 709, + BlockKind::CrimsonFence => 710, + BlockKind::WarpedFence => 711, + BlockKind::CrimsonTrapdoor => 712, + BlockKind::WarpedTrapdoor => 713, + BlockKind::CrimsonFenceGate => 714, + BlockKind::WarpedFenceGate => 715, + BlockKind::CrimsonStairs => 716, + BlockKind::WarpedStairs => 717, + BlockKind::CrimsonButton => 718, + BlockKind::WarpedButton => 719, + BlockKind::CrimsonDoor => 720, + BlockKind::WarpedDoor => 721, + BlockKind::CrimsonSign => 722, + BlockKind::WarpedSign => 723, + BlockKind::CrimsonWallSign => 724, + BlockKind::WarpedWallSign => 725, + BlockKind::StructureBlock => 726, + BlockKind::Jigsaw => 727, + BlockKind::Composter => 728, + BlockKind::Target => 729, + BlockKind::BeeNest => 730, + BlockKind::Beehive => 731, + BlockKind::HoneyBlock => 732, + BlockKind::HoneycombBlock => 733, + BlockKind::NetheriteBlock => 734, + BlockKind::AncientDebris => 735, + BlockKind::CryingObsidian => 736, + BlockKind::RespawnAnchor => 737, + BlockKind::PottedCrimsonFungus => 738, + BlockKind::PottedWarpedFungus => 739, + BlockKind::PottedCrimsonRoots => 740, + BlockKind::PottedWarpedRoots => 741, + BlockKind::Lodestone => 742, + BlockKind::Blackstone => 743, + BlockKind::BlackstoneStairs => 744, + BlockKind::BlackstoneWall => 745, + BlockKind::BlackstoneSlab => 746, + BlockKind::PolishedBlackstone => 747, + BlockKind::PolishedBlackstoneBricks => 748, + BlockKind::CrackedPolishedBlackstoneBricks => 749, + BlockKind::ChiseledPolishedBlackstone => 750, + BlockKind::PolishedBlackstoneBrickSlab => 751, + BlockKind::PolishedBlackstoneBrickStairs => 752, + BlockKind::PolishedBlackstoneBrickWall => 753, + BlockKind::GildedBlackstone => 754, + BlockKind::PolishedBlackstoneStairs => 755, + BlockKind::PolishedBlackstoneSlab => 756, + BlockKind::PolishedBlackstonePressurePlate => 757, + BlockKind::PolishedBlackstoneButton => 758, + BlockKind::PolishedBlackstoneWall => 759, + BlockKind::ChiseledNetherBricks => 760, + BlockKind::CrackedNetherBricks => 761, + BlockKind::QuartzBricks => 762, + } + } + + /// Gets a `BlockKind` by its `id`. + pub fn from_id(id: u32) -> Option { + match id { + 0 => Some(BlockKind::Air), + 1 => Some(BlockKind::Stone), + 2 => Some(BlockKind::Granite), + 3 => Some(BlockKind::PolishedGranite), + 4 => Some(BlockKind::Diorite), + 5 => Some(BlockKind::PolishedDiorite), + 6 => Some(BlockKind::Andesite), + 7 => Some(BlockKind::PolishedAndesite), + 8 => Some(BlockKind::GrassBlock), + 9 => Some(BlockKind::Dirt), + 10 => Some(BlockKind::CoarseDirt), + 11 => Some(BlockKind::Podzol), + 12 => Some(BlockKind::Cobblestone), + 13 => Some(BlockKind::OakPlanks), + 14 => Some(BlockKind::SprucePlanks), + 15 => Some(BlockKind::BirchPlanks), + 16 => Some(BlockKind::JunglePlanks), + 17 => Some(BlockKind::AcaciaPlanks), + 18 => Some(BlockKind::DarkOakPlanks), + 19 => Some(BlockKind::OakSapling), + 20 => Some(BlockKind::SpruceSapling), + 21 => Some(BlockKind::BirchSapling), + 22 => Some(BlockKind::JungleSapling), + 23 => Some(BlockKind::AcaciaSapling), + 24 => Some(BlockKind::DarkOakSapling), + 25 => Some(BlockKind::Bedrock), + 26 => Some(BlockKind::Water), + 27 => Some(BlockKind::Lava), + 28 => Some(BlockKind::Sand), + 29 => Some(BlockKind::RedSand), + 30 => Some(BlockKind::Gravel), + 31 => Some(BlockKind::GoldOre), + 32 => Some(BlockKind::IronOre), + 33 => Some(BlockKind::CoalOre), + 34 => Some(BlockKind::NetherGoldOre), + 35 => Some(BlockKind::OakLog), + 36 => Some(BlockKind::SpruceLog), + 37 => Some(BlockKind::BirchLog), + 38 => Some(BlockKind::JungleLog), + 39 => Some(BlockKind::AcaciaLog), + 40 => Some(BlockKind::DarkOakLog), + 41 => Some(BlockKind::StrippedSpruceLog), + 42 => Some(BlockKind::StrippedBirchLog), + 43 => Some(BlockKind::StrippedJungleLog), + 44 => Some(BlockKind::StrippedAcaciaLog), + 45 => Some(BlockKind::StrippedDarkOakLog), + 46 => Some(BlockKind::StrippedOakLog), + 47 => Some(BlockKind::OakWood), + 48 => Some(BlockKind::SpruceWood), + 49 => Some(BlockKind::BirchWood), + 50 => Some(BlockKind::JungleWood), + 51 => Some(BlockKind::AcaciaWood), + 52 => Some(BlockKind::DarkOakWood), + 53 => Some(BlockKind::StrippedOakWood), + 54 => Some(BlockKind::StrippedSpruceWood), + 55 => Some(BlockKind::StrippedBirchWood), + 56 => Some(BlockKind::StrippedJungleWood), + 57 => Some(BlockKind::StrippedAcaciaWood), + 58 => Some(BlockKind::StrippedDarkOakWood), + 59 => Some(BlockKind::OakLeaves), + 60 => Some(BlockKind::SpruceLeaves), + 61 => Some(BlockKind::BirchLeaves), + 62 => Some(BlockKind::JungleLeaves), + 63 => Some(BlockKind::AcaciaLeaves), + 64 => Some(BlockKind::DarkOakLeaves), + 65 => Some(BlockKind::Sponge), + 66 => Some(BlockKind::WetSponge), + 67 => Some(BlockKind::Glass), + 68 => Some(BlockKind::LapisOre), + 69 => Some(BlockKind::LapisBlock), + 70 => Some(BlockKind::Dispenser), + 71 => Some(BlockKind::Sandstone), + 72 => Some(BlockKind::ChiseledSandstone), + 73 => Some(BlockKind::CutSandstone), + 74 => Some(BlockKind::NoteBlock), + 75 => Some(BlockKind::WhiteBed), + 76 => Some(BlockKind::OrangeBed), + 77 => Some(BlockKind::MagentaBed), + 78 => Some(BlockKind::LightBlueBed), + 79 => Some(BlockKind::YellowBed), + 80 => Some(BlockKind::LimeBed), + 81 => Some(BlockKind::PinkBed), + 82 => Some(BlockKind::GrayBed), + 83 => Some(BlockKind::LightGrayBed), + 84 => Some(BlockKind::CyanBed), + 85 => Some(BlockKind::PurpleBed), + 86 => Some(BlockKind::BlueBed), + 87 => Some(BlockKind::BrownBed), + 88 => Some(BlockKind::GreenBed), + 89 => Some(BlockKind::RedBed), + 90 => Some(BlockKind::BlackBed), + 91 => Some(BlockKind::PoweredRail), + 92 => Some(BlockKind::DetectorRail), + 93 => Some(BlockKind::StickyPiston), + 94 => Some(BlockKind::Cobweb), + 95 => Some(BlockKind::Grass), + 96 => Some(BlockKind::Fern), + 97 => Some(BlockKind::DeadBush), + 98 => Some(BlockKind::Seagrass), + 99 => Some(BlockKind::TallSeagrass), + 100 => Some(BlockKind::Piston), + 101 => Some(BlockKind::PistonHead), + 102 => Some(BlockKind::WhiteWool), + 103 => Some(BlockKind::OrangeWool), + 104 => Some(BlockKind::MagentaWool), + 105 => Some(BlockKind::LightBlueWool), + 106 => Some(BlockKind::YellowWool), + 107 => Some(BlockKind::LimeWool), + 108 => Some(BlockKind::PinkWool), + 109 => Some(BlockKind::GrayWool), + 110 => Some(BlockKind::LightGrayWool), + 111 => Some(BlockKind::CyanWool), + 112 => Some(BlockKind::PurpleWool), + 113 => Some(BlockKind::BlueWool), + 114 => Some(BlockKind::BrownWool), + 115 => Some(BlockKind::GreenWool), + 116 => Some(BlockKind::RedWool), + 117 => Some(BlockKind::BlackWool), + 118 => Some(BlockKind::MovingPiston), + 119 => Some(BlockKind::Dandelion), + 120 => Some(BlockKind::Poppy), + 121 => Some(BlockKind::BlueOrchid), + 122 => Some(BlockKind::Allium), + 123 => Some(BlockKind::AzureBluet), + 124 => Some(BlockKind::RedTulip), + 125 => Some(BlockKind::OrangeTulip), + 126 => Some(BlockKind::WhiteTulip), + 127 => Some(BlockKind::PinkTulip), + 128 => Some(BlockKind::OxeyeDaisy), + 129 => Some(BlockKind::Cornflower), + 130 => Some(BlockKind::WitherRose), + 131 => Some(BlockKind::LilyOfTheValley), + 132 => Some(BlockKind::BrownMushroom), + 133 => Some(BlockKind::RedMushroom), + 134 => Some(BlockKind::GoldBlock), + 135 => Some(BlockKind::IronBlock), + 136 => Some(BlockKind::Bricks), + 137 => Some(BlockKind::Tnt), + 138 => Some(BlockKind::Bookshelf), + 139 => Some(BlockKind::MossyCobblestone), + 140 => Some(BlockKind::Obsidian), + 141 => Some(BlockKind::Torch), + 142 => Some(BlockKind::WallTorch), + 143 => Some(BlockKind::Fire), + 144 => Some(BlockKind::SoulFire), + 145 => Some(BlockKind::Spawner), + 146 => Some(BlockKind::OakStairs), + 147 => Some(BlockKind::Chest), + 148 => Some(BlockKind::RedstoneWire), + 149 => Some(BlockKind::DiamondOre), + 150 => Some(BlockKind::DiamondBlock), + 151 => Some(BlockKind::CraftingTable), + 152 => Some(BlockKind::Wheat), + 153 => Some(BlockKind::Farmland), + 154 => Some(BlockKind::Furnace), + 155 => Some(BlockKind::OakSign), + 156 => Some(BlockKind::SpruceSign), + 157 => Some(BlockKind::BirchSign), + 158 => Some(BlockKind::AcaciaSign), + 159 => Some(BlockKind::JungleSign), + 160 => Some(BlockKind::DarkOakSign), + 161 => Some(BlockKind::OakDoor), + 162 => Some(BlockKind::Ladder), + 163 => Some(BlockKind::Rail), + 164 => Some(BlockKind::CobblestoneStairs), + 165 => Some(BlockKind::OakWallSign), + 166 => Some(BlockKind::SpruceWallSign), + 167 => Some(BlockKind::BirchWallSign), + 168 => Some(BlockKind::AcaciaWallSign), + 169 => Some(BlockKind::JungleWallSign), + 170 => Some(BlockKind::DarkOakWallSign), + 171 => Some(BlockKind::Lever), + 172 => Some(BlockKind::StonePressurePlate), + 173 => Some(BlockKind::IronDoor), + 174 => Some(BlockKind::OakPressurePlate), + 175 => Some(BlockKind::SprucePressurePlate), + 176 => Some(BlockKind::BirchPressurePlate), + 177 => Some(BlockKind::JunglePressurePlate), + 178 => Some(BlockKind::AcaciaPressurePlate), + 179 => Some(BlockKind::DarkOakPressurePlate), + 180 => Some(BlockKind::RedstoneOre), + 181 => Some(BlockKind::RedstoneTorch), + 182 => Some(BlockKind::RedstoneWallTorch), + 183 => Some(BlockKind::StoneButton), + 184 => Some(BlockKind::Snow), + 185 => Some(BlockKind::Ice), + 186 => Some(BlockKind::SnowBlock), + 187 => Some(BlockKind::Cactus), + 188 => Some(BlockKind::Clay), + 189 => Some(BlockKind::SugarCane), + 190 => Some(BlockKind::Jukebox), + 191 => Some(BlockKind::OakFence), + 192 => Some(BlockKind::Pumpkin), + 193 => Some(BlockKind::Netherrack), + 194 => Some(BlockKind::SoulSand), + 195 => Some(BlockKind::SoulSoil), + 196 => Some(BlockKind::Basalt), + 197 => Some(BlockKind::PolishedBasalt), + 198 => Some(BlockKind::SoulTorch), + 199 => Some(BlockKind::SoulWallTorch), + 200 => Some(BlockKind::Glowstone), + 201 => Some(BlockKind::NetherPortal), + 202 => Some(BlockKind::CarvedPumpkin), + 203 => Some(BlockKind::JackOLantern), + 204 => Some(BlockKind::Cake), + 205 => Some(BlockKind::Repeater), + 206 => Some(BlockKind::WhiteStainedGlass), + 207 => Some(BlockKind::OrangeStainedGlass), + 208 => Some(BlockKind::MagentaStainedGlass), + 209 => Some(BlockKind::LightBlueStainedGlass), + 210 => Some(BlockKind::YellowStainedGlass), + 211 => Some(BlockKind::LimeStainedGlass), + 212 => Some(BlockKind::PinkStainedGlass), + 213 => Some(BlockKind::GrayStainedGlass), + 214 => Some(BlockKind::LightGrayStainedGlass), + 215 => Some(BlockKind::CyanStainedGlass), + 216 => Some(BlockKind::PurpleStainedGlass), + 217 => Some(BlockKind::BlueStainedGlass), + 218 => Some(BlockKind::BrownStainedGlass), + 219 => Some(BlockKind::GreenStainedGlass), + 220 => Some(BlockKind::RedStainedGlass), + 221 => Some(BlockKind::BlackStainedGlass), + 222 => Some(BlockKind::OakTrapdoor), + 223 => Some(BlockKind::SpruceTrapdoor), + 224 => Some(BlockKind::BirchTrapdoor), + 225 => Some(BlockKind::JungleTrapdoor), + 226 => Some(BlockKind::AcaciaTrapdoor), + 227 => Some(BlockKind::DarkOakTrapdoor), + 228 => Some(BlockKind::StoneBricks), + 229 => Some(BlockKind::MossyStoneBricks), + 230 => Some(BlockKind::CrackedStoneBricks), + 231 => Some(BlockKind::ChiseledStoneBricks), + 232 => Some(BlockKind::InfestedStone), + 233 => Some(BlockKind::InfestedCobblestone), + 234 => Some(BlockKind::InfestedStoneBricks), + 235 => Some(BlockKind::InfestedMossyStoneBricks), + 236 => Some(BlockKind::InfestedCrackedStoneBricks), + 237 => Some(BlockKind::InfestedChiseledStoneBricks), + 238 => Some(BlockKind::BrownMushroomBlock), + 239 => Some(BlockKind::RedMushroomBlock), + 240 => Some(BlockKind::MushroomStem), + 241 => Some(BlockKind::IronBars), + 242 => Some(BlockKind::Chain), + 243 => Some(BlockKind::GlassPane), + 244 => Some(BlockKind::Melon), + 245 => Some(BlockKind::AttachedPumpkinStem), + 246 => Some(BlockKind::AttachedMelonStem), + 247 => Some(BlockKind::PumpkinStem), + 248 => Some(BlockKind::MelonStem), + 249 => Some(BlockKind::Vine), + 250 => Some(BlockKind::OakFenceGate), + 251 => Some(BlockKind::BrickStairs), + 252 => Some(BlockKind::StoneBrickStairs), + 253 => Some(BlockKind::Mycelium), + 254 => Some(BlockKind::LilyPad), + 255 => Some(BlockKind::NetherBricks), + 256 => Some(BlockKind::NetherBrickFence), + 257 => Some(BlockKind::NetherBrickStairs), + 258 => Some(BlockKind::NetherWart), + 259 => Some(BlockKind::EnchantingTable), + 260 => Some(BlockKind::BrewingStand), + 261 => Some(BlockKind::Cauldron), + 262 => Some(BlockKind::EndPortal), + 263 => Some(BlockKind::EndPortalFrame), + 264 => Some(BlockKind::EndStone), + 265 => Some(BlockKind::DragonEgg), + 266 => Some(BlockKind::RedstoneLamp), + 267 => Some(BlockKind::Cocoa), + 268 => Some(BlockKind::SandstoneStairs), + 269 => Some(BlockKind::EmeraldOre), + 270 => Some(BlockKind::EnderChest), + 271 => Some(BlockKind::TripwireHook), + 272 => Some(BlockKind::Tripwire), + 273 => Some(BlockKind::EmeraldBlock), + 274 => Some(BlockKind::SpruceStairs), + 275 => Some(BlockKind::BirchStairs), + 276 => Some(BlockKind::JungleStairs), + 277 => Some(BlockKind::CommandBlock), + 278 => Some(BlockKind::Beacon), + 279 => Some(BlockKind::CobblestoneWall), + 280 => Some(BlockKind::MossyCobblestoneWall), + 281 => Some(BlockKind::FlowerPot), + 282 => Some(BlockKind::PottedOakSapling), + 283 => Some(BlockKind::PottedSpruceSapling), + 284 => Some(BlockKind::PottedBirchSapling), + 285 => Some(BlockKind::PottedJungleSapling), + 286 => Some(BlockKind::PottedAcaciaSapling), + 287 => Some(BlockKind::PottedDarkOakSapling), + 288 => Some(BlockKind::PottedFern), + 289 => Some(BlockKind::PottedDandelion), + 290 => Some(BlockKind::PottedPoppy), + 291 => Some(BlockKind::PottedBlueOrchid), + 292 => Some(BlockKind::PottedAllium), + 293 => Some(BlockKind::PottedAzureBluet), + 294 => Some(BlockKind::PottedRedTulip), + 295 => Some(BlockKind::PottedOrangeTulip), + 296 => Some(BlockKind::PottedWhiteTulip), + 297 => Some(BlockKind::PottedPinkTulip), + 298 => Some(BlockKind::PottedOxeyeDaisy), + 299 => Some(BlockKind::PottedCornflower), + 300 => Some(BlockKind::PottedLilyOfTheValley), + 301 => Some(BlockKind::PottedWitherRose), + 302 => Some(BlockKind::PottedRedMushroom), + 303 => Some(BlockKind::PottedBrownMushroom), + 304 => Some(BlockKind::PottedDeadBush), + 305 => Some(BlockKind::PottedCactus), + 306 => Some(BlockKind::Carrots), + 307 => Some(BlockKind::Potatoes), + 308 => Some(BlockKind::OakButton), + 309 => Some(BlockKind::SpruceButton), + 310 => Some(BlockKind::BirchButton), + 311 => Some(BlockKind::JungleButton), + 312 => Some(BlockKind::AcaciaButton), + 313 => Some(BlockKind::DarkOakButton), + 314 => Some(BlockKind::SkeletonSkull), + 315 => Some(BlockKind::SkeletonWallSkull), + 316 => Some(BlockKind::WitherSkeletonSkull), + 317 => Some(BlockKind::WitherSkeletonWallSkull), + 318 => Some(BlockKind::ZombieHead), + 319 => Some(BlockKind::ZombieWallHead), + 320 => Some(BlockKind::PlayerHead), + 321 => Some(BlockKind::PlayerWallHead), + 322 => Some(BlockKind::CreeperHead), + 323 => Some(BlockKind::CreeperWallHead), + 324 => Some(BlockKind::DragonHead), + 325 => Some(BlockKind::DragonWallHead), + 326 => Some(BlockKind::Anvil), + 327 => Some(BlockKind::ChippedAnvil), + 328 => Some(BlockKind::DamagedAnvil), + 329 => Some(BlockKind::TrappedChest), + 330 => Some(BlockKind::LightWeightedPressurePlate), + 331 => Some(BlockKind::HeavyWeightedPressurePlate), + 332 => Some(BlockKind::Comparator), + 333 => Some(BlockKind::DaylightDetector), + 334 => Some(BlockKind::RedstoneBlock), + 335 => Some(BlockKind::NetherQuartzOre), + 336 => Some(BlockKind::Hopper), + 337 => Some(BlockKind::QuartzBlock), + 338 => Some(BlockKind::ChiseledQuartzBlock), + 339 => Some(BlockKind::QuartzPillar), + 340 => Some(BlockKind::QuartzStairs), + 341 => Some(BlockKind::ActivatorRail), + 342 => Some(BlockKind::Dropper), + 343 => Some(BlockKind::WhiteTerracotta), + 344 => Some(BlockKind::OrangeTerracotta), + 345 => Some(BlockKind::MagentaTerracotta), + 346 => Some(BlockKind::LightBlueTerracotta), + 347 => Some(BlockKind::YellowTerracotta), + 348 => Some(BlockKind::LimeTerracotta), + 349 => Some(BlockKind::PinkTerracotta), + 350 => Some(BlockKind::GrayTerracotta), + 351 => Some(BlockKind::LightGrayTerracotta), + 352 => Some(BlockKind::CyanTerracotta), + 353 => Some(BlockKind::PurpleTerracotta), + 354 => Some(BlockKind::BlueTerracotta), + 355 => Some(BlockKind::BrownTerracotta), + 356 => Some(BlockKind::GreenTerracotta), + 357 => Some(BlockKind::RedTerracotta), + 358 => Some(BlockKind::BlackTerracotta), + 359 => Some(BlockKind::WhiteStainedGlassPane), + 360 => Some(BlockKind::OrangeStainedGlassPane), + 361 => Some(BlockKind::MagentaStainedGlassPane), + 362 => Some(BlockKind::LightBlueStainedGlassPane), + 363 => Some(BlockKind::YellowStainedGlassPane), + 364 => Some(BlockKind::LimeStainedGlassPane), + 365 => Some(BlockKind::PinkStainedGlassPane), + 366 => Some(BlockKind::GrayStainedGlassPane), + 367 => Some(BlockKind::LightGrayStainedGlassPane), + 368 => Some(BlockKind::CyanStainedGlassPane), + 369 => Some(BlockKind::PurpleStainedGlassPane), + 370 => Some(BlockKind::BlueStainedGlassPane), + 371 => Some(BlockKind::BrownStainedGlassPane), + 372 => Some(BlockKind::GreenStainedGlassPane), + 373 => Some(BlockKind::RedStainedGlassPane), + 374 => Some(BlockKind::BlackStainedGlassPane), + 375 => Some(BlockKind::AcaciaStairs), + 376 => Some(BlockKind::DarkOakStairs), + 377 => Some(BlockKind::SlimeBlock), + 378 => Some(BlockKind::Barrier), + 379 => Some(BlockKind::IronTrapdoor), + 380 => Some(BlockKind::Prismarine), + 381 => Some(BlockKind::PrismarineBricks), + 382 => Some(BlockKind::DarkPrismarine), + 383 => Some(BlockKind::PrismarineStairs), + 384 => Some(BlockKind::PrismarineBrickStairs), + 385 => Some(BlockKind::DarkPrismarineStairs), + 386 => Some(BlockKind::PrismarineSlab), + 387 => Some(BlockKind::PrismarineBrickSlab), + 388 => Some(BlockKind::DarkPrismarineSlab), + 389 => Some(BlockKind::SeaLantern), + 390 => Some(BlockKind::HayBlock), + 391 => Some(BlockKind::WhiteCarpet), + 392 => Some(BlockKind::OrangeCarpet), + 393 => Some(BlockKind::MagentaCarpet), + 394 => Some(BlockKind::LightBlueCarpet), + 395 => Some(BlockKind::YellowCarpet), + 396 => Some(BlockKind::LimeCarpet), + 397 => Some(BlockKind::PinkCarpet), + 398 => Some(BlockKind::GrayCarpet), + 399 => Some(BlockKind::LightGrayCarpet), + 400 => Some(BlockKind::CyanCarpet), + 401 => Some(BlockKind::PurpleCarpet), + 402 => Some(BlockKind::BlueCarpet), + 403 => Some(BlockKind::BrownCarpet), + 404 => Some(BlockKind::GreenCarpet), + 405 => Some(BlockKind::RedCarpet), + 406 => Some(BlockKind::BlackCarpet), + 407 => Some(BlockKind::Terracotta), + 408 => Some(BlockKind::CoalBlock), + 409 => Some(BlockKind::PackedIce), + 410 => Some(BlockKind::Sunflower), + 411 => Some(BlockKind::Lilac), + 412 => Some(BlockKind::RoseBush), + 413 => Some(BlockKind::Peony), + 414 => Some(BlockKind::TallGrass), + 415 => Some(BlockKind::LargeFern), + 416 => Some(BlockKind::WhiteBanner), + 417 => Some(BlockKind::OrangeBanner), + 418 => Some(BlockKind::MagentaBanner), + 419 => Some(BlockKind::LightBlueBanner), + 420 => Some(BlockKind::YellowBanner), + 421 => Some(BlockKind::LimeBanner), + 422 => Some(BlockKind::PinkBanner), + 423 => Some(BlockKind::GrayBanner), + 424 => Some(BlockKind::LightGrayBanner), + 425 => Some(BlockKind::CyanBanner), + 426 => Some(BlockKind::PurpleBanner), + 427 => Some(BlockKind::BlueBanner), + 428 => Some(BlockKind::BrownBanner), + 429 => Some(BlockKind::GreenBanner), + 430 => Some(BlockKind::RedBanner), + 431 => Some(BlockKind::BlackBanner), + 432 => Some(BlockKind::WhiteWallBanner), + 433 => Some(BlockKind::OrangeWallBanner), + 434 => Some(BlockKind::MagentaWallBanner), + 435 => Some(BlockKind::LightBlueWallBanner), + 436 => Some(BlockKind::YellowWallBanner), + 437 => Some(BlockKind::LimeWallBanner), + 438 => Some(BlockKind::PinkWallBanner), + 439 => Some(BlockKind::GrayWallBanner), + 440 => Some(BlockKind::LightGrayWallBanner), + 441 => Some(BlockKind::CyanWallBanner), + 442 => Some(BlockKind::PurpleWallBanner), + 443 => Some(BlockKind::BlueWallBanner), + 444 => Some(BlockKind::BrownWallBanner), + 445 => Some(BlockKind::GreenWallBanner), + 446 => Some(BlockKind::RedWallBanner), + 447 => Some(BlockKind::BlackWallBanner), + 448 => Some(BlockKind::RedSandstone), + 449 => Some(BlockKind::ChiseledRedSandstone), + 450 => Some(BlockKind::CutRedSandstone), + 451 => Some(BlockKind::RedSandstoneStairs), + 452 => Some(BlockKind::OakSlab), + 453 => Some(BlockKind::SpruceSlab), + 454 => Some(BlockKind::BirchSlab), + 455 => Some(BlockKind::JungleSlab), + 456 => Some(BlockKind::AcaciaSlab), + 457 => Some(BlockKind::DarkOakSlab), + 458 => Some(BlockKind::StoneSlab), + 459 => Some(BlockKind::SmoothStoneSlab), + 460 => Some(BlockKind::SandstoneSlab), + 461 => Some(BlockKind::CutSandstoneSlab), + 462 => Some(BlockKind::PetrifiedOakSlab), + 463 => Some(BlockKind::CobblestoneSlab), + 464 => Some(BlockKind::BrickSlab), + 465 => Some(BlockKind::StoneBrickSlab), + 466 => Some(BlockKind::NetherBrickSlab), + 467 => Some(BlockKind::QuartzSlab), + 468 => Some(BlockKind::RedSandstoneSlab), + 469 => Some(BlockKind::CutRedSandstoneSlab), + 470 => Some(BlockKind::PurpurSlab), + 471 => Some(BlockKind::SmoothStone), + 472 => Some(BlockKind::SmoothSandstone), + 473 => Some(BlockKind::SmoothQuartz), + 474 => Some(BlockKind::SmoothRedSandstone), + 475 => Some(BlockKind::SpruceFenceGate), + 476 => Some(BlockKind::BirchFenceGate), + 477 => Some(BlockKind::JungleFenceGate), + 478 => Some(BlockKind::AcaciaFenceGate), + 479 => Some(BlockKind::DarkOakFenceGate), + 480 => Some(BlockKind::SpruceFence), + 481 => Some(BlockKind::BirchFence), + 482 => Some(BlockKind::JungleFence), + 483 => Some(BlockKind::AcaciaFence), + 484 => Some(BlockKind::DarkOakFence), + 485 => Some(BlockKind::SpruceDoor), + 486 => Some(BlockKind::BirchDoor), + 487 => Some(BlockKind::JungleDoor), + 488 => Some(BlockKind::AcaciaDoor), + 489 => Some(BlockKind::DarkOakDoor), + 490 => Some(BlockKind::EndRod), + 491 => Some(BlockKind::ChorusPlant), + 492 => Some(BlockKind::ChorusFlower), + 493 => Some(BlockKind::PurpurBlock), + 494 => Some(BlockKind::PurpurPillar), + 495 => Some(BlockKind::PurpurStairs), + 496 => Some(BlockKind::EndStoneBricks), + 497 => Some(BlockKind::Beetroots), + 498 => Some(BlockKind::GrassPath), + 499 => Some(BlockKind::EndGateway), + 500 => Some(BlockKind::RepeatingCommandBlock), + 501 => Some(BlockKind::ChainCommandBlock), + 502 => Some(BlockKind::FrostedIce), + 503 => Some(BlockKind::MagmaBlock), + 504 => Some(BlockKind::NetherWartBlock), + 505 => Some(BlockKind::RedNetherBricks), + 506 => Some(BlockKind::BoneBlock), + 507 => Some(BlockKind::StructureVoid), + 508 => Some(BlockKind::Observer), + 509 => Some(BlockKind::ShulkerBox), + 510 => Some(BlockKind::WhiteShulkerBox), + 511 => Some(BlockKind::OrangeShulkerBox), + 512 => Some(BlockKind::MagentaShulkerBox), + 513 => Some(BlockKind::LightBlueShulkerBox), + 514 => Some(BlockKind::YellowShulkerBox), + 515 => Some(BlockKind::LimeShulkerBox), + 516 => Some(BlockKind::PinkShulkerBox), + 517 => Some(BlockKind::GrayShulkerBox), + 518 => Some(BlockKind::LightGrayShulkerBox), + 519 => Some(BlockKind::CyanShulkerBox), + 520 => Some(BlockKind::PurpleShulkerBox), + 521 => Some(BlockKind::BlueShulkerBox), + 522 => Some(BlockKind::BrownShulkerBox), + 523 => Some(BlockKind::GreenShulkerBox), + 524 => Some(BlockKind::RedShulkerBox), + 525 => Some(BlockKind::BlackShulkerBox), + 526 => Some(BlockKind::WhiteGlazedTerracotta), + 527 => Some(BlockKind::OrangeGlazedTerracotta), + 528 => Some(BlockKind::MagentaGlazedTerracotta), + 529 => Some(BlockKind::LightBlueGlazedTerracotta), + 530 => Some(BlockKind::YellowGlazedTerracotta), + 531 => Some(BlockKind::LimeGlazedTerracotta), + 532 => Some(BlockKind::PinkGlazedTerracotta), + 533 => Some(BlockKind::GrayGlazedTerracotta), + 534 => Some(BlockKind::LightGrayGlazedTerracotta), + 535 => Some(BlockKind::CyanGlazedTerracotta), + 536 => Some(BlockKind::PurpleGlazedTerracotta), + 537 => Some(BlockKind::BlueGlazedTerracotta), + 538 => Some(BlockKind::BrownGlazedTerracotta), + 539 => Some(BlockKind::GreenGlazedTerracotta), + 540 => Some(BlockKind::RedGlazedTerracotta), + 541 => Some(BlockKind::BlackGlazedTerracotta), + 542 => Some(BlockKind::WhiteConcrete), + 543 => Some(BlockKind::OrangeConcrete), + 544 => Some(BlockKind::MagentaConcrete), + 545 => Some(BlockKind::LightBlueConcrete), + 546 => Some(BlockKind::YellowConcrete), + 547 => Some(BlockKind::LimeConcrete), + 548 => Some(BlockKind::PinkConcrete), + 549 => Some(BlockKind::GrayConcrete), + 550 => Some(BlockKind::LightGrayConcrete), + 551 => Some(BlockKind::CyanConcrete), + 552 => Some(BlockKind::PurpleConcrete), + 553 => Some(BlockKind::BlueConcrete), + 554 => Some(BlockKind::BrownConcrete), + 555 => Some(BlockKind::GreenConcrete), + 556 => Some(BlockKind::RedConcrete), + 557 => Some(BlockKind::BlackConcrete), + 558 => Some(BlockKind::WhiteConcretePowder), + 559 => Some(BlockKind::OrangeConcretePowder), + 560 => Some(BlockKind::MagentaConcretePowder), + 561 => Some(BlockKind::LightBlueConcretePowder), + 562 => Some(BlockKind::YellowConcretePowder), + 563 => Some(BlockKind::LimeConcretePowder), + 564 => Some(BlockKind::PinkConcretePowder), + 565 => Some(BlockKind::GrayConcretePowder), + 566 => Some(BlockKind::LightGrayConcretePowder), + 567 => Some(BlockKind::CyanConcretePowder), + 568 => Some(BlockKind::PurpleConcretePowder), + 569 => Some(BlockKind::BlueConcretePowder), + 570 => Some(BlockKind::BrownConcretePowder), + 571 => Some(BlockKind::GreenConcretePowder), + 572 => Some(BlockKind::RedConcretePowder), + 573 => Some(BlockKind::BlackConcretePowder), + 574 => Some(BlockKind::Kelp), + 575 => Some(BlockKind::KelpPlant), + 576 => Some(BlockKind::DriedKelpBlock), + 577 => Some(BlockKind::TurtleEgg), + 578 => Some(BlockKind::DeadTubeCoralBlock), + 579 => Some(BlockKind::DeadBrainCoralBlock), + 580 => Some(BlockKind::DeadBubbleCoralBlock), + 581 => Some(BlockKind::DeadFireCoralBlock), + 582 => Some(BlockKind::DeadHornCoralBlock), + 583 => Some(BlockKind::TubeCoralBlock), + 584 => Some(BlockKind::BrainCoralBlock), + 585 => Some(BlockKind::BubbleCoralBlock), + 586 => Some(BlockKind::FireCoralBlock), + 587 => Some(BlockKind::HornCoralBlock), + 588 => Some(BlockKind::DeadTubeCoral), + 589 => Some(BlockKind::DeadBrainCoral), + 590 => Some(BlockKind::DeadBubbleCoral), + 591 => Some(BlockKind::DeadFireCoral), + 592 => Some(BlockKind::DeadHornCoral), + 593 => Some(BlockKind::TubeCoral), + 594 => Some(BlockKind::BrainCoral), + 595 => Some(BlockKind::BubbleCoral), + 596 => Some(BlockKind::FireCoral), + 597 => Some(BlockKind::HornCoral), + 598 => Some(BlockKind::DeadTubeCoralFan), + 599 => Some(BlockKind::DeadBrainCoralFan), + 600 => Some(BlockKind::DeadBubbleCoralFan), + 601 => Some(BlockKind::DeadFireCoralFan), + 602 => Some(BlockKind::DeadHornCoralFan), + 603 => Some(BlockKind::TubeCoralFan), + 604 => Some(BlockKind::BrainCoralFan), + 605 => Some(BlockKind::BubbleCoralFan), + 606 => Some(BlockKind::FireCoralFan), + 607 => Some(BlockKind::HornCoralFan), + 608 => Some(BlockKind::DeadTubeCoralWallFan), + 609 => Some(BlockKind::DeadBrainCoralWallFan), + 610 => Some(BlockKind::DeadBubbleCoralWallFan), + 611 => Some(BlockKind::DeadFireCoralWallFan), + 612 => Some(BlockKind::DeadHornCoralWallFan), + 613 => Some(BlockKind::TubeCoralWallFan), + 614 => Some(BlockKind::BrainCoralWallFan), + 615 => Some(BlockKind::BubbleCoralWallFan), + 616 => Some(BlockKind::FireCoralWallFan), + 617 => Some(BlockKind::HornCoralWallFan), + 618 => Some(BlockKind::SeaPickle), + 619 => Some(BlockKind::BlueIce), + 620 => Some(BlockKind::Conduit), + 621 => Some(BlockKind::BambooSapling), + 622 => Some(BlockKind::Bamboo), + 623 => Some(BlockKind::PottedBamboo), + 624 => Some(BlockKind::VoidAir), + 625 => Some(BlockKind::CaveAir), + 626 => Some(BlockKind::BubbleColumn), + 627 => Some(BlockKind::PolishedGraniteStairs), + 628 => Some(BlockKind::SmoothRedSandstoneStairs), + 629 => Some(BlockKind::MossyStoneBrickStairs), + 630 => Some(BlockKind::PolishedDioriteStairs), + 631 => Some(BlockKind::MossyCobblestoneStairs), + 632 => Some(BlockKind::EndStoneBrickStairs), + 633 => Some(BlockKind::StoneStairs), + 634 => Some(BlockKind::SmoothSandstoneStairs), + 635 => Some(BlockKind::SmoothQuartzStairs), + 636 => Some(BlockKind::GraniteStairs), + 637 => Some(BlockKind::AndesiteStairs), + 638 => Some(BlockKind::RedNetherBrickStairs), + 639 => Some(BlockKind::PolishedAndesiteStairs), + 640 => Some(BlockKind::DioriteStairs), + 641 => Some(BlockKind::PolishedGraniteSlab), + 642 => Some(BlockKind::SmoothRedSandstoneSlab), + 643 => Some(BlockKind::MossyStoneBrickSlab), + 644 => Some(BlockKind::PolishedDioriteSlab), + 645 => Some(BlockKind::MossyCobblestoneSlab), + 646 => Some(BlockKind::EndStoneBrickSlab), + 647 => Some(BlockKind::SmoothSandstoneSlab), + 648 => Some(BlockKind::SmoothQuartzSlab), + 649 => Some(BlockKind::GraniteSlab), + 650 => Some(BlockKind::AndesiteSlab), + 651 => Some(BlockKind::RedNetherBrickSlab), + 652 => Some(BlockKind::PolishedAndesiteSlab), + 653 => Some(BlockKind::DioriteSlab), + 654 => Some(BlockKind::BrickWall), + 655 => Some(BlockKind::PrismarineWall), + 656 => Some(BlockKind::RedSandstoneWall), + 657 => Some(BlockKind::MossyStoneBrickWall), + 658 => Some(BlockKind::GraniteWall), + 659 => Some(BlockKind::StoneBrickWall), + 660 => Some(BlockKind::NetherBrickWall), + 661 => Some(BlockKind::AndesiteWall), + 662 => Some(BlockKind::RedNetherBrickWall), + 663 => Some(BlockKind::SandstoneWall), + 664 => Some(BlockKind::EndStoneBrickWall), + 665 => Some(BlockKind::DioriteWall), + 666 => Some(BlockKind::Scaffolding), + 667 => Some(BlockKind::Loom), + 668 => Some(BlockKind::Barrel), + 669 => Some(BlockKind::Smoker), + 670 => Some(BlockKind::BlastFurnace), + 671 => Some(BlockKind::CartographyTable), + 672 => Some(BlockKind::FletchingTable), + 673 => Some(BlockKind::Grindstone), + 674 => Some(BlockKind::Lectern), + 675 => Some(BlockKind::SmithingTable), + 676 => Some(BlockKind::Stonecutter), + 677 => Some(BlockKind::Bell), + 678 => Some(BlockKind::Lantern), + 679 => Some(BlockKind::SoulLantern), + 680 => Some(BlockKind::Campfire), + 681 => Some(BlockKind::SoulCampfire), + 682 => Some(BlockKind::SweetBerryBush), + 683 => Some(BlockKind::WarpedStem), + 684 => Some(BlockKind::StrippedWarpedStem), + 685 => Some(BlockKind::WarpedHyphae), + 686 => Some(BlockKind::StrippedWarpedHyphae), + 687 => Some(BlockKind::WarpedNylium), + 688 => Some(BlockKind::WarpedFungus), + 689 => Some(BlockKind::WarpedWartBlock), + 690 => Some(BlockKind::WarpedRoots), + 691 => Some(BlockKind::NetherSprouts), + 692 => Some(BlockKind::CrimsonStem), + 693 => Some(BlockKind::StrippedCrimsonStem), + 694 => Some(BlockKind::CrimsonHyphae), + 695 => Some(BlockKind::StrippedCrimsonHyphae), + 696 => Some(BlockKind::CrimsonNylium), + 697 => Some(BlockKind::CrimsonFungus), + 698 => Some(BlockKind::Shroomlight), + 699 => Some(BlockKind::WeepingVines), + 700 => Some(BlockKind::WeepingVinesPlant), + 701 => Some(BlockKind::TwistingVines), + 702 => Some(BlockKind::TwistingVinesPlant), + 703 => Some(BlockKind::CrimsonRoots), + 704 => Some(BlockKind::CrimsonPlanks), + 705 => Some(BlockKind::WarpedPlanks), + 706 => Some(BlockKind::CrimsonSlab), + 707 => Some(BlockKind::WarpedSlab), + 708 => Some(BlockKind::CrimsonPressurePlate), + 709 => Some(BlockKind::WarpedPressurePlate), + 710 => Some(BlockKind::CrimsonFence), + 711 => Some(BlockKind::WarpedFence), + 712 => Some(BlockKind::CrimsonTrapdoor), + 713 => Some(BlockKind::WarpedTrapdoor), + 714 => Some(BlockKind::CrimsonFenceGate), + 715 => Some(BlockKind::WarpedFenceGate), + 716 => Some(BlockKind::CrimsonStairs), + 717 => Some(BlockKind::WarpedStairs), + 718 => Some(BlockKind::CrimsonButton), + 719 => Some(BlockKind::WarpedButton), + 720 => Some(BlockKind::CrimsonDoor), + 721 => Some(BlockKind::WarpedDoor), + 722 => Some(BlockKind::CrimsonSign), + 723 => Some(BlockKind::WarpedSign), + 724 => Some(BlockKind::CrimsonWallSign), + 725 => Some(BlockKind::WarpedWallSign), + 726 => Some(BlockKind::StructureBlock), + 727 => Some(BlockKind::Jigsaw), + 728 => Some(BlockKind::Composter), + 729 => Some(BlockKind::Target), + 730 => Some(BlockKind::BeeNest), + 731 => Some(BlockKind::Beehive), + 732 => Some(BlockKind::HoneyBlock), + 733 => Some(BlockKind::HoneycombBlock), + 734 => Some(BlockKind::NetheriteBlock), + 735 => Some(BlockKind::AncientDebris), + 736 => Some(BlockKind::CryingObsidian), + 737 => Some(BlockKind::RespawnAnchor), + 738 => Some(BlockKind::PottedCrimsonFungus), + 739 => Some(BlockKind::PottedWarpedFungus), + 740 => Some(BlockKind::PottedCrimsonRoots), + 741 => Some(BlockKind::PottedWarpedRoots), + 742 => Some(BlockKind::Lodestone), + 743 => Some(BlockKind::Blackstone), + 744 => Some(BlockKind::BlackstoneStairs), + 745 => Some(BlockKind::BlackstoneWall), + 746 => Some(BlockKind::BlackstoneSlab), + 747 => Some(BlockKind::PolishedBlackstone), + 748 => Some(BlockKind::PolishedBlackstoneBricks), + 749 => Some(BlockKind::CrackedPolishedBlackstoneBricks), + 750 => Some(BlockKind::ChiseledPolishedBlackstone), + 751 => Some(BlockKind::PolishedBlackstoneBrickSlab), + 752 => Some(BlockKind::PolishedBlackstoneBrickStairs), + 753 => Some(BlockKind::PolishedBlackstoneBrickWall), + 754 => Some(BlockKind::GildedBlackstone), + 755 => Some(BlockKind::PolishedBlackstoneStairs), + 756 => Some(BlockKind::PolishedBlackstoneSlab), + 757 => Some(BlockKind::PolishedBlackstonePressurePlate), + 758 => Some(BlockKind::PolishedBlackstoneButton), + 759 => Some(BlockKind::PolishedBlackstoneWall), + 760 => Some(BlockKind::ChiseledNetherBricks), + 761 => Some(BlockKind::CrackedNetherBricks), + 762 => Some(BlockKind::QuartzBricks), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `name` property of this `BlockKind`. + pub fn name(&self) -> &'static str { + match self { + BlockKind::Air => "air", + BlockKind::Stone => "stone", + BlockKind::Granite => "granite", + BlockKind::PolishedGranite => "polished_granite", + BlockKind::Diorite => "diorite", + BlockKind::PolishedDiorite => "polished_diorite", + BlockKind::Andesite => "andesite", + BlockKind::PolishedAndesite => "polished_andesite", + BlockKind::GrassBlock => "grass_block", + BlockKind::Dirt => "dirt", + BlockKind::CoarseDirt => "coarse_dirt", + BlockKind::Podzol => "podzol", + BlockKind::Cobblestone => "cobblestone", + BlockKind::OakPlanks => "oak_planks", + BlockKind::SprucePlanks => "spruce_planks", + BlockKind::BirchPlanks => "birch_planks", + BlockKind::JunglePlanks => "jungle_planks", + BlockKind::AcaciaPlanks => "acacia_planks", + BlockKind::DarkOakPlanks => "dark_oak_planks", + BlockKind::OakSapling => "oak_sapling", + BlockKind::SpruceSapling => "spruce_sapling", + BlockKind::BirchSapling => "birch_sapling", + BlockKind::JungleSapling => "jungle_sapling", + BlockKind::AcaciaSapling => "acacia_sapling", + BlockKind::DarkOakSapling => "dark_oak_sapling", + BlockKind::Bedrock => "bedrock", + BlockKind::Water => "water", + BlockKind::Lava => "lava", + BlockKind::Sand => "sand", + BlockKind::RedSand => "red_sand", + BlockKind::Gravel => "gravel", + BlockKind::GoldOre => "gold_ore", + BlockKind::IronOre => "iron_ore", + BlockKind::CoalOre => "coal_ore", + BlockKind::NetherGoldOre => "nether_gold_ore", + BlockKind::OakLog => "oak_log", + BlockKind::SpruceLog => "spruce_log", + BlockKind::BirchLog => "birch_log", + BlockKind::JungleLog => "jungle_log", + BlockKind::AcaciaLog => "acacia_log", + BlockKind::DarkOakLog => "dark_oak_log", + BlockKind::StrippedSpruceLog => "stripped_spruce_log", + BlockKind::StrippedBirchLog => "stripped_birch_log", + BlockKind::StrippedJungleLog => "stripped_jungle_log", + BlockKind::StrippedAcaciaLog => "stripped_acacia_log", + BlockKind::StrippedDarkOakLog => "stripped_dark_oak_log", + BlockKind::StrippedOakLog => "stripped_oak_log", + BlockKind::OakWood => "oak_wood", + BlockKind::SpruceWood => "spruce_wood", + BlockKind::BirchWood => "birch_wood", + BlockKind::JungleWood => "jungle_wood", + BlockKind::AcaciaWood => "acacia_wood", + BlockKind::DarkOakWood => "dark_oak_wood", + BlockKind::StrippedOakWood => "stripped_oak_wood", + BlockKind::StrippedSpruceWood => "stripped_spruce_wood", + BlockKind::StrippedBirchWood => "stripped_birch_wood", + BlockKind::StrippedJungleWood => "stripped_jungle_wood", + BlockKind::StrippedAcaciaWood => "stripped_acacia_wood", + BlockKind::StrippedDarkOakWood => "stripped_dark_oak_wood", + BlockKind::OakLeaves => "oak_leaves", + BlockKind::SpruceLeaves => "spruce_leaves", + BlockKind::BirchLeaves => "birch_leaves", + BlockKind::JungleLeaves => "jungle_leaves", + BlockKind::AcaciaLeaves => "acacia_leaves", + BlockKind::DarkOakLeaves => "dark_oak_leaves", + BlockKind::Sponge => "sponge", + BlockKind::WetSponge => "wet_sponge", + BlockKind::Glass => "glass", + BlockKind::LapisOre => "lapis_ore", + BlockKind::LapisBlock => "lapis_block", + BlockKind::Dispenser => "dispenser", + BlockKind::Sandstone => "sandstone", + BlockKind::ChiseledSandstone => "chiseled_sandstone", + BlockKind::CutSandstone => "cut_sandstone", + BlockKind::NoteBlock => "note_block", + BlockKind::WhiteBed => "white_bed", + BlockKind::OrangeBed => "orange_bed", + BlockKind::MagentaBed => "magenta_bed", + BlockKind::LightBlueBed => "light_blue_bed", + BlockKind::YellowBed => "yellow_bed", + BlockKind::LimeBed => "lime_bed", + BlockKind::PinkBed => "pink_bed", + BlockKind::GrayBed => "gray_bed", + BlockKind::LightGrayBed => "light_gray_bed", + BlockKind::CyanBed => "cyan_bed", + BlockKind::PurpleBed => "purple_bed", + BlockKind::BlueBed => "blue_bed", + BlockKind::BrownBed => "brown_bed", + BlockKind::GreenBed => "green_bed", + BlockKind::RedBed => "red_bed", + BlockKind::BlackBed => "black_bed", + BlockKind::PoweredRail => "powered_rail", + BlockKind::DetectorRail => "detector_rail", + BlockKind::StickyPiston => "sticky_piston", + BlockKind::Cobweb => "cobweb", + BlockKind::Grass => "grass", + BlockKind::Fern => "fern", + BlockKind::DeadBush => "dead_bush", + BlockKind::Seagrass => "seagrass", + BlockKind::TallSeagrass => "tall_seagrass", + BlockKind::Piston => "piston", + BlockKind::PistonHead => "piston_head", + BlockKind::WhiteWool => "white_wool", + BlockKind::OrangeWool => "orange_wool", + BlockKind::MagentaWool => "magenta_wool", + BlockKind::LightBlueWool => "light_blue_wool", + BlockKind::YellowWool => "yellow_wool", + BlockKind::LimeWool => "lime_wool", + BlockKind::PinkWool => "pink_wool", + BlockKind::GrayWool => "gray_wool", + BlockKind::LightGrayWool => "light_gray_wool", + BlockKind::CyanWool => "cyan_wool", + BlockKind::PurpleWool => "purple_wool", + BlockKind::BlueWool => "blue_wool", + BlockKind::BrownWool => "brown_wool", + BlockKind::GreenWool => "green_wool", + BlockKind::RedWool => "red_wool", + BlockKind::BlackWool => "black_wool", + BlockKind::MovingPiston => "moving_piston", + BlockKind::Dandelion => "dandelion", + BlockKind::Poppy => "poppy", + BlockKind::BlueOrchid => "blue_orchid", + BlockKind::Allium => "allium", + BlockKind::AzureBluet => "azure_bluet", + BlockKind::RedTulip => "red_tulip", + BlockKind::OrangeTulip => "orange_tulip", + BlockKind::WhiteTulip => "white_tulip", + BlockKind::PinkTulip => "pink_tulip", + BlockKind::OxeyeDaisy => "oxeye_daisy", + BlockKind::Cornflower => "cornflower", + BlockKind::WitherRose => "wither_rose", + BlockKind::LilyOfTheValley => "lily_of_the_valley", + BlockKind::BrownMushroom => "brown_mushroom", + BlockKind::RedMushroom => "red_mushroom", + BlockKind::GoldBlock => "gold_block", + BlockKind::IronBlock => "iron_block", + BlockKind::Bricks => "bricks", + BlockKind::Tnt => "tnt", + BlockKind::Bookshelf => "bookshelf", + BlockKind::MossyCobblestone => "mossy_cobblestone", + BlockKind::Obsidian => "obsidian", + BlockKind::Torch => "torch", + BlockKind::WallTorch => "wall_torch", + BlockKind::Fire => "fire", + BlockKind::SoulFire => "soul_fire", + BlockKind::Spawner => "spawner", + BlockKind::OakStairs => "oak_stairs", + BlockKind::Chest => "chest", + BlockKind::RedstoneWire => "redstone_wire", + BlockKind::DiamondOre => "diamond_ore", + BlockKind::DiamondBlock => "diamond_block", + BlockKind::CraftingTable => "crafting_table", + BlockKind::Wheat => "wheat", + BlockKind::Farmland => "farmland", + BlockKind::Furnace => "furnace", + BlockKind::OakSign => "oak_sign", + BlockKind::SpruceSign => "spruce_sign", + BlockKind::BirchSign => "birch_sign", + BlockKind::AcaciaSign => "acacia_sign", + BlockKind::JungleSign => "jungle_sign", + BlockKind::DarkOakSign => "dark_oak_sign", + BlockKind::OakDoor => "oak_door", + BlockKind::Ladder => "ladder", + BlockKind::Rail => "rail", + BlockKind::CobblestoneStairs => "cobblestone_stairs", + BlockKind::OakWallSign => "oak_wall_sign", + BlockKind::SpruceWallSign => "spruce_wall_sign", + BlockKind::BirchWallSign => "birch_wall_sign", + BlockKind::AcaciaWallSign => "acacia_wall_sign", + BlockKind::JungleWallSign => "jungle_wall_sign", + BlockKind::DarkOakWallSign => "dark_oak_wall_sign", + BlockKind::Lever => "lever", + BlockKind::StonePressurePlate => "stone_pressure_plate", + BlockKind::IronDoor => "iron_door", + BlockKind::OakPressurePlate => "oak_pressure_plate", + BlockKind::SprucePressurePlate => "spruce_pressure_plate", + BlockKind::BirchPressurePlate => "birch_pressure_plate", + BlockKind::JunglePressurePlate => "jungle_pressure_plate", + BlockKind::AcaciaPressurePlate => "acacia_pressure_plate", + BlockKind::DarkOakPressurePlate => "dark_oak_pressure_plate", + BlockKind::RedstoneOre => "redstone_ore", + BlockKind::RedstoneTorch => "redstone_torch", + BlockKind::RedstoneWallTorch => "redstone_wall_torch", + BlockKind::StoneButton => "stone_button", + BlockKind::Snow => "snow", + BlockKind::Ice => "ice", + BlockKind::SnowBlock => "snow_block", + BlockKind::Cactus => "cactus", + BlockKind::Clay => "clay", + BlockKind::SugarCane => "sugar_cane", + BlockKind::Jukebox => "jukebox", + BlockKind::OakFence => "oak_fence", + BlockKind::Pumpkin => "pumpkin", + BlockKind::Netherrack => "netherrack", + BlockKind::SoulSand => "soul_sand", + BlockKind::SoulSoil => "soul_soil", + BlockKind::Basalt => "basalt", + BlockKind::PolishedBasalt => "polished_basalt", + BlockKind::SoulTorch => "soul_torch", + BlockKind::SoulWallTorch => "soul_wall_torch", + BlockKind::Glowstone => "glowstone", + BlockKind::NetherPortal => "nether_portal", + BlockKind::CarvedPumpkin => "carved_pumpkin", + BlockKind::JackOLantern => "jack_o_lantern", + BlockKind::Cake => "cake", + BlockKind::Repeater => "repeater", + BlockKind::WhiteStainedGlass => "white_stained_glass", + BlockKind::OrangeStainedGlass => "orange_stained_glass", + BlockKind::MagentaStainedGlass => "magenta_stained_glass", + BlockKind::LightBlueStainedGlass => "light_blue_stained_glass", + BlockKind::YellowStainedGlass => "yellow_stained_glass", + BlockKind::LimeStainedGlass => "lime_stained_glass", + BlockKind::PinkStainedGlass => "pink_stained_glass", + BlockKind::GrayStainedGlass => "gray_stained_glass", + BlockKind::LightGrayStainedGlass => "light_gray_stained_glass", + BlockKind::CyanStainedGlass => "cyan_stained_glass", + BlockKind::PurpleStainedGlass => "purple_stained_glass", + BlockKind::BlueStainedGlass => "blue_stained_glass", + BlockKind::BrownStainedGlass => "brown_stained_glass", + BlockKind::GreenStainedGlass => "green_stained_glass", + BlockKind::RedStainedGlass => "red_stained_glass", + BlockKind::BlackStainedGlass => "black_stained_glass", + BlockKind::OakTrapdoor => "oak_trapdoor", + BlockKind::SpruceTrapdoor => "spruce_trapdoor", + BlockKind::BirchTrapdoor => "birch_trapdoor", + BlockKind::JungleTrapdoor => "jungle_trapdoor", + BlockKind::AcaciaTrapdoor => "acacia_trapdoor", + BlockKind::DarkOakTrapdoor => "dark_oak_trapdoor", + BlockKind::StoneBricks => "stone_bricks", + BlockKind::MossyStoneBricks => "mossy_stone_bricks", + BlockKind::CrackedStoneBricks => "cracked_stone_bricks", + BlockKind::ChiseledStoneBricks => "chiseled_stone_bricks", + BlockKind::InfestedStone => "infested_stone", + BlockKind::InfestedCobblestone => "infested_cobblestone", + BlockKind::InfestedStoneBricks => "infested_stone_bricks", + BlockKind::InfestedMossyStoneBricks => "infested_mossy_stone_bricks", + BlockKind::InfestedCrackedStoneBricks => "infested_cracked_stone_bricks", + BlockKind::InfestedChiseledStoneBricks => "infested_chiseled_stone_bricks", + BlockKind::BrownMushroomBlock => "brown_mushroom_block", + BlockKind::RedMushroomBlock => "red_mushroom_block", + BlockKind::MushroomStem => "mushroom_stem", + BlockKind::IronBars => "iron_bars", + BlockKind::Chain => "chain", + BlockKind::GlassPane => "glass_pane", + BlockKind::Melon => "melon", + BlockKind::AttachedPumpkinStem => "attached_pumpkin_stem", + BlockKind::AttachedMelonStem => "attached_melon_stem", + BlockKind::PumpkinStem => "pumpkin_stem", + BlockKind::MelonStem => "melon_stem", + BlockKind::Vine => "vine", + BlockKind::OakFenceGate => "oak_fence_gate", + BlockKind::BrickStairs => "brick_stairs", + BlockKind::StoneBrickStairs => "stone_brick_stairs", + BlockKind::Mycelium => "mycelium", + BlockKind::LilyPad => "lily_pad", + BlockKind::NetherBricks => "nether_bricks", + BlockKind::NetherBrickFence => "nether_brick_fence", + BlockKind::NetherBrickStairs => "nether_brick_stairs", + BlockKind::NetherWart => "nether_wart", + BlockKind::EnchantingTable => "enchanting_table", + BlockKind::BrewingStand => "brewing_stand", + BlockKind::Cauldron => "cauldron", + BlockKind::EndPortal => "end_portal", + BlockKind::EndPortalFrame => "end_portal_frame", + BlockKind::EndStone => "end_stone", + BlockKind::DragonEgg => "dragon_egg", + BlockKind::RedstoneLamp => "redstone_lamp", + BlockKind::Cocoa => "cocoa", + BlockKind::SandstoneStairs => "sandstone_stairs", + BlockKind::EmeraldOre => "emerald_ore", + BlockKind::EnderChest => "ender_chest", + BlockKind::TripwireHook => "tripwire_hook", + BlockKind::Tripwire => "tripwire", + BlockKind::EmeraldBlock => "emerald_block", + BlockKind::SpruceStairs => "spruce_stairs", + BlockKind::BirchStairs => "birch_stairs", + BlockKind::JungleStairs => "jungle_stairs", + BlockKind::CommandBlock => "command_block", + BlockKind::Beacon => "beacon", + BlockKind::CobblestoneWall => "cobblestone_wall", + BlockKind::MossyCobblestoneWall => "mossy_cobblestone_wall", + BlockKind::FlowerPot => "flower_pot", + BlockKind::PottedOakSapling => "potted_oak_sapling", + BlockKind::PottedSpruceSapling => "potted_spruce_sapling", + BlockKind::PottedBirchSapling => "potted_birch_sapling", + BlockKind::PottedJungleSapling => "potted_jungle_sapling", + BlockKind::PottedAcaciaSapling => "potted_acacia_sapling", + BlockKind::PottedDarkOakSapling => "potted_dark_oak_sapling", + BlockKind::PottedFern => "potted_fern", + BlockKind::PottedDandelion => "potted_dandelion", + BlockKind::PottedPoppy => "potted_poppy", + BlockKind::PottedBlueOrchid => "potted_blue_orchid", + BlockKind::PottedAllium => "potted_allium", + BlockKind::PottedAzureBluet => "potted_azure_bluet", + BlockKind::PottedRedTulip => "potted_red_tulip", + BlockKind::PottedOrangeTulip => "potted_orange_tulip", + BlockKind::PottedWhiteTulip => "potted_white_tulip", + BlockKind::PottedPinkTulip => "potted_pink_tulip", + BlockKind::PottedOxeyeDaisy => "potted_oxeye_daisy", + BlockKind::PottedCornflower => "potted_cornflower", + BlockKind::PottedLilyOfTheValley => "potted_lily_of_the_valley", + BlockKind::PottedWitherRose => "potted_wither_rose", + BlockKind::PottedRedMushroom => "potted_red_mushroom", + BlockKind::PottedBrownMushroom => "potted_brown_mushroom", + BlockKind::PottedDeadBush => "potted_dead_bush", + BlockKind::PottedCactus => "potted_cactus", + BlockKind::Carrots => "carrots", + BlockKind::Potatoes => "potatoes", + BlockKind::OakButton => "oak_button", + BlockKind::SpruceButton => "spruce_button", + BlockKind::BirchButton => "birch_button", + BlockKind::JungleButton => "jungle_button", + BlockKind::AcaciaButton => "acacia_button", + BlockKind::DarkOakButton => "dark_oak_button", + BlockKind::SkeletonSkull => "skeleton_skull", + BlockKind::SkeletonWallSkull => "skeleton_wall_skull", + BlockKind::WitherSkeletonSkull => "wither_skeleton_skull", + BlockKind::WitherSkeletonWallSkull => "wither_skeleton_wall_skull", + BlockKind::ZombieHead => "zombie_head", + BlockKind::ZombieWallHead => "zombie_wall_head", + BlockKind::PlayerHead => "player_head", + BlockKind::PlayerWallHead => "player_wall_head", + BlockKind::CreeperHead => "creeper_head", + BlockKind::CreeperWallHead => "creeper_wall_head", + BlockKind::DragonHead => "dragon_head", + BlockKind::DragonWallHead => "dragon_wall_head", + BlockKind::Anvil => "anvil", + BlockKind::ChippedAnvil => "chipped_anvil", + BlockKind::DamagedAnvil => "damaged_anvil", + BlockKind::TrappedChest => "trapped_chest", + BlockKind::LightWeightedPressurePlate => "light_weighted_pressure_plate", + BlockKind::HeavyWeightedPressurePlate => "heavy_weighted_pressure_plate", + BlockKind::Comparator => "comparator", + BlockKind::DaylightDetector => "daylight_detector", + BlockKind::RedstoneBlock => "redstone_block", + BlockKind::NetherQuartzOre => "nether_quartz_ore", + BlockKind::Hopper => "hopper", + BlockKind::QuartzBlock => "quartz_block", + BlockKind::ChiseledQuartzBlock => "chiseled_quartz_block", + BlockKind::QuartzPillar => "quartz_pillar", + BlockKind::QuartzStairs => "quartz_stairs", + BlockKind::ActivatorRail => "activator_rail", + BlockKind::Dropper => "dropper", + BlockKind::WhiteTerracotta => "white_terracotta", + BlockKind::OrangeTerracotta => "orange_terracotta", + BlockKind::MagentaTerracotta => "magenta_terracotta", + BlockKind::LightBlueTerracotta => "light_blue_terracotta", + BlockKind::YellowTerracotta => "yellow_terracotta", + BlockKind::LimeTerracotta => "lime_terracotta", + BlockKind::PinkTerracotta => "pink_terracotta", + BlockKind::GrayTerracotta => "gray_terracotta", + BlockKind::LightGrayTerracotta => "light_gray_terracotta", + BlockKind::CyanTerracotta => "cyan_terracotta", + BlockKind::PurpleTerracotta => "purple_terracotta", + BlockKind::BlueTerracotta => "blue_terracotta", + BlockKind::BrownTerracotta => "brown_terracotta", + BlockKind::GreenTerracotta => "green_terracotta", + BlockKind::RedTerracotta => "red_terracotta", + BlockKind::BlackTerracotta => "black_terracotta", + BlockKind::WhiteStainedGlassPane => "white_stained_glass_pane", + BlockKind::OrangeStainedGlassPane => "orange_stained_glass_pane", + BlockKind::MagentaStainedGlassPane => "magenta_stained_glass_pane", + BlockKind::LightBlueStainedGlassPane => "light_blue_stained_glass_pane", + BlockKind::YellowStainedGlassPane => "yellow_stained_glass_pane", + BlockKind::LimeStainedGlassPane => "lime_stained_glass_pane", + BlockKind::PinkStainedGlassPane => "pink_stained_glass_pane", + BlockKind::GrayStainedGlassPane => "gray_stained_glass_pane", + BlockKind::LightGrayStainedGlassPane => "light_gray_stained_glass_pane", + BlockKind::CyanStainedGlassPane => "cyan_stained_glass_pane", + BlockKind::PurpleStainedGlassPane => "purple_stained_glass_pane", + BlockKind::BlueStainedGlassPane => "blue_stained_glass_pane", + BlockKind::BrownStainedGlassPane => "brown_stained_glass_pane", + BlockKind::GreenStainedGlassPane => "green_stained_glass_pane", + BlockKind::RedStainedGlassPane => "red_stained_glass_pane", + BlockKind::BlackStainedGlassPane => "black_stained_glass_pane", + BlockKind::AcaciaStairs => "acacia_stairs", + BlockKind::DarkOakStairs => "dark_oak_stairs", + BlockKind::SlimeBlock => "slime_block", + BlockKind::Barrier => "barrier", + BlockKind::IronTrapdoor => "iron_trapdoor", + BlockKind::Prismarine => "prismarine", + BlockKind::PrismarineBricks => "prismarine_bricks", + BlockKind::DarkPrismarine => "dark_prismarine", + BlockKind::PrismarineStairs => "prismarine_stairs", + BlockKind::PrismarineBrickStairs => "prismarine_brick_stairs", + BlockKind::DarkPrismarineStairs => "dark_prismarine_stairs", + BlockKind::PrismarineSlab => "prismarine_slab", + BlockKind::PrismarineBrickSlab => "prismarine_brick_slab", + BlockKind::DarkPrismarineSlab => "dark_prismarine_slab", + BlockKind::SeaLantern => "sea_lantern", + BlockKind::HayBlock => "hay_block", + BlockKind::WhiteCarpet => "white_carpet", + BlockKind::OrangeCarpet => "orange_carpet", + BlockKind::MagentaCarpet => "magenta_carpet", + BlockKind::LightBlueCarpet => "light_blue_carpet", + BlockKind::YellowCarpet => "yellow_carpet", + BlockKind::LimeCarpet => "lime_carpet", + BlockKind::PinkCarpet => "pink_carpet", + BlockKind::GrayCarpet => "gray_carpet", + BlockKind::LightGrayCarpet => "light_gray_carpet", + BlockKind::CyanCarpet => "cyan_carpet", + BlockKind::PurpleCarpet => "purple_carpet", + BlockKind::BlueCarpet => "blue_carpet", + BlockKind::BrownCarpet => "brown_carpet", + BlockKind::GreenCarpet => "green_carpet", + BlockKind::RedCarpet => "red_carpet", + BlockKind::BlackCarpet => "black_carpet", + BlockKind::Terracotta => "terracotta", + BlockKind::CoalBlock => "coal_block", + BlockKind::PackedIce => "packed_ice", + BlockKind::Sunflower => "sunflower", + BlockKind::Lilac => "lilac", + BlockKind::RoseBush => "rose_bush", + BlockKind::Peony => "peony", + BlockKind::TallGrass => "tall_grass", + BlockKind::LargeFern => "large_fern", + BlockKind::WhiteBanner => "white_banner", + BlockKind::OrangeBanner => "orange_banner", + BlockKind::MagentaBanner => "magenta_banner", + BlockKind::LightBlueBanner => "light_blue_banner", + BlockKind::YellowBanner => "yellow_banner", + BlockKind::LimeBanner => "lime_banner", + BlockKind::PinkBanner => "pink_banner", + BlockKind::GrayBanner => "gray_banner", + BlockKind::LightGrayBanner => "light_gray_banner", + BlockKind::CyanBanner => "cyan_banner", + BlockKind::PurpleBanner => "purple_banner", + BlockKind::BlueBanner => "blue_banner", + BlockKind::BrownBanner => "brown_banner", + BlockKind::GreenBanner => "green_banner", + BlockKind::RedBanner => "red_banner", + BlockKind::BlackBanner => "black_banner", + BlockKind::WhiteWallBanner => "white_wall_banner", + BlockKind::OrangeWallBanner => "orange_wall_banner", + BlockKind::MagentaWallBanner => "magenta_wall_banner", + BlockKind::LightBlueWallBanner => "light_blue_wall_banner", + BlockKind::YellowWallBanner => "yellow_wall_banner", + BlockKind::LimeWallBanner => "lime_wall_banner", + BlockKind::PinkWallBanner => "pink_wall_banner", + BlockKind::GrayWallBanner => "gray_wall_banner", + BlockKind::LightGrayWallBanner => "light_gray_wall_banner", + BlockKind::CyanWallBanner => "cyan_wall_banner", + BlockKind::PurpleWallBanner => "purple_wall_banner", + BlockKind::BlueWallBanner => "blue_wall_banner", + BlockKind::BrownWallBanner => "brown_wall_banner", + BlockKind::GreenWallBanner => "green_wall_banner", + BlockKind::RedWallBanner => "red_wall_banner", + BlockKind::BlackWallBanner => "black_wall_banner", + BlockKind::RedSandstone => "red_sandstone", + BlockKind::ChiseledRedSandstone => "chiseled_red_sandstone", + BlockKind::CutRedSandstone => "cut_red_sandstone", + BlockKind::RedSandstoneStairs => "red_sandstone_stairs", + BlockKind::OakSlab => "oak_slab", + BlockKind::SpruceSlab => "spruce_slab", + BlockKind::BirchSlab => "birch_slab", + BlockKind::JungleSlab => "jungle_slab", + BlockKind::AcaciaSlab => "acacia_slab", + BlockKind::DarkOakSlab => "dark_oak_slab", + BlockKind::StoneSlab => "stone_slab", + BlockKind::SmoothStoneSlab => "smooth_stone_slab", + BlockKind::SandstoneSlab => "sandstone_slab", + BlockKind::CutSandstoneSlab => "cut_sandstone_slab", + BlockKind::PetrifiedOakSlab => "petrified_oak_slab", + BlockKind::CobblestoneSlab => "cobblestone_slab", + BlockKind::BrickSlab => "brick_slab", + BlockKind::StoneBrickSlab => "stone_brick_slab", + BlockKind::NetherBrickSlab => "nether_brick_slab", + BlockKind::QuartzSlab => "quartz_slab", + BlockKind::RedSandstoneSlab => "red_sandstone_slab", + BlockKind::CutRedSandstoneSlab => "cut_red_sandstone_slab", + BlockKind::PurpurSlab => "purpur_slab", + BlockKind::SmoothStone => "smooth_stone", + BlockKind::SmoothSandstone => "smooth_sandstone", + BlockKind::SmoothQuartz => "smooth_quartz", + BlockKind::SmoothRedSandstone => "smooth_red_sandstone", + BlockKind::SpruceFenceGate => "spruce_fence_gate", + BlockKind::BirchFenceGate => "birch_fence_gate", + BlockKind::JungleFenceGate => "jungle_fence_gate", + BlockKind::AcaciaFenceGate => "acacia_fence_gate", + BlockKind::DarkOakFenceGate => "dark_oak_fence_gate", + BlockKind::SpruceFence => "spruce_fence", + BlockKind::BirchFence => "birch_fence", + BlockKind::JungleFence => "jungle_fence", + BlockKind::AcaciaFence => "acacia_fence", + BlockKind::DarkOakFence => "dark_oak_fence", + BlockKind::SpruceDoor => "spruce_door", + BlockKind::BirchDoor => "birch_door", + BlockKind::JungleDoor => "jungle_door", + BlockKind::AcaciaDoor => "acacia_door", + BlockKind::DarkOakDoor => "dark_oak_door", + BlockKind::EndRod => "end_rod", + BlockKind::ChorusPlant => "chorus_plant", + BlockKind::ChorusFlower => "chorus_flower", + BlockKind::PurpurBlock => "purpur_block", + BlockKind::PurpurPillar => "purpur_pillar", + BlockKind::PurpurStairs => "purpur_stairs", + BlockKind::EndStoneBricks => "end_stone_bricks", + BlockKind::Beetroots => "beetroots", + BlockKind::GrassPath => "grass_path", + BlockKind::EndGateway => "end_gateway", + BlockKind::RepeatingCommandBlock => "repeating_command_block", + BlockKind::ChainCommandBlock => "chain_command_block", + BlockKind::FrostedIce => "frosted_ice", + BlockKind::MagmaBlock => "magma_block", + BlockKind::NetherWartBlock => "nether_wart_block", + BlockKind::RedNetherBricks => "red_nether_bricks", + BlockKind::BoneBlock => "bone_block", + BlockKind::StructureVoid => "structure_void", + BlockKind::Observer => "observer", + BlockKind::ShulkerBox => "shulker_box", + BlockKind::WhiteShulkerBox => "white_shulker_box", + BlockKind::OrangeShulkerBox => "orange_shulker_box", + BlockKind::MagentaShulkerBox => "magenta_shulker_box", + BlockKind::LightBlueShulkerBox => "light_blue_shulker_box", + BlockKind::YellowShulkerBox => "yellow_shulker_box", + BlockKind::LimeShulkerBox => "lime_shulker_box", + BlockKind::PinkShulkerBox => "pink_shulker_box", + BlockKind::GrayShulkerBox => "gray_shulker_box", + BlockKind::LightGrayShulkerBox => "light_gray_shulker_box", + BlockKind::CyanShulkerBox => "cyan_shulker_box", + BlockKind::PurpleShulkerBox => "purple_shulker_box", + BlockKind::BlueShulkerBox => "blue_shulker_box", + BlockKind::BrownShulkerBox => "brown_shulker_box", + BlockKind::GreenShulkerBox => "green_shulker_box", + BlockKind::RedShulkerBox => "red_shulker_box", + BlockKind::BlackShulkerBox => "black_shulker_box", + BlockKind::WhiteGlazedTerracotta => "white_glazed_terracotta", + BlockKind::OrangeGlazedTerracotta => "orange_glazed_terracotta", + BlockKind::MagentaGlazedTerracotta => "magenta_glazed_terracotta", + BlockKind::LightBlueGlazedTerracotta => "light_blue_glazed_terracotta", + BlockKind::YellowGlazedTerracotta => "yellow_glazed_terracotta", + BlockKind::LimeGlazedTerracotta => "lime_glazed_terracotta", + BlockKind::PinkGlazedTerracotta => "pink_glazed_terracotta", + BlockKind::GrayGlazedTerracotta => "gray_glazed_terracotta", + BlockKind::LightGrayGlazedTerracotta => "light_gray_glazed_terracotta", + BlockKind::CyanGlazedTerracotta => "cyan_glazed_terracotta", + BlockKind::PurpleGlazedTerracotta => "purple_glazed_terracotta", + BlockKind::BlueGlazedTerracotta => "blue_glazed_terracotta", + BlockKind::BrownGlazedTerracotta => "brown_glazed_terracotta", + BlockKind::GreenGlazedTerracotta => "green_glazed_terracotta", + BlockKind::RedGlazedTerracotta => "red_glazed_terracotta", + BlockKind::BlackGlazedTerracotta => "black_glazed_terracotta", + BlockKind::WhiteConcrete => "white_concrete", + BlockKind::OrangeConcrete => "orange_concrete", + BlockKind::MagentaConcrete => "magenta_concrete", + BlockKind::LightBlueConcrete => "light_blue_concrete", + BlockKind::YellowConcrete => "yellow_concrete", + BlockKind::LimeConcrete => "lime_concrete", + BlockKind::PinkConcrete => "pink_concrete", + BlockKind::GrayConcrete => "gray_concrete", + BlockKind::LightGrayConcrete => "light_gray_concrete", + BlockKind::CyanConcrete => "cyan_concrete", + BlockKind::PurpleConcrete => "purple_concrete", + BlockKind::BlueConcrete => "blue_concrete", + BlockKind::BrownConcrete => "brown_concrete", + BlockKind::GreenConcrete => "green_concrete", + BlockKind::RedConcrete => "red_concrete", + BlockKind::BlackConcrete => "black_concrete", + BlockKind::WhiteConcretePowder => "white_concrete_powder", + BlockKind::OrangeConcretePowder => "orange_concrete_powder", + BlockKind::MagentaConcretePowder => "magenta_concrete_powder", + BlockKind::LightBlueConcretePowder => "light_blue_concrete_powder", + BlockKind::YellowConcretePowder => "yellow_concrete_powder", + BlockKind::LimeConcretePowder => "lime_concrete_powder", + BlockKind::PinkConcretePowder => "pink_concrete_powder", + BlockKind::GrayConcretePowder => "gray_concrete_powder", + BlockKind::LightGrayConcretePowder => "light_gray_concrete_powder", + BlockKind::CyanConcretePowder => "cyan_concrete_powder", + BlockKind::PurpleConcretePowder => "purple_concrete_powder", + BlockKind::BlueConcretePowder => "blue_concrete_powder", + BlockKind::BrownConcretePowder => "brown_concrete_powder", + BlockKind::GreenConcretePowder => "green_concrete_powder", + BlockKind::RedConcretePowder => "red_concrete_powder", + BlockKind::BlackConcretePowder => "black_concrete_powder", + BlockKind::Kelp => "kelp", + BlockKind::KelpPlant => "kelp_plant", + BlockKind::DriedKelpBlock => "dried_kelp_block", + BlockKind::TurtleEgg => "turtle_egg", + BlockKind::DeadTubeCoralBlock => "dead_tube_coral_block", + BlockKind::DeadBrainCoralBlock => "dead_brain_coral_block", + BlockKind::DeadBubbleCoralBlock => "dead_bubble_coral_block", + BlockKind::DeadFireCoralBlock => "dead_fire_coral_block", + BlockKind::DeadHornCoralBlock => "dead_horn_coral_block", + BlockKind::TubeCoralBlock => "tube_coral_block", + BlockKind::BrainCoralBlock => "brain_coral_block", + BlockKind::BubbleCoralBlock => "bubble_coral_block", + BlockKind::FireCoralBlock => "fire_coral_block", + BlockKind::HornCoralBlock => "horn_coral_block", + BlockKind::DeadTubeCoral => "dead_tube_coral", + BlockKind::DeadBrainCoral => "dead_brain_coral", + BlockKind::DeadBubbleCoral => "dead_bubble_coral", + BlockKind::DeadFireCoral => "dead_fire_coral", + BlockKind::DeadHornCoral => "dead_horn_coral", + BlockKind::TubeCoral => "tube_coral", + BlockKind::BrainCoral => "brain_coral", + BlockKind::BubbleCoral => "bubble_coral", + BlockKind::FireCoral => "fire_coral", + BlockKind::HornCoral => "horn_coral", + BlockKind::DeadTubeCoralFan => "dead_tube_coral_fan", + BlockKind::DeadBrainCoralFan => "dead_brain_coral_fan", + BlockKind::DeadBubbleCoralFan => "dead_bubble_coral_fan", + BlockKind::DeadFireCoralFan => "dead_fire_coral_fan", + BlockKind::DeadHornCoralFan => "dead_horn_coral_fan", + BlockKind::TubeCoralFan => "tube_coral_fan", + BlockKind::BrainCoralFan => "brain_coral_fan", + BlockKind::BubbleCoralFan => "bubble_coral_fan", + BlockKind::FireCoralFan => "fire_coral_fan", + BlockKind::HornCoralFan => "horn_coral_fan", + BlockKind::DeadTubeCoralWallFan => "dead_tube_coral_wall_fan", + BlockKind::DeadBrainCoralWallFan => "dead_brain_coral_wall_fan", + BlockKind::DeadBubbleCoralWallFan => "dead_bubble_coral_wall_fan", + BlockKind::DeadFireCoralWallFan => "dead_fire_coral_wall_fan", + BlockKind::DeadHornCoralWallFan => "dead_horn_coral_wall_fan", + BlockKind::TubeCoralWallFan => "tube_coral_wall_fan", + BlockKind::BrainCoralWallFan => "brain_coral_wall_fan", + BlockKind::BubbleCoralWallFan => "bubble_coral_wall_fan", + BlockKind::FireCoralWallFan => "fire_coral_wall_fan", + BlockKind::HornCoralWallFan => "horn_coral_wall_fan", + BlockKind::SeaPickle => "sea_pickle", + BlockKind::BlueIce => "blue_ice", + BlockKind::Conduit => "conduit", + BlockKind::BambooSapling => "bamboo_sapling", + BlockKind::Bamboo => "bamboo", + BlockKind::PottedBamboo => "potted_bamboo", + BlockKind::VoidAir => "void_air", + BlockKind::CaveAir => "cave_air", + BlockKind::BubbleColumn => "bubble_column", + BlockKind::PolishedGraniteStairs => "polished_granite_stairs", + BlockKind::SmoothRedSandstoneStairs => "smooth_red_sandstone_stairs", + BlockKind::MossyStoneBrickStairs => "mossy_stone_brick_stairs", + BlockKind::PolishedDioriteStairs => "polished_diorite_stairs", + BlockKind::MossyCobblestoneStairs => "mossy_cobblestone_stairs", + BlockKind::EndStoneBrickStairs => "end_stone_brick_stairs", + BlockKind::StoneStairs => "stone_stairs", + BlockKind::SmoothSandstoneStairs => "smooth_sandstone_stairs", + BlockKind::SmoothQuartzStairs => "smooth_quartz_stairs", + BlockKind::GraniteStairs => "granite_stairs", + BlockKind::AndesiteStairs => "andesite_stairs", + BlockKind::RedNetherBrickStairs => "red_nether_brick_stairs", + BlockKind::PolishedAndesiteStairs => "polished_andesite_stairs", + BlockKind::DioriteStairs => "diorite_stairs", + BlockKind::PolishedGraniteSlab => "polished_granite_slab", + BlockKind::SmoothRedSandstoneSlab => "smooth_red_sandstone_slab", + BlockKind::MossyStoneBrickSlab => "mossy_stone_brick_slab", + BlockKind::PolishedDioriteSlab => "polished_diorite_slab", + BlockKind::MossyCobblestoneSlab => "mossy_cobblestone_slab", + BlockKind::EndStoneBrickSlab => "end_stone_brick_slab", + BlockKind::SmoothSandstoneSlab => "smooth_sandstone_slab", + BlockKind::SmoothQuartzSlab => "smooth_quartz_slab", + BlockKind::GraniteSlab => "granite_slab", + BlockKind::AndesiteSlab => "andesite_slab", + BlockKind::RedNetherBrickSlab => "red_nether_brick_slab", + BlockKind::PolishedAndesiteSlab => "polished_andesite_slab", + BlockKind::DioriteSlab => "diorite_slab", + BlockKind::BrickWall => "brick_wall", + BlockKind::PrismarineWall => "prismarine_wall", + BlockKind::RedSandstoneWall => "red_sandstone_wall", + BlockKind::MossyStoneBrickWall => "mossy_stone_brick_wall", + BlockKind::GraniteWall => "granite_wall", + BlockKind::StoneBrickWall => "stone_brick_wall", + BlockKind::NetherBrickWall => "nether_brick_wall", + BlockKind::AndesiteWall => "andesite_wall", + BlockKind::RedNetherBrickWall => "red_nether_brick_wall", + BlockKind::SandstoneWall => "sandstone_wall", + BlockKind::EndStoneBrickWall => "end_stone_brick_wall", + BlockKind::DioriteWall => "diorite_wall", + BlockKind::Scaffolding => "scaffolding", + BlockKind::Loom => "loom", + BlockKind::Barrel => "barrel", + BlockKind::Smoker => "smoker", + BlockKind::BlastFurnace => "blast_furnace", + BlockKind::CartographyTable => "cartography_table", + BlockKind::FletchingTable => "fletching_table", + BlockKind::Grindstone => "grindstone", + BlockKind::Lectern => "lectern", + BlockKind::SmithingTable => "smithing_table", + BlockKind::Stonecutter => "stonecutter", + BlockKind::Bell => "bell", + BlockKind::Lantern => "lantern", + BlockKind::SoulLantern => "soul_lantern", + BlockKind::Campfire => "campfire", + BlockKind::SoulCampfire => "soul_campfire", + BlockKind::SweetBerryBush => "sweet_berry_bush", + BlockKind::WarpedStem => "warped_stem", + BlockKind::StrippedWarpedStem => "stripped_warped_stem", + BlockKind::WarpedHyphae => "warped_hyphae", + BlockKind::StrippedWarpedHyphae => "stripped_warped_hyphae", + BlockKind::WarpedNylium => "warped_nylium", + BlockKind::WarpedFungus => "warped_fungus", + BlockKind::WarpedWartBlock => "warped_wart_block", + BlockKind::WarpedRoots => "warped_roots", + BlockKind::NetherSprouts => "nether_sprouts", + BlockKind::CrimsonStem => "crimson_stem", + BlockKind::StrippedCrimsonStem => "stripped_crimson_stem", + BlockKind::CrimsonHyphae => "crimson_hyphae", + BlockKind::StrippedCrimsonHyphae => "stripped_crimson_hyphae", + BlockKind::CrimsonNylium => "crimson_nylium", + BlockKind::CrimsonFungus => "crimson_fungus", + BlockKind::Shroomlight => "shroomlight", + BlockKind::WeepingVines => "weeping_vines", + BlockKind::WeepingVinesPlant => "weeping_vines_plant", + BlockKind::TwistingVines => "twisting_vines", + BlockKind::TwistingVinesPlant => "twisting_vines_plant", + BlockKind::CrimsonRoots => "crimson_roots", + BlockKind::CrimsonPlanks => "crimson_planks", + BlockKind::WarpedPlanks => "warped_planks", + BlockKind::CrimsonSlab => "crimson_slab", + BlockKind::WarpedSlab => "warped_slab", + BlockKind::CrimsonPressurePlate => "crimson_pressure_plate", + BlockKind::WarpedPressurePlate => "warped_pressure_plate", + BlockKind::CrimsonFence => "crimson_fence", + BlockKind::WarpedFence => "warped_fence", + BlockKind::CrimsonTrapdoor => "crimson_trapdoor", + BlockKind::WarpedTrapdoor => "warped_trapdoor", + BlockKind::CrimsonFenceGate => "crimson_fence_gate", + BlockKind::WarpedFenceGate => "warped_fence_gate", + BlockKind::CrimsonStairs => "crimson_stairs", + BlockKind::WarpedStairs => "warped_stairs", + BlockKind::CrimsonButton => "crimson_button", + BlockKind::WarpedButton => "warped_button", + BlockKind::CrimsonDoor => "crimson_door", + BlockKind::WarpedDoor => "warped_door", + BlockKind::CrimsonSign => "crimson_sign", + BlockKind::WarpedSign => "warped_sign", + BlockKind::CrimsonWallSign => "crimson_wall_sign", + BlockKind::WarpedWallSign => "warped_wall_sign", + BlockKind::StructureBlock => "structure_block", + BlockKind::Jigsaw => "jigsaw", + BlockKind::Composter => "composter", + BlockKind::Target => "target", + BlockKind::BeeNest => "bee_nest", + BlockKind::Beehive => "beehive", + BlockKind::HoneyBlock => "honey_block", + BlockKind::HoneycombBlock => "honeycomb_block", + BlockKind::NetheriteBlock => "netherite_block", + BlockKind::AncientDebris => "ancient_debris", + BlockKind::CryingObsidian => "crying_obsidian", + BlockKind::RespawnAnchor => "respawn_anchor", + BlockKind::PottedCrimsonFungus => "potted_crimson_fungus", + BlockKind::PottedWarpedFungus => "potted_warped_fungus", + BlockKind::PottedCrimsonRoots => "potted_crimson_roots", + BlockKind::PottedWarpedRoots => "potted_warped_roots", + BlockKind::Lodestone => "lodestone", + BlockKind::Blackstone => "blackstone", + BlockKind::BlackstoneStairs => "blackstone_stairs", + BlockKind::BlackstoneWall => "blackstone_wall", + BlockKind::BlackstoneSlab => "blackstone_slab", + BlockKind::PolishedBlackstone => "polished_blackstone", + BlockKind::PolishedBlackstoneBricks => "polished_blackstone_bricks", + BlockKind::CrackedPolishedBlackstoneBricks => "cracked_polished_blackstone_bricks", + BlockKind::ChiseledPolishedBlackstone => "chiseled_polished_blackstone", + BlockKind::PolishedBlackstoneBrickSlab => "polished_blackstone_brick_slab", + BlockKind::PolishedBlackstoneBrickStairs => "polished_blackstone_brick_stairs", + BlockKind::PolishedBlackstoneBrickWall => "polished_blackstone_brick_wall", + BlockKind::GildedBlackstone => "gilded_blackstone", + BlockKind::PolishedBlackstoneStairs => "polished_blackstone_stairs", + BlockKind::PolishedBlackstoneSlab => "polished_blackstone_slab", + BlockKind::PolishedBlackstonePressurePlate => "polished_blackstone_pressure_plate", + BlockKind::PolishedBlackstoneButton => "polished_blackstone_button", + BlockKind::PolishedBlackstoneWall => "polished_blackstone_wall", + BlockKind::ChiseledNetherBricks => "chiseled_nether_bricks", + BlockKind::CrackedNetherBricks => "cracked_nether_bricks", + BlockKind::QuartzBricks => "quartz_bricks", + } + } + + /// Gets a `BlockKind` by its `name`. + pub fn from_name(name: &str) -> Option { + match name { + "air" => Some(BlockKind::Air), + "stone" => Some(BlockKind::Stone), + "granite" => Some(BlockKind::Granite), + "polished_granite" => Some(BlockKind::PolishedGranite), + "diorite" => Some(BlockKind::Diorite), + "polished_diorite" => Some(BlockKind::PolishedDiorite), + "andesite" => Some(BlockKind::Andesite), + "polished_andesite" => Some(BlockKind::PolishedAndesite), + "grass_block" => Some(BlockKind::GrassBlock), + "dirt" => Some(BlockKind::Dirt), + "coarse_dirt" => Some(BlockKind::CoarseDirt), + "podzol" => Some(BlockKind::Podzol), + "cobblestone" => Some(BlockKind::Cobblestone), + "oak_planks" => Some(BlockKind::OakPlanks), + "spruce_planks" => Some(BlockKind::SprucePlanks), + "birch_planks" => Some(BlockKind::BirchPlanks), + "jungle_planks" => Some(BlockKind::JunglePlanks), + "acacia_planks" => Some(BlockKind::AcaciaPlanks), + "dark_oak_planks" => Some(BlockKind::DarkOakPlanks), + "oak_sapling" => Some(BlockKind::OakSapling), + "spruce_sapling" => Some(BlockKind::SpruceSapling), + "birch_sapling" => Some(BlockKind::BirchSapling), + "jungle_sapling" => Some(BlockKind::JungleSapling), + "acacia_sapling" => Some(BlockKind::AcaciaSapling), + "dark_oak_sapling" => Some(BlockKind::DarkOakSapling), + "bedrock" => Some(BlockKind::Bedrock), + "water" => Some(BlockKind::Water), + "lava" => Some(BlockKind::Lava), + "sand" => Some(BlockKind::Sand), + "red_sand" => Some(BlockKind::RedSand), + "gravel" => Some(BlockKind::Gravel), + "gold_ore" => Some(BlockKind::GoldOre), + "iron_ore" => Some(BlockKind::IronOre), + "coal_ore" => Some(BlockKind::CoalOre), + "nether_gold_ore" => Some(BlockKind::NetherGoldOre), + "oak_log" => Some(BlockKind::OakLog), + "spruce_log" => Some(BlockKind::SpruceLog), + "birch_log" => Some(BlockKind::BirchLog), + "jungle_log" => Some(BlockKind::JungleLog), + "acacia_log" => Some(BlockKind::AcaciaLog), + "dark_oak_log" => Some(BlockKind::DarkOakLog), + "stripped_spruce_log" => Some(BlockKind::StrippedSpruceLog), + "stripped_birch_log" => Some(BlockKind::StrippedBirchLog), + "stripped_jungle_log" => Some(BlockKind::StrippedJungleLog), + "stripped_acacia_log" => Some(BlockKind::StrippedAcaciaLog), + "stripped_dark_oak_log" => Some(BlockKind::StrippedDarkOakLog), + "stripped_oak_log" => Some(BlockKind::StrippedOakLog), + "oak_wood" => Some(BlockKind::OakWood), + "spruce_wood" => Some(BlockKind::SpruceWood), + "birch_wood" => Some(BlockKind::BirchWood), + "jungle_wood" => Some(BlockKind::JungleWood), + "acacia_wood" => Some(BlockKind::AcaciaWood), + "dark_oak_wood" => Some(BlockKind::DarkOakWood), + "stripped_oak_wood" => Some(BlockKind::StrippedOakWood), + "stripped_spruce_wood" => Some(BlockKind::StrippedSpruceWood), + "stripped_birch_wood" => Some(BlockKind::StrippedBirchWood), + "stripped_jungle_wood" => Some(BlockKind::StrippedJungleWood), + "stripped_acacia_wood" => Some(BlockKind::StrippedAcaciaWood), + "stripped_dark_oak_wood" => Some(BlockKind::StrippedDarkOakWood), + "oak_leaves" => Some(BlockKind::OakLeaves), + "spruce_leaves" => Some(BlockKind::SpruceLeaves), + "birch_leaves" => Some(BlockKind::BirchLeaves), + "jungle_leaves" => Some(BlockKind::JungleLeaves), + "acacia_leaves" => Some(BlockKind::AcaciaLeaves), + "dark_oak_leaves" => Some(BlockKind::DarkOakLeaves), + "sponge" => Some(BlockKind::Sponge), + "wet_sponge" => Some(BlockKind::WetSponge), + "glass" => Some(BlockKind::Glass), + "lapis_ore" => Some(BlockKind::LapisOre), + "lapis_block" => Some(BlockKind::LapisBlock), + "dispenser" => Some(BlockKind::Dispenser), + "sandstone" => Some(BlockKind::Sandstone), + "chiseled_sandstone" => Some(BlockKind::ChiseledSandstone), + "cut_sandstone" => Some(BlockKind::CutSandstone), + "note_block" => Some(BlockKind::NoteBlock), + "white_bed" => Some(BlockKind::WhiteBed), + "orange_bed" => Some(BlockKind::OrangeBed), + "magenta_bed" => Some(BlockKind::MagentaBed), + "light_blue_bed" => Some(BlockKind::LightBlueBed), + "yellow_bed" => Some(BlockKind::YellowBed), + "lime_bed" => Some(BlockKind::LimeBed), + "pink_bed" => Some(BlockKind::PinkBed), + "gray_bed" => Some(BlockKind::GrayBed), + "light_gray_bed" => Some(BlockKind::LightGrayBed), + "cyan_bed" => Some(BlockKind::CyanBed), + "purple_bed" => Some(BlockKind::PurpleBed), + "blue_bed" => Some(BlockKind::BlueBed), + "brown_bed" => Some(BlockKind::BrownBed), + "green_bed" => Some(BlockKind::GreenBed), + "red_bed" => Some(BlockKind::RedBed), + "black_bed" => Some(BlockKind::BlackBed), + "powered_rail" => Some(BlockKind::PoweredRail), + "detector_rail" => Some(BlockKind::DetectorRail), + "sticky_piston" => Some(BlockKind::StickyPiston), + "cobweb" => Some(BlockKind::Cobweb), + "grass" => Some(BlockKind::Grass), + "fern" => Some(BlockKind::Fern), + "dead_bush" => Some(BlockKind::DeadBush), + "seagrass" => Some(BlockKind::Seagrass), + "tall_seagrass" => Some(BlockKind::TallSeagrass), + "piston" => Some(BlockKind::Piston), + "piston_head" => Some(BlockKind::PistonHead), + "white_wool" => Some(BlockKind::WhiteWool), + "orange_wool" => Some(BlockKind::OrangeWool), + "magenta_wool" => Some(BlockKind::MagentaWool), + "light_blue_wool" => Some(BlockKind::LightBlueWool), + "yellow_wool" => Some(BlockKind::YellowWool), + "lime_wool" => Some(BlockKind::LimeWool), + "pink_wool" => Some(BlockKind::PinkWool), + "gray_wool" => Some(BlockKind::GrayWool), + "light_gray_wool" => Some(BlockKind::LightGrayWool), + "cyan_wool" => Some(BlockKind::CyanWool), + "purple_wool" => Some(BlockKind::PurpleWool), + "blue_wool" => Some(BlockKind::BlueWool), + "brown_wool" => Some(BlockKind::BrownWool), + "green_wool" => Some(BlockKind::GreenWool), + "red_wool" => Some(BlockKind::RedWool), + "black_wool" => Some(BlockKind::BlackWool), + "moving_piston" => Some(BlockKind::MovingPiston), + "dandelion" => Some(BlockKind::Dandelion), + "poppy" => Some(BlockKind::Poppy), + "blue_orchid" => Some(BlockKind::BlueOrchid), + "allium" => Some(BlockKind::Allium), + "azure_bluet" => Some(BlockKind::AzureBluet), + "red_tulip" => Some(BlockKind::RedTulip), + "orange_tulip" => Some(BlockKind::OrangeTulip), + "white_tulip" => Some(BlockKind::WhiteTulip), + "pink_tulip" => Some(BlockKind::PinkTulip), + "oxeye_daisy" => Some(BlockKind::OxeyeDaisy), + "cornflower" => Some(BlockKind::Cornflower), + "wither_rose" => Some(BlockKind::WitherRose), + "lily_of_the_valley" => Some(BlockKind::LilyOfTheValley), + "brown_mushroom" => Some(BlockKind::BrownMushroom), + "red_mushroom" => Some(BlockKind::RedMushroom), + "gold_block" => Some(BlockKind::GoldBlock), + "iron_block" => Some(BlockKind::IronBlock), + "bricks" => Some(BlockKind::Bricks), + "tnt" => Some(BlockKind::Tnt), + "bookshelf" => Some(BlockKind::Bookshelf), + "mossy_cobblestone" => Some(BlockKind::MossyCobblestone), + "obsidian" => Some(BlockKind::Obsidian), + "torch" => Some(BlockKind::Torch), + "wall_torch" => Some(BlockKind::WallTorch), + "fire" => Some(BlockKind::Fire), + "soul_fire" => Some(BlockKind::SoulFire), + "spawner" => Some(BlockKind::Spawner), + "oak_stairs" => Some(BlockKind::OakStairs), + "chest" => Some(BlockKind::Chest), + "redstone_wire" => Some(BlockKind::RedstoneWire), + "diamond_ore" => Some(BlockKind::DiamondOre), + "diamond_block" => Some(BlockKind::DiamondBlock), + "crafting_table" => Some(BlockKind::CraftingTable), + "wheat" => Some(BlockKind::Wheat), + "farmland" => Some(BlockKind::Farmland), + "furnace" => Some(BlockKind::Furnace), + "oak_sign" => Some(BlockKind::OakSign), + "spruce_sign" => Some(BlockKind::SpruceSign), + "birch_sign" => Some(BlockKind::BirchSign), + "acacia_sign" => Some(BlockKind::AcaciaSign), + "jungle_sign" => Some(BlockKind::JungleSign), + "dark_oak_sign" => Some(BlockKind::DarkOakSign), + "oak_door" => Some(BlockKind::OakDoor), + "ladder" => Some(BlockKind::Ladder), + "rail" => Some(BlockKind::Rail), + "cobblestone_stairs" => Some(BlockKind::CobblestoneStairs), + "oak_wall_sign" => Some(BlockKind::OakWallSign), + "spruce_wall_sign" => Some(BlockKind::SpruceWallSign), + "birch_wall_sign" => Some(BlockKind::BirchWallSign), + "acacia_wall_sign" => Some(BlockKind::AcaciaWallSign), + "jungle_wall_sign" => Some(BlockKind::JungleWallSign), + "dark_oak_wall_sign" => Some(BlockKind::DarkOakWallSign), + "lever" => Some(BlockKind::Lever), + "stone_pressure_plate" => Some(BlockKind::StonePressurePlate), + "iron_door" => Some(BlockKind::IronDoor), + "oak_pressure_plate" => Some(BlockKind::OakPressurePlate), + "spruce_pressure_plate" => Some(BlockKind::SprucePressurePlate), + "birch_pressure_plate" => Some(BlockKind::BirchPressurePlate), + "jungle_pressure_plate" => Some(BlockKind::JunglePressurePlate), + "acacia_pressure_plate" => Some(BlockKind::AcaciaPressurePlate), + "dark_oak_pressure_plate" => Some(BlockKind::DarkOakPressurePlate), + "redstone_ore" => Some(BlockKind::RedstoneOre), + "redstone_torch" => Some(BlockKind::RedstoneTorch), + "redstone_wall_torch" => Some(BlockKind::RedstoneWallTorch), + "stone_button" => Some(BlockKind::StoneButton), + "snow" => Some(BlockKind::Snow), + "ice" => Some(BlockKind::Ice), + "snow_block" => Some(BlockKind::SnowBlock), + "cactus" => Some(BlockKind::Cactus), + "clay" => Some(BlockKind::Clay), + "sugar_cane" => Some(BlockKind::SugarCane), + "jukebox" => Some(BlockKind::Jukebox), + "oak_fence" => Some(BlockKind::OakFence), + "pumpkin" => Some(BlockKind::Pumpkin), + "netherrack" => Some(BlockKind::Netherrack), + "soul_sand" => Some(BlockKind::SoulSand), + "soul_soil" => Some(BlockKind::SoulSoil), + "basalt" => Some(BlockKind::Basalt), + "polished_basalt" => Some(BlockKind::PolishedBasalt), + "soul_torch" => Some(BlockKind::SoulTorch), + "soul_wall_torch" => Some(BlockKind::SoulWallTorch), + "glowstone" => Some(BlockKind::Glowstone), + "nether_portal" => Some(BlockKind::NetherPortal), + "carved_pumpkin" => Some(BlockKind::CarvedPumpkin), + "jack_o_lantern" => Some(BlockKind::JackOLantern), + "cake" => Some(BlockKind::Cake), + "repeater" => Some(BlockKind::Repeater), + "white_stained_glass" => Some(BlockKind::WhiteStainedGlass), + "orange_stained_glass" => Some(BlockKind::OrangeStainedGlass), + "magenta_stained_glass" => Some(BlockKind::MagentaStainedGlass), + "light_blue_stained_glass" => Some(BlockKind::LightBlueStainedGlass), + "yellow_stained_glass" => Some(BlockKind::YellowStainedGlass), + "lime_stained_glass" => Some(BlockKind::LimeStainedGlass), + "pink_stained_glass" => Some(BlockKind::PinkStainedGlass), + "gray_stained_glass" => Some(BlockKind::GrayStainedGlass), + "light_gray_stained_glass" => Some(BlockKind::LightGrayStainedGlass), + "cyan_stained_glass" => Some(BlockKind::CyanStainedGlass), + "purple_stained_glass" => Some(BlockKind::PurpleStainedGlass), + "blue_stained_glass" => Some(BlockKind::BlueStainedGlass), + "brown_stained_glass" => Some(BlockKind::BrownStainedGlass), + "green_stained_glass" => Some(BlockKind::GreenStainedGlass), + "red_stained_glass" => Some(BlockKind::RedStainedGlass), + "black_stained_glass" => Some(BlockKind::BlackStainedGlass), + "oak_trapdoor" => Some(BlockKind::OakTrapdoor), + "spruce_trapdoor" => Some(BlockKind::SpruceTrapdoor), + "birch_trapdoor" => Some(BlockKind::BirchTrapdoor), + "jungle_trapdoor" => Some(BlockKind::JungleTrapdoor), + "acacia_trapdoor" => Some(BlockKind::AcaciaTrapdoor), + "dark_oak_trapdoor" => Some(BlockKind::DarkOakTrapdoor), + "stone_bricks" => Some(BlockKind::StoneBricks), + "mossy_stone_bricks" => Some(BlockKind::MossyStoneBricks), + "cracked_stone_bricks" => Some(BlockKind::CrackedStoneBricks), + "chiseled_stone_bricks" => Some(BlockKind::ChiseledStoneBricks), + "infested_stone" => Some(BlockKind::InfestedStone), + "infested_cobblestone" => Some(BlockKind::InfestedCobblestone), + "infested_stone_bricks" => Some(BlockKind::InfestedStoneBricks), + "infested_mossy_stone_bricks" => Some(BlockKind::InfestedMossyStoneBricks), + "infested_cracked_stone_bricks" => Some(BlockKind::InfestedCrackedStoneBricks), + "infested_chiseled_stone_bricks" => Some(BlockKind::InfestedChiseledStoneBricks), + "brown_mushroom_block" => Some(BlockKind::BrownMushroomBlock), + "red_mushroom_block" => Some(BlockKind::RedMushroomBlock), + "mushroom_stem" => Some(BlockKind::MushroomStem), + "iron_bars" => Some(BlockKind::IronBars), + "chain" => Some(BlockKind::Chain), + "glass_pane" => Some(BlockKind::GlassPane), + "melon" => Some(BlockKind::Melon), + "attached_pumpkin_stem" => Some(BlockKind::AttachedPumpkinStem), + "attached_melon_stem" => Some(BlockKind::AttachedMelonStem), + "pumpkin_stem" => Some(BlockKind::PumpkinStem), + "melon_stem" => Some(BlockKind::MelonStem), + "vine" => Some(BlockKind::Vine), + "oak_fence_gate" => Some(BlockKind::OakFenceGate), + "brick_stairs" => Some(BlockKind::BrickStairs), + "stone_brick_stairs" => Some(BlockKind::StoneBrickStairs), + "mycelium" => Some(BlockKind::Mycelium), + "lily_pad" => Some(BlockKind::LilyPad), + "nether_bricks" => Some(BlockKind::NetherBricks), + "nether_brick_fence" => Some(BlockKind::NetherBrickFence), + "nether_brick_stairs" => Some(BlockKind::NetherBrickStairs), + "nether_wart" => Some(BlockKind::NetherWart), + "enchanting_table" => Some(BlockKind::EnchantingTable), + "brewing_stand" => Some(BlockKind::BrewingStand), + "cauldron" => Some(BlockKind::Cauldron), + "end_portal" => Some(BlockKind::EndPortal), + "end_portal_frame" => Some(BlockKind::EndPortalFrame), + "end_stone" => Some(BlockKind::EndStone), + "dragon_egg" => Some(BlockKind::DragonEgg), + "redstone_lamp" => Some(BlockKind::RedstoneLamp), + "cocoa" => Some(BlockKind::Cocoa), + "sandstone_stairs" => Some(BlockKind::SandstoneStairs), + "emerald_ore" => Some(BlockKind::EmeraldOre), + "ender_chest" => Some(BlockKind::EnderChest), + "tripwire_hook" => Some(BlockKind::TripwireHook), + "tripwire" => Some(BlockKind::Tripwire), + "emerald_block" => Some(BlockKind::EmeraldBlock), + "spruce_stairs" => Some(BlockKind::SpruceStairs), + "birch_stairs" => Some(BlockKind::BirchStairs), + "jungle_stairs" => Some(BlockKind::JungleStairs), + "command_block" => Some(BlockKind::CommandBlock), + "beacon" => Some(BlockKind::Beacon), + "cobblestone_wall" => Some(BlockKind::CobblestoneWall), + "mossy_cobblestone_wall" => Some(BlockKind::MossyCobblestoneWall), + "flower_pot" => Some(BlockKind::FlowerPot), + "potted_oak_sapling" => Some(BlockKind::PottedOakSapling), + "potted_spruce_sapling" => Some(BlockKind::PottedSpruceSapling), + "potted_birch_sapling" => Some(BlockKind::PottedBirchSapling), + "potted_jungle_sapling" => Some(BlockKind::PottedJungleSapling), + "potted_acacia_sapling" => Some(BlockKind::PottedAcaciaSapling), + "potted_dark_oak_sapling" => Some(BlockKind::PottedDarkOakSapling), + "potted_fern" => Some(BlockKind::PottedFern), + "potted_dandelion" => Some(BlockKind::PottedDandelion), + "potted_poppy" => Some(BlockKind::PottedPoppy), + "potted_blue_orchid" => Some(BlockKind::PottedBlueOrchid), + "potted_allium" => Some(BlockKind::PottedAllium), + "potted_azure_bluet" => Some(BlockKind::PottedAzureBluet), + "potted_red_tulip" => Some(BlockKind::PottedRedTulip), + "potted_orange_tulip" => Some(BlockKind::PottedOrangeTulip), + "potted_white_tulip" => Some(BlockKind::PottedWhiteTulip), + "potted_pink_tulip" => Some(BlockKind::PottedPinkTulip), + "potted_oxeye_daisy" => Some(BlockKind::PottedOxeyeDaisy), + "potted_cornflower" => Some(BlockKind::PottedCornflower), + "potted_lily_of_the_valley" => Some(BlockKind::PottedLilyOfTheValley), + "potted_wither_rose" => Some(BlockKind::PottedWitherRose), + "potted_red_mushroom" => Some(BlockKind::PottedRedMushroom), + "potted_brown_mushroom" => Some(BlockKind::PottedBrownMushroom), + "potted_dead_bush" => Some(BlockKind::PottedDeadBush), + "potted_cactus" => Some(BlockKind::PottedCactus), + "carrots" => Some(BlockKind::Carrots), + "potatoes" => Some(BlockKind::Potatoes), + "oak_button" => Some(BlockKind::OakButton), + "spruce_button" => Some(BlockKind::SpruceButton), + "birch_button" => Some(BlockKind::BirchButton), + "jungle_button" => Some(BlockKind::JungleButton), + "acacia_button" => Some(BlockKind::AcaciaButton), + "dark_oak_button" => Some(BlockKind::DarkOakButton), + "skeleton_skull" => Some(BlockKind::SkeletonSkull), + "skeleton_wall_skull" => Some(BlockKind::SkeletonWallSkull), + "wither_skeleton_skull" => Some(BlockKind::WitherSkeletonSkull), + "wither_skeleton_wall_skull" => Some(BlockKind::WitherSkeletonWallSkull), + "zombie_head" => Some(BlockKind::ZombieHead), + "zombie_wall_head" => Some(BlockKind::ZombieWallHead), + "player_head" => Some(BlockKind::PlayerHead), + "player_wall_head" => Some(BlockKind::PlayerWallHead), + "creeper_head" => Some(BlockKind::CreeperHead), + "creeper_wall_head" => Some(BlockKind::CreeperWallHead), + "dragon_head" => Some(BlockKind::DragonHead), + "dragon_wall_head" => Some(BlockKind::DragonWallHead), + "anvil" => Some(BlockKind::Anvil), + "chipped_anvil" => Some(BlockKind::ChippedAnvil), + "damaged_anvil" => Some(BlockKind::DamagedAnvil), + "trapped_chest" => Some(BlockKind::TrappedChest), + "light_weighted_pressure_plate" => Some(BlockKind::LightWeightedPressurePlate), + "heavy_weighted_pressure_plate" => Some(BlockKind::HeavyWeightedPressurePlate), + "comparator" => Some(BlockKind::Comparator), + "daylight_detector" => Some(BlockKind::DaylightDetector), + "redstone_block" => Some(BlockKind::RedstoneBlock), + "nether_quartz_ore" => Some(BlockKind::NetherQuartzOre), + "hopper" => Some(BlockKind::Hopper), + "quartz_block" => Some(BlockKind::QuartzBlock), + "chiseled_quartz_block" => Some(BlockKind::ChiseledQuartzBlock), + "quartz_pillar" => Some(BlockKind::QuartzPillar), + "quartz_stairs" => Some(BlockKind::QuartzStairs), + "activator_rail" => Some(BlockKind::ActivatorRail), + "dropper" => Some(BlockKind::Dropper), + "white_terracotta" => Some(BlockKind::WhiteTerracotta), + "orange_terracotta" => Some(BlockKind::OrangeTerracotta), + "magenta_terracotta" => Some(BlockKind::MagentaTerracotta), + "light_blue_terracotta" => Some(BlockKind::LightBlueTerracotta), + "yellow_terracotta" => Some(BlockKind::YellowTerracotta), + "lime_terracotta" => Some(BlockKind::LimeTerracotta), + "pink_terracotta" => Some(BlockKind::PinkTerracotta), + "gray_terracotta" => Some(BlockKind::GrayTerracotta), + "light_gray_terracotta" => Some(BlockKind::LightGrayTerracotta), + "cyan_terracotta" => Some(BlockKind::CyanTerracotta), + "purple_terracotta" => Some(BlockKind::PurpleTerracotta), + "blue_terracotta" => Some(BlockKind::BlueTerracotta), + "brown_terracotta" => Some(BlockKind::BrownTerracotta), + "green_terracotta" => Some(BlockKind::GreenTerracotta), + "red_terracotta" => Some(BlockKind::RedTerracotta), + "black_terracotta" => Some(BlockKind::BlackTerracotta), + "white_stained_glass_pane" => Some(BlockKind::WhiteStainedGlassPane), + "orange_stained_glass_pane" => Some(BlockKind::OrangeStainedGlassPane), + "magenta_stained_glass_pane" => Some(BlockKind::MagentaStainedGlassPane), + "light_blue_stained_glass_pane" => Some(BlockKind::LightBlueStainedGlassPane), + "yellow_stained_glass_pane" => Some(BlockKind::YellowStainedGlassPane), + "lime_stained_glass_pane" => Some(BlockKind::LimeStainedGlassPane), + "pink_stained_glass_pane" => Some(BlockKind::PinkStainedGlassPane), + "gray_stained_glass_pane" => Some(BlockKind::GrayStainedGlassPane), + "light_gray_stained_glass_pane" => Some(BlockKind::LightGrayStainedGlassPane), + "cyan_stained_glass_pane" => Some(BlockKind::CyanStainedGlassPane), + "purple_stained_glass_pane" => Some(BlockKind::PurpleStainedGlassPane), + "blue_stained_glass_pane" => Some(BlockKind::BlueStainedGlassPane), + "brown_stained_glass_pane" => Some(BlockKind::BrownStainedGlassPane), + "green_stained_glass_pane" => Some(BlockKind::GreenStainedGlassPane), + "red_stained_glass_pane" => Some(BlockKind::RedStainedGlassPane), + "black_stained_glass_pane" => Some(BlockKind::BlackStainedGlassPane), + "acacia_stairs" => Some(BlockKind::AcaciaStairs), + "dark_oak_stairs" => Some(BlockKind::DarkOakStairs), + "slime_block" => Some(BlockKind::SlimeBlock), + "barrier" => Some(BlockKind::Barrier), + "iron_trapdoor" => Some(BlockKind::IronTrapdoor), + "prismarine" => Some(BlockKind::Prismarine), + "prismarine_bricks" => Some(BlockKind::PrismarineBricks), + "dark_prismarine" => Some(BlockKind::DarkPrismarine), + "prismarine_stairs" => Some(BlockKind::PrismarineStairs), + "prismarine_brick_stairs" => Some(BlockKind::PrismarineBrickStairs), + "dark_prismarine_stairs" => Some(BlockKind::DarkPrismarineStairs), + "prismarine_slab" => Some(BlockKind::PrismarineSlab), + "prismarine_brick_slab" => Some(BlockKind::PrismarineBrickSlab), + "dark_prismarine_slab" => Some(BlockKind::DarkPrismarineSlab), + "sea_lantern" => Some(BlockKind::SeaLantern), + "hay_block" => Some(BlockKind::HayBlock), + "white_carpet" => Some(BlockKind::WhiteCarpet), + "orange_carpet" => Some(BlockKind::OrangeCarpet), + "magenta_carpet" => Some(BlockKind::MagentaCarpet), + "light_blue_carpet" => Some(BlockKind::LightBlueCarpet), + "yellow_carpet" => Some(BlockKind::YellowCarpet), + "lime_carpet" => Some(BlockKind::LimeCarpet), + "pink_carpet" => Some(BlockKind::PinkCarpet), + "gray_carpet" => Some(BlockKind::GrayCarpet), + "light_gray_carpet" => Some(BlockKind::LightGrayCarpet), + "cyan_carpet" => Some(BlockKind::CyanCarpet), + "purple_carpet" => Some(BlockKind::PurpleCarpet), + "blue_carpet" => Some(BlockKind::BlueCarpet), + "brown_carpet" => Some(BlockKind::BrownCarpet), + "green_carpet" => Some(BlockKind::GreenCarpet), + "red_carpet" => Some(BlockKind::RedCarpet), + "black_carpet" => Some(BlockKind::BlackCarpet), + "terracotta" => Some(BlockKind::Terracotta), + "coal_block" => Some(BlockKind::CoalBlock), + "packed_ice" => Some(BlockKind::PackedIce), + "sunflower" => Some(BlockKind::Sunflower), + "lilac" => Some(BlockKind::Lilac), + "rose_bush" => Some(BlockKind::RoseBush), + "peony" => Some(BlockKind::Peony), + "tall_grass" => Some(BlockKind::TallGrass), + "large_fern" => Some(BlockKind::LargeFern), + "white_banner" => Some(BlockKind::WhiteBanner), + "orange_banner" => Some(BlockKind::OrangeBanner), + "magenta_banner" => Some(BlockKind::MagentaBanner), + "light_blue_banner" => Some(BlockKind::LightBlueBanner), + "yellow_banner" => Some(BlockKind::YellowBanner), + "lime_banner" => Some(BlockKind::LimeBanner), + "pink_banner" => Some(BlockKind::PinkBanner), + "gray_banner" => Some(BlockKind::GrayBanner), + "light_gray_banner" => Some(BlockKind::LightGrayBanner), + "cyan_banner" => Some(BlockKind::CyanBanner), + "purple_banner" => Some(BlockKind::PurpleBanner), + "blue_banner" => Some(BlockKind::BlueBanner), + "brown_banner" => Some(BlockKind::BrownBanner), + "green_banner" => Some(BlockKind::GreenBanner), + "red_banner" => Some(BlockKind::RedBanner), + "black_banner" => Some(BlockKind::BlackBanner), + "white_wall_banner" => Some(BlockKind::WhiteWallBanner), + "orange_wall_banner" => Some(BlockKind::OrangeWallBanner), + "magenta_wall_banner" => Some(BlockKind::MagentaWallBanner), + "light_blue_wall_banner" => Some(BlockKind::LightBlueWallBanner), + "yellow_wall_banner" => Some(BlockKind::YellowWallBanner), + "lime_wall_banner" => Some(BlockKind::LimeWallBanner), + "pink_wall_banner" => Some(BlockKind::PinkWallBanner), + "gray_wall_banner" => Some(BlockKind::GrayWallBanner), + "light_gray_wall_banner" => Some(BlockKind::LightGrayWallBanner), + "cyan_wall_banner" => Some(BlockKind::CyanWallBanner), + "purple_wall_banner" => Some(BlockKind::PurpleWallBanner), + "blue_wall_banner" => Some(BlockKind::BlueWallBanner), + "brown_wall_banner" => Some(BlockKind::BrownWallBanner), + "green_wall_banner" => Some(BlockKind::GreenWallBanner), + "red_wall_banner" => Some(BlockKind::RedWallBanner), + "black_wall_banner" => Some(BlockKind::BlackWallBanner), + "red_sandstone" => Some(BlockKind::RedSandstone), + "chiseled_red_sandstone" => Some(BlockKind::ChiseledRedSandstone), + "cut_red_sandstone" => Some(BlockKind::CutRedSandstone), + "red_sandstone_stairs" => Some(BlockKind::RedSandstoneStairs), + "oak_slab" => Some(BlockKind::OakSlab), + "spruce_slab" => Some(BlockKind::SpruceSlab), + "birch_slab" => Some(BlockKind::BirchSlab), + "jungle_slab" => Some(BlockKind::JungleSlab), + "acacia_slab" => Some(BlockKind::AcaciaSlab), + "dark_oak_slab" => Some(BlockKind::DarkOakSlab), + "stone_slab" => Some(BlockKind::StoneSlab), + "smooth_stone_slab" => Some(BlockKind::SmoothStoneSlab), + "sandstone_slab" => Some(BlockKind::SandstoneSlab), + "cut_sandstone_slab" => Some(BlockKind::CutSandstoneSlab), + "petrified_oak_slab" => Some(BlockKind::PetrifiedOakSlab), + "cobblestone_slab" => Some(BlockKind::CobblestoneSlab), + "brick_slab" => Some(BlockKind::BrickSlab), + "stone_brick_slab" => Some(BlockKind::StoneBrickSlab), + "nether_brick_slab" => Some(BlockKind::NetherBrickSlab), + "quartz_slab" => Some(BlockKind::QuartzSlab), + "red_sandstone_slab" => Some(BlockKind::RedSandstoneSlab), + "cut_red_sandstone_slab" => Some(BlockKind::CutRedSandstoneSlab), + "purpur_slab" => Some(BlockKind::PurpurSlab), + "smooth_stone" => Some(BlockKind::SmoothStone), + "smooth_sandstone" => Some(BlockKind::SmoothSandstone), + "smooth_quartz" => Some(BlockKind::SmoothQuartz), + "smooth_red_sandstone" => Some(BlockKind::SmoothRedSandstone), + "spruce_fence_gate" => Some(BlockKind::SpruceFenceGate), + "birch_fence_gate" => Some(BlockKind::BirchFenceGate), + "jungle_fence_gate" => Some(BlockKind::JungleFenceGate), + "acacia_fence_gate" => Some(BlockKind::AcaciaFenceGate), + "dark_oak_fence_gate" => Some(BlockKind::DarkOakFenceGate), + "spruce_fence" => Some(BlockKind::SpruceFence), + "birch_fence" => Some(BlockKind::BirchFence), + "jungle_fence" => Some(BlockKind::JungleFence), + "acacia_fence" => Some(BlockKind::AcaciaFence), + "dark_oak_fence" => Some(BlockKind::DarkOakFence), + "spruce_door" => Some(BlockKind::SpruceDoor), + "birch_door" => Some(BlockKind::BirchDoor), + "jungle_door" => Some(BlockKind::JungleDoor), + "acacia_door" => Some(BlockKind::AcaciaDoor), + "dark_oak_door" => Some(BlockKind::DarkOakDoor), + "end_rod" => Some(BlockKind::EndRod), + "chorus_plant" => Some(BlockKind::ChorusPlant), + "chorus_flower" => Some(BlockKind::ChorusFlower), + "purpur_block" => Some(BlockKind::PurpurBlock), + "purpur_pillar" => Some(BlockKind::PurpurPillar), + "purpur_stairs" => Some(BlockKind::PurpurStairs), + "end_stone_bricks" => Some(BlockKind::EndStoneBricks), + "beetroots" => Some(BlockKind::Beetroots), + "grass_path" => Some(BlockKind::GrassPath), + "end_gateway" => Some(BlockKind::EndGateway), + "repeating_command_block" => Some(BlockKind::RepeatingCommandBlock), + "chain_command_block" => Some(BlockKind::ChainCommandBlock), + "frosted_ice" => Some(BlockKind::FrostedIce), + "magma_block" => Some(BlockKind::MagmaBlock), + "nether_wart_block" => Some(BlockKind::NetherWartBlock), + "red_nether_bricks" => Some(BlockKind::RedNetherBricks), + "bone_block" => Some(BlockKind::BoneBlock), + "structure_void" => Some(BlockKind::StructureVoid), + "observer" => Some(BlockKind::Observer), + "shulker_box" => Some(BlockKind::ShulkerBox), + "white_shulker_box" => Some(BlockKind::WhiteShulkerBox), + "orange_shulker_box" => Some(BlockKind::OrangeShulkerBox), + "magenta_shulker_box" => Some(BlockKind::MagentaShulkerBox), + "light_blue_shulker_box" => Some(BlockKind::LightBlueShulkerBox), + "yellow_shulker_box" => Some(BlockKind::YellowShulkerBox), + "lime_shulker_box" => Some(BlockKind::LimeShulkerBox), + "pink_shulker_box" => Some(BlockKind::PinkShulkerBox), + "gray_shulker_box" => Some(BlockKind::GrayShulkerBox), + "light_gray_shulker_box" => Some(BlockKind::LightGrayShulkerBox), + "cyan_shulker_box" => Some(BlockKind::CyanShulkerBox), + "purple_shulker_box" => Some(BlockKind::PurpleShulkerBox), + "blue_shulker_box" => Some(BlockKind::BlueShulkerBox), + "brown_shulker_box" => Some(BlockKind::BrownShulkerBox), + "green_shulker_box" => Some(BlockKind::GreenShulkerBox), + "red_shulker_box" => Some(BlockKind::RedShulkerBox), + "black_shulker_box" => Some(BlockKind::BlackShulkerBox), + "white_glazed_terracotta" => Some(BlockKind::WhiteGlazedTerracotta), + "orange_glazed_terracotta" => Some(BlockKind::OrangeGlazedTerracotta), + "magenta_glazed_terracotta" => Some(BlockKind::MagentaGlazedTerracotta), + "light_blue_glazed_terracotta" => Some(BlockKind::LightBlueGlazedTerracotta), + "yellow_glazed_terracotta" => Some(BlockKind::YellowGlazedTerracotta), + "lime_glazed_terracotta" => Some(BlockKind::LimeGlazedTerracotta), + "pink_glazed_terracotta" => Some(BlockKind::PinkGlazedTerracotta), + "gray_glazed_terracotta" => Some(BlockKind::GrayGlazedTerracotta), + "light_gray_glazed_terracotta" => Some(BlockKind::LightGrayGlazedTerracotta), + "cyan_glazed_terracotta" => Some(BlockKind::CyanGlazedTerracotta), + "purple_glazed_terracotta" => Some(BlockKind::PurpleGlazedTerracotta), + "blue_glazed_terracotta" => Some(BlockKind::BlueGlazedTerracotta), + "brown_glazed_terracotta" => Some(BlockKind::BrownGlazedTerracotta), + "green_glazed_terracotta" => Some(BlockKind::GreenGlazedTerracotta), + "red_glazed_terracotta" => Some(BlockKind::RedGlazedTerracotta), + "black_glazed_terracotta" => Some(BlockKind::BlackGlazedTerracotta), + "white_concrete" => Some(BlockKind::WhiteConcrete), + "orange_concrete" => Some(BlockKind::OrangeConcrete), + "magenta_concrete" => Some(BlockKind::MagentaConcrete), + "light_blue_concrete" => Some(BlockKind::LightBlueConcrete), + "yellow_concrete" => Some(BlockKind::YellowConcrete), + "lime_concrete" => Some(BlockKind::LimeConcrete), + "pink_concrete" => Some(BlockKind::PinkConcrete), + "gray_concrete" => Some(BlockKind::GrayConcrete), + "light_gray_concrete" => Some(BlockKind::LightGrayConcrete), + "cyan_concrete" => Some(BlockKind::CyanConcrete), + "purple_concrete" => Some(BlockKind::PurpleConcrete), + "blue_concrete" => Some(BlockKind::BlueConcrete), + "brown_concrete" => Some(BlockKind::BrownConcrete), + "green_concrete" => Some(BlockKind::GreenConcrete), + "red_concrete" => Some(BlockKind::RedConcrete), + "black_concrete" => Some(BlockKind::BlackConcrete), + "white_concrete_powder" => Some(BlockKind::WhiteConcretePowder), + "orange_concrete_powder" => Some(BlockKind::OrangeConcretePowder), + "magenta_concrete_powder" => Some(BlockKind::MagentaConcretePowder), + "light_blue_concrete_powder" => Some(BlockKind::LightBlueConcretePowder), + "yellow_concrete_powder" => Some(BlockKind::YellowConcretePowder), + "lime_concrete_powder" => Some(BlockKind::LimeConcretePowder), + "pink_concrete_powder" => Some(BlockKind::PinkConcretePowder), + "gray_concrete_powder" => Some(BlockKind::GrayConcretePowder), + "light_gray_concrete_powder" => Some(BlockKind::LightGrayConcretePowder), + "cyan_concrete_powder" => Some(BlockKind::CyanConcretePowder), + "purple_concrete_powder" => Some(BlockKind::PurpleConcretePowder), + "blue_concrete_powder" => Some(BlockKind::BlueConcretePowder), + "brown_concrete_powder" => Some(BlockKind::BrownConcretePowder), + "green_concrete_powder" => Some(BlockKind::GreenConcretePowder), + "red_concrete_powder" => Some(BlockKind::RedConcretePowder), + "black_concrete_powder" => Some(BlockKind::BlackConcretePowder), + "kelp" => Some(BlockKind::Kelp), + "kelp_plant" => Some(BlockKind::KelpPlant), + "dried_kelp_block" => Some(BlockKind::DriedKelpBlock), + "turtle_egg" => Some(BlockKind::TurtleEgg), + "dead_tube_coral_block" => Some(BlockKind::DeadTubeCoralBlock), + "dead_brain_coral_block" => Some(BlockKind::DeadBrainCoralBlock), + "dead_bubble_coral_block" => Some(BlockKind::DeadBubbleCoralBlock), + "dead_fire_coral_block" => Some(BlockKind::DeadFireCoralBlock), + "dead_horn_coral_block" => Some(BlockKind::DeadHornCoralBlock), + "tube_coral_block" => Some(BlockKind::TubeCoralBlock), + "brain_coral_block" => Some(BlockKind::BrainCoralBlock), + "bubble_coral_block" => Some(BlockKind::BubbleCoralBlock), + "fire_coral_block" => Some(BlockKind::FireCoralBlock), + "horn_coral_block" => Some(BlockKind::HornCoralBlock), + "dead_tube_coral" => Some(BlockKind::DeadTubeCoral), + "dead_brain_coral" => Some(BlockKind::DeadBrainCoral), + "dead_bubble_coral" => Some(BlockKind::DeadBubbleCoral), + "dead_fire_coral" => Some(BlockKind::DeadFireCoral), + "dead_horn_coral" => Some(BlockKind::DeadHornCoral), + "tube_coral" => Some(BlockKind::TubeCoral), + "brain_coral" => Some(BlockKind::BrainCoral), + "bubble_coral" => Some(BlockKind::BubbleCoral), + "fire_coral" => Some(BlockKind::FireCoral), + "horn_coral" => Some(BlockKind::HornCoral), + "dead_tube_coral_fan" => Some(BlockKind::DeadTubeCoralFan), + "dead_brain_coral_fan" => Some(BlockKind::DeadBrainCoralFan), + "dead_bubble_coral_fan" => Some(BlockKind::DeadBubbleCoralFan), + "dead_fire_coral_fan" => Some(BlockKind::DeadFireCoralFan), + "dead_horn_coral_fan" => Some(BlockKind::DeadHornCoralFan), + "tube_coral_fan" => Some(BlockKind::TubeCoralFan), + "brain_coral_fan" => Some(BlockKind::BrainCoralFan), + "bubble_coral_fan" => Some(BlockKind::BubbleCoralFan), + "fire_coral_fan" => Some(BlockKind::FireCoralFan), + "horn_coral_fan" => Some(BlockKind::HornCoralFan), + "dead_tube_coral_wall_fan" => Some(BlockKind::DeadTubeCoralWallFan), + "dead_brain_coral_wall_fan" => Some(BlockKind::DeadBrainCoralWallFan), + "dead_bubble_coral_wall_fan" => Some(BlockKind::DeadBubbleCoralWallFan), + "dead_fire_coral_wall_fan" => Some(BlockKind::DeadFireCoralWallFan), + "dead_horn_coral_wall_fan" => Some(BlockKind::DeadHornCoralWallFan), + "tube_coral_wall_fan" => Some(BlockKind::TubeCoralWallFan), + "brain_coral_wall_fan" => Some(BlockKind::BrainCoralWallFan), + "bubble_coral_wall_fan" => Some(BlockKind::BubbleCoralWallFan), + "fire_coral_wall_fan" => Some(BlockKind::FireCoralWallFan), + "horn_coral_wall_fan" => Some(BlockKind::HornCoralWallFan), + "sea_pickle" => Some(BlockKind::SeaPickle), + "blue_ice" => Some(BlockKind::BlueIce), + "conduit" => Some(BlockKind::Conduit), + "bamboo_sapling" => Some(BlockKind::BambooSapling), + "bamboo" => Some(BlockKind::Bamboo), + "potted_bamboo" => Some(BlockKind::PottedBamboo), + "void_air" => Some(BlockKind::VoidAir), + "cave_air" => Some(BlockKind::CaveAir), + "bubble_column" => Some(BlockKind::BubbleColumn), + "polished_granite_stairs" => Some(BlockKind::PolishedGraniteStairs), + "smooth_red_sandstone_stairs" => Some(BlockKind::SmoothRedSandstoneStairs), + "mossy_stone_brick_stairs" => Some(BlockKind::MossyStoneBrickStairs), + "polished_diorite_stairs" => Some(BlockKind::PolishedDioriteStairs), + "mossy_cobblestone_stairs" => Some(BlockKind::MossyCobblestoneStairs), + "end_stone_brick_stairs" => Some(BlockKind::EndStoneBrickStairs), + "stone_stairs" => Some(BlockKind::StoneStairs), + "smooth_sandstone_stairs" => Some(BlockKind::SmoothSandstoneStairs), + "smooth_quartz_stairs" => Some(BlockKind::SmoothQuartzStairs), + "granite_stairs" => Some(BlockKind::GraniteStairs), + "andesite_stairs" => Some(BlockKind::AndesiteStairs), + "red_nether_brick_stairs" => Some(BlockKind::RedNetherBrickStairs), + "polished_andesite_stairs" => Some(BlockKind::PolishedAndesiteStairs), + "diorite_stairs" => Some(BlockKind::DioriteStairs), + "polished_granite_slab" => Some(BlockKind::PolishedGraniteSlab), + "smooth_red_sandstone_slab" => Some(BlockKind::SmoothRedSandstoneSlab), + "mossy_stone_brick_slab" => Some(BlockKind::MossyStoneBrickSlab), + "polished_diorite_slab" => Some(BlockKind::PolishedDioriteSlab), + "mossy_cobblestone_slab" => Some(BlockKind::MossyCobblestoneSlab), + "end_stone_brick_slab" => Some(BlockKind::EndStoneBrickSlab), + "smooth_sandstone_slab" => Some(BlockKind::SmoothSandstoneSlab), + "smooth_quartz_slab" => Some(BlockKind::SmoothQuartzSlab), + "granite_slab" => Some(BlockKind::GraniteSlab), + "andesite_slab" => Some(BlockKind::AndesiteSlab), + "red_nether_brick_slab" => Some(BlockKind::RedNetherBrickSlab), + "polished_andesite_slab" => Some(BlockKind::PolishedAndesiteSlab), + "diorite_slab" => Some(BlockKind::DioriteSlab), + "brick_wall" => Some(BlockKind::BrickWall), + "prismarine_wall" => Some(BlockKind::PrismarineWall), + "red_sandstone_wall" => Some(BlockKind::RedSandstoneWall), + "mossy_stone_brick_wall" => Some(BlockKind::MossyStoneBrickWall), + "granite_wall" => Some(BlockKind::GraniteWall), + "stone_brick_wall" => Some(BlockKind::StoneBrickWall), + "nether_brick_wall" => Some(BlockKind::NetherBrickWall), + "andesite_wall" => Some(BlockKind::AndesiteWall), + "red_nether_brick_wall" => Some(BlockKind::RedNetherBrickWall), + "sandstone_wall" => Some(BlockKind::SandstoneWall), + "end_stone_brick_wall" => Some(BlockKind::EndStoneBrickWall), + "diorite_wall" => Some(BlockKind::DioriteWall), + "scaffolding" => Some(BlockKind::Scaffolding), + "loom" => Some(BlockKind::Loom), + "barrel" => Some(BlockKind::Barrel), + "smoker" => Some(BlockKind::Smoker), + "blast_furnace" => Some(BlockKind::BlastFurnace), + "cartography_table" => Some(BlockKind::CartographyTable), + "fletching_table" => Some(BlockKind::FletchingTable), + "grindstone" => Some(BlockKind::Grindstone), + "lectern" => Some(BlockKind::Lectern), + "smithing_table" => Some(BlockKind::SmithingTable), + "stonecutter" => Some(BlockKind::Stonecutter), + "bell" => Some(BlockKind::Bell), + "lantern" => Some(BlockKind::Lantern), + "soul_lantern" => Some(BlockKind::SoulLantern), + "campfire" => Some(BlockKind::Campfire), + "soul_campfire" => Some(BlockKind::SoulCampfire), + "sweet_berry_bush" => Some(BlockKind::SweetBerryBush), + "warped_stem" => Some(BlockKind::WarpedStem), + "stripped_warped_stem" => Some(BlockKind::StrippedWarpedStem), + "warped_hyphae" => Some(BlockKind::WarpedHyphae), + "stripped_warped_hyphae" => Some(BlockKind::StrippedWarpedHyphae), + "warped_nylium" => Some(BlockKind::WarpedNylium), + "warped_fungus" => Some(BlockKind::WarpedFungus), + "warped_wart_block" => Some(BlockKind::WarpedWartBlock), + "warped_roots" => Some(BlockKind::WarpedRoots), + "nether_sprouts" => Some(BlockKind::NetherSprouts), + "crimson_stem" => Some(BlockKind::CrimsonStem), + "stripped_crimson_stem" => Some(BlockKind::StrippedCrimsonStem), + "crimson_hyphae" => Some(BlockKind::CrimsonHyphae), + "stripped_crimson_hyphae" => Some(BlockKind::StrippedCrimsonHyphae), + "crimson_nylium" => Some(BlockKind::CrimsonNylium), + "crimson_fungus" => Some(BlockKind::CrimsonFungus), + "shroomlight" => Some(BlockKind::Shroomlight), + "weeping_vines" => Some(BlockKind::WeepingVines), + "weeping_vines_plant" => Some(BlockKind::WeepingVinesPlant), + "twisting_vines" => Some(BlockKind::TwistingVines), + "twisting_vines_plant" => Some(BlockKind::TwistingVinesPlant), + "crimson_roots" => Some(BlockKind::CrimsonRoots), + "crimson_planks" => Some(BlockKind::CrimsonPlanks), + "warped_planks" => Some(BlockKind::WarpedPlanks), + "crimson_slab" => Some(BlockKind::CrimsonSlab), + "warped_slab" => Some(BlockKind::WarpedSlab), + "crimson_pressure_plate" => Some(BlockKind::CrimsonPressurePlate), + "warped_pressure_plate" => Some(BlockKind::WarpedPressurePlate), + "crimson_fence" => Some(BlockKind::CrimsonFence), + "warped_fence" => Some(BlockKind::WarpedFence), + "crimson_trapdoor" => Some(BlockKind::CrimsonTrapdoor), + "warped_trapdoor" => Some(BlockKind::WarpedTrapdoor), + "crimson_fence_gate" => Some(BlockKind::CrimsonFenceGate), + "warped_fence_gate" => Some(BlockKind::WarpedFenceGate), + "crimson_stairs" => Some(BlockKind::CrimsonStairs), + "warped_stairs" => Some(BlockKind::WarpedStairs), + "crimson_button" => Some(BlockKind::CrimsonButton), + "warped_button" => Some(BlockKind::WarpedButton), + "crimson_door" => Some(BlockKind::CrimsonDoor), + "warped_door" => Some(BlockKind::WarpedDoor), + "crimson_sign" => Some(BlockKind::CrimsonSign), + "warped_sign" => Some(BlockKind::WarpedSign), + "crimson_wall_sign" => Some(BlockKind::CrimsonWallSign), + "warped_wall_sign" => Some(BlockKind::WarpedWallSign), + "structure_block" => Some(BlockKind::StructureBlock), + "jigsaw" => Some(BlockKind::Jigsaw), + "composter" => Some(BlockKind::Composter), + "target" => Some(BlockKind::Target), + "bee_nest" => Some(BlockKind::BeeNest), + "beehive" => Some(BlockKind::Beehive), + "honey_block" => Some(BlockKind::HoneyBlock), + "honeycomb_block" => Some(BlockKind::HoneycombBlock), + "netherite_block" => Some(BlockKind::NetheriteBlock), + "ancient_debris" => Some(BlockKind::AncientDebris), + "crying_obsidian" => Some(BlockKind::CryingObsidian), + "respawn_anchor" => Some(BlockKind::RespawnAnchor), + "potted_crimson_fungus" => Some(BlockKind::PottedCrimsonFungus), + "potted_warped_fungus" => Some(BlockKind::PottedWarpedFungus), + "potted_crimson_roots" => Some(BlockKind::PottedCrimsonRoots), + "potted_warped_roots" => Some(BlockKind::PottedWarpedRoots), + "lodestone" => Some(BlockKind::Lodestone), + "blackstone" => Some(BlockKind::Blackstone), + "blackstone_stairs" => Some(BlockKind::BlackstoneStairs), + "blackstone_wall" => Some(BlockKind::BlackstoneWall), + "blackstone_slab" => Some(BlockKind::BlackstoneSlab), + "polished_blackstone" => Some(BlockKind::PolishedBlackstone), + "polished_blackstone_bricks" => Some(BlockKind::PolishedBlackstoneBricks), + "cracked_polished_blackstone_bricks" => { + Some(BlockKind::CrackedPolishedBlackstoneBricks) + } + "chiseled_polished_blackstone" => Some(BlockKind::ChiseledPolishedBlackstone), + "polished_blackstone_brick_slab" => Some(BlockKind::PolishedBlackstoneBrickSlab), + "polished_blackstone_brick_stairs" => Some(BlockKind::PolishedBlackstoneBrickStairs), + "polished_blackstone_brick_wall" => Some(BlockKind::PolishedBlackstoneBrickWall), + "gilded_blackstone" => Some(BlockKind::GildedBlackstone), + "polished_blackstone_stairs" => Some(BlockKind::PolishedBlackstoneStairs), + "polished_blackstone_slab" => Some(BlockKind::PolishedBlackstoneSlab), + "polished_blackstone_pressure_plate" => { + Some(BlockKind::PolishedBlackstonePressurePlate) + } + "polished_blackstone_button" => Some(BlockKind::PolishedBlackstoneButton), + "polished_blackstone_wall" => Some(BlockKind::PolishedBlackstoneWall), + "chiseled_nether_bricks" => Some(BlockKind::ChiseledNetherBricks), + "cracked_nether_bricks" => Some(BlockKind::CrackedNetherBricks), + "quartz_bricks" => Some(BlockKind::QuartzBricks), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `display_name` property of this `BlockKind`. + pub fn display_name(&self) -> &'static str { + match self { + BlockKind::Air => "Air", + BlockKind::Stone => "Stone", + BlockKind::Granite => "Granite", + BlockKind::PolishedGranite => "Polished Granite", + BlockKind::Diorite => "Diorite", + BlockKind::PolishedDiorite => "Polished Diorite", + BlockKind::Andesite => "Andesite", + BlockKind::PolishedAndesite => "Polished Andesite", + BlockKind::GrassBlock => "Grass Block", + BlockKind::Dirt => "Dirt", + BlockKind::CoarseDirt => "Coarse Dirt", + BlockKind::Podzol => "Podzol", + BlockKind::Cobblestone => "Cobblestone", + BlockKind::OakPlanks => "Oak Planks", + BlockKind::SprucePlanks => "Spruce Planks", + BlockKind::BirchPlanks => "Birch Planks", + BlockKind::JunglePlanks => "Jungle Planks", + BlockKind::AcaciaPlanks => "Acacia Planks", + BlockKind::DarkOakPlanks => "Dark Oak Planks", + BlockKind::OakSapling => "Oak Sapling", + BlockKind::SpruceSapling => "Spruce Sapling", + BlockKind::BirchSapling => "Birch Sapling", + BlockKind::JungleSapling => "Jungle Sapling", + BlockKind::AcaciaSapling => "Acacia Sapling", + BlockKind::DarkOakSapling => "Dark Oak Sapling", + BlockKind::Bedrock => "Bedrock", + BlockKind::Water => "Water", + BlockKind::Lava => "Lava", + BlockKind::Sand => "Sand", + BlockKind::RedSand => "Red Sand", + BlockKind::Gravel => "Gravel", + BlockKind::GoldOre => "Gold Ore", + BlockKind::IronOre => "Iron Ore", + BlockKind::CoalOre => "Coal Ore", + BlockKind::NetherGoldOre => "Nether Gold Ore", + BlockKind::OakLog => "Oak Log", + BlockKind::SpruceLog => "Spruce Log", + BlockKind::BirchLog => "Birch Log", + BlockKind::JungleLog => "Jungle Log", + BlockKind::AcaciaLog => "Acacia Log", + BlockKind::DarkOakLog => "Dark Oak Log", + BlockKind::StrippedSpruceLog => "Stripped Spruce Log", + BlockKind::StrippedBirchLog => "Stripped Birch Log", + BlockKind::StrippedJungleLog => "Stripped Jungle Log", + BlockKind::StrippedAcaciaLog => "Stripped Acacia Log", + BlockKind::StrippedDarkOakLog => "Stripped Dark Oak Log", + BlockKind::StrippedOakLog => "Stripped Oak Log", + BlockKind::OakWood => "Oak Wood", + BlockKind::SpruceWood => "Spruce Wood", + BlockKind::BirchWood => "Birch Wood", + BlockKind::JungleWood => "Jungle Wood", + BlockKind::AcaciaWood => "Acacia Wood", + BlockKind::DarkOakWood => "Dark Oak Wood", + BlockKind::StrippedOakWood => "Stripped Oak Wood", + BlockKind::StrippedSpruceWood => "Stripped Spruce Wood", + BlockKind::StrippedBirchWood => "Stripped Birch Wood", + BlockKind::StrippedJungleWood => "Stripped Jungle Wood", + BlockKind::StrippedAcaciaWood => "Stripped Acacia Wood", + BlockKind::StrippedDarkOakWood => "Stripped Dark Oak Wood", + BlockKind::OakLeaves => "Oak Leaves", + BlockKind::SpruceLeaves => "Spruce Leaves", + BlockKind::BirchLeaves => "Birch Leaves", + BlockKind::JungleLeaves => "Jungle Leaves", + BlockKind::AcaciaLeaves => "Acacia Leaves", + BlockKind::DarkOakLeaves => "Dark Oak Leaves", + BlockKind::Sponge => "Sponge", + BlockKind::WetSponge => "Wet Sponge", + BlockKind::Glass => "Glass", + BlockKind::LapisOre => "Lapis Lazuli Ore", + BlockKind::LapisBlock => "Lapis Lazuli Block", + BlockKind::Dispenser => "Dispenser", + BlockKind::Sandstone => "Sandstone", + BlockKind::ChiseledSandstone => "Chiseled Sandstone", + BlockKind::CutSandstone => "Cut Sandstone", + BlockKind::NoteBlock => "Note Block", + BlockKind::WhiteBed => "White Bed", + BlockKind::OrangeBed => "Orange Bed", + BlockKind::MagentaBed => "Magenta Bed", + BlockKind::LightBlueBed => "Light Blue Bed", + BlockKind::YellowBed => "Yellow Bed", + BlockKind::LimeBed => "Lime Bed", + BlockKind::PinkBed => "Pink Bed", + BlockKind::GrayBed => "Gray Bed", + BlockKind::LightGrayBed => "Light Gray Bed", + BlockKind::CyanBed => "Cyan Bed", + BlockKind::PurpleBed => "Purple Bed", + BlockKind::BlueBed => "Blue Bed", + BlockKind::BrownBed => "Brown Bed", + BlockKind::GreenBed => "Green Bed", + BlockKind::RedBed => "Red Bed", + BlockKind::BlackBed => "Black Bed", + BlockKind::PoweredRail => "Powered Rail", + BlockKind::DetectorRail => "Detector Rail", + BlockKind::StickyPiston => "Sticky Piston", + BlockKind::Cobweb => "Cobweb", + BlockKind::Grass => "Grass", + BlockKind::Fern => "Fern", + BlockKind::DeadBush => "Dead Bush", + BlockKind::Seagrass => "Seagrass", + BlockKind::TallSeagrass => "Tall Seagrass", + BlockKind::Piston => "Piston", + BlockKind::PistonHead => "Piston Head", + BlockKind::WhiteWool => "White Wool", + BlockKind::OrangeWool => "Orange Wool", + BlockKind::MagentaWool => "Magenta Wool", + BlockKind::LightBlueWool => "Light Blue Wool", + BlockKind::YellowWool => "Yellow Wool", + BlockKind::LimeWool => "Lime Wool", + BlockKind::PinkWool => "Pink Wool", + BlockKind::GrayWool => "Gray Wool", + BlockKind::LightGrayWool => "Light Gray Wool", + BlockKind::CyanWool => "Cyan Wool", + BlockKind::PurpleWool => "Purple Wool", + BlockKind::BlueWool => "Blue Wool", + BlockKind::BrownWool => "Brown Wool", + BlockKind::GreenWool => "Green Wool", + BlockKind::RedWool => "Red Wool", + BlockKind::BlackWool => "Black Wool", + BlockKind::MovingPiston => "Moving Piston", + BlockKind::Dandelion => "Dandelion", + BlockKind::Poppy => "Poppy", + BlockKind::BlueOrchid => "Blue Orchid", + BlockKind::Allium => "Allium", + BlockKind::AzureBluet => "Azure Bluet", + BlockKind::RedTulip => "Red Tulip", + BlockKind::OrangeTulip => "Orange Tulip", + BlockKind::WhiteTulip => "White Tulip", + BlockKind::PinkTulip => "Pink Tulip", + BlockKind::OxeyeDaisy => "Oxeye Daisy", + BlockKind::Cornflower => "Cornflower", + BlockKind::WitherRose => "Wither Rose", + BlockKind::LilyOfTheValley => "Lily of the Valley", + BlockKind::BrownMushroom => "Brown Mushroom", + BlockKind::RedMushroom => "Red Mushroom", + BlockKind::GoldBlock => "Block of Gold", + BlockKind::IronBlock => "Block of Iron", + BlockKind::Bricks => "Bricks", + BlockKind::Tnt => "TNT", + BlockKind::Bookshelf => "Bookshelf", + BlockKind::MossyCobblestone => "Mossy Cobblestone", + BlockKind::Obsidian => "Obsidian", + BlockKind::Torch => "Torch", + BlockKind::WallTorch => "Wall Torch", + BlockKind::Fire => "Fire", + BlockKind::SoulFire => "Soul Fire", + BlockKind::Spawner => "Spawner", + BlockKind::OakStairs => "Oak Stairs", + BlockKind::Chest => "Chest", + BlockKind::RedstoneWire => "Redstone Wire", + BlockKind::DiamondOre => "Diamond Ore", + BlockKind::DiamondBlock => "Block of Diamond", + BlockKind::CraftingTable => "Crafting Table", + BlockKind::Wheat => "Wheat Crops", + BlockKind::Farmland => "Farmland", + BlockKind::Furnace => "Furnace", + BlockKind::OakSign => "Oak Sign", + BlockKind::SpruceSign => "Spruce Sign", + BlockKind::BirchSign => "Birch Sign", + BlockKind::AcaciaSign => "Acacia Sign", + BlockKind::JungleSign => "Jungle Sign", + BlockKind::DarkOakSign => "Dark Oak Sign", + BlockKind::OakDoor => "Oak Door", + BlockKind::Ladder => "Ladder", + BlockKind::Rail => "Rail", + BlockKind::CobblestoneStairs => "Cobblestone Stairs", + BlockKind::OakWallSign => "Oak Wall Sign", + BlockKind::SpruceWallSign => "Spruce Wall Sign", + BlockKind::BirchWallSign => "Birch Wall Sign", + BlockKind::AcaciaWallSign => "Acacia Wall Sign", + BlockKind::JungleWallSign => "Jungle Wall Sign", + BlockKind::DarkOakWallSign => "Dark Oak Wall Sign", + BlockKind::Lever => "Lever", + BlockKind::StonePressurePlate => "Stone Pressure Plate", + BlockKind::IronDoor => "Iron Door", + BlockKind::OakPressurePlate => "Oak Pressure Plate", + BlockKind::SprucePressurePlate => "Spruce Pressure Plate", + BlockKind::BirchPressurePlate => "Birch Pressure Plate", + BlockKind::JunglePressurePlate => "Jungle Pressure Plate", + BlockKind::AcaciaPressurePlate => "Acacia Pressure Plate", + BlockKind::DarkOakPressurePlate => "Dark Oak Pressure Plate", + BlockKind::RedstoneOre => "Redstone Ore", + BlockKind::RedstoneTorch => "Redstone Torch", + BlockKind::RedstoneWallTorch => "Redstone Wall Torch", + BlockKind::StoneButton => "Stone Button", + BlockKind::Snow => "Snow", + BlockKind::Ice => "Ice", + BlockKind::SnowBlock => "Snow Block", + BlockKind::Cactus => "Cactus", + BlockKind::Clay => "Clay", + BlockKind::SugarCane => "Sugar Cane", + BlockKind::Jukebox => "Jukebox", + BlockKind::OakFence => "Oak Fence", + BlockKind::Pumpkin => "Pumpkin", + BlockKind::Netherrack => "Netherrack", + BlockKind::SoulSand => "Soul Sand", + BlockKind::SoulSoil => "Soul Soil", + BlockKind::Basalt => "Basalt", + BlockKind::PolishedBasalt => "Polished Basalt", + BlockKind::SoulTorch => "Soul Torch", + BlockKind::SoulWallTorch => "Soul Wall Torch", + BlockKind::Glowstone => "Glowstone", + BlockKind::NetherPortal => "Nether Portal", + BlockKind::CarvedPumpkin => "Carved Pumpkin", + BlockKind::JackOLantern => "Jack o'Lantern", + BlockKind::Cake => "Cake", + BlockKind::Repeater => "Redstone Repeater", + BlockKind::WhiteStainedGlass => "White Stained Glass", + BlockKind::OrangeStainedGlass => "Orange Stained Glass", + BlockKind::MagentaStainedGlass => "Magenta Stained Glass", + BlockKind::LightBlueStainedGlass => "Light Blue Stained Glass", + BlockKind::YellowStainedGlass => "Yellow Stained Glass", + BlockKind::LimeStainedGlass => "Lime Stained Glass", + BlockKind::PinkStainedGlass => "Pink Stained Glass", + BlockKind::GrayStainedGlass => "Gray Stained Glass", + BlockKind::LightGrayStainedGlass => "Light Gray Stained Glass", + BlockKind::CyanStainedGlass => "Cyan Stained Glass", + BlockKind::PurpleStainedGlass => "Purple Stained Glass", + BlockKind::BlueStainedGlass => "Blue Stained Glass", + BlockKind::BrownStainedGlass => "Brown Stained Glass", + BlockKind::GreenStainedGlass => "Green Stained Glass", + BlockKind::RedStainedGlass => "Red Stained Glass", + BlockKind::BlackStainedGlass => "Black Stained Glass", + BlockKind::OakTrapdoor => "Oak Trapdoor", + BlockKind::SpruceTrapdoor => "Spruce Trapdoor", + BlockKind::BirchTrapdoor => "Birch Trapdoor", + BlockKind::JungleTrapdoor => "Jungle Trapdoor", + BlockKind::AcaciaTrapdoor => "Acacia Trapdoor", + BlockKind::DarkOakTrapdoor => "Dark Oak Trapdoor", + BlockKind::StoneBricks => "Stone Bricks", + BlockKind::MossyStoneBricks => "Mossy Stone Bricks", + BlockKind::CrackedStoneBricks => "Cracked Stone Bricks", + BlockKind::ChiseledStoneBricks => "Chiseled Stone Bricks", + BlockKind::InfestedStone => "Infested Stone", + BlockKind::InfestedCobblestone => "Infested Cobblestone", + BlockKind::InfestedStoneBricks => "Infested Stone Bricks", + BlockKind::InfestedMossyStoneBricks => "Infested Mossy Stone Bricks", + BlockKind::InfestedCrackedStoneBricks => "Infested Cracked Stone Bricks", + BlockKind::InfestedChiseledStoneBricks => "Infested Chiseled Stone Bricks", + BlockKind::BrownMushroomBlock => "Brown Mushroom Block", + BlockKind::RedMushroomBlock => "Red Mushroom Block", + BlockKind::MushroomStem => "Mushroom Stem", + BlockKind::IronBars => "Iron Bars", + BlockKind::Chain => "Chain", + BlockKind::GlassPane => "Glass Pane", + BlockKind::Melon => "Melon", + BlockKind::AttachedPumpkinStem => "Attached Pumpkin Stem", + BlockKind::AttachedMelonStem => "Attached Melon Stem", + BlockKind::PumpkinStem => "Pumpkin Stem", + BlockKind::MelonStem => "Melon Stem", + BlockKind::Vine => "Vines", + BlockKind::OakFenceGate => "Oak Fence Gate", + BlockKind::BrickStairs => "Brick Stairs", + BlockKind::StoneBrickStairs => "Stone Brick Stairs", + BlockKind::Mycelium => "Mycelium", + BlockKind::LilyPad => "Lily Pad", + BlockKind::NetherBricks => "Nether Bricks", + BlockKind::NetherBrickFence => "Nether Brick Fence", + BlockKind::NetherBrickStairs => "Nether Brick Stairs", + BlockKind::NetherWart => "Nether Wart", + BlockKind::EnchantingTable => "Enchanting Table", + BlockKind::BrewingStand => "Brewing Stand", + BlockKind::Cauldron => "Cauldron", + BlockKind::EndPortal => "End Portal", + BlockKind::EndPortalFrame => "End Portal Frame", + BlockKind::EndStone => "End Stone", + BlockKind::DragonEgg => "Dragon Egg", + BlockKind::RedstoneLamp => "Redstone Lamp", + BlockKind::Cocoa => "Cocoa", + BlockKind::SandstoneStairs => "Sandstone Stairs", + BlockKind::EmeraldOre => "Emerald Ore", + BlockKind::EnderChest => "Ender Chest", + BlockKind::TripwireHook => "Tripwire Hook", + BlockKind::Tripwire => "Tripwire", + BlockKind::EmeraldBlock => "Block of Emerald", + BlockKind::SpruceStairs => "Spruce Stairs", + BlockKind::BirchStairs => "Birch Stairs", + BlockKind::JungleStairs => "Jungle Stairs", + BlockKind::CommandBlock => "Command Block", + BlockKind::Beacon => "Beacon", + BlockKind::CobblestoneWall => "Cobblestone Wall", + BlockKind::MossyCobblestoneWall => "Mossy Cobblestone Wall", + BlockKind::FlowerPot => "Flower Pot", + BlockKind::PottedOakSapling => "Potted Oak Sapling", + BlockKind::PottedSpruceSapling => "Potted Spruce Sapling", + BlockKind::PottedBirchSapling => "Potted Birch Sapling", + BlockKind::PottedJungleSapling => "Potted Jungle Sapling", + BlockKind::PottedAcaciaSapling => "Potted Acacia Sapling", + BlockKind::PottedDarkOakSapling => "Potted Dark Oak Sapling", + BlockKind::PottedFern => "Potted Fern", + BlockKind::PottedDandelion => "Potted Dandelion", + BlockKind::PottedPoppy => "Potted Poppy", + BlockKind::PottedBlueOrchid => "Potted Blue Orchid", + BlockKind::PottedAllium => "Potted Allium", + BlockKind::PottedAzureBluet => "Potted Azure Bluet", + BlockKind::PottedRedTulip => "Potted Red Tulip", + BlockKind::PottedOrangeTulip => "Potted Orange Tulip", + BlockKind::PottedWhiteTulip => "Potted White Tulip", + BlockKind::PottedPinkTulip => "Potted Pink Tulip", + BlockKind::PottedOxeyeDaisy => "Potted Oxeye Daisy", + BlockKind::PottedCornflower => "Potted Cornflower", + BlockKind::PottedLilyOfTheValley => "Potted Lily of the Valley", + BlockKind::PottedWitherRose => "Potted Wither Rose", + BlockKind::PottedRedMushroom => "Potted Red Mushroom", + BlockKind::PottedBrownMushroom => "Potted Brown Mushroom", + BlockKind::PottedDeadBush => "Potted Dead Bush", + BlockKind::PottedCactus => "Potted Cactus", + BlockKind::Carrots => "Carrots", + BlockKind::Potatoes => "Potatoes", + BlockKind::OakButton => "Oak Button", + BlockKind::SpruceButton => "Spruce Button", + BlockKind::BirchButton => "Birch Button", + BlockKind::JungleButton => "Jungle Button", + BlockKind::AcaciaButton => "Acacia Button", + BlockKind::DarkOakButton => "Dark Oak Button", + BlockKind::SkeletonSkull => "Skeleton Skull", + BlockKind::SkeletonWallSkull => "Skeleton Wall Skull", + BlockKind::WitherSkeletonSkull => "Wither Skeleton Skull", + BlockKind::WitherSkeletonWallSkull => "Wither Skeleton Wall Skull", + BlockKind::ZombieHead => "Zombie Head", + BlockKind::ZombieWallHead => "Zombie Wall Head", + BlockKind::PlayerHead => "Player Head", + BlockKind::PlayerWallHead => "Player Wall Head", + BlockKind::CreeperHead => "Creeper Head", + BlockKind::CreeperWallHead => "Creeper Wall Head", + BlockKind::DragonHead => "Dragon Head", + BlockKind::DragonWallHead => "Dragon Wall Head", + BlockKind::Anvil => "Anvil", + BlockKind::ChippedAnvil => "Chipped Anvil", + BlockKind::DamagedAnvil => "Damaged Anvil", + BlockKind::TrappedChest => "Trapped Chest", + BlockKind::LightWeightedPressurePlate => "Light Weighted Pressure Plate", + BlockKind::HeavyWeightedPressurePlate => "Heavy Weighted Pressure Plate", + BlockKind::Comparator => "Redstone Comparator", + BlockKind::DaylightDetector => "Daylight Detector", + BlockKind::RedstoneBlock => "Block of Redstone", + BlockKind::NetherQuartzOre => "Nether Quartz Ore", + BlockKind::Hopper => "Hopper", + BlockKind::QuartzBlock => "Block of Quartz", + BlockKind::ChiseledQuartzBlock => "Chiseled Quartz Block", + BlockKind::QuartzPillar => "Quartz Pillar", + BlockKind::QuartzStairs => "Quartz Stairs", + BlockKind::ActivatorRail => "Activator Rail", + BlockKind::Dropper => "Dropper", + BlockKind::WhiteTerracotta => "White Terracotta", + BlockKind::OrangeTerracotta => "Orange Terracotta", + BlockKind::MagentaTerracotta => "Magenta Terracotta", + BlockKind::LightBlueTerracotta => "Light Blue Terracotta", + BlockKind::YellowTerracotta => "Yellow Terracotta", + BlockKind::LimeTerracotta => "Lime Terracotta", + BlockKind::PinkTerracotta => "Pink Terracotta", + BlockKind::GrayTerracotta => "Gray Terracotta", + BlockKind::LightGrayTerracotta => "Light Gray Terracotta", + BlockKind::CyanTerracotta => "Cyan Terracotta", + BlockKind::PurpleTerracotta => "Purple Terracotta", + BlockKind::BlueTerracotta => "Blue Terracotta", + BlockKind::BrownTerracotta => "Brown Terracotta", + BlockKind::GreenTerracotta => "Green Terracotta", + BlockKind::RedTerracotta => "Red Terracotta", + BlockKind::BlackTerracotta => "Black Terracotta", + BlockKind::WhiteStainedGlassPane => "White Stained Glass Pane", + BlockKind::OrangeStainedGlassPane => "Orange Stained Glass Pane", + BlockKind::MagentaStainedGlassPane => "Magenta Stained Glass Pane", + BlockKind::LightBlueStainedGlassPane => "Light Blue Stained Glass Pane", + BlockKind::YellowStainedGlassPane => "Yellow Stained Glass Pane", + BlockKind::LimeStainedGlassPane => "Lime Stained Glass Pane", + BlockKind::PinkStainedGlassPane => "Pink Stained Glass Pane", + BlockKind::GrayStainedGlassPane => "Gray Stained Glass Pane", + BlockKind::LightGrayStainedGlassPane => "Light Gray Stained Glass Pane", + BlockKind::CyanStainedGlassPane => "Cyan Stained Glass Pane", + BlockKind::PurpleStainedGlassPane => "Purple Stained Glass Pane", + BlockKind::BlueStainedGlassPane => "Blue Stained Glass Pane", + BlockKind::BrownStainedGlassPane => "Brown Stained Glass Pane", + BlockKind::GreenStainedGlassPane => "Green Stained Glass Pane", + BlockKind::RedStainedGlassPane => "Red Stained Glass Pane", + BlockKind::BlackStainedGlassPane => "Black Stained Glass Pane", + BlockKind::AcaciaStairs => "Acacia Stairs", + BlockKind::DarkOakStairs => "Dark Oak Stairs", + BlockKind::SlimeBlock => "Slime Block", + BlockKind::Barrier => "Barrier", + BlockKind::IronTrapdoor => "Iron Trapdoor", + BlockKind::Prismarine => "Prismarine", + BlockKind::PrismarineBricks => "Prismarine Bricks", + BlockKind::DarkPrismarine => "Dark Prismarine", + BlockKind::PrismarineStairs => "Prismarine Stairs", + BlockKind::PrismarineBrickStairs => "Prismarine Brick Stairs", + BlockKind::DarkPrismarineStairs => "Dark Prismarine Stairs", + BlockKind::PrismarineSlab => "Prismarine Slab", + BlockKind::PrismarineBrickSlab => "Prismarine Brick Slab", + BlockKind::DarkPrismarineSlab => "Dark Prismarine Slab", + BlockKind::SeaLantern => "Sea Lantern", + BlockKind::HayBlock => "Hay Bale", + BlockKind::WhiteCarpet => "White Carpet", + BlockKind::OrangeCarpet => "Orange Carpet", + BlockKind::MagentaCarpet => "Magenta Carpet", + BlockKind::LightBlueCarpet => "Light Blue Carpet", + BlockKind::YellowCarpet => "Yellow Carpet", + BlockKind::LimeCarpet => "Lime Carpet", + BlockKind::PinkCarpet => "Pink Carpet", + BlockKind::GrayCarpet => "Gray Carpet", + BlockKind::LightGrayCarpet => "Light Gray Carpet", + BlockKind::CyanCarpet => "Cyan Carpet", + BlockKind::PurpleCarpet => "Purple Carpet", + BlockKind::BlueCarpet => "Blue Carpet", + BlockKind::BrownCarpet => "Brown Carpet", + BlockKind::GreenCarpet => "Green Carpet", + BlockKind::RedCarpet => "Red Carpet", + BlockKind::BlackCarpet => "Black Carpet", + BlockKind::Terracotta => "Terracotta", + BlockKind::CoalBlock => "Block of Coal", + BlockKind::PackedIce => "Packed Ice", + BlockKind::Sunflower => "Sunflower", + BlockKind::Lilac => "Lilac", + BlockKind::RoseBush => "Rose Bush", + BlockKind::Peony => "Peony", + BlockKind::TallGrass => "Tall Grass", + BlockKind::LargeFern => "Large Fern", + BlockKind::WhiteBanner => "White Banner", + BlockKind::OrangeBanner => "Orange Banner", + BlockKind::MagentaBanner => "Magenta Banner", + BlockKind::LightBlueBanner => "Light Blue Banner", + BlockKind::YellowBanner => "Yellow Banner", + BlockKind::LimeBanner => "Lime Banner", + BlockKind::PinkBanner => "Pink Banner", + BlockKind::GrayBanner => "Gray Banner", + BlockKind::LightGrayBanner => "Light Gray Banner", + BlockKind::CyanBanner => "Cyan Banner", + BlockKind::PurpleBanner => "Purple Banner", + BlockKind::BlueBanner => "Blue Banner", + BlockKind::BrownBanner => "Brown Banner", + BlockKind::GreenBanner => "Green Banner", + BlockKind::RedBanner => "Red Banner", + BlockKind::BlackBanner => "Black Banner", + BlockKind::WhiteWallBanner => "White wall banner", + BlockKind::OrangeWallBanner => "Orange wall banner", + BlockKind::MagentaWallBanner => "Magenta wall banner", + BlockKind::LightBlueWallBanner => "Light blue wall banner", + BlockKind::YellowWallBanner => "Yellow wall banner", + BlockKind::LimeWallBanner => "Lime wall banner", + BlockKind::PinkWallBanner => "Pink wall banner", + BlockKind::GrayWallBanner => "Gray wall banner", + BlockKind::LightGrayWallBanner => "Light gray wall banner", + BlockKind::CyanWallBanner => "Cyan wall banner", + BlockKind::PurpleWallBanner => "Purple wall banner", + BlockKind::BlueWallBanner => "Blue wall banner", + BlockKind::BrownWallBanner => "Brown wall banner", + BlockKind::GreenWallBanner => "Green wall banner", + BlockKind::RedWallBanner => "Red wall banner", + BlockKind::BlackWallBanner => "Black wall banner", + BlockKind::RedSandstone => "Red Sandstone", + BlockKind::ChiseledRedSandstone => "Chiseled Red Sandstone", + BlockKind::CutRedSandstone => "Cut Red Sandstone", + BlockKind::RedSandstoneStairs => "Red Sandstone Stairs", + BlockKind::OakSlab => "Oak Slab", + BlockKind::SpruceSlab => "Spruce Slab", + BlockKind::BirchSlab => "Birch Slab", + BlockKind::JungleSlab => "Jungle Slab", + BlockKind::AcaciaSlab => "Acacia Slab", + BlockKind::DarkOakSlab => "Dark Oak Slab", + BlockKind::StoneSlab => "Stone Slab", + BlockKind::SmoothStoneSlab => "Smooth Stone Slab", + BlockKind::SandstoneSlab => "Sandstone Slab", + BlockKind::CutSandstoneSlab => "Cut Sandstone Slab", + BlockKind::PetrifiedOakSlab => "Petrified Oak Slab", + BlockKind::CobblestoneSlab => "Cobblestone Slab", + BlockKind::BrickSlab => "Brick Slab", + BlockKind::StoneBrickSlab => "Stone Brick Slab", + BlockKind::NetherBrickSlab => "Nether Brick Slab", + BlockKind::QuartzSlab => "Quartz Slab", + BlockKind::RedSandstoneSlab => "Red Sandstone Slab", + BlockKind::CutRedSandstoneSlab => "Cut Red Sandstone Slab", + BlockKind::PurpurSlab => "Purpur Slab", + BlockKind::SmoothStone => "Smooth Stone", + BlockKind::SmoothSandstone => "Smooth Sandstone", + BlockKind::SmoothQuartz => "Smooth Quartz Block", + BlockKind::SmoothRedSandstone => "Smooth Red Sandstone", + BlockKind::SpruceFenceGate => "Spruce Fence Gate", + BlockKind::BirchFenceGate => "Birch Fence Gate", + BlockKind::JungleFenceGate => "Jungle Fence Gate", + BlockKind::AcaciaFenceGate => "Acacia Fence Gate", + BlockKind::DarkOakFenceGate => "Dark Oak Fence Gate", + BlockKind::SpruceFence => "Spruce Fence", + BlockKind::BirchFence => "Birch Fence", + BlockKind::JungleFence => "Jungle Fence", + BlockKind::AcaciaFence => "Acacia Fence", + BlockKind::DarkOakFence => "Dark Oak Fence", + BlockKind::SpruceDoor => "Spruce Door", + BlockKind::BirchDoor => "Birch Door", + BlockKind::JungleDoor => "Jungle Door", + BlockKind::AcaciaDoor => "Acacia Door", + BlockKind::DarkOakDoor => "Dark Oak Door", + BlockKind::EndRod => "End Rod", + BlockKind::ChorusPlant => "Chorus Plant", + BlockKind::ChorusFlower => "Chorus Flower", + BlockKind::PurpurBlock => "Purpur Block", + BlockKind::PurpurPillar => "Purpur Pillar", + BlockKind::PurpurStairs => "Purpur Stairs", + BlockKind::EndStoneBricks => "End Stone Bricks", + BlockKind::Beetroots => "Beetroots", + BlockKind::GrassPath => "Grass Path", + BlockKind::EndGateway => "End Gateway", + BlockKind::RepeatingCommandBlock => "Repeating Command Block", + BlockKind::ChainCommandBlock => "Chain Command Block", + BlockKind::FrostedIce => "Frosted Ice", + BlockKind::MagmaBlock => "Magma Block", + BlockKind::NetherWartBlock => "Nether Wart Block", + BlockKind::RedNetherBricks => "Red Nether Bricks", + BlockKind::BoneBlock => "Bone Block", + BlockKind::StructureVoid => "Structure Void", + BlockKind::Observer => "Observer", + BlockKind::ShulkerBox => "Shulker Box", + BlockKind::WhiteShulkerBox => "White Shulker Box", + BlockKind::OrangeShulkerBox => "Orange Shulker Box", + BlockKind::MagentaShulkerBox => "Magenta Shulker Box", + BlockKind::LightBlueShulkerBox => "Light Blue Shulker Box", + BlockKind::YellowShulkerBox => "Yellow Shulker Box", + BlockKind::LimeShulkerBox => "Lime Shulker Box", + BlockKind::PinkShulkerBox => "Pink Shulker Box", + BlockKind::GrayShulkerBox => "Gray Shulker Box", + BlockKind::LightGrayShulkerBox => "Light Gray Shulker Box", + BlockKind::CyanShulkerBox => "Cyan Shulker Box", + BlockKind::PurpleShulkerBox => "Purple Shulker Box", + BlockKind::BlueShulkerBox => "Blue Shulker Box", + BlockKind::BrownShulkerBox => "Brown Shulker Box", + BlockKind::GreenShulkerBox => "Green Shulker Box", + BlockKind::RedShulkerBox => "Red Shulker Box", + BlockKind::BlackShulkerBox => "Black Shulker Box", + BlockKind::WhiteGlazedTerracotta => "White Glazed Terracotta", + BlockKind::OrangeGlazedTerracotta => "Orange Glazed Terracotta", + BlockKind::MagentaGlazedTerracotta => "Magenta Glazed Terracotta", + BlockKind::LightBlueGlazedTerracotta => "Light Blue Glazed Terracotta", + BlockKind::YellowGlazedTerracotta => "Yellow Glazed Terracotta", + BlockKind::LimeGlazedTerracotta => "Lime Glazed Terracotta", + BlockKind::PinkGlazedTerracotta => "Pink Glazed Terracotta", + BlockKind::GrayGlazedTerracotta => "Gray Glazed Terracotta", + BlockKind::LightGrayGlazedTerracotta => "Light Gray Glazed Terracotta", + BlockKind::CyanGlazedTerracotta => "Cyan Glazed Terracotta", + BlockKind::PurpleGlazedTerracotta => "Purple Glazed Terracotta", + BlockKind::BlueGlazedTerracotta => "Blue Glazed Terracotta", + BlockKind::BrownGlazedTerracotta => "Brown Glazed Terracotta", + BlockKind::GreenGlazedTerracotta => "Green Glazed Terracotta", + BlockKind::RedGlazedTerracotta => "Red Glazed Terracotta", + BlockKind::BlackGlazedTerracotta => "Black Glazed Terracotta", + BlockKind::WhiteConcrete => "White Concrete", + BlockKind::OrangeConcrete => "Orange Concrete", + BlockKind::MagentaConcrete => "Magenta Concrete", + BlockKind::LightBlueConcrete => "Light Blue Concrete", + BlockKind::YellowConcrete => "Yellow Concrete", + BlockKind::LimeConcrete => "Lime Concrete", + BlockKind::PinkConcrete => "Pink Concrete", + BlockKind::GrayConcrete => "Gray Concrete", + BlockKind::LightGrayConcrete => "Light Gray Concrete", + BlockKind::CyanConcrete => "Cyan Concrete", + BlockKind::PurpleConcrete => "Purple Concrete", + BlockKind::BlueConcrete => "Blue Concrete", + BlockKind::BrownConcrete => "Brown Concrete", + BlockKind::GreenConcrete => "Green Concrete", + BlockKind::RedConcrete => "Red Concrete", + BlockKind::BlackConcrete => "Black Concrete", + BlockKind::WhiteConcretePowder => "White Concrete Powder", + BlockKind::OrangeConcretePowder => "Orange Concrete Powder", + BlockKind::MagentaConcretePowder => "Magenta Concrete Powder", + BlockKind::LightBlueConcretePowder => "Light Blue Concrete Powder", + BlockKind::YellowConcretePowder => "Yellow Concrete Powder", + BlockKind::LimeConcretePowder => "Lime Concrete Powder", + BlockKind::PinkConcretePowder => "Pink Concrete Powder", + BlockKind::GrayConcretePowder => "Gray Concrete Powder", + BlockKind::LightGrayConcretePowder => "Light Gray Concrete Powder", + BlockKind::CyanConcretePowder => "Cyan Concrete Powder", + BlockKind::PurpleConcretePowder => "Purple Concrete Powder", + BlockKind::BlueConcretePowder => "Blue Concrete Powder", + BlockKind::BrownConcretePowder => "Brown Concrete Powder", + BlockKind::GreenConcretePowder => "Green Concrete Powder", + BlockKind::RedConcretePowder => "Red Concrete Powder", + BlockKind::BlackConcretePowder => "Black Concrete Powder", + BlockKind::Kelp => "Kelp", + BlockKind::KelpPlant => "Kelp Plant", + BlockKind::DriedKelpBlock => "Dried Kelp Block", + BlockKind::TurtleEgg => "Turtle Egg", + BlockKind::DeadTubeCoralBlock => "Dead Tube Coral Block", + BlockKind::DeadBrainCoralBlock => "Dead Brain Coral Block", + BlockKind::DeadBubbleCoralBlock => "Dead Bubble Coral Block", + BlockKind::DeadFireCoralBlock => "Dead Fire Coral Block", + BlockKind::DeadHornCoralBlock => "Dead Horn Coral Block", + BlockKind::TubeCoralBlock => "Tube Coral Block", + BlockKind::BrainCoralBlock => "Brain Coral Block", + BlockKind::BubbleCoralBlock => "Bubble Coral Block", + BlockKind::FireCoralBlock => "Fire Coral Block", + BlockKind::HornCoralBlock => "Horn Coral Block", + BlockKind::DeadTubeCoral => "Dead Tube Coral", + BlockKind::DeadBrainCoral => "Dead Brain Coral", + BlockKind::DeadBubbleCoral => "Dead Bubble Coral", + BlockKind::DeadFireCoral => "Dead Fire Coral", + BlockKind::DeadHornCoral => "Dead Horn Coral", + BlockKind::TubeCoral => "Tube Coral", + BlockKind::BrainCoral => "Brain Coral", + BlockKind::BubbleCoral => "Bubble Coral", + BlockKind::FireCoral => "Fire Coral", + BlockKind::HornCoral => "Horn Coral", + BlockKind::DeadTubeCoralFan => "Dead Tube Coral Fan", + BlockKind::DeadBrainCoralFan => "Dead Brain Coral Fan", + BlockKind::DeadBubbleCoralFan => "Dead Bubble Coral Fan", + BlockKind::DeadFireCoralFan => "Dead Fire Coral Fan", + BlockKind::DeadHornCoralFan => "Dead Horn Coral Fan", + BlockKind::TubeCoralFan => "Tube Coral Fan", + BlockKind::BrainCoralFan => "Brain Coral Fan", + BlockKind::BubbleCoralFan => "Bubble Coral Fan", + BlockKind::FireCoralFan => "Fire Coral Fan", + BlockKind::HornCoralFan => "Horn Coral Fan", + BlockKind::DeadTubeCoralWallFan => "Dead Tube Coral Wall Fan", + BlockKind::DeadBrainCoralWallFan => "Dead Brain Coral Wall Fan", + BlockKind::DeadBubbleCoralWallFan => "Dead Bubble Coral Wall Fan", + BlockKind::DeadFireCoralWallFan => "Dead Fire Coral Wall Fan", + BlockKind::DeadHornCoralWallFan => "Dead Horn Coral Wall Fan", + BlockKind::TubeCoralWallFan => "Tube Coral Wall Fan", + BlockKind::BrainCoralWallFan => "Brain Coral Wall Fan", + BlockKind::BubbleCoralWallFan => "Bubble Coral Wall Fan", + BlockKind::FireCoralWallFan => "Fire Coral Wall Fan", + BlockKind::HornCoralWallFan => "Horn Coral Wall Fan", + BlockKind::SeaPickle => "Sea Pickle", + BlockKind::BlueIce => "Blue Ice", + BlockKind::Conduit => "Conduit", + BlockKind::BambooSapling => "Bamboo Shoot", + BlockKind::Bamboo => "Bamboo", + BlockKind::PottedBamboo => "Potted Bamboo", + BlockKind::VoidAir => "Void Air", + BlockKind::CaveAir => "Cave Air", + BlockKind::BubbleColumn => "Bubble Column", + BlockKind::PolishedGraniteStairs => "Polished Granite Stairs", + BlockKind::SmoothRedSandstoneStairs => "Smooth Red Sandstone Stairs", + BlockKind::MossyStoneBrickStairs => "Mossy Stone Brick Stairs", + BlockKind::PolishedDioriteStairs => "Polished Diorite Stairs", + BlockKind::MossyCobblestoneStairs => "Mossy Cobblestone Stairs", + BlockKind::EndStoneBrickStairs => "End Stone Brick Stairs", + BlockKind::StoneStairs => "Stone Stairs", + BlockKind::SmoothSandstoneStairs => "Smooth Sandstone Stairs", + BlockKind::SmoothQuartzStairs => "Smooth Quartz Stairs", + BlockKind::GraniteStairs => "Granite Stairs", + BlockKind::AndesiteStairs => "Andesite Stairs", + BlockKind::RedNetherBrickStairs => "Red Nether Brick Stairs", + BlockKind::PolishedAndesiteStairs => "Polished Andesite Stairs", + BlockKind::DioriteStairs => "Diorite Stairs", + BlockKind::PolishedGraniteSlab => "Polished Granite Slab", + BlockKind::SmoothRedSandstoneSlab => "Smooth Red Sandstone Slab", + BlockKind::MossyStoneBrickSlab => "Mossy Stone Brick Slab", + BlockKind::PolishedDioriteSlab => "Polished Diorite Slab", + BlockKind::MossyCobblestoneSlab => "Mossy Cobblestone Slab", + BlockKind::EndStoneBrickSlab => "End Stone Brick Slab", + BlockKind::SmoothSandstoneSlab => "Smooth Sandstone Slab", + BlockKind::SmoothQuartzSlab => "Smooth Quartz Slab", + BlockKind::GraniteSlab => "Granite Slab", + BlockKind::AndesiteSlab => "Andesite Slab", + BlockKind::RedNetherBrickSlab => "Red Nether Brick Slab", + BlockKind::PolishedAndesiteSlab => "Polished Andesite Slab", + BlockKind::DioriteSlab => "Diorite Slab", + BlockKind::BrickWall => "Brick Wall", + BlockKind::PrismarineWall => "Prismarine Wall", + BlockKind::RedSandstoneWall => "Red Sandstone Wall", + BlockKind::MossyStoneBrickWall => "Mossy Stone Brick Wall", + BlockKind::GraniteWall => "Granite Wall", + BlockKind::StoneBrickWall => "Stone Brick Wall", + BlockKind::NetherBrickWall => "Nether Brick Wall", + BlockKind::AndesiteWall => "Andesite Wall", + BlockKind::RedNetherBrickWall => "Red Nether Brick Wall", + BlockKind::SandstoneWall => "Sandstone Wall", + BlockKind::EndStoneBrickWall => "End Stone Brick Wall", + BlockKind::DioriteWall => "Diorite Wall", + BlockKind::Scaffolding => "Scaffolding", + BlockKind::Loom => "Loom", + BlockKind::Barrel => "Barrel", + BlockKind::Smoker => "Smoker", + BlockKind::BlastFurnace => "Blast Furnace", + BlockKind::CartographyTable => "Cartography Table", + BlockKind::FletchingTable => "Fletching Table", + BlockKind::Grindstone => "Grindstone", + BlockKind::Lectern => "Lectern", + BlockKind::SmithingTable => "Smithing Table", + BlockKind::Stonecutter => "Stonecutter", + BlockKind::Bell => "Bell", + BlockKind::Lantern => "Lantern", + BlockKind::SoulLantern => "Soul Lantern", + BlockKind::Campfire => "Campfire", + BlockKind::SoulCampfire => "Soul Campfire", + BlockKind::SweetBerryBush => "Sweet Berry Bush", + BlockKind::WarpedStem => "Warped Stem", + BlockKind::StrippedWarpedStem => "Stripped Warped Stem", + BlockKind::WarpedHyphae => "Warped Hyphae", + BlockKind::StrippedWarpedHyphae => "Stripped Warped Hyphae", + BlockKind::WarpedNylium => "Warped Nylium", + BlockKind::WarpedFungus => "Warped Fungus", + BlockKind::WarpedWartBlock => "Warped Wart Block", + BlockKind::WarpedRoots => "Warped Roots", + BlockKind::NetherSprouts => "Nether Sprouts", + BlockKind::CrimsonStem => "Crimson Stem", + BlockKind::StrippedCrimsonStem => "Stripped Crimson Stem", + BlockKind::CrimsonHyphae => "Crimson Hyphae", + BlockKind::StrippedCrimsonHyphae => "Stripped Crimson Hyphae", + BlockKind::CrimsonNylium => "Crimson Nylium", + BlockKind::CrimsonFungus => "Crimson Fungus", + BlockKind::Shroomlight => "Shroomlight", + BlockKind::WeepingVines => "Weeping Vines", + BlockKind::WeepingVinesPlant => "Weeping Vines Plant", + BlockKind::TwistingVines => "Twisting Vines", + BlockKind::TwistingVinesPlant => "Twisting Vines Plant", + BlockKind::CrimsonRoots => "Crimson Roots", + BlockKind::CrimsonPlanks => "Crimson Planks", + BlockKind::WarpedPlanks => "Warped Planks", + BlockKind::CrimsonSlab => "Crimson Slab", + BlockKind::WarpedSlab => "Warped Slab", + BlockKind::CrimsonPressurePlate => "Crimson Pressure Plate", + BlockKind::WarpedPressurePlate => "Warped Pressure Plate", + BlockKind::CrimsonFence => "Crimson Fence", + BlockKind::WarpedFence => "Warped Fence", + BlockKind::CrimsonTrapdoor => "Crimson Trapdoor", + BlockKind::WarpedTrapdoor => "Warped Trapdoor", + BlockKind::CrimsonFenceGate => "Crimson Fence Gate", + BlockKind::WarpedFenceGate => "Warped Fence Gate", + BlockKind::CrimsonStairs => "Crimson Stairs", + BlockKind::WarpedStairs => "Warped Stairs", + BlockKind::CrimsonButton => "Crimson Button", + BlockKind::WarpedButton => "Warped Button", + BlockKind::CrimsonDoor => "Crimson Door", + BlockKind::WarpedDoor => "Warped Door", + BlockKind::CrimsonSign => "Crimson Sign", + BlockKind::WarpedSign => "Warped Sign", + BlockKind::CrimsonWallSign => "Crimson Wall Sign", + BlockKind::WarpedWallSign => "Warped Wall Sign", + BlockKind::StructureBlock => "Structure Block", + BlockKind::Jigsaw => "Jigsaw Block", + BlockKind::Composter => "Composter", + BlockKind::Target => "Target", + BlockKind::BeeNest => "Bee Nest", + BlockKind::Beehive => "Beehive", + BlockKind::HoneyBlock => "Honey Block", + BlockKind::HoneycombBlock => "Honeycomb Block", + BlockKind::NetheriteBlock => "Block of Netherite", + BlockKind::AncientDebris => "Ancient Debris", + BlockKind::CryingObsidian => "Crying Obsidian", + BlockKind::RespawnAnchor => "Respawn Anchor", + BlockKind::PottedCrimsonFungus => "Potted Crimson Fungus", + BlockKind::PottedWarpedFungus => "Potted Warped Fungus", + BlockKind::PottedCrimsonRoots => "Potted Crimson Roots", + BlockKind::PottedWarpedRoots => "Potted Warped Roots", + BlockKind::Lodestone => "Lodestone", + BlockKind::Blackstone => "Blackstone", + BlockKind::BlackstoneStairs => "Blackstone Stairs", + BlockKind::BlackstoneWall => "Blackstone Wall", + BlockKind::BlackstoneSlab => "Blackstone Slab", + BlockKind::PolishedBlackstone => "Polished Blackstone", + BlockKind::PolishedBlackstoneBricks => "Polished Blackstone Bricks", + BlockKind::CrackedPolishedBlackstoneBricks => "Cracked Polished Blackstone Bricks", + BlockKind::ChiseledPolishedBlackstone => "Chiseled Polished Blackstone", + BlockKind::PolishedBlackstoneBrickSlab => "Polished Blackstone Brick Slab", + BlockKind::PolishedBlackstoneBrickStairs => "Polished Blackstone Brick Stairs", + BlockKind::PolishedBlackstoneBrickWall => "Polished Blackstone Brick Wall", + BlockKind::GildedBlackstone => "Gilded Blackstone", + BlockKind::PolishedBlackstoneStairs => "Polished Blackstone Stairs", + BlockKind::PolishedBlackstoneSlab => "Polished Blackstone Slab", + BlockKind::PolishedBlackstonePressurePlate => "Polished Blackstone Pressure Plate", + BlockKind::PolishedBlackstoneButton => "Polished Blackstone Button", + BlockKind::PolishedBlackstoneWall => "Polished Blackstone Wall", + BlockKind::ChiseledNetherBricks => "Chiseled Nether Bricks", + BlockKind::CrackedNetherBricks => "Cracked Nether Bricks", + BlockKind::QuartzBricks => "Quartz Bricks", + } + } + + /// Gets a `BlockKind` by its `display_name`. + pub fn from_display_name(display_name: &str) -> Option { + match display_name { + "Air" => Some(BlockKind::Air), + "Stone" => Some(BlockKind::Stone), + "Granite" => Some(BlockKind::Granite), + "Polished Granite" => Some(BlockKind::PolishedGranite), + "Diorite" => Some(BlockKind::Diorite), + "Polished Diorite" => Some(BlockKind::PolishedDiorite), + "Andesite" => Some(BlockKind::Andesite), + "Polished Andesite" => Some(BlockKind::PolishedAndesite), + "Grass Block" => Some(BlockKind::GrassBlock), + "Dirt" => Some(BlockKind::Dirt), + "Coarse Dirt" => Some(BlockKind::CoarseDirt), + "Podzol" => Some(BlockKind::Podzol), + "Cobblestone" => Some(BlockKind::Cobblestone), + "Oak Planks" => Some(BlockKind::OakPlanks), + "Spruce Planks" => Some(BlockKind::SprucePlanks), + "Birch Planks" => Some(BlockKind::BirchPlanks), + "Jungle Planks" => Some(BlockKind::JunglePlanks), + "Acacia Planks" => Some(BlockKind::AcaciaPlanks), + "Dark Oak Planks" => Some(BlockKind::DarkOakPlanks), + "Oak Sapling" => Some(BlockKind::OakSapling), + "Spruce Sapling" => Some(BlockKind::SpruceSapling), + "Birch Sapling" => Some(BlockKind::BirchSapling), + "Jungle Sapling" => Some(BlockKind::JungleSapling), + "Acacia Sapling" => Some(BlockKind::AcaciaSapling), + "Dark Oak Sapling" => Some(BlockKind::DarkOakSapling), + "Bedrock" => Some(BlockKind::Bedrock), + "Water" => Some(BlockKind::Water), + "Lava" => Some(BlockKind::Lava), + "Sand" => Some(BlockKind::Sand), + "Red Sand" => Some(BlockKind::RedSand), + "Gravel" => Some(BlockKind::Gravel), + "Gold Ore" => Some(BlockKind::GoldOre), + "Iron Ore" => Some(BlockKind::IronOre), + "Coal Ore" => Some(BlockKind::CoalOre), + "Nether Gold Ore" => Some(BlockKind::NetherGoldOre), + "Oak Log" => Some(BlockKind::OakLog), + "Spruce Log" => Some(BlockKind::SpruceLog), + "Birch Log" => Some(BlockKind::BirchLog), + "Jungle Log" => Some(BlockKind::JungleLog), + "Acacia Log" => Some(BlockKind::AcaciaLog), + "Dark Oak Log" => Some(BlockKind::DarkOakLog), + "Stripped Spruce Log" => Some(BlockKind::StrippedSpruceLog), + "Stripped Birch Log" => Some(BlockKind::StrippedBirchLog), + "Stripped Jungle Log" => Some(BlockKind::StrippedJungleLog), + "Stripped Acacia Log" => Some(BlockKind::StrippedAcaciaLog), + "Stripped Dark Oak Log" => Some(BlockKind::StrippedDarkOakLog), + "Stripped Oak Log" => Some(BlockKind::StrippedOakLog), + "Oak Wood" => Some(BlockKind::OakWood), + "Spruce Wood" => Some(BlockKind::SpruceWood), + "Birch Wood" => Some(BlockKind::BirchWood), + "Jungle Wood" => Some(BlockKind::JungleWood), + "Acacia Wood" => Some(BlockKind::AcaciaWood), + "Dark Oak Wood" => Some(BlockKind::DarkOakWood), + "Stripped Oak Wood" => Some(BlockKind::StrippedOakWood), + "Stripped Spruce Wood" => Some(BlockKind::StrippedSpruceWood), + "Stripped Birch Wood" => Some(BlockKind::StrippedBirchWood), + "Stripped Jungle Wood" => Some(BlockKind::StrippedJungleWood), + "Stripped Acacia Wood" => Some(BlockKind::StrippedAcaciaWood), + "Stripped Dark Oak Wood" => Some(BlockKind::StrippedDarkOakWood), + "Oak Leaves" => Some(BlockKind::OakLeaves), + "Spruce Leaves" => Some(BlockKind::SpruceLeaves), + "Birch Leaves" => Some(BlockKind::BirchLeaves), + "Jungle Leaves" => Some(BlockKind::JungleLeaves), + "Acacia Leaves" => Some(BlockKind::AcaciaLeaves), + "Dark Oak Leaves" => Some(BlockKind::DarkOakLeaves), + "Sponge" => Some(BlockKind::Sponge), + "Wet Sponge" => Some(BlockKind::WetSponge), + "Glass" => Some(BlockKind::Glass), + "Lapis Lazuli Ore" => Some(BlockKind::LapisOre), + "Lapis Lazuli Block" => Some(BlockKind::LapisBlock), + "Dispenser" => Some(BlockKind::Dispenser), + "Sandstone" => Some(BlockKind::Sandstone), + "Chiseled Sandstone" => Some(BlockKind::ChiseledSandstone), + "Cut Sandstone" => Some(BlockKind::CutSandstone), + "Note Block" => Some(BlockKind::NoteBlock), + "White Bed" => Some(BlockKind::WhiteBed), + "Orange Bed" => Some(BlockKind::OrangeBed), + "Magenta Bed" => Some(BlockKind::MagentaBed), + "Light Blue Bed" => Some(BlockKind::LightBlueBed), + "Yellow Bed" => Some(BlockKind::YellowBed), + "Lime Bed" => Some(BlockKind::LimeBed), + "Pink Bed" => Some(BlockKind::PinkBed), + "Gray Bed" => Some(BlockKind::GrayBed), + "Light Gray Bed" => Some(BlockKind::LightGrayBed), + "Cyan Bed" => Some(BlockKind::CyanBed), + "Purple Bed" => Some(BlockKind::PurpleBed), + "Blue Bed" => Some(BlockKind::BlueBed), + "Brown Bed" => Some(BlockKind::BrownBed), + "Green Bed" => Some(BlockKind::GreenBed), + "Red Bed" => Some(BlockKind::RedBed), + "Black Bed" => Some(BlockKind::BlackBed), + "Powered Rail" => Some(BlockKind::PoweredRail), + "Detector Rail" => Some(BlockKind::DetectorRail), + "Sticky Piston" => Some(BlockKind::StickyPiston), + "Cobweb" => Some(BlockKind::Cobweb), + "Grass" => Some(BlockKind::Grass), + "Fern" => Some(BlockKind::Fern), + "Dead Bush" => Some(BlockKind::DeadBush), + "Seagrass" => Some(BlockKind::Seagrass), + "Tall Seagrass" => Some(BlockKind::TallSeagrass), + "Piston" => Some(BlockKind::Piston), + "Piston Head" => Some(BlockKind::PistonHead), + "White Wool" => Some(BlockKind::WhiteWool), + "Orange Wool" => Some(BlockKind::OrangeWool), + "Magenta Wool" => Some(BlockKind::MagentaWool), + "Light Blue Wool" => Some(BlockKind::LightBlueWool), + "Yellow Wool" => Some(BlockKind::YellowWool), + "Lime Wool" => Some(BlockKind::LimeWool), + "Pink Wool" => Some(BlockKind::PinkWool), + "Gray Wool" => Some(BlockKind::GrayWool), + "Light Gray Wool" => Some(BlockKind::LightGrayWool), + "Cyan Wool" => Some(BlockKind::CyanWool), + "Purple Wool" => Some(BlockKind::PurpleWool), + "Blue Wool" => Some(BlockKind::BlueWool), + "Brown Wool" => Some(BlockKind::BrownWool), + "Green Wool" => Some(BlockKind::GreenWool), + "Red Wool" => Some(BlockKind::RedWool), + "Black Wool" => Some(BlockKind::BlackWool), + "Moving Piston" => Some(BlockKind::MovingPiston), + "Dandelion" => Some(BlockKind::Dandelion), + "Poppy" => Some(BlockKind::Poppy), + "Blue Orchid" => Some(BlockKind::BlueOrchid), + "Allium" => Some(BlockKind::Allium), + "Azure Bluet" => Some(BlockKind::AzureBluet), + "Red Tulip" => Some(BlockKind::RedTulip), + "Orange Tulip" => Some(BlockKind::OrangeTulip), + "White Tulip" => Some(BlockKind::WhiteTulip), + "Pink Tulip" => Some(BlockKind::PinkTulip), + "Oxeye Daisy" => Some(BlockKind::OxeyeDaisy), + "Cornflower" => Some(BlockKind::Cornflower), + "Wither Rose" => Some(BlockKind::WitherRose), + "Lily of the Valley" => Some(BlockKind::LilyOfTheValley), + "Brown Mushroom" => Some(BlockKind::BrownMushroom), + "Red Mushroom" => Some(BlockKind::RedMushroom), + "Block of Gold" => Some(BlockKind::GoldBlock), + "Block of Iron" => Some(BlockKind::IronBlock), + "Bricks" => Some(BlockKind::Bricks), + "TNT" => Some(BlockKind::Tnt), + "Bookshelf" => Some(BlockKind::Bookshelf), + "Mossy Cobblestone" => Some(BlockKind::MossyCobblestone), + "Obsidian" => Some(BlockKind::Obsidian), + "Torch" => Some(BlockKind::Torch), + "Wall Torch" => Some(BlockKind::WallTorch), + "Fire" => Some(BlockKind::Fire), + "Soul Fire" => Some(BlockKind::SoulFire), + "Spawner" => Some(BlockKind::Spawner), + "Oak Stairs" => Some(BlockKind::OakStairs), + "Chest" => Some(BlockKind::Chest), + "Redstone Wire" => Some(BlockKind::RedstoneWire), + "Diamond Ore" => Some(BlockKind::DiamondOre), + "Block of Diamond" => Some(BlockKind::DiamondBlock), + "Crafting Table" => Some(BlockKind::CraftingTable), + "Wheat Crops" => Some(BlockKind::Wheat), + "Farmland" => Some(BlockKind::Farmland), + "Furnace" => Some(BlockKind::Furnace), + "Oak Sign" => Some(BlockKind::OakSign), + "Spruce Sign" => Some(BlockKind::SpruceSign), + "Birch Sign" => Some(BlockKind::BirchSign), + "Acacia Sign" => Some(BlockKind::AcaciaSign), + "Jungle Sign" => Some(BlockKind::JungleSign), + "Dark Oak Sign" => Some(BlockKind::DarkOakSign), + "Oak Door" => Some(BlockKind::OakDoor), + "Ladder" => Some(BlockKind::Ladder), + "Rail" => Some(BlockKind::Rail), + "Cobblestone Stairs" => Some(BlockKind::CobblestoneStairs), + "Oak Wall Sign" => Some(BlockKind::OakWallSign), + "Spruce Wall Sign" => Some(BlockKind::SpruceWallSign), + "Birch Wall Sign" => Some(BlockKind::BirchWallSign), + "Acacia Wall Sign" => Some(BlockKind::AcaciaWallSign), + "Jungle Wall Sign" => Some(BlockKind::JungleWallSign), + "Dark Oak Wall Sign" => Some(BlockKind::DarkOakWallSign), + "Lever" => Some(BlockKind::Lever), + "Stone Pressure Plate" => Some(BlockKind::StonePressurePlate), + "Iron Door" => Some(BlockKind::IronDoor), + "Oak Pressure Plate" => Some(BlockKind::OakPressurePlate), + "Spruce Pressure Plate" => Some(BlockKind::SprucePressurePlate), + "Birch Pressure Plate" => Some(BlockKind::BirchPressurePlate), + "Jungle Pressure Plate" => Some(BlockKind::JunglePressurePlate), + "Acacia Pressure Plate" => Some(BlockKind::AcaciaPressurePlate), + "Dark Oak Pressure Plate" => Some(BlockKind::DarkOakPressurePlate), + "Redstone Ore" => Some(BlockKind::RedstoneOre), + "Redstone Torch" => Some(BlockKind::RedstoneTorch), + "Redstone Wall Torch" => Some(BlockKind::RedstoneWallTorch), + "Stone Button" => Some(BlockKind::StoneButton), + "Snow" => Some(BlockKind::Snow), + "Ice" => Some(BlockKind::Ice), + "Snow Block" => Some(BlockKind::SnowBlock), + "Cactus" => Some(BlockKind::Cactus), + "Clay" => Some(BlockKind::Clay), + "Sugar Cane" => Some(BlockKind::SugarCane), + "Jukebox" => Some(BlockKind::Jukebox), + "Oak Fence" => Some(BlockKind::OakFence), + "Pumpkin" => Some(BlockKind::Pumpkin), + "Netherrack" => Some(BlockKind::Netherrack), + "Soul Sand" => Some(BlockKind::SoulSand), + "Soul Soil" => Some(BlockKind::SoulSoil), + "Basalt" => Some(BlockKind::Basalt), + "Polished Basalt" => Some(BlockKind::PolishedBasalt), + "Soul Torch" => Some(BlockKind::SoulTorch), + "Soul Wall Torch" => Some(BlockKind::SoulWallTorch), + "Glowstone" => Some(BlockKind::Glowstone), + "Nether Portal" => Some(BlockKind::NetherPortal), + "Carved Pumpkin" => Some(BlockKind::CarvedPumpkin), + "Jack o'Lantern" => Some(BlockKind::JackOLantern), + "Cake" => Some(BlockKind::Cake), + "Redstone Repeater" => Some(BlockKind::Repeater), + "White Stained Glass" => Some(BlockKind::WhiteStainedGlass), + "Orange Stained Glass" => Some(BlockKind::OrangeStainedGlass), + "Magenta Stained Glass" => Some(BlockKind::MagentaStainedGlass), + "Light Blue Stained Glass" => Some(BlockKind::LightBlueStainedGlass), + "Yellow Stained Glass" => Some(BlockKind::YellowStainedGlass), + "Lime Stained Glass" => Some(BlockKind::LimeStainedGlass), + "Pink Stained Glass" => Some(BlockKind::PinkStainedGlass), + "Gray Stained Glass" => Some(BlockKind::GrayStainedGlass), + "Light Gray Stained Glass" => Some(BlockKind::LightGrayStainedGlass), + "Cyan Stained Glass" => Some(BlockKind::CyanStainedGlass), + "Purple Stained Glass" => Some(BlockKind::PurpleStainedGlass), + "Blue Stained Glass" => Some(BlockKind::BlueStainedGlass), + "Brown Stained Glass" => Some(BlockKind::BrownStainedGlass), + "Green Stained Glass" => Some(BlockKind::GreenStainedGlass), + "Red Stained Glass" => Some(BlockKind::RedStainedGlass), + "Black Stained Glass" => Some(BlockKind::BlackStainedGlass), + "Oak Trapdoor" => Some(BlockKind::OakTrapdoor), + "Spruce Trapdoor" => Some(BlockKind::SpruceTrapdoor), + "Birch Trapdoor" => Some(BlockKind::BirchTrapdoor), + "Jungle Trapdoor" => Some(BlockKind::JungleTrapdoor), + "Acacia Trapdoor" => Some(BlockKind::AcaciaTrapdoor), + "Dark Oak Trapdoor" => Some(BlockKind::DarkOakTrapdoor), + "Stone Bricks" => Some(BlockKind::StoneBricks), + "Mossy Stone Bricks" => Some(BlockKind::MossyStoneBricks), + "Cracked Stone Bricks" => Some(BlockKind::CrackedStoneBricks), + "Chiseled Stone Bricks" => Some(BlockKind::ChiseledStoneBricks), + "Infested Stone" => Some(BlockKind::InfestedStone), + "Infested Cobblestone" => Some(BlockKind::InfestedCobblestone), + "Infested Stone Bricks" => Some(BlockKind::InfestedStoneBricks), + "Infested Mossy Stone Bricks" => Some(BlockKind::InfestedMossyStoneBricks), + "Infested Cracked Stone Bricks" => Some(BlockKind::InfestedCrackedStoneBricks), + "Infested Chiseled Stone Bricks" => Some(BlockKind::InfestedChiseledStoneBricks), + "Brown Mushroom Block" => Some(BlockKind::BrownMushroomBlock), + "Red Mushroom Block" => Some(BlockKind::RedMushroomBlock), + "Mushroom Stem" => Some(BlockKind::MushroomStem), + "Iron Bars" => Some(BlockKind::IronBars), + "Chain" => Some(BlockKind::Chain), + "Glass Pane" => Some(BlockKind::GlassPane), + "Melon" => Some(BlockKind::Melon), + "Attached Pumpkin Stem" => Some(BlockKind::AttachedPumpkinStem), + "Attached Melon Stem" => Some(BlockKind::AttachedMelonStem), + "Pumpkin Stem" => Some(BlockKind::PumpkinStem), + "Melon Stem" => Some(BlockKind::MelonStem), + "Vines" => Some(BlockKind::Vine), + "Oak Fence Gate" => Some(BlockKind::OakFenceGate), + "Brick Stairs" => Some(BlockKind::BrickStairs), + "Stone Brick Stairs" => Some(BlockKind::StoneBrickStairs), + "Mycelium" => Some(BlockKind::Mycelium), + "Lily Pad" => Some(BlockKind::LilyPad), + "Nether Bricks" => Some(BlockKind::NetherBricks), + "Nether Brick Fence" => Some(BlockKind::NetherBrickFence), + "Nether Brick Stairs" => Some(BlockKind::NetherBrickStairs), + "Nether Wart" => Some(BlockKind::NetherWart), + "Enchanting Table" => Some(BlockKind::EnchantingTable), + "Brewing Stand" => Some(BlockKind::BrewingStand), + "Cauldron" => Some(BlockKind::Cauldron), + "End Portal" => Some(BlockKind::EndPortal), + "End Portal Frame" => Some(BlockKind::EndPortalFrame), + "End Stone" => Some(BlockKind::EndStone), + "Dragon Egg" => Some(BlockKind::DragonEgg), + "Redstone Lamp" => Some(BlockKind::RedstoneLamp), + "Cocoa" => Some(BlockKind::Cocoa), + "Sandstone Stairs" => Some(BlockKind::SandstoneStairs), + "Emerald Ore" => Some(BlockKind::EmeraldOre), + "Ender Chest" => Some(BlockKind::EnderChest), + "Tripwire Hook" => Some(BlockKind::TripwireHook), + "Tripwire" => Some(BlockKind::Tripwire), + "Block of Emerald" => Some(BlockKind::EmeraldBlock), + "Spruce Stairs" => Some(BlockKind::SpruceStairs), + "Birch Stairs" => Some(BlockKind::BirchStairs), + "Jungle Stairs" => Some(BlockKind::JungleStairs), + "Command Block" => Some(BlockKind::CommandBlock), + "Beacon" => Some(BlockKind::Beacon), + "Cobblestone Wall" => Some(BlockKind::CobblestoneWall), + "Mossy Cobblestone Wall" => Some(BlockKind::MossyCobblestoneWall), + "Flower Pot" => Some(BlockKind::FlowerPot), + "Potted Oak Sapling" => Some(BlockKind::PottedOakSapling), + "Potted Spruce Sapling" => Some(BlockKind::PottedSpruceSapling), + "Potted Birch Sapling" => Some(BlockKind::PottedBirchSapling), + "Potted Jungle Sapling" => Some(BlockKind::PottedJungleSapling), + "Potted Acacia Sapling" => Some(BlockKind::PottedAcaciaSapling), + "Potted Dark Oak Sapling" => Some(BlockKind::PottedDarkOakSapling), + "Potted Fern" => Some(BlockKind::PottedFern), + "Potted Dandelion" => Some(BlockKind::PottedDandelion), + "Potted Poppy" => Some(BlockKind::PottedPoppy), + "Potted Blue Orchid" => Some(BlockKind::PottedBlueOrchid), + "Potted Allium" => Some(BlockKind::PottedAllium), + "Potted Azure Bluet" => Some(BlockKind::PottedAzureBluet), + "Potted Red Tulip" => Some(BlockKind::PottedRedTulip), + "Potted Orange Tulip" => Some(BlockKind::PottedOrangeTulip), + "Potted White Tulip" => Some(BlockKind::PottedWhiteTulip), + "Potted Pink Tulip" => Some(BlockKind::PottedPinkTulip), + "Potted Oxeye Daisy" => Some(BlockKind::PottedOxeyeDaisy), + "Potted Cornflower" => Some(BlockKind::PottedCornflower), + "Potted Lily of the Valley" => Some(BlockKind::PottedLilyOfTheValley), + "Potted Wither Rose" => Some(BlockKind::PottedWitherRose), + "Potted Red Mushroom" => Some(BlockKind::PottedRedMushroom), + "Potted Brown Mushroom" => Some(BlockKind::PottedBrownMushroom), + "Potted Dead Bush" => Some(BlockKind::PottedDeadBush), + "Potted Cactus" => Some(BlockKind::PottedCactus), + "Carrots" => Some(BlockKind::Carrots), + "Potatoes" => Some(BlockKind::Potatoes), + "Oak Button" => Some(BlockKind::OakButton), + "Spruce Button" => Some(BlockKind::SpruceButton), + "Birch Button" => Some(BlockKind::BirchButton), + "Jungle Button" => Some(BlockKind::JungleButton), + "Acacia Button" => Some(BlockKind::AcaciaButton), + "Dark Oak Button" => Some(BlockKind::DarkOakButton), + "Skeleton Skull" => Some(BlockKind::SkeletonSkull), + "Skeleton Wall Skull" => Some(BlockKind::SkeletonWallSkull), + "Wither Skeleton Skull" => Some(BlockKind::WitherSkeletonSkull), + "Wither Skeleton Wall Skull" => Some(BlockKind::WitherSkeletonWallSkull), + "Zombie Head" => Some(BlockKind::ZombieHead), + "Zombie Wall Head" => Some(BlockKind::ZombieWallHead), + "Player Head" => Some(BlockKind::PlayerHead), + "Player Wall Head" => Some(BlockKind::PlayerWallHead), + "Creeper Head" => Some(BlockKind::CreeperHead), + "Creeper Wall Head" => Some(BlockKind::CreeperWallHead), + "Dragon Head" => Some(BlockKind::DragonHead), + "Dragon Wall Head" => Some(BlockKind::DragonWallHead), + "Anvil" => Some(BlockKind::Anvil), + "Chipped Anvil" => Some(BlockKind::ChippedAnvil), + "Damaged Anvil" => Some(BlockKind::DamagedAnvil), + "Trapped Chest" => Some(BlockKind::TrappedChest), + "Light Weighted Pressure Plate" => Some(BlockKind::LightWeightedPressurePlate), + "Heavy Weighted Pressure Plate" => Some(BlockKind::HeavyWeightedPressurePlate), + "Redstone Comparator" => Some(BlockKind::Comparator), + "Daylight Detector" => Some(BlockKind::DaylightDetector), + "Block of Redstone" => Some(BlockKind::RedstoneBlock), + "Nether Quartz Ore" => Some(BlockKind::NetherQuartzOre), + "Hopper" => Some(BlockKind::Hopper), + "Block of Quartz" => Some(BlockKind::QuartzBlock), + "Chiseled Quartz Block" => Some(BlockKind::ChiseledQuartzBlock), + "Quartz Pillar" => Some(BlockKind::QuartzPillar), + "Quartz Stairs" => Some(BlockKind::QuartzStairs), + "Activator Rail" => Some(BlockKind::ActivatorRail), + "Dropper" => Some(BlockKind::Dropper), + "White Terracotta" => Some(BlockKind::WhiteTerracotta), + "Orange Terracotta" => Some(BlockKind::OrangeTerracotta), + "Magenta Terracotta" => Some(BlockKind::MagentaTerracotta), + "Light Blue Terracotta" => Some(BlockKind::LightBlueTerracotta), + "Yellow Terracotta" => Some(BlockKind::YellowTerracotta), + "Lime Terracotta" => Some(BlockKind::LimeTerracotta), + "Pink Terracotta" => Some(BlockKind::PinkTerracotta), + "Gray Terracotta" => Some(BlockKind::GrayTerracotta), + "Light Gray Terracotta" => Some(BlockKind::LightGrayTerracotta), + "Cyan Terracotta" => Some(BlockKind::CyanTerracotta), + "Purple Terracotta" => Some(BlockKind::PurpleTerracotta), + "Blue Terracotta" => Some(BlockKind::BlueTerracotta), + "Brown Terracotta" => Some(BlockKind::BrownTerracotta), + "Green Terracotta" => Some(BlockKind::GreenTerracotta), + "Red Terracotta" => Some(BlockKind::RedTerracotta), + "Black Terracotta" => Some(BlockKind::BlackTerracotta), + "White Stained Glass Pane" => Some(BlockKind::WhiteStainedGlassPane), + "Orange Stained Glass Pane" => Some(BlockKind::OrangeStainedGlassPane), + "Magenta Stained Glass Pane" => Some(BlockKind::MagentaStainedGlassPane), + "Light Blue Stained Glass Pane" => Some(BlockKind::LightBlueStainedGlassPane), + "Yellow Stained Glass Pane" => Some(BlockKind::YellowStainedGlassPane), + "Lime Stained Glass Pane" => Some(BlockKind::LimeStainedGlassPane), + "Pink Stained Glass Pane" => Some(BlockKind::PinkStainedGlassPane), + "Gray Stained Glass Pane" => Some(BlockKind::GrayStainedGlassPane), + "Light Gray Stained Glass Pane" => Some(BlockKind::LightGrayStainedGlassPane), + "Cyan Stained Glass Pane" => Some(BlockKind::CyanStainedGlassPane), + "Purple Stained Glass Pane" => Some(BlockKind::PurpleStainedGlassPane), + "Blue Stained Glass Pane" => Some(BlockKind::BlueStainedGlassPane), + "Brown Stained Glass Pane" => Some(BlockKind::BrownStainedGlassPane), + "Green Stained Glass Pane" => Some(BlockKind::GreenStainedGlassPane), + "Red Stained Glass Pane" => Some(BlockKind::RedStainedGlassPane), + "Black Stained Glass Pane" => Some(BlockKind::BlackStainedGlassPane), + "Acacia Stairs" => Some(BlockKind::AcaciaStairs), + "Dark Oak Stairs" => Some(BlockKind::DarkOakStairs), + "Slime Block" => Some(BlockKind::SlimeBlock), + "Barrier" => Some(BlockKind::Barrier), + "Iron Trapdoor" => Some(BlockKind::IronTrapdoor), + "Prismarine" => Some(BlockKind::Prismarine), + "Prismarine Bricks" => Some(BlockKind::PrismarineBricks), + "Dark Prismarine" => Some(BlockKind::DarkPrismarine), + "Prismarine Stairs" => Some(BlockKind::PrismarineStairs), + "Prismarine Brick Stairs" => Some(BlockKind::PrismarineBrickStairs), + "Dark Prismarine Stairs" => Some(BlockKind::DarkPrismarineStairs), + "Prismarine Slab" => Some(BlockKind::PrismarineSlab), + "Prismarine Brick Slab" => Some(BlockKind::PrismarineBrickSlab), + "Dark Prismarine Slab" => Some(BlockKind::DarkPrismarineSlab), + "Sea Lantern" => Some(BlockKind::SeaLantern), + "Hay Bale" => Some(BlockKind::HayBlock), + "White Carpet" => Some(BlockKind::WhiteCarpet), + "Orange Carpet" => Some(BlockKind::OrangeCarpet), + "Magenta Carpet" => Some(BlockKind::MagentaCarpet), + "Light Blue Carpet" => Some(BlockKind::LightBlueCarpet), + "Yellow Carpet" => Some(BlockKind::YellowCarpet), + "Lime Carpet" => Some(BlockKind::LimeCarpet), + "Pink Carpet" => Some(BlockKind::PinkCarpet), + "Gray Carpet" => Some(BlockKind::GrayCarpet), + "Light Gray Carpet" => Some(BlockKind::LightGrayCarpet), + "Cyan Carpet" => Some(BlockKind::CyanCarpet), + "Purple Carpet" => Some(BlockKind::PurpleCarpet), + "Blue Carpet" => Some(BlockKind::BlueCarpet), + "Brown Carpet" => Some(BlockKind::BrownCarpet), + "Green Carpet" => Some(BlockKind::GreenCarpet), + "Red Carpet" => Some(BlockKind::RedCarpet), + "Black Carpet" => Some(BlockKind::BlackCarpet), + "Terracotta" => Some(BlockKind::Terracotta), + "Block of Coal" => Some(BlockKind::CoalBlock), + "Packed Ice" => Some(BlockKind::PackedIce), + "Sunflower" => Some(BlockKind::Sunflower), + "Lilac" => Some(BlockKind::Lilac), + "Rose Bush" => Some(BlockKind::RoseBush), + "Peony" => Some(BlockKind::Peony), + "Tall Grass" => Some(BlockKind::TallGrass), + "Large Fern" => Some(BlockKind::LargeFern), + "White Banner" => Some(BlockKind::WhiteBanner), + "Orange Banner" => Some(BlockKind::OrangeBanner), + "Magenta Banner" => Some(BlockKind::MagentaBanner), + "Light Blue Banner" => Some(BlockKind::LightBlueBanner), + "Yellow Banner" => Some(BlockKind::YellowBanner), + "Lime Banner" => Some(BlockKind::LimeBanner), + "Pink Banner" => Some(BlockKind::PinkBanner), + "Gray Banner" => Some(BlockKind::GrayBanner), + "Light Gray Banner" => Some(BlockKind::LightGrayBanner), + "Cyan Banner" => Some(BlockKind::CyanBanner), + "Purple Banner" => Some(BlockKind::PurpleBanner), + "Blue Banner" => Some(BlockKind::BlueBanner), + "Brown Banner" => Some(BlockKind::BrownBanner), + "Green Banner" => Some(BlockKind::GreenBanner), + "Red Banner" => Some(BlockKind::RedBanner), + "Black Banner" => Some(BlockKind::BlackBanner), + "White wall banner" => Some(BlockKind::WhiteWallBanner), + "Orange wall banner" => Some(BlockKind::OrangeWallBanner), + "Magenta wall banner" => Some(BlockKind::MagentaWallBanner), + "Light blue wall banner" => Some(BlockKind::LightBlueWallBanner), + "Yellow wall banner" => Some(BlockKind::YellowWallBanner), + "Lime wall banner" => Some(BlockKind::LimeWallBanner), + "Pink wall banner" => Some(BlockKind::PinkWallBanner), + "Gray wall banner" => Some(BlockKind::GrayWallBanner), + "Light gray wall banner" => Some(BlockKind::LightGrayWallBanner), + "Cyan wall banner" => Some(BlockKind::CyanWallBanner), + "Purple wall banner" => Some(BlockKind::PurpleWallBanner), + "Blue wall banner" => Some(BlockKind::BlueWallBanner), + "Brown wall banner" => Some(BlockKind::BrownWallBanner), + "Green wall banner" => Some(BlockKind::GreenWallBanner), + "Red wall banner" => Some(BlockKind::RedWallBanner), + "Black wall banner" => Some(BlockKind::BlackWallBanner), + "Red Sandstone" => Some(BlockKind::RedSandstone), + "Chiseled Red Sandstone" => Some(BlockKind::ChiseledRedSandstone), + "Cut Red Sandstone" => Some(BlockKind::CutRedSandstone), + "Red Sandstone Stairs" => Some(BlockKind::RedSandstoneStairs), + "Oak Slab" => Some(BlockKind::OakSlab), + "Spruce Slab" => Some(BlockKind::SpruceSlab), + "Birch Slab" => Some(BlockKind::BirchSlab), + "Jungle Slab" => Some(BlockKind::JungleSlab), + "Acacia Slab" => Some(BlockKind::AcaciaSlab), + "Dark Oak Slab" => Some(BlockKind::DarkOakSlab), + "Stone Slab" => Some(BlockKind::StoneSlab), + "Smooth Stone Slab" => Some(BlockKind::SmoothStoneSlab), + "Sandstone Slab" => Some(BlockKind::SandstoneSlab), + "Cut Sandstone Slab" => Some(BlockKind::CutSandstoneSlab), + "Petrified Oak Slab" => Some(BlockKind::PetrifiedOakSlab), + "Cobblestone Slab" => Some(BlockKind::CobblestoneSlab), + "Brick Slab" => Some(BlockKind::BrickSlab), + "Stone Brick Slab" => Some(BlockKind::StoneBrickSlab), + "Nether Brick Slab" => Some(BlockKind::NetherBrickSlab), + "Quartz Slab" => Some(BlockKind::QuartzSlab), + "Red Sandstone Slab" => Some(BlockKind::RedSandstoneSlab), + "Cut Red Sandstone Slab" => Some(BlockKind::CutRedSandstoneSlab), + "Purpur Slab" => Some(BlockKind::PurpurSlab), + "Smooth Stone" => Some(BlockKind::SmoothStone), + "Smooth Sandstone" => Some(BlockKind::SmoothSandstone), + "Smooth Quartz Block" => Some(BlockKind::SmoothQuartz), + "Smooth Red Sandstone" => Some(BlockKind::SmoothRedSandstone), + "Spruce Fence Gate" => Some(BlockKind::SpruceFenceGate), + "Birch Fence Gate" => Some(BlockKind::BirchFenceGate), + "Jungle Fence Gate" => Some(BlockKind::JungleFenceGate), + "Acacia Fence Gate" => Some(BlockKind::AcaciaFenceGate), + "Dark Oak Fence Gate" => Some(BlockKind::DarkOakFenceGate), + "Spruce Fence" => Some(BlockKind::SpruceFence), + "Birch Fence" => Some(BlockKind::BirchFence), + "Jungle Fence" => Some(BlockKind::JungleFence), + "Acacia Fence" => Some(BlockKind::AcaciaFence), + "Dark Oak Fence" => Some(BlockKind::DarkOakFence), + "Spruce Door" => Some(BlockKind::SpruceDoor), + "Birch Door" => Some(BlockKind::BirchDoor), + "Jungle Door" => Some(BlockKind::JungleDoor), + "Acacia Door" => Some(BlockKind::AcaciaDoor), + "Dark Oak Door" => Some(BlockKind::DarkOakDoor), + "End Rod" => Some(BlockKind::EndRod), + "Chorus Plant" => Some(BlockKind::ChorusPlant), + "Chorus Flower" => Some(BlockKind::ChorusFlower), + "Purpur Block" => Some(BlockKind::PurpurBlock), + "Purpur Pillar" => Some(BlockKind::PurpurPillar), + "Purpur Stairs" => Some(BlockKind::PurpurStairs), + "End Stone Bricks" => Some(BlockKind::EndStoneBricks), + "Beetroots" => Some(BlockKind::Beetroots), + "Grass Path" => Some(BlockKind::GrassPath), + "End Gateway" => Some(BlockKind::EndGateway), + "Repeating Command Block" => Some(BlockKind::RepeatingCommandBlock), + "Chain Command Block" => Some(BlockKind::ChainCommandBlock), + "Frosted Ice" => Some(BlockKind::FrostedIce), + "Magma Block" => Some(BlockKind::MagmaBlock), + "Nether Wart Block" => Some(BlockKind::NetherWartBlock), + "Red Nether Bricks" => Some(BlockKind::RedNetherBricks), + "Bone Block" => Some(BlockKind::BoneBlock), + "Structure Void" => Some(BlockKind::StructureVoid), + "Observer" => Some(BlockKind::Observer), + "Shulker Box" => Some(BlockKind::ShulkerBox), + "White Shulker Box" => Some(BlockKind::WhiteShulkerBox), + "Orange Shulker Box" => Some(BlockKind::OrangeShulkerBox), + "Magenta Shulker Box" => Some(BlockKind::MagentaShulkerBox), + "Light Blue Shulker Box" => Some(BlockKind::LightBlueShulkerBox), + "Yellow Shulker Box" => Some(BlockKind::YellowShulkerBox), + "Lime Shulker Box" => Some(BlockKind::LimeShulkerBox), + "Pink Shulker Box" => Some(BlockKind::PinkShulkerBox), + "Gray Shulker Box" => Some(BlockKind::GrayShulkerBox), + "Light Gray Shulker Box" => Some(BlockKind::LightGrayShulkerBox), + "Cyan Shulker Box" => Some(BlockKind::CyanShulkerBox), + "Purple Shulker Box" => Some(BlockKind::PurpleShulkerBox), + "Blue Shulker Box" => Some(BlockKind::BlueShulkerBox), + "Brown Shulker Box" => Some(BlockKind::BrownShulkerBox), + "Green Shulker Box" => Some(BlockKind::GreenShulkerBox), + "Red Shulker Box" => Some(BlockKind::RedShulkerBox), + "Black Shulker Box" => Some(BlockKind::BlackShulkerBox), + "White Glazed Terracotta" => Some(BlockKind::WhiteGlazedTerracotta), + "Orange Glazed Terracotta" => Some(BlockKind::OrangeGlazedTerracotta), + "Magenta Glazed Terracotta" => Some(BlockKind::MagentaGlazedTerracotta), + "Light Blue Glazed Terracotta" => Some(BlockKind::LightBlueGlazedTerracotta), + "Yellow Glazed Terracotta" => Some(BlockKind::YellowGlazedTerracotta), + "Lime Glazed Terracotta" => Some(BlockKind::LimeGlazedTerracotta), + "Pink Glazed Terracotta" => Some(BlockKind::PinkGlazedTerracotta), + "Gray Glazed Terracotta" => Some(BlockKind::GrayGlazedTerracotta), + "Light Gray Glazed Terracotta" => Some(BlockKind::LightGrayGlazedTerracotta), + "Cyan Glazed Terracotta" => Some(BlockKind::CyanGlazedTerracotta), + "Purple Glazed Terracotta" => Some(BlockKind::PurpleGlazedTerracotta), + "Blue Glazed Terracotta" => Some(BlockKind::BlueGlazedTerracotta), + "Brown Glazed Terracotta" => Some(BlockKind::BrownGlazedTerracotta), + "Green Glazed Terracotta" => Some(BlockKind::GreenGlazedTerracotta), + "Red Glazed Terracotta" => Some(BlockKind::RedGlazedTerracotta), + "Black Glazed Terracotta" => Some(BlockKind::BlackGlazedTerracotta), + "White Concrete" => Some(BlockKind::WhiteConcrete), + "Orange Concrete" => Some(BlockKind::OrangeConcrete), + "Magenta Concrete" => Some(BlockKind::MagentaConcrete), + "Light Blue Concrete" => Some(BlockKind::LightBlueConcrete), + "Yellow Concrete" => Some(BlockKind::YellowConcrete), + "Lime Concrete" => Some(BlockKind::LimeConcrete), + "Pink Concrete" => Some(BlockKind::PinkConcrete), + "Gray Concrete" => Some(BlockKind::GrayConcrete), + "Light Gray Concrete" => Some(BlockKind::LightGrayConcrete), + "Cyan Concrete" => Some(BlockKind::CyanConcrete), + "Purple Concrete" => Some(BlockKind::PurpleConcrete), + "Blue Concrete" => Some(BlockKind::BlueConcrete), + "Brown Concrete" => Some(BlockKind::BrownConcrete), + "Green Concrete" => Some(BlockKind::GreenConcrete), + "Red Concrete" => Some(BlockKind::RedConcrete), + "Black Concrete" => Some(BlockKind::BlackConcrete), + "White Concrete Powder" => Some(BlockKind::WhiteConcretePowder), + "Orange Concrete Powder" => Some(BlockKind::OrangeConcretePowder), + "Magenta Concrete Powder" => Some(BlockKind::MagentaConcretePowder), + "Light Blue Concrete Powder" => Some(BlockKind::LightBlueConcretePowder), + "Yellow Concrete Powder" => Some(BlockKind::YellowConcretePowder), + "Lime Concrete Powder" => Some(BlockKind::LimeConcretePowder), + "Pink Concrete Powder" => Some(BlockKind::PinkConcretePowder), + "Gray Concrete Powder" => Some(BlockKind::GrayConcretePowder), + "Light Gray Concrete Powder" => Some(BlockKind::LightGrayConcretePowder), + "Cyan Concrete Powder" => Some(BlockKind::CyanConcretePowder), + "Purple Concrete Powder" => Some(BlockKind::PurpleConcretePowder), + "Blue Concrete Powder" => Some(BlockKind::BlueConcretePowder), + "Brown Concrete Powder" => Some(BlockKind::BrownConcretePowder), + "Green Concrete Powder" => Some(BlockKind::GreenConcretePowder), + "Red Concrete Powder" => Some(BlockKind::RedConcretePowder), + "Black Concrete Powder" => Some(BlockKind::BlackConcretePowder), + "Kelp" => Some(BlockKind::Kelp), + "Kelp Plant" => Some(BlockKind::KelpPlant), + "Dried Kelp Block" => Some(BlockKind::DriedKelpBlock), + "Turtle Egg" => Some(BlockKind::TurtleEgg), + "Dead Tube Coral Block" => Some(BlockKind::DeadTubeCoralBlock), + "Dead Brain Coral Block" => Some(BlockKind::DeadBrainCoralBlock), + "Dead Bubble Coral Block" => Some(BlockKind::DeadBubbleCoralBlock), + "Dead Fire Coral Block" => Some(BlockKind::DeadFireCoralBlock), + "Dead Horn Coral Block" => Some(BlockKind::DeadHornCoralBlock), + "Tube Coral Block" => Some(BlockKind::TubeCoralBlock), + "Brain Coral Block" => Some(BlockKind::BrainCoralBlock), + "Bubble Coral Block" => Some(BlockKind::BubbleCoralBlock), + "Fire Coral Block" => Some(BlockKind::FireCoralBlock), + "Horn Coral Block" => Some(BlockKind::HornCoralBlock), + "Dead Tube Coral" => Some(BlockKind::DeadTubeCoral), + "Dead Brain Coral" => Some(BlockKind::DeadBrainCoral), + "Dead Bubble Coral" => Some(BlockKind::DeadBubbleCoral), + "Dead Fire Coral" => Some(BlockKind::DeadFireCoral), + "Dead Horn Coral" => Some(BlockKind::DeadHornCoral), + "Tube Coral" => Some(BlockKind::TubeCoral), + "Brain Coral" => Some(BlockKind::BrainCoral), + "Bubble Coral" => Some(BlockKind::BubbleCoral), + "Fire Coral" => Some(BlockKind::FireCoral), + "Horn Coral" => Some(BlockKind::HornCoral), + "Dead Tube Coral Fan" => Some(BlockKind::DeadTubeCoralFan), + "Dead Brain Coral Fan" => Some(BlockKind::DeadBrainCoralFan), + "Dead Bubble Coral Fan" => Some(BlockKind::DeadBubbleCoralFan), + "Dead Fire Coral Fan" => Some(BlockKind::DeadFireCoralFan), + "Dead Horn Coral Fan" => Some(BlockKind::DeadHornCoralFan), + "Tube Coral Fan" => Some(BlockKind::TubeCoralFan), + "Brain Coral Fan" => Some(BlockKind::BrainCoralFan), + "Bubble Coral Fan" => Some(BlockKind::BubbleCoralFan), + "Fire Coral Fan" => Some(BlockKind::FireCoralFan), + "Horn Coral Fan" => Some(BlockKind::HornCoralFan), + "Dead Tube Coral Wall Fan" => Some(BlockKind::DeadTubeCoralWallFan), + "Dead Brain Coral Wall Fan" => Some(BlockKind::DeadBrainCoralWallFan), + "Dead Bubble Coral Wall Fan" => Some(BlockKind::DeadBubbleCoralWallFan), + "Dead Fire Coral Wall Fan" => Some(BlockKind::DeadFireCoralWallFan), + "Dead Horn Coral Wall Fan" => Some(BlockKind::DeadHornCoralWallFan), + "Tube Coral Wall Fan" => Some(BlockKind::TubeCoralWallFan), + "Brain Coral Wall Fan" => Some(BlockKind::BrainCoralWallFan), + "Bubble Coral Wall Fan" => Some(BlockKind::BubbleCoralWallFan), + "Fire Coral Wall Fan" => Some(BlockKind::FireCoralWallFan), + "Horn Coral Wall Fan" => Some(BlockKind::HornCoralWallFan), + "Sea Pickle" => Some(BlockKind::SeaPickle), + "Blue Ice" => Some(BlockKind::BlueIce), + "Conduit" => Some(BlockKind::Conduit), + "Bamboo Shoot" => Some(BlockKind::BambooSapling), + "Bamboo" => Some(BlockKind::Bamboo), + "Potted Bamboo" => Some(BlockKind::PottedBamboo), + "Void Air" => Some(BlockKind::VoidAir), + "Cave Air" => Some(BlockKind::CaveAir), + "Bubble Column" => Some(BlockKind::BubbleColumn), + "Polished Granite Stairs" => Some(BlockKind::PolishedGraniteStairs), + "Smooth Red Sandstone Stairs" => Some(BlockKind::SmoothRedSandstoneStairs), + "Mossy Stone Brick Stairs" => Some(BlockKind::MossyStoneBrickStairs), + "Polished Diorite Stairs" => Some(BlockKind::PolishedDioriteStairs), + "Mossy Cobblestone Stairs" => Some(BlockKind::MossyCobblestoneStairs), + "End Stone Brick Stairs" => Some(BlockKind::EndStoneBrickStairs), + "Stone Stairs" => Some(BlockKind::StoneStairs), + "Smooth Sandstone Stairs" => Some(BlockKind::SmoothSandstoneStairs), + "Smooth Quartz Stairs" => Some(BlockKind::SmoothQuartzStairs), + "Granite Stairs" => Some(BlockKind::GraniteStairs), + "Andesite Stairs" => Some(BlockKind::AndesiteStairs), + "Red Nether Brick Stairs" => Some(BlockKind::RedNetherBrickStairs), + "Polished Andesite Stairs" => Some(BlockKind::PolishedAndesiteStairs), + "Diorite Stairs" => Some(BlockKind::DioriteStairs), + "Polished Granite Slab" => Some(BlockKind::PolishedGraniteSlab), + "Smooth Red Sandstone Slab" => Some(BlockKind::SmoothRedSandstoneSlab), + "Mossy Stone Brick Slab" => Some(BlockKind::MossyStoneBrickSlab), + "Polished Diorite Slab" => Some(BlockKind::PolishedDioriteSlab), + "Mossy Cobblestone Slab" => Some(BlockKind::MossyCobblestoneSlab), + "End Stone Brick Slab" => Some(BlockKind::EndStoneBrickSlab), + "Smooth Sandstone Slab" => Some(BlockKind::SmoothSandstoneSlab), + "Smooth Quartz Slab" => Some(BlockKind::SmoothQuartzSlab), + "Granite Slab" => Some(BlockKind::GraniteSlab), + "Andesite Slab" => Some(BlockKind::AndesiteSlab), + "Red Nether Brick Slab" => Some(BlockKind::RedNetherBrickSlab), + "Polished Andesite Slab" => Some(BlockKind::PolishedAndesiteSlab), + "Diorite Slab" => Some(BlockKind::DioriteSlab), + "Brick Wall" => Some(BlockKind::BrickWall), + "Prismarine Wall" => Some(BlockKind::PrismarineWall), + "Red Sandstone Wall" => Some(BlockKind::RedSandstoneWall), + "Mossy Stone Brick Wall" => Some(BlockKind::MossyStoneBrickWall), + "Granite Wall" => Some(BlockKind::GraniteWall), + "Stone Brick Wall" => Some(BlockKind::StoneBrickWall), + "Nether Brick Wall" => Some(BlockKind::NetherBrickWall), + "Andesite Wall" => Some(BlockKind::AndesiteWall), + "Red Nether Brick Wall" => Some(BlockKind::RedNetherBrickWall), + "Sandstone Wall" => Some(BlockKind::SandstoneWall), + "End Stone Brick Wall" => Some(BlockKind::EndStoneBrickWall), + "Diorite Wall" => Some(BlockKind::DioriteWall), + "Scaffolding" => Some(BlockKind::Scaffolding), + "Loom" => Some(BlockKind::Loom), + "Barrel" => Some(BlockKind::Barrel), + "Smoker" => Some(BlockKind::Smoker), + "Blast Furnace" => Some(BlockKind::BlastFurnace), + "Cartography Table" => Some(BlockKind::CartographyTable), + "Fletching Table" => Some(BlockKind::FletchingTable), + "Grindstone" => Some(BlockKind::Grindstone), + "Lectern" => Some(BlockKind::Lectern), + "Smithing Table" => Some(BlockKind::SmithingTable), + "Stonecutter" => Some(BlockKind::Stonecutter), + "Bell" => Some(BlockKind::Bell), + "Lantern" => Some(BlockKind::Lantern), + "Soul Lantern" => Some(BlockKind::SoulLantern), + "Campfire" => Some(BlockKind::Campfire), + "Soul Campfire" => Some(BlockKind::SoulCampfire), + "Sweet Berry Bush" => Some(BlockKind::SweetBerryBush), + "Warped Stem" => Some(BlockKind::WarpedStem), + "Stripped Warped Stem" => Some(BlockKind::StrippedWarpedStem), + "Warped Hyphae" => Some(BlockKind::WarpedHyphae), + "Stripped Warped Hyphae" => Some(BlockKind::StrippedWarpedHyphae), + "Warped Nylium" => Some(BlockKind::WarpedNylium), + "Warped Fungus" => Some(BlockKind::WarpedFungus), + "Warped Wart Block" => Some(BlockKind::WarpedWartBlock), + "Warped Roots" => Some(BlockKind::WarpedRoots), + "Nether Sprouts" => Some(BlockKind::NetherSprouts), + "Crimson Stem" => Some(BlockKind::CrimsonStem), + "Stripped Crimson Stem" => Some(BlockKind::StrippedCrimsonStem), + "Crimson Hyphae" => Some(BlockKind::CrimsonHyphae), + "Stripped Crimson Hyphae" => Some(BlockKind::StrippedCrimsonHyphae), + "Crimson Nylium" => Some(BlockKind::CrimsonNylium), + "Crimson Fungus" => Some(BlockKind::CrimsonFungus), + "Shroomlight" => Some(BlockKind::Shroomlight), + "Weeping Vines" => Some(BlockKind::WeepingVines), + "Weeping Vines Plant" => Some(BlockKind::WeepingVinesPlant), + "Twisting Vines" => Some(BlockKind::TwistingVines), + "Twisting Vines Plant" => Some(BlockKind::TwistingVinesPlant), + "Crimson Roots" => Some(BlockKind::CrimsonRoots), + "Crimson Planks" => Some(BlockKind::CrimsonPlanks), + "Warped Planks" => Some(BlockKind::WarpedPlanks), + "Crimson Slab" => Some(BlockKind::CrimsonSlab), + "Warped Slab" => Some(BlockKind::WarpedSlab), + "Crimson Pressure Plate" => Some(BlockKind::CrimsonPressurePlate), + "Warped Pressure Plate" => Some(BlockKind::WarpedPressurePlate), + "Crimson Fence" => Some(BlockKind::CrimsonFence), + "Warped Fence" => Some(BlockKind::WarpedFence), + "Crimson Trapdoor" => Some(BlockKind::CrimsonTrapdoor), + "Warped Trapdoor" => Some(BlockKind::WarpedTrapdoor), + "Crimson Fence Gate" => Some(BlockKind::CrimsonFenceGate), + "Warped Fence Gate" => Some(BlockKind::WarpedFenceGate), + "Crimson Stairs" => Some(BlockKind::CrimsonStairs), + "Warped Stairs" => Some(BlockKind::WarpedStairs), + "Crimson Button" => Some(BlockKind::CrimsonButton), + "Warped Button" => Some(BlockKind::WarpedButton), + "Crimson Door" => Some(BlockKind::CrimsonDoor), + "Warped Door" => Some(BlockKind::WarpedDoor), + "Crimson Sign" => Some(BlockKind::CrimsonSign), + "Warped Sign" => Some(BlockKind::WarpedSign), + "Crimson Wall Sign" => Some(BlockKind::CrimsonWallSign), + "Warped Wall Sign" => Some(BlockKind::WarpedWallSign), + "Structure Block" => Some(BlockKind::StructureBlock), + "Jigsaw Block" => Some(BlockKind::Jigsaw), + "Composter" => Some(BlockKind::Composter), + "Target" => Some(BlockKind::Target), + "Bee Nest" => Some(BlockKind::BeeNest), + "Beehive" => Some(BlockKind::Beehive), + "Honey Block" => Some(BlockKind::HoneyBlock), + "Honeycomb Block" => Some(BlockKind::HoneycombBlock), + "Block of Netherite" => Some(BlockKind::NetheriteBlock), + "Ancient Debris" => Some(BlockKind::AncientDebris), + "Crying Obsidian" => Some(BlockKind::CryingObsidian), + "Respawn Anchor" => Some(BlockKind::RespawnAnchor), + "Potted Crimson Fungus" => Some(BlockKind::PottedCrimsonFungus), + "Potted Warped Fungus" => Some(BlockKind::PottedWarpedFungus), + "Potted Crimson Roots" => Some(BlockKind::PottedCrimsonRoots), + "Potted Warped Roots" => Some(BlockKind::PottedWarpedRoots), + "Lodestone" => Some(BlockKind::Lodestone), + "Blackstone" => Some(BlockKind::Blackstone), + "Blackstone Stairs" => Some(BlockKind::BlackstoneStairs), + "Blackstone Wall" => Some(BlockKind::BlackstoneWall), + "Blackstone Slab" => Some(BlockKind::BlackstoneSlab), + "Polished Blackstone" => Some(BlockKind::PolishedBlackstone), + "Polished Blackstone Bricks" => Some(BlockKind::PolishedBlackstoneBricks), + "Cracked Polished Blackstone Bricks" => { + Some(BlockKind::CrackedPolishedBlackstoneBricks) + } + "Chiseled Polished Blackstone" => Some(BlockKind::ChiseledPolishedBlackstone), + "Polished Blackstone Brick Slab" => Some(BlockKind::PolishedBlackstoneBrickSlab), + "Polished Blackstone Brick Stairs" => Some(BlockKind::PolishedBlackstoneBrickStairs), + "Polished Blackstone Brick Wall" => Some(BlockKind::PolishedBlackstoneBrickWall), + "Gilded Blackstone" => Some(BlockKind::GildedBlackstone), + "Polished Blackstone Stairs" => Some(BlockKind::PolishedBlackstoneStairs), + "Polished Blackstone Slab" => Some(BlockKind::PolishedBlackstoneSlab), + "Polished Blackstone Pressure Plate" => { + Some(BlockKind::PolishedBlackstonePressurePlate) + } + "Polished Blackstone Button" => Some(BlockKind::PolishedBlackstoneButton), + "Polished Blackstone Wall" => Some(BlockKind::PolishedBlackstoneWall), + "Chiseled Nether Bricks" => Some(BlockKind::ChiseledNetherBricks), + "Cracked Nether Bricks" => Some(BlockKind::CrackedNetherBricks), + "Quartz Bricks" => Some(BlockKind::QuartzBricks), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `hardness` property of this `BlockKind`. + pub fn hardness(&self) -> f32 { + match self { + BlockKind::Air => 0 as f32, + BlockKind::Stone => 1.5 as f32, + BlockKind::Granite => 1.5 as f32, + BlockKind::PolishedGranite => 1.5 as f32, + BlockKind::Diorite => 1.5 as f32, + BlockKind::PolishedDiorite => 1.5 as f32, + BlockKind::Andesite => 1.5 as f32, + BlockKind::PolishedAndesite => 1.5 as f32, + BlockKind::GrassBlock => 0.6 as f32, + BlockKind::Dirt => 0.5 as f32, + BlockKind::CoarseDirt => 0.5 as f32, + BlockKind::Podzol => 0.5 as f32, + BlockKind::Cobblestone => 2 as f32, + BlockKind::OakPlanks => 2 as f32, + BlockKind::SprucePlanks => 2 as f32, + BlockKind::BirchPlanks => 2 as f32, + BlockKind::JunglePlanks => 2 as f32, + BlockKind::AcaciaPlanks => 2 as f32, + BlockKind::DarkOakPlanks => 2 as f32, + BlockKind::OakSapling => 0 as f32, + BlockKind::SpruceSapling => 0 as f32, + BlockKind::BirchSapling => 0 as f32, + BlockKind::JungleSapling => 0 as f32, + BlockKind::AcaciaSapling => 0 as f32, + BlockKind::DarkOakSapling => 0 as f32, + BlockKind::Bedrock => 0 as f32, + BlockKind::Water => 100 as f32, + BlockKind::Lava => 100 as f32, + BlockKind::Sand => 0.5 as f32, + BlockKind::RedSand => 0.5 as f32, + BlockKind::Gravel => 0.6 as f32, + BlockKind::GoldOre => 3 as f32, + BlockKind::IronOre => 3 as f32, + BlockKind::CoalOre => 3 as f32, + BlockKind::NetherGoldOre => 3 as f32, + BlockKind::OakLog => 2 as f32, + BlockKind::SpruceLog => 2 as f32, + BlockKind::BirchLog => 2 as f32, + BlockKind::JungleLog => 2 as f32, + BlockKind::AcaciaLog => 2 as f32, + BlockKind::DarkOakLog => 2 as f32, + BlockKind::StrippedSpruceLog => 2 as f32, + BlockKind::StrippedBirchLog => 2 as f32, + BlockKind::StrippedJungleLog => 2 as f32, + BlockKind::StrippedAcaciaLog => 2 as f32, + BlockKind::StrippedDarkOakLog => 2 as f32, + BlockKind::StrippedOakLog => 2 as f32, + BlockKind::OakWood => 2 as f32, + BlockKind::SpruceWood => 2 as f32, + BlockKind::BirchWood => 2 as f32, + BlockKind::JungleWood => 2 as f32, + BlockKind::AcaciaWood => 2 as f32, + BlockKind::DarkOakWood => 2 as f32, + BlockKind::StrippedOakWood => 2 as f32, + BlockKind::StrippedSpruceWood => 2 as f32, + BlockKind::StrippedBirchWood => 2 as f32, + BlockKind::StrippedJungleWood => 2 as f32, + BlockKind::StrippedAcaciaWood => 2 as f32, + BlockKind::StrippedDarkOakWood => 2 as f32, + BlockKind::OakLeaves => 0.2 as f32, + BlockKind::SpruceLeaves => 0.2 as f32, + BlockKind::BirchLeaves => 0.2 as f32, + BlockKind::JungleLeaves => 0.2 as f32, + BlockKind::AcaciaLeaves => 0.2 as f32, + BlockKind::DarkOakLeaves => 0.2 as f32, + BlockKind::Sponge => 0.6 as f32, + BlockKind::WetSponge => 0.6 as f32, + BlockKind::Glass => 0.3 as f32, + BlockKind::LapisOre => 3 as f32, + BlockKind::LapisBlock => 3 as f32, + BlockKind::Dispenser => 3.5 as f32, + BlockKind::Sandstone => 0.8 as f32, + BlockKind::ChiseledSandstone => 0.8 as f32, + BlockKind::CutSandstone => 0.8 as f32, + BlockKind::NoteBlock => 0.8 as f32, + BlockKind::WhiteBed => 0.2 as f32, + BlockKind::OrangeBed => 0.2 as f32, + BlockKind::MagentaBed => 0.2 as f32, + BlockKind::LightBlueBed => 0.2 as f32, + BlockKind::YellowBed => 0.2 as f32, + BlockKind::LimeBed => 0.2 as f32, + BlockKind::PinkBed => 0.2 as f32, + BlockKind::GrayBed => 0.2 as f32, + BlockKind::LightGrayBed => 0.2 as f32, + BlockKind::CyanBed => 0.2 as f32, + BlockKind::PurpleBed => 0.2 as f32, + BlockKind::BlueBed => 0.2 as f32, + BlockKind::BrownBed => 0.2 as f32, + BlockKind::GreenBed => 0.2 as f32, + BlockKind::RedBed => 0.2 as f32, + BlockKind::BlackBed => 0.2 as f32, + BlockKind::PoweredRail => 0.7 as f32, + BlockKind::DetectorRail => 0.7 as f32, + BlockKind::StickyPiston => 1.5 as f32, + BlockKind::Cobweb => 4 as f32, + BlockKind::Grass => 0 as f32, + BlockKind::Fern => 0 as f32, + BlockKind::DeadBush => 0 as f32, + BlockKind::Seagrass => 0 as f32, + BlockKind::TallSeagrass => 0 as f32, + BlockKind::Piston => 1.5 as f32, + BlockKind::PistonHead => 1.5 as f32, + BlockKind::WhiteWool => 0.8 as f32, + BlockKind::OrangeWool => 0.8 as f32, + BlockKind::MagentaWool => 0.8 as f32, + BlockKind::LightBlueWool => 0.8 as f32, + BlockKind::YellowWool => 0.8 as f32, + BlockKind::LimeWool => 0.8 as f32, + BlockKind::PinkWool => 0.8 as f32, + BlockKind::GrayWool => 0.8 as f32, + BlockKind::LightGrayWool => 0.8 as f32, + BlockKind::CyanWool => 0.8 as f32, + BlockKind::PurpleWool => 0.8 as f32, + BlockKind::BlueWool => 0.8 as f32, + BlockKind::BrownWool => 0.8 as f32, + BlockKind::GreenWool => 0.8 as f32, + BlockKind::RedWool => 0.8 as f32, + BlockKind::BlackWool => 0.8 as f32, + BlockKind::MovingPiston => 0 as f32, + BlockKind::Dandelion => 0 as f32, + BlockKind::Poppy => 0 as f32, + BlockKind::BlueOrchid => 0 as f32, + BlockKind::Allium => 0 as f32, + BlockKind::AzureBluet => 0 as f32, + BlockKind::RedTulip => 0 as f32, + BlockKind::OrangeTulip => 0 as f32, + BlockKind::WhiteTulip => 0 as f32, + BlockKind::PinkTulip => 0 as f32, + BlockKind::OxeyeDaisy => 0 as f32, + BlockKind::Cornflower => 0 as f32, + BlockKind::WitherRose => 0 as f32, + BlockKind::LilyOfTheValley => 0 as f32, + BlockKind::BrownMushroom => 0 as f32, + BlockKind::RedMushroom => 0 as f32, + BlockKind::GoldBlock => 3 as f32, + BlockKind::IronBlock => 5 as f32, + BlockKind::Bricks => 2 as f32, + BlockKind::Tnt => 0 as f32, + BlockKind::Bookshelf => 1.5 as f32, + BlockKind::MossyCobblestone => 2 as f32, + BlockKind::Obsidian => 50 as f32, + BlockKind::Torch => 0 as f32, + BlockKind::WallTorch => 0 as f32, + BlockKind::Fire => 0 as f32, + BlockKind::SoulFire => 0 as f32, + BlockKind::Spawner => 5 as f32, + BlockKind::OakStairs => 0 as f32, + BlockKind::Chest => 2.5 as f32, + BlockKind::RedstoneWire => 0 as f32, + BlockKind::DiamondOre => 3 as f32, + BlockKind::DiamondBlock => 5 as f32, + BlockKind::CraftingTable => 2.5 as f32, + BlockKind::Wheat => 0 as f32, + BlockKind::Farmland => 0.6 as f32, + BlockKind::Furnace => 3.5 as f32, + BlockKind::OakSign => 1 as f32, + BlockKind::SpruceSign => 1 as f32, + BlockKind::BirchSign => 1 as f32, + BlockKind::AcaciaSign => 1 as f32, + BlockKind::JungleSign => 1 as f32, + BlockKind::DarkOakSign => 1 as f32, + BlockKind::OakDoor => 3 as f32, + BlockKind::Ladder => 0.4 as f32, + BlockKind::Rail => 0.7 as f32, + BlockKind::CobblestoneStairs => 0 as f32, + BlockKind::OakWallSign => 1 as f32, + BlockKind::SpruceWallSign => 1 as f32, + BlockKind::BirchWallSign => 1 as f32, + BlockKind::AcaciaWallSign => 1 as f32, + BlockKind::JungleWallSign => 1 as f32, + BlockKind::DarkOakWallSign => 1 as f32, + BlockKind::Lever => 0.5 as f32, + BlockKind::StonePressurePlate => 0.5 as f32, + BlockKind::IronDoor => 5 as f32, + BlockKind::OakPressurePlate => 0.5 as f32, + BlockKind::SprucePressurePlate => 0.5 as f32, + BlockKind::BirchPressurePlate => 0.5 as f32, + BlockKind::JunglePressurePlate => 0.5 as f32, + BlockKind::AcaciaPressurePlate => 0.5 as f32, + BlockKind::DarkOakPressurePlate => 0.5 as f32, + BlockKind::RedstoneOre => 3 as f32, + BlockKind::RedstoneTorch => 0 as f32, + BlockKind::RedstoneWallTorch => 0 as f32, + BlockKind::StoneButton => 0.5 as f32, + BlockKind::Snow => 0.1 as f32, + BlockKind::Ice => 0.5 as f32, + BlockKind::SnowBlock => 0.2 as f32, + BlockKind::Cactus => 0.4 as f32, + BlockKind::Clay => 0.6 as f32, + BlockKind::SugarCane => 0 as f32, + BlockKind::Jukebox => 2 as f32, + BlockKind::OakFence => 2 as f32, + BlockKind::Pumpkin => 1 as f32, + BlockKind::Netherrack => 0.4 as f32, + BlockKind::SoulSand => 0.5 as f32, + BlockKind::SoulSoil => 0.5 as f32, + BlockKind::Basalt => 1.25 as f32, + BlockKind::PolishedBasalt => 1.25 as f32, + BlockKind::SoulTorch => 0 as f32, + BlockKind::SoulWallTorch => 0 as f32, + BlockKind::Glowstone => 0.3 as f32, + BlockKind::NetherPortal => 0 as f32, + BlockKind::CarvedPumpkin => 1 as f32, + BlockKind::JackOLantern => 1 as f32, + BlockKind::Cake => 0.5 as f32, + BlockKind::Repeater => 0 as f32, + BlockKind::WhiteStainedGlass => 0.3 as f32, + BlockKind::OrangeStainedGlass => 0.3 as f32, + BlockKind::MagentaStainedGlass => 0.3 as f32, + BlockKind::LightBlueStainedGlass => 0.3 as f32, + BlockKind::YellowStainedGlass => 0.3 as f32, + BlockKind::LimeStainedGlass => 0.3 as f32, + BlockKind::PinkStainedGlass => 0.3 as f32, + BlockKind::GrayStainedGlass => 0.3 as f32, + BlockKind::LightGrayStainedGlass => 0.3 as f32, + BlockKind::CyanStainedGlass => 0.3 as f32, + BlockKind::PurpleStainedGlass => 0.3 as f32, + BlockKind::BlueStainedGlass => 0.3 as f32, + BlockKind::BrownStainedGlass => 0.3 as f32, + BlockKind::GreenStainedGlass => 0.3 as f32, + BlockKind::RedStainedGlass => 0.3 as f32, + BlockKind::BlackStainedGlass => 0.3 as f32, + BlockKind::OakTrapdoor => 3 as f32, + BlockKind::SpruceTrapdoor => 3 as f32, + BlockKind::BirchTrapdoor => 3 as f32, + BlockKind::JungleTrapdoor => 3 as f32, + BlockKind::AcaciaTrapdoor => 3 as f32, + BlockKind::DarkOakTrapdoor => 3 as f32, + BlockKind::StoneBricks => 1.5 as f32, + BlockKind::MossyStoneBricks => 1.5 as f32, + BlockKind::CrackedStoneBricks => 1.5 as f32, + BlockKind::ChiseledStoneBricks => 1.5 as f32, + BlockKind::InfestedStone => 0 as f32, + BlockKind::InfestedCobblestone => 0 as f32, + BlockKind::InfestedStoneBricks => 0 as f32, + BlockKind::InfestedMossyStoneBricks => 0 as f32, + BlockKind::InfestedCrackedStoneBricks => 0 as f32, + BlockKind::InfestedChiseledStoneBricks => 0 as f32, + BlockKind::BrownMushroomBlock => 0.2 as f32, + BlockKind::RedMushroomBlock => 0.2 as f32, + BlockKind::MushroomStem => 0.2 as f32, + BlockKind::IronBars => 5 as f32, + BlockKind::Chain => 5 as f32, + BlockKind::GlassPane => 0.3 as f32, + BlockKind::Melon => 1 as f32, + BlockKind::AttachedPumpkinStem => 0 as f32, + BlockKind::AttachedMelonStem => 0 as f32, + BlockKind::PumpkinStem => 0 as f32, + BlockKind::MelonStem => 0 as f32, + BlockKind::Vine => 0.2 as f32, + BlockKind::OakFenceGate => 2 as f32, + BlockKind::BrickStairs => 0 as f32, + BlockKind::StoneBrickStairs => 0 as f32, + BlockKind::Mycelium => 0.6 as f32, + BlockKind::LilyPad => 0 as f32, + BlockKind::NetherBricks => 2 as f32, + BlockKind::NetherBrickFence => 2 as f32, + BlockKind::NetherBrickStairs => 0 as f32, + BlockKind::NetherWart => 0 as f32, + BlockKind::EnchantingTable => 5 as f32, + BlockKind::BrewingStand => 0.5 as f32, + BlockKind::Cauldron => 2 as f32, + BlockKind::EndPortal => 0 as f32, + BlockKind::EndPortalFrame => 0 as f32, + BlockKind::EndStone => 3 as f32, + BlockKind::DragonEgg => 3 as f32, + BlockKind::RedstoneLamp => 0.3 as f32, + BlockKind::Cocoa => 0.2 as f32, + BlockKind::SandstoneStairs => 0 as f32, + BlockKind::EmeraldOre => 3 as f32, + BlockKind::EnderChest => 22.5 as f32, + BlockKind::TripwireHook => 0 as f32, + BlockKind::Tripwire => 0 as f32, + BlockKind::EmeraldBlock => 5 as f32, + BlockKind::SpruceStairs => 0 as f32, + BlockKind::BirchStairs => 0 as f32, + BlockKind::JungleStairs => 0 as f32, + BlockKind::CommandBlock => 0 as f32, + BlockKind::Beacon => 3 as f32, + BlockKind::CobblestoneWall => 0 as f32, + BlockKind::MossyCobblestoneWall => 0 as f32, + BlockKind::FlowerPot => 0 as f32, + BlockKind::PottedOakSapling => 0 as f32, + BlockKind::PottedSpruceSapling => 0 as f32, + BlockKind::PottedBirchSapling => 0 as f32, + BlockKind::PottedJungleSapling => 0 as f32, + BlockKind::PottedAcaciaSapling => 0 as f32, + BlockKind::PottedDarkOakSapling => 0 as f32, + BlockKind::PottedFern => 0 as f32, + BlockKind::PottedDandelion => 0 as f32, + BlockKind::PottedPoppy => 0 as f32, + BlockKind::PottedBlueOrchid => 0 as f32, + BlockKind::PottedAllium => 0 as f32, + BlockKind::PottedAzureBluet => 0 as f32, + BlockKind::PottedRedTulip => 0 as f32, + BlockKind::PottedOrangeTulip => 0 as f32, + BlockKind::PottedWhiteTulip => 0 as f32, + BlockKind::PottedPinkTulip => 0 as f32, + BlockKind::PottedOxeyeDaisy => 0 as f32, + BlockKind::PottedCornflower => 0 as f32, + BlockKind::PottedLilyOfTheValley => 0 as f32, + BlockKind::PottedWitherRose => 0 as f32, + BlockKind::PottedRedMushroom => 0 as f32, + BlockKind::PottedBrownMushroom => 0 as f32, + BlockKind::PottedDeadBush => 0 as f32, + BlockKind::PottedCactus => 0 as f32, + BlockKind::Carrots => 0 as f32, + BlockKind::Potatoes => 0 as f32, + BlockKind::OakButton => 0.5 as f32, + BlockKind::SpruceButton => 0.5 as f32, + BlockKind::BirchButton => 0.5 as f32, + BlockKind::JungleButton => 0.5 as f32, + BlockKind::AcaciaButton => 0.5 as f32, + BlockKind::DarkOakButton => 0.5 as f32, + BlockKind::SkeletonSkull => 1 as f32, + BlockKind::SkeletonWallSkull => 1 as f32, + BlockKind::WitherSkeletonSkull => 1 as f32, + BlockKind::WitherSkeletonWallSkull => 1 as f32, + BlockKind::ZombieHead => 1 as f32, + BlockKind::ZombieWallHead => 1 as f32, + BlockKind::PlayerHead => 1 as f32, + BlockKind::PlayerWallHead => 1 as f32, + BlockKind::CreeperHead => 1 as f32, + BlockKind::CreeperWallHead => 1 as f32, + BlockKind::DragonHead => 1 as f32, + BlockKind::DragonWallHead => 1 as f32, + BlockKind::Anvil => 5 as f32, + BlockKind::ChippedAnvil => 5 as f32, + BlockKind::DamagedAnvil => 5 as f32, + BlockKind::TrappedChest => 2.5 as f32, + BlockKind::LightWeightedPressurePlate => 0.5 as f32, + BlockKind::HeavyWeightedPressurePlate => 0.5 as f32, + BlockKind::Comparator => 0 as f32, + BlockKind::DaylightDetector => 0.2 as f32, + BlockKind::RedstoneBlock => 5 as f32, + BlockKind::NetherQuartzOre => 3 as f32, + BlockKind::Hopper => 3 as f32, + BlockKind::QuartzBlock => 0.8 as f32, + BlockKind::ChiseledQuartzBlock => 0.8 as f32, + BlockKind::QuartzPillar => 0.8 as f32, + BlockKind::QuartzStairs => 0 as f32, + BlockKind::ActivatorRail => 0.7 as f32, + BlockKind::Dropper => 3.5 as f32, + BlockKind::WhiteTerracotta => 1.25 as f32, + BlockKind::OrangeTerracotta => 1.25 as f32, + BlockKind::MagentaTerracotta => 1.25 as f32, + BlockKind::LightBlueTerracotta => 1.25 as f32, + BlockKind::YellowTerracotta => 1.25 as f32, + BlockKind::LimeTerracotta => 1.25 as f32, + BlockKind::PinkTerracotta => 1.25 as f32, + BlockKind::GrayTerracotta => 1.25 as f32, + BlockKind::LightGrayTerracotta => 1.25 as f32, + BlockKind::CyanTerracotta => 1.25 as f32, + BlockKind::PurpleTerracotta => 1.25 as f32, + BlockKind::BlueTerracotta => 1.25 as f32, + BlockKind::BrownTerracotta => 1.25 as f32, + BlockKind::GreenTerracotta => 1.25 as f32, + BlockKind::RedTerracotta => 1.25 as f32, + BlockKind::BlackTerracotta => 1.25 as f32, + BlockKind::WhiteStainedGlassPane => 0.3 as f32, + BlockKind::OrangeStainedGlassPane => 0.3 as f32, + BlockKind::MagentaStainedGlassPane => 0.3 as f32, + BlockKind::LightBlueStainedGlassPane => 0.3 as f32, + BlockKind::YellowStainedGlassPane => 0.3 as f32, + BlockKind::LimeStainedGlassPane => 0.3 as f32, + BlockKind::PinkStainedGlassPane => 0.3 as f32, + BlockKind::GrayStainedGlassPane => 0.3 as f32, + BlockKind::LightGrayStainedGlassPane => 0.3 as f32, + BlockKind::CyanStainedGlassPane => 0.3 as f32, + BlockKind::PurpleStainedGlassPane => 0.3 as f32, + BlockKind::BlueStainedGlassPane => 0.3 as f32, + BlockKind::BrownStainedGlassPane => 0.3 as f32, + BlockKind::GreenStainedGlassPane => 0.3 as f32, + BlockKind::RedStainedGlassPane => 0.3 as f32, + BlockKind::BlackStainedGlassPane => 0.3 as f32, + BlockKind::AcaciaStairs => 0 as f32, + BlockKind::DarkOakStairs => 0 as f32, + BlockKind::SlimeBlock => 0 as f32, + BlockKind::Barrier => 0 as f32, + BlockKind::IronTrapdoor => 5 as f32, + BlockKind::Prismarine => 1.5 as f32, + BlockKind::PrismarineBricks => 1.5 as f32, + BlockKind::DarkPrismarine => 1.5 as f32, + BlockKind::PrismarineStairs => 0 as f32, + BlockKind::PrismarineBrickStairs => 0 as f32, + BlockKind::DarkPrismarineStairs => 0 as f32, + BlockKind::PrismarineSlab => 1.5 as f32, + BlockKind::PrismarineBrickSlab => 1.5 as f32, + BlockKind::DarkPrismarineSlab => 1.5 as f32, + BlockKind::SeaLantern => 0.3 as f32, + BlockKind::HayBlock => 0.5 as f32, + BlockKind::WhiteCarpet => 0.1 as f32, + BlockKind::OrangeCarpet => 0.1 as f32, + BlockKind::MagentaCarpet => 0.1 as f32, + BlockKind::LightBlueCarpet => 0.1 as f32, + BlockKind::YellowCarpet => 0.1 as f32, + BlockKind::LimeCarpet => 0.1 as f32, + BlockKind::PinkCarpet => 0.1 as f32, + BlockKind::GrayCarpet => 0.1 as f32, + BlockKind::LightGrayCarpet => 0.1 as f32, + BlockKind::CyanCarpet => 0.1 as f32, + BlockKind::PurpleCarpet => 0.1 as f32, + BlockKind::BlueCarpet => 0.1 as f32, + BlockKind::BrownCarpet => 0.1 as f32, + BlockKind::GreenCarpet => 0.1 as f32, + BlockKind::RedCarpet => 0.1 as f32, + BlockKind::BlackCarpet => 0.1 as f32, + BlockKind::Terracotta => 1.25 as f32, + BlockKind::CoalBlock => 5 as f32, + BlockKind::PackedIce => 0.5 as f32, + BlockKind::Sunflower => 0 as f32, + BlockKind::Lilac => 0 as f32, + BlockKind::RoseBush => 0 as f32, + BlockKind::Peony => 0 as f32, + BlockKind::TallGrass => 0 as f32, + BlockKind::LargeFern => 0 as f32, + BlockKind::WhiteBanner => 1 as f32, + BlockKind::OrangeBanner => 1 as f32, + BlockKind::MagentaBanner => 1 as f32, + BlockKind::LightBlueBanner => 1 as f32, + BlockKind::YellowBanner => 1 as f32, + BlockKind::LimeBanner => 1 as f32, + BlockKind::PinkBanner => 1 as f32, + BlockKind::GrayBanner => 1 as f32, + BlockKind::LightGrayBanner => 1 as f32, + BlockKind::CyanBanner => 1 as f32, + BlockKind::PurpleBanner => 1 as f32, + BlockKind::BlueBanner => 1 as f32, + BlockKind::BrownBanner => 1 as f32, + BlockKind::GreenBanner => 1 as f32, + BlockKind::RedBanner => 1 as f32, + BlockKind::BlackBanner => 1 as f32, + BlockKind::WhiteWallBanner => 1 as f32, + BlockKind::OrangeWallBanner => 1 as f32, + BlockKind::MagentaWallBanner => 1 as f32, + BlockKind::LightBlueWallBanner => 1 as f32, + BlockKind::YellowWallBanner => 1 as f32, + BlockKind::LimeWallBanner => 1 as f32, + BlockKind::PinkWallBanner => 1 as f32, + BlockKind::GrayWallBanner => 1 as f32, + BlockKind::LightGrayWallBanner => 1 as f32, + BlockKind::CyanWallBanner => 1 as f32, + BlockKind::PurpleWallBanner => 1 as f32, + BlockKind::BlueWallBanner => 1 as f32, + BlockKind::BrownWallBanner => 1 as f32, + BlockKind::GreenWallBanner => 1 as f32, + BlockKind::RedWallBanner => 1 as f32, + BlockKind::BlackWallBanner => 1 as f32, + BlockKind::RedSandstone => 0.8 as f32, + BlockKind::ChiseledRedSandstone => 0.8 as f32, + BlockKind::CutRedSandstone => 0.8 as f32, + BlockKind::RedSandstoneStairs => 0 as f32, + BlockKind::OakSlab => 2 as f32, + BlockKind::SpruceSlab => 2 as f32, + BlockKind::BirchSlab => 2 as f32, + BlockKind::JungleSlab => 2 as f32, + BlockKind::AcaciaSlab => 2 as f32, + BlockKind::DarkOakSlab => 2 as f32, + BlockKind::StoneSlab => 2 as f32, + BlockKind::SmoothStoneSlab => 2 as f32, + BlockKind::SandstoneSlab => 2 as f32, + BlockKind::CutSandstoneSlab => 2 as f32, + BlockKind::PetrifiedOakSlab => 2 as f32, + BlockKind::CobblestoneSlab => 2 as f32, + BlockKind::BrickSlab => 2 as f32, + BlockKind::StoneBrickSlab => 2 as f32, + BlockKind::NetherBrickSlab => 2 as f32, + BlockKind::QuartzSlab => 2 as f32, + BlockKind::RedSandstoneSlab => 2 as f32, + BlockKind::CutRedSandstoneSlab => 2 as f32, + BlockKind::PurpurSlab => 2 as f32, + BlockKind::SmoothStone => 2 as f32, + BlockKind::SmoothSandstone => 2 as f32, + BlockKind::SmoothQuartz => 2 as f32, + BlockKind::SmoothRedSandstone => 2 as f32, + BlockKind::SpruceFenceGate => 2 as f32, + BlockKind::BirchFenceGate => 2 as f32, + BlockKind::JungleFenceGate => 2 as f32, + BlockKind::AcaciaFenceGate => 2 as f32, + BlockKind::DarkOakFenceGate => 2 as f32, + BlockKind::SpruceFence => 2 as f32, + BlockKind::BirchFence => 2 as f32, + BlockKind::JungleFence => 2 as f32, + BlockKind::AcaciaFence => 2 as f32, + BlockKind::DarkOakFence => 2 as f32, + BlockKind::SpruceDoor => 3 as f32, + BlockKind::BirchDoor => 3 as f32, + BlockKind::JungleDoor => 3 as f32, + BlockKind::AcaciaDoor => 3 as f32, + BlockKind::DarkOakDoor => 3 as f32, + BlockKind::EndRod => 0 as f32, + BlockKind::ChorusPlant => 0.4 as f32, + BlockKind::ChorusFlower => 0.4 as f32, + BlockKind::PurpurBlock => 1.5 as f32, + BlockKind::PurpurPillar => 1.5 as f32, + BlockKind::PurpurStairs => 0 as f32, + BlockKind::EndStoneBricks => 3 as f32, + BlockKind::Beetroots => 0 as f32, + BlockKind::GrassPath => 0.65 as f32, + BlockKind::EndGateway => 0 as f32, + BlockKind::RepeatingCommandBlock => 0 as f32, + BlockKind::ChainCommandBlock => 0 as f32, + BlockKind::FrostedIce => 0.5 as f32, + BlockKind::MagmaBlock => 0.5 as f32, + BlockKind::NetherWartBlock => 1 as f32, + BlockKind::RedNetherBricks => 2 as f32, + BlockKind::BoneBlock => 2 as f32, + BlockKind::StructureVoid => 0 as f32, + BlockKind::Observer => 3 as f32, + BlockKind::ShulkerBox => 2 as f32, + BlockKind::WhiteShulkerBox => 2 as f32, + BlockKind::OrangeShulkerBox => 2 as f32, + BlockKind::MagentaShulkerBox => 2 as f32, + BlockKind::LightBlueShulkerBox => 2 as f32, + BlockKind::YellowShulkerBox => 2 as f32, + BlockKind::LimeShulkerBox => 2 as f32, + BlockKind::PinkShulkerBox => 2 as f32, + BlockKind::GrayShulkerBox => 2 as f32, + BlockKind::LightGrayShulkerBox => 2 as f32, + BlockKind::CyanShulkerBox => 2 as f32, + BlockKind::PurpleShulkerBox => 2 as f32, + BlockKind::BlueShulkerBox => 2 as f32, + BlockKind::BrownShulkerBox => 2 as f32, + BlockKind::GreenShulkerBox => 2 as f32, + BlockKind::RedShulkerBox => 2 as f32, + BlockKind::BlackShulkerBox => 2 as f32, + BlockKind::WhiteGlazedTerracotta => 1.4 as f32, + BlockKind::OrangeGlazedTerracotta => 1.4 as f32, + BlockKind::MagentaGlazedTerracotta => 1.4 as f32, + BlockKind::LightBlueGlazedTerracotta => 1.4 as f32, + BlockKind::YellowGlazedTerracotta => 1.4 as f32, + BlockKind::LimeGlazedTerracotta => 1.4 as f32, + BlockKind::PinkGlazedTerracotta => 1.4 as f32, + BlockKind::GrayGlazedTerracotta => 1.4 as f32, + BlockKind::LightGrayGlazedTerracotta => 1.4 as f32, + BlockKind::CyanGlazedTerracotta => 1.4 as f32, + BlockKind::PurpleGlazedTerracotta => 1.4 as f32, + BlockKind::BlueGlazedTerracotta => 1.4 as f32, + BlockKind::BrownGlazedTerracotta => 1.4 as f32, + BlockKind::GreenGlazedTerracotta => 1.4 as f32, + BlockKind::RedGlazedTerracotta => 1.4 as f32, + BlockKind::BlackGlazedTerracotta => 1.4 as f32, + BlockKind::WhiteConcrete => 1.8 as f32, + BlockKind::OrangeConcrete => 1.8 as f32, + BlockKind::MagentaConcrete => 1.8 as f32, + BlockKind::LightBlueConcrete => 1.8 as f32, + BlockKind::YellowConcrete => 1.8 as f32, + BlockKind::LimeConcrete => 1.8 as f32, + BlockKind::PinkConcrete => 1.8 as f32, + BlockKind::GrayConcrete => 1.8 as f32, + BlockKind::LightGrayConcrete => 1.8 as f32, + BlockKind::CyanConcrete => 1.8 as f32, + BlockKind::PurpleConcrete => 1.8 as f32, + BlockKind::BlueConcrete => 1.8 as f32, + BlockKind::BrownConcrete => 1.8 as f32, + BlockKind::GreenConcrete => 1.8 as f32, + BlockKind::RedConcrete => 1.8 as f32, + BlockKind::BlackConcrete => 1.8 as f32, + BlockKind::WhiteConcretePowder => 0.5 as f32, + BlockKind::OrangeConcretePowder => 0.5 as f32, + BlockKind::MagentaConcretePowder => 0.5 as f32, + BlockKind::LightBlueConcretePowder => 0.5 as f32, + BlockKind::YellowConcretePowder => 0.5 as f32, + BlockKind::LimeConcretePowder => 0.5 as f32, + BlockKind::PinkConcretePowder => 0.5 as f32, + BlockKind::GrayConcretePowder => 0.5 as f32, + BlockKind::LightGrayConcretePowder => 0.5 as f32, + BlockKind::CyanConcretePowder => 0.5 as f32, + BlockKind::PurpleConcretePowder => 0.5 as f32, + BlockKind::BlueConcretePowder => 0.5 as f32, + BlockKind::BrownConcretePowder => 0.5 as f32, + BlockKind::GreenConcretePowder => 0.5 as f32, + BlockKind::RedConcretePowder => 0.5 as f32, + BlockKind::BlackConcretePowder => 0.5 as f32, + BlockKind::Kelp => 0 as f32, + BlockKind::KelpPlant => 0 as f32, + BlockKind::DriedKelpBlock => 0.5 as f32, + BlockKind::TurtleEgg => 0.5 as f32, + BlockKind::DeadTubeCoralBlock => 1.5 as f32, + BlockKind::DeadBrainCoralBlock => 1.5 as f32, + BlockKind::DeadBubbleCoralBlock => 1.5 as f32, + BlockKind::DeadFireCoralBlock => 1.5 as f32, + BlockKind::DeadHornCoralBlock => 1.5 as f32, + BlockKind::TubeCoralBlock => 1.5 as f32, + BlockKind::BrainCoralBlock => 1.5 as f32, + BlockKind::BubbleCoralBlock => 1.5 as f32, + BlockKind::FireCoralBlock => 1.5 as f32, + BlockKind::HornCoralBlock => 1.5 as f32, + BlockKind::DeadTubeCoral => 0 as f32, + BlockKind::DeadBrainCoral => 0 as f32, + BlockKind::DeadBubbleCoral => 0 as f32, + BlockKind::DeadFireCoral => 0 as f32, + BlockKind::DeadHornCoral => 0 as f32, + BlockKind::TubeCoral => 0 as f32, + BlockKind::BrainCoral => 0 as f32, + BlockKind::BubbleCoral => 0 as f32, + BlockKind::FireCoral => 0 as f32, + BlockKind::HornCoral => 0 as f32, + BlockKind::DeadTubeCoralFan => 0 as f32, + BlockKind::DeadBrainCoralFan => 0 as f32, + BlockKind::DeadBubbleCoralFan => 0 as f32, + BlockKind::DeadFireCoralFan => 0 as f32, + BlockKind::DeadHornCoralFan => 0 as f32, + BlockKind::TubeCoralFan => 0 as f32, + BlockKind::BrainCoralFan => 0 as f32, + BlockKind::BubbleCoralFan => 0 as f32, + BlockKind::FireCoralFan => 0 as f32, + BlockKind::HornCoralFan => 0 as f32, + BlockKind::DeadTubeCoralWallFan => 0 as f32, + BlockKind::DeadBrainCoralWallFan => 0 as f32, + BlockKind::DeadBubbleCoralWallFan => 0 as f32, + BlockKind::DeadFireCoralWallFan => 0 as f32, + BlockKind::DeadHornCoralWallFan => 0 as f32, + BlockKind::TubeCoralWallFan => 0 as f32, + BlockKind::BrainCoralWallFan => 0 as f32, + BlockKind::BubbleCoralWallFan => 0 as f32, + BlockKind::FireCoralWallFan => 0 as f32, + BlockKind::HornCoralWallFan => 0 as f32, + BlockKind::SeaPickle => 0 as f32, + BlockKind::BlueIce => 2.8 as f32, + BlockKind::Conduit => 3 as f32, + BlockKind::BambooSapling => 1 as f32, + BlockKind::Bamboo => 1 as f32, + BlockKind::PottedBamboo => 0 as f32, + BlockKind::VoidAir => 0 as f32, + BlockKind::CaveAir => 0 as f32, + BlockKind::BubbleColumn => 0 as f32, + BlockKind::PolishedGraniteStairs => 0 as f32, + BlockKind::SmoothRedSandstoneStairs => 0 as f32, + BlockKind::MossyStoneBrickStairs => 0 as f32, + BlockKind::PolishedDioriteStairs => 0 as f32, + BlockKind::MossyCobblestoneStairs => 0 as f32, + BlockKind::EndStoneBrickStairs => 0 as f32, + BlockKind::StoneStairs => 0 as f32, + BlockKind::SmoothSandstoneStairs => 0 as f32, + BlockKind::SmoothQuartzStairs => 0 as f32, + BlockKind::GraniteStairs => 0 as f32, + BlockKind::AndesiteStairs => 0 as f32, + BlockKind::RedNetherBrickStairs => 0 as f32, + BlockKind::PolishedAndesiteStairs => 0 as f32, + BlockKind::DioriteStairs => 0 as f32, + BlockKind::PolishedGraniteSlab => 0 as f32, + BlockKind::SmoothRedSandstoneSlab => 0 as f32, + BlockKind::MossyStoneBrickSlab => 0 as f32, + BlockKind::PolishedDioriteSlab => 0 as f32, + BlockKind::MossyCobblestoneSlab => 0 as f32, + BlockKind::EndStoneBrickSlab => 0 as f32, + BlockKind::SmoothSandstoneSlab => 0 as f32, + BlockKind::SmoothQuartzSlab => 0 as f32, + BlockKind::GraniteSlab => 0 as f32, + BlockKind::AndesiteSlab => 0 as f32, + BlockKind::RedNetherBrickSlab => 0 as f32, + BlockKind::PolishedAndesiteSlab => 0 as f32, + BlockKind::DioriteSlab => 0 as f32, + BlockKind::BrickWall => 0 as f32, + BlockKind::PrismarineWall => 0 as f32, + BlockKind::RedSandstoneWall => 0 as f32, + BlockKind::MossyStoneBrickWall => 0 as f32, + BlockKind::GraniteWall => 0 as f32, + BlockKind::StoneBrickWall => 0 as f32, + BlockKind::NetherBrickWall => 0 as f32, + BlockKind::AndesiteWall => 0 as f32, + BlockKind::RedNetherBrickWall => 0 as f32, + BlockKind::SandstoneWall => 0 as f32, + BlockKind::EndStoneBrickWall => 0 as f32, + BlockKind::DioriteWall => 0 as f32, + BlockKind::Scaffolding => 0 as f32, + BlockKind::Loom => 2.5 as f32, + BlockKind::Barrel => 2.5 as f32, + BlockKind::Smoker => 3.5 as f32, + BlockKind::BlastFurnace => 3.5 as f32, + BlockKind::CartographyTable => 2.5 as f32, + BlockKind::FletchingTable => 2.5 as f32, + BlockKind::Grindstone => 2 as f32, + BlockKind::Lectern => 2.5 as f32, + BlockKind::SmithingTable => 2.5 as f32, + BlockKind::Stonecutter => 3.5 as f32, + BlockKind::Bell => 5 as f32, + BlockKind::Lantern => 3.5 as f32, + BlockKind::SoulLantern => 3.5 as f32, + BlockKind::Campfire => 2 as f32, + BlockKind::SoulCampfire => 2 as f32, + BlockKind::SweetBerryBush => 0 as f32, + BlockKind::WarpedStem => 2 as f32, + BlockKind::StrippedWarpedStem => 2 as f32, + BlockKind::WarpedHyphae => 2 as f32, + BlockKind::StrippedWarpedHyphae => 2 as f32, + BlockKind::WarpedNylium => 0.4 as f32, + BlockKind::WarpedFungus => 0 as f32, + BlockKind::WarpedWartBlock => 1 as f32, + BlockKind::WarpedRoots => 0 as f32, + BlockKind::NetherSprouts => 0 as f32, + BlockKind::CrimsonStem => 2 as f32, + BlockKind::StrippedCrimsonStem => 2 as f32, + BlockKind::CrimsonHyphae => 2 as f32, + BlockKind::StrippedCrimsonHyphae => 2 as f32, + BlockKind::CrimsonNylium => 0.4 as f32, + BlockKind::CrimsonFungus => 0 as f32, + BlockKind::Shroomlight => 1 as f32, + BlockKind::WeepingVines => 0 as f32, + BlockKind::WeepingVinesPlant => 0 as f32, + BlockKind::TwistingVines => 0 as f32, + BlockKind::TwistingVinesPlant => 0 as f32, + BlockKind::CrimsonRoots => 0 as f32, + BlockKind::CrimsonPlanks => 2 as f32, + BlockKind::WarpedPlanks => 2 as f32, + BlockKind::CrimsonSlab => 2 as f32, + BlockKind::WarpedSlab => 2 as f32, + BlockKind::CrimsonPressurePlate => 0.5 as f32, + BlockKind::WarpedPressurePlate => 0.5 as f32, + BlockKind::CrimsonFence => 2 as f32, + BlockKind::WarpedFence => 2 as f32, + BlockKind::CrimsonTrapdoor => 3 as f32, + BlockKind::WarpedTrapdoor => 3 as f32, + BlockKind::CrimsonFenceGate => 2 as f32, + BlockKind::WarpedFenceGate => 2 as f32, + BlockKind::CrimsonStairs => 0 as f32, + BlockKind::WarpedStairs => 0 as f32, + BlockKind::CrimsonButton => 0.5 as f32, + BlockKind::WarpedButton => 0.5 as f32, + BlockKind::CrimsonDoor => 3 as f32, + BlockKind::WarpedDoor => 3 as f32, + BlockKind::CrimsonSign => 1 as f32, + BlockKind::WarpedSign => 1 as f32, + BlockKind::CrimsonWallSign => 1 as f32, + BlockKind::WarpedWallSign => 1 as f32, + BlockKind::StructureBlock => 0 as f32, + BlockKind::Jigsaw => 0 as f32, + BlockKind::Composter => 0.6 as f32, + BlockKind::Target => 0.5 as f32, + BlockKind::BeeNest => 0.3 as f32, + BlockKind::Beehive => 0.6 as f32, + BlockKind::HoneyBlock => 0 as f32, + BlockKind::HoneycombBlock => 0.6 as f32, + BlockKind::NetheriteBlock => 50 as f32, + BlockKind::AncientDebris => 30 as f32, + BlockKind::CryingObsidian => 50 as f32, + BlockKind::RespawnAnchor => 50 as f32, + BlockKind::PottedCrimsonFungus => 0 as f32, + BlockKind::PottedWarpedFungus => 0 as f32, + BlockKind::PottedCrimsonRoots => 0 as f32, + BlockKind::PottedWarpedRoots => 0 as f32, + BlockKind::Lodestone => 3.5 as f32, + BlockKind::Blackstone => 1.5 as f32, + BlockKind::BlackstoneStairs => 0 as f32, + BlockKind::BlackstoneWall => 0 as f32, + BlockKind::BlackstoneSlab => 2 as f32, + BlockKind::PolishedBlackstone => 2 as f32, + BlockKind::PolishedBlackstoneBricks => 1.5 as f32, + BlockKind::CrackedPolishedBlackstoneBricks => 0 as f32, + BlockKind::ChiseledPolishedBlackstone => 1.5 as f32, + BlockKind::PolishedBlackstoneBrickSlab => 2 as f32, + BlockKind::PolishedBlackstoneBrickStairs => 0 as f32, + BlockKind::PolishedBlackstoneBrickWall => 0 as f32, + BlockKind::GildedBlackstone => 0 as f32, + BlockKind::PolishedBlackstoneStairs => 0 as f32, + BlockKind::PolishedBlackstoneSlab => 0 as f32, + BlockKind::PolishedBlackstonePressurePlate => 0.5 as f32, + BlockKind::PolishedBlackstoneButton => 0.5 as f32, + BlockKind::PolishedBlackstoneWall => 0 as f32, + BlockKind::ChiseledNetherBricks => 2 as f32, + BlockKind::CrackedNetherBricks => 2 as f32, + BlockKind::QuartzBricks => 0 as f32, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `diggable` property of this `BlockKind`. + pub fn diggable(&self) -> bool { + match self { + BlockKind::Air => true, + BlockKind::Stone => true, + BlockKind::Granite => true, + BlockKind::PolishedGranite => true, + BlockKind::Diorite => true, + BlockKind::PolishedDiorite => true, + BlockKind::Andesite => true, + BlockKind::PolishedAndesite => true, + BlockKind::GrassBlock => true, + BlockKind::Dirt => true, + BlockKind::CoarseDirt => true, + BlockKind::Podzol => true, + BlockKind::Cobblestone => true, + BlockKind::OakPlanks => true, + BlockKind::SprucePlanks => true, + BlockKind::BirchPlanks => true, + BlockKind::JunglePlanks => true, + BlockKind::AcaciaPlanks => true, + BlockKind::DarkOakPlanks => true, + BlockKind::OakSapling => true, + BlockKind::SpruceSapling => true, + BlockKind::BirchSapling => true, + BlockKind::JungleSapling => true, + BlockKind::AcaciaSapling => true, + BlockKind::DarkOakSapling => true, + BlockKind::Bedrock => false, + BlockKind::Water => false, + BlockKind::Lava => false, + BlockKind::Sand => true, + BlockKind::RedSand => true, + BlockKind::Gravel => true, + BlockKind::GoldOre => true, + BlockKind::IronOre => true, + BlockKind::CoalOre => true, + BlockKind::NetherGoldOre => true, + BlockKind::OakLog => true, + BlockKind::SpruceLog => true, + BlockKind::BirchLog => true, + BlockKind::JungleLog => true, + BlockKind::AcaciaLog => true, + BlockKind::DarkOakLog => true, + BlockKind::StrippedSpruceLog => true, + BlockKind::StrippedBirchLog => true, + BlockKind::StrippedJungleLog => true, + BlockKind::StrippedAcaciaLog => true, + BlockKind::StrippedDarkOakLog => true, + BlockKind::StrippedOakLog => true, + BlockKind::OakWood => true, + BlockKind::SpruceWood => true, + BlockKind::BirchWood => true, + BlockKind::JungleWood => true, + BlockKind::AcaciaWood => true, + BlockKind::DarkOakWood => true, + BlockKind::StrippedOakWood => true, + BlockKind::StrippedSpruceWood => true, + BlockKind::StrippedBirchWood => true, + BlockKind::StrippedJungleWood => true, + BlockKind::StrippedAcaciaWood => true, + BlockKind::StrippedDarkOakWood => true, + BlockKind::OakLeaves => true, + BlockKind::SpruceLeaves => true, + BlockKind::BirchLeaves => true, + BlockKind::JungleLeaves => true, + BlockKind::AcaciaLeaves => true, + BlockKind::DarkOakLeaves => true, + BlockKind::Sponge => true, + BlockKind::WetSponge => true, + BlockKind::Glass => true, + BlockKind::LapisOre => true, + BlockKind::LapisBlock => true, + BlockKind::Dispenser => true, + BlockKind::Sandstone => true, + BlockKind::ChiseledSandstone => true, + BlockKind::CutSandstone => true, + BlockKind::NoteBlock => true, + BlockKind::WhiteBed => true, + BlockKind::OrangeBed => true, + BlockKind::MagentaBed => true, + BlockKind::LightBlueBed => true, + BlockKind::YellowBed => true, + BlockKind::LimeBed => true, + BlockKind::PinkBed => true, + BlockKind::GrayBed => true, + BlockKind::LightGrayBed => true, + BlockKind::CyanBed => true, + BlockKind::PurpleBed => true, + BlockKind::BlueBed => true, + BlockKind::BrownBed => true, + BlockKind::GreenBed => true, + BlockKind::RedBed => true, + BlockKind::BlackBed => true, + BlockKind::PoweredRail => true, + BlockKind::DetectorRail => true, + BlockKind::StickyPiston => true, + BlockKind::Cobweb => true, + BlockKind::Grass => true, + BlockKind::Fern => true, + BlockKind::DeadBush => true, + BlockKind::Seagrass => true, + BlockKind::TallSeagrass => true, + BlockKind::Piston => true, + BlockKind::PistonHead => true, + BlockKind::WhiteWool => true, + BlockKind::OrangeWool => true, + BlockKind::MagentaWool => true, + BlockKind::LightBlueWool => true, + BlockKind::YellowWool => true, + BlockKind::LimeWool => true, + BlockKind::PinkWool => true, + BlockKind::GrayWool => true, + BlockKind::LightGrayWool => true, + BlockKind::CyanWool => true, + BlockKind::PurpleWool => true, + BlockKind::BlueWool => true, + BlockKind::BrownWool => true, + BlockKind::GreenWool => true, + BlockKind::RedWool => true, + BlockKind::BlackWool => true, + BlockKind::MovingPiston => false, + BlockKind::Dandelion => true, + BlockKind::Poppy => true, + BlockKind::BlueOrchid => true, + BlockKind::Allium => true, + BlockKind::AzureBluet => true, + BlockKind::RedTulip => true, + BlockKind::OrangeTulip => true, + BlockKind::WhiteTulip => true, + BlockKind::PinkTulip => true, + BlockKind::OxeyeDaisy => true, + BlockKind::Cornflower => true, + BlockKind::WitherRose => true, + BlockKind::LilyOfTheValley => true, + BlockKind::BrownMushroom => true, + BlockKind::RedMushroom => true, + BlockKind::GoldBlock => true, + BlockKind::IronBlock => true, + BlockKind::Bricks => true, + BlockKind::Tnt => true, + BlockKind::Bookshelf => true, + BlockKind::MossyCobblestone => true, + BlockKind::Obsidian => true, + BlockKind::Torch => true, + BlockKind::WallTorch => true, + BlockKind::Fire => true, + BlockKind::SoulFire => true, + BlockKind::Spawner => true, + BlockKind::OakStairs => true, + BlockKind::Chest => true, + BlockKind::RedstoneWire => true, + BlockKind::DiamondOre => true, + BlockKind::DiamondBlock => true, + BlockKind::CraftingTable => true, + BlockKind::Wheat => true, + BlockKind::Farmland => true, + BlockKind::Furnace => true, + BlockKind::OakSign => true, + BlockKind::SpruceSign => true, + BlockKind::BirchSign => true, + BlockKind::AcaciaSign => true, + BlockKind::JungleSign => true, + BlockKind::DarkOakSign => true, + BlockKind::OakDoor => true, + BlockKind::Ladder => true, + BlockKind::Rail => true, + BlockKind::CobblestoneStairs => true, + BlockKind::OakWallSign => true, + BlockKind::SpruceWallSign => true, + BlockKind::BirchWallSign => true, + BlockKind::AcaciaWallSign => true, + BlockKind::JungleWallSign => true, + BlockKind::DarkOakWallSign => true, + BlockKind::Lever => true, + BlockKind::StonePressurePlate => true, + BlockKind::IronDoor => true, + BlockKind::OakPressurePlate => true, + BlockKind::SprucePressurePlate => true, + BlockKind::BirchPressurePlate => true, + BlockKind::JunglePressurePlate => true, + BlockKind::AcaciaPressurePlate => true, + BlockKind::DarkOakPressurePlate => true, + BlockKind::RedstoneOre => true, + BlockKind::RedstoneTorch => true, + BlockKind::RedstoneWallTorch => true, + BlockKind::StoneButton => true, + BlockKind::Snow => true, + BlockKind::Ice => true, + BlockKind::SnowBlock => true, + BlockKind::Cactus => true, + BlockKind::Clay => true, + BlockKind::SugarCane => true, + BlockKind::Jukebox => true, + BlockKind::OakFence => true, + BlockKind::Pumpkin => true, + BlockKind::Netherrack => true, + BlockKind::SoulSand => true, + BlockKind::SoulSoil => true, + BlockKind::Basalt => true, + BlockKind::PolishedBasalt => true, + BlockKind::SoulTorch => true, + BlockKind::SoulWallTorch => true, + BlockKind::Glowstone => true, + BlockKind::NetherPortal => false, + BlockKind::CarvedPumpkin => true, + BlockKind::JackOLantern => true, + BlockKind::Cake => true, + BlockKind::Repeater => true, + BlockKind::WhiteStainedGlass => true, + BlockKind::OrangeStainedGlass => true, + BlockKind::MagentaStainedGlass => true, + BlockKind::LightBlueStainedGlass => true, + BlockKind::YellowStainedGlass => true, + BlockKind::LimeStainedGlass => true, + BlockKind::PinkStainedGlass => true, + BlockKind::GrayStainedGlass => true, + BlockKind::LightGrayStainedGlass => true, + BlockKind::CyanStainedGlass => true, + BlockKind::PurpleStainedGlass => true, + BlockKind::BlueStainedGlass => true, + BlockKind::BrownStainedGlass => true, + BlockKind::GreenStainedGlass => true, + BlockKind::RedStainedGlass => true, + BlockKind::BlackStainedGlass => true, + BlockKind::OakTrapdoor => true, + BlockKind::SpruceTrapdoor => true, + BlockKind::BirchTrapdoor => true, + BlockKind::JungleTrapdoor => true, + BlockKind::AcaciaTrapdoor => true, + BlockKind::DarkOakTrapdoor => true, + BlockKind::StoneBricks => true, + BlockKind::MossyStoneBricks => true, + BlockKind::CrackedStoneBricks => true, + BlockKind::ChiseledStoneBricks => true, + BlockKind::InfestedStone => true, + BlockKind::InfestedCobblestone => true, + BlockKind::InfestedStoneBricks => true, + BlockKind::InfestedMossyStoneBricks => true, + BlockKind::InfestedCrackedStoneBricks => true, + BlockKind::InfestedChiseledStoneBricks => true, + BlockKind::BrownMushroomBlock => true, + BlockKind::RedMushroomBlock => true, + BlockKind::MushroomStem => true, + BlockKind::IronBars => true, + BlockKind::Chain => true, + BlockKind::GlassPane => true, + BlockKind::Melon => true, + BlockKind::AttachedPumpkinStem => true, + BlockKind::AttachedMelonStem => true, + BlockKind::PumpkinStem => true, + BlockKind::MelonStem => true, + BlockKind::Vine => true, + BlockKind::OakFenceGate => true, + BlockKind::BrickStairs => true, + BlockKind::StoneBrickStairs => true, + BlockKind::Mycelium => true, + BlockKind::LilyPad => true, + BlockKind::NetherBricks => true, + BlockKind::NetherBrickFence => true, + BlockKind::NetherBrickStairs => true, + BlockKind::NetherWart => true, + BlockKind::EnchantingTable => true, + BlockKind::BrewingStand => true, + BlockKind::Cauldron => true, + BlockKind::EndPortal => false, + BlockKind::EndPortalFrame => false, + BlockKind::EndStone => true, + BlockKind::DragonEgg => true, + BlockKind::RedstoneLamp => true, + BlockKind::Cocoa => true, + BlockKind::SandstoneStairs => true, + BlockKind::EmeraldOre => true, + BlockKind::EnderChest => true, + BlockKind::TripwireHook => true, + BlockKind::Tripwire => true, + BlockKind::EmeraldBlock => true, + BlockKind::SpruceStairs => true, + BlockKind::BirchStairs => true, + BlockKind::JungleStairs => true, + BlockKind::CommandBlock => false, + BlockKind::Beacon => true, + BlockKind::CobblestoneWall => true, + BlockKind::MossyCobblestoneWall => true, + BlockKind::FlowerPot => true, + BlockKind::PottedOakSapling => true, + BlockKind::PottedSpruceSapling => true, + BlockKind::PottedBirchSapling => true, + BlockKind::PottedJungleSapling => true, + BlockKind::PottedAcaciaSapling => true, + BlockKind::PottedDarkOakSapling => true, + BlockKind::PottedFern => true, + BlockKind::PottedDandelion => true, + BlockKind::PottedPoppy => true, + BlockKind::PottedBlueOrchid => true, + BlockKind::PottedAllium => true, + BlockKind::PottedAzureBluet => true, + BlockKind::PottedRedTulip => true, + BlockKind::PottedOrangeTulip => true, + BlockKind::PottedWhiteTulip => true, + BlockKind::PottedPinkTulip => true, + BlockKind::PottedOxeyeDaisy => true, + BlockKind::PottedCornflower => true, + BlockKind::PottedLilyOfTheValley => true, + BlockKind::PottedWitherRose => true, + BlockKind::PottedRedMushroom => true, + BlockKind::PottedBrownMushroom => true, + BlockKind::PottedDeadBush => true, + BlockKind::PottedCactus => true, + BlockKind::Carrots => true, + BlockKind::Potatoes => true, + BlockKind::OakButton => true, + BlockKind::SpruceButton => true, + BlockKind::BirchButton => true, + BlockKind::JungleButton => true, + BlockKind::AcaciaButton => true, + BlockKind::DarkOakButton => true, + BlockKind::SkeletonSkull => true, + BlockKind::SkeletonWallSkull => true, + BlockKind::WitherSkeletonSkull => true, + BlockKind::WitherSkeletonWallSkull => true, + BlockKind::ZombieHead => true, + BlockKind::ZombieWallHead => true, + BlockKind::PlayerHead => true, + BlockKind::PlayerWallHead => true, + BlockKind::CreeperHead => true, + BlockKind::CreeperWallHead => true, + BlockKind::DragonHead => true, + BlockKind::DragonWallHead => true, + BlockKind::Anvil => true, + BlockKind::ChippedAnvil => true, + BlockKind::DamagedAnvil => true, + BlockKind::TrappedChest => true, + BlockKind::LightWeightedPressurePlate => true, + BlockKind::HeavyWeightedPressurePlate => true, + BlockKind::Comparator => true, + BlockKind::DaylightDetector => true, + BlockKind::RedstoneBlock => true, + BlockKind::NetherQuartzOre => true, + BlockKind::Hopper => true, + BlockKind::QuartzBlock => true, + BlockKind::ChiseledQuartzBlock => true, + BlockKind::QuartzPillar => true, + BlockKind::QuartzStairs => true, + BlockKind::ActivatorRail => true, + BlockKind::Dropper => true, + BlockKind::WhiteTerracotta => true, + BlockKind::OrangeTerracotta => true, + BlockKind::MagentaTerracotta => true, + BlockKind::LightBlueTerracotta => true, + BlockKind::YellowTerracotta => true, + BlockKind::LimeTerracotta => true, + BlockKind::PinkTerracotta => true, + BlockKind::GrayTerracotta => true, + BlockKind::LightGrayTerracotta => true, + BlockKind::CyanTerracotta => true, + BlockKind::PurpleTerracotta => true, + BlockKind::BlueTerracotta => true, + BlockKind::BrownTerracotta => true, + BlockKind::GreenTerracotta => true, + BlockKind::RedTerracotta => true, + BlockKind::BlackTerracotta => true, + BlockKind::WhiteStainedGlassPane => true, + BlockKind::OrangeStainedGlassPane => true, + BlockKind::MagentaStainedGlassPane => true, + BlockKind::LightBlueStainedGlassPane => true, + BlockKind::YellowStainedGlassPane => true, + BlockKind::LimeStainedGlassPane => true, + BlockKind::PinkStainedGlassPane => true, + BlockKind::GrayStainedGlassPane => true, + BlockKind::LightGrayStainedGlassPane => true, + BlockKind::CyanStainedGlassPane => true, + BlockKind::PurpleStainedGlassPane => true, + BlockKind::BlueStainedGlassPane => true, + BlockKind::BrownStainedGlassPane => true, + BlockKind::GreenStainedGlassPane => true, + BlockKind::RedStainedGlassPane => true, + BlockKind::BlackStainedGlassPane => true, + BlockKind::AcaciaStairs => true, + BlockKind::DarkOakStairs => true, + BlockKind::SlimeBlock => true, + BlockKind::Barrier => false, + BlockKind::IronTrapdoor => true, + BlockKind::Prismarine => true, + BlockKind::PrismarineBricks => true, + BlockKind::DarkPrismarine => true, + BlockKind::PrismarineStairs => true, + BlockKind::PrismarineBrickStairs => true, + BlockKind::DarkPrismarineStairs => true, + BlockKind::PrismarineSlab => true, + BlockKind::PrismarineBrickSlab => true, + BlockKind::DarkPrismarineSlab => true, + BlockKind::SeaLantern => true, + BlockKind::HayBlock => true, + BlockKind::WhiteCarpet => true, + BlockKind::OrangeCarpet => true, + BlockKind::MagentaCarpet => true, + BlockKind::LightBlueCarpet => true, + BlockKind::YellowCarpet => true, + BlockKind::LimeCarpet => true, + BlockKind::PinkCarpet => true, + BlockKind::GrayCarpet => true, + BlockKind::LightGrayCarpet => true, + BlockKind::CyanCarpet => true, + BlockKind::PurpleCarpet => true, + BlockKind::BlueCarpet => true, + BlockKind::BrownCarpet => true, + BlockKind::GreenCarpet => true, + BlockKind::RedCarpet => true, + BlockKind::BlackCarpet => true, + BlockKind::Terracotta => true, + BlockKind::CoalBlock => true, + BlockKind::PackedIce => true, + BlockKind::Sunflower => true, + BlockKind::Lilac => true, + BlockKind::RoseBush => true, + BlockKind::Peony => true, + BlockKind::TallGrass => true, + BlockKind::LargeFern => true, + BlockKind::WhiteBanner => true, + BlockKind::OrangeBanner => true, + BlockKind::MagentaBanner => true, + BlockKind::LightBlueBanner => true, + BlockKind::YellowBanner => true, + BlockKind::LimeBanner => true, + BlockKind::PinkBanner => true, + BlockKind::GrayBanner => true, + BlockKind::LightGrayBanner => true, + BlockKind::CyanBanner => true, + BlockKind::PurpleBanner => true, + BlockKind::BlueBanner => true, + BlockKind::BrownBanner => true, + BlockKind::GreenBanner => true, + BlockKind::RedBanner => true, + BlockKind::BlackBanner => true, + BlockKind::WhiteWallBanner => true, + BlockKind::OrangeWallBanner => true, + BlockKind::MagentaWallBanner => true, + BlockKind::LightBlueWallBanner => true, + BlockKind::YellowWallBanner => true, + BlockKind::LimeWallBanner => true, + BlockKind::PinkWallBanner => true, + BlockKind::GrayWallBanner => true, + BlockKind::LightGrayWallBanner => true, + BlockKind::CyanWallBanner => true, + BlockKind::PurpleWallBanner => true, + BlockKind::BlueWallBanner => true, + BlockKind::BrownWallBanner => true, + BlockKind::GreenWallBanner => true, + BlockKind::RedWallBanner => true, + BlockKind::BlackWallBanner => true, + BlockKind::RedSandstone => true, + BlockKind::ChiseledRedSandstone => true, + BlockKind::CutRedSandstone => true, + BlockKind::RedSandstoneStairs => true, + BlockKind::OakSlab => true, + BlockKind::SpruceSlab => true, + BlockKind::BirchSlab => true, + BlockKind::JungleSlab => true, + BlockKind::AcaciaSlab => true, + BlockKind::DarkOakSlab => true, + BlockKind::StoneSlab => true, + BlockKind::SmoothStoneSlab => true, + BlockKind::SandstoneSlab => true, + BlockKind::CutSandstoneSlab => true, + BlockKind::PetrifiedOakSlab => true, + BlockKind::CobblestoneSlab => true, + BlockKind::BrickSlab => true, + BlockKind::StoneBrickSlab => true, + BlockKind::NetherBrickSlab => true, + BlockKind::QuartzSlab => true, + BlockKind::RedSandstoneSlab => true, + BlockKind::CutRedSandstoneSlab => true, + BlockKind::PurpurSlab => true, + BlockKind::SmoothStone => true, + BlockKind::SmoothSandstone => true, + BlockKind::SmoothQuartz => true, + BlockKind::SmoothRedSandstone => true, + BlockKind::SpruceFenceGate => true, + BlockKind::BirchFenceGate => true, + BlockKind::JungleFenceGate => true, + BlockKind::AcaciaFenceGate => true, + BlockKind::DarkOakFenceGate => true, + BlockKind::SpruceFence => true, + BlockKind::BirchFence => true, + BlockKind::JungleFence => true, + BlockKind::AcaciaFence => true, + BlockKind::DarkOakFence => true, + BlockKind::SpruceDoor => true, + BlockKind::BirchDoor => true, + BlockKind::JungleDoor => true, + BlockKind::AcaciaDoor => true, + BlockKind::DarkOakDoor => true, + BlockKind::EndRod => true, + BlockKind::ChorusPlant => true, + BlockKind::ChorusFlower => true, + BlockKind::PurpurBlock => true, + BlockKind::PurpurPillar => true, + BlockKind::PurpurStairs => true, + BlockKind::EndStoneBricks => true, + BlockKind::Beetroots => true, + BlockKind::GrassPath => true, + BlockKind::EndGateway => false, + BlockKind::RepeatingCommandBlock => false, + BlockKind::ChainCommandBlock => false, + BlockKind::FrostedIce => true, + BlockKind::MagmaBlock => true, + BlockKind::NetherWartBlock => true, + BlockKind::RedNetherBricks => true, + BlockKind::BoneBlock => true, + BlockKind::StructureVoid => true, + BlockKind::Observer => true, + BlockKind::ShulkerBox => true, + BlockKind::WhiteShulkerBox => true, + BlockKind::OrangeShulkerBox => true, + BlockKind::MagentaShulkerBox => true, + BlockKind::LightBlueShulkerBox => true, + BlockKind::YellowShulkerBox => true, + BlockKind::LimeShulkerBox => true, + BlockKind::PinkShulkerBox => true, + BlockKind::GrayShulkerBox => true, + BlockKind::LightGrayShulkerBox => true, + BlockKind::CyanShulkerBox => true, + BlockKind::PurpleShulkerBox => true, + BlockKind::BlueShulkerBox => true, + BlockKind::BrownShulkerBox => true, + BlockKind::GreenShulkerBox => true, + BlockKind::RedShulkerBox => true, + BlockKind::BlackShulkerBox => true, + BlockKind::WhiteGlazedTerracotta => true, + BlockKind::OrangeGlazedTerracotta => true, + BlockKind::MagentaGlazedTerracotta => true, + BlockKind::LightBlueGlazedTerracotta => true, + BlockKind::YellowGlazedTerracotta => true, + BlockKind::LimeGlazedTerracotta => true, + BlockKind::PinkGlazedTerracotta => true, + BlockKind::GrayGlazedTerracotta => true, + BlockKind::LightGrayGlazedTerracotta => true, + BlockKind::CyanGlazedTerracotta => true, + BlockKind::PurpleGlazedTerracotta => true, + BlockKind::BlueGlazedTerracotta => true, + BlockKind::BrownGlazedTerracotta => true, + BlockKind::GreenGlazedTerracotta => true, + BlockKind::RedGlazedTerracotta => true, + BlockKind::BlackGlazedTerracotta => true, + BlockKind::WhiteConcrete => true, + BlockKind::OrangeConcrete => true, + BlockKind::MagentaConcrete => true, + BlockKind::LightBlueConcrete => true, + BlockKind::YellowConcrete => true, + BlockKind::LimeConcrete => true, + BlockKind::PinkConcrete => true, + BlockKind::GrayConcrete => true, + BlockKind::LightGrayConcrete => true, + BlockKind::CyanConcrete => true, + BlockKind::PurpleConcrete => true, + BlockKind::BlueConcrete => true, + BlockKind::BrownConcrete => true, + BlockKind::GreenConcrete => true, + BlockKind::RedConcrete => true, + BlockKind::BlackConcrete => true, + BlockKind::WhiteConcretePowder => true, + BlockKind::OrangeConcretePowder => true, + BlockKind::MagentaConcretePowder => true, + BlockKind::LightBlueConcretePowder => true, + BlockKind::YellowConcretePowder => true, + BlockKind::LimeConcretePowder => true, + BlockKind::PinkConcretePowder => true, + BlockKind::GrayConcretePowder => true, + BlockKind::LightGrayConcretePowder => true, + BlockKind::CyanConcretePowder => true, + BlockKind::PurpleConcretePowder => true, + BlockKind::BlueConcretePowder => true, + BlockKind::BrownConcretePowder => true, + BlockKind::GreenConcretePowder => true, + BlockKind::RedConcretePowder => true, + BlockKind::BlackConcretePowder => true, + BlockKind::Kelp => true, + BlockKind::KelpPlant => true, + BlockKind::DriedKelpBlock => true, + BlockKind::TurtleEgg => true, + BlockKind::DeadTubeCoralBlock => true, + BlockKind::DeadBrainCoralBlock => true, + BlockKind::DeadBubbleCoralBlock => true, + BlockKind::DeadFireCoralBlock => true, + BlockKind::DeadHornCoralBlock => true, + BlockKind::TubeCoralBlock => true, + BlockKind::BrainCoralBlock => true, + BlockKind::BubbleCoralBlock => true, + BlockKind::FireCoralBlock => true, + BlockKind::HornCoralBlock => true, + BlockKind::DeadTubeCoral => true, + BlockKind::DeadBrainCoral => true, + BlockKind::DeadBubbleCoral => true, + BlockKind::DeadFireCoral => true, + BlockKind::DeadHornCoral => true, + BlockKind::TubeCoral => true, + BlockKind::BrainCoral => true, + BlockKind::BubbleCoral => true, + BlockKind::FireCoral => true, + BlockKind::HornCoral => true, + BlockKind::DeadTubeCoralFan => true, + BlockKind::DeadBrainCoralFan => true, + BlockKind::DeadBubbleCoralFan => true, + BlockKind::DeadFireCoralFan => true, + BlockKind::DeadHornCoralFan => true, + BlockKind::TubeCoralFan => true, + BlockKind::BrainCoralFan => true, + BlockKind::BubbleCoralFan => true, + BlockKind::FireCoralFan => true, + BlockKind::HornCoralFan => true, + BlockKind::DeadTubeCoralWallFan => true, + BlockKind::DeadBrainCoralWallFan => true, + BlockKind::DeadBubbleCoralWallFan => true, + BlockKind::DeadFireCoralWallFan => true, + BlockKind::DeadHornCoralWallFan => true, + BlockKind::TubeCoralWallFan => true, + BlockKind::BrainCoralWallFan => true, + BlockKind::BubbleCoralWallFan => true, + BlockKind::FireCoralWallFan => true, + BlockKind::HornCoralWallFan => true, + BlockKind::SeaPickle => true, + BlockKind::BlueIce => true, + BlockKind::Conduit => true, + BlockKind::BambooSapling => true, + BlockKind::Bamboo => true, + BlockKind::PottedBamboo => true, + BlockKind::VoidAir => true, + BlockKind::CaveAir => true, + BlockKind::BubbleColumn => true, + BlockKind::PolishedGraniteStairs => true, + BlockKind::SmoothRedSandstoneStairs => true, + BlockKind::MossyStoneBrickStairs => true, + BlockKind::PolishedDioriteStairs => true, + BlockKind::MossyCobblestoneStairs => true, + BlockKind::EndStoneBrickStairs => true, + BlockKind::StoneStairs => true, + BlockKind::SmoothSandstoneStairs => true, + BlockKind::SmoothQuartzStairs => true, + BlockKind::GraniteStairs => true, + BlockKind::AndesiteStairs => true, + BlockKind::RedNetherBrickStairs => true, + BlockKind::PolishedAndesiteStairs => true, + BlockKind::DioriteStairs => true, + BlockKind::PolishedGraniteSlab => true, + BlockKind::SmoothRedSandstoneSlab => true, + BlockKind::MossyStoneBrickSlab => true, + BlockKind::PolishedDioriteSlab => true, + BlockKind::MossyCobblestoneSlab => true, + BlockKind::EndStoneBrickSlab => true, + BlockKind::SmoothSandstoneSlab => true, + BlockKind::SmoothQuartzSlab => true, + BlockKind::GraniteSlab => true, + BlockKind::AndesiteSlab => true, + BlockKind::RedNetherBrickSlab => true, + BlockKind::PolishedAndesiteSlab => true, + BlockKind::DioriteSlab => true, + BlockKind::BrickWall => true, + BlockKind::PrismarineWall => true, + BlockKind::RedSandstoneWall => true, + BlockKind::MossyStoneBrickWall => true, + BlockKind::GraniteWall => true, + BlockKind::StoneBrickWall => true, + BlockKind::NetherBrickWall => true, + BlockKind::AndesiteWall => true, + BlockKind::RedNetherBrickWall => true, + BlockKind::SandstoneWall => true, + BlockKind::EndStoneBrickWall => true, + BlockKind::DioriteWall => true, + BlockKind::Scaffolding => true, + BlockKind::Loom => true, + BlockKind::Barrel => true, + BlockKind::Smoker => true, + BlockKind::BlastFurnace => true, + BlockKind::CartographyTable => true, + BlockKind::FletchingTable => true, + BlockKind::Grindstone => true, + BlockKind::Lectern => true, + BlockKind::SmithingTable => true, + BlockKind::Stonecutter => true, + BlockKind::Bell => true, + BlockKind::Lantern => true, + BlockKind::SoulLantern => true, + BlockKind::Campfire => true, + BlockKind::SoulCampfire => true, + BlockKind::SweetBerryBush => true, + BlockKind::WarpedStem => true, + BlockKind::StrippedWarpedStem => true, + BlockKind::WarpedHyphae => true, + BlockKind::StrippedWarpedHyphae => true, + BlockKind::WarpedNylium => true, + BlockKind::WarpedFungus => true, + BlockKind::WarpedWartBlock => true, + BlockKind::WarpedRoots => true, + BlockKind::NetherSprouts => true, + BlockKind::CrimsonStem => true, + BlockKind::StrippedCrimsonStem => true, + BlockKind::CrimsonHyphae => true, + BlockKind::StrippedCrimsonHyphae => true, + BlockKind::CrimsonNylium => true, + BlockKind::CrimsonFungus => true, + BlockKind::Shroomlight => true, + BlockKind::WeepingVines => true, + BlockKind::WeepingVinesPlant => true, + BlockKind::TwistingVines => true, + BlockKind::TwistingVinesPlant => true, + BlockKind::CrimsonRoots => true, + BlockKind::CrimsonPlanks => true, + BlockKind::WarpedPlanks => true, + BlockKind::CrimsonSlab => true, + BlockKind::WarpedSlab => true, + BlockKind::CrimsonPressurePlate => true, + BlockKind::WarpedPressurePlate => true, + BlockKind::CrimsonFence => true, + BlockKind::WarpedFence => true, + BlockKind::CrimsonTrapdoor => true, + BlockKind::WarpedTrapdoor => true, + BlockKind::CrimsonFenceGate => true, + BlockKind::WarpedFenceGate => true, + BlockKind::CrimsonStairs => true, + BlockKind::WarpedStairs => true, + BlockKind::CrimsonButton => true, + BlockKind::WarpedButton => true, + BlockKind::CrimsonDoor => true, + BlockKind::WarpedDoor => true, + BlockKind::CrimsonSign => true, + BlockKind::WarpedSign => true, + BlockKind::CrimsonWallSign => true, + BlockKind::WarpedWallSign => true, + BlockKind::StructureBlock => false, + BlockKind::Jigsaw => false, + BlockKind::Composter => true, + BlockKind::Target => true, + BlockKind::BeeNest => true, + BlockKind::Beehive => true, + BlockKind::HoneyBlock => true, + BlockKind::HoneycombBlock => true, + BlockKind::NetheriteBlock => true, + BlockKind::AncientDebris => true, + BlockKind::CryingObsidian => true, + BlockKind::RespawnAnchor => true, + BlockKind::PottedCrimsonFungus => true, + BlockKind::PottedWarpedFungus => true, + BlockKind::PottedCrimsonRoots => true, + BlockKind::PottedWarpedRoots => true, + BlockKind::Lodestone => true, + BlockKind::Blackstone => true, + BlockKind::BlackstoneStairs => true, + BlockKind::BlackstoneWall => true, + BlockKind::BlackstoneSlab => true, + BlockKind::PolishedBlackstone => true, + BlockKind::PolishedBlackstoneBricks => true, + BlockKind::CrackedPolishedBlackstoneBricks => true, + BlockKind::ChiseledPolishedBlackstone => true, + BlockKind::PolishedBlackstoneBrickSlab => true, + BlockKind::PolishedBlackstoneBrickStairs => true, + BlockKind::PolishedBlackstoneBrickWall => true, + BlockKind::GildedBlackstone => true, + BlockKind::PolishedBlackstoneStairs => true, + BlockKind::PolishedBlackstoneSlab => true, + BlockKind::PolishedBlackstonePressurePlate => true, + BlockKind::PolishedBlackstoneButton => true, + BlockKind::PolishedBlackstoneWall => true, + BlockKind::ChiseledNetherBricks => true, + BlockKind::CrackedNetherBricks => true, + BlockKind::QuartzBricks => true, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `transparent` property of this `BlockKind`. + pub fn transparent(&self) -> bool { + match self { + BlockKind::Air => true, + BlockKind::Stone => false, + BlockKind::Granite => false, + BlockKind::PolishedGranite => false, + BlockKind::Diorite => false, + BlockKind::PolishedDiorite => false, + BlockKind::Andesite => false, + BlockKind::PolishedAndesite => false, + BlockKind::GrassBlock => false, + BlockKind::Dirt => false, + BlockKind::CoarseDirt => false, + BlockKind::Podzol => false, + BlockKind::Cobblestone => false, + BlockKind::OakPlanks => false, + BlockKind::SprucePlanks => false, + BlockKind::BirchPlanks => false, + BlockKind::JunglePlanks => false, + BlockKind::AcaciaPlanks => false, + BlockKind::DarkOakPlanks => false, + BlockKind::OakSapling => true, + BlockKind::SpruceSapling => true, + BlockKind::BirchSapling => true, + BlockKind::JungleSapling => true, + BlockKind::AcaciaSapling => true, + BlockKind::DarkOakSapling => true, + BlockKind::Bedrock => false, + BlockKind::Water => true, + BlockKind::Lava => true, + BlockKind::Sand => false, + BlockKind::RedSand => false, + BlockKind::Gravel => false, + BlockKind::GoldOre => false, + BlockKind::IronOre => false, + BlockKind::CoalOre => false, + BlockKind::NetherGoldOre => false, + BlockKind::OakLog => false, + BlockKind::SpruceLog => false, + BlockKind::BirchLog => false, + BlockKind::JungleLog => false, + BlockKind::AcaciaLog => false, + BlockKind::DarkOakLog => false, + BlockKind::StrippedSpruceLog => false, + BlockKind::StrippedBirchLog => false, + BlockKind::StrippedJungleLog => false, + BlockKind::StrippedAcaciaLog => false, + BlockKind::StrippedDarkOakLog => false, + BlockKind::StrippedOakLog => false, + BlockKind::OakWood => false, + BlockKind::SpruceWood => false, + BlockKind::BirchWood => false, + BlockKind::JungleWood => false, + BlockKind::AcaciaWood => false, + BlockKind::DarkOakWood => false, + BlockKind::StrippedOakWood => false, + BlockKind::StrippedSpruceWood => false, + BlockKind::StrippedBirchWood => false, + BlockKind::StrippedJungleWood => false, + BlockKind::StrippedAcaciaWood => false, + BlockKind::StrippedDarkOakWood => false, + BlockKind::OakLeaves => true, + BlockKind::SpruceLeaves => true, + BlockKind::BirchLeaves => true, + BlockKind::JungleLeaves => true, + BlockKind::AcaciaLeaves => true, + BlockKind::DarkOakLeaves => true, + BlockKind::Sponge => false, + BlockKind::WetSponge => false, + BlockKind::Glass => true, + BlockKind::LapisOre => false, + BlockKind::LapisBlock => false, + BlockKind::Dispenser => false, + BlockKind::Sandstone => false, + BlockKind::ChiseledSandstone => false, + BlockKind::CutSandstone => false, + BlockKind::NoteBlock => false, + BlockKind::WhiteBed => true, + BlockKind::OrangeBed => true, + BlockKind::MagentaBed => true, + BlockKind::LightBlueBed => true, + BlockKind::YellowBed => true, + BlockKind::LimeBed => true, + BlockKind::PinkBed => true, + BlockKind::GrayBed => true, + BlockKind::LightGrayBed => true, + BlockKind::CyanBed => true, + BlockKind::PurpleBed => true, + BlockKind::BlueBed => true, + BlockKind::BrownBed => true, + BlockKind::GreenBed => true, + BlockKind::RedBed => true, + BlockKind::BlackBed => true, + BlockKind::PoweredRail => true, + BlockKind::DetectorRail => true, + BlockKind::StickyPiston => true, + BlockKind::Cobweb => true, + BlockKind::Grass => false, + BlockKind::Fern => true, + BlockKind::DeadBush => true, + BlockKind::Seagrass => true, + BlockKind::TallSeagrass => true, + BlockKind::Piston => true, + BlockKind::PistonHead => true, + BlockKind::WhiteWool => false, + BlockKind::OrangeWool => false, + BlockKind::MagentaWool => false, + BlockKind::LightBlueWool => false, + BlockKind::YellowWool => false, + BlockKind::LimeWool => false, + BlockKind::PinkWool => false, + BlockKind::GrayWool => false, + BlockKind::LightGrayWool => false, + BlockKind::CyanWool => false, + BlockKind::PurpleWool => false, + BlockKind::BlueWool => false, + BlockKind::BrownWool => false, + BlockKind::GreenWool => false, + BlockKind::RedWool => false, + BlockKind::BlackWool => false, + BlockKind::MovingPiston => true, + BlockKind::Dandelion => false, + BlockKind::Poppy => false, + BlockKind::BlueOrchid => true, + BlockKind::Allium => false, + BlockKind::AzureBluet => false, + BlockKind::RedTulip => true, + BlockKind::OrangeTulip => true, + BlockKind::WhiteTulip => true, + BlockKind::PinkTulip => true, + BlockKind::OxeyeDaisy => false, + BlockKind::Cornflower => true, + BlockKind::WitherRose => true, + BlockKind::LilyOfTheValley => true, + BlockKind::BrownMushroom => false, + BlockKind::RedMushroom => false, + BlockKind::GoldBlock => false, + BlockKind::IronBlock => false, + BlockKind::Bricks => false, + BlockKind::Tnt => true, + BlockKind::Bookshelf => false, + BlockKind::MossyCobblestone => false, + BlockKind::Obsidian => false, + BlockKind::Torch => true, + BlockKind::WallTorch => true, + BlockKind::Fire => true, + BlockKind::SoulFire => true, + BlockKind::Spawner => true, + BlockKind::OakStairs => true, + BlockKind::Chest => true, + BlockKind::RedstoneWire => true, + BlockKind::DiamondOre => false, + BlockKind::DiamondBlock => false, + BlockKind::CraftingTable => false, + BlockKind::Wheat => true, + BlockKind::Farmland => true, + BlockKind::Furnace => true, + BlockKind::OakSign => true, + BlockKind::SpruceSign => true, + BlockKind::BirchSign => true, + BlockKind::AcaciaSign => true, + BlockKind::JungleSign => true, + BlockKind::DarkOakSign => true, + BlockKind::OakDoor => true, + BlockKind::Ladder => true, + BlockKind::Rail => true, + BlockKind::CobblestoneStairs => true, + BlockKind::OakWallSign => true, + BlockKind::SpruceWallSign => true, + BlockKind::BirchWallSign => true, + BlockKind::AcaciaWallSign => true, + BlockKind::JungleWallSign => true, + BlockKind::DarkOakWallSign => true, + BlockKind::Lever => true, + BlockKind::StonePressurePlate => true, + BlockKind::IronDoor => true, + BlockKind::OakPressurePlate => true, + BlockKind::SprucePressurePlate => true, + BlockKind::BirchPressurePlate => true, + BlockKind::JunglePressurePlate => true, + BlockKind::AcaciaPressurePlate => true, + BlockKind::DarkOakPressurePlate => true, + BlockKind::RedstoneOre => true, + BlockKind::RedstoneTorch => true, + BlockKind::RedstoneWallTorch => true, + BlockKind::StoneButton => true, + BlockKind::Snow => false, + BlockKind::Ice => true, + BlockKind::SnowBlock => false, + BlockKind::Cactus => true, + BlockKind::Clay => false, + BlockKind::SugarCane => true, + BlockKind::Jukebox => false, + BlockKind::OakFence => true, + BlockKind::Pumpkin => true, + BlockKind::Netherrack => false, + BlockKind::SoulSand => false, + BlockKind::SoulSoil => false, + BlockKind::Basalt => false, + BlockKind::PolishedBasalt => false, + BlockKind::SoulTorch => true, + BlockKind::SoulWallTorch => true, + BlockKind::Glowstone => true, + BlockKind::NetherPortal => true, + BlockKind::CarvedPumpkin => true, + BlockKind::JackOLantern => true, + BlockKind::Cake => true, + BlockKind::Repeater => true, + BlockKind::WhiteStainedGlass => true, + BlockKind::OrangeStainedGlass => true, + BlockKind::MagentaStainedGlass => true, + BlockKind::LightBlueStainedGlass => true, + BlockKind::YellowStainedGlass => true, + BlockKind::LimeStainedGlass => true, + BlockKind::PinkStainedGlass => true, + BlockKind::GrayStainedGlass => true, + BlockKind::LightGrayStainedGlass => true, + BlockKind::CyanStainedGlass => true, + BlockKind::PurpleStainedGlass => true, + BlockKind::BlueStainedGlass => true, + BlockKind::BrownStainedGlass => true, + BlockKind::GreenStainedGlass => true, + BlockKind::RedStainedGlass => true, + BlockKind::BlackStainedGlass => true, + BlockKind::OakTrapdoor => true, + BlockKind::SpruceTrapdoor => true, + BlockKind::BirchTrapdoor => true, + BlockKind::JungleTrapdoor => true, + BlockKind::AcaciaTrapdoor => true, + BlockKind::DarkOakTrapdoor => true, + BlockKind::StoneBricks => false, + BlockKind::MossyStoneBricks => false, + BlockKind::CrackedStoneBricks => false, + BlockKind::ChiseledStoneBricks => false, + BlockKind::InfestedStone => false, + BlockKind::InfestedCobblestone => false, + BlockKind::InfestedStoneBricks => false, + BlockKind::InfestedMossyStoneBricks => false, + BlockKind::InfestedCrackedStoneBricks => false, + BlockKind::InfestedChiseledStoneBricks => false, + BlockKind::BrownMushroomBlock => false, + BlockKind::RedMushroomBlock => false, + BlockKind::MushroomStem => false, + BlockKind::IronBars => true, + BlockKind::Chain => true, + BlockKind::GlassPane => true, + BlockKind::Melon => true, + BlockKind::AttachedPumpkinStem => true, + BlockKind::AttachedMelonStem => true, + BlockKind::PumpkinStem => true, + BlockKind::MelonStem => true, + BlockKind::Vine => true, + BlockKind::OakFenceGate => true, + BlockKind::BrickStairs => true, + BlockKind::StoneBrickStairs => true, + BlockKind::Mycelium => false, + BlockKind::LilyPad => true, + BlockKind::NetherBricks => false, + BlockKind::NetherBrickFence => true, + BlockKind::NetherBrickStairs => true, + BlockKind::NetherWart => true, + BlockKind::EnchantingTable => true, + BlockKind::BrewingStand => true, + BlockKind::Cauldron => true, + BlockKind::EndPortal => true, + BlockKind::EndPortalFrame => true, + BlockKind::EndStone => false, + BlockKind::DragonEgg => true, + BlockKind::RedstoneLamp => true, + BlockKind::Cocoa => true, + BlockKind::SandstoneStairs => true, + BlockKind::EmeraldOre => false, + BlockKind::EnderChest => true, + BlockKind::TripwireHook => true, + BlockKind::Tripwire => true, + BlockKind::EmeraldBlock => false, + BlockKind::SpruceStairs => true, + BlockKind::BirchStairs => true, + BlockKind::JungleStairs => true, + BlockKind::CommandBlock => false, + BlockKind::Beacon => true, + BlockKind::CobblestoneWall => true, + BlockKind::MossyCobblestoneWall => true, + BlockKind::FlowerPot => true, + BlockKind::PottedOakSapling => true, + BlockKind::PottedSpruceSapling => true, + BlockKind::PottedBirchSapling => true, + BlockKind::PottedJungleSapling => true, + BlockKind::PottedAcaciaSapling => true, + BlockKind::PottedDarkOakSapling => true, + BlockKind::PottedFern => true, + BlockKind::PottedDandelion => true, + BlockKind::PottedPoppy => true, + BlockKind::PottedBlueOrchid => true, + BlockKind::PottedAllium => true, + BlockKind::PottedAzureBluet => true, + BlockKind::PottedRedTulip => true, + BlockKind::PottedOrangeTulip => true, + BlockKind::PottedWhiteTulip => true, + BlockKind::PottedPinkTulip => true, + BlockKind::PottedOxeyeDaisy => true, + BlockKind::PottedCornflower => true, + BlockKind::PottedLilyOfTheValley => true, + BlockKind::PottedWitherRose => true, + BlockKind::PottedRedMushroom => true, + BlockKind::PottedBrownMushroom => true, + BlockKind::PottedDeadBush => true, + BlockKind::PottedCactus => true, + BlockKind::Carrots => false, + BlockKind::Potatoes => false, + BlockKind::OakButton => true, + BlockKind::SpruceButton => true, + BlockKind::BirchButton => true, + BlockKind::JungleButton => true, + BlockKind::AcaciaButton => true, + BlockKind::DarkOakButton => true, + BlockKind::SkeletonSkull => true, + BlockKind::SkeletonWallSkull => true, + BlockKind::WitherSkeletonSkull => true, + BlockKind::WitherSkeletonWallSkull => true, + BlockKind::ZombieHead => true, + BlockKind::ZombieWallHead => true, + BlockKind::PlayerHead => true, + BlockKind::PlayerWallHead => true, + BlockKind::CreeperHead => true, + BlockKind::CreeperWallHead => true, + BlockKind::DragonHead => true, + BlockKind::DragonWallHead => true, + BlockKind::Anvil => true, + BlockKind::ChippedAnvil => true, + BlockKind::DamagedAnvil => true, + BlockKind::TrappedChest => true, + BlockKind::LightWeightedPressurePlate => true, + BlockKind::HeavyWeightedPressurePlate => true, + BlockKind::Comparator => true, + BlockKind::DaylightDetector => true, + BlockKind::RedstoneBlock => true, + BlockKind::NetherQuartzOre => false, + BlockKind::Hopper => true, + BlockKind::QuartzBlock => false, + BlockKind::ChiseledQuartzBlock => false, + BlockKind::QuartzPillar => false, + BlockKind::QuartzStairs => true, + BlockKind::ActivatorRail => true, + BlockKind::Dropper => false, + BlockKind::WhiteTerracotta => false, + BlockKind::OrangeTerracotta => false, + BlockKind::MagentaTerracotta => false, + BlockKind::LightBlueTerracotta => false, + BlockKind::YellowTerracotta => false, + BlockKind::LimeTerracotta => false, + BlockKind::PinkTerracotta => false, + BlockKind::GrayTerracotta => false, + BlockKind::LightGrayTerracotta => false, + BlockKind::CyanTerracotta => false, + BlockKind::PurpleTerracotta => false, + BlockKind::BlueTerracotta => false, + BlockKind::BrownTerracotta => false, + BlockKind::GreenTerracotta => false, + BlockKind::RedTerracotta => false, + BlockKind::BlackTerracotta => false, + BlockKind::WhiteStainedGlassPane => true, + BlockKind::OrangeStainedGlassPane => true, + BlockKind::MagentaStainedGlassPane => true, + BlockKind::LightBlueStainedGlassPane => true, + BlockKind::YellowStainedGlassPane => true, + BlockKind::LimeStainedGlassPane => true, + BlockKind::PinkStainedGlassPane => true, + BlockKind::GrayStainedGlassPane => true, + BlockKind::LightGrayStainedGlassPane => true, + BlockKind::CyanStainedGlassPane => true, + BlockKind::PurpleStainedGlassPane => true, + BlockKind::BlueStainedGlassPane => true, + BlockKind::BrownStainedGlassPane => true, + BlockKind::GreenStainedGlassPane => true, + BlockKind::RedStainedGlassPane => true, + BlockKind::BlackStainedGlassPane => true, + BlockKind::AcaciaStairs => true, + BlockKind::DarkOakStairs => true, + BlockKind::SlimeBlock => true, + BlockKind::Barrier => true, + BlockKind::IronTrapdoor => true, + BlockKind::Prismarine => false, + BlockKind::PrismarineBricks => false, + BlockKind::DarkPrismarine => false, + BlockKind::PrismarineStairs => true, + BlockKind::PrismarineBrickStairs => true, + BlockKind::DarkPrismarineStairs => true, + BlockKind::PrismarineSlab => true, + BlockKind::PrismarineBrickSlab => true, + BlockKind::DarkPrismarineSlab => true, + BlockKind::SeaLantern => true, + BlockKind::HayBlock => false, + BlockKind::WhiteCarpet => true, + BlockKind::OrangeCarpet => true, + BlockKind::MagentaCarpet => true, + BlockKind::LightBlueCarpet => true, + BlockKind::YellowCarpet => true, + BlockKind::LimeCarpet => true, + BlockKind::PinkCarpet => true, + BlockKind::GrayCarpet => true, + BlockKind::LightGrayCarpet => true, + BlockKind::CyanCarpet => true, + BlockKind::PurpleCarpet => true, + BlockKind::BlueCarpet => true, + BlockKind::BrownCarpet => true, + BlockKind::GreenCarpet => true, + BlockKind::RedCarpet => true, + BlockKind::BlackCarpet => true, + BlockKind::Terracotta => false, + BlockKind::CoalBlock => false, + BlockKind::PackedIce => false, + BlockKind::Sunflower => true, + BlockKind::Lilac => true, + BlockKind::RoseBush => true, + BlockKind::Peony => false, + BlockKind::TallGrass => true, + BlockKind::LargeFern => true, + BlockKind::WhiteBanner => true, + BlockKind::OrangeBanner => true, + BlockKind::MagentaBanner => true, + BlockKind::LightBlueBanner => true, + BlockKind::YellowBanner => true, + BlockKind::LimeBanner => true, + BlockKind::PinkBanner => true, + BlockKind::GrayBanner => true, + BlockKind::LightGrayBanner => true, + BlockKind::CyanBanner => true, + BlockKind::PurpleBanner => true, + BlockKind::BlueBanner => true, + BlockKind::BrownBanner => true, + BlockKind::GreenBanner => true, + BlockKind::RedBanner => true, + BlockKind::BlackBanner => true, + BlockKind::WhiteWallBanner => true, + BlockKind::OrangeWallBanner => true, + BlockKind::MagentaWallBanner => true, + BlockKind::LightBlueWallBanner => true, + BlockKind::YellowWallBanner => true, + BlockKind::LimeWallBanner => true, + BlockKind::PinkWallBanner => true, + BlockKind::GrayWallBanner => true, + BlockKind::LightGrayWallBanner => true, + BlockKind::CyanWallBanner => true, + BlockKind::PurpleWallBanner => true, + BlockKind::BlueWallBanner => true, + BlockKind::BrownWallBanner => true, + BlockKind::GreenWallBanner => true, + BlockKind::RedWallBanner => true, + BlockKind::BlackWallBanner => true, + BlockKind::RedSandstone => false, + BlockKind::ChiseledRedSandstone => false, + BlockKind::CutRedSandstone => false, + BlockKind::RedSandstoneStairs => true, + BlockKind::OakSlab => true, + BlockKind::SpruceSlab => true, + BlockKind::BirchSlab => true, + BlockKind::JungleSlab => true, + BlockKind::AcaciaSlab => true, + BlockKind::DarkOakSlab => true, + BlockKind::StoneSlab => true, + BlockKind::SmoothStoneSlab => true, + BlockKind::SandstoneSlab => true, + BlockKind::CutSandstoneSlab => true, + BlockKind::PetrifiedOakSlab => true, + BlockKind::CobblestoneSlab => true, + BlockKind::BrickSlab => true, + BlockKind::StoneBrickSlab => true, + BlockKind::NetherBrickSlab => true, + BlockKind::QuartzSlab => true, + BlockKind::RedSandstoneSlab => true, + BlockKind::CutRedSandstoneSlab => true, + BlockKind::PurpurSlab => true, + BlockKind::SmoothStone => false, + BlockKind::SmoothSandstone => false, + BlockKind::SmoothQuartz => false, + BlockKind::SmoothRedSandstone => false, + BlockKind::SpruceFenceGate => true, + BlockKind::BirchFenceGate => true, + BlockKind::JungleFenceGate => true, + BlockKind::AcaciaFenceGate => true, + BlockKind::DarkOakFenceGate => true, + BlockKind::SpruceFence => true, + BlockKind::BirchFence => true, + BlockKind::JungleFence => true, + BlockKind::AcaciaFence => true, + BlockKind::DarkOakFence => true, + BlockKind::SpruceDoor => true, + BlockKind::BirchDoor => true, + BlockKind::JungleDoor => true, + BlockKind::AcaciaDoor => true, + BlockKind::DarkOakDoor => true, + BlockKind::EndRod => false, + BlockKind::ChorusPlant => true, + BlockKind::ChorusFlower => true, + BlockKind::PurpurBlock => false, + BlockKind::PurpurPillar => false, + BlockKind::PurpurStairs => true, + BlockKind::EndStoneBricks => false, + BlockKind::Beetroots => true, + BlockKind::GrassPath => true, + BlockKind::EndGateway => false, + BlockKind::RepeatingCommandBlock => false, + BlockKind::ChainCommandBlock => false, + BlockKind::FrostedIce => true, + BlockKind::MagmaBlock => false, + BlockKind::NetherWartBlock => false, + BlockKind::RedNetherBricks => false, + BlockKind::BoneBlock => false, + BlockKind::StructureVoid => false, + BlockKind::Observer => true, + BlockKind::ShulkerBox => true, + BlockKind::WhiteShulkerBox => true, + BlockKind::OrangeShulkerBox => true, + BlockKind::MagentaShulkerBox => true, + BlockKind::LightBlueShulkerBox => true, + BlockKind::YellowShulkerBox => true, + BlockKind::LimeShulkerBox => true, + BlockKind::PinkShulkerBox => true, + BlockKind::GrayShulkerBox => true, + BlockKind::LightGrayShulkerBox => true, + BlockKind::CyanShulkerBox => true, + BlockKind::PurpleShulkerBox => true, + BlockKind::BlueShulkerBox => true, + BlockKind::BrownShulkerBox => true, + BlockKind::GreenShulkerBox => true, + BlockKind::RedShulkerBox => true, + BlockKind::BlackShulkerBox => true, + BlockKind::WhiteGlazedTerracotta => false, + BlockKind::OrangeGlazedTerracotta => false, + BlockKind::MagentaGlazedTerracotta => false, + BlockKind::LightBlueGlazedTerracotta => false, + BlockKind::YellowGlazedTerracotta => false, + BlockKind::LimeGlazedTerracotta => false, + BlockKind::PinkGlazedTerracotta => false, + BlockKind::GrayGlazedTerracotta => false, + BlockKind::LightGrayGlazedTerracotta => false, + BlockKind::CyanGlazedTerracotta => false, + BlockKind::PurpleGlazedTerracotta => false, + BlockKind::BlueGlazedTerracotta => false, + BlockKind::BrownGlazedTerracotta => false, + BlockKind::GreenGlazedTerracotta => false, + BlockKind::RedGlazedTerracotta => false, + BlockKind::BlackGlazedTerracotta => false, + BlockKind::WhiteConcrete => false, + BlockKind::OrangeConcrete => false, + BlockKind::MagentaConcrete => false, + BlockKind::LightBlueConcrete => false, + BlockKind::YellowConcrete => false, + BlockKind::LimeConcrete => false, + BlockKind::PinkConcrete => false, + BlockKind::GrayConcrete => false, + BlockKind::LightGrayConcrete => false, + BlockKind::CyanConcrete => false, + BlockKind::PurpleConcrete => false, + BlockKind::BlueConcrete => false, + BlockKind::BrownConcrete => false, + BlockKind::GreenConcrete => false, + BlockKind::RedConcrete => false, + BlockKind::BlackConcrete => false, + BlockKind::WhiteConcretePowder => false, + BlockKind::OrangeConcretePowder => false, + BlockKind::MagentaConcretePowder => false, + BlockKind::LightBlueConcretePowder => false, + BlockKind::YellowConcretePowder => false, + BlockKind::LimeConcretePowder => false, + BlockKind::PinkConcretePowder => false, + BlockKind::GrayConcretePowder => false, + BlockKind::LightGrayConcretePowder => false, + BlockKind::CyanConcretePowder => false, + BlockKind::PurpleConcretePowder => false, + BlockKind::BlueConcretePowder => false, + BlockKind::BrownConcretePowder => false, + BlockKind::GreenConcretePowder => false, + BlockKind::RedConcretePowder => false, + BlockKind::BlackConcretePowder => false, + BlockKind::Kelp => true, + BlockKind::KelpPlant => true, + BlockKind::DriedKelpBlock => false, + BlockKind::TurtleEgg => false, + BlockKind::DeadTubeCoralBlock => false, + BlockKind::DeadBrainCoralBlock => false, + BlockKind::DeadBubbleCoralBlock => false, + BlockKind::DeadFireCoralBlock => false, + BlockKind::DeadHornCoralBlock => false, + BlockKind::TubeCoralBlock => false, + BlockKind::BrainCoralBlock => false, + BlockKind::BubbleCoralBlock => false, + BlockKind::FireCoralBlock => false, + BlockKind::HornCoralBlock => false, + BlockKind::DeadTubeCoral => true, + BlockKind::DeadBrainCoral => true, + BlockKind::DeadBubbleCoral => true, + BlockKind::DeadFireCoral => true, + BlockKind::DeadHornCoral => true, + BlockKind::TubeCoral => true, + BlockKind::BrainCoral => true, + BlockKind::BubbleCoral => true, + BlockKind::FireCoral => true, + BlockKind::HornCoral => true, + BlockKind::DeadTubeCoralFan => true, + BlockKind::DeadBrainCoralFan => true, + BlockKind::DeadBubbleCoralFan => true, + BlockKind::DeadFireCoralFan => true, + BlockKind::DeadHornCoralFan => true, + BlockKind::TubeCoralFan => true, + BlockKind::BrainCoralFan => true, + BlockKind::BubbleCoralFan => true, + BlockKind::FireCoralFan => true, + BlockKind::HornCoralFan => true, + BlockKind::DeadTubeCoralWallFan => true, + BlockKind::DeadBrainCoralWallFan => true, + BlockKind::DeadBubbleCoralWallFan => true, + BlockKind::DeadFireCoralWallFan => true, + BlockKind::DeadHornCoralWallFan => true, + BlockKind::TubeCoralWallFan => true, + BlockKind::BrainCoralWallFan => true, + BlockKind::BubbleCoralWallFan => true, + BlockKind::FireCoralWallFan => true, + BlockKind::HornCoralWallFan => true, + BlockKind::SeaPickle => false, + BlockKind::BlueIce => false, + BlockKind::Conduit => false, + BlockKind::BambooSapling => false, + BlockKind::Bamboo => false, + BlockKind::PottedBamboo => true, + BlockKind::VoidAir => true, + BlockKind::CaveAir => true, + BlockKind::BubbleColumn => true, + BlockKind::PolishedGraniteStairs => true, + BlockKind::SmoothRedSandstoneStairs => true, + BlockKind::MossyStoneBrickStairs => true, + BlockKind::PolishedDioriteStairs => true, + BlockKind::MossyCobblestoneStairs => true, + BlockKind::EndStoneBrickStairs => true, + BlockKind::StoneStairs => true, + BlockKind::SmoothSandstoneStairs => true, + BlockKind::SmoothQuartzStairs => true, + BlockKind::GraniteStairs => true, + BlockKind::AndesiteStairs => true, + BlockKind::RedNetherBrickStairs => true, + BlockKind::PolishedAndesiteStairs => true, + BlockKind::DioriteStairs => true, + BlockKind::PolishedGraniteSlab => true, + BlockKind::SmoothRedSandstoneSlab => true, + BlockKind::MossyStoneBrickSlab => true, + BlockKind::PolishedDioriteSlab => true, + BlockKind::MossyCobblestoneSlab => true, + BlockKind::EndStoneBrickSlab => true, + BlockKind::SmoothSandstoneSlab => true, + BlockKind::SmoothQuartzSlab => true, + BlockKind::GraniteSlab => true, + BlockKind::AndesiteSlab => true, + BlockKind::RedNetherBrickSlab => true, + BlockKind::PolishedAndesiteSlab => true, + BlockKind::DioriteSlab => true, + BlockKind::BrickWall => true, + BlockKind::PrismarineWall => true, + BlockKind::RedSandstoneWall => true, + BlockKind::MossyStoneBrickWall => true, + BlockKind::GraniteWall => true, + BlockKind::StoneBrickWall => true, + BlockKind::NetherBrickWall => true, + BlockKind::AndesiteWall => true, + BlockKind::RedNetherBrickWall => true, + BlockKind::SandstoneWall => true, + BlockKind::EndStoneBrickWall => true, + BlockKind::DioriteWall => true, + BlockKind::Scaffolding => true, + BlockKind::Loom => false, + BlockKind::Barrel => true, + BlockKind::Smoker => true, + BlockKind::BlastFurnace => true, + BlockKind::CartographyTable => false, + BlockKind::FletchingTable => false, + BlockKind::Grindstone => true, + BlockKind::Lectern => false, + BlockKind::SmithingTable => false, + BlockKind::Stonecutter => false, + BlockKind::Bell => true, + BlockKind::Lantern => true, + BlockKind::SoulLantern => true, + BlockKind::Campfire => false, + BlockKind::SoulCampfire => false, + BlockKind::SweetBerryBush => true, + BlockKind::WarpedStem => false, + BlockKind::StrippedWarpedStem => false, + BlockKind::WarpedHyphae => false, + BlockKind::StrippedWarpedHyphae => false, + BlockKind::WarpedNylium => false, + BlockKind::WarpedFungus => true, + BlockKind::WarpedWartBlock => false, + BlockKind::WarpedRoots => true, + BlockKind::NetherSprouts => true, + BlockKind::CrimsonStem => false, + BlockKind::StrippedCrimsonStem => false, + BlockKind::CrimsonHyphae => false, + BlockKind::StrippedCrimsonHyphae => false, + BlockKind::CrimsonNylium => false, + BlockKind::CrimsonFungus => true, + BlockKind::Shroomlight => false, + BlockKind::WeepingVines => true, + BlockKind::WeepingVinesPlant => true, + BlockKind::TwistingVines => true, + BlockKind::TwistingVinesPlant => true, + BlockKind::CrimsonRoots => true, + BlockKind::CrimsonPlanks => false, + BlockKind::WarpedPlanks => false, + BlockKind::CrimsonSlab => true, + BlockKind::WarpedSlab => true, + BlockKind::CrimsonPressurePlate => true, + BlockKind::WarpedPressurePlate => true, + BlockKind::CrimsonFence => true, + BlockKind::WarpedFence => true, + BlockKind::CrimsonTrapdoor => true, + BlockKind::WarpedTrapdoor => true, + BlockKind::CrimsonFenceGate => true, + BlockKind::WarpedFenceGate => true, + BlockKind::CrimsonStairs => true, + BlockKind::WarpedStairs => true, + BlockKind::CrimsonButton => true, + BlockKind::WarpedButton => true, + BlockKind::CrimsonDoor => true, + BlockKind::WarpedDoor => true, + BlockKind::CrimsonSign => true, + BlockKind::WarpedSign => true, + BlockKind::CrimsonWallSign => true, + BlockKind::WarpedWallSign => true, + BlockKind::StructureBlock => false, + BlockKind::Jigsaw => false, + BlockKind::Composter => true, + BlockKind::Target => true, + BlockKind::BeeNest => false, + BlockKind::Beehive => false, + BlockKind::HoneyBlock => true, + BlockKind::HoneycombBlock => false, + BlockKind::NetheriteBlock => false, + BlockKind::AncientDebris => false, + BlockKind::CryingObsidian => false, + BlockKind::RespawnAnchor => false, + BlockKind::PottedCrimsonFungus => true, + BlockKind::PottedWarpedFungus => true, + BlockKind::PottedCrimsonRoots => true, + BlockKind::PottedWarpedRoots => true, + BlockKind::Lodestone => false, + BlockKind::Blackstone => false, + BlockKind::BlackstoneStairs => true, + BlockKind::BlackstoneWall => true, + BlockKind::BlackstoneSlab => true, + BlockKind::PolishedBlackstone => false, + BlockKind::PolishedBlackstoneBricks => false, + BlockKind::CrackedPolishedBlackstoneBricks => false, + BlockKind::ChiseledPolishedBlackstone => true, + BlockKind::PolishedBlackstoneBrickSlab => true, + BlockKind::PolishedBlackstoneBrickStairs => true, + BlockKind::PolishedBlackstoneBrickWall => true, + BlockKind::GildedBlackstone => false, + BlockKind::PolishedBlackstoneStairs => true, + BlockKind::PolishedBlackstoneSlab => true, + BlockKind::PolishedBlackstonePressurePlate => true, + BlockKind::PolishedBlackstoneButton => true, + BlockKind::PolishedBlackstoneWall => true, + BlockKind::ChiseledNetherBricks => false, + BlockKind::CrackedNetherBricks => false, + BlockKind::QuartzBricks => false, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `light_emission` property of this `BlockKind`. + pub fn light_emission(&self) -> u8 { + match self { + BlockKind::Air => 0, + BlockKind::Stone => 0, + BlockKind::Granite => 0, + BlockKind::PolishedGranite => 0, + BlockKind::Diorite => 0, + BlockKind::PolishedDiorite => 0, + BlockKind::Andesite => 0, + BlockKind::PolishedAndesite => 0, + BlockKind::GrassBlock => 0, + BlockKind::Dirt => 0, + BlockKind::CoarseDirt => 0, + BlockKind::Podzol => 0, + BlockKind::Cobblestone => 0, + BlockKind::OakPlanks => 0, + BlockKind::SprucePlanks => 0, + BlockKind::BirchPlanks => 0, + BlockKind::JunglePlanks => 0, + BlockKind::AcaciaPlanks => 0, + BlockKind::DarkOakPlanks => 0, + BlockKind::OakSapling => 0, + BlockKind::SpruceSapling => 0, + BlockKind::BirchSapling => 0, + BlockKind::JungleSapling => 0, + BlockKind::AcaciaSapling => 0, + BlockKind::DarkOakSapling => 0, + BlockKind::Bedrock => 0, + BlockKind::Water => 0, + BlockKind::Lava => 15, + BlockKind::Sand => 0, + BlockKind::RedSand => 0, + BlockKind::Gravel => 0, + BlockKind::GoldOre => 0, + BlockKind::IronOre => 0, + BlockKind::CoalOre => 0, + BlockKind::NetherGoldOre => 0, + BlockKind::OakLog => 0, + BlockKind::SpruceLog => 0, + BlockKind::BirchLog => 0, + BlockKind::JungleLog => 0, + BlockKind::AcaciaLog => 0, + BlockKind::DarkOakLog => 0, + BlockKind::StrippedSpruceLog => 0, + BlockKind::StrippedBirchLog => 0, + BlockKind::StrippedJungleLog => 0, + BlockKind::StrippedAcaciaLog => 0, + BlockKind::StrippedDarkOakLog => 0, + BlockKind::StrippedOakLog => 0, + BlockKind::OakWood => 0, + BlockKind::SpruceWood => 0, + BlockKind::BirchWood => 0, + BlockKind::JungleWood => 0, + BlockKind::AcaciaWood => 0, + BlockKind::DarkOakWood => 0, + BlockKind::StrippedOakWood => 0, + BlockKind::StrippedSpruceWood => 0, + BlockKind::StrippedBirchWood => 0, + BlockKind::StrippedJungleWood => 0, + BlockKind::StrippedAcaciaWood => 0, + BlockKind::StrippedDarkOakWood => 0, + BlockKind::OakLeaves => 0, + BlockKind::SpruceLeaves => 0, + BlockKind::BirchLeaves => 0, + BlockKind::JungleLeaves => 0, + BlockKind::AcaciaLeaves => 0, + BlockKind::DarkOakLeaves => 0, + BlockKind::Sponge => 0, + BlockKind::WetSponge => 0, + BlockKind::Glass => 0, + BlockKind::LapisOre => 0, + BlockKind::LapisBlock => 0, + BlockKind::Dispenser => 0, + BlockKind::Sandstone => 0, + BlockKind::ChiseledSandstone => 0, + BlockKind::CutSandstone => 0, + BlockKind::NoteBlock => 0, + BlockKind::WhiteBed => 0, + BlockKind::OrangeBed => 0, + BlockKind::MagentaBed => 0, + BlockKind::LightBlueBed => 0, + BlockKind::YellowBed => 0, + BlockKind::LimeBed => 0, + BlockKind::PinkBed => 0, + BlockKind::GrayBed => 0, + BlockKind::LightGrayBed => 0, + BlockKind::CyanBed => 0, + BlockKind::PurpleBed => 0, + BlockKind::BlueBed => 0, + BlockKind::BrownBed => 0, + BlockKind::GreenBed => 0, + BlockKind::RedBed => 0, + BlockKind::BlackBed => 0, + BlockKind::PoweredRail => 0, + BlockKind::DetectorRail => 0, + BlockKind::StickyPiston => 0, + BlockKind::Cobweb => 0, + BlockKind::Grass => 0, + BlockKind::Fern => 0, + BlockKind::DeadBush => 0, + BlockKind::Seagrass => 0, + BlockKind::TallSeagrass => 0, + BlockKind::Piston => 0, + BlockKind::PistonHead => 0, + BlockKind::WhiteWool => 0, + BlockKind::OrangeWool => 0, + BlockKind::MagentaWool => 0, + BlockKind::LightBlueWool => 0, + BlockKind::YellowWool => 0, + BlockKind::LimeWool => 0, + BlockKind::PinkWool => 0, + BlockKind::GrayWool => 0, + BlockKind::LightGrayWool => 0, + BlockKind::CyanWool => 0, + BlockKind::PurpleWool => 0, + BlockKind::BlueWool => 0, + BlockKind::BrownWool => 0, + BlockKind::GreenWool => 0, + BlockKind::RedWool => 0, + BlockKind::BlackWool => 0, + BlockKind::MovingPiston => 0, + BlockKind::Dandelion => 0, + BlockKind::Poppy => 0, + BlockKind::BlueOrchid => 0, + BlockKind::Allium => 0, + BlockKind::AzureBluet => 0, + BlockKind::RedTulip => 0, + BlockKind::OrangeTulip => 0, + BlockKind::WhiteTulip => 0, + BlockKind::PinkTulip => 0, + BlockKind::OxeyeDaisy => 0, + BlockKind::Cornflower => 0, + BlockKind::WitherRose => 0, + BlockKind::LilyOfTheValley => 0, + BlockKind::BrownMushroom => 1, + BlockKind::RedMushroom => 1, + BlockKind::GoldBlock => 0, + BlockKind::IronBlock => 0, + BlockKind::Bricks => 0, + BlockKind::Tnt => 0, + BlockKind::Bookshelf => 0, + BlockKind::MossyCobblestone => 0, + BlockKind::Obsidian => 0, + BlockKind::Torch => 14, + BlockKind::WallTorch => 14, + BlockKind::Fire => 15, + BlockKind::SoulFire => 0, + BlockKind::Spawner => 0, + BlockKind::OakStairs => 0, + BlockKind::Chest => 0, + BlockKind::RedstoneWire => 0, + BlockKind::DiamondOre => 0, + BlockKind::DiamondBlock => 0, + BlockKind::CraftingTable => 0, + BlockKind::Wheat => 0, + BlockKind::Farmland => 0, + BlockKind::Furnace => 13, + BlockKind::OakSign => 0, + BlockKind::SpruceSign => 0, + BlockKind::BirchSign => 0, + BlockKind::AcaciaSign => 0, + BlockKind::JungleSign => 0, + BlockKind::DarkOakSign => 0, + BlockKind::OakDoor => 0, + BlockKind::Ladder => 0, + BlockKind::Rail => 0, + BlockKind::CobblestoneStairs => 0, + BlockKind::OakWallSign => 0, + BlockKind::SpruceWallSign => 0, + BlockKind::BirchWallSign => 0, + BlockKind::AcaciaWallSign => 0, + BlockKind::JungleWallSign => 0, + BlockKind::DarkOakWallSign => 0, + BlockKind::Lever => 0, + BlockKind::StonePressurePlate => 0, + BlockKind::IronDoor => 0, + BlockKind::OakPressurePlate => 0, + BlockKind::SprucePressurePlate => 0, + BlockKind::BirchPressurePlate => 0, + BlockKind::JunglePressurePlate => 0, + BlockKind::AcaciaPressurePlate => 0, + BlockKind::DarkOakPressurePlate => 0, + BlockKind::RedstoneOre => 9, + BlockKind::RedstoneTorch => 7, + BlockKind::RedstoneWallTorch => 7, + BlockKind::StoneButton => 0, + BlockKind::Snow => 0, + BlockKind::Ice => 0, + BlockKind::SnowBlock => 0, + BlockKind::Cactus => 0, + BlockKind::Clay => 0, + BlockKind::SugarCane => 0, + BlockKind::Jukebox => 0, + BlockKind::OakFence => 0, + BlockKind::Pumpkin => 0, + BlockKind::Netherrack => 0, + BlockKind::SoulSand => 0, + BlockKind::SoulSoil => 0, + BlockKind::Basalt => 0, + BlockKind::PolishedBasalt => 0, + BlockKind::SoulTorch => 0, + BlockKind::SoulWallTorch => 0, + BlockKind::Glowstone => 15, + BlockKind::NetherPortal => 11, + BlockKind::CarvedPumpkin => 0, + BlockKind::JackOLantern => 15, + BlockKind::Cake => 0, + BlockKind::Repeater => 0, + BlockKind::WhiteStainedGlass => 0, + BlockKind::OrangeStainedGlass => 0, + BlockKind::MagentaStainedGlass => 0, + BlockKind::LightBlueStainedGlass => 0, + BlockKind::YellowStainedGlass => 0, + BlockKind::LimeStainedGlass => 0, + BlockKind::PinkStainedGlass => 0, + BlockKind::GrayStainedGlass => 0, + BlockKind::LightGrayStainedGlass => 0, + BlockKind::CyanStainedGlass => 0, + BlockKind::PurpleStainedGlass => 0, + BlockKind::BlueStainedGlass => 0, + BlockKind::BrownStainedGlass => 0, + BlockKind::GreenStainedGlass => 0, + BlockKind::RedStainedGlass => 0, + BlockKind::BlackStainedGlass => 0, + BlockKind::OakTrapdoor => 0, + BlockKind::SpruceTrapdoor => 0, + BlockKind::BirchTrapdoor => 0, + BlockKind::JungleTrapdoor => 0, + BlockKind::AcaciaTrapdoor => 0, + BlockKind::DarkOakTrapdoor => 0, + BlockKind::StoneBricks => 0, + BlockKind::MossyStoneBricks => 0, + BlockKind::CrackedStoneBricks => 0, + BlockKind::ChiseledStoneBricks => 0, + BlockKind::InfestedStone => 0, + BlockKind::InfestedCobblestone => 0, + BlockKind::InfestedStoneBricks => 0, + BlockKind::InfestedMossyStoneBricks => 0, + BlockKind::InfestedCrackedStoneBricks => 0, + BlockKind::InfestedChiseledStoneBricks => 0, + BlockKind::BrownMushroomBlock => 0, + BlockKind::RedMushroomBlock => 0, + BlockKind::MushroomStem => 0, + BlockKind::IronBars => 0, + BlockKind::Chain => 0, + BlockKind::GlassPane => 0, + BlockKind::Melon => 0, + BlockKind::AttachedPumpkinStem => 0, + BlockKind::AttachedMelonStem => 0, + BlockKind::PumpkinStem => 0, + BlockKind::MelonStem => 0, + BlockKind::Vine => 0, + BlockKind::OakFenceGate => 0, + BlockKind::BrickStairs => 0, + BlockKind::StoneBrickStairs => 0, + BlockKind::Mycelium => 0, + BlockKind::LilyPad => 0, + BlockKind::NetherBricks => 0, + BlockKind::NetherBrickFence => 0, + BlockKind::NetherBrickStairs => 0, + BlockKind::NetherWart => 0, + BlockKind::EnchantingTable => 0, + BlockKind::BrewingStand => 1, + BlockKind::Cauldron => 0, + BlockKind::EndPortal => 15, + BlockKind::EndPortalFrame => 1, + BlockKind::EndStone => 0, + BlockKind::DragonEgg => 0, + BlockKind::RedstoneLamp => 15, + BlockKind::Cocoa => 0, + BlockKind::SandstoneStairs => 0, + BlockKind::EmeraldOre => 0, + BlockKind::EnderChest => 0, + BlockKind::TripwireHook => 0, + BlockKind::Tripwire => 0, + BlockKind::EmeraldBlock => 0, + BlockKind::SpruceStairs => 0, + BlockKind::BirchStairs => 0, + BlockKind::JungleStairs => 0, + BlockKind::CommandBlock => 0, + BlockKind::Beacon => 15, + BlockKind::CobblestoneWall => 0, + BlockKind::MossyCobblestoneWall => 0, + BlockKind::FlowerPot => 0, + BlockKind::PottedOakSapling => 0, + BlockKind::PottedSpruceSapling => 0, + BlockKind::PottedBirchSapling => 0, + BlockKind::PottedJungleSapling => 0, + BlockKind::PottedAcaciaSapling => 0, + BlockKind::PottedDarkOakSapling => 0, + BlockKind::PottedFern => 0, + BlockKind::PottedDandelion => 0, + BlockKind::PottedPoppy => 0, + BlockKind::PottedBlueOrchid => 0, + BlockKind::PottedAllium => 0, + BlockKind::PottedAzureBluet => 0, + BlockKind::PottedRedTulip => 0, + BlockKind::PottedOrangeTulip => 0, + BlockKind::PottedWhiteTulip => 0, + BlockKind::PottedPinkTulip => 0, + BlockKind::PottedOxeyeDaisy => 0, + BlockKind::PottedCornflower => 0, + BlockKind::PottedLilyOfTheValley => 0, + BlockKind::PottedWitherRose => 0, + BlockKind::PottedRedMushroom => 0, + BlockKind::PottedBrownMushroom => 0, + BlockKind::PottedDeadBush => 0, + BlockKind::PottedCactus => 0, + BlockKind::Carrots => 0, + BlockKind::Potatoes => 0, + BlockKind::OakButton => 0, + BlockKind::SpruceButton => 0, + BlockKind::BirchButton => 0, + BlockKind::JungleButton => 0, + BlockKind::AcaciaButton => 0, + BlockKind::DarkOakButton => 0, + BlockKind::SkeletonSkull => 0, + BlockKind::SkeletonWallSkull => 0, + BlockKind::WitherSkeletonSkull => 0, + BlockKind::WitherSkeletonWallSkull => 0, + BlockKind::ZombieHead => 0, + BlockKind::ZombieWallHead => 0, + BlockKind::PlayerHead => 0, + BlockKind::PlayerWallHead => 0, + BlockKind::CreeperHead => 0, + BlockKind::CreeperWallHead => 0, + BlockKind::DragonHead => 0, + BlockKind::DragonWallHead => 0, + BlockKind::Anvil => 0, + BlockKind::ChippedAnvil => 0, + BlockKind::DamagedAnvil => 0, + BlockKind::TrappedChest => 0, + BlockKind::LightWeightedPressurePlate => 0, + BlockKind::HeavyWeightedPressurePlate => 0, + BlockKind::Comparator => 0, + BlockKind::DaylightDetector => 0, + BlockKind::RedstoneBlock => 0, + BlockKind::NetherQuartzOre => 0, + BlockKind::Hopper => 0, + BlockKind::QuartzBlock => 0, + BlockKind::ChiseledQuartzBlock => 0, + BlockKind::QuartzPillar => 0, + BlockKind::QuartzStairs => 0, + BlockKind::ActivatorRail => 0, + BlockKind::Dropper => 0, + BlockKind::WhiteTerracotta => 0, + BlockKind::OrangeTerracotta => 0, + BlockKind::MagentaTerracotta => 0, + BlockKind::LightBlueTerracotta => 0, + BlockKind::YellowTerracotta => 0, + BlockKind::LimeTerracotta => 0, + BlockKind::PinkTerracotta => 0, + BlockKind::GrayTerracotta => 0, + BlockKind::LightGrayTerracotta => 0, + BlockKind::CyanTerracotta => 0, + BlockKind::PurpleTerracotta => 0, + BlockKind::BlueTerracotta => 0, + BlockKind::BrownTerracotta => 0, + BlockKind::GreenTerracotta => 0, + BlockKind::RedTerracotta => 0, + BlockKind::BlackTerracotta => 0, + BlockKind::WhiteStainedGlassPane => 0, + BlockKind::OrangeStainedGlassPane => 0, + BlockKind::MagentaStainedGlassPane => 0, + BlockKind::LightBlueStainedGlassPane => 0, + BlockKind::YellowStainedGlassPane => 0, + BlockKind::LimeStainedGlassPane => 0, + BlockKind::PinkStainedGlassPane => 0, + BlockKind::GrayStainedGlassPane => 0, + BlockKind::LightGrayStainedGlassPane => 0, + BlockKind::CyanStainedGlassPane => 0, + BlockKind::PurpleStainedGlassPane => 0, + BlockKind::BlueStainedGlassPane => 0, + BlockKind::BrownStainedGlassPane => 0, + BlockKind::GreenStainedGlassPane => 0, + BlockKind::RedStainedGlassPane => 0, + BlockKind::BlackStainedGlassPane => 0, + BlockKind::AcaciaStairs => 0, + BlockKind::DarkOakStairs => 0, + BlockKind::SlimeBlock => 0, + BlockKind::Barrier => 0, + BlockKind::IronTrapdoor => 0, + BlockKind::Prismarine => 0, + BlockKind::PrismarineBricks => 0, + BlockKind::DarkPrismarine => 0, + BlockKind::PrismarineStairs => 0, + BlockKind::PrismarineBrickStairs => 0, + BlockKind::DarkPrismarineStairs => 0, + BlockKind::PrismarineSlab => 0, + BlockKind::PrismarineBrickSlab => 0, + BlockKind::DarkPrismarineSlab => 0, + BlockKind::SeaLantern => 15, + BlockKind::HayBlock => 0, + BlockKind::WhiteCarpet => 0, + BlockKind::OrangeCarpet => 0, + BlockKind::MagentaCarpet => 0, + BlockKind::LightBlueCarpet => 0, + BlockKind::YellowCarpet => 0, + BlockKind::LimeCarpet => 0, + BlockKind::PinkCarpet => 0, + BlockKind::GrayCarpet => 0, + BlockKind::LightGrayCarpet => 0, + BlockKind::CyanCarpet => 0, + BlockKind::PurpleCarpet => 0, + BlockKind::BlueCarpet => 0, + BlockKind::BrownCarpet => 0, + BlockKind::GreenCarpet => 0, + BlockKind::RedCarpet => 0, + BlockKind::BlackCarpet => 0, + BlockKind::Terracotta => 0, + BlockKind::CoalBlock => 0, + BlockKind::PackedIce => 0, + BlockKind::Sunflower => 0, + BlockKind::Lilac => 0, + BlockKind::RoseBush => 0, + BlockKind::Peony => 0, + BlockKind::TallGrass => 0, + BlockKind::LargeFern => 0, + BlockKind::WhiteBanner => 0, + BlockKind::OrangeBanner => 0, + BlockKind::MagentaBanner => 0, + BlockKind::LightBlueBanner => 0, + BlockKind::YellowBanner => 0, + BlockKind::LimeBanner => 0, + BlockKind::PinkBanner => 0, + BlockKind::GrayBanner => 0, + BlockKind::LightGrayBanner => 0, + BlockKind::CyanBanner => 0, + BlockKind::PurpleBanner => 0, + BlockKind::BlueBanner => 0, + BlockKind::BrownBanner => 0, + BlockKind::GreenBanner => 0, + BlockKind::RedBanner => 0, + BlockKind::BlackBanner => 0, + BlockKind::WhiteWallBanner => 0, + BlockKind::OrangeWallBanner => 0, + BlockKind::MagentaWallBanner => 0, + BlockKind::LightBlueWallBanner => 0, + BlockKind::YellowWallBanner => 0, + BlockKind::LimeWallBanner => 0, + BlockKind::PinkWallBanner => 0, + BlockKind::GrayWallBanner => 0, + BlockKind::LightGrayWallBanner => 0, + BlockKind::CyanWallBanner => 0, + BlockKind::PurpleWallBanner => 0, + BlockKind::BlueWallBanner => 0, + BlockKind::BrownWallBanner => 0, + BlockKind::GreenWallBanner => 0, + BlockKind::RedWallBanner => 0, + BlockKind::BlackWallBanner => 0, + BlockKind::RedSandstone => 0, + BlockKind::ChiseledRedSandstone => 0, + BlockKind::CutRedSandstone => 0, + BlockKind::RedSandstoneStairs => 0, + BlockKind::OakSlab => 0, + BlockKind::SpruceSlab => 0, + BlockKind::BirchSlab => 0, + BlockKind::JungleSlab => 0, + BlockKind::AcaciaSlab => 0, + BlockKind::DarkOakSlab => 0, + BlockKind::StoneSlab => 0, + BlockKind::SmoothStoneSlab => 0, + BlockKind::SandstoneSlab => 0, + BlockKind::CutSandstoneSlab => 0, + BlockKind::PetrifiedOakSlab => 0, + BlockKind::CobblestoneSlab => 0, + BlockKind::BrickSlab => 0, + BlockKind::StoneBrickSlab => 0, + BlockKind::NetherBrickSlab => 0, + BlockKind::QuartzSlab => 0, + BlockKind::RedSandstoneSlab => 0, + BlockKind::CutRedSandstoneSlab => 0, + BlockKind::PurpurSlab => 0, + BlockKind::SmoothStone => 0, + BlockKind::SmoothSandstone => 0, + BlockKind::SmoothQuartz => 0, + BlockKind::SmoothRedSandstone => 0, + BlockKind::SpruceFenceGate => 0, + BlockKind::BirchFenceGate => 0, + BlockKind::JungleFenceGate => 0, + BlockKind::AcaciaFenceGate => 0, + BlockKind::DarkOakFenceGate => 0, + BlockKind::SpruceFence => 0, + BlockKind::BirchFence => 0, + BlockKind::JungleFence => 0, + BlockKind::AcaciaFence => 0, + BlockKind::DarkOakFence => 0, + BlockKind::SpruceDoor => 0, + BlockKind::BirchDoor => 0, + BlockKind::JungleDoor => 0, + BlockKind::AcaciaDoor => 0, + BlockKind::DarkOakDoor => 0, + BlockKind::EndRod => 14, + BlockKind::ChorusPlant => 0, + BlockKind::ChorusFlower => 0, + BlockKind::PurpurBlock => 0, + BlockKind::PurpurPillar => 0, + BlockKind::PurpurStairs => 0, + BlockKind::EndStoneBricks => 0, + BlockKind::Beetroots => 0, + BlockKind::GrassPath => 0, + BlockKind::EndGateway => 15, + BlockKind::RepeatingCommandBlock => 0, + BlockKind::ChainCommandBlock => 0, + BlockKind::FrostedIce => 0, + BlockKind::MagmaBlock => 0, + BlockKind::NetherWartBlock => 0, + BlockKind::RedNetherBricks => 0, + BlockKind::BoneBlock => 0, + BlockKind::StructureVoid => 0, + BlockKind::Observer => 0, + BlockKind::ShulkerBox => 0, + BlockKind::WhiteShulkerBox => 0, + BlockKind::OrangeShulkerBox => 0, + BlockKind::MagentaShulkerBox => 0, + BlockKind::LightBlueShulkerBox => 0, + BlockKind::YellowShulkerBox => 0, + BlockKind::LimeShulkerBox => 0, + BlockKind::PinkShulkerBox => 0, + BlockKind::GrayShulkerBox => 0, + BlockKind::LightGrayShulkerBox => 0, + BlockKind::CyanShulkerBox => 0, + BlockKind::PurpleShulkerBox => 0, + BlockKind::BlueShulkerBox => 0, + BlockKind::BrownShulkerBox => 0, + BlockKind::GreenShulkerBox => 0, + BlockKind::RedShulkerBox => 0, + BlockKind::BlackShulkerBox => 0, + BlockKind::WhiteGlazedTerracotta => 0, + BlockKind::OrangeGlazedTerracotta => 0, + BlockKind::MagentaGlazedTerracotta => 0, + BlockKind::LightBlueGlazedTerracotta => 0, + BlockKind::YellowGlazedTerracotta => 0, + BlockKind::LimeGlazedTerracotta => 0, + BlockKind::PinkGlazedTerracotta => 0, + BlockKind::GrayGlazedTerracotta => 0, + BlockKind::LightGrayGlazedTerracotta => 0, + BlockKind::CyanGlazedTerracotta => 0, + BlockKind::PurpleGlazedTerracotta => 0, + BlockKind::BlueGlazedTerracotta => 0, + BlockKind::BrownGlazedTerracotta => 0, + BlockKind::GreenGlazedTerracotta => 0, + BlockKind::RedGlazedTerracotta => 0, + BlockKind::BlackGlazedTerracotta => 0, + BlockKind::WhiteConcrete => 0, + BlockKind::OrangeConcrete => 0, + BlockKind::MagentaConcrete => 0, + BlockKind::LightBlueConcrete => 0, + BlockKind::YellowConcrete => 0, + BlockKind::LimeConcrete => 0, + BlockKind::PinkConcrete => 0, + BlockKind::GrayConcrete => 0, + BlockKind::LightGrayConcrete => 0, + BlockKind::CyanConcrete => 0, + BlockKind::PurpleConcrete => 0, + BlockKind::BlueConcrete => 0, + BlockKind::BrownConcrete => 0, + BlockKind::GreenConcrete => 0, + BlockKind::RedConcrete => 0, + BlockKind::BlackConcrete => 0, + BlockKind::WhiteConcretePowder => 0, + BlockKind::OrangeConcretePowder => 0, + BlockKind::MagentaConcretePowder => 0, + BlockKind::LightBlueConcretePowder => 0, + BlockKind::YellowConcretePowder => 0, + BlockKind::LimeConcretePowder => 0, + BlockKind::PinkConcretePowder => 0, + BlockKind::GrayConcretePowder => 0, + BlockKind::LightGrayConcretePowder => 0, + BlockKind::CyanConcretePowder => 0, + BlockKind::PurpleConcretePowder => 0, + BlockKind::BlueConcretePowder => 0, + BlockKind::BrownConcretePowder => 0, + BlockKind::GreenConcretePowder => 0, + BlockKind::RedConcretePowder => 0, + BlockKind::BlackConcretePowder => 0, + BlockKind::Kelp => 0, + BlockKind::KelpPlant => 0, + BlockKind::DriedKelpBlock => 0, + BlockKind::TurtleEgg => 0, + BlockKind::DeadTubeCoralBlock => 0, + BlockKind::DeadBrainCoralBlock => 0, + BlockKind::DeadBubbleCoralBlock => 0, + BlockKind::DeadFireCoralBlock => 0, + BlockKind::DeadHornCoralBlock => 0, + BlockKind::TubeCoralBlock => 0, + BlockKind::BrainCoralBlock => 0, + BlockKind::BubbleCoralBlock => 0, + BlockKind::FireCoralBlock => 0, + BlockKind::HornCoralBlock => 0, + BlockKind::DeadTubeCoral => 0, + BlockKind::DeadBrainCoral => 0, + BlockKind::DeadBubbleCoral => 0, + BlockKind::DeadFireCoral => 0, + BlockKind::DeadHornCoral => 0, + BlockKind::TubeCoral => 0, + BlockKind::BrainCoral => 0, + BlockKind::BubbleCoral => 0, + BlockKind::FireCoral => 0, + BlockKind::HornCoral => 0, + BlockKind::DeadTubeCoralFan => 0, + BlockKind::DeadBrainCoralFan => 0, + BlockKind::DeadBubbleCoralFan => 0, + BlockKind::DeadFireCoralFan => 0, + BlockKind::DeadHornCoralFan => 0, + BlockKind::TubeCoralFan => 0, + BlockKind::BrainCoralFan => 0, + BlockKind::BubbleCoralFan => 0, + BlockKind::FireCoralFan => 0, + BlockKind::HornCoralFan => 0, + BlockKind::DeadTubeCoralWallFan => 0, + BlockKind::DeadBrainCoralWallFan => 0, + BlockKind::DeadBubbleCoralWallFan => 0, + BlockKind::DeadFireCoralWallFan => 0, + BlockKind::DeadHornCoralWallFan => 0, + BlockKind::TubeCoralWallFan => 0, + BlockKind::BrainCoralWallFan => 0, + BlockKind::BubbleCoralWallFan => 0, + BlockKind::FireCoralWallFan => 0, + BlockKind::HornCoralWallFan => 0, + BlockKind::SeaPickle => 0, + BlockKind::BlueIce => 0, + BlockKind::Conduit => 0, + BlockKind::BambooSapling => 0, + BlockKind::Bamboo => 0, + BlockKind::PottedBamboo => 0, + BlockKind::VoidAir => 0, + BlockKind::CaveAir => 0, + BlockKind::BubbleColumn => 0, + BlockKind::PolishedGraniteStairs => 0, + BlockKind::SmoothRedSandstoneStairs => 0, + BlockKind::MossyStoneBrickStairs => 0, + BlockKind::PolishedDioriteStairs => 0, + BlockKind::MossyCobblestoneStairs => 0, + BlockKind::EndStoneBrickStairs => 0, + BlockKind::StoneStairs => 0, + BlockKind::SmoothSandstoneStairs => 0, + BlockKind::SmoothQuartzStairs => 0, + BlockKind::GraniteStairs => 0, + BlockKind::AndesiteStairs => 0, + BlockKind::RedNetherBrickStairs => 0, + BlockKind::PolishedAndesiteStairs => 0, + BlockKind::DioriteStairs => 0, + BlockKind::PolishedGraniteSlab => 0, + BlockKind::SmoothRedSandstoneSlab => 0, + BlockKind::MossyStoneBrickSlab => 0, + BlockKind::PolishedDioriteSlab => 0, + BlockKind::MossyCobblestoneSlab => 0, + BlockKind::EndStoneBrickSlab => 0, + BlockKind::SmoothSandstoneSlab => 0, + BlockKind::SmoothQuartzSlab => 0, + BlockKind::GraniteSlab => 0, + BlockKind::AndesiteSlab => 0, + BlockKind::RedNetherBrickSlab => 0, + BlockKind::PolishedAndesiteSlab => 0, + BlockKind::DioriteSlab => 0, + BlockKind::BrickWall => 0, + BlockKind::PrismarineWall => 0, + BlockKind::RedSandstoneWall => 0, + BlockKind::MossyStoneBrickWall => 0, + BlockKind::GraniteWall => 0, + BlockKind::StoneBrickWall => 0, + BlockKind::NetherBrickWall => 0, + BlockKind::AndesiteWall => 0, + BlockKind::RedNetherBrickWall => 0, + BlockKind::SandstoneWall => 0, + BlockKind::EndStoneBrickWall => 0, + BlockKind::DioriteWall => 0, + BlockKind::Scaffolding => 0, + BlockKind::Loom => 0, + BlockKind::Barrel => 0, + BlockKind::Smoker => 0, + BlockKind::BlastFurnace => 0, + BlockKind::CartographyTable => 0, + BlockKind::FletchingTable => 0, + BlockKind::Grindstone => 0, + BlockKind::Lectern => 0, + BlockKind::SmithingTable => 0, + BlockKind::Stonecutter => 0, + BlockKind::Bell => 0, + BlockKind::Lantern => 0, + BlockKind::SoulLantern => 0, + BlockKind::Campfire => 0, + BlockKind::SoulCampfire => 0, + BlockKind::SweetBerryBush => 0, + BlockKind::WarpedStem => 0, + BlockKind::StrippedWarpedStem => 0, + BlockKind::WarpedHyphae => 0, + BlockKind::StrippedWarpedHyphae => 0, + BlockKind::WarpedNylium => 0, + BlockKind::WarpedFungus => 0, + BlockKind::WarpedWartBlock => 0, + BlockKind::WarpedRoots => 0, + BlockKind::NetherSprouts => 0, + BlockKind::CrimsonStem => 0, + BlockKind::StrippedCrimsonStem => 0, + BlockKind::CrimsonHyphae => 0, + BlockKind::StrippedCrimsonHyphae => 0, + BlockKind::CrimsonNylium => 0, + BlockKind::CrimsonFungus => 0, + BlockKind::Shroomlight => 0, + BlockKind::WeepingVines => 0, + BlockKind::WeepingVinesPlant => 0, + BlockKind::TwistingVines => 0, + BlockKind::TwistingVinesPlant => 0, + BlockKind::CrimsonRoots => 0, + BlockKind::CrimsonPlanks => 0, + BlockKind::WarpedPlanks => 0, + BlockKind::CrimsonSlab => 0, + BlockKind::WarpedSlab => 0, + BlockKind::CrimsonPressurePlate => 0, + BlockKind::WarpedPressurePlate => 0, + BlockKind::CrimsonFence => 0, + BlockKind::WarpedFence => 0, + BlockKind::CrimsonTrapdoor => 0, + BlockKind::WarpedTrapdoor => 0, + BlockKind::CrimsonFenceGate => 0, + BlockKind::WarpedFenceGate => 0, + BlockKind::CrimsonStairs => 0, + BlockKind::WarpedStairs => 0, + BlockKind::CrimsonButton => 0, + BlockKind::WarpedButton => 0, + BlockKind::CrimsonDoor => 0, + BlockKind::WarpedDoor => 0, + BlockKind::CrimsonSign => 0, + BlockKind::WarpedSign => 0, + BlockKind::CrimsonWallSign => 0, + BlockKind::WarpedWallSign => 0, + BlockKind::StructureBlock => 0, + BlockKind::Jigsaw => 0, + BlockKind::Composter => 0, + BlockKind::Target => 0, + BlockKind::BeeNest => 0, + BlockKind::Beehive => 0, + BlockKind::HoneyBlock => 0, + BlockKind::HoneycombBlock => 0, + BlockKind::NetheriteBlock => 0, + BlockKind::AncientDebris => 0, + BlockKind::CryingObsidian => 0, + BlockKind::RespawnAnchor => 2, + BlockKind::PottedCrimsonFungus => 0, + BlockKind::PottedWarpedFungus => 0, + BlockKind::PottedCrimsonRoots => 0, + BlockKind::PottedWarpedRoots => 0, + BlockKind::Lodestone => 0, + BlockKind::Blackstone => 0, + BlockKind::BlackstoneStairs => 0, + BlockKind::BlackstoneWall => 0, + BlockKind::BlackstoneSlab => 0, + BlockKind::PolishedBlackstone => 0, + BlockKind::PolishedBlackstoneBricks => 0, + BlockKind::CrackedPolishedBlackstoneBricks => 0, + BlockKind::ChiseledPolishedBlackstone => 0, + BlockKind::PolishedBlackstoneBrickSlab => 0, + BlockKind::PolishedBlackstoneBrickStairs => 0, + BlockKind::PolishedBlackstoneBrickWall => 0, + BlockKind::GildedBlackstone => 0, + BlockKind::PolishedBlackstoneStairs => 0, + BlockKind::PolishedBlackstoneSlab => 0, + BlockKind::PolishedBlackstonePressurePlate => 0, + BlockKind::PolishedBlackstoneButton => 0, + BlockKind::PolishedBlackstoneWall => 0, + BlockKind::ChiseledNetherBricks => 0, + BlockKind::CrackedNetherBricks => 0, + BlockKind::QuartzBricks => 0, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `light_filter` property of this `BlockKind`. + pub fn light_filter(&self) -> u8 { + match self { + BlockKind::Air => 0, + BlockKind::Stone => 15, + BlockKind::Granite => 15, + BlockKind::PolishedGranite => 15, + BlockKind::Diorite => 15, + BlockKind::PolishedDiorite => 15, + BlockKind::Andesite => 15, + BlockKind::PolishedAndesite => 15, + BlockKind::GrassBlock => 15, + BlockKind::Dirt => 15, + BlockKind::CoarseDirt => 15, + BlockKind::Podzol => 15, + BlockKind::Cobblestone => 15, + BlockKind::OakPlanks => 15, + BlockKind::SprucePlanks => 15, + BlockKind::BirchPlanks => 15, + BlockKind::JunglePlanks => 15, + BlockKind::AcaciaPlanks => 15, + BlockKind::DarkOakPlanks => 15, + BlockKind::OakSapling => 0, + BlockKind::SpruceSapling => 0, + BlockKind::BirchSapling => 0, + BlockKind::JungleSapling => 0, + BlockKind::AcaciaSapling => 0, + BlockKind::DarkOakSapling => 0, + BlockKind::Bedrock => 15, + BlockKind::Water => 2, + BlockKind::Lava => 0, + BlockKind::Sand => 15, + BlockKind::RedSand => 15, + BlockKind::Gravel => 15, + BlockKind::GoldOre => 15, + BlockKind::IronOre => 15, + BlockKind::CoalOre => 15, + BlockKind::NetherGoldOre => 15, + BlockKind::OakLog => 15, + BlockKind::SpruceLog => 15, + BlockKind::BirchLog => 15, + BlockKind::JungleLog => 15, + BlockKind::AcaciaLog => 15, + BlockKind::DarkOakLog => 15, + BlockKind::StrippedSpruceLog => 15, + BlockKind::StrippedBirchLog => 15, + BlockKind::StrippedJungleLog => 15, + BlockKind::StrippedAcaciaLog => 15, + BlockKind::StrippedDarkOakLog => 15, + BlockKind::StrippedOakLog => 15, + BlockKind::OakWood => 15, + BlockKind::SpruceWood => 15, + BlockKind::BirchWood => 15, + BlockKind::JungleWood => 15, + BlockKind::AcaciaWood => 15, + BlockKind::DarkOakWood => 15, + BlockKind::StrippedOakWood => 15, + BlockKind::StrippedSpruceWood => 15, + BlockKind::StrippedBirchWood => 15, + BlockKind::StrippedJungleWood => 15, + BlockKind::StrippedAcaciaWood => 15, + BlockKind::StrippedDarkOakWood => 15, + BlockKind::OakLeaves => 0, + BlockKind::SpruceLeaves => 0, + BlockKind::BirchLeaves => 0, + BlockKind::JungleLeaves => 0, + BlockKind::AcaciaLeaves => 0, + BlockKind::DarkOakLeaves => 0, + BlockKind::Sponge => 15, + BlockKind::WetSponge => 15, + BlockKind::Glass => 0, + BlockKind::LapisOre => 15, + BlockKind::LapisBlock => 15, + BlockKind::Dispenser => 15, + BlockKind::Sandstone => 15, + BlockKind::ChiseledSandstone => 15, + BlockKind::CutSandstone => 15, + BlockKind::NoteBlock => 15, + BlockKind::WhiteBed => 0, + BlockKind::OrangeBed => 0, + BlockKind::MagentaBed => 0, + BlockKind::LightBlueBed => 0, + BlockKind::YellowBed => 0, + BlockKind::LimeBed => 0, + BlockKind::PinkBed => 0, + BlockKind::GrayBed => 0, + BlockKind::LightGrayBed => 0, + BlockKind::CyanBed => 0, + BlockKind::PurpleBed => 0, + BlockKind::BlueBed => 0, + BlockKind::BrownBed => 0, + BlockKind::GreenBed => 0, + BlockKind::RedBed => 0, + BlockKind::BlackBed => 0, + BlockKind::PoweredRail => 0, + BlockKind::DetectorRail => 0, + BlockKind::StickyPiston => 0, + BlockKind::Cobweb => 0, + BlockKind::Grass => 15, + BlockKind::Fern => 0, + BlockKind::DeadBush => 0, + BlockKind::Seagrass => 0, + BlockKind::TallSeagrass => 0, + BlockKind::Piston => 0, + BlockKind::PistonHead => 0, + BlockKind::WhiteWool => 15, + BlockKind::OrangeWool => 15, + BlockKind::MagentaWool => 15, + BlockKind::LightBlueWool => 15, + BlockKind::YellowWool => 15, + BlockKind::LimeWool => 15, + BlockKind::PinkWool => 15, + BlockKind::GrayWool => 15, + BlockKind::LightGrayWool => 15, + BlockKind::CyanWool => 15, + BlockKind::PurpleWool => 15, + BlockKind::BlueWool => 15, + BlockKind::BrownWool => 15, + BlockKind::GreenWool => 15, + BlockKind::RedWool => 15, + BlockKind::BlackWool => 15, + BlockKind::MovingPiston => 0, + BlockKind::Dandelion => 15, + BlockKind::Poppy => 15, + BlockKind::BlueOrchid => 0, + BlockKind::Allium => 15, + BlockKind::AzureBluet => 15, + BlockKind::RedTulip => 0, + BlockKind::OrangeTulip => 0, + BlockKind::WhiteTulip => 0, + BlockKind::PinkTulip => 0, + BlockKind::OxeyeDaisy => 15, + BlockKind::Cornflower => 0, + BlockKind::WitherRose => 0, + BlockKind::LilyOfTheValley => 0, + BlockKind::BrownMushroom => 15, + BlockKind::RedMushroom => 15, + BlockKind::GoldBlock => 15, + BlockKind::IronBlock => 15, + BlockKind::Bricks => 15, + BlockKind::Tnt => 0, + BlockKind::Bookshelf => 15, + BlockKind::MossyCobblestone => 15, + BlockKind::Obsidian => 15, + BlockKind::Torch => 0, + BlockKind::WallTorch => 0, + BlockKind::Fire => 0, + BlockKind::SoulFire => 15, + BlockKind::Spawner => 0, + BlockKind::OakStairs => 15, + BlockKind::Chest => 0, + BlockKind::RedstoneWire => 0, + BlockKind::DiamondOre => 15, + BlockKind::DiamondBlock => 15, + BlockKind::CraftingTable => 15, + BlockKind::Wheat => 0, + BlockKind::Farmland => 0, + BlockKind::Furnace => 0, + BlockKind::OakSign => 0, + BlockKind::SpruceSign => 0, + BlockKind::BirchSign => 0, + BlockKind::AcaciaSign => 0, + BlockKind::JungleSign => 0, + BlockKind::DarkOakSign => 0, + BlockKind::OakDoor => 0, + BlockKind::Ladder => 0, + BlockKind::Rail => 0, + BlockKind::CobblestoneStairs => 15, + BlockKind::OakWallSign => 0, + BlockKind::SpruceWallSign => 0, + BlockKind::BirchWallSign => 0, + BlockKind::AcaciaWallSign => 0, + BlockKind::JungleWallSign => 0, + BlockKind::DarkOakWallSign => 0, + BlockKind::Lever => 0, + BlockKind::StonePressurePlate => 0, + BlockKind::IronDoor => 0, + BlockKind::OakPressurePlate => 0, + BlockKind::SprucePressurePlate => 0, + BlockKind::BirchPressurePlate => 0, + BlockKind::JunglePressurePlate => 0, + BlockKind::AcaciaPressurePlate => 0, + BlockKind::DarkOakPressurePlate => 0, + BlockKind::RedstoneOre => 0, + BlockKind::RedstoneTorch => 0, + BlockKind::RedstoneWallTorch => 0, + BlockKind::StoneButton => 0, + BlockKind::Snow => 15, + BlockKind::Ice => 0, + BlockKind::SnowBlock => 15, + BlockKind::Cactus => 0, + BlockKind::Clay => 15, + BlockKind::SugarCane => 0, + BlockKind::Jukebox => 15, + BlockKind::OakFence => 0, + BlockKind::Pumpkin => 15, + BlockKind::Netherrack => 15, + BlockKind::SoulSand => 15, + BlockKind::SoulSoil => 15, + BlockKind::Basalt => 15, + BlockKind::PolishedBasalt => 15, + BlockKind::SoulTorch => 0, + BlockKind::SoulWallTorch => 0, + BlockKind::Glowstone => 0, + BlockKind::NetherPortal => 0, + BlockKind::CarvedPumpkin => 15, + BlockKind::JackOLantern => 15, + BlockKind::Cake => 0, + BlockKind::Repeater => 0, + BlockKind::WhiteStainedGlass => 0, + BlockKind::OrangeStainedGlass => 0, + BlockKind::MagentaStainedGlass => 0, + BlockKind::LightBlueStainedGlass => 0, + BlockKind::YellowStainedGlass => 0, + BlockKind::LimeStainedGlass => 0, + BlockKind::PinkStainedGlass => 0, + BlockKind::GrayStainedGlass => 0, + BlockKind::LightGrayStainedGlass => 0, + BlockKind::CyanStainedGlass => 0, + BlockKind::PurpleStainedGlass => 0, + BlockKind::BlueStainedGlass => 0, + BlockKind::BrownStainedGlass => 0, + BlockKind::GreenStainedGlass => 0, + BlockKind::RedStainedGlass => 0, + BlockKind::BlackStainedGlass => 0, + BlockKind::OakTrapdoor => 0, + BlockKind::SpruceTrapdoor => 0, + BlockKind::BirchTrapdoor => 0, + BlockKind::JungleTrapdoor => 0, + BlockKind::AcaciaTrapdoor => 0, + BlockKind::DarkOakTrapdoor => 0, + BlockKind::StoneBricks => 15, + BlockKind::MossyStoneBricks => 15, + BlockKind::CrackedStoneBricks => 15, + BlockKind::ChiseledStoneBricks => 15, + BlockKind::InfestedStone => 15, + BlockKind::InfestedCobblestone => 15, + BlockKind::InfestedStoneBricks => 15, + BlockKind::InfestedMossyStoneBricks => 15, + BlockKind::InfestedCrackedStoneBricks => 15, + BlockKind::InfestedChiseledStoneBricks => 15, + BlockKind::BrownMushroomBlock => 15, + BlockKind::RedMushroomBlock => 15, + BlockKind::MushroomStem => 15, + BlockKind::IronBars => 0, + BlockKind::Chain => 0, + BlockKind::GlassPane => 0, + BlockKind::Melon => 15, + BlockKind::AttachedPumpkinStem => 0, + BlockKind::AttachedMelonStem => 0, + BlockKind::PumpkinStem => 0, + BlockKind::MelonStem => 0, + BlockKind::Vine => 0, + BlockKind::OakFenceGate => 0, + BlockKind::BrickStairs => 15, + BlockKind::StoneBrickStairs => 15, + BlockKind::Mycelium => 15, + BlockKind::LilyPad => 0, + BlockKind::NetherBricks => 15, + BlockKind::NetherBrickFence => 0, + BlockKind::NetherBrickStairs => 15, + BlockKind::NetherWart => 0, + BlockKind::EnchantingTable => 0, + BlockKind::BrewingStand => 0, + BlockKind::Cauldron => 0, + BlockKind::EndPortal => 0, + BlockKind::EndPortalFrame => 0, + BlockKind::EndStone => 15, + BlockKind::DragonEgg => 0, + BlockKind::RedstoneLamp => 0, + BlockKind::Cocoa => 0, + BlockKind::SandstoneStairs => 15, + BlockKind::EmeraldOre => 15, + BlockKind::EnderChest => 0, + BlockKind::TripwireHook => 0, + BlockKind::Tripwire => 0, + BlockKind::EmeraldBlock => 15, + BlockKind::SpruceStairs => 15, + BlockKind::BirchStairs => 15, + BlockKind::JungleStairs => 15, + BlockKind::CommandBlock => 15, + BlockKind::Beacon => 0, + BlockKind::CobblestoneWall => 0, + BlockKind::MossyCobblestoneWall => 0, + BlockKind::FlowerPot => 0, + BlockKind::PottedOakSapling => 0, + BlockKind::PottedSpruceSapling => 0, + BlockKind::PottedBirchSapling => 0, + BlockKind::PottedJungleSapling => 0, + BlockKind::PottedAcaciaSapling => 0, + BlockKind::PottedDarkOakSapling => 0, + BlockKind::PottedFern => 0, + BlockKind::PottedDandelion => 0, + BlockKind::PottedPoppy => 0, + BlockKind::PottedBlueOrchid => 0, + BlockKind::PottedAllium => 0, + BlockKind::PottedAzureBluet => 0, + BlockKind::PottedRedTulip => 0, + BlockKind::PottedOrangeTulip => 0, + BlockKind::PottedWhiteTulip => 0, + BlockKind::PottedPinkTulip => 0, + BlockKind::PottedOxeyeDaisy => 0, + BlockKind::PottedCornflower => 0, + BlockKind::PottedLilyOfTheValley => 0, + BlockKind::PottedWitherRose => 0, + BlockKind::PottedRedMushroom => 0, + BlockKind::PottedBrownMushroom => 0, + BlockKind::PottedDeadBush => 0, + BlockKind::PottedCactus => 0, + BlockKind::Carrots => 15, + BlockKind::Potatoes => 15, + BlockKind::OakButton => 0, + BlockKind::SpruceButton => 0, + BlockKind::BirchButton => 0, + BlockKind::JungleButton => 0, + BlockKind::AcaciaButton => 0, + BlockKind::DarkOakButton => 0, + BlockKind::SkeletonSkull => 0, + BlockKind::SkeletonWallSkull => 0, + BlockKind::WitherSkeletonSkull => 0, + BlockKind::WitherSkeletonWallSkull => 0, + BlockKind::ZombieHead => 0, + BlockKind::ZombieWallHead => 0, + BlockKind::PlayerHead => 0, + BlockKind::PlayerWallHead => 0, + BlockKind::CreeperHead => 0, + BlockKind::CreeperWallHead => 0, + BlockKind::DragonHead => 0, + BlockKind::DragonWallHead => 0, + BlockKind::Anvil => 0, + BlockKind::ChippedAnvil => 0, + BlockKind::DamagedAnvil => 0, + BlockKind::TrappedChest => 0, + BlockKind::LightWeightedPressurePlate => 0, + BlockKind::HeavyWeightedPressurePlate => 0, + BlockKind::Comparator => 0, + BlockKind::DaylightDetector => 0, + BlockKind::RedstoneBlock => 0, + BlockKind::NetherQuartzOre => 15, + BlockKind::Hopper => 0, + BlockKind::QuartzBlock => 15, + BlockKind::ChiseledQuartzBlock => 15, + BlockKind::QuartzPillar => 15, + BlockKind::QuartzStairs => 15, + BlockKind::ActivatorRail => 0, + BlockKind::Dropper => 15, + BlockKind::WhiteTerracotta => 15, + BlockKind::OrangeTerracotta => 15, + BlockKind::MagentaTerracotta => 15, + BlockKind::LightBlueTerracotta => 15, + BlockKind::YellowTerracotta => 15, + BlockKind::LimeTerracotta => 15, + BlockKind::PinkTerracotta => 15, + BlockKind::GrayTerracotta => 15, + BlockKind::LightGrayTerracotta => 15, + BlockKind::CyanTerracotta => 15, + BlockKind::PurpleTerracotta => 15, + BlockKind::BlueTerracotta => 15, + BlockKind::BrownTerracotta => 15, + BlockKind::GreenTerracotta => 15, + BlockKind::RedTerracotta => 15, + BlockKind::BlackTerracotta => 15, + BlockKind::WhiteStainedGlassPane => 0, + BlockKind::OrangeStainedGlassPane => 0, + BlockKind::MagentaStainedGlassPane => 0, + BlockKind::LightBlueStainedGlassPane => 0, + BlockKind::YellowStainedGlassPane => 0, + BlockKind::LimeStainedGlassPane => 0, + BlockKind::PinkStainedGlassPane => 0, + BlockKind::GrayStainedGlassPane => 0, + BlockKind::LightGrayStainedGlassPane => 0, + BlockKind::CyanStainedGlassPane => 0, + BlockKind::PurpleStainedGlassPane => 0, + BlockKind::BlueStainedGlassPane => 0, + BlockKind::BrownStainedGlassPane => 0, + BlockKind::GreenStainedGlassPane => 0, + BlockKind::RedStainedGlassPane => 0, + BlockKind::BlackStainedGlassPane => 0, + BlockKind::AcaciaStairs => 15, + BlockKind::DarkOakStairs => 15, + BlockKind::SlimeBlock => 0, + BlockKind::Barrier => 0, + BlockKind::IronTrapdoor => 0, + BlockKind::Prismarine => 15, + BlockKind::PrismarineBricks => 15, + BlockKind::DarkPrismarine => 15, + BlockKind::PrismarineStairs => 15, + BlockKind::PrismarineBrickStairs => 15, + BlockKind::DarkPrismarineStairs => 15, + BlockKind::PrismarineSlab => 0, + BlockKind::PrismarineBrickSlab => 0, + BlockKind::DarkPrismarineSlab => 0, + BlockKind::SeaLantern => 0, + BlockKind::HayBlock => 15, + BlockKind::WhiteCarpet => 0, + BlockKind::OrangeCarpet => 0, + BlockKind::MagentaCarpet => 0, + BlockKind::LightBlueCarpet => 0, + BlockKind::YellowCarpet => 0, + BlockKind::LimeCarpet => 0, + BlockKind::PinkCarpet => 0, + BlockKind::GrayCarpet => 0, + BlockKind::LightGrayCarpet => 0, + BlockKind::CyanCarpet => 0, + BlockKind::PurpleCarpet => 0, + BlockKind::BlueCarpet => 0, + BlockKind::BrownCarpet => 0, + BlockKind::GreenCarpet => 0, + BlockKind::RedCarpet => 0, + BlockKind::BlackCarpet => 0, + BlockKind::Terracotta => 15, + BlockKind::CoalBlock => 15, + BlockKind::PackedIce => 15, + BlockKind::Sunflower => 0, + BlockKind::Lilac => 0, + BlockKind::RoseBush => 0, + BlockKind::Peony => 15, + BlockKind::TallGrass => 0, + BlockKind::LargeFern => 0, + BlockKind::WhiteBanner => 0, + BlockKind::OrangeBanner => 0, + BlockKind::MagentaBanner => 0, + BlockKind::LightBlueBanner => 0, + BlockKind::YellowBanner => 0, + BlockKind::LimeBanner => 0, + BlockKind::PinkBanner => 0, + BlockKind::GrayBanner => 0, + BlockKind::LightGrayBanner => 0, + BlockKind::CyanBanner => 0, + BlockKind::PurpleBanner => 0, + BlockKind::BlueBanner => 0, + BlockKind::BrownBanner => 0, + BlockKind::GreenBanner => 0, + BlockKind::RedBanner => 0, + BlockKind::BlackBanner => 0, + BlockKind::WhiteWallBanner => 0, + BlockKind::OrangeWallBanner => 0, + BlockKind::MagentaWallBanner => 0, + BlockKind::LightBlueWallBanner => 0, + BlockKind::YellowWallBanner => 0, + BlockKind::LimeWallBanner => 0, + BlockKind::PinkWallBanner => 0, + BlockKind::GrayWallBanner => 0, + BlockKind::LightGrayWallBanner => 0, + BlockKind::CyanWallBanner => 0, + BlockKind::PurpleWallBanner => 0, + BlockKind::BlueWallBanner => 0, + BlockKind::BrownWallBanner => 0, + BlockKind::GreenWallBanner => 0, + BlockKind::RedWallBanner => 0, + BlockKind::BlackWallBanner => 0, + BlockKind::RedSandstone => 15, + BlockKind::ChiseledRedSandstone => 15, + BlockKind::CutRedSandstone => 15, + BlockKind::RedSandstoneStairs => 15, + BlockKind::OakSlab => 0, + BlockKind::SpruceSlab => 0, + BlockKind::BirchSlab => 0, + BlockKind::JungleSlab => 0, + BlockKind::AcaciaSlab => 0, + BlockKind::DarkOakSlab => 0, + BlockKind::StoneSlab => 0, + BlockKind::SmoothStoneSlab => 0, + BlockKind::SandstoneSlab => 0, + BlockKind::CutSandstoneSlab => 0, + BlockKind::PetrifiedOakSlab => 0, + BlockKind::CobblestoneSlab => 0, + BlockKind::BrickSlab => 0, + BlockKind::StoneBrickSlab => 0, + BlockKind::NetherBrickSlab => 0, + BlockKind::QuartzSlab => 0, + BlockKind::RedSandstoneSlab => 0, + BlockKind::CutRedSandstoneSlab => 0, + BlockKind::PurpurSlab => 0, + BlockKind::SmoothStone => 15, + BlockKind::SmoothSandstone => 15, + BlockKind::SmoothQuartz => 15, + BlockKind::SmoothRedSandstone => 15, + BlockKind::SpruceFenceGate => 0, + BlockKind::BirchFenceGate => 0, + BlockKind::JungleFenceGate => 0, + BlockKind::AcaciaFenceGate => 0, + BlockKind::DarkOakFenceGate => 0, + BlockKind::SpruceFence => 0, + BlockKind::BirchFence => 0, + BlockKind::JungleFence => 0, + BlockKind::AcaciaFence => 0, + BlockKind::DarkOakFence => 0, + BlockKind::SpruceDoor => 0, + BlockKind::BirchDoor => 0, + BlockKind::JungleDoor => 0, + BlockKind::AcaciaDoor => 0, + BlockKind::DarkOakDoor => 0, + BlockKind::EndRod => 15, + BlockKind::ChorusPlant => 0, + BlockKind::ChorusFlower => 0, + BlockKind::PurpurBlock => 15, + BlockKind::PurpurPillar => 15, + BlockKind::PurpurStairs => 15, + BlockKind::EndStoneBricks => 15, + BlockKind::Beetroots => 0, + BlockKind::GrassPath => 0, + BlockKind::EndGateway => 15, + BlockKind::RepeatingCommandBlock => 15, + BlockKind::ChainCommandBlock => 15, + BlockKind::FrostedIce => 2, + BlockKind::MagmaBlock => 15, + BlockKind::NetherWartBlock => 15, + BlockKind::RedNetherBricks => 15, + BlockKind::BoneBlock => 15, + BlockKind::StructureVoid => 15, + BlockKind::Observer => 0, + BlockKind::ShulkerBox => 0, + BlockKind::WhiteShulkerBox => 0, + BlockKind::OrangeShulkerBox => 0, + BlockKind::MagentaShulkerBox => 0, + BlockKind::LightBlueShulkerBox => 0, + BlockKind::YellowShulkerBox => 0, + BlockKind::LimeShulkerBox => 0, + BlockKind::PinkShulkerBox => 0, + BlockKind::GrayShulkerBox => 0, + BlockKind::LightGrayShulkerBox => 0, + BlockKind::CyanShulkerBox => 0, + BlockKind::PurpleShulkerBox => 0, + BlockKind::BlueShulkerBox => 0, + BlockKind::BrownShulkerBox => 0, + BlockKind::GreenShulkerBox => 0, + BlockKind::RedShulkerBox => 0, + BlockKind::BlackShulkerBox => 0, + BlockKind::WhiteGlazedTerracotta => 15, + BlockKind::OrangeGlazedTerracotta => 15, + BlockKind::MagentaGlazedTerracotta => 15, + BlockKind::LightBlueGlazedTerracotta => 15, + BlockKind::YellowGlazedTerracotta => 15, + BlockKind::LimeGlazedTerracotta => 15, + BlockKind::PinkGlazedTerracotta => 15, + BlockKind::GrayGlazedTerracotta => 15, + BlockKind::LightGrayGlazedTerracotta => 15, + BlockKind::CyanGlazedTerracotta => 15, + BlockKind::PurpleGlazedTerracotta => 15, + BlockKind::BlueGlazedTerracotta => 15, + BlockKind::BrownGlazedTerracotta => 15, + BlockKind::GreenGlazedTerracotta => 15, + BlockKind::RedGlazedTerracotta => 15, + BlockKind::BlackGlazedTerracotta => 15, + BlockKind::WhiteConcrete => 15, + BlockKind::OrangeConcrete => 15, + BlockKind::MagentaConcrete => 15, + BlockKind::LightBlueConcrete => 15, + BlockKind::YellowConcrete => 15, + BlockKind::LimeConcrete => 15, + BlockKind::PinkConcrete => 15, + BlockKind::GrayConcrete => 15, + BlockKind::LightGrayConcrete => 15, + BlockKind::CyanConcrete => 15, + BlockKind::PurpleConcrete => 15, + BlockKind::BlueConcrete => 15, + BlockKind::BrownConcrete => 15, + BlockKind::GreenConcrete => 15, + BlockKind::RedConcrete => 15, + BlockKind::BlackConcrete => 15, + BlockKind::WhiteConcretePowder => 15, + BlockKind::OrangeConcretePowder => 15, + BlockKind::MagentaConcretePowder => 15, + BlockKind::LightBlueConcretePowder => 15, + BlockKind::YellowConcretePowder => 15, + BlockKind::LimeConcretePowder => 15, + BlockKind::PinkConcretePowder => 15, + BlockKind::GrayConcretePowder => 15, + BlockKind::LightGrayConcretePowder => 15, + BlockKind::CyanConcretePowder => 15, + BlockKind::PurpleConcretePowder => 15, + BlockKind::BlueConcretePowder => 15, + BlockKind::BrownConcretePowder => 15, + BlockKind::GreenConcretePowder => 15, + BlockKind::RedConcretePowder => 15, + BlockKind::BlackConcretePowder => 15, + BlockKind::Kelp => 0, + BlockKind::KelpPlant => 0, + BlockKind::DriedKelpBlock => 15, + BlockKind::TurtleEgg => 15, + BlockKind::DeadTubeCoralBlock => 15, + BlockKind::DeadBrainCoralBlock => 15, + BlockKind::DeadBubbleCoralBlock => 15, + BlockKind::DeadFireCoralBlock => 15, + BlockKind::DeadHornCoralBlock => 15, + BlockKind::TubeCoralBlock => 15, + BlockKind::BrainCoralBlock => 15, + BlockKind::BubbleCoralBlock => 15, + BlockKind::FireCoralBlock => 15, + BlockKind::HornCoralBlock => 15, + BlockKind::DeadTubeCoral => 0, + BlockKind::DeadBrainCoral => 0, + BlockKind::DeadBubbleCoral => 0, + BlockKind::DeadFireCoral => 0, + BlockKind::DeadHornCoral => 0, + BlockKind::TubeCoral => 0, + BlockKind::BrainCoral => 0, + BlockKind::BubbleCoral => 0, + BlockKind::FireCoral => 0, + BlockKind::HornCoral => 0, + BlockKind::DeadTubeCoralFan => 0, + BlockKind::DeadBrainCoralFan => 0, + BlockKind::DeadBubbleCoralFan => 0, + BlockKind::DeadFireCoralFan => 0, + BlockKind::DeadHornCoralFan => 0, + BlockKind::TubeCoralFan => 0, + BlockKind::BrainCoralFan => 0, + BlockKind::BubbleCoralFan => 0, + BlockKind::FireCoralFan => 0, + BlockKind::HornCoralFan => 0, + BlockKind::DeadTubeCoralWallFan => 0, + BlockKind::DeadBrainCoralWallFan => 0, + BlockKind::DeadBubbleCoralWallFan => 0, + BlockKind::DeadFireCoralWallFan => 0, + BlockKind::DeadHornCoralWallFan => 0, + BlockKind::TubeCoralWallFan => 0, + BlockKind::BrainCoralWallFan => 0, + BlockKind::BubbleCoralWallFan => 0, + BlockKind::FireCoralWallFan => 0, + BlockKind::HornCoralWallFan => 0, + BlockKind::SeaPickle => 15, + BlockKind::BlueIce => 15, + BlockKind::Conduit => 15, + BlockKind::BambooSapling => 15, + BlockKind::Bamboo => 15, + BlockKind::PottedBamboo => 0, + BlockKind::VoidAir => 0, + BlockKind::CaveAir => 0, + BlockKind::BubbleColumn => 0, + BlockKind::PolishedGraniteStairs => 15, + BlockKind::SmoothRedSandstoneStairs => 15, + BlockKind::MossyStoneBrickStairs => 15, + BlockKind::PolishedDioriteStairs => 15, + BlockKind::MossyCobblestoneStairs => 15, + BlockKind::EndStoneBrickStairs => 15, + BlockKind::StoneStairs => 15, + BlockKind::SmoothSandstoneStairs => 15, + BlockKind::SmoothQuartzStairs => 15, + BlockKind::GraniteStairs => 15, + BlockKind::AndesiteStairs => 15, + BlockKind::RedNetherBrickStairs => 15, + BlockKind::PolishedAndesiteStairs => 15, + BlockKind::DioriteStairs => 15, + BlockKind::PolishedGraniteSlab => 0, + BlockKind::SmoothRedSandstoneSlab => 0, + BlockKind::MossyStoneBrickSlab => 0, + BlockKind::PolishedDioriteSlab => 0, + BlockKind::MossyCobblestoneSlab => 0, + BlockKind::EndStoneBrickSlab => 0, + BlockKind::SmoothSandstoneSlab => 0, + BlockKind::SmoothQuartzSlab => 0, + BlockKind::GraniteSlab => 0, + BlockKind::AndesiteSlab => 0, + BlockKind::RedNetherBrickSlab => 0, + BlockKind::PolishedAndesiteSlab => 0, + BlockKind::DioriteSlab => 0, + BlockKind::BrickWall => 0, + BlockKind::PrismarineWall => 0, + BlockKind::RedSandstoneWall => 0, + BlockKind::MossyStoneBrickWall => 0, + BlockKind::GraniteWall => 0, + BlockKind::StoneBrickWall => 0, + BlockKind::NetherBrickWall => 0, + BlockKind::AndesiteWall => 0, + BlockKind::RedNetherBrickWall => 0, + BlockKind::SandstoneWall => 0, + BlockKind::EndStoneBrickWall => 0, + BlockKind::DioriteWall => 0, + BlockKind::Scaffolding => 15, + BlockKind::Loom => 15, + BlockKind::Barrel => 0, + BlockKind::Smoker => 15, + BlockKind::BlastFurnace => 15, + BlockKind::CartographyTable => 15, + BlockKind::FletchingTable => 15, + BlockKind::Grindstone => 0, + BlockKind::Lectern => 15, + BlockKind::SmithingTable => 15, + BlockKind::Stonecutter => 15, + BlockKind::Bell => 0, + BlockKind::Lantern => 0, + BlockKind::SoulLantern => 0, + BlockKind::Campfire => 15, + BlockKind::SoulCampfire => 15, + BlockKind::SweetBerryBush => 0, + BlockKind::WarpedStem => 15, + BlockKind::StrippedWarpedStem => 15, + BlockKind::WarpedHyphae => 15, + BlockKind::StrippedWarpedHyphae => 15, + BlockKind::WarpedNylium => 15, + BlockKind::WarpedFungus => 0, + BlockKind::WarpedWartBlock => 15, + BlockKind::WarpedRoots => 0, + BlockKind::NetherSprouts => 0, + BlockKind::CrimsonStem => 15, + BlockKind::StrippedCrimsonStem => 15, + BlockKind::CrimsonHyphae => 15, + BlockKind::StrippedCrimsonHyphae => 15, + BlockKind::CrimsonNylium => 15, + BlockKind::CrimsonFungus => 0, + BlockKind::Shroomlight => 15, + BlockKind::WeepingVines => 0, + BlockKind::WeepingVinesPlant => 0, + BlockKind::TwistingVines => 0, + BlockKind::TwistingVinesPlant => 0, + BlockKind::CrimsonRoots => 0, + BlockKind::CrimsonPlanks => 15, + BlockKind::WarpedPlanks => 15, + BlockKind::CrimsonSlab => 15, + BlockKind::WarpedSlab => 15, + BlockKind::CrimsonPressurePlate => 0, + BlockKind::WarpedPressurePlate => 0, + BlockKind::CrimsonFence => 0, + BlockKind::WarpedFence => 0, + BlockKind::CrimsonTrapdoor => 0, + BlockKind::WarpedTrapdoor => 0, + BlockKind::CrimsonFenceGate => 0, + BlockKind::WarpedFenceGate => 0, + BlockKind::CrimsonStairs => 15, + BlockKind::WarpedStairs => 15, + BlockKind::CrimsonButton => 0, + BlockKind::WarpedButton => 0, + BlockKind::CrimsonDoor => 0, + BlockKind::WarpedDoor => 0, + BlockKind::CrimsonSign => 0, + BlockKind::WarpedSign => 0, + BlockKind::CrimsonWallSign => 0, + BlockKind::WarpedWallSign => 0, + BlockKind::StructureBlock => 15, + BlockKind::Jigsaw => 15, + BlockKind::Composter => 0, + BlockKind::Target => 15, + BlockKind::BeeNest => 15, + BlockKind::Beehive => 15, + BlockKind::HoneyBlock => 15, + BlockKind::HoneycombBlock => 15, + BlockKind::NetheriteBlock => 15, + BlockKind::AncientDebris => 15, + BlockKind::CryingObsidian => 15, + BlockKind::RespawnAnchor => 15, + BlockKind::PottedCrimsonFungus => 0, + BlockKind::PottedWarpedFungus => 0, + BlockKind::PottedCrimsonRoots => 0, + BlockKind::PottedWarpedRoots => 0, + BlockKind::Lodestone => 15, + BlockKind::Blackstone => 15, + BlockKind::BlackstoneStairs => 15, + BlockKind::BlackstoneWall => 0, + BlockKind::BlackstoneSlab => 15, + BlockKind::PolishedBlackstone => 15, + BlockKind::PolishedBlackstoneBricks => 15, + BlockKind::CrackedPolishedBlackstoneBricks => 15, + BlockKind::ChiseledPolishedBlackstone => 15, + BlockKind::PolishedBlackstoneBrickSlab => 15, + BlockKind::PolishedBlackstoneBrickStairs => 15, + BlockKind::PolishedBlackstoneBrickWall => 0, + BlockKind::GildedBlackstone => 15, + BlockKind::PolishedBlackstoneStairs => 15, + BlockKind::PolishedBlackstoneSlab => 15, + BlockKind::PolishedBlackstonePressurePlate => 0, + BlockKind::PolishedBlackstoneButton => 0, + BlockKind::PolishedBlackstoneWall => 0, + BlockKind::ChiseledNetherBricks => 15, + BlockKind::CrackedNetherBricks => 15, + BlockKind::QuartzBricks => 15, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `solid` property of this `BlockKind`. + pub fn solid(&self) -> bool { + match self { + BlockKind::Air => false, + BlockKind::Stone => true, + BlockKind::Granite => true, + BlockKind::PolishedGranite => true, + BlockKind::Diorite => true, + BlockKind::PolishedDiorite => true, + BlockKind::Andesite => true, + BlockKind::PolishedAndesite => true, + BlockKind::GrassBlock => true, + BlockKind::Dirt => true, + BlockKind::CoarseDirt => true, + BlockKind::Podzol => true, + BlockKind::Cobblestone => true, + BlockKind::OakPlanks => true, + BlockKind::SprucePlanks => true, + BlockKind::BirchPlanks => true, + BlockKind::JunglePlanks => true, + BlockKind::AcaciaPlanks => true, + BlockKind::DarkOakPlanks => true, + BlockKind::OakSapling => false, + BlockKind::SpruceSapling => false, + BlockKind::BirchSapling => false, + BlockKind::JungleSapling => false, + BlockKind::AcaciaSapling => false, + BlockKind::DarkOakSapling => false, + BlockKind::Bedrock => true, + BlockKind::Water => false, + BlockKind::Lava => false, + BlockKind::Sand => true, + BlockKind::RedSand => true, + BlockKind::Gravel => true, + BlockKind::GoldOre => true, + BlockKind::IronOre => true, + BlockKind::CoalOre => true, + BlockKind::NetherGoldOre => true, + BlockKind::OakLog => true, + BlockKind::SpruceLog => true, + BlockKind::BirchLog => true, + BlockKind::JungleLog => true, + BlockKind::AcaciaLog => true, + BlockKind::DarkOakLog => true, + BlockKind::StrippedSpruceLog => true, + BlockKind::StrippedBirchLog => true, + BlockKind::StrippedJungleLog => true, + BlockKind::StrippedAcaciaLog => true, + BlockKind::StrippedDarkOakLog => true, + BlockKind::StrippedOakLog => true, + BlockKind::OakWood => true, + BlockKind::SpruceWood => true, + BlockKind::BirchWood => true, + BlockKind::JungleWood => true, + BlockKind::AcaciaWood => true, + BlockKind::DarkOakWood => true, + BlockKind::StrippedOakWood => true, + BlockKind::StrippedSpruceWood => true, + BlockKind::StrippedBirchWood => true, + BlockKind::StrippedJungleWood => true, + BlockKind::StrippedAcaciaWood => true, + BlockKind::StrippedDarkOakWood => true, + BlockKind::OakLeaves => true, + BlockKind::SpruceLeaves => true, + BlockKind::BirchLeaves => true, + BlockKind::JungleLeaves => true, + BlockKind::AcaciaLeaves => true, + BlockKind::DarkOakLeaves => true, + BlockKind::Sponge => true, + BlockKind::WetSponge => true, + BlockKind::Glass => true, + BlockKind::LapisOre => true, + BlockKind::LapisBlock => true, + BlockKind::Dispenser => true, + BlockKind::Sandstone => true, + BlockKind::ChiseledSandstone => true, + BlockKind::CutSandstone => true, + BlockKind::NoteBlock => true, + BlockKind::WhiteBed => true, + BlockKind::OrangeBed => true, + BlockKind::MagentaBed => true, + BlockKind::LightBlueBed => true, + BlockKind::YellowBed => true, + BlockKind::LimeBed => true, + BlockKind::PinkBed => true, + BlockKind::GrayBed => true, + BlockKind::LightGrayBed => true, + BlockKind::CyanBed => true, + BlockKind::PurpleBed => true, + BlockKind::BlueBed => true, + BlockKind::BrownBed => true, + BlockKind::GreenBed => true, + BlockKind::RedBed => true, + BlockKind::BlackBed => true, + BlockKind::PoweredRail => false, + BlockKind::DetectorRail => false, + BlockKind::StickyPiston => true, + BlockKind::Cobweb => false, + BlockKind::Grass => false, + BlockKind::Fern => false, + BlockKind::DeadBush => false, + BlockKind::Seagrass => false, + BlockKind::TallSeagrass => false, + BlockKind::Piston => true, + BlockKind::PistonHead => true, + BlockKind::WhiteWool => true, + BlockKind::OrangeWool => true, + BlockKind::MagentaWool => true, + BlockKind::LightBlueWool => true, + BlockKind::YellowWool => true, + BlockKind::LimeWool => true, + BlockKind::PinkWool => true, + BlockKind::GrayWool => true, + BlockKind::LightGrayWool => true, + BlockKind::CyanWool => true, + BlockKind::PurpleWool => true, + BlockKind::BlueWool => true, + BlockKind::BrownWool => true, + BlockKind::GreenWool => true, + BlockKind::RedWool => true, + BlockKind::BlackWool => true, + BlockKind::MovingPiston => false, + BlockKind::Dandelion => false, + BlockKind::Poppy => false, + BlockKind::BlueOrchid => false, + BlockKind::Allium => false, + BlockKind::AzureBluet => false, + BlockKind::RedTulip => false, + BlockKind::OrangeTulip => false, + BlockKind::WhiteTulip => false, + BlockKind::PinkTulip => false, + BlockKind::OxeyeDaisy => false, + BlockKind::Cornflower => false, + BlockKind::WitherRose => false, + BlockKind::LilyOfTheValley => false, + BlockKind::BrownMushroom => false, + BlockKind::RedMushroom => false, + BlockKind::GoldBlock => true, + BlockKind::IronBlock => true, + BlockKind::Bricks => true, + BlockKind::Tnt => true, + BlockKind::Bookshelf => true, + BlockKind::MossyCobblestone => true, + BlockKind::Obsidian => true, + BlockKind::Torch => false, + BlockKind::WallTorch => false, + BlockKind::Fire => false, + BlockKind::SoulFire => false, + BlockKind::Spawner => true, + BlockKind::OakStairs => true, + BlockKind::Chest => true, + BlockKind::RedstoneWire => false, + BlockKind::DiamondOre => true, + BlockKind::DiamondBlock => true, + BlockKind::CraftingTable => true, + BlockKind::Wheat => false, + BlockKind::Farmland => true, + BlockKind::Furnace => true, + BlockKind::OakSign => false, + BlockKind::SpruceSign => false, + BlockKind::BirchSign => false, + BlockKind::AcaciaSign => false, + BlockKind::JungleSign => false, + BlockKind::DarkOakSign => false, + BlockKind::OakDoor => true, + BlockKind::Ladder => true, + BlockKind::Rail => false, + BlockKind::CobblestoneStairs => true, + BlockKind::OakWallSign => false, + BlockKind::SpruceWallSign => false, + BlockKind::BirchWallSign => false, + BlockKind::AcaciaWallSign => false, + BlockKind::JungleWallSign => false, + BlockKind::DarkOakWallSign => false, + BlockKind::Lever => false, + BlockKind::StonePressurePlate => false, + BlockKind::IronDoor => true, + BlockKind::OakPressurePlate => false, + BlockKind::SprucePressurePlate => false, + BlockKind::BirchPressurePlate => false, + BlockKind::JunglePressurePlate => false, + BlockKind::AcaciaPressurePlate => false, + BlockKind::DarkOakPressurePlate => false, + BlockKind::RedstoneOre => true, + BlockKind::RedstoneTorch => false, + BlockKind::RedstoneWallTorch => false, + BlockKind::StoneButton => false, + BlockKind::Snow => true, + BlockKind::Ice => true, + BlockKind::SnowBlock => true, + BlockKind::Cactus => true, + BlockKind::Clay => true, + BlockKind::SugarCane => false, + BlockKind::Jukebox => true, + BlockKind::OakFence => true, + BlockKind::Pumpkin => true, + BlockKind::Netherrack => true, + BlockKind::SoulSand => true, + BlockKind::SoulSoil => true, + BlockKind::Basalt => true, + BlockKind::PolishedBasalt => true, + BlockKind::SoulTorch => false, + BlockKind::SoulWallTorch => false, + BlockKind::Glowstone => true, + BlockKind::NetherPortal => false, + BlockKind::CarvedPumpkin => true, + BlockKind::JackOLantern => true, + BlockKind::Cake => true, + BlockKind::Repeater => true, + BlockKind::WhiteStainedGlass => true, + BlockKind::OrangeStainedGlass => true, + BlockKind::MagentaStainedGlass => true, + BlockKind::LightBlueStainedGlass => true, + BlockKind::YellowStainedGlass => true, + BlockKind::LimeStainedGlass => true, + BlockKind::PinkStainedGlass => true, + BlockKind::GrayStainedGlass => true, + BlockKind::LightGrayStainedGlass => true, + BlockKind::CyanStainedGlass => true, + BlockKind::PurpleStainedGlass => true, + BlockKind::BlueStainedGlass => true, + BlockKind::BrownStainedGlass => true, + BlockKind::GreenStainedGlass => true, + BlockKind::RedStainedGlass => true, + BlockKind::BlackStainedGlass => true, + BlockKind::OakTrapdoor => true, + BlockKind::SpruceTrapdoor => true, + BlockKind::BirchTrapdoor => true, + BlockKind::JungleTrapdoor => true, + BlockKind::AcaciaTrapdoor => true, + BlockKind::DarkOakTrapdoor => true, + BlockKind::StoneBricks => true, + BlockKind::MossyStoneBricks => true, + BlockKind::CrackedStoneBricks => true, + BlockKind::ChiseledStoneBricks => true, + BlockKind::InfestedStone => true, + BlockKind::InfestedCobblestone => true, + BlockKind::InfestedStoneBricks => true, + BlockKind::InfestedMossyStoneBricks => true, + BlockKind::InfestedCrackedStoneBricks => true, + BlockKind::InfestedChiseledStoneBricks => true, + BlockKind::BrownMushroomBlock => true, + BlockKind::RedMushroomBlock => true, + BlockKind::MushroomStem => true, + BlockKind::IronBars => true, + BlockKind::Chain => true, + BlockKind::GlassPane => true, + BlockKind::Melon => true, + BlockKind::AttachedPumpkinStem => false, + BlockKind::AttachedMelonStem => false, + BlockKind::PumpkinStem => false, + BlockKind::MelonStem => false, + BlockKind::Vine => false, + BlockKind::OakFenceGate => true, + BlockKind::BrickStairs => true, + BlockKind::StoneBrickStairs => true, + BlockKind::Mycelium => true, + BlockKind::LilyPad => true, + BlockKind::NetherBricks => true, + BlockKind::NetherBrickFence => true, + BlockKind::NetherBrickStairs => true, + BlockKind::NetherWart => false, + BlockKind::EnchantingTable => true, + BlockKind::BrewingStand => true, + BlockKind::Cauldron => true, + BlockKind::EndPortal => false, + BlockKind::EndPortalFrame => true, + BlockKind::EndStone => true, + BlockKind::DragonEgg => true, + BlockKind::RedstoneLamp => true, + BlockKind::Cocoa => true, + BlockKind::SandstoneStairs => true, + BlockKind::EmeraldOre => true, + BlockKind::EnderChest => true, + BlockKind::TripwireHook => false, + BlockKind::Tripwire => false, + BlockKind::EmeraldBlock => true, + BlockKind::SpruceStairs => true, + BlockKind::BirchStairs => true, + BlockKind::JungleStairs => true, + BlockKind::CommandBlock => true, + BlockKind::Beacon => true, + BlockKind::CobblestoneWall => true, + BlockKind::MossyCobblestoneWall => true, + BlockKind::FlowerPot => true, + BlockKind::PottedOakSapling => true, + BlockKind::PottedSpruceSapling => true, + BlockKind::PottedBirchSapling => true, + BlockKind::PottedJungleSapling => true, + BlockKind::PottedAcaciaSapling => true, + BlockKind::PottedDarkOakSapling => true, + BlockKind::PottedFern => true, + BlockKind::PottedDandelion => true, + BlockKind::PottedPoppy => true, + BlockKind::PottedBlueOrchid => true, + BlockKind::PottedAllium => true, + BlockKind::PottedAzureBluet => true, + BlockKind::PottedRedTulip => true, + BlockKind::PottedOrangeTulip => true, + BlockKind::PottedWhiteTulip => true, + BlockKind::PottedPinkTulip => true, + BlockKind::PottedOxeyeDaisy => true, + BlockKind::PottedCornflower => true, + BlockKind::PottedLilyOfTheValley => true, + BlockKind::PottedWitherRose => true, + BlockKind::PottedRedMushroom => true, + BlockKind::PottedBrownMushroom => true, + BlockKind::PottedDeadBush => true, + BlockKind::PottedCactus => true, + BlockKind::Carrots => false, + BlockKind::Potatoes => false, + BlockKind::OakButton => false, + BlockKind::SpruceButton => false, + BlockKind::BirchButton => false, + BlockKind::JungleButton => false, + BlockKind::AcaciaButton => false, + BlockKind::DarkOakButton => false, + BlockKind::SkeletonSkull => true, + BlockKind::SkeletonWallSkull => true, + BlockKind::WitherSkeletonSkull => true, + BlockKind::WitherSkeletonWallSkull => true, + BlockKind::ZombieHead => true, + BlockKind::ZombieWallHead => true, + BlockKind::PlayerHead => true, + BlockKind::PlayerWallHead => true, + BlockKind::CreeperHead => true, + BlockKind::CreeperWallHead => true, + BlockKind::DragonHead => true, + BlockKind::DragonWallHead => true, + BlockKind::Anvil => true, + BlockKind::ChippedAnvil => true, + BlockKind::DamagedAnvil => true, + BlockKind::TrappedChest => true, + BlockKind::LightWeightedPressurePlate => false, + BlockKind::HeavyWeightedPressurePlate => false, + BlockKind::Comparator => true, + BlockKind::DaylightDetector => true, + BlockKind::RedstoneBlock => true, + BlockKind::NetherQuartzOre => true, + BlockKind::Hopper => true, + BlockKind::QuartzBlock => true, + BlockKind::ChiseledQuartzBlock => true, + BlockKind::QuartzPillar => true, + BlockKind::QuartzStairs => true, + BlockKind::ActivatorRail => false, + BlockKind::Dropper => true, + BlockKind::WhiteTerracotta => true, + BlockKind::OrangeTerracotta => true, + BlockKind::MagentaTerracotta => true, + BlockKind::LightBlueTerracotta => true, + BlockKind::YellowTerracotta => true, + BlockKind::LimeTerracotta => true, + BlockKind::PinkTerracotta => true, + BlockKind::GrayTerracotta => true, + BlockKind::LightGrayTerracotta => true, + BlockKind::CyanTerracotta => true, + BlockKind::PurpleTerracotta => true, + BlockKind::BlueTerracotta => true, + BlockKind::BrownTerracotta => true, + BlockKind::GreenTerracotta => true, + BlockKind::RedTerracotta => true, + BlockKind::BlackTerracotta => true, + BlockKind::WhiteStainedGlassPane => true, + BlockKind::OrangeStainedGlassPane => true, + BlockKind::MagentaStainedGlassPane => true, + BlockKind::LightBlueStainedGlassPane => true, + BlockKind::YellowStainedGlassPane => true, + BlockKind::LimeStainedGlassPane => true, + BlockKind::PinkStainedGlassPane => true, + BlockKind::GrayStainedGlassPane => true, + BlockKind::LightGrayStainedGlassPane => true, + BlockKind::CyanStainedGlassPane => true, + BlockKind::PurpleStainedGlassPane => true, + BlockKind::BlueStainedGlassPane => true, + BlockKind::BrownStainedGlassPane => true, + BlockKind::GreenStainedGlassPane => true, + BlockKind::RedStainedGlassPane => true, + BlockKind::BlackStainedGlassPane => true, + BlockKind::AcaciaStairs => true, + BlockKind::DarkOakStairs => true, + BlockKind::SlimeBlock => true, + BlockKind::Barrier => true, + BlockKind::IronTrapdoor => true, + BlockKind::Prismarine => true, + BlockKind::PrismarineBricks => true, + BlockKind::DarkPrismarine => true, + BlockKind::PrismarineStairs => true, + BlockKind::PrismarineBrickStairs => true, + BlockKind::DarkPrismarineStairs => true, + BlockKind::PrismarineSlab => true, + BlockKind::PrismarineBrickSlab => true, + BlockKind::DarkPrismarineSlab => true, + BlockKind::SeaLantern => true, + BlockKind::HayBlock => true, + BlockKind::WhiteCarpet => true, + BlockKind::OrangeCarpet => true, + BlockKind::MagentaCarpet => true, + BlockKind::LightBlueCarpet => true, + BlockKind::YellowCarpet => true, + BlockKind::LimeCarpet => true, + BlockKind::PinkCarpet => true, + BlockKind::GrayCarpet => true, + BlockKind::LightGrayCarpet => true, + BlockKind::CyanCarpet => true, + BlockKind::PurpleCarpet => true, + BlockKind::BlueCarpet => true, + BlockKind::BrownCarpet => true, + BlockKind::GreenCarpet => true, + BlockKind::RedCarpet => true, + BlockKind::BlackCarpet => true, + BlockKind::Terracotta => true, + BlockKind::CoalBlock => true, + BlockKind::PackedIce => true, + BlockKind::Sunflower => false, + BlockKind::Lilac => false, + BlockKind::RoseBush => false, + BlockKind::Peony => false, + BlockKind::TallGrass => false, + BlockKind::LargeFern => false, + BlockKind::WhiteBanner => false, + BlockKind::OrangeBanner => false, + BlockKind::MagentaBanner => false, + BlockKind::LightBlueBanner => false, + BlockKind::YellowBanner => false, + BlockKind::LimeBanner => false, + BlockKind::PinkBanner => false, + BlockKind::GrayBanner => false, + BlockKind::LightGrayBanner => false, + BlockKind::CyanBanner => false, + BlockKind::PurpleBanner => false, + BlockKind::BlueBanner => false, + BlockKind::BrownBanner => false, + BlockKind::GreenBanner => false, + BlockKind::RedBanner => false, + BlockKind::BlackBanner => false, + BlockKind::WhiteWallBanner => false, + BlockKind::OrangeWallBanner => false, + BlockKind::MagentaWallBanner => false, + BlockKind::LightBlueWallBanner => false, + BlockKind::YellowWallBanner => false, + BlockKind::LimeWallBanner => false, + BlockKind::PinkWallBanner => false, + BlockKind::GrayWallBanner => false, + BlockKind::LightGrayWallBanner => false, + BlockKind::CyanWallBanner => false, + BlockKind::PurpleWallBanner => false, + BlockKind::BlueWallBanner => false, + BlockKind::BrownWallBanner => false, + BlockKind::GreenWallBanner => false, + BlockKind::RedWallBanner => false, + BlockKind::BlackWallBanner => false, + BlockKind::RedSandstone => true, + BlockKind::ChiseledRedSandstone => true, + BlockKind::CutRedSandstone => true, + BlockKind::RedSandstoneStairs => true, + BlockKind::OakSlab => true, + BlockKind::SpruceSlab => true, + BlockKind::BirchSlab => true, + BlockKind::JungleSlab => true, + BlockKind::AcaciaSlab => true, + BlockKind::DarkOakSlab => true, + BlockKind::StoneSlab => true, + BlockKind::SmoothStoneSlab => true, + BlockKind::SandstoneSlab => true, + BlockKind::CutSandstoneSlab => true, + BlockKind::PetrifiedOakSlab => true, + BlockKind::CobblestoneSlab => true, + BlockKind::BrickSlab => true, + BlockKind::StoneBrickSlab => true, + BlockKind::NetherBrickSlab => true, + BlockKind::QuartzSlab => true, + BlockKind::RedSandstoneSlab => true, + BlockKind::CutRedSandstoneSlab => true, + BlockKind::PurpurSlab => true, + BlockKind::SmoothStone => true, + BlockKind::SmoothSandstone => true, + BlockKind::SmoothQuartz => true, + BlockKind::SmoothRedSandstone => true, + BlockKind::SpruceFenceGate => true, + BlockKind::BirchFenceGate => true, + BlockKind::JungleFenceGate => true, + BlockKind::AcaciaFenceGate => true, + BlockKind::DarkOakFenceGate => true, + BlockKind::SpruceFence => true, + BlockKind::BirchFence => true, + BlockKind::JungleFence => true, + BlockKind::AcaciaFence => true, + BlockKind::DarkOakFence => true, + BlockKind::SpruceDoor => true, + BlockKind::BirchDoor => true, + BlockKind::JungleDoor => true, + BlockKind::AcaciaDoor => true, + BlockKind::DarkOakDoor => true, + BlockKind::EndRod => true, + BlockKind::ChorusPlant => true, + BlockKind::ChorusFlower => true, + BlockKind::PurpurBlock => true, + BlockKind::PurpurPillar => true, + BlockKind::PurpurStairs => true, + BlockKind::EndStoneBricks => true, + BlockKind::Beetroots => false, + BlockKind::GrassPath => true, + BlockKind::EndGateway => false, + BlockKind::RepeatingCommandBlock => true, + BlockKind::ChainCommandBlock => true, + BlockKind::FrostedIce => true, + BlockKind::MagmaBlock => true, + BlockKind::NetherWartBlock => true, + BlockKind::RedNetherBricks => true, + BlockKind::BoneBlock => true, + BlockKind::StructureVoid => false, + BlockKind::Observer => true, + BlockKind::ShulkerBox => true, + BlockKind::WhiteShulkerBox => true, + BlockKind::OrangeShulkerBox => true, + BlockKind::MagentaShulkerBox => true, + BlockKind::LightBlueShulkerBox => true, + BlockKind::YellowShulkerBox => true, + BlockKind::LimeShulkerBox => true, + BlockKind::PinkShulkerBox => true, + BlockKind::GrayShulkerBox => true, + BlockKind::LightGrayShulkerBox => true, + BlockKind::CyanShulkerBox => true, + BlockKind::PurpleShulkerBox => true, + BlockKind::BlueShulkerBox => true, + BlockKind::BrownShulkerBox => true, + BlockKind::GreenShulkerBox => true, + BlockKind::RedShulkerBox => true, + BlockKind::BlackShulkerBox => true, + BlockKind::WhiteGlazedTerracotta => true, + BlockKind::OrangeGlazedTerracotta => true, + BlockKind::MagentaGlazedTerracotta => true, + BlockKind::LightBlueGlazedTerracotta => true, + BlockKind::YellowGlazedTerracotta => true, + BlockKind::LimeGlazedTerracotta => true, + BlockKind::PinkGlazedTerracotta => true, + BlockKind::GrayGlazedTerracotta => true, + BlockKind::LightGrayGlazedTerracotta => true, + BlockKind::CyanGlazedTerracotta => true, + BlockKind::PurpleGlazedTerracotta => true, + BlockKind::BlueGlazedTerracotta => true, + BlockKind::BrownGlazedTerracotta => true, + BlockKind::GreenGlazedTerracotta => true, + BlockKind::RedGlazedTerracotta => true, + BlockKind::BlackGlazedTerracotta => true, + BlockKind::WhiteConcrete => true, + BlockKind::OrangeConcrete => true, + BlockKind::MagentaConcrete => true, + BlockKind::LightBlueConcrete => true, + BlockKind::YellowConcrete => true, + BlockKind::LimeConcrete => true, + BlockKind::PinkConcrete => true, + BlockKind::GrayConcrete => true, + BlockKind::LightGrayConcrete => true, + BlockKind::CyanConcrete => true, + BlockKind::PurpleConcrete => true, + BlockKind::BlueConcrete => true, + BlockKind::BrownConcrete => true, + BlockKind::GreenConcrete => true, + BlockKind::RedConcrete => true, + BlockKind::BlackConcrete => true, + BlockKind::WhiteConcretePowder => true, + BlockKind::OrangeConcretePowder => true, + BlockKind::MagentaConcretePowder => true, + BlockKind::LightBlueConcretePowder => true, + BlockKind::YellowConcretePowder => true, + BlockKind::LimeConcretePowder => true, + BlockKind::PinkConcretePowder => true, + BlockKind::GrayConcretePowder => true, + BlockKind::LightGrayConcretePowder => true, + BlockKind::CyanConcretePowder => true, + BlockKind::PurpleConcretePowder => true, + BlockKind::BlueConcretePowder => true, + BlockKind::BrownConcretePowder => true, + BlockKind::GreenConcretePowder => true, + BlockKind::RedConcretePowder => true, + BlockKind::BlackConcretePowder => true, + BlockKind::Kelp => false, + BlockKind::KelpPlant => false, + BlockKind::DriedKelpBlock => true, + BlockKind::TurtleEgg => true, + BlockKind::DeadTubeCoralBlock => true, + BlockKind::DeadBrainCoralBlock => true, + BlockKind::DeadBubbleCoralBlock => true, + BlockKind::DeadFireCoralBlock => true, + BlockKind::DeadHornCoralBlock => true, + BlockKind::TubeCoralBlock => true, + BlockKind::BrainCoralBlock => true, + BlockKind::BubbleCoralBlock => true, + BlockKind::FireCoralBlock => true, + BlockKind::HornCoralBlock => true, + BlockKind::DeadTubeCoral => false, + BlockKind::DeadBrainCoral => false, + BlockKind::DeadBubbleCoral => false, + BlockKind::DeadFireCoral => false, + BlockKind::DeadHornCoral => false, + BlockKind::TubeCoral => false, + BlockKind::BrainCoral => false, + BlockKind::BubbleCoral => false, + BlockKind::FireCoral => false, + BlockKind::HornCoral => false, + BlockKind::DeadTubeCoralFan => false, + BlockKind::DeadBrainCoralFan => false, + BlockKind::DeadBubbleCoralFan => false, + BlockKind::DeadFireCoralFan => false, + BlockKind::DeadHornCoralFan => false, + BlockKind::TubeCoralFan => false, + BlockKind::BrainCoralFan => false, + BlockKind::BubbleCoralFan => false, + BlockKind::FireCoralFan => false, + BlockKind::HornCoralFan => false, + BlockKind::DeadTubeCoralWallFan => false, + BlockKind::DeadBrainCoralWallFan => false, + BlockKind::DeadBubbleCoralWallFan => false, + BlockKind::DeadFireCoralWallFan => false, + BlockKind::DeadHornCoralWallFan => false, + BlockKind::TubeCoralWallFan => false, + BlockKind::BrainCoralWallFan => false, + BlockKind::BubbleCoralWallFan => false, + BlockKind::FireCoralWallFan => false, + BlockKind::HornCoralWallFan => false, + BlockKind::SeaPickle => true, + BlockKind::BlueIce => true, + BlockKind::Conduit => true, + BlockKind::BambooSapling => false, + BlockKind::Bamboo => true, + BlockKind::PottedBamboo => true, + BlockKind::VoidAir => false, + BlockKind::CaveAir => false, + BlockKind::BubbleColumn => false, + BlockKind::PolishedGraniteStairs => true, + BlockKind::SmoothRedSandstoneStairs => true, + BlockKind::MossyStoneBrickStairs => true, + BlockKind::PolishedDioriteStairs => true, + BlockKind::MossyCobblestoneStairs => true, + BlockKind::EndStoneBrickStairs => true, + BlockKind::StoneStairs => true, + BlockKind::SmoothSandstoneStairs => true, + BlockKind::SmoothQuartzStairs => true, + BlockKind::GraniteStairs => true, + BlockKind::AndesiteStairs => true, + BlockKind::RedNetherBrickStairs => true, + BlockKind::PolishedAndesiteStairs => true, + BlockKind::DioriteStairs => true, + BlockKind::PolishedGraniteSlab => true, + BlockKind::SmoothRedSandstoneSlab => true, + BlockKind::MossyStoneBrickSlab => true, + BlockKind::PolishedDioriteSlab => true, + BlockKind::MossyCobblestoneSlab => true, + BlockKind::EndStoneBrickSlab => true, + BlockKind::SmoothSandstoneSlab => true, + BlockKind::SmoothQuartzSlab => true, + BlockKind::GraniteSlab => true, + BlockKind::AndesiteSlab => true, + BlockKind::RedNetherBrickSlab => true, + BlockKind::PolishedAndesiteSlab => true, + BlockKind::DioriteSlab => true, + BlockKind::BrickWall => true, + BlockKind::PrismarineWall => true, + BlockKind::RedSandstoneWall => true, + BlockKind::MossyStoneBrickWall => true, + BlockKind::GraniteWall => true, + BlockKind::StoneBrickWall => true, + BlockKind::NetherBrickWall => true, + BlockKind::AndesiteWall => true, + BlockKind::RedNetherBrickWall => true, + BlockKind::SandstoneWall => true, + BlockKind::EndStoneBrickWall => true, + BlockKind::DioriteWall => true, + BlockKind::Scaffolding => true, + BlockKind::Loom => true, + BlockKind::Barrel => true, + BlockKind::Smoker => true, + BlockKind::BlastFurnace => true, + BlockKind::CartographyTable => true, + BlockKind::FletchingTable => true, + BlockKind::Grindstone => true, + BlockKind::Lectern => true, + BlockKind::SmithingTable => true, + BlockKind::Stonecutter => true, + BlockKind::Bell => true, + BlockKind::Lantern => true, + BlockKind::SoulLantern => true, + BlockKind::Campfire => true, + BlockKind::SoulCampfire => true, + BlockKind::SweetBerryBush => false, + BlockKind::WarpedStem => true, + BlockKind::StrippedWarpedStem => true, + BlockKind::WarpedHyphae => true, + BlockKind::StrippedWarpedHyphae => true, + BlockKind::WarpedNylium => true, + BlockKind::WarpedFungus => false, + BlockKind::WarpedWartBlock => true, + BlockKind::WarpedRoots => false, + BlockKind::NetherSprouts => false, + BlockKind::CrimsonStem => true, + BlockKind::StrippedCrimsonStem => true, + BlockKind::CrimsonHyphae => true, + BlockKind::StrippedCrimsonHyphae => true, + BlockKind::CrimsonNylium => true, + BlockKind::CrimsonFungus => false, + BlockKind::Shroomlight => true, + BlockKind::WeepingVines => false, + BlockKind::WeepingVinesPlant => false, + BlockKind::TwistingVines => false, + BlockKind::TwistingVinesPlant => false, + BlockKind::CrimsonRoots => false, + BlockKind::CrimsonPlanks => true, + BlockKind::WarpedPlanks => true, + BlockKind::CrimsonSlab => true, + BlockKind::WarpedSlab => true, + BlockKind::CrimsonPressurePlate => false, + BlockKind::WarpedPressurePlate => false, + BlockKind::CrimsonFence => true, + BlockKind::WarpedFence => true, + BlockKind::CrimsonTrapdoor => true, + BlockKind::WarpedTrapdoor => true, + BlockKind::CrimsonFenceGate => true, + BlockKind::WarpedFenceGate => true, + BlockKind::CrimsonStairs => true, + BlockKind::WarpedStairs => true, + BlockKind::CrimsonButton => false, + BlockKind::WarpedButton => false, + BlockKind::CrimsonDoor => true, + BlockKind::WarpedDoor => true, + BlockKind::CrimsonSign => false, + BlockKind::WarpedSign => false, + BlockKind::CrimsonWallSign => false, + BlockKind::WarpedWallSign => false, + BlockKind::StructureBlock => true, + BlockKind::Jigsaw => true, + BlockKind::Composter => true, + BlockKind::Target => true, + BlockKind::BeeNest => true, + BlockKind::Beehive => true, + BlockKind::HoneyBlock => true, + BlockKind::HoneycombBlock => true, + BlockKind::NetheriteBlock => true, + BlockKind::AncientDebris => true, + BlockKind::CryingObsidian => true, + BlockKind::RespawnAnchor => true, + BlockKind::PottedCrimsonFungus => true, + BlockKind::PottedWarpedFungus => true, + BlockKind::PottedCrimsonRoots => true, + BlockKind::PottedWarpedRoots => true, + BlockKind::Lodestone => true, + BlockKind::Blackstone => true, + BlockKind::BlackstoneStairs => true, + BlockKind::BlackstoneWall => true, + BlockKind::BlackstoneSlab => true, + BlockKind::PolishedBlackstone => true, + BlockKind::PolishedBlackstoneBricks => true, + BlockKind::CrackedPolishedBlackstoneBricks => true, + BlockKind::ChiseledPolishedBlackstone => true, + BlockKind::PolishedBlackstoneBrickSlab => true, + BlockKind::PolishedBlackstoneBrickStairs => true, + BlockKind::PolishedBlackstoneBrickWall => true, + BlockKind::GildedBlackstone => true, + BlockKind::PolishedBlackstoneStairs => true, + BlockKind::PolishedBlackstoneSlab => true, + BlockKind::PolishedBlackstonePressurePlate => false, + BlockKind::PolishedBlackstoneButton => false, + BlockKind::PolishedBlackstoneWall => true, + BlockKind::ChiseledNetherBricks => true, + BlockKind::CrackedNetherBricks => true, + BlockKind::QuartzBricks => true, + } + } +} +#[allow(dead_code, non_upper_case_globals)] +const DIG_MULTIPLIERS_rock: &[(crate::Item, f32)] = &[ + (crate::Item::IronPickaxe, 6.0 as f32), + (crate::Item::WoodenPickaxe, 2.0 as f32), + (crate::Item::StonePickaxe, 4.0 as f32), + (crate::Item::DiamondPickaxe, 8.0 as f32), + (crate::Item::NetheritePickaxe, 9.0 as f32), + (crate::Item::GoldenPickaxe, 12.0 as f32), +]; +#[allow(dead_code, non_upper_case_globals)] +const DIG_MULTIPLIERS_wood: &[(crate::Item, f32)] = &[ + (crate::Item::IronAxe, 6.0 as f32), + (crate::Item::WoodenAxe, 2.0 as f32), + (crate::Item::StoneAxe, 4.0 as f32), + (crate::Item::DiamondAxe, 8.0 as f32), + (crate::Item::NetheriteAxe, 9.0 as f32), + (crate::Item::GoldenAxe, 12.0 as f32), +]; +#[allow(dead_code, non_upper_case_globals)] +const DIG_MULTIPLIERS_plant: &[(crate::Item, f32)] = &[ + (crate::Item::IronAxe, 6.0 as f32), + (crate::Item::IronSword, 1.5 as f32), + (crate::Item::WoodenSword, 1.5 as f32), + (crate::Item::WoodenAxe, 2.0 as f32), + (crate::Item::StoneSword, 1.5 as f32), + (crate::Item::StoneAxe, 4.0 as f32), + (crate::Item::DiamondSword, 1.5 as f32), + (crate::Item::DiamondAxe, 8.0 as f32), + (crate::Item::NetheriteAxe, 9.0 as f32), + (crate::Item::NetheriteSword, 1.5 as f32), + (crate::Item::GoldenSword, 1.5 as f32), + (crate::Item::GoldenAxe, 12.0 as f32), +]; +#[allow(dead_code, non_upper_case_globals)] +const DIG_MULTIPLIERS_melon: &[(crate::Item, f32)] = &[ + (crate::Item::IronSword, 1.5 as f32), + (crate::Item::WoodenSword, 1.5 as f32), + (crate::Item::StoneSword, 1.5 as f32), + (crate::Item::DiamondSword, 1.5 as f32), + (crate::Item::NetheriteSword, 1.5 as f32), + (crate::Item::GoldenSword, 1.5 as f32), +]; +#[allow(dead_code, non_upper_case_globals)] +const DIG_MULTIPLIERS_leaves: &[(crate::Item, f32)] = &[ + (crate::Item::IronSword, 1.5 as f32), + (crate::Item::WoodenSword, 1.5 as f32), + (crate::Item::StoneSword, 1.5 as f32), + (crate::Item::DiamondSword, 1.5 as f32), + (crate::Item::GoldenSword, 1.5 as f32), + (crate::Item::NetheriteSword, 1.5 as f32), + (crate::Item::Shears, 6.0 as f32), +]; +#[allow(dead_code, non_upper_case_globals)] +const DIG_MULTIPLIERS_dirt: &[(crate::Item, f32)] = &[ + (crate::Item::IronShovel, 6.0 as f32), + (crate::Item::WoodenShovel, 2.0 as f32), + (crate::Item::StoneShovel, 4.0 as f32), + (crate::Item::DiamondShovel, 8.0 as f32), + (crate::Item::NetheriteShovel, 9.0 as f32), + (crate::Item::GoldenShovel, 12.0 as f32), +]; +#[allow(dead_code, non_upper_case_globals)] +const DIG_MULTIPLIERS_web: &[(crate::Item, f32)] = &[ + (crate::Item::IronSword, 15.0 as f32), + (crate::Item::WoodenSword, 15.0 as f32), + (crate::Item::StoneSword, 15.0 as f32), + (crate::Item::DiamondSword, 15.0 as f32), + (crate::Item::GoldenSword, 15.0 as f32), + (crate::Item::NetheriteSword, 15.0 as f32), + (crate::Item::Shears, 15.0 as f32), +]; +#[allow(dead_code, non_upper_case_globals)] +const DIG_MULTIPLIERS_wool: &[(crate::Item, f32)] = &[(crate::Item::Shears, 4.8 as f32)]; +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `dig_multipliers` property of this `BlockKind`. + pub fn dig_multipliers(&self) -> &'static [(crate::Item, f32)] { + match self { + BlockKind::Air => &[], + BlockKind::Stone => DIG_MULTIPLIERS_rock, + BlockKind::Granite => DIG_MULTIPLIERS_rock, + BlockKind::PolishedGranite => DIG_MULTIPLIERS_rock, + BlockKind::Diorite => DIG_MULTIPLIERS_rock, + BlockKind::PolishedDiorite => DIG_MULTIPLIERS_rock, + BlockKind::Andesite => DIG_MULTIPLIERS_rock, + BlockKind::PolishedAndesite => DIG_MULTIPLIERS_rock, + BlockKind::GrassBlock => DIG_MULTIPLIERS_dirt, + BlockKind::Dirt => DIG_MULTIPLIERS_dirt, + BlockKind::CoarseDirt => DIG_MULTIPLIERS_plant, + BlockKind::Podzol => DIG_MULTIPLIERS_plant, + BlockKind::Cobblestone => DIG_MULTIPLIERS_rock, + BlockKind::OakPlanks => DIG_MULTIPLIERS_wood, + BlockKind::SprucePlanks => DIG_MULTIPLIERS_wood, + BlockKind::BirchPlanks => DIG_MULTIPLIERS_wood, + BlockKind::JunglePlanks => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaPlanks => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakPlanks => DIG_MULTIPLIERS_wood, + BlockKind::OakSapling => DIG_MULTIPLIERS_plant, + BlockKind::SpruceSapling => DIG_MULTIPLIERS_plant, + BlockKind::BirchSapling => DIG_MULTIPLIERS_plant, + BlockKind::JungleSapling => DIG_MULTIPLIERS_plant, + BlockKind::AcaciaSapling => DIG_MULTIPLIERS_plant, + BlockKind::DarkOakSapling => DIG_MULTIPLIERS_plant, + BlockKind::Bedrock => &[], + BlockKind::Water => &[], + BlockKind::Lava => &[], + BlockKind::Sand => DIG_MULTIPLIERS_dirt, + BlockKind::RedSand => DIG_MULTIPLIERS_dirt, + BlockKind::Gravel => DIG_MULTIPLIERS_dirt, + BlockKind::GoldOre => DIG_MULTIPLIERS_rock, + BlockKind::IronOre => DIG_MULTIPLIERS_rock, + BlockKind::CoalOre => DIG_MULTIPLIERS_rock, + BlockKind::NetherGoldOre => DIG_MULTIPLIERS_rock, + BlockKind::OakLog => DIG_MULTIPLIERS_wood, + BlockKind::SpruceLog => DIG_MULTIPLIERS_wood, + BlockKind::BirchLog => DIG_MULTIPLIERS_wood, + BlockKind::JungleLog => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaLog => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakLog => DIG_MULTIPLIERS_wood, + BlockKind::StrippedSpruceLog => DIG_MULTIPLIERS_wood, + BlockKind::StrippedBirchLog => DIG_MULTIPLIERS_wood, + BlockKind::StrippedJungleLog => DIG_MULTIPLIERS_wood, + BlockKind::StrippedAcaciaLog => DIG_MULTIPLIERS_wood, + BlockKind::StrippedDarkOakLog => DIG_MULTIPLIERS_wood, + BlockKind::StrippedOakLog => DIG_MULTIPLIERS_wood, + BlockKind::OakWood => DIG_MULTIPLIERS_wood, + BlockKind::SpruceWood => DIG_MULTIPLIERS_wood, + BlockKind::BirchWood => DIG_MULTIPLIERS_wood, + BlockKind::JungleWood => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaWood => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakWood => DIG_MULTIPLIERS_wood, + BlockKind::StrippedOakWood => DIG_MULTIPLIERS_wood, + BlockKind::StrippedSpruceWood => DIG_MULTIPLIERS_wood, + BlockKind::StrippedBirchWood => DIG_MULTIPLIERS_wood, + BlockKind::StrippedJungleWood => DIG_MULTIPLIERS_wood, + BlockKind::StrippedAcaciaWood => DIG_MULTIPLIERS_wood, + BlockKind::StrippedDarkOakWood => DIG_MULTIPLIERS_wood, + BlockKind::OakLeaves => DIG_MULTIPLIERS_plant, + BlockKind::SpruceLeaves => DIG_MULTIPLIERS_plant, + BlockKind::BirchLeaves => DIG_MULTIPLIERS_plant, + BlockKind::JungleLeaves => DIG_MULTIPLIERS_plant, + BlockKind::AcaciaLeaves => DIG_MULTIPLIERS_plant, + BlockKind::DarkOakLeaves => DIG_MULTIPLIERS_plant, + BlockKind::Sponge => &[], + BlockKind::WetSponge => &[], + BlockKind::Glass => &[], + BlockKind::LapisOre => DIG_MULTIPLIERS_rock, + BlockKind::LapisBlock => DIG_MULTIPLIERS_rock, + BlockKind::Dispenser => DIG_MULTIPLIERS_rock, + BlockKind::Sandstone => DIG_MULTIPLIERS_rock, + BlockKind::ChiseledSandstone => DIG_MULTIPLIERS_rock, + BlockKind::CutSandstone => DIG_MULTIPLIERS_rock, + BlockKind::NoteBlock => DIG_MULTIPLIERS_wood, + BlockKind::WhiteBed => &[], + BlockKind::OrangeBed => &[], + BlockKind::MagentaBed => &[], + BlockKind::LightBlueBed => &[], + BlockKind::YellowBed => &[], + BlockKind::LimeBed => &[], + BlockKind::PinkBed => &[], + BlockKind::GrayBed => &[], + BlockKind::LightGrayBed => &[], + BlockKind::CyanBed => &[], + BlockKind::PurpleBed => &[], + BlockKind::BlueBed => &[], + BlockKind::BrownBed => &[], + BlockKind::GreenBed => &[], + BlockKind::RedBed => &[], + BlockKind::BlackBed => &[], + BlockKind::PoweredRail => DIG_MULTIPLIERS_rock, + BlockKind::DetectorRail => DIG_MULTIPLIERS_rock, + BlockKind::StickyPiston => &[], + BlockKind::Cobweb => DIG_MULTIPLIERS_web, + BlockKind::Grass => DIG_MULTIPLIERS_plant, + BlockKind::Fern => DIG_MULTIPLIERS_plant, + BlockKind::DeadBush => DIG_MULTIPLIERS_plant, + BlockKind::Seagrass => DIG_MULTIPLIERS_plant, + BlockKind::TallSeagrass => DIG_MULTIPLIERS_plant, + BlockKind::Piston => &[], + BlockKind::PistonHead => &[], + BlockKind::WhiteWool => DIG_MULTIPLIERS_wool, + BlockKind::OrangeWool => DIG_MULTIPLIERS_wool, + BlockKind::MagentaWool => DIG_MULTIPLIERS_wool, + BlockKind::LightBlueWool => DIG_MULTIPLIERS_wool, + BlockKind::YellowWool => DIG_MULTIPLIERS_wool, + BlockKind::LimeWool => DIG_MULTIPLIERS_wool, + BlockKind::PinkWool => DIG_MULTIPLIERS_wool, + BlockKind::GrayWool => DIG_MULTIPLIERS_wool, + BlockKind::LightGrayWool => DIG_MULTIPLIERS_wool, + BlockKind::CyanWool => DIG_MULTIPLIERS_wool, + BlockKind::PurpleWool => DIG_MULTIPLIERS_wool, + BlockKind::BlueWool => DIG_MULTIPLIERS_wool, + BlockKind::BrownWool => DIG_MULTIPLIERS_wool, + BlockKind::GreenWool => DIG_MULTIPLIERS_wool, + BlockKind::RedWool => DIG_MULTIPLIERS_wool, + BlockKind::BlackWool => DIG_MULTIPLIERS_wool, + BlockKind::MovingPiston => &[], + BlockKind::Dandelion => DIG_MULTIPLIERS_plant, + BlockKind::Poppy => DIG_MULTIPLIERS_plant, + BlockKind::BlueOrchid => DIG_MULTIPLIERS_plant, + BlockKind::Allium => DIG_MULTIPLIERS_plant, + BlockKind::AzureBluet => DIG_MULTIPLIERS_plant, + BlockKind::RedTulip => DIG_MULTIPLIERS_plant, + BlockKind::OrangeTulip => DIG_MULTIPLIERS_plant, + BlockKind::WhiteTulip => DIG_MULTIPLIERS_plant, + BlockKind::PinkTulip => DIG_MULTIPLIERS_plant, + BlockKind::OxeyeDaisy => DIG_MULTIPLIERS_plant, + BlockKind::Cornflower => DIG_MULTIPLIERS_plant, + BlockKind::WitherRose => DIG_MULTIPLIERS_plant, + BlockKind::LilyOfTheValley => DIG_MULTIPLIERS_plant, + BlockKind::BrownMushroom => DIG_MULTIPLIERS_plant, + BlockKind::RedMushroom => DIG_MULTIPLIERS_plant, + BlockKind::GoldBlock => DIG_MULTIPLIERS_rock, + BlockKind::IronBlock => DIG_MULTIPLIERS_rock, + BlockKind::Bricks => DIG_MULTIPLIERS_rock, + BlockKind::Tnt => &[], + BlockKind::Bookshelf => DIG_MULTIPLIERS_wood, + BlockKind::MossyCobblestone => DIG_MULTIPLIERS_rock, + BlockKind::Obsidian => DIG_MULTIPLIERS_rock, + BlockKind::Torch => &[], + BlockKind::WallTorch => &[], + BlockKind::Fire => &[], + BlockKind::SoulFire => &[], + BlockKind::Spawner => DIG_MULTIPLIERS_rock, + BlockKind::OakStairs => DIG_MULTIPLIERS_wood, + BlockKind::Chest => DIG_MULTIPLIERS_wood, + BlockKind::RedstoneWire => &[], + BlockKind::DiamondOre => DIG_MULTIPLIERS_rock, + BlockKind::DiamondBlock => DIG_MULTIPLIERS_rock, + BlockKind::CraftingTable => DIG_MULTIPLIERS_wood, + BlockKind::Wheat => DIG_MULTIPLIERS_plant, + BlockKind::Farmland => DIG_MULTIPLIERS_dirt, + BlockKind::Furnace => DIG_MULTIPLIERS_rock, + BlockKind::OakSign => DIG_MULTIPLIERS_wood, + BlockKind::SpruceSign => DIG_MULTIPLIERS_wood, + BlockKind::BirchSign => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaSign => DIG_MULTIPLIERS_wood, + BlockKind::JungleSign => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakSign => DIG_MULTIPLIERS_wood, + BlockKind::OakDoor => DIG_MULTIPLIERS_wood, + BlockKind::Ladder => &[], + BlockKind::Rail => DIG_MULTIPLIERS_rock, + BlockKind::CobblestoneStairs => DIG_MULTIPLIERS_rock, + BlockKind::OakWallSign => DIG_MULTIPLIERS_wood, + BlockKind::SpruceWallSign => DIG_MULTIPLIERS_wood, + BlockKind::BirchWallSign => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaWallSign => DIG_MULTIPLIERS_wood, + BlockKind::JungleWallSign => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakWallSign => DIG_MULTIPLIERS_wood, + BlockKind::Lever => &[], + BlockKind::StonePressurePlate => DIG_MULTIPLIERS_rock, + BlockKind::IronDoor => DIG_MULTIPLIERS_rock, + BlockKind::OakPressurePlate => DIG_MULTIPLIERS_wood, + BlockKind::SprucePressurePlate => DIG_MULTIPLIERS_wood, + BlockKind::BirchPressurePlate => DIG_MULTIPLIERS_wood, + BlockKind::JunglePressurePlate => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaPressurePlate => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakPressurePlate => DIG_MULTIPLIERS_wood, + BlockKind::RedstoneOre => DIG_MULTIPLIERS_rock, + BlockKind::RedstoneTorch => &[], + BlockKind::RedstoneWallTorch => &[], + BlockKind::StoneButton => DIG_MULTIPLIERS_rock, + BlockKind::Snow => DIG_MULTIPLIERS_dirt, + BlockKind::Ice => DIG_MULTIPLIERS_rock, + BlockKind::SnowBlock => DIG_MULTIPLIERS_dirt, + BlockKind::Cactus => DIG_MULTIPLIERS_plant, + BlockKind::Clay => DIG_MULTIPLIERS_dirt, + BlockKind::SugarCane => DIG_MULTIPLIERS_plant, + BlockKind::Jukebox => DIG_MULTIPLIERS_wood, + BlockKind::OakFence => DIG_MULTIPLIERS_wood, + BlockKind::Pumpkin => DIG_MULTIPLIERS_plant, + BlockKind::Netherrack => DIG_MULTIPLIERS_rock, + BlockKind::SoulSand => DIG_MULTIPLIERS_dirt, + BlockKind::SoulSoil => DIG_MULTIPLIERS_dirt, + BlockKind::Basalt => DIG_MULTIPLIERS_rock, + BlockKind::PolishedBasalt => DIG_MULTIPLIERS_rock, + BlockKind::SoulTorch => &[], + BlockKind::SoulWallTorch => &[], + BlockKind::Glowstone => &[], + BlockKind::NetherPortal => &[], + BlockKind::CarvedPumpkin => DIG_MULTIPLIERS_plant, + BlockKind::JackOLantern => DIG_MULTIPLIERS_plant, + BlockKind::Cake => &[], + BlockKind::Repeater => &[], + BlockKind::WhiteStainedGlass => &[], + BlockKind::OrangeStainedGlass => &[], + BlockKind::MagentaStainedGlass => &[], + BlockKind::LightBlueStainedGlass => &[], + BlockKind::YellowStainedGlass => &[], + BlockKind::LimeStainedGlass => &[], + BlockKind::PinkStainedGlass => &[], + BlockKind::GrayStainedGlass => &[], + BlockKind::LightGrayStainedGlass => &[], + BlockKind::CyanStainedGlass => &[], + BlockKind::PurpleStainedGlass => &[], + BlockKind::BlueStainedGlass => &[], + BlockKind::BrownStainedGlass => &[], + BlockKind::GreenStainedGlass => &[], + BlockKind::RedStainedGlass => &[], + BlockKind::BlackStainedGlass => &[], + BlockKind::OakTrapdoor => DIG_MULTIPLIERS_wood, + BlockKind::SpruceTrapdoor => DIG_MULTIPLIERS_wood, + BlockKind::BirchTrapdoor => DIG_MULTIPLIERS_wood, + BlockKind::JungleTrapdoor => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaTrapdoor => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakTrapdoor => DIG_MULTIPLIERS_wood, + BlockKind::StoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::MossyStoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::CrackedStoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::ChiseledStoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::InfestedStone => DIG_MULTIPLIERS_rock, + BlockKind::InfestedCobblestone => DIG_MULTIPLIERS_rock, + BlockKind::InfestedStoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::InfestedMossyStoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::InfestedCrackedStoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::InfestedChiseledStoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::BrownMushroomBlock => DIG_MULTIPLIERS_wood, + BlockKind::RedMushroomBlock => DIG_MULTIPLIERS_wood, + BlockKind::MushroomStem => DIG_MULTIPLIERS_wood, + BlockKind::IronBars => DIG_MULTIPLIERS_rock, + BlockKind::Chain => DIG_MULTIPLIERS_rock, + BlockKind::GlassPane => &[], + BlockKind::Melon => DIG_MULTIPLIERS_plant, + BlockKind::AttachedPumpkinStem => DIG_MULTIPLIERS_plant, + BlockKind::AttachedMelonStem => DIG_MULTIPLIERS_plant, + BlockKind::PumpkinStem => DIG_MULTIPLIERS_plant, + BlockKind::MelonStem => DIG_MULTIPLIERS_plant, + BlockKind::Vine => DIG_MULTIPLIERS_plant, + BlockKind::OakFenceGate => DIG_MULTIPLIERS_wood, + BlockKind::BrickStairs => DIG_MULTIPLIERS_rock, + BlockKind::StoneBrickStairs => DIG_MULTIPLIERS_rock, + BlockKind::Mycelium => DIG_MULTIPLIERS_dirt, + BlockKind::LilyPad => DIG_MULTIPLIERS_plant, + BlockKind::NetherBricks => DIG_MULTIPLIERS_rock, + BlockKind::NetherBrickFence => DIG_MULTIPLIERS_rock, + BlockKind::NetherBrickStairs => DIG_MULTIPLIERS_rock, + BlockKind::NetherWart => DIG_MULTIPLIERS_plant, + BlockKind::EnchantingTable => DIG_MULTIPLIERS_rock, + BlockKind::BrewingStand => DIG_MULTIPLIERS_rock, + BlockKind::Cauldron => DIG_MULTIPLIERS_rock, + BlockKind::EndPortal => &[], + BlockKind::EndPortalFrame => &[], + BlockKind::EndStone => DIG_MULTIPLIERS_rock, + BlockKind::DragonEgg => &[], + BlockKind::RedstoneLamp => &[], + BlockKind::Cocoa => DIG_MULTIPLIERS_plant, + BlockKind::SandstoneStairs => DIG_MULTIPLIERS_rock, + BlockKind::EmeraldOre => DIG_MULTIPLIERS_rock, + BlockKind::EnderChest => DIG_MULTIPLIERS_rock, + BlockKind::TripwireHook => &[], + BlockKind::Tripwire => &[], + BlockKind::EmeraldBlock => DIG_MULTIPLIERS_rock, + BlockKind::SpruceStairs => DIG_MULTIPLIERS_wood, + BlockKind::BirchStairs => DIG_MULTIPLIERS_wood, + BlockKind::JungleStairs => DIG_MULTIPLIERS_wood, + BlockKind::CommandBlock => &[], + BlockKind::Beacon => &[], + BlockKind::CobblestoneWall => DIG_MULTIPLIERS_rock, + BlockKind::MossyCobblestoneWall => DIG_MULTIPLIERS_rock, + BlockKind::FlowerPot => &[], + BlockKind::PottedOakSapling => &[], + BlockKind::PottedSpruceSapling => &[], + BlockKind::PottedBirchSapling => &[], + BlockKind::PottedJungleSapling => &[], + BlockKind::PottedAcaciaSapling => &[], + BlockKind::PottedDarkOakSapling => &[], + BlockKind::PottedFern => &[], + BlockKind::PottedDandelion => DIG_MULTIPLIERS_plant, + BlockKind::PottedPoppy => &[], + BlockKind::PottedBlueOrchid => &[], + BlockKind::PottedAllium => &[], + BlockKind::PottedAzureBluet => &[], + BlockKind::PottedRedTulip => &[], + BlockKind::PottedOrangeTulip => &[], + BlockKind::PottedWhiteTulip => &[], + BlockKind::PottedPinkTulip => &[], + BlockKind::PottedOxeyeDaisy => &[], + BlockKind::PottedCornflower => &[], + BlockKind::PottedLilyOfTheValley => &[], + BlockKind::PottedWitherRose => &[], + BlockKind::PottedRedMushroom => &[], + BlockKind::PottedBrownMushroom => &[], + BlockKind::PottedDeadBush => &[], + BlockKind::PottedCactus => &[], + BlockKind::Carrots => DIG_MULTIPLIERS_plant, + BlockKind::Potatoes => DIG_MULTIPLIERS_plant, + BlockKind::OakButton => DIG_MULTIPLIERS_wood, + BlockKind::SpruceButton => DIG_MULTIPLIERS_wood, + BlockKind::BirchButton => DIG_MULTIPLIERS_wood, + BlockKind::JungleButton => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaButton => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakButton => DIG_MULTIPLIERS_wood, + BlockKind::SkeletonSkull => &[], + BlockKind::SkeletonWallSkull => &[], + BlockKind::WitherSkeletonSkull => &[], + BlockKind::WitherSkeletonWallSkull => &[], + BlockKind::ZombieHead => &[], + BlockKind::ZombieWallHead => &[], + BlockKind::PlayerHead => &[], + BlockKind::PlayerWallHead => &[], + BlockKind::CreeperHead => &[], + BlockKind::CreeperWallHead => &[], + BlockKind::DragonHead => &[], + BlockKind::DragonWallHead => &[], + BlockKind::Anvil => DIG_MULTIPLIERS_rock, + BlockKind::ChippedAnvil => DIG_MULTIPLIERS_rock, + BlockKind::DamagedAnvil => DIG_MULTIPLIERS_rock, + BlockKind::TrappedChest => DIG_MULTIPLIERS_wood, + BlockKind::LightWeightedPressurePlate => DIG_MULTIPLIERS_rock, + BlockKind::HeavyWeightedPressurePlate => DIG_MULTIPLIERS_rock, + BlockKind::Comparator => &[], + BlockKind::DaylightDetector => DIG_MULTIPLIERS_wood, + BlockKind::RedstoneBlock => DIG_MULTIPLIERS_rock, + BlockKind::NetherQuartzOre => DIG_MULTIPLIERS_rock, + BlockKind::Hopper => DIG_MULTIPLIERS_rock, + BlockKind::QuartzBlock => DIG_MULTIPLIERS_rock, + BlockKind::ChiseledQuartzBlock => DIG_MULTIPLIERS_rock, + BlockKind::QuartzPillar => DIG_MULTIPLIERS_rock, + BlockKind::QuartzStairs => DIG_MULTIPLIERS_rock, + BlockKind::ActivatorRail => DIG_MULTIPLIERS_rock, + BlockKind::Dropper => DIG_MULTIPLIERS_rock, + BlockKind::WhiteTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::OrangeTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::MagentaTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::LightBlueTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::YellowTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::LimeTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::PinkTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::GrayTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::LightGrayTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::CyanTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::PurpleTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::BlueTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::BrownTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::GreenTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::RedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::BlackTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::WhiteStainedGlassPane => &[], + BlockKind::OrangeStainedGlassPane => &[], + BlockKind::MagentaStainedGlassPane => &[], + BlockKind::LightBlueStainedGlassPane => &[], + BlockKind::YellowStainedGlassPane => &[], + BlockKind::LimeStainedGlassPane => &[], + BlockKind::PinkStainedGlassPane => &[], + BlockKind::GrayStainedGlassPane => &[], + BlockKind::LightGrayStainedGlassPane => &[], + BlockKind::CyanStainedGlassPane => &[], + BlockKind::PurpleStainedGlassPane => &[], + BlockKind::BlueStainedGlassPane => &[], + BlockKind::BrownStainedGlassPane => &[], + BlockKind::GreenStainedGlassPane => &[], + BlockKind::RedStainedGlassPane => &[], + BlockKind::BlackStainedGlassPane => &[], + BlockKind::AcaciaStairs => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakStairs => DIG_MULTIPLIERS_wood, + BlockKind::SlimeBlock => &[], + BlockKind::Barrier => &[], + BlockKind::IronTrapdoor => DIG_MULTIPLIERS_rock, + BlockKind::Prismarine => DIG_MULTIPLIERS_rock, + BlockKind::PrismarineBricks => DIG_MULTIPLIERS_rock, + BlockKind::DarkPrismarine => DIG_MULTIPLIERS_rock, + BlockKind::PrismarineStairs => DIG_MULTIPLIERS_rock, + BlockKind::PrismarineBrickStairs => DIG_MULTIPLIERS_rock, + BlockKind::DarkPrismarineStairs => DIG_MULTIPLIERS_rock, + BlockKind::PrismarineSlab => DIG_MULTIPLIERS_rock, + BlockKind::PrismarineBrickSlab => DIG_MULTIPLIERS_rock, + BlockKind::DarkPrismarineSlab => DIG_MULTIPLIERS_rock, + BlockKind::SeaLantern => &[], + BlockKind::HayBlock => &[], + BlockKind::WhiteCarpet => &[], + BlockKind::OrangeCarpet => &[], + BlockKind::MagentaCarpet => &[], + BlockKind::LightBlueCarpet => &[], + BlockKind::YellowCarpet => &[], + BlockKind::LimeCarpet => &[], + BlockKind::PinkCarpet => &[], + BlockKind::GrayCarpet => &[], + BlockKind::LightGrayCarpet => &[], + BlockKind::CyanCarpet => &[], + BlockKind::PurpleCarpet => &[], + BlockKind::BlueCarpet => &[], + BlockKind::BrownCarpet => &[], + BlockKind::GreenCarpet => &[], + BlockKind::RedCarpet => &[], + BlockKind::BlackCarpet => &[], + BlockKind::Terracotta => DIG_MULTIPLIERS_rock, + BlockKind::CoalBlock => DIG_MULTIPLIERS_rock, + BlockKind::PackedIce => DIG_MULTIPLIERS_rock, + BlockKind::Sunflower => DIG_MULTIPLIERS_plant, + BlockKind::Lilac => DIG_MULTIPLIERS_plant, + BlockKind::RoseBush => DIG_MULTIPLIERS_plant, + BlockKind::Peony => DIG_MULTIPLIERS_rock, + BlockKind::TallGrass => DIG_MULTIPLIERS_plant, + BlockKind::LargeFern => DIG_MULTIPLIERS_plant, + BlockKind::WhiteBanner => DIG_MULTIPLIERS_wood, + BlockKind::OrangeBanner => DIG_MULTIPLIERS_wood, + BlockKind::MagentaBanner => DIG_MULTIPLIERS_wood, + BlockKind::LightBlueBanner => DIG_MULTIPLIERS_wood, + BlockKind::YellowBanner => DIG_MULTIPLIERS_wood, + BlockKind::LimeBanner => DIG_MULTIPLIERS_wood, + BlockKind::PinkBanner => DIG_MULTIPLIERS_wood, + BlockKind::GrayBanner => DIG_MULTIPLIERS_wood, + BlockKind::LightGrayBanner => DIG_MULTIPLIERS_wood, + BlockKind::CyanBanner => DIG_MULTIPLIERS_wood, + BlockKind::PurpleBanner => DIG_MULTIPLIERS_wood, + BlockKind::BlueBanner => DIG_MULTIPLIERS_wood, + BlockKind::BrownBanner => DIG_MULTIPLIERS_wood, + BlockKind::GreenBanner => DIG_MULTIPLIERS_wood, + BlockKind::RedBanner => DIG_MULTIPLIERS_wood, + BlockKind::BlackBanner => DIG_MULTIPLIERS_wood, + BlockKind::WhiteWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::OrangeWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::MagentaWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::LightBlueWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::YellowWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::LimeWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::PinkWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::GrayWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::LightGrayWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::CyanWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::PurpleWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::BlueWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::BrownWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::GreenWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::RedWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::BlackWallBanner => DIG_MULTIPLIERS_wood, + BlockKind::RedSandstone => DIG_MULTIPLIERS_rock, + BlockKind::ChiseledRedSandstone => DIG_MULTIPLIERS_rock, + BlockKind::CutRedSandstone => DIG_MULTIPLIERS_rock, + BlockKind::RedSandstoneStairs => DIG_MULTIPLIERS_rock, + BlockKind::OakSlab => DIG_MULTIPLIERS_rock, + BlockKind::SpruceSlab => DIG_MULTIPLIERS_rock, + BlockKind::BirchSlab => DIG_MULTIPLIERS_rock, + BlockKind::JungleSlab => DIG_MULTIPLIERS_rock, + BlockKind::AcaciaSlab => DIG_MULTIPLIERS_rock, + BlockKind::DarkOakSlab => DIG_MULTIPLIERS_rock, + BlockKind::StoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::SmoothStoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::SandstoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::CutSandstoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::PetrifiedOakSlab => DIG_MULTIPLIERS_rock, + BlockKind::CobblestoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::BrickSlab => DIG_MULTIPLIERS_rock, + BlockKind::StoneBrickSlab => DIG_MULTIPLIERS_rock, + BlockKind::NetherBrickSlab => DIG_MULTIPLIERS_rock, + BlockKind::QuartzSlab => DIG_MULTIPLIERS_rock, + BlockKind::RedSandstoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::CutRedSandstoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::PurpurSlab => DIG_MULTIPLIERS_rock, + BlockKind::SmoothStone => DIG_MULTIPLIERS_rock, + BlockKind::SmoothSandstone => DIG_MULTIPLIERS_rock, + BlockKind::SmoothQuartz => DIG_MULTIPLIERS_rock, + BlockKind::SmoothRedSandstone => DIG_MULTIPLIERS_rock, + BlockKind::SpruceFenceGate => DIG_MULTIPLIERS_wood, + BlockKind::BirchFenceGate => DIG_MULTIPLIERS_wood, + BlockKind::JungleFenceGate => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaFenceGate => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakFenceGate => DIG_MULTIPLIERS_wood, + BlockKind::SpruceFence => DIG_MULTIPLIERS_wood, + BlockKind::BirchFence => DIG_MULTIPLIERS_wood, + BlockKind::JungleFence => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaFence => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakFence => DIG_MULTIPLIERS_wood, + BlockKind::SpruceDoor => DIG_MULTIPLIERS_wood, + BlockKind::BirchDoor => DIG_MULTIPLIERS_wood, + BlockKind::JungleDoor => DIG_MULTIPLIERS_wood, + BlockKind::AcaciaDoor => DIG_MULTIPLIERS_wood, + BlockKind::DarkOakDoor => DIG_MULTIPLIERS_wood, + BlockKind::EndRod => &[], + BlockKind::ChorusPlant => &[], + BlockKind::ChorusFlower => &[], + BlockKind::PurpurBlock => &[], + BlockKind::PurpurPillar => &[], + BlockKind::PurpurStairs => DIG_MULTIPLIERS_rock, + BlockKind::EndStoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::Beetroots => &[], + BlockKind::GrassPath => DIG_MULTIPLIERS_dirt, + BlockKind::EndGateway => &[], + BlockKind::RepeatingCommandBlock => &[], + BlockKind::ChainCommandBlock => &[], + BlockKind::FrostedIce => &[], + BlockKind::MagmaBlock => &[], + BlockKind::NetherWartBlock => &[], + BlockKind::RedNetherBricks => &[], + BlockKind::BoneBlock => &[], + BlockKind::StructureVoid => &[], + BlockKind::Observer => &[], + BlockKind::ShulkerBox => &[], + BlockKind::WhiteShulkerBox => &[], + BlockKind::OrangeShulkerBox => &[], + BlockKind::MagentaShulkerBox => &[], + BlockKind::LightBlueShulkerBox => &[], + BlockKind::YellowShulkerBox => &[], + BlockKind::LimeShulkerBox => &[], + BlockKind::PinkShulkerBox => &[], + BlockKind::GrayShulkerBox => &[], + BlockKind::LightGrayShulkerBox => &[], + BlockKind::CyanShulkerBox => &[], + BlockKind::PurpleShulkerBox => &[], + BlockKind::BlueShulkerBox => &[], + BlockKind::BrownShulkerBox => &[], + BlockKind::GreenShulkerBox => &[], + BlockKind::RedShulkerBox => &[], + BlockKind::BlackShulkerBox => &[], + BlockKind::WhiteGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::OrangeGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::MagentaGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::LightBlueGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::YellowGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::LimeGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::PinkGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::GrayGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::LightGrayGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::CyanGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::PurpleGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::BlueGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::BrownGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::GreenGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::RedGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::BlackGlazedTerracotta => DIG_MULTIPLIERS_rock, + BlockKind::WhiteConcrete => DIG_MULTIPLIERS_rock, + BlockKind::OrangeConcrete => DIG_MULTIPLIERS_rock, + BlockKind::MagentaConcrete => DIG_MULTIPLIERS_rock, + BlockKind::LightBlueConcrete => DIG_MULTIPLIERS_rock, + BlockKind::YellowConcrete => DIG_MULTIPLIERS_rock, + BlockKind::LimeConcrete => DIG_MULTIPLIERS_rock, + BlockKind::PinkConcrete => DIG_MULTIPLIERS_rock, + BlockKind::GrayConcrete => DIG_MULTIPLIERS_rock, + BlockKind::LightGrayConcrete => DIG_MULTIPLIERS_rock, + BlockKind::CyanConcrete => DIG_MULTIPLIERS_rock, + BlockKind::PurpleConcrete => DIG_MULTIPLIERS_rock, + BlockKind::BlueConcrete => DIG_MULTIPLIERS_rock, + BlockKind::BrownConcrete => DIG_MULTIPLIERS_rock, + BlockKind::GreenConcrete => DIG_MULTIPLIERS_rock, + BlockKind::RedConcrete => DIG_MULTIPLIERS_rock, + BlockKind::BlackConcrete => DIG_MULTIPLIERS_rock, + BlockKind::WhiteConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::OrangeConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::MagentaConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::LightBlueConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::YellowConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::LimeConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::PinkConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::GrayConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::LightGrayConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::CyanConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::PurpleConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::BlueConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::BrownConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::GreenConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::RedConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::BlackConcretePowder => DIG_MULTIPLIERS_dirt, + BlockKind::Kelp => &[], + BlockKind::KelpPlant => &[], + BlockKind::DriedKelpBlock => &[], + BlockKind::TurtleEgg => &[], + BlockKind::DeadTubeCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::DeadBrainCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::DeadBubbleCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::DeadFireCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::DeadHornCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::TubeCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::BrainCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::BubbleCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::FireCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::HornCoralBlock => DIG_MULTIPLIERS_rock, + BlockKind::DeadTubeCoral => &[], + BlockKind::DeadBrainCoral => &[], + BlockKind::DeadBubbleCoral => &[], + BlockKind::DeadFireCoral => &[], + BlockKind::DeadHornCoral => &[], + BlockKind::TubeCoral => &[], + BlockKind::BrainCoral => &[], + BlockKind::BubbleCoral => &[], + BlockKind::FireCoral => &[], + BlockKind::HornCoral => &[], + BlockKind::DeadTubeCoralFan => &[], + BlockKind::DeadBrainCoralFan => &[], + BlockKind::DeadBubbleCoralFan => &[], + BlockKind::DeadFireCoralFan => &[], + BlockKind::DeadHornCoralFan => &[], + BlockKind::TubeCoralFan => &[], + BlockKind::BrainCoralFan => &[], + BlockKind::BubbleCoralFan => &[], + BlockKind::FireCoralFan => &[], + BlockKind::HornCoralFan => &[], + BlockKind::DeadTubeCoralWallFan => &[], + BlockKind::DeadBrainCoralWallFan => &[], + BlockKind::DeadBubbleCoralWallFan => &[], + BlockKind::DeadFireCoralWallFan => &[], + BlockKind::DeadHornCoralWallFan => &[], + BlockKind::TubeCoralWallFan => &[], + BlockKind::BrainCoralWallFan => &[], + BlockKind::BubbleCoralWallFan => &[], + BlockKind::FireCoralWallFan => &[], + BlockKind::HornCoralWallFan => &[], + BlockKind::SeaPickle => &[], + BlockKind::BlueIce => &[], + BlockKind::Conduit => DIG_MULTIPLIERS_rock, + BlockKind::BambooSapling => &[], + BlockKind::Bamboo => &[], + BlockKind::PottedBamboo => &[], + BlockKind::VoidAir => &[], + BlockKind::CaveAir => &[], + BlockKind::BubbleColumn => &[], + BlockKind::PolishedGraniteStairs => DIG_MULTIPLIERS_rock, + BlockKind::SmoothRedSandstoneStairs => DIG_MULTIPLIERS_rock, + BlockKind::MossyStoneBrickStairs => DIG_MULTIPLIERS_rock, + BlockKind::PolishedDioriteStairs => DIG_MULTIPLIERS_rock, + BlockKind::MossyCobblestoneStairs => DIG_MULTIPLIERS_rock, + BlockKind::EndStoneBrickStairs => DIG_MULTIPLIERS_rock, + BlockKind::StoneStairs => DIG_MULTIPLIERS_rock, + BlockKind::SmoothSandstoneStairs => DIG_MULTIPLIERS_rock, + BlockKind::SmoothQuartzStairs => DIG_MULTIPLIERS_rock, + BlockKind::GraniteStairs => DIG_MULTIPLIERS_rock, + BlockKind::AndesiteStairs => DIG_MULTIPLIERS_rock, + BlockKind::RedNetherBrickStairs => DIG_MULTIPLIERS_rock, + BlockKind::PolishedAndesiteStairs => DIG_MULTIPLIERS_rock, + BlockKind::DioriteStairs => DIG_MULTIPLIERS_rock, + BlockKind::PolishedGraniteSlab => DIG_MULTIPLIERS_rock, + BlockKind::SmoothRedSandstoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::MossyStoneBrickSlab => DIG_MULTIPLIERS_rock, + BlockKind::PolishedDioriteSlab => DIG_MULTIPLIERS_rock, + BlockKind::MossyCobblestoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::EndStoneBrickSlab => DIG_MULTIPLIERS_rock, + BlockKind::SmoothSandstoneSlab => DIG_MULTIPLIERS_rock, + BlockKind::SmoothQuartzSlab => DIG_MULTIPLIERS_rock, + BlockKind::GraniteSlab => DIG_MULTIPLIERS_rock, + BlockKind::AndesiteSlab => DIG_MULTIPLIERS_rock, + BlockKind::RedNetherBrickSlab => DIG_MULTIPLIERS_rock, + BlockKind::PolishedAndesiteSlab => DIG_MULTIPLIERS_rock, + BlockKind::DioriteSlab => DIG_MULTIPLIERS_rock, + BlockKind::BrickWall => DIG_MULTIPLIERS_rock, + BlockKind::PrismarineWall => DIG_MULTIPLIERS_rock, + BlockKind::RedSandstoneWall => DIG_MULTIPLIERS_rock, + BlockKind::MossyStoneBrickWall => DIG_MULTIPLIERS_rock, + BlockKind::GraniteWall => DIG_MULTIPLIERS_rock, + BlockKind::StoneBrickWall => DIG_MULTIPLIERS_rock, + BlockKind::NetherBrickWall => DIG_MULTIPLIERS_rock, + BlockKind::AndesiteWall => DIG_MULTIPLIERS_rock, + BlockKind::RedNetherBrickWall => DIG_MULTIPLIERS_rock, + BlockKind::SandstoneWall => DIG_MULTIPLIERS_rock, + BlockKind::EndStoneBrickWall => DIG_MULTIPLIERS_rock, + BlockKind::DioriteWall => DIG_MULTIPLIERS_rock, + BlockKind::Scaffolding => &[], + BlockKind::Loom => DIG_MULTIPLIERS_wood, + BlockKind::Barrel => DIG_MULTIPLIERS_wood, + BlockKind::Smoker => DIG_MULTIPLIERS_rock, + BlockKind::BlastFurnace => DIG_MULTIPLIERS_rock, + BlockKind::CartographyTable => DIG_MULTIPLIERS_wood, + BlockKind::FletchingTable => DIG_MULTIPLIERS_wood, + BlockKind::Grindstone => DIG_MULTIPLIERS_rock, + BlockKind::Lectern => DIG_MULTIPLIERS_wood, + BlockKind::SmithingTable => DIG_MULTIPLIERS_wood, + BlockKind::Stonecutter => DIG_MULTIPLIERS_rock, + BlockKind::Bell => DIG_MULTIPLIERS_rock, + BlockKind::Lantern => DIG_MULTIPLIERS_rock, + BlockKind::SoulLantern => DIG_MULTIPLIERS_rock, + BlockKind::Campfire => DIG_MULTIPLIERS_wood, + BlockKind::SoulCampfire => DIG_MULTIPLIERS_wood, + BlockKind::SweetBerryBush => &[], + BlockKind::WarpedStem => DIG_MULTIPLIERS_wood, + BlockKind::StrippedWarpedStem => DIG_MULTIPLIERS_wood, + BlockKind::WarpedHyphae => DIG_MULTIPLIERS_wood, + BlockKind::StrippedWarpedHyphae => DIG_MULTIPLIERS_wood, + BlockKind::WarpedNylium => DIG_MULTIPLIERS_rock, + BlockKind::WarpedFungus => &[], + BlockKind::WarpedWartBlock => &[], + BlockKind::WarpedRoots => &[], + BlockKind::NetherSprouts => DIG_MULTIPLIERS_plant, + BlockKind::CrimsonStem => DIG_MULTIPLIERS_wood, + BlockKind::StrippedCrimsonStem => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonHyphae => DIG_MULTIPLIERS_wood, + BlockKind::StrippedCrimsonHyphae => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonNylium => DIG_MULTIPLIERS_rock, + BlockKind::CrimsonFungus => &[], + BlockKind::Shroomlight => &[], + BlockKind::WeepingVines => &[], + BlockKind::WeepingVinesPlant => &[], + BlockKind::TwistingVines => &[], + BlockKind::TwistingVinesPlant => &[], + BlockKind::CrimsonRoots => &[], + BlockKind::CrimsonPlanks => DIG_MULTIPLIERS_wood, + BlockKind::WarpedPlanks => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonSlab => DIG_MULTIPLIERS_wood, + BlockKind::WarpedSlab => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonPressurePlate => DIG_MULTIPLIERS_rock, + BlockKind::WarpedPressurePlate => DIG_MULTIPLIERS_rock, + BlockKind::CrimsonFence => DIG_MULTIPLIERS_wood, + BlockKind::WarpedFence => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonTrapdoor => DIG_MULTIPLIERS_wood, + BlockKind::WarpedTrapdoor => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonFenceGate => DIG_MULTIPLIERS_wood, + BlockKind::WarpedFenceGate => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonStairs => DIG_MULTIPLIERS_wood, + BlockKind::WarpedStairs => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonButton => &[], + BlockKind::WarpedButton => &[], + BlockKind::CrimsonDoor => DIG_MULTIPLIERS_wood, + BlockKind::WarpedDoor => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonSign => DIG_MULTIPLIERS_wood, + BlockKind::WarpedSign => DIG_MULTIPLIERS_wood, + BlockKind::CrimsonWallSign => DIG_MULTIPLIERS_wood, + BlockKind::WarpedWallSign => DIG_MULTIPLIERS_wood, + BlockKind::StructureBlock => &[], + BlockKind::Jigsaw => &[], + BlockKind::Composter => DIG_MULTIPLIERS_wood, + BlockKind::Target => &[], + BlockKind::BeeNest => DIG_MULTIPLIERS_wood, + BlockKind::Beehive => DIG_MULTIPLIERS_wood, + BlockKind::HoneyBlock => &[], + BlockKind::HoneycombBlock => &[], + BlockKind::NetheriteBlock => DIG_MULTIPLIERS_rock, + BlockKind::AncientDebris => DIG_MULTIPLIERS_rock, + BlockKind::CryingObsidian => DIG_MULTIPLIERS_rock, + BlockKind::RespawnAnchor => DIG_MULTIPLIERS_rock, + BlockKind::PottedCrimsonFungus => &[], + BlockKind::PottedWarpedFungus => &[], + BlockKind::PottedCrimsonRoots => &[], + BlockKind::PottedWarpedRoots => &[], + BlockKind::Lodestone => DIG_MULTIPLIERS_rock, + BlockKind::Blackstone => DIG_MULTIPLIERS_rock, + BlockKind::BlackstoneStairs => DIG_MULTIPLIERS_wood, + BlockKind::BlackstoneWall => DIG_MULTIPLIERS_rock, + BlockKind::BlackstoneSlab => DIG_MULTIPLIERS_wood, + BlockKind::PolishedBlackstone => DIG_MULTIPLIERS_rock, + BlockKind::PolishedBlackstoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::CrackedPolishedBlackstoneBricks => DIG_MULTIPLIERS_rock, + BlockKind::ChiseledPolishedBlackstone => &[], + BlockKind::PolishedBlackstoneBrickSlab => DIG_MULTIPLIERS_wood, + BlockKind::PolishedBlackstoneBrickStairs => DIG_MULTIPLIERS_wood, + BlockKind::PolishedBlackstoneBrickWall => DIG_MULTIPLIERS_rock, + BlockKind::GildedBlackstone => DIG_MULTIPLIERS_rock, + BlockKind::PolishedBlackstoneStairs => DIG_MULTIPLIERS_wood, + BlockKind::PolishedBlackstoneSlab => DIG_MULTIPLIERS_wood, + BlockKind::PolishedBlackstonePressurePlate => DIG_MULTIPLIERS_rock, + BlockKind::PolishedBlackstoneButton => &[], + BlockKind::PolishedBlackstoneWall => DIG_MULTIPLIERS_rock, + BlockKind::ChiseledNetherBricks => DIG_MULTIPLIERS_rock, + BlockKind::CrackedNetherBricks => DIG_MULTIPLIERS_rock, + BlockKind::QuartzBricks => DIG_MULTIPLIERS_rock, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `harvest_tools` property of this `BlockKind`. + pub fn harvest_tools(&self) -> Option<&'static [crate::Item]> { + match self { + BlockKind::Air => None, + BlockKind::Stone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Granite => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedGranite => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Diorite => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedDiorite => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Andesite => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedAndesite => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GrassBlock => None, + BlockKind::Dirt => None, + BlockKind::CoarseDirt => None, + BlockKind::Podzol => None, + BlockKind::Cobblestone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OakPlanks => None, + BlockKind::SprucePlanks => None, + BlockKind::BirchPlanks => None, + BlockKind::JunglePlanks => None, + BlockKind::AcaciaPlanks => None, + BlockKind::DarkOakPlanks => None, + BlockKind::OakSapling => None, + BlockKind::SpruceSapling => None, + BlockKind::BirchSapling => None, + BlockKind::JungleSapling => None, + BlockKind::AcaciaSapling => None, + BlockKind::DarkOakSapling => None, + BlockKind::Bedrock => None, + BlockKind::Water => None, + BlockKind::Lava => None, + BlockKind::Sand => None, + BlockKind::RedSand => None, + BlockKind::Gravel => None, + BlockKind::GoldOre => { + const TOOLS: &[crate::Item] = + &[crate::Item::IronPickaxe, crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::IronOre => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CoalOre => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::NetherGoldOre => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OakLog => None, + BlockKind::SpruceLog => None, + BlockKind::BirchLog => None, + BlockKind::JungleLog => None, + BlockKind::AcaciaLog => None, + BlockKind::DarkOakLog => None, + BlockKind::StrippedSpruceLog => None, + BlockKind::StrippedBirchLog => None, + BlockKind::StrippedJungleLog => None, + BlockKind::StrippedAcaciaLog => None, + BlockKind::StrippedDarkOakLog => None, + BlockKind::StrippedOakLog => None, + BlockKind::OakWood => None, + BlockKind::SpruceWood => None, + BlockKind::BirchWood => None, + BlockKind::JungleWood => None, + BlockKind::AcaciaWood => None, + BlockKind::DarkOakWood => None, + BlockKind::StrippedOakWood => None, + BlockKind::StrippedSpruceWood => None, + BlockKind::StrippedBirchWood => None, + BlockKind::StrippedJungleWood => None, + BlockKind::StrippedAcaciaWood => None, + BlockKind::StrippedDarkOakWood => None, + BlockKind::OakLeaves => None, + BlockKind::SpruceLeaves => None, + BlockKind::BirchLeaves => None, + BlockKind::JungleLeaves => None, + BlockKind::AcaciaLeaves => None, + BlockKind::DarkOakLeaves => None, + BlockKind::Sponge => None, + BlockKind::WetSponge => None, + BlockKind::Glass => None, + BlockKind::LapisOre => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LapisBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Dispenser => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Sandstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::ChiseledSandstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CutSandstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::NoteBlock => None, + BlockKind::WhiteBed => None, + BlockKind::OrangeBed => None, + BlockKind::MagentaBed => None, + BlockKind::LightBlueBed => None, + BlockKind::YellowBed => None, + BlockKind::LimeBed => None, + BlockKind::PinkBed => None, + BlockKind::GrayBed => None, + BlockKind::LightGrayBed => None, + BlockKind::CyanBed => None, + BlockKind::PurpleBed => None, + BlockKind::BlueBed => None, + BlockKind::BrownBed => None, + BlockKind::GreenBed => None, + BlockKind::RedBed => None, + BlockKind::BlackBed => None, + BlockKind::PoweredRail => None, + BlockKind::DetectorRail => None, + BlockKind::StickyPiston => None, + BlockKind::Cobweb => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronSword, + crate::Item::WoodenSword, + crate::Item::StoneSword, + crate::Item::DiamondSword, + crate::Item::GoldenSword, + crate::Item::Shears, + ]; + Some(TOOLS) + } + BlockKind::Grass => None, + BlockKind::Fern => None, + BlockKind::DeadBush => None, + BlockKind::Seagrass => None, + BlockKind::TallSeagrass => None, + BlockKind::Piston => None, + BlockKind::PistonHead => None, + BlockKind::WhiteWool => None, + BlockKind::OrangeWool => None, + BlockKind::MagentaWool => None, + BlockKind::LightBlueWool => None, + BlockKind::YellowWool => None, + BlockKind::LimeWool => None, + BlockKind::PinkWool => None, + BlockKind::GrayWool => None, + BlockKind::LightGrayWool => None, + BlockKind::CyanWool => None, + BlockKind::PurpleWool => None, + BlockKind::BlueWool => None, + BlockKind::BrownWool => None, + BlockKind::GreenWool => None, + BlockKind::RedWool => None, + BlockKind::BlackWool => None, + BlockKind::MovingPiston => None, + BlockKind::Dandelion => None, + BlockKind::Poppy => None, + BlockKind::BlueOrchid => None, + BlockKind::Allium => None, + BlockKind::AzureBluet => None, + BlockKind::RedTulip => None, + BlockKind::OrangeTulip => None, + BlockKind::WhiteTulip => None, + BlockKind::PinkTulip => None, + BlockKind::OxeyeDaisy => None, + BlockKind::Cornflower => None, + BlockKind::WitherRose => None, + BlockKind::LilyOfTheValley => None, + BlockKind::BrownMushroom => None, + BlockKind::RedMushroom => None, + BlockKind::GoldBlock => { + const TOOLS: &[crate::Item] = + &[crate::Item::IronPickaxe, crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::IronBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Bricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Tnt => None, + BlockKind::Bookshelf => None, + BlockKind::MossyCobblestone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Obsidian => { + const TOOLS: &[crate::Item] = &[crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::Torch => None, + BlockKind::WallTorch => None, + BlockKind::Fire => None, + BlockKind::SoulFire => None, + BlockKind::Spawner => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OakStairs => None, + BlockKind::Chest => None, + BlockKind::RedstoneWire => None, + BlockKind::DiamondOre => { + const TOOLS: &[crate::Item] = + &[crate::Item::IronPickaxe, crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::DiamondBlock => { + const TOOLS: &[crate::Item] = + &[crate::Item::IronPickaxe, crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::CraftingTable => None, + BlockKind::Wheat => None, + BlockKind::Farmland => None, + BlockKind::Furnace => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OakSign => None, + BlockKind::SpruceSign => None, + BlockKind::BirchSign => None, + BlockKind::AcaciaSign => None, + BlockKind::JungleSign => None, + BlockKind::DarkOakSign => None, + BlockKind::OakDoor => None, + BlockKind::Ladder => None, + BlockKind::Rail => None, + BlockKind::CobblestoneStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OakWallSign => None, + BlockKind::SpruceWallSign => None, + BlockKind::BirchWallSign => None, + BlockKind::AcaciaWallSign => None, + BlockKind::JungleWallSign => None, + BlockKind::DarkOakWallSign => None, + BlockKind::Lever => None, + BlockKind::StonePressurePlate => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::IronDoor => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OakPressurePlate => None, + BlockKind::SprucePressurePlate => None, + BlockKind::BirchPressurePlate => None, + BlockKind::JunglePressurePlate => None, + BlockKind::AcaciaPressurePlate => None, + BlockKind::DarkOakPressurePlate => None, + BlockKind::RedstoneOre => { + const TOOLS: &[crate::Item] = + &[crate::Item::IronPickaxe, crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::RedstoneTorch => None, + BlockKind::RedstoneWallTorch => None, + BlockKind::StoneButton => None, + BlockKind::Snow => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronShovel, + crate::Item::WoodenShovel, + crate::Item::StoneShovel, + crate::Item::DiamondShovel, + crate::Item::GoldenShovel, + ]; + Some(TOOLS) + } + BlockKind::Ice => None, + BlockKind::SnowBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronShovel, + crate::Item::WoodenShovel, + crate::Item::StoneShovel, + crate::Item::DiamondShovel, + crate::Item::GoldenShovel, + ]; + Some(TOOLS) + } + BlockKind::Cactus => None, + BlockKind::Clay => None, + BlockKind::SugarCane => None, + BlockKind::Jukebox => None, + BlockKind::OakFence => None, + BlockKind::Pumpkin => None, + BlockKind::Netherrack => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SoulSand => None, + BlockKind::SoulSoil => None, + BlockKind::Basalt => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedBasalt => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SoulTorch => None, + BlockKind::SoulWallTorch => None, + BlockKind::Glowstone => None, + BlockKind::NetherPortal => None, + BlockKind::CarvedPumpkin => None, + BlockKind::JackOLantern => None, + BlockKind::Cake => None, + BlockKind::Repeater => None, + BlockKind::WhiteStainedGlass => None, + BlockKind::OrangeStainedGlass => None, + BlockKind::MagentaStainedGlass => None, + BlockKind::LightBlueStainedGlass => None, + BlockKind::YellowStainedGlass => None, + BlockKind::LimeStainedGlass => None, + BlockKind::PinkStainedGlass => None, + BlockKind::GrayStainedGlass => None, + BlockKind::LightGrayStainedGlass => None, + BlockKind::CyanStainedGlass => None, + BlockKind::PurpleStainedGlass => None, + BlockKind::BlueStainedGlass => None, + BlockKind::BrownStainedGlass => None, + BlockKind::GreenStainedGlass => None, + BlockKind::RedStainedGlass => None, + BlockKind::BlackStainedGlass => None, + BlockKind::OakTrapdoor => None, + BlockKind::SpruceTrapdoor => None, + BlockKind::BirchTrapdoor => None, + BlockKind::JungleTrapdoor => None, + BlockKind::AcaciaTrapdoor => None, + BlockKind::DarkOakTrapdoor => None, + BlockKind::StoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::MossyStoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CrackedStoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::ChiseledStoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::InfestedStone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::InfestedCobblestone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::InfestedStoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::InfestedMossyStoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::InfestedCrackedStoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::InfestedChiseledStoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BrownMushroomBlock => None, + BlockKind::RedMushroomBlock => None, + BlockKind::MushroomStem => None, + BlockKind::IronBars => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Chain => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GlassPane => None, + BlockKind::Melon => None, + BlockKind::AttachedPumpkinStem => None, + BlockKind::AttachedMelonStem => None, + BlockKind::PumpkinStem => None, + BlockKind::MelonStem => None, + BlockKind::Vine => None, + BlockKind::OakFenceGate => None, + BlockKind::BrickStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::StoneBrickStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Mycelium => None, + BlockKind::LilyPad => None, + BlockKind::NetherBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::NetherBrickFence => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::NetherBrickStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::NetherWart => None, + BlockKind::EnchantingTable => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BrewingStand => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Cauldron => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::EndPortal => None, + BlockKind::EndPortalFrame => None, + BlockKind::EndStone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DragonEgg => None, + BlockKind::RedstoneLamp => None, + BlockKind::Cocoa => None, + BlockKind::SandstoneStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::EmeraldOre => { + const TOOLS: &[crate::Item] = + &[crate::Item::IronPickaxe, crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::EnderChest => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::TripwireHook => None, + BlockKind::Tripwire => None, + BlockKind::EmeraldBlock => { + const TOOLS: &[crate::Item] = + &[crate::Item::IronPickaxe, crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::SpruceStairs => None, + BlockKind::BirchStairs => None, + BlockKind::JungleStairs => None, + BlockKind::CommandBlock => None, + BlockKind::Beacon => None, + BlockKind::CobblestoneWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::MossyCobblestoneWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::FlowerPot => None, + BlockKind::PottedOakSapling => None, + BlockKind::PottedSpruceSapling => None, + BlockKind::PottedBirchSapling => None, + BlockKind::PottedJungleSapling => None, + BlockKind::PottedAcaciaSapling => None, + BlockKind::PottedDarkOakSapling => None, + BlockKind::PottedFern => None, + BlockKind::PottedDandelion => None, + BlockKind::PottedPoppy => None, + BlockKind::PottedBlueOrchid => None, + BlockKind::PottedAllium => None, + BlockKind::PottedAzureBluet => None, + BlockKind::PottedRedTulip => None, + BlockKind::PottedOrangeTulip => None, + BlockKind::PottedWhiteTulip => None, + BlockKind::PottedPinkTulip => None, + BlockKind::PottedOxeyeDaisy => None, + BlockKind::PottedCornflower => None, + BlockKind::PottedLilyOfTheValley => None, + BlockKind::PottedWitherRose => None, + BlockKind::PottedRedMushroom => None, + BlockKind::PottedBrownMushroom => None, + BlockKind::PottedDeadBush => None, + BlockKind::PottedCactus => None, + BlockKind::Carrots => None, + BlockKind::Potatoes => None, + BlockKind::OakButton => None, + BlockKind::SpruceButton => None, + BlockKind::BirchButton => None, + BlockKind::JungleButton => None, + BlockKind::AcaciaButton => None, + BlockKind::DarkOakButton => None, + BlockKind::SkeletonSkull => None, + BlockKind::SkeletonWallSkull => None, + BlockKind::WitherSkeletonSkull => None, + BlockKind::WitherSkeletonWallSkull => None, + BlockKind::ZombieHead => None, + BlockKind::ZombieWallHead => None, + BlockKind::PlayerHead => None, + BlockKind::PlayerWallHead => None, + BlockKind::CreeperHead => None, + BlockKind::CreeperWallHead => None, + BlockKind::DragonHead => None, + BlockKind::DragonWallHead => None, + BlockKind::Anvil => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::ChippedAnvil => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DamagedAnvil => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::TrappedChest => None, + BlockKind::LightWeightedPressurePlate => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::HeavyWeightedPressurePlate => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Comparator => None, + BlockKind::DaylightDetector => None, + BlockKind::RedstoneBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::NetherQuartzOre => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Hopper => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::QuartzBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::ChiseledQuartzBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::QuartzPillar => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::QuartzStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::ActivatorRail => None, + BlockKind::Dropper => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::WhiteTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OrangeTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::MagentaTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LightBlueTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::YellowTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LimeTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PinkTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GrayTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LightGrayTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CyanTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PurpleTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BlueTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BrownTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GreenTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::RedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BlackTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::WhiteStainedGlassPane => None, + BlockKind::OrangeStainedGlassPane => None, + BlockKind::MagentaStainedGlassPane => None, + BlockKind::LightBlueStainedGlassPane => None, + BlockKind::YellowStainedGlassPane => None, + BlockKind::LimeStainedGlassPane => None, + BlockKind::PinkStainedGlassPane => None, + BlockKind::GrayStainedGlassPane => None, + BlockKind::LightGrayStainedGlassPane => None, + BlockKind::CyanStainedGlassPane => None, + BlockKind::PurpleStainedGlassPane => None, + BlockKind::BlueStainedGlassPane => None, + BlockKind::BrownStainedGlassPane => None, + BlockKind::GreenStainedGlassPane => None, + BlockKind::RedStainedGlassPane => None, + BlockKind::BlackStainedGlassPane => None, + BlockKind::AcaciaStairs => None, + BlockKind::DarkOakStairs => None, + BlockKind::SlimeBlock => None, + BlockKind::Barrier => None, + BlockKind::IronTrapdoor => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Prismarine => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PrismarineBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DarkPrismarine => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PrismarineStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PrismarineBrickStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DarkPrismarineStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PrismarineSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PrismarineBrickSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DarkPrismarineSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SeaLantern => None, + BlockKind::HayBlock => None, + BlockKind::WhiteCarpet => None, + BlockKind::OrangeCarpet => None, + BlockKind::MagentaCarpet => None, + BlockKind::LightBlueCarpet => None, + BlockKind::YellowCarpet => None, + BlockKind::LimeCarpet => None, + BlockKind::PinkCarpet => None, + BlockKind::GrayCarpet => None, + BlockKind::LightGrayCarpet => None, + BlockKind::CyanCarpet => None, + BlockKind::PurpleCarpet => None, + BlockKind::BlueCarpet => None, + BlockKind::BrownCarpet => None, + BlockKind::GreenCarpet => None, + BlockKind::RedCarpet => None, + BlockKind::BlackCarpet => None, + BlockKind::Terracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CoalBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PackedIce => None, + BlockKind::Sunflower => None, + BlockKind::Lilac => None, + BlockKind::RoseBush => None, + BlockKind::Peony => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::TallGrass => None, + BlockKind::LargeFern => None, + BlockKind::WhiteBanner => None, + BlockKind::OrangeBanner => None, + BlockKind::MagentaBanner => None, + BlockKind::LightBlueBanner => None, + BlockKind::YellowBanner => None, + BlockKind::LimeBanner => None, + BlockKind::PinkBanner => None, + BlockKind::GrayBanner => None, + BlockKind::LightGrayBanner => None, + BlockKind::CyanBanner => None, + BlockKind::PurpleBanner => None, + BlockKind::BlueBanner => None, + BlockKind::BrownBanner => None, + BlockKind::GreenBanner => None, + BlockKind::RedBanner => None, + BlockKind::BlackBanner => None, + BlockKind::WhiteWallBanner => None, + BlockKind::OrangeWallBanner => None, + BlockKind::MagentaWallBanner => None, + BlockKind::LightBlueWallBanner => None, + BlockKind::YellowWallBanner => None, + BlockKind::LimeWallBanner => None, + BlockKind::PinkWallBanner => None, + BlockKind::GrayWallBanner => None, + BlockKind::LightGrayWallBanner => None, + BlockKind::CyanWallBanner => None, + BlockKind::PurpleWallBanner => None, + BlockKind::BlueWallBanner => None, + BlockKind::BrownWallBanner => None, + BlockKind::GreenWallBanner => None, + BlockKind::RedWallBanner => None, + BlockKind::BlackWallBanner => None, + BlockKind::RedSandstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::ChiseledRedSandstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CutRedSandstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::RedSandstoneStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OakSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SpruceSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BirchSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::JungleSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::AcaciaSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DarkOakSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::StoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SmoothStoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SandstoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CutSandstoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PetrifiedOakSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CobblestoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BrickSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::StoneBrickSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::NetherBrickSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::QuartzSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::RedSandstoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CutRedSandstoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PurpurSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SmoothStone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SmoothSandstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SmoothQuartz => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SmoothRedSandstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SpruceFenceGate => None, + BlockKind::BirchFenceGate => None, + BlockKind::JungleFenceGate => None, + BlockKind::AcaciaFenceGate => None, + BlockKind::DarkOakFenceGate => None, + BlockKind::SpruceFence => None, + BlockKind::BirchFence => None, + BlockKind::JungleFence => None, + BlockKind::AcaciaFence => None, + BlockKind::DarkOakFence => None, + BlockKind::SpruceDoor => None, + BlockKind::BirchDoor => None, + BlockKind::JungleDoor => None, + BlockKind::AcaciaDoor => None, + BlockKind::DarkOakDoor => None, + BlockKind::EndRod => None, + BlockKind::ChorusPlant => None, + BlockKind::ChorusFlower => None, + BlockKind::PurpurBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PurpurPillar => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PurpurStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::EndStoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Beetroots => None, + BlockKind::GrassPath => None, + BlockKind::EndGateway => None, + BlockKind::RepeatingCommandBlock => None, + BlockKind::ChainCommandBlock => None, + BlockKind::FrostedIce => None, + BlockKind::MagmaBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::NetherWartBlock => None, + BlockKind::RedNetherBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BoneBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::StructureVoid => None, + BlockKind::Observer => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::ShulkerBox => None, + BlockKind::WhiteShulkerBox => None, + BlockKind::OrangeShulkerBox => None, + BlockKind::MagentaShulkerBox => None, + BlockKind::LightBlueShulkerBox => None, + BlockKind::YellowShulkerBox => None, + BlockKind::LimeShulkerBox => None, + BlockKind::PinkShulkerBox => None, + BlockKind::GrayShulkerBox => None, + BlockKind::LightGrayShulkerBox => None, + BlockKind::CyanShulkerBox => None, + BlockKind::PurpleShulkerBox => None, + BlockKind::BlueShulkerBox => None, + BlockKind::BrownShulkerBox => None, + BlockKind::GreenShulkerBox => None, + BlockKind::RedShulkerBox => None, + BlockKind::BlackShulkerBox => None, + BlockKind::WhiteGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OrangeGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::MagentaGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LightBlueGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::YellowGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LimeGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PinkGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GrayGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LightGrayGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CyanGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PurpleGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BlueGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BrownGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GreenGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::RedGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BlackGlazedTerracotta => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::WhiteConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::OrangeConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::MagentaConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LightBlueConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::YellowConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LimeConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PinkConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GrayConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::LightGrayConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CyanConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PurpleConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BlueConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BrownConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GreenConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::RedConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BlackConcrete => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::WhiteConcretePowder => None, + BlockKind::OrangeConcretePowder => None, + BlockKind::MagentaConcretePowder => None, + BlockKind::LightBlueConcretePowder => None, + BlockKind::YellowConcretePowder => None, + BlockKind::LimeConcretePowder => None, + BlockKind::PinkConcretePowder => None, + BlockKind::GrayConcretePowder => None, + BlockKind::LightGrayConcretePowder => None, + BlockKind::CyanConcretePowder => None, + BlockKind::PurpleConcretePowder => None, + BlockKind::BlueConcretePowder => None, + BlockKind::BrownConcretePowder => None, + BlockKind::GreenConcretePowder => None, + BlockKind::RedConcretePowder => None, + BlockKind::BlackConcretePowder => None, + BlockKind::Kelp => None, + BlockKind::KelpPlant => None, + BlockKind::DriedKelpBlock => None, + BlockKind::TurtleEgg => None, + BlockKind::DeadTubeCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DeadBrainCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DeadBubbleCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DeadFireCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DeadHornCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::TubeCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BrainCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BubbleCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::FireCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::HornCoralBlock => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DeadTubeCoral => None, + BlockKind::DeadBrainCoral => None, + BlockKind::DeadBubbleCoral => None, + BlockKind::DeadFireCoral => None, + BlockKind::DeadHornCoral => None, + BlockKind::TubeCoral => None, + BlockKind::BrainCoral => None, + BlockKind::BubbleCoral => None, + BlockKind::FireCoral => None, + BlockKind::HornCoral => None, + BlockKind::DeadTubeCoralFan => None, + BlockKind::DeadBrainCoralFan => None, + BlockKind::DeadBubbleCoralFan => None, + BlockKind::DeadFireCoralFan => None, + BlockKind::DeadHornCoralFan => None, + BlockKind::TubeCoralFan => None, + BlockKind::BrainCoralFan => None, + BlockKind::BubbleCoralFan => None, + BlockKind::FireCoralFan => None, + BlockKind::HornCoralFan => None, + BlockKind::DeadTubeCoralWallFan => None, + BlockKind::DeadBrainCoralWallFan => None, + BlockKind::DeadBubbleCoralWallFan => None, + BlockKind::DeadFireCoralWallFan => None, + BlockKind::DeadHornCoralWallFan => None, + BlockKind::TubeCoralWallFan => None, + BlockKind::BrainCoralWallFan => None, + BlockKind::BubbleCoralWallFan => None, + BlockKind::FireCoralWallFan => None, + BlockKind::HornCoralWallFan => None, + BlockKind::SeaPickle => None, + BlockKind::BlueIce => None, + BlockKind::Conduit => None, + BlockKind::BambooSapling => None, + BlockKind::Bamboo => None, + BlockKind::PottedBamboo => None, + BlockKind::VoidAir => None, + BlockKind::CaveAir => None, + BlockKind::BubbleColumn => None, + BlockKind::PolishedGraniteStairs => None, + BlockKind::SmoothRedSandstoneStairs => None, + BlockKind::MossyStoneBrickStairs => None, + BlockKind::PolishedDioriteStairs => None, + BlockKind::MossyCobblestoneStairs => None, + BlockKind::EndStoneBrickStairs => None, + BlockKind::StoneStairs => None, + BlockKind::SmoothSandstoneStairs => None, + BlockKind::SmoothQuartzStairs => None, + BlockKind::GraniteStairs => None, + BlockKind::AndesiteStairs => None, + BlockKind::RedNetherBrickStairs => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedAndesiteStairs => None, + BlockKind::DioriteStairs => None, + BlockKind::PolishedGraniteSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SmoothRedSandstoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::MossyStoneBrickSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedDioriteSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::MossyCobblestoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::EndStoneBrickSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SmoothSandstoneSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SmoothQuartzSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GraniteSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::AndesiteSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::RedNetherBrickSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedAndesiteSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DioriteSlab => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BrickWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PrismarineWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::RedSandstoneWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::MossyStoneBrickWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GraniteWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::StoneBrickWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::NetherBrickWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::AndesiteWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::RedNetherBrickWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SandstoneWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::EndStoneBrickWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::DioriteWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Scaffolding => None, + BlockKind::Loom => None, + BlockKind::Barrel => None, + BlockKind::Smoker => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BlastFurnace => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CartographyTable => None, + BlockKind::FletchingTable => None, + BlockKind::Grindstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Lectern => None, + BlockKind::SmithingTable => None, + BlockKind::Stonecutter => None, + BlockKind::Bell => None, + BlockKind::Lantern => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::SoulLantern => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Campfire => None, + BlockKind::SoulCampfire => None, + BlockKind::SweetBerryBush => None, + BlockKind::WarpedStem => None, + BlockKind::StrippedWarpedStem => None, + BlockKind::WarpedHyphae => None, + BlockKind::StrippedWarpedHyphae => None, + BlockKind::WarpedNylium => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::WarpedFungus => None, + BlockKind::WarpedWartBlock => None, + BlockKind::WarpedRoots => None, + BlockKind::NetherSprouts => None, + BlockKind::CrimsonStem => None, + BlockKind::StrippedCrimsonStem => None, + BlockKind::CrimsonHyphae => None, + BlockKind::StrippedCrimsonHyphae => None, + BlockKind::CrimsonNylium => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CrimsonFungus => None, + BlockKind::Shroomlight => None, + BlockKind::WeepingVines => None, + BlockKind::WeepingVinesPlant => None, + BlockKind::TwistingVines => None, + BlockKind::TwistingVinesPlant => None, + BlockKind::CrimsonRoots => None, + BlockKind::CrimsonPlanks => None, + BlockKind::WarpedPlanks => None, + BlockKind::CrimsonSlab => None, + BlockKind::WarpedSlab => None, + BlockKind::CrimsonPressurePlate => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::WarpedPressurePlate => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CrimsonFence => None, + BlockKind::WarpedFence => None, + BlockKind::CrimsonTrapdoor => None, + BlockKind::WarpedTrapdoor => None, + BlockKind::CrimsonFenceGate => None, + BlockKind::WarpedFenceGate => None, + BlockKind::CrimsonStairs => None, + BlockKind::WarpedStairs => None, + BlockKind::CrimsonButton => None, + BlockKind::WarpedButton => None, + BlockKind::CrimsonDoor => None, + BlockKind::WarpedDoor => None, + BlockKind::CrimsonSign => None, + BlockKind::WarpedSign => None, + BlockKind::CrimsonWallSign => None, + BlockKind::WarpedWallSign => None, + BlockKind::StructureBlock => None, + BlockKind::Jigsaw => None, + BlockKind::Composter => None, + BlockKind::Target => None, + BlockKind::BeeNest => None, + BlockKind::Beehive => None, + BlockKind::HoneyBlock => None, + BlockKind::HoneycombBlock => None, + BlockKind::NetheriteBlock => { + const TOOLS: &[crate::Item] = &[crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::AncientDebris => { + const TOOLS: &[crate::Item] = &[crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::CryingObsidian => { + const TOOLS: &[crate::Item] = &[crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::RespawnAnchor => { + const TOOLS: &[crate::Item] = &[crate::Item::DiamondPickaxe]; + Some(TOOLS) + } + BlockKind::PottedCrimsonFungus => None, + BlockKind::PottedWarpedFungus => None, + BlockKind::PottedCrimsonRoots => None, + BlockKind::PottedWarpedRoots => None, + BlockKind::Lodestone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::Blackstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BlackstoneStairs => None, + BlockKind::BlackstoneWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::BlackstoneSlab => None, + BlockKind::PolishedBlackstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedBlackstoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CrackedPolishedBlackstoneBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::ChiseledPolishedBlackstone => None, + BlockKind::PolishedBlackstoneBrickSlab => None, + BlockKind::PolishedBlackstoneBrickStairs => None, + BlockKind::PolishedBlackstoneBrickWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::GildedBlackstone => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedBlackstoneStairs => None, + BlockKind::PolishedBlackstoneSlab => None, + BlockKind::PolishedBlackstonePressurePlate => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::PolishedBlackstoneButton => None, + BlockKind::PolishedBlackstoneWall => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::ChiseledNetherBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::CrackedNetherBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + BlockKind::QuartzBricks => { + const TOOLS: &[crate::Item] = &[ + crate::Item::IronPickaxe, + crate::Item::WoodenPickaxe, + crate::Item::StonePickaxe, + crate::Item::DiamondPickaxe, + crate::Item::GoldenPickaxe, + ]; + Some(TOOLS) + } + } + } +} diff --git a/crates/generated/src/entity.rs b/crates/generated/src/entity.rs new file mode 100644 index 000000000..0f16ee4ce --- /dev/null +++ b/crates/generated/src/entity.rs @@ -0,0 +1,1483 @@ +// This file is @generated. Please do not edit. + +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum EntityKind { + AreaEffectCloud, + ArmorStand, + Arrow, + Bat, + Bee, + Blaze, + Boat, + Cat, + CaveSpider, + Chicken, + Cod, + Cow, + Creeper, + Dolphin, + Donkey, + DragonFireball, + Drowned, + ElderGuardian, + EndCrystal, + EnderDragon, + Enderman, + Endermite, + Evoker, + EvokerFangs, + ExperienceOrb, + EyeOfEnder, + FallingBlock, + FireworkRocket, + Fox, + Ghast, + Giant, + Guardian, + Hoglin, + Horse, + Husk, + Illusioner, + IronGolem, + Item, + ItemFrame, + Fireball, + LeashKnot, + LightningBolt, + Llama, + LlamaSpit, + MagmaCube, + Minecart, + ChestMinecart, + CommandBlockMinecart, + FurnaceMinecart, + HopperMinecart, + SpawnerMinecart, + TntMinecart, + Mule, + Mooshroom, + Ocelot, + Painting, + Panda, + Parrot, + Phantom, + Pig, + Piglin, + PiglinBrute, + Pillager, + PolarBear, + Tnt, + Pufferfish, + Rabbit, + Ravager, + Salmon, + Sheep, + Shulker, + ShulkerBullet, + Silverfish, + Skeleton, + SkeletonHorse, + Slime, + SmallFireball, + SnowGolem, + Snowball, + SpectralArrow, + Spider, + Squid, + Stray, + Strider, + Egg, + EnderPearl, + ExperienceBottle, + Potion, + Trident, + TraderLlama, + TropicalFish, + Turtle, + Vex, + Villager, + Vindicator, + WanderingTrader, + Witch, + Wither, + WitherSkeleton, + WitherSkull, + Wolf, + Zoglin, + Zombie, + ZombieHorse, + ZombieVillager, + ZombifiedPiglin, + Player, + FishingBobber, +} + +#[allow(warnings)] +#[allow(clippy::all)] +impl EntityKind { + /// Returns the `id` property of this `EntityKind`. + pub fn id(&self) -> u32 { + match self { + EntityKind::AreaEffectCloud => 0, + EntityKind::ArmorStand => 1, + EntityKind::Arrow => 2, + EntityKind::Bat => 3, + EntityKind::Bee => 4, + EntityKind::Blaze => 5, + EntityKind::Boat => 6, + EntityKind::Cat => 7, + EntityKind::CaveSpider => 8, + EntityKind::Chicken => 9, + EntityKind::Cod => 10, + EntityKind::Cow => 11, + EntityKind::Creeper => 12, + EntityKind::Dolphin => 13, + EntityKind::Donkey => 14, + EntityKind::DragonFireball => 15, + EntityKind::Drowned => 16, + EntityKind::ElderGuardian => 17, + EntityKind::EndCrystal => 18, + EntityKind::EnderDragon => 19, + EntityKind::Enderman => 20, + EntityKind::Endermite => 21, + EntityKind::Evoker => 22, + EntityKind::EvokerFangs => 23, + EntityKind::ExperienceOrb => 24, + EntityKind::EyeOfEnder => 25, + EntityKind::FallingBlock => 26, + EntityKind::FireworkRocket => 27, + EntityKind::Fox => 28, + EntityKind::Ghast => 29, + EntityKind::Giant => 30, + EntityKind::Guardian => 31, + EntityKind::Hoglin => 32, + EntityKind::Horse => 33, + EntityKind::Husk => 34, + EntityKind::Illusioner => 35, + EntityKind::IronGolem => 36, + EntityKind::Item => 37, + EntityKind::ItemFrame => 38, + EntityKind::Fireball => 39, + EntityKind::LeashKnot => 40, + EntityKind::LightningBolt => 41, + EntityKind::Llama => 42, + EntityKind::LlamaSpit => 43, + EntityKind::MagmaCube => 44, + EntityKind::Minecart => 45, + EntityKind::ChestMinecart => 46, + EntityKind::CommandBlockMinecart => 47, + EntityKind::FurnaceMinecart => 48, + EntityKind::HopperMinecart => 49, + EntityKind::SpawnerMinecart => 50, + EntityKind::TntMinecart => 51, + EntityKind::Mule => 52, + EntityKind::Mooshroom => 53, + EntityKind::Ocelot => 54, + EntityKind::Painting => 55, + EntityKind::Panda => 56, + EntityKind::Parrot => 57, + EntityKind::Phantom => 58, + EntityKind::Pig => 59, + EntityKind::Piglin => 60, + EntityKind::PiglinBrute => 61, + EntityKind::Pillager => 62, + EntityKind::PolarBear => 63, + EntityKind::Tnt => 64, + EntityKind::Pufferfish => 65, + EntityKind::Rabbit => 66, + EntityKind::Ravager => 67, + EntityKind::Salmon => 68, + EntityKind::Sheep => 69, + EntityKind::Shulker => 70, + EntityKind::ShulkerBullet => 71, + EntityKind::Silverfish => 72, + EntityKind::Skeleton => 73, + EntityKind::SkeletonHorse => 74, + EntityKind::Slime => 75, + EntityKind::SmallFireball => 76, + EntityKind::SnowGolem => 77, + EntityKind::Snowball => 78, + EntityKind::SpectralArrow => 79, + EntityKind::Spider => 80, + EntityKind::Squid => 81, + EntityKind::Stray => 82, + EntityKind::Strider => 83, + EntityKind::Egg => 84, + EntityKind::EnderPearl => 85, + EntityKind::ExperienceBottle => 86, + EntityKind::Potion => 87, + EntityKind::Trident => 88, + EntityKind::TraderLlama => 89, + EntityKind::TropicalFish => 90, + EntityKind::Turtle => 91, + EntityKind::Vex => 92, + EntityKind::Villager => 93, + EntityKind::Vindicator => 94, + EntityKind::WanderingTrader => 95, + EntityKind::Witch => 96, + EntityKind::Wither => 97, + EntityKind::WitherSkeleton => 98, + EntityKind::WitherSkull => 99, + EntityKind::Wolf => 100, + EntityKind::Zoglin => 101, + EntityKind::Zombie => 102, + EntityKind::ZombieHorse => 103, + EntityKind::ZombieVillager => 104, + EntityKind::ZombifiedPiglin => 105, + EntityKind::Player => 106, + EntityKind::FishingBobber => 107, + } + } + + /// Gets a `EntityKind` by its `id`. + pub fn from_id(id: u32) -> Option { + match id { + 0 => Some(EntityKind::AreaEffectCloud), + 1 => Some(EntityKind::ArmorStand), + 2 => Some(EntityKind::Arrow), + 3 => Some(EntityKind::Bat), + 4 => Some(EntityKind::Bee), + 5 => Some(EntityKind::Blaze), + 6 => Some(EntityKind::Boat), + 7 => Some(EntityKind::Cat), + 8 => Some(EntityKind::CaveSpider), + 9 => Some(EntityKind::Chicken), + 10 => Some(EntityKind::Cod), + 11 => Some(EntityKind::Cow), + 12 => Some(EntityKind::Creeper), + 13 => Some(EntityKind::Dolphin), + 14 => Some(EntityKind::Donkey), + 15 => Some(EntityKind::DragonFireball), + 16 => Some(EntityKind::Drowned), + 17 => Some(EntityKind::ElderGuardian), + 18 => Some(EntityKind::EndCrystal), + 19 => Some(EntityKind::EnderDragon), + 20 => Some(EntityKind::Enderman), + 21 => Some(EntityKind::Endermite), + 22 => Some(EntityKind::Evoker), + 23 => Some(EntityKind::EvokerFangs), + 24 => Some(EntityKind::ExperienceOrb), + 25 => Some(EntityKind::EyeOfEnder), + 26 => Some(EntityKind::FallingBlock), + 27 => Some(EntityKind::FireworkRocket), + 28 => Some(EntityKind::Fox), + 29 => Some(EntityKind::Ghast), + 30 => Some(EntityKind::Giant), + 31 => Some(EntityKind::Guardian), + 32 => Some(EntityKind::Hoglin), + 33 => Some(EntityKind::Horse), + 34 => Some(EntityKind::Husk), + 35 => Some(EntityKind::Illusioner), + 36 => Some(EntityKind::IronGolem), + 37 => Some(EntityKind::Item), + 38 => Some(EntityKind::ItemFrame), + 39 => Some(EntityKind::Fireball), + 40 => Some(EntityKind::LeashKnot), + 41 => Some(EntityKind::LightningBolt), + 42 => Some(EntityKind::Llama), + 43 => Some(EntityKind::LlamaSpit), + 44 => Some(EntityKind::MagmaCube), + 45 => Some(EntityKind::Minecart), + 46 => Some(EntityKind::ChestMinecart), + 47 => Some(EntityKind::CommandBlockMinecart), + 48 => Some(EntityKind::FurnaceMinecart), + 49 => Some(EntityKind::HopperMinecart), + 50 => Some(EntityKind::SpawnerMinecart), + 51 => Some(EntityKind::TntMinecart), + 52 => Some(EntityKind::Mule), + 53 => Some(EntityKind::Mooshroom), + 54 => Some(EntityKind::Ocelot), + 55 => Some(EntityKind::Painting), + 56 => Some(EntityKind::Panda), + 57 => Some(EntityKind::Parrot), + 58 => Some(EntityKind::Phantom), + 59 => Some(EntityKind::Pig), + 60 => Some(EntityKind::Piglin), + 61 => Some(EntityKind::PiglinBrute), + 62 => Some(EntityKind::Pillager), + 63 => Some(EntityKind::PolarBear), + 64 => Some(EntityKind::Tnt), + 65 => Some(EntityKind::Pufferfish), + 66 => Some(EntityKind::Rabbit), + 67 => Some(EntityKind::Ravager), + 68 => Some(EntityKind::Salmon), + 69 => Some(EntityKind::Sheep), + 70 => Some(EntityKind::Shulker), + 71 => Some(EntityKind::ShulkerBullet), + 72 => Some(EntityKind::Silverfish), + 73 => Some(EntityKind::Skeleton), + 74 => Some(EntityKind::SkeletonHorse), + 75 => Some(EntityKind::Slime), + 76 => Some(EntityKind::SmallFireball), + 77 => Some(EntityKind::SnowGolem), + 78 => Some(EntityKind::Snowball), + 79 => Some(EntityKind::SpectralArrow), + 80 => Some(EntityKind::Spider), + 81 => Some(EntityKind::Squid), + 82 => Some(EntityKind::Stray), + 83 => Some(EntityKind::Strider), + 84 => Some(EntityKind::Egg), + 85 => Some(EntityKind::EnderPearl), + 86 => Some(EntityKind::ExperienceBottle), + 87 => Some(EntityKind::Potion), + 88 => Some(EntityKind::Trident), + 89 => Some(EntityKind::TraderLlama), + 90 => Some(EntityKind::TropicalFish), + 91 => Some(EntityKind::Turtle), + 92 => Some(EntityKind::Vex), + 93 => Some(EntityKind::Villager), + 94 => Some(EntityKind::Vindicator), + 95 => Some(EntityKind::WanderingTrader), + 96 => Some(EntityKind::Witch), + 97 => Some(EntityKind::Wither), + 98 => Some(EntityKind::WitherSkeleton), + 99 => Some(EntityKind::WitherSkull), + 100 => Some(EntityKind::Wolf), + 101 => Some(EntityKind::Zoglin), + 102 => Some(EntityKind::Zombie), + 103 => Some(EntityKind::ZombieHorse), + 104 => Some(EntityKind::ZombieVillager), + 105 => Some(EntityKind::ZombifiedPiglin), + 106 => Some(EntityKind::Player), + 107 => Some(EntityKind::FishingBobber), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl EntityKind { + /// Returns the `internal_id` property of this `EntityKind`. + pub fn internal_id(&self) -> u32 { + match self { + EntityKind::AreaEffectCloud => 0, + EntityKind::ArmorStand => 1, + EntityKind::Arrow => 2, + EntityKind::Bat => 3, + EntityKind::Bee => 4, + EntityKind::Blaze => 5, + EntityKind::Boat => 6, + EntityKind::Cat => 7, + EntityKind::CaveSpider => 8, + EntityKind::Chicken => 9, + EntityKind::Cod => 10, + EntityKind::Cow => 11, + EntityKind::Creeper => 12, + EntityKind::Dolphin => 13, + EntityKind::Donkey => 14, + EntityKind::DragonFireball => 15, + EntityKind::Drowned => 16, + EntityKind::ElderGuardian => 17, + EntityKind::EndCrystal => 18, + EntityKind::EnderDragon => 19, + EntityKind::Enderman => 20, + EntityKind::Endermite => 21, + EntityKind::Evoker => 22, + EntityKind::EvokerFangs => 23, + EntityKind::ExperienceOrb => 24, + EntityKind::EyeOfEnder => 25, + EntityKind::FallingBlock => 26, + EntityKind::FireworkRocket => 27, + EntityKind::Fox => 28, + EntityKind::Ghast => 29, + EntityKind::Giant => 30, + EntityKind::Guardian => 31, + EntityKind::Hoglin => 32, + EntityKind::Horse => 33, + EntityKind::Husk => 34, + EntityKind::Illusioner => 35, + EntityKind::IronGolem => 36, + EntityKind::Item => 37, + EntityKind::ItemFrame => 38, + EntityKind::Fireball => 39, + EntityKind::LeashKnot => 40, + EntityKind::LightningBolt => 41, + EntityKind::Llama => 42, + EntityKind::LlamaSpit => 43, + EntityKind::MagmaCube => 44, + EntityKind::Minecart => 45, + EntityKind::ChestMinecart => 46, + EntityKind::CommandBlockMinecart => 47, + EntityKind::FurnaceMinecart => 48, + EntityKind::HopperMinecart => 49, + EntityKind::SpawnerMinecart => 50, + EntityKind::TntMinecart => 51, + EntityKind::Mule => 52, + EntityKind::Mooshroom => 53, + EntityKind::Ocelot => 54, + EntityKind::Painting => 55, + EntityKind::Panda => 56, + EntityKind::Parrot => 57, + EntityKind::Phantom => 58, + EntityKind::Pig => 59, + EntityKind::Piglin => 60, + EntityKind::PiglinBrute => 61, + EntityKind::Pillager => 62, + EntityKind::PolarBear => 63, + EntityKind::Tnt => 64, + EntityKind::Pufferfish => 65, + EntityKind::Rabbit => 66, + EntityKind::Ravager => 67, + EntityKind::Salmon => 68, + EntityKind::Sheep => 69, + EntityKind::Shulker => 70, + EntityKind::ShulkerBullet => 71, + EntityKind::Silverfish => 72, + EntityKind::Skeleton => 73, + EntityKind::SkeletonHorse => 74, + EntityKind::Slime => 75, + EntityKind::SmallFireball => 76, + EntityKind::SnowGolem => 77, + EntityKind::Snowball => 78, + EntityKind::SpectralArrow => 79, + EntityKind::Spider => 80, + EntityKind::Squid => 81, + EntityKind::Stray => 82, + EntityKind::Strider => 83, + EntityKind::Egg => 84, + EntityKind::EnderPearl => 85, + EntityKind::ExperienceBottle => 86, + EntityKind::Potion => 87, + EntityKind::Trident => 88, + EntityKind::TraderLlama => 89, + EntityKind::TropicalFish => 90, + EntityKind::Turtle => 91, + EntityKind::Vex => 92, + EntityKind::Villager => 93, + EntityKind::Vindicator => 94, + EntityKind::WanderingTrader => 95, + EntityKind::Witch => 96, + EntityKind::Wither => 97, + EntityKind::WitherSkeleton => 98, + EntityKind::WitherSkull => 99, + EntityKind::Wolf => 100, + EntityKind::Zoglin => 101, + EntityKind::Zombie => 102, + EntityKind::ZombieHorse => 103, + EntityKind::ZombieVillager => 104, + EntityKind::ZombifiedPiglin => 105, + EntityKind::Player => 106, + EntityKind::FishingBobber => 107, + } + } + + /// Gets a `EntityKind` by its `internal_id`. + pub fn from_internal_id(internal_id: u32) -> Option { + match internal_id { + 0 => Some(EntityKind::AreaEffectCloud), + 1 => Some(EntityKind::ArmorStand), + 2 => Some(EntityKind::Arrow), + 3 => Some(EntityKind::Bat), + 4 => Some(EntityKind::Bee), + 5 => Some(EntityKind::Blaze), + 6 => Some(EntityKind::Boat), + 7 => Some(EntityKind::Cat), + 8 => Some(EntityKind::CaveSpider), + 9 => Some(EntityKind::Chicken), + 10 => Some(EntityKind::Cod), + 11 => Some(EntityKind::Cow), + 12 => Some(EntityKind::Creeper), + 13 => Some(EntityKind::Dolphin), + 14 => Some(EntityKind::Donkey), + 15 => Some(EntityKind::DragonFireball), + 16 => Some(EntityKind::Drowned), + 17 => Some(EntityKind::ElderGuardian), + 18 => Some(EntityKind::EndCrystal), + 19 => Some(EntityKind::EnderDragon), + 20 => Some(EntityKind::Enderman), + 21 => Some(EntityKind::Endermite), + 22 => Some(EntityKind::Evoker), + 23 => Some(EntityKind::EvokerFangs), + 24 => Some(EntityKind::ExperienceOrb), + 25 => Some(EntityKind::EyeOfEnder), + 26 => Some(EntityKind::FallingBlock), + 27 => Some(EntityKind::FireworkRocket), + 28 => Some(EntityKind::Fox), + 29 => Some(EntityKind::Ghast), + 30 => Some(EntityKind::Giant), + 31 => Some(EntityKind::Guardian), + 32 => Some(EntityKind::Hoglin), + 33 => Some(EntityKind::Horse), + 34 => Some(EntityKind::Husk), + 35 => Some(EntityKind::Illusioner), + 36 => Some(EntityKind::IronGolem), + 37 => Some(EntityKind::Item), + 38 => Some(EntityKind::ItemFrame), + 39 => Some(EntityKind::Fireball), + 40 => Some(EntityKind::LeashKnot), + 41 => Some(EntityKind::LightningBolt), + 42 => Some(EntityKind::Llama), + 43 => Some(EntityKind::LlamaSpit), + 44 => Some(EntityKind::MagmaCube), + 45 => Some(EntityKind::Minecart), + 46 => Some(EntityKind::ChestMinecart), + 47 => Some(EntityKind::CommandBlockMinecart), + 48 => Some(EntityKind::FurnaceMinecart), + 49 => Some(EntityKind::HopperMinecart), + 50 => Some(EntityKind::SpawnerMinecart), + 51 => Some(EntityKind::TntMinecart), + 52 => Some(EntityKind::Mule), + 53 => Some(EntityKind::Mooshroom), + 54 => Some(EntityKind::Ocelot), + 55 => Some(EntityKind::Painting), + 56 => Some(EntityKind::Panda), + 57 => Some(EntityKind::Parrot), + 58 => Some(EntityKind::Phantom), + 59 => Some(EntityKind::Pig), + 60 => Some(EntityKind::Piglin), + 61 => Some(EntityKind::PiglinBrute), + 62 => Some(EntityKind::Pillager), + 63 => Some(EntityKind::PolarBear), + 64 => Some(EntityKind::Tnt), + 65 => Some(EntityKind::Pufferfish), + 66 => Some(EntityKind::Rabbit), + 67 => Some(EntityKind::Ravager), + 68 => Some(EntityKind::Salmon), + 69 => Some(EntityKind::Sheep), + 70 => Some(EntityKind::Shulker), + 71 => Some(EntityKind::ShulkerBullet), + 72 => Some(EntityKind::Silverfish), + 73 => Some(EntityKind::Skeleton), + 74 => Some(EntityKind::SkeletonHorse), + 75 => Some(EntityKind::Slime), + 76 => Some(EntityKind::SmallFireball), + 77 => Some(EntityKind::SnowGolem), + 78 => Some(EntityKind::Snowball), + 79 => Some(EntityKind::SpectralArrow), + 80 => Some(EntityKind::Spider), + 81 => Some(EntityKind::Squid), + 82 => Some(EntityKind::Stray), + 83 => Some(EntityKind::Strider), + 84 => Some(EntityKind::Egg), + 85 => Some(EntityKind::EnderPearl), + 86 => Some(EntityKind::ExperienceBottle), + 87 => Some(EntityKind::Potion), + 88 => Some(EntityKind::Trident), + 89 => Some(EntityKind::TraderLlama), + 90 => Some(EntityKind::TropicalFish), + 91 => Some(EntityKind::Turtle), + 92 => Some(EntityKind::Vex), + 93 => Some(EntityKind::Villager), + 94 => Some(EntityKind::Vindicator), + 95 => Some(EntityKind::WanderingTrader), + 96 => Some(EntityKind::Witch), + 97 => Some(EntityKind::Wither), + 98 => Some(EntityKind::WitherSkeleton), + 99 => Some(EntityKind::WitherSkull), + 100 => Some(EntityKind::Wolf), + 101 => Some(EntityKind::Zoglin), + 102 => Some(EntityKind::Zombie), + 103 => Some(EntityKind::ZombieHorse), + 104 => Some(EntityKind::ZombieVillager), + 105 => Some(EntityKind::ZombifiedPiglin), + 106 => Some(EntityKind::Player), + 107 => Some(EntityKind::FishingBobber), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl EntityKind { + /// Returns the `name` property of this `EntityKind`. + pub fn name(&self) -> &'static str { + match self { + EntityKind::AreaEffectCloud => "area_effect_cloud", + EntityKind::ArmorStand => "armor_stand", + EntityKind::Arrow => "arrow", + EntityKind::Bat => "bat", + EntityKind::Bee => "bee", + EntityKind::Blaze => "blaze", + EntityKind::Boat => "boat", + EntityKind::Cat => "cat", + EntityKind::CaveSpider => "cave_spider", + EntityKind::Chicken => "chicken", + EntityKind::Cod => "cod", + EntityKind::Cow => "cow", + EntityKind::Creeper => "creeper", + EntityKind::Dolphin => "dolphin", + EntityKind::Donkey => "donkey", + EntityKind::DragonFireball => "dragon_fireball", + EntityKind::Drowned => "drowned", + EntityKind::ElderGuardian => "elder_guardian", + EntityKind::EndCrystal => "end_crystal", + EntityKind::EnderDragon => "ender_dragon", + EntityKind::Enderman => "enderman", + EntityKind::Endermite => "endermite", + EntityKind::Evoker => "evoker", + EntityKind::EvokerFangs => "evoker_fangs", + EntityKind::ExperienceOrb => "experience_orb", + EntityKind::EyeOfEnder => "eye_of_ender", + EntityKind::FallingBlock => "falling_block", + EntityKind::FireworkRocket => "firework_rocket", + EntityKind::Fox => "fox", + EntityKind::Ghast => "ghast", + EntityKind::Giant => "giant", + EntityKind::Guardian => "guardian", + EntityKind::Hoglin => "hoglin", + EntityKind::Horse => "horse", + EntityKind::Husk => "husk", + EntityKind::Illusioner => "illusioner", + EntityKind::IronGolem => "iron_golem", + EntityKind::Item => "item", + EntityKind::ItemFrame => "item_frame", + EntityKind::Fireball => "fireball", + EntityKind::LeashKnot => "leash_knot", + EntityKind::LightningBolt => "lightning_bolt", + EntityKind::Llama => "llama", + EntityKind::LlamaSpit => "llama_spit", + EntityKind::MagmaCube => "magma_cube", + EntityKind::Minecart => "minecart", + EntityKind::ChestMinecart => "chest_minecart", + EntityKind::CommandBlockMinecart => "command_block_minecart", + EntityKind::FurnaceMinecart => "furnace_minecart", + EntityKind::HopperMinecart => "hopper_minecart", + EntityKind::SpawnerMinecart => "spawner_minecart", + EntityKind::TntMinecart => "tnt_minecart", + EntityKind::Mule => "mule", + EntityKind::Mooshroom => "mooshroom", + EntityKind::Ocelot => "ocelot", + EntityKind::Painting => "painting", + EntityKind::Panda => "panda", + EntityKind::Parrot => "parrot", + EntityKind::Phantom => "phantom", + EntityKind::Pig => "pig", + EntityKind::Piglin => "piglin", + EntityKind::PiglinBrute => "piglin_brute", + EntityKind::Pillager => "pillager", + EntityKind::PolarBear => "polar_bear", + EntityKind::Tnt => "tnt", + EntityKind::Pufferfish => "pufferfish", + EntityKind::Rabbit => "rabbit", + EntityKind::Ravager => "ravager", + EntityKind::Salmon => "salmon", + EntityKind::Sheep => "sheep", + EntityKind::Shulker => "shulker", + EntityKind::ShulkerBullet => "shulker_bullet", + EntityKind::Silverfish => "silverfish", + EntityKind::Skeleton => "skeleton", + EntityKind::SkeletonHorse => "skeleton_horse", + EntityKind::Slime => "slime", + EntityKind::SmallFireball => "small_fireball", + EntityKind::SnowGolem => "snow_golem", + EntityKind::Snowball => "snowball", + EntityKind::SpectralArrow => "spectral_arrow", + EntityKind::Spider => "spider", + EntityKind::Squid => "squid", + EntityKind::Stray => "stray", + EntityKind::Strider => "strider", + EntityKind::Egg => "egg", + EntityKind::EnderPearl => "ender_pearl", + EntityKind::ExperienceBottle => "experience_bottle", + EntityKind::Potion => "potion", + EntityKind::Trident => "trident", + EntityKind::TraderLlama => "trader_llama", + EntityKind::TropicalFish => "tropical_fish", + EntityKind::Turtle => "turtle", + EntityKind::Vex => "vex", + EntityKind::Villager => "villager", + EntityKind::Vindicator => "vindicator", + EntityKind::WanderingTrader => "wandering_trader", + EntityKind::Witch => "witch", + EntityKind::Wither => "wither", + EntityKind::WitherSkeleton => "wither_skeleton", + EntityKind::WitherSkull => "wither_skull", + EntityKind::Wolf => "wolf", + EntityKind::Zoglin => "zoglin", + EntityKind::Zombie => "zombie", + EntityKind::ZombieHorse => "zombie_horse", + EntityKind::ZombieVillager => "zombie_villager", + EntityKind::ZombifiedPiglin => "zombified_piglin", + EntityKind::Player => "player", + EntityKind::FishingBobber => "fishing_bobber", + } + } + + /// Gets a `EntityKind` by its `name`. + pub fn from_name(name: &str) -> Option { + match name { + "area_effect_cloud" => Some(EntityKind::AreaEffectCloud), + "armor_stand" => Some(EntityKind::ArmorStand), + "arrow" => Some(EntityKind::Arrow), + "bat" => Some(EntityKind::Bat), + "bee" => Some(EntityKind::Bee), + "blaze" => Some(EntityKind::Blaze), + "boat" => Some(EntityKind::Boat), + "cat" => Some(EntityKind::Cat), + "cave_spider" => Some(EntityKind::CaveSpider), + "chicken" => Some(EntityKind::Chicken), + "cod" => Some(EntityKind::Cod), + "cow" => Some(EntityKind::Cow), + "creeper" => Some(EntityKind::Creeper), + "dolphin" => Some(EntityKind::Dolphin), + "donkey" => Some(EntityKind::Donkey), + "dragon_fireball" => Some(EntityKind::DragonFireball), + "drowned" => Some(EntityKind::Drowned), + "elder_guardian" => Some(EntityKind::ElderGuardian), + "end_crystal" => Some(EntityKind::EndCrystal), + "ender_dragon" => Some(EntityKind::EnderDragon), + "enderman" => Some(EntityKind::Enderman), + "endermite" => Some(EntityKind::Endermite), + "evoker" => Some(EntityKind::Evoker), + "evoker_fangs" => Some(EntityKind::EvokerFangs), + "experience_orb" => Some(EntityKind::ExperienceOrb), + "eye_of_ender" => Some(EntityKind::EyeOfEnder), + "falling_block" => Some(EntityKind::FallingBlock), + "firework_rocket" => Some(EntityKind::FireworkRocket), + "fox" => Some(EntityKind::Fox), + "ghast" => Some(EntityKind::Ghast), + "giant" => Some(EntityKind::Giant), + "guardian" => Some(EntityKind::Guardian), + "hoglin" => Some(EntityKind::Hoglin), + "horse" => Some(EntityKind::Horse), + "husk" => Some(EntityKind::Husk), + "illusioner" => Some(EntityKind::Illusioner), + "iron_golem" => Some(EntityKind::IronGolem), + "item" => Some(EntityKind::Item), + "item_frame" => Some(EntityKind::ItemFrame), + "fireball" => Some(EntityKind::Fireball), + "leash_knot" => Some(EntityKind::LeashKnot), + "lightning_bolt" => Some(EntityKind::LightningBolt), + "llama" => Some(EntityKind::Llama), + "llama_spit" => Some(EntityKind::LlamaSpit), + "magma_cube" => Some(EntityKind::MagmaCube), + "minecart" => Some(EntityKind::Minecart), + "chest_minecart" => Some(EntityKind::ChestMinecart), + "command_block_minecart" => Some(EntityKind::CommandBlockMinecart), + "furnace_minecart" => Some(EntityKind::FurnaceMinecart), + "hopper_minecart" => Some(EntityKind::HopperMinecart), + "spawner_minecart" => Some(EntityKind::SpawnerMinecart), + "tnt_minecart" => Some(EntityKind::TntMinecart), + "mule" => Some(EntityKind::Mule), + "mooshroom" => Some(EntityKind::Mooshroom), + "ocelot" => Some(EntityKind::Ocelot), + "painting" => Some(EntityKind::Painting), + "panda" => Some(EntityKind::Panda), + "parrot" => Some(EntityKind::Parrot), + "phantom" => Some(EntityKind::Phantom), + "pig" => Some(EntityKind::Pig), + "piglin" => Some(EntityKind::Piglin), + "piglin_brute" => Some(EntityKind::PiglinBrute), + "pillager" => Some(EntityKind::Pillager), + "polar_bear" => Some(EntityKind::PolarBear), + "tnt" => Some(EntityKind::Tnt), + "pufferfish" => Some(EntityKind::Pufferfish), + "rabbit" => Some(EntityKind::Rabbit), + "ravager" => Some(EntityKind::Ravager), + "salmon" => Some(EntityKind::Salmon), + "sheep" => Some(EntityKind::Sheep), + "shulker" => Some(EntityKind::Shulker), + "shulker_bullet" => Some(EntityKind::ShulkerBullet), + "silverfish" => Some(EntityKind::Silverfish), + "skeleton" => Some(EntityKind::Skeleton), + "skeleton_horse" => Some(EntityKind::SkeletonHorse), + "slime" => Some(EntityKind::Slime), + "small_fireball" => Some(EntityKind::SmallFireball), + "snow_golem" => Some(EntityKind::SnowGolem), + "snowball" => Some(EntityKind::Snowball), + "spectral_arrow" => Some(EntityKind::SpectralArrow), + "spider" => Some(EntityKind::Spider), + "squid" => Some(EntityKind::Squid), + "stray" => Some(EntityKind::Stray), + "strider" => Some(EntityKind::Strider), + "egg" => Some(EntityKind::Egg), + "ender_pearl" => Some(EntityKind::EnderPearl), + "experience_bottle" => Some(EntityKind::ExperienceBottle), + "potion" => Some(EntityKind::Potion), + "trident" => Some(EntityKind::Trident), + "trader_llama" => Some(EntityKind::TraderLlama), + "tropical_fish" => Some(EntityKind::TropicalFish), + "turtle" => Some(EntityKind::Turtle), + "vex" => Some(EntityKind::Vex), + "villager" => Some(EntityKind::Villager), + "vindicator" => Some(EntityKind::Vindicator), + "wandering_trader" => Some(EntityKind::WanderingTrader), + "witch" => Some(EntityKind::Witch), + "wither" => Some(EntityKind::Wither), + "wither_skeleton" => Some(EntityKind::WitherSkeleton), + "wither_skull" => Some(EntityKind::WitherSkull), + "wolf" => Some(EntityKind::Wolf), + "zoglin" => Some(EntityKind::Zoglin), + "zombie" => Some(EntityKind::Zombie), + "zombie_horse" => Some(EntityKind::ZombieHorse), + "zombie_villager" => Some(EntityKind::ZombieVillager), + "zombified_piglin" => Some(EntityKind::ZombifiedPiglin), + "player" => Some(EntityKind::Player), + "fishing_bobber" => Some(EntityKind::FishingBobber), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl EntityKind { + /// Returns the `display_name` property of this `EntityKind`. + pub fn display_name(&self) -> &'static str { + match self { + EntityKind::AreaEffectCloud => "Area Effect Cloud", + EntityKind::ArmorStand => "Armor Stand", + EntityKind::Arrow => "Arrow", + EntityKind::Bat => "Bat", + EntityKind::Bee => "Bee", + EntityKind::Blaze => "Blaze", + EntityKind::Boat => "Boat", + EntityKind::Cat => "Cat", + EntityKind::CaveSpider => "Cave Spider", + EntityKind::Chicken => "Chicken", + EntityKind::Cod => "Cod", + EntityKind::Cow => "Cow", + EntityKind::Creeper => "Creeper", + EntityKind::Dolphin => "Dolphin", + EntityKind::Donkey => "Donkey", + EntityKind::DragonFireball => "Dragon Fireball", + EntityKind::Drowned => "Drowned", + EntityKind::ElderGuardian => "Elder Guardian", + EntityKind::EndCrystal => "End Crystal", + EntityKind::EnderDragon => "Ender Dragon", + EntityKind::Enderman => "Enderman", + EntityKind::Endermite => "Endermite", + EntityKind::Evoker => "Evoker", + EntityKind::EvokerFangs => "Evoker Fangs", + EntityKind::ExperienceOrb => "Experience Orb", + EntityKind::EyeOfEnder => "Eye of Ender", + EntityKind::FallingBlock => "Falling Block", + EntityKind::FireworkRocket => "Firework Rocket", + EntityKind::Fox => "Fox", + EntityKind::Ghast => "Ghast", + EntityKind::Giant => "Giant", + EntityKind::Guardian => "Guardian", + EntityKind::Hoglin => "Hoglin", + EntityKind::Horse => "Horse", + EntityKind::Husk => "Husk", + EntityKind::Illusioner => "Illusioner", + EntityKind::IronGolem => "Iron Golem", + EntityKind::Item => "Item", + EntityKind::ItemFrame => "Item Frame", + EntityKind::Fireball => "Fireball", + EntityKind::LeashKnot => "Leash Knot", + EntityKind::LightningBolt => "Lightning Bolt", + EntityKind::Llama => "Llama", + EntityKind::LlamaSpit => "Llama Spit", + EntityKind::MagmaCube => "Magma Cube", + EntityKind::Minecart => "Minecart", + EntityKind::ChestMinecart => "Minecart with Chest", + EntityKind::CommandBlockMinecart => "Minecart with Command Block", + EntityKind::FurnaceMinecart => "Minecart with Furnace", + EntityKind::HopperMinecart => "Minecart with Hopper", + EntityKind::SpawnerMinecart => "Minecart with Spawner", + EntityKind::TntMinecart => "Minecart with TNT", + EntityKind::Mule => "Mule", + EntityKind::Mooshroom => "Mooshroom", + EntityKind::Ocelot => "Ocelot", + EntityKind::Painting => "Painting", + EntityKind::Panda => "Panda", + EntityKind::Parrot => "Parrot", + EntityKind::Phantom => "Phantom", + EntityKind::Pig => "Pig", + EntityKind::Piglin => "Piglin", + EntityKind::PiglinBrute => "Piglin Brute", + EntityKind::Pillager => "Pillager", + EntityKind::PolarBear => "Polar Bear", + EntityKind::Tnt => "Primed TNT", + EntityKind::Pufferfish => "Pufferfish", + EntityKind::Rabbit => "Rabbit", + EntityKind::Ravager => "Ravager", + EntityKind::Salmon => "Salmon", + EntityKind::Sheep => "Sheep", + EntityKind::Shulker => "Shulker", + EntityKind::ShulkerBullet => "Shulker Bullet", + EntityKind::Silverfish => "Silverfish", + EntityKind::Skeleton => "Skeleton", + EntityKind::SkeletonHorse => "Skeleton Horse", + EntityKind::Slime => "Slime", + EntityKind::SmallFireball => "Small Fireball", + EntityKind::SnowGolem => "Snow Golem", + EntityKind::Snowball => "Snowball", + EntityKind::SpectralArrow => "Spectral Arrow", + EntityKind::Spider => "Spider", + EntityKind::Squid => "Squid", + EntityKind::Stray => "Stray", + EntityKind::Strider => "Strider", + EntityKind::Egg => "Thrown Egg", + EntityKind::EnderPearl => "Thrown Ender Pearl", + EntityKind::ExperienceBottle => "Thrown Bottle o' Enchanting", + EntityKind::Potion => "Potion", + EntityKind::Trident => "Trident", + EntityKind::TraderLlama => "Trader Llama", + EntityKind::TropicalFish => "Tropical Fish", + EntityKind::Turtle => "Turtle", + EntityKind::Vex => "Vex", + EntityKind::Villager => "Villager", + EntityKind::Vindicator => "Vindicator", + EntityKind::WanderingTrader => "Wandering Trader", + EntityKind::Witch => "Witch", + EntityKind::Wither => "Wither", + EntityKind::WitherSkeleton => "Wither Skeleton", + EntityKind::WitherSkull => "Wither Skull", + EntityKind::Wolf => "Wolf", + EntityKind::Zoglin => "Zoglin", + EntityKind::Zombie => "Zombie", + EntityKind::ZombieHorse => "Zombie Horse", + EntityKind::ZombieVillager => "Zombie Villager", + EntityKind::ZombifiedPiglin => "Zombified Piglin", + EntityKind::Player => "Player", + EntityKind::FishingBobber => "Fishing Bobber", + } + } + + /// Gets a `EntityKind` by its `display_name`. + pub fn from_display_name(display_name: &str) -> Option { + match display_name { + "Area Effect Cloud" => Some(EntityKind::AreaEffectCloud), + "Armor Stand" => Some(EntityKind::ArmorStand), + "Arrow" => Some(EntityKind::Arrow), + "Bat" => Some(EntityKind::Bat), + "Bee" => Some(EntityKind::Bee), + "Blaze" => Some(EntityKind::Blaze), + "Boat" => Some(EntityKind::Boat), + "Cat" => Some(EntityKind::Cat), + "Cave Spider" => Some(EntityKind::CaveSpider), + "Chicken" => Some(EntityKind::Chicken), + "Cod" => Some(EntityKind::Cod), + "Cow" => Some(EntityKind::Cow), + "Creeper" => Some(EntityKind::Creeper), + "Dolphin" => Some(EntityKind::Dolphin), + "Donkey" => Some(EntityKind::Donkey), + "Dragon Fireball" => Some(EntityKind::DragonFireball), + "Drowned" => Some(EntityKind::Drowned), + "Elder Guardian" => Some(EntityKind::ElderGuardian), + "End Crystal" => Some(EntityKind::EndCrystal), + "Ender Dragon" => Some(EntityKind::EnderDragon), + "Enderman" => Some(EntityKind::Enderman), + "Endermite" => Some(EntityKind::Endermite), + "Evoker" => Some(EntityKind::Evoker), + "Evoker Fangs" => Some(EntityKind::EvokerFangs), + "Experience Orb" => Some(EntityKind::ExperienceOrb), + "Eye of Ender" => Some(EntityKind::EyeOfEnder), + "Falling Block" => Some(EntityKind::FallingBlock), + "Firework Rocket" => Some(EntityKind::FireworkRocket), + "Fox" => Some(EntityKind::Fox), + "Ghast" => Some(EntityKind::Ghast), + "Giant" => Some(EntityKind::Giant), + "Guardian" => Some(EntityKind::Guardian), + "Hoglin" => Some(EntityKind::Hoglin), + "Horse" => Some(EntityKind::Horse), + "Husk" => Some(EntityKind::Husk), + "Illusioner" => Some(EntityKind::Illusioner), + "Iron Golem" => Some(EntityKind::IronGolem), + "Item" => Some(EntityKind::Item), + "Item Frame" => Some(EntityKind::ItemFrame), + "Fireball" => Some(EntityKind::Fireball), + "Leash Knot" => Some(EntityKind::LeashKnot), + "Lightning Bolt" => Some(EntityKind::LightningBolt), + "Llama" => Some(EntityKind::Llama), + "Llama Spit" => Some(EntityKind::LlamaSpit), + "Magma Cube" => Some(EntityKind::MagmaCube), + "Minecart" => Some(EntityKind::Minecart), + "Minecart with Chest" => Some(EntityKind::ChestMinecart), + "Minecart with Command Block" => Some(EntityKind::CommandBlockMinecart), + "Minecart with Furnace" => Some(EntityKind::FurnaceMinecart), + "Minecart with Hopper" => Some(EntityKind::HopperMinecart), + "Minecart with Spawner" => Some(EntityKind::SpawnerMinecart), + "Minecart with TNT" => Some(EntityKind::TntMinecart), + "Mule" => Some(EntityKind::Mule), + "Mooshroom" => Some(EntityKind::Mooshroom), + "Ocelot" => Some(EntityKind::Ocelot), + "Painting" => Some(EntityKind::Painting), + "Panda" => Some(EntityKind::Panda), + "Parrot" => Some(EntityKind::Parrot), + "Phantom" => Some(EntityKind::Phantom), + "Pig" => Some(EntityKind::Pig), + "Piglin" => Some(EntityKind::Piglin), + "Piglin Brute" => Some(EntityKind::PiglinBrute), + "Pillager" => Some(EntityKind::Pillager), + "Polar Bear" => Some(EntityKind::PolarBear), + "Primed TNT" => Some(EntityKind::Tnt), + "Pufferfish" => Some(EntityKind::Pufferfish), + "Rabbit" => Some(EntityKind::Rabbit), + "Ravager" => Some(EntityKind::Ravager), + "Salmon" => Some(EntityKind::Salmon), + "Sheep" => Some(EntityKind::Sheep), + "Shulker" => Some(EntityKind::Shulker), + "Shulker Bullet" => Some(EntityKind::ShulkerBullet), + "Silverfish" => Some(EntityKind::Silverfish), + "Skeleton" => Some(EntityKind::Skeleton), + "Skeleton Horse" => Some(EntityKind::SkeletonHorse), + "Slime" => Some(EntityKind::Slime), + "Small Fireball" => Some(EntityKind::SmallFireball), + "Snow Golem" => Some(EntityKind::SnowGolem), + "Snowball" => Some(EntityKind::Snowball), + "Spectral Arrow" => Some(EntityKind::SpectralArrow), + "Spider" => Some(EntityKind::Spider), + "Squid" => Some(EntityKind::Squid), + "Stray" => Some(EntityKind::Stray), + "Strider" => Some(EntityKind::Strider), + "Thrown Egg" => Some(EntityKind::Egg), + "Thrown Ender Pearl" => Some(EntityKind::EnderPearl), + "Thrown Bottle o' Enchanting" => Some(EntityKind::ExperienceBottle), + "Potion" => Some(EntityKind::Potion), + "Trident" => Some(EntityKind::Trident), + "Trader Llama" => Some(EntityKind::TraderLlama), + "Tropical Fish" => Some(EntityKind::TropicalFish), + "Turtle" => Some(EntityKind::Turtle), + "Vex" => Some(EntityKind::Vex), + "Villager" => Some(EntityKind::Villager), + "Vindicator" => Some(EntityKind::Vindicator), + "Wandering Trader" => Some(EntityKind::WanderingTrader), + "Witch" => Some(EntityKind::Witch), + "Wither" => Some(EntityKind::Wither), + "Wither Skeleton" => Some(EntityKind::WitherSkeleton), + "Wither Skull" => Some(EntityKind::WitherSkull), + "Wolf" => Some(EntityKind::Wolf), + "Zoglin" => Some(EntityKind::Zoglin), + "Zombie" => Some(EntityKind::Zombie), + "Zombie Horse" => Some(EntityKind::ZombieHorse), + "Zombie Villager" => Some(EntityKind::ZombieVillager), + "Zombified Piglin" => Some(EntityKind::ZombifiedPiglin), + "Player" => Some(EntityKind::Player), + "Fishing Bobber" => Some(EntityKind::FishingBobber), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl EntityKind { + /// Returns the `bounding_box` property of this `EntityKind`. + pub fn bounding_box(&self) -> vek::Aabb { + match self { + EntityKind::AreaEffectCloud => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(6 as f64, 0.5 as f64, 6 as f64), + }, + EntityKind::ArmorStand => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 1.975 as f64, 0.5 as f64), + }, + EntityKind::Arrow => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.5 as f64, 0.5 as f64), + }, + EntityKind::Bat => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.9 as f64, 0.5 as f64), + }, + EntityKind::Bee => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.7 as f64, 0.6 as f64, 0.7 as f64), + }, + EntityKind::Blaze => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.8 as f64, 0.6 as f64), + }, + EntityKind::Boat => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.375 as f64, 0.5625 as f64, 1.375 as f64), + }, + EntityKind::Cat => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 0.7 as f64, 0.6 as f64), + }, + EntityKind::CaveSpider => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.7 as f64, 0.5 as f64, 0.7 as f64), + }, + EntityKind::Chicken => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.4 as f64, 0.7 as f64, 0.4 as f64), + }, + EntityKind::Cod => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.3 as f64, 0.5 as f64), + }, + EntityKind::Cow => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 1.4 as f64, 0.9 as f64), + }, + EntityKind::Creeper => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.7 as f64, 0.6 as f64), + }, + EntityKind::Dolphin => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 0.6 as f64, 0.9 as f64), + }, + EntityKind::Donkey => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.39648 as f64, 1.5 as f64, 1.39648 as f64), + }, + EntityKind::DragonFireball => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1 as f64, 1 as f64, 1 as f64), + }, + EntityKind::Drowned => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::ElderGuardian => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.9975 as f64, 1.9975 as f64, 1.9975 as f64), + }, + EntityKind::EndCrystal => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(2 as f64, 2 as f64, 2 as f64), + }, + EntityKind::EnderDragon => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(16 as f64, 8 as f64, 16 as f64), + }, + EntityKind::Enderman => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 2.9 as f64, 0.6 as f64), + }, + EntityKind::Endermite => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.4 as f64, 0.3 as f64, 0.4 as f64), + }, + EntityKind::Evoker => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::EvokerFangs => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.8 as f64, 0.5 as f64), + }, + EntityKind::ExperienceOrb => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.5 as f64, 0.5 as f64), + }, + EntityKind::EyeOfEnder => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + EntityKind::FallingBlock => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.98 as f64, 0.98 as f64, 0.98 as f64), + }, + EntityKind::FireworkRocket => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + EntityKind::Fox => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 0.7 as f64, 0.6 as f64), + }, + EntityKind::Ghast => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(4 as f64, 4 as f64, 4 as f64), + }, + EntityKind::Giant => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(3.6 as f64, 12 as f64, 3.6 as f64), + }, + EntityKind::Guardian => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.85 as f64, 0.85 as f64, 0.85 as f64), + }, + EntityKind::Hoglin => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.39648 as f64, 1.4 as f64, 1.39648 as f64), + }, + EntityKind::Horse => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.39648 as f64, 1.6 as f64, 1.39648 as f64), + }, + EntityKind::Husk => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::Illusioner => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::IronGolem => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.4 as f64, 2.7 as f64, 1.4 as f64), + }, + EntityKind::Item => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + EntityKind::ItemFrame => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.5 as f64, 0.5 as f64), + }, + EntityKind::Fireball => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1 as f64, 1 as f64, 1 as f64), + }, + EntityKind::LeashKnot => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.5 as f64, 0.5 as f64), + }, + EntityKind::LightningBolt => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0 as f64, 0 as f64, 0 as f64), + }, + EntityKind::Llama => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 1.87 as f64, 0.9 as f64), + }, + EntityKind::LlamaSpit => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + EntityKind::MagmaCube => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(2.04 as f64, 2.04 as f64, 2.04 as f64), + }, + EntityKind::Minecart => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.98 as f64, 0.7 as f64, 0.98 as f64), + }, + EntityKind::ChestMinecart => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.98 as f64, 0.7 as f64, 0.98 as f64), + }, + EntityKind::CommandBlockMinecart => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.98 as f64, 0.7 as f64, 0.98 as f64), + }, + EntityKind::FurnaceMinecart => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.98 as f64, 0.7 as f64, 0.98 as f64), + }, + EntityKind::HopperMinecart => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.98 as f64, 0.7 as f64, 0.98 as f64), + }, + EntityKind::SpawnerMinecart => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.98 as f64, 0.7 as f64, 0.98 as f64), + }, + EntityKind::TntMinecart => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.98 as f64, 0.7 as f64, 0.98 as f64), + }, + EntityKind::Mule => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.39648 as f64, 1.6 as f64, 1.39648 as f64), + }, + EntityKind::Mooshroom => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 1.4 as f64, 0.9 as f64), + }, + EntityKind::Ocelot => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 0.7 as f64, 0.6 as f64), + }, + EntityKind::Painting => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.5 as f64, 0.5 as f64), + }, + EntityKind::Panda => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.3 as f64, 1.25 as f64, 1.3 as f64), + }, + EntityKind::Parrot => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.9 as f64, 0.5 as f64), + }, + EntityKind::Phantom => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 0.5 as f64, 0.9 as f64), + }, + EntityKind::Pig => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 0.9 as f64, 0.9 as f64), + }, + EntityKind::Piglin => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::PiglinBrute => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::Pillager => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::PolarBear => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.4 as f64, 1.4 as f64, 1.4 as f64), + }, + EntityKind::Tnt => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.98 as f64, 0.98 as f64, 0.98 as f64), + }, + EntityKind::Pufferfish => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.7 as f64, 0.7 as f64, 0.7 as f64), + }, + EntityKind::Rabbit => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.4 as f64, 0.5 as f64, 0.4 as f64), + }, + EntityKind::Ravager => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.95 as f64, 2.2 as f64, 1.95 as f64), + }, + EntityKind::Salmon => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.7 as f64, 0.4 as f64, 0.7 as f64), + }, + EntityKind::Sheep => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 1.3 as f64, 0.9 as f64), + }, + EntityKind::Shulker => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1 as f64, 1 as f64, 1 as f64), + }, + EntityKind::ShulkerBullet => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.3125 as f64, 0.3125 as f64, 0.3125 as f64), + }, + EntityKind::Silverfish => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.4 as f64, 0.3 as f64, 0.4 as f64), + }, + EntityKind::Skeleton => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.99 as f64, 0.6 as f64), + }, + EntityKind::SkeletonHorse => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.39648 as f64, 1.6 as f64, 1.39648 as f64), + }, + EntityKind::Slime => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(2.04 as f64, 2.04 as f64, 2.04 as f64), + }, + EntityKind::SmallFireball => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.3125 as f64, 0.3125 as f64, 0.3125 as f64), + }, + EntityKind::SnowGolem => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.7 as f64, 1.9 as f64, 0.7 as f64), + }, + EntityKind::Snowball => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + EntityKind::SpectralArrow => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.5 as f64, 0.5 as f64), + }, + EntityKind::Spider => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.4 as f64, 0.9 as f64, 1.4 as f64), + }, + EntityKind::Squid => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.8 as f64, 0.8 as f64, 0.8 as f64), + }, + EntityKind::Stray => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.99 as f64, 0.6 as f64), + }, + EntityKind::Strider => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 1.7 as f64, 0.9 as f64), + }, + EntityKind::Egg => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + EntityKind::EnderPearl => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + EntityKind::ExperienceBottle => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + EntityKind::Potion => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + EntityKind::Trident => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.5 as f64, 0.5 as f64), + }, + EntityKind::TraderLlama => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 1.87 as f64, 0.9 as f64), + }, + EntityKind::TropicalFish => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.5 as f64, 0.4 as f64, 0.5 as f64), + }, + EntityKind::Turtle => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.2 as f64, 0.4 as f64, 1.2 as f64), + }, + EntityKind::Vex => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.4 as f64, 0.8 as f64, 0.4 as f64), + }, + EntityKind::Villager => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::Vindicator => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::WanderingTrader => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::Witch => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::Wither => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.9 as f64, 3.5 as f64, 0.9 as f64), + }, + EntityKind::WitherSkeleton => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.7 as f64, 2.4 as f64, 0.7 as f64), + }, + EntityKind::WitherSkull => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.3125 as f64, 0.3125 as f64, 0.3125 as f64), + }, + EntityKind::Wolf => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 0.85 as f64, 0.6 as f64), + }, + EntityKind::Zoglin => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.39648 as f64, 1.4 as f64, 1.39648 as f64), + }, + EntityKind::Zombie => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::ZombieHorse => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(1.39648 as f64, 1.6 as f64, 1.39648 as f64), + }, + EntityKind::ZombieVillager => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::ZombifiedPiglin => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.95 as f64, 0.6 as f64), + }, + EntityKind::Player => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.6 as f64, 1.8 as f64, 0.6 as f64), + }, + EntityKind::FishingBobber => vek::Aabb { + min: vek::Vec3::zero(), + max: vek::Vec3::new(0.25 as f64, 0.25 as f64, 0.25 as f64), + }, + } + } +} diff --git a/crates/generated/src/inventory.rs b/crates/generated/src/inventory.rs new file mode 100644 index 000000000..ce8900746 --- /dev/null +++ b/crates/generated/src/inventory.rs @@ -0,0 +1,1213 @@ +// This file is @generated. Please do not edit. + +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum Area { + Storage, + CraftingOutput, + CraftingInput, + Helmet, + Chestplate, + Leggings, + Boots, + Hotbar, + Offhand, + FurnaceIngredient, + FurnaceFuel, + FurnaceOutput, + EnchantmentItem, + EnchantmentLapis, + BrewingBottle, + BrewingIngredient, + BrewingBlazePowder, + VillagerInput, + VillagerOutput, + BeaconPayment, + AnvilInput1, + AnvilInput2, + AnvilOutput, + Saddle, + HorseArmor, + LlamaCarpet, + CartographyMap, + CartographyPaper, + CartographyOutput, + GrindstoneInput1, + GrindstoneInput2, + GrindstoneOutput, + LecternBook, + LoomBanner, + LoomDye, + LoomPattern, + LoomOutput, + StonecutterInput, + StonecutterOutput, +} +#[derive(Debug, Clone)] +pub enum Window { + Player { + player: crate::Inventory, + }, + Generic9x1 { + block: crate::Inventory, + player: crate::Inventory, + }, + Generic9x2 { + block: crate::Inventory, + player: crate::Inventory, + }, + Generic9x3 { + block: crate::Inventory, + player: crate::Inventory, + }, + Generic9x4 { + block: crate::Inventory, + player: crate::Inventory, + }, + Generic9x5 { + block: crate::Inventory, + player: crate::Inventory, + }, + Generic9x6 { + left_chest: crate::Inventory, + right_chest: crate::Inventory, + player: crate::Inventory, + }, + Generic3x3 { + block: crate::Inventory, + player: crate::Inventory, + }, + Crafting { + crafting_table: crate::Inventory, + player: crate::Inventory, + }, + Furnace { + furnace: crate::Inventory, + player: crate::Inventory, + }, + BlastFurnace { + blast_furnace: crate::Inventory, + player: crate::Inventory, + }, + Smoker { + smoker: crate::Inventory, + player: crate::Inventory, + }, + Enchantment { + enchantment_table: crate::Inventory, + player: crate::Inventory, + }, + BrewingStand { + brewing_stand: crate::Inventory, + player: crate::Inventory, + }, + Beacon { + beacon: crate::Inventory, + player: crate::Inventory, + }, + Anvil { + anvil: crate::Inventory, + player: crate::Inventory, + }, + Hopper { + hopper: crate::Inventory, + player: crate::Inventory, + }, + ShulkerBox { + shulker_box: crate::Inventory, + player: crate::Inventory, + }, + Cartography { + cartography_table: crate::Inventory, + player: crate::Inventory, + }, + Grindstone { + grindstone: crate::Inventory, + player: crate::Inventory, + }, + Lectern { + lectern: crate::Inventory, + player: crate::Inventory, + }, + Loom { + loom: crate::Inventory, + player: crate::Inventory, + }, + Stonecutter { + stonecutter: crate::Inventory, + player: crate::Inventory, + }, +} +impl Window { + #[allow(unused_comparisons)] + pub fn index_to_slot(&self, index: usize) -> Option<(&crate::Inventory, Area, usize)> { + match self { + Window::Player { player } => { + if index >= 0 && index < 1 { + let area = Area::CraftingOutput; + let slot = index - 0; + Some((player, area, slot)) + } else if index >= 1 && index < 5 { + let area = Area::CraftingInput; + let slot = index - 1; + Some((player, area, slot)) + } else if index >= 5 && index < 6 { + let area = Area::Helmet; + let slot = index - 5; + Some((player, area, slot)) + } else if index >= 6 && index < 7 { + let area = Area::Chestplate; + let slot = index - 6; + Some((player, area, slot)) + } else if index >= 7 && index < 8 { + let area = Area::Leggings; + let slot = index - 7; + Some((player, area, slot)) + } else if index >= 8 && index < 9 { + let area = Area::Boots; + let slot = index - 8; + Some((player, area, slot)) + } else if index >= 9 && index < 36 { + let area = Area::Storage; + let slot = index - 9; + Some((player, area, slot)) + } else if index >= 36 && index < 45 { + let area = Area::Hotbar; + let slot = index - 36; + Some((player, area, slot)) + } else if index >= 45 && index < 46 { + let area = Area::Offhand; + let slot = index - 45; + Some((player, area, slot)) + } else { + None + } + } + Window::Generic9x1 { block, player } => { + if index >= 0 && index < 9 { + let area = Area::Storage; + let slot = index - 0; + Some((block, area, slot)) + } else if index >= 9 && index < 36 { + let area = Area::Storage; + let slot = index - 9; + Some((player, area, slot)) + } else if index >= 36 && index < 45 { + let area = Area::Hotbar; + let slot = index - 36; + Some((player, area, slot)) + } else { + None + } + } + Window::Generic9x2 { block, player } => { + if index >= 0 && index < 18 { + let area = Area::Storage; + let slot = index - 0; + Some((block, area, slot)) + } else if index >= 18 && index < 45 { + let area = Area::Storage; + let slot = index - 18; + Some((player, area, slot)) + } else if index >= 45 && index < 54 { + let area = Area::Hotbar; + let slot = index - 45; + Some((player, area, slot)) + } else { + None + } + } + Window::Generic9x3 { block, player } => { + if index >= 0 && index < 27 { + let area = Area::Storage; + let slot = index - 0; + Some((block, area, slot)) + } else if index >= 27 && index < 54 { + let area = Area::Storage; + let slot = index - 27; + Some((player, area, slot)) + } else if index >= 54 && index < 63 { + let area = Area::Hotbar; + let slot = index - 54; + Some((player, area, slot)) + } else { + None + } + } + Window::Generic9x4 { block, player } => { + if index >= 0 && index < 36 { + let area = Area::Storage; + let slot = index - 0; + Some((block, area, slot)) + } else if index >= 36 && index < 63 { + let area = Area::Storage; + let slot = index - 36; + Some((player, area, slot)) + } else if index >= 63 && index < 72 { + let area = Area::Hotbar; + let slot = index - 63; + Some((player, area, slot)) + } else { + None + } + } + Window::Generic9x5 { block, player } => { + if index >= 0 && index < 45 { + let area = Area::Storage; + let slot = index - 0; + Some((block, area, slot)) + } else if index >= 45 && index < 72 { + let area = Area::Storage; + let slot = index - 45; + Some((player, area, slot)) + } else if index >= 72 && index < 81 { + let area = Area::Hotbar; + let slot = index - 72; + Some((player, area, slot)) + } else { + None + } + } + Window::Generic9x6 { + left_chest, + right_chest, + player, + } => { + if index >= 0 && index < 27 { + let area = Area::Storage; + let slot = index - 0; + Some((left_chest, area, slot)) + } else if index >= 27 && index < 54 { + let area = Area::Storage; + let slot = index - 27; + Some((right_chest, area, slot)) + } else if index >= 54 && index < 81 { + let area = Area::Storage; + let slot = index - 54; + Some((player, area, slot)) + } else if index >= 81 && index < 90 { + let area = Area::Hotbar; + let slot = index - 81; + Some((player, area, slot)) + } else { + None + } + } + Window::Generic3x3 { block, player } => { + if index >= 0 && index < 9 { + let area = Area::Storage; + let slot = index - 0; + Some((block, area, slot)) + } else if index >= 9 && index < 36 { + let area = Area::Storage; + let slot = index - 9; + Some((player, area, slot)) + } else if index >= 36 && index < 45 { + let area = Area::Hotbar; + let slot = index - 36; + Some((player, area, slot)) + } else { + None + } + } + Window::Crafting { + crafting_table, + player, + } => { + if index >= 0 && index < 1 { + let area = Area::CraftingOutput; + let slot = index - 0; + Some((crafting_table, area, slot)) + } else if index >= 1 && index < 10 { + let area = Area::CraftingInput; + let slot = index - 1; + Some((crafting_table, area, slot)) + } else if index >= 10 && index < 37 { + let area = Area::Storage; + let slot = index - 10; + Some((player, area, slot)) + } else if index >= 37 && index < 46 { + let area = Area::Hotbar; + let slot = index - 37; + Some((player, area, slot)) + } else { + None + } + } + Window::Furnace { furnace, player } => { + if index >= 0 && index < 1 { + let area = Area::FurnaceIngredient; + let slot = index - 0; + Some((furnace, area, slot)) + } else if index >= 1 && index < 2 { + let area = Area::FurnaceFuel; + let slot = index - 1; + Some((furnace, area, slot)) + } else if index >= 2 && index < 3 { + let area = Area::FurnaceOutput; + let slot = index - 2; + Some((furnace, area, slot)) + } else if index >= 3 && index < 30 { + let area = Area::Storage; + let slot = index - 3; + Some((player, area, slot)) + } else if index >= 30 && index < 39 { + let area = Area::Hotbar; + let slot = index - 30; + Some((player, area, slot)) + } else { + None + } + } + Window::BlastFurnace { + blast_furnace, + player, + } => { + if index >= 0 && index < 1 { + let area = Area::FurnaceIngredient; + let slot = index - 0; + Some((blast_furnace, area, slot)) + } else if index >= 1 && index < 2 { + let area = Area::FurnaceFuel; + let slot = index - 1; + Some((blast_furnace, area, slot)) + } else if index >= 2 && index < 3 { + let area = Area::FurnaceOutput; + let slot = index - 2; + Some((blast_furnace, area, slot)) + } else if index >= 3 && index < 30 { + let area = Area::Storage; + let slot = index - 3; + Some((player, area, slot)) + } else if index >= 30 && index < 39 { + let area = Area::Hotbar; + let slot = index - 30; + Some((player, area, slot)) + } else { + None + } + } + Window::Smoker { smoker, player } => { + if index >= 0 && index < 1 { + let area = Area::FurnaceIngredient; + let slot = index - 0; + Some((smoker, area, slot)) + } else if index >= 1 && index < 2 { + let area = Area::FurnaceFuel; + let slot = index - 1; + Some((smoker, area, slot)) + } else if index >= 2 && index < 3 { + let area = Area::FurnaceOutput; + let slot = index - 2; + Some((smoker, area, slot)) + } else if index >= 3 && index < 30 { + let area = Area::Storage; + let slot = index - 3; + Some((player, area, slot)) + } else if index >= 30 && index < 39 { + let area = Area::Hotbar; + let slot = index - 30; + Some((player, area, slot)) + } else { + None + } + } + Window::Enchantment { + enchantment_table, + player, + } => { + if index >= 0 && index < 1 { + let area = Area::EnchantmentItem; + let slot = index - 0; + Some((enchantment_table, area, slot)) + } else if index >= 1 && index < 2 { + let area = Area::EnchantmentLapis; + let slot = index - 1; + Some((enchantment_table, area, slot)) + } else if index >= 2 && index < 29 { + let area = Area::Storage; + let slot = index - 2; + Some((player, area, slot)) + } else if index >= 29 && index < 38 { + let area = Area::Hotbar; + let slot = index - 29; + Some((player, area, slot)) + } else { + None + } + } + Window::BrewingStand { + brewing_stand, + player, + } => { + if index >= 0 && index < 3 { + let area = Area::BrewingBottle; + let slot = index - 0; + Some((brewing_stand, area, slot)) + } else if index >= 3 && index < 4 { + let area = Area::BrewingIngredient; + let slot = index - 3; + Some((brewing_stand, area, slot)) + } else if index >= 4 && index < 5 { + let area = Area::BrewingBlazePowder; + let slot = index - 4; + Some((brewing_stand, area, slot)) + } else if index >= 5 && index < 32 { + let area = Area::Storage; + let slot = index - 5; + Some((player, area, slot)) + } else if index >= 32 && index < 41 { + let area = Area::Hotbar; + let slot = index - 32; + Some((player, area, slot)) + } else { + None + } + } + Window::Beacon { beacon, player } => { + if index >= 0 && index < 1 { + let area = Area::BeaconPayment; + let slot = index - 0; + Some((beacon, area, slot)) + } else if index >= 1 && index < 28 { + let area = Area::Storage; + let slot = index - 1; + Some((player, area, slot)) + } else if index >= 28 && index < 37 { + let area = Area::Hotbar; + let slot = index - 28; + Some((player, area, slot)) + } else { + None + } + } + Window::Anvil { anvil, player } => { + if index >= 0 && index < 1 { + let area = Area::AnvilInput1; + let slot = index - 0; + Some((anvil, area, slot)) + } else if index >= 1 && index < 2 { + let area = Area::AnvilInput2; + let slot = index - 1; + Some((anvil, area, slot)) + } else if index >= 2 && index < 3 { + let area = Area::AnvilOutput; + let slot = index - 2; + Some((anvil, area, slot)) + } else if index >= 3 && index < 30 { + let area = Area::Storage; + let slot = index - 3; + Some((player, area, slot)) + } else if index >= 30 && index < 39 { + let area = Area::Hotbar; + let slot = index - 30; + Some((player, area, slot)) + } else { + None + } + } + Window::Hopper { hopper, player } => { + if index >= 0 && index < 4 { + let area = Area::Storage; + let slot = index - 0; + Some((hopper, area, slot)) + } else if index >= 4 && index < 31 { + let area = Area::Storage; + let slot = index - 4; + Some((player, area, slot)) + } else if index >= 31 && index < 40 { + let area = Area::Hotbar; + let slot = index - 31; + Some((player, area, slot)) + } else { + None + } + } + Window::ShulkerBox { + shulker_box, + player, + } => { + if index >= 0 && index < 27 { + let area = Area::Storage; + let slot = index - 0; + Some((shulker_box, area, slot)) + } else if index >= 27 && index < 54 { + let area = Area::Storage; + let slot = index - 27; + Some((player, area, slot)) + } else if index >= 54 && index < 63 { + let area = Area::Hotbar; + let slot = index - 54; + Some((player, area, slot)) + } else { + None + } + } + Window::Cartography { + cartography_table, + player, + } => { + if index >= 0 && index < 1 { + let area = Area::CartographyMap; + let slot = index - 0; + Some((cartography_table, area, slot)) + } else if index >= 1 && index < 2 { + let area = Area::CartographyPaper; + let slot = index - 1; + Some((cartography_table, area, slot)) + } else if index >= 2 && index < 3 { + let area = Area::CartographyOutput; + let slot = index - 2; + Some((cartography_table, area, slot)) + } else if index >= 3 && index < 30 { + let area = Area::Storage; + let slot = index - 3; + Some((player, area, slot)) + } else if index >= 30 && index < 39 { + let area = Area::Hotbar; + let slot = index - 30; + Some((player, area, slot)) + } else { + None + } + } + Window::Grindstone { grindstone, player } => { + if index >= 0 && index < 1 { + let area = Area::GrindstoneInput1; + let slot = index - 0; + Some((grindstone, area, slot)) + } else if index >= 1 && index < 2 { + let area = Area::GrindstoneInput2; + let slot = index - 1; + Some((grindstone, area, slot)) + } else if index >= 2 && index < 3 { + let area = Area::GrindstoneOutput; + let slot = index - 2; + Some((grindstone, area, slot)) + } else if index >= 3 && index < 30 { + let area = Area::Storage; + let slot = index - 3; + Some((player, area, slot)) + } else if index >= 30 && index < 39 { + let area = Area::Hotbar; + let slot = index - 30; + Some((player, area, slot)) + } else { + None + } + } + Window::Lectern { lectern, player } => { + if index >= 0 && index < 1 { + let area = Area::LecternBook; + let slot = index - 0; + Some((lectern, area, slot)) + } else if index >= 1 && index < 28 { + let area = Area::Storage; + let slot = index - 1; + Some((player, area, slot)) + } else if index >= 28 && index < 37 { + let area = Area::Hotbar; + let slot = index - 28; + Some((player, area, slot)) + } else { + None + } + } + Window::Loom { loom, player } => { + if index >= 0 && index < 1 { + let area = Area::LoomBanner; + let slot = index - 0; + Some((loom, area, slot)) + } else if index >= 1 && index < 2 { + let area = Area::LoomDye; + let slot = index - 1; + Some((loom, area, slot)) + } else if index >= 2 && index < 3 { + let area = Area::LoomPattern; + let slot = index - 2; + Some((loom, area, slot)) + } else if index >= 3 && index < 4 { + let area = Area::LoomOutput; + let slot = index - 3; + Some((loom, area, slot)) + } else if index >= 4 && index < 31 { + let area = Area::Storage; + let slot = index - 4; + Some((player, area, slot)) + } else if index >= 31 && index < 40 { + let area = Area::Hotbar; + let slot = index - 31; + Some((player, area, slot)) + } else { + None + } + } + Window::Stonecutter { + stonecutter, + player, + } => { + if index >= 0 && index < 1 { + let area = Area::StonecutterInput; + let slot = index - 0; + Some((stonecutter, area, slot)) + } else if index >= 1 && index < 2 { + let area = Area::StonecutterOutput; + let slot = index - 1; + Some((stonecutter, area, slot)) + } else if index >= 2 && index < 29 { + let area = Area::Storage; + let slot = index - 2; + Some((player, area, slot)) + } else if index >= 29 && index < 38 { + let area = Area::Hotbar; + let slot = index - 29; + Some((player, area, slot)) + } else { + None + } + } + } + } + pub fn slot_to_index( + &self, + inventory: &crate::Inventory, + area: Area, + slot: usize, + ) -> Option { + match self { + Window::Player { player } => { + if area == Area::CraftingOutput && player.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::CraftingInput && player.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::Helmet && player.ptr_eq(inventory) { + Some(slot + 5) + } else if area == Area::Chestplate && player.ptr_eq(inventory) { + Some(slot + 6) + } else if area == Area::Leggings && player.ptr_eq(inventory) { + Some(slot + 7) + } else if area == Area::Boots && player.ptr_eq(inventory) { + Some(slot + 8) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 9) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 36) + } else if area == Area::Offhand && player.ptr_eq(inventory) { + Some(slot + 45) + } else { + None + } + } + Window::Generic9x1 { block, player } => { + if area == Area::Storage && block.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 9) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 36) + } else { + None + } + } + Window::Generic9x2 { block, player } => { + if area == Area::Storage && block.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 18) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 45) + } else { + None + } + } + Window::Generic9x3 { block, player } => { + if area == Area::Storage && block.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 27) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 54) + } else { + None + } + } + Window::Generic9x4 { block, player } => { + if area == Area::Storage && block.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 36) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 63) + } else { + None + } + } + Window::Generic9x5 { block, player } => { + if area == Area::Storage && block.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 45) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 72) + } else { + None + } + } + Window::Generic9x6 { + left_chest, + right_chest, + player, + } => { + if area == Area::Storage && left_chest.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && right_chest.ptr_eq(inventory) { + Some(slot + 27) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 54) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 81) + } else { + None + } + } + Window::Generic3x3 { block, player } => { + if area == Area::Storage && block.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 9) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 36) + } else { + None + } + } + Window::Crafting { + crafting_table, + player, + } => { + if area == Area::CraftingOutput && crafting_table.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::CraftingInput && crafting_table.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 10) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 37) + } else { + None + } + } + Window::Furnace { furnace, player } => { + if area == Area::FurnaceIngredient && furnace.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::FurnaceFuel && furnace.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::FurnaceOutput && furnace.ptr_eq(inventory) { + Some(slot + 2) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 3) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 30) + } else { + None + } + } + Window::BlastFurnace { + blast_furnace, + player, + } => { + if area == Area::FurnaceIngredient && blast_furnace.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::FurnaceFuel && blast_furnace.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::FurnaceOutput && blast_furnace.ptr_eq(inventory) { + Some(slot + 2) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 3) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 30) + } else { + None + } + } + Window::Smoker { smoker, player } => { + if area == Area::FurnaceIngredient && smoker.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::FurnaceFuel && smoker.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::FurnaceOutput && smoker.ptr_eq(inventory) { + Some(slot + 2) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 3) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 30) + } else { + None + } + } + Window::Enchantment { + enchantment_table, + player, + } => { + if area == Area::EnchantmentItem && enchantment_table.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::EnchantmentLapis && enchantment_table.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 2) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 29) + } else { + None + } + } + Window::BrewingStand { + brewing_stand, + player, + } => { + if area == Area::BrewingBottle && brewing_stand.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::BrewingIngredient && brewing_stand.ptr_eq(inventory) { + Some(slot + 3) + } else if area == Area::BrewingBlazePowder && brewing_stand.ptr_eq(inventory) { + Some(slot + 4) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 5) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 32) + } else { + None + } + } + Window::Beacon { beacon, player } => { + if area == Area::BeaconPayment && beacon.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 28) + } else { + None + } + } + Window::Anvil { anvil, player } => { + if area == Area::AnvilInput1 && anvil.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::AnvilInput2 && anvil.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::AnvilOutput && anvil.ptr_eq(inventory) { + Some(slot + 2) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 3) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 30) + } else { + None + } + } + Window::Hopper { hopper, player } => { + if area == Area::Storage && hopper.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 4) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 31) + } else { + None + } + } + Window::ShulkerBox { + shulker_box, + player, + } => { + if area == Area::Storage && shulker_box.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 27) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 54) + } else { + None + } + } + Window::Cartography { + cartography_table, + player, + } => { + if area == Area::CartographyMap && cartography_table.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::CartographyPaper && cartography_table.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::CartographyOutput && cartography_table.ptr_eq(inventory) { + Some(slot + 2) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 3) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 30) + } else { + None + } + } + Window::Grindstone { grindstone, player } => { + if area == Area::GrindstoneInput1 && grindstone.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::GrindstoneInput2 && grindstone.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::GrindstoneOutput && grindstone.ptr_eq(inventory) { + Some(slot + 2) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 3) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 30) + } else { + None + } + } + Window::Lectern { lectern, player } => { + if area == Area::LecternBook && lectern.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 28) + } else { + None + } + } + Window::Loom { loom, player } => { + if area == Area::LoomBanner && loom.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::LoomDye && loom.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::LoomPattern && loom.ptr_eq(inventory) { + Some(slot + 2) + } else if area == Area::LoomOutput && loom.ptr_eq(inventory) { + Some(slot + 3) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 4) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 31) + } else { + None + } + } + Window::Stonecutter { + stonecutter, + player, + } => { + if area == Area::StonecutterInput && stonecutter.ptr_eq(inventory) { + Some(slot + 0) + } else if area == Area::StonecutterOutput && stonecutter.ptr_eq(inventory) { + Some(slot + 1) + } else if area == Area::Storage && player.ptr_eq(inventory) { + Some(slot + 2) + } else if area == Area::Hotbar && player.ptr_eq(inventory) { + Some(slot + 29) + } else { + None + } + } + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Window { + /// Returns the `name` property of this `Window`. + pub fn name(&self) -> &'static str { + match self { + Window::Player { .. } => "player", + Window::Generic9x1 { .. } => "generic_9x1", + Window::Generic9x2 { .. } => "generic_9x2", + Window::Generic9x3 { .. } => "generic_9x3", + Window::Generic9x4 { .. } => "generic_9x4", + Window::Generic9x5 { .. } => "generic_9x5", + Window::Generic9x6 { .. } => "generic_9x6", + Window::Generic3x3 { .. } => "generic_3x3", + Window::Crafting { .. } => "crafting", + Window::Furnace { .. } => "furnace", + Window::BlastFurnace { .. } => "blast_furnace", + Window::Smoker { .. } => "smoker", + Window::Enchantment { .. } => "enchantment", + Window::BrewingStand { .. } => "brewing_stand", + Window::Beacon { .. } => "beacon", + Window::Anvil { .. } => "anvil", + Window::Hopper { .. } => "hopper", + Window::ShulkerBox { .. } => "shulker_box", + Window::Cartography { .. } => "cartography", + Window::Grindstone { .. } => "grindstone", + Window::Lectern { .. } => "lectern", + Window::Loom { .. } => "loom", + Window::Stonecutter { .. } => "stonecutter", + } + } +} +#[derive(Debug, Clone)] +pub enum InventoryBacking { + Player { + crafting_input: [T; 4], + crafting_output: [T; 1], + helmet: [T; 1], + chestplate: [T; 1], + leggings: [T; 1], + boots: [T; 1], + storage: [T; 27], + hotbar: [T; 9], + }, + Chest { + storage: [T; 27], + }, + CraftingTable { + crafting_input: [T; 9], + crafting_output: [T; 1], + }, + Furnace { + furnace_ingredient: [T; 1], + furnace_fuel: [T; 1], + furnace_output: [T; 1], + }, +} +impl InventoryBacking { + pub fn area_slice(&self, area: Area) -> Option<&[T]> { + match self { + InventoryBacking::Player { + crafting_input, + crafting_output, + helmet, + chestplate, + leggings, + boots, + storage, + hotbar, + } => match area { + Area::CraftingInput => Some(crafting_input.as_ref()), + Area::CraftingOutput => Some(crafting_output.as_ref()), + Area::Helmet => Some(helmet.as_ref()), + Area::Chestplate => Some(chestplate.as_ref()), + Area::Leggings => Some(leggings.as_ref()), + Area::Boots => Some(boots.as_ref()), + Area::Storage => Some(storage.as_ref()), + Area::Hotbar => Some(hotbar.as_ref()), + _ => None, + }, + InventoryBacking::Chest { storage } => match area { + Area::Storage => Some(storage.as_ref()), + _ => None, + }, + InventoryBacking::CraftingTable { + crafting_input, + crafting_output, + } => match area { + Area::CraftingInput => Some(crafting_input.as_ref()), + Area::CraftingOutput => Some(crafting_output.as_ref()), + _ => None, + }, + InventoryBacking::Furnace { + furnace_ingredient, + furnace_fuel, + furnace_output, + } => match area { + Area::FurnaceIngredient => Some(furnace_ingredient.as_ref()), + Area::FurnaceFuel => Some(furnace_fuel.as_ref()), + Area::FurnaceOutput => Some(furnace_output.as_ref()), + _ => None, + }, + } + } + pub fn areas(&self) -> &'static [Area] { + match self { + InventoryBacking::Player { .. } => { + static AREAS: [Area; 8] = [ + Area::CraftingInput, + Area::CraftingOutput, + Area::Helmet, + Area::Chestplate, + Area::Leggings, + Area::Boots, + Area::Storage, + Area::Hotbar, + ]; + &AREAS + } + InventoryBacking::Chest { .. } => { + static AREAS: [Area; 1] = [Area::Storage]; + &AREAS + } + InventoryBacking::CraftingTable { .. } => { + static AREAS: [Area; 2] = [Area::CraftingInput, Area::CraftingOutput]; + &AREAS + } + InventoryBacking::Furnace { .. } => { + static AREAS: [Area; 3] = [ + Area::FurnaceIngredient, + Area::FurnaceFuel, + Area::FurnaceOutput, + ]; + &AREAS + } + } + } + pub fn player() -> Self + where + T: Default, + { + InventoryBacking::Player { + crafting_input: Default::default(), + crafting_output: Default::default(), + helmet: Default::default(), + chestplate: Default::default(), + leggings: Default::default(), + boots: Default::default(), + storage: Default::default(), + hotbar: Default::default(), + } + } + pub fn chest() -> Self + where + T: Default, + { + InventoryBacking::Chest { + storage: Default::default(), + } + } + pub fn crafting_table() -> Self + where + T: Default, + { + InventoryBacking::CraftingTable { + crafting_input: Default::default(), + crafting_output: Default::default(), + } + } + pub fn furnace() -> Self + where + T: Default, + { + InventoryBacking::Furnace { + furnace_ingredient: Default::default(), + furnace_fuel: Default::default(), + furnace_output: Default::default(), + } + } +} +impl crate::Inventory { + pub fn player() -> Self { + Self { + backing: std::sync::Arc::new(InventoryBacking::player()), + } + } + pub fn chest() -> Self { + Self { + backing: std::sync::Arc::new(InventoryBacking::chest()), + } + } + pub fn crafting_table() -> Self { + Self { + backing: std::sync::Arc::new(InventoryBacking::crafting_table()), + } + } + pub fn furnace() -> Self { + Self { + backing: std::sync::Arc::new(InventoryBacking::furnace()), + } + } +} diff --git a/crates/generated/src/item.rs b/crates/generated/src/item.rs new file mode 100644 index 000000000..10ee6cef2 --- /dev/null +++ b/crates/generated/src/item.rs @@ -0,0 +1,8856 @@ +// This file is @generated. Please do not edit. + +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum Item { + Air, + Stone, + Granite, + PolishedGranite, + Diorite, + PolishedDiorite, + Andesite, + PolishedAndesite, + GrassBlock, + Dirt, + CoarseDirt, + Podzol, + CrimsonNylium, + WarpedNylium, + Cobblestone, + OakPlanks, + SprucePlanks, + BirchPlanks, + JunglePlanks, + AcaciaPlanks, + DarkOakPlanks, + CrimsonPlanks, + WarpedPlanks, + OakSapling, + SpruceSapling, + BirchSapling, + JungleSapling, + AcaciaSapling, + DarkOakSapling, + Bedrock, + Sand, + RedSand, + Gravel, + GoldOre, + IronOre, + CoalOre, + NetherGoldOre, + OakLog, + SpruceLog, + BirchLog, + JungleLog, + AcaciaLog, + DarkOakLog, + CrimsonStem, + WarpedStem, + StrippedOakLog, + StrippedSpruceLog, + StrippedBirchLog, + StrippedJungleLog, + StrippedAcaciaLog, + StrippedDarkOakLog, + StrippedCrimsonStem, + StrippedWarpedStem, + StrippedOakWood, + StrippedSpruceWood, + StrippedBirchWood, + StrippedJungleWood, + StrippedAcaciaWood, + StrippedDarkOakWood, + StrippedCrimsonHyphae, + StrippedWarpedHyphae, + OakWood, + SpruceWood, + BirchWood, + JungleWood, + AcaciaWood, + DarkOakWood, + CrimsonHyphae, + WarpedHyphae, + OakLeaves, + SpruceLeaves, + BirchLeaves, + JungleLeaves, + AcaciaLeaves, + DarkOakLeaves, + Sponge, + WetSponge, + Glass, + LapisOre, + LapisBlock, + Dispenser, + Sandstone, + ChiseledSandstone, + CutSandstone, + NoteBlock, + PoweredRail, + DetectorRail, + StickyPiston, + Cobweb, + Grass, + Fern, + DeadBush, + Seagrass, + SeaPickle, + Piston, + WhiteWool, + OrangeWool, + MagentaWool, + LightBlueWool, + YellowWool, + LimeWool, + PinkWool, + GrayWool, + LightGrayWool, + CyanWool, + PurpleWool, + BlueWool, + BrownWool, + GreenWool, + RedWool, + BlackWool, + Dandelion, + Poppy, + BlueOrchid, + Allium, + AzureBluet, + RedTulip, + OrangeTulip, + WhiteTulip, + PinkTulip, + OxeyeDaisy, + Cornflower, + LilyOfTheValley, + WitherRose, + BrownMushroom, + RedMushroom, + CrimsonFungus, + WarpedFungus, + CrimsonRoots, + WarpedRoots, + NetherSprouts, + WeepingVines, + TwistingVines, + SugarCane, + Kelp, + Bamboo, + GoldBlock, + IronBlock, + OakSlab, + SpruceSlab, + BirchSlab, + JungleSlab, + AcaciaSlab, + DarkOakSlab, + CrimsonSlab, + WarpedSlab, + StoneSlab, + SmoothStoneSlab, + SandstoneSlab, + CutSandstoneSlab, + PetrifiedOakSlab, + CobblestoneSlab, + BrickSlab, + StoneBrickSlab, + NetherBrickSlab, + QuartzSlab, + RedSandstoneSlab, + CutRedSandstoneSlab, + PurpurSlab, + PrismarineSlab, + PrismarineBrickSlab, + DarkPrismarineSlab, + SmoothQuartz, + SmoothRedSandstone, + SmoothSandstone, + SmoothStone, + Bricks, + Tnt, + Bookshelf, + MossyCobblestone, + Obsidian, + Torch, + EndRod, + ChorusPlant, + ChorusFlower, + PurpurBlock, + PurpurPillar, + PurpurStairs, + Spawner, + OakStairs, + Chest, + DiamondOre, + DiamondBlock, + CraftingTable, + Farmland, + Furnace, + Ladder, + Rail, + CobblestoneStairs, + Lever, + StonePressurePlate, + OakPressurePlate, + SprucePressurePlate, + BirchPressurePlate, + JunglePressurePlate, + AcaciaPressurePlate, + DarkOakPressurePlate, + CrimsonPressurePlate, + WarpedPressurePlate, + PolishedBlackstonePressurePlate, + RedstoneOre, + RedstoneTorch, + Snow, + Ice, + SnowBlock, + Cactus, + Clay, + Jukebox, + OakFence, + SpruceFence, + BirchFence, + JungleFence, + AcaciaFence, + DarkOakFence, + CrimsonFence, + WarpedFence, + Pumpkin, + CarvedPumpkin, + Netherrack, + SoulSand, + SoulSoil, + Basalt, + PolishedBasalt, + SoulTorch, + Glowstone, + JackOLantern, + OakTrapdoor, + SpruceTrapdoor, + BirchTrapdoor, + JungleTrapdoor, + AcaciaTrapdoor, + DarkOakTrapdoor, + CrimsonTrapdoor, + WarpedTrapdoor, + InfestedStone, + InfestedCobblestone, + InfestedStoneBricks, + InfestedMossyStoneBricks, + InfestedCrackedStoneBricks, + InfestedChiseledStoneBricks, + StoneBricks, + MossyStoneBricks, + CrackedStoneBricks, + ChiseledStoneBricks, + BrownMushroomBlock, + RedMushroomBlock, + MushroomStem, + IronBars, + Chain, + GlassPane, + Melon, + Vine, + OakFenceGate, + SpruceFenceGate, + BirchFenceGate, + JungleFenceGate, + AcaciaFenceGate, + DarkOakFenceGate, + CrimsonFenceGate, + WarpedFenceGate, + BrickStairs, + StoneBrickStairs, + Mycelium, + LilyPad, + NetherBricks, + CrackedNetherBricks, + ChiseledNetherBricks, + NetherBrickFence, + NetherBrickStairs, + EnchantingTable, + EndPortalFrame, + EndStone, + EndStoneBricks, + DragonEgg, + RedstoneLamp, + SandstoneStairs, + EmeraldOre, + EnderChest, + TripwireHook, + EmeraldBlock, + SpruceStairs, + BirchStairs, + JungleStairs, + CrimsonStairs, + WarpedStairs, + CommandBlock, + Beacon, + CobblestoneWall, + MossyCobblestoneWall, + BrickWall, + PrismarineWall, + RedSandstoneWall, + MossyStoneBrickWall, + GraniteWall, + StoneBrickWall, + NetherBrickWall, + AndesiteWall, + RedNetherBrickWall, + SandstoneWall, + EndStoneBrickWall, + DioriteWall, + BlackstoneWall, + PolishedBlackstoneWall, + PolishedBlackstoneBrickWall, + StoneButton, + OakButton, + SpruceButton, + BirchButton, + JungleButton, + AcaciaButton, + DarkOakButton, + CrimsonButton, + WarpedButton, + PolishedBlackstoneButton, + Anvil, + ChippedAnvil, + DamagedAnvil, + TrappedChest, + LightWeightedPressurePlate, + HeavyWeightedPressurePlate, + DaylightDetector, + RedstoneBlock, + NetherQuartzOre, + Hopper, + ChiseledQuartzBlock, + QuartzBlock, + QuartzBricks, + QuartzPillar, + QuartzStairs, + ActivatorRail, + Dropper, + WhiteTerracotta, + OrangeTerracotta, + MagentaTerracotta, + LightBlueTerracotta, + YellowTerracotta, + LimeTerracotta, + PinkTerracotta, + GrayTerracotta, + LightGrayTerracotta, + CyanTerracotta, + PurpleTerracotta, + BlueTerracotta, + BrownTerracotta, + GreenTerracotta, + RedTerracotta, + BlackTerracotta, + Barrier, + IronTrapdoor, + HayBlock, + WhiteCarpet, + OrangeCarpet, + MagentaCarpet, + LightBlueCarpet, + YellowCarpet, + LimeCarpet, + PinkCarpet, + GrayCarpet, + LightGrayCarpet, + CyanCarpet, + PurpleCarpet, + BlueCarpet, + BrownCarpet, + GreenCarpet, + RedCarpet, + BlackCarpet, + Terracotta, + CoalBlock, + PackedIce, + AcaciaStairs, + DarkOakStairs, + SlimeBlock, + GrassPath, + Sunflower, + Lilac, + RoseBush, + Peony, + TallGrass, + LargeFern, + WhiteStainedGlass, + OrangeStainedGlass, + MagentaStainedGlass, + LightBlueStainedGlass, + YellowStainedGlass, + LimeStainedGlass, + PinkStainedGlass, + GrayStainedGlass, + LightGrayStainedGlass, + CyanStainedGlass, + PurpleStainedGlass, + BlueStainedGlass, + BrownStainedGlass, + GreenStainedGlass, + RedStainedGlass, + BlackStainedGlass, + WhiteStainedGlassPane, + OrangeStainedGlassPane, + MagentaStainedGlassPane, + LightBlueStainedGlassPane, + YellowStainedGlassPane, + LimeStainedGlassPane, + PinkStainedGlassPane, + GrayStainedGlassPane, + LightGrayStainedGlassPane, + CyanStainedGlassPane, + PurpleStainedGlassPane, + BlueStainedGlassPane, + BrownStainedGlassPane, + GreenStainedGlassPane, + RedStainedGlassPane, + BlackStainedGlassPane, + Prismarine, + PrismarineBricks, + DarkPrismarine, + PrismarineStairs, + PrismarineBrickStairs, + DarkPrismarineStairs, + SeaLantern, + RedSandstone, + ChiseledRedSandstone, + CutRedSandstone, + RedSandstoneStairs, + RepeatingCommandBlock, + ChainCommandBlock, + MagmaBlock, + NetherWartBlock, + WarpedWartBlock, + RedNetherBricks, + BoneBlock, + StructureVoid, + Observer, + ShulkerBox, + WhiteShulkerBox, + OrangeShulkerBox, + MagentaShulkerBox, + LightBlueShulkerBox, + YellowShulkerBox, + LimeShulkerBox, + PinkShulkerBox, + GrayShulkerBox, + LightGrayShulkerBox, + CyanShulkerBox, + PurpleShulkerBox, + BlueShulkerBox, + BrownShulkerBox, + GreenShulkerBox, + RedShulkerBox, + BlackShulkerBox, + WhiteGlazedTerracotta, + OrangeGlazedTerracotta, + MagentaGlazedTerracotta, + LightBlueGlazedTerracotta, + YellowGlazedTerracotta, + LimeGlazedTerracotta, + PinkGlazedTerracotta, + GrayGlazedTerracotta, + LightGrayGlazedTerracotta, + CyanGlazedTerracotta, + PurpleGlazedTerracotta, + BlueGlazedTerracotta, + BrownGlazedTerracotta, + GreenGlazedTerracotta, + RedGlazedTerracotta, + BlackGlazedTerracotta, + WhiteConcrete, + OrangeConcrete, + MagentaConcrete, + LightBlueConcrete, + YellowConcrete, + LimeConcrete, + PinkConcrete, + GrayConcrete, + LightGrayConcrete, + CyanConcrete, + PurpleConcrete, + BlueConcrete, + BrownConcrete, + GreenConcrete, + RedConcrete, + BlackConcrete, + WhiteConcretePowder, + OrangeConcretePowder, + MagentaConcretePowder, + LightBlueConcretePowder, + YellowConcretePowder, + LimeConcretePowder, + PinkConcretePowder, + GrayConcretePowder, + LightGrayConcretePowder, + CyanConcretePowder, + PurpleConcretePowder, + BlueConcretePowder, + BrownConcretePowder, + GreenConcretePowder, + RedConcretePowder, + BlackConcretePowder, + TurtleEgg, + DeadTubeCoralBlock, + DeadBrainCoralBlock, + DeadBubbleCoralBlock, + DeadFireCoralBlock, + DeadHornCoralBlock, + TubeCoralBlock, + BrainCoralBlock, + BubbleCoralBlock, + FireCoralBlock, + HornCoralBlock, + TubeCoral, + BrainCoral, + BubbleCoral, + FireCoral, + HornCoral, + DeadBrainCoral, + DeadBubbleCoral, + DeadFireCoral, + DeadHornCoral, + DeadTubeCoral, + TubeCoralFan, + BrainCoralFan, + BubbleCoralFan, + FireCoralFan, + HornCoralFan, + DeadTubeCoralFan, + DeadBrainCoralFan, + DeadBubbleCoralFan, + DeadFireCoralFan, + DeadHornCoralFan, + BlueIce, + Conduit, + PolishedGraniteStairs, + SmoothRedSandstoneStairs, + MossyStoneBrickStairs, + PolishedDioriteStairs, + MossyCobblestoneStairs, + EndStoneBrickStairs, + StoneStairs, + SmoothSandstoneStairs, + SmoothQuartzStairs, + GraniteStairs, + AndesiteStairs, + RedNetherBrickStairs, + PolishedAndesiteStairs, + DioriteStairs, + PolishedGraniteSlab, + SmoothRedSandstoneSlab, + MossyStoneBrickSlab, + PolishedDioriteSlab, + MossyCobblestoneSlab, + EndStoneBrickSlab, + SmoothSandstoneSlab, + SmoothQuartzSlab, + GraniteSlab, + AndesiteSlab, + RedNetherBrickSlab, + PolishedAndesiteSlab, + DioriteSlab, + Scaffolding, + IronDoor, + OakDoor, + SpruceDoor, + BirchDoor, + JungleDoor, + AcaciaDoor, + DarkOakDoor, + CrimsonDoor, + WarpedDoor, + Repeater, + Comparator, + StructureBlock, + Jigsaw, + TurtleHelmet, + Scute, + FlintAndSteel, + Apple, + Bow, + Arrow, + Coal, + Charcoal, + Diamond, + IronIngot, + GoldIngot, + NetheriteIngot, + NetheriteScrap, + WoodenSword, + WoodenShovel, + WoodenPickaxe, + WoodenAxe, + WoodenHoe, + StoneSword, + StoneShovel, + StonePickaxe, + StoneAxe, + StoneHoe, + GoldenSword, + GoldenShovel, + GoldenPickaxe, + GoldenAxe, + GoldenHoe, + IronSword, + IronShovel, + IronPickaxe, + IronAxe, + IronHoe, + DiamondSword, + DiamondShovel, + DiamondPickaxe, + DiamondAxe, + DiamondHoe, + NetheriteSword, + NetheriteShovel, + NetheritePickaxe, + NetheriteAxe, + NetheriteHoe, + Stick, + Bowl, + MushroomStew, + String, + Feather, + Gunpowder, + WheatSeeds, + Wheat, + Bread, + LeatherHelmet, + LeatherChestplate, + LeatherLeggings, + LeatherBoots, + ChainmailHelmet, + ChainmailChestplate, + ChainmailLeggings, + ChainmailBoots, + IronHelmet, + IronChestplate, + IronLeggings, + IronBoots, + DiamondHelmet, + DiamondChestplate, + DiamondLeggings, + DiamondBoots, + GoldenHelmet, + GoldenChestplate, + GoldenLeggings, + GoldenBoots, + NetheriteHelmet, + NetheriteChestplate, + NetheriteLeggings, + NetheriteBoots, + Flint, + Porkchop, + CookedPorkchop, + Painting, + GoldenApple, + EnchantedGoldenApple, + OakSign, + SpruceSign, + BirchSign, + JungleSign, + AcaciaSign, + DarkOakSign, + CrimsonSign, + WarpedSign, + Bucket, + WaterBucket, + LavaBucket, + Minecart, + Saddle, + Redstone, + Snowball, + OakBoat, + Leather, + MilkBucket, + PufferfishBucket, + SalmonBucket, + CodBucket, + TropicalFishBucket, + Brick, + ClayBall, + DriedKelpBlock, + Paper, + Book, + SlimeBall, + ChestMinecart, + FurnaceMinecart, + Egg, + Compass, + FishingRod, + Clock, + GlowstoneDust, + Cod, + Salmon, + TropicalFish, + Pufferfish, + CookedCod, + CookedSalmon, + InkSac, + CocoaBeans, + LapisLazuli, + WhiteDye, + OrangeDye, + MagentaDye, + LightBlueDye, + YellowDye, + LimeDye, + PinkDye, + GrayDye, + LightGrayDye, + CyanDye, + PurpleDye, + BlueDye, + BrownDye, + GreenDye, + RedDye, + BlackDye, + BoneMeal, + Bone, + Sugar, + Cake, + WhiteBed, + OrangeBed, + MagentaBed, + LightBlueBed, + YellowBed, + LimeBed, + PinkBed, + GrayBed, + LightGrayBed, + CyanBed, + PurpleBed, + BlueBed, + BrownBed, + GreenBed, + RedBed, + BlackBed, + Cookie, + FilledMap, + Shears, + MelonSlice, + DriedKelp, + PumpkinSeeds, + MelonSeeds, + Beef, + CookedBeef, + Chicken, + CookedChicken, + RottenFlesh, + EnderPearl, + BlazeRod, + GhastTear, + GoldNugget, + NetherWart, + Potion, + GlassBottle, + SpiderEye, + FermentedSpiderEye, + BlazePowder, + MagmaCream, + BrewingStand, + Cauldron, + EnderEye, + GlisteringMelonSlice, + BatSpawnEgg, + BeeSpawnEgg, + BlazeSpawnEgg, + CatSpawnEgg, + CaveSpiderSpawnEgg, + ChickenSpawnEgg, + CodSpawnEgg, + CowSpawnEgg, + CreeperSpawnEgg, + DolphinSpawnEgg, + DonkeySpawnEgg, + DrownedSpawnEgg, + ElderGuardianSpawnEgg, + EndermanSpawnEgg, + EndermiteSpawnEgg, + EvokerSpawnEgg, + FoxSpawnEgg, + GhastSpawnEgg, + GuardianSpawnEgg, + HoglinSpawnEgg, + HorseSpawnEgg, + HuskSpawnEgg, + LlamaSpawnEgg, + MagmaCubeSpawnEgg, + MooshroomSpawnEgg, + MuleSpawnEgg, + OcelotSpawnEgg, + PandaSpawnEgg, + ParrotSpawnEgg, + PhantomSpawnEgg, + PigSpawnEgg, + PiglinSpawnEgg, + PiglinBruteSpawnEgg, + PillagerSpawnEgg, + PolarBearSpawnEgg, + PufferfishSpawnEgg, + RabbitSpawnEgg, + RavagerSpawnEgg, + SalmonSpawnEgg, + SheepSpawnEgg, + ShulkerSpawnEgg, + SilverfishSpawnEgg, + SkeletonSpawnEgg, + SkeletonHorseSpawnEgg, + SlimeSpawnEgg, + SpiderSpawnEgg, + SquidSpawnEgg, + StraySpawnEgg, + StriderSpawnEgg, + TraderLlamaSpawnEgg, + TropicalFishSpawnEgg, + TurtleSpawnEgg, + VexSpawnEgg, + VillagerSpawnEgg, + VindicatorSpawnEgg, + WanderingTraderSpawnEgg, + WitchSpawnEgg, + WitherSkeletonSpawnEgg, + WolfSpawnEgg, + ZoglinSpawnEgg, + ZombieSpawnEgg, + ZombieHorseSpawnEgg, + ZombieVillagerSpawnEgg, + ZombifiedPiglinSpawnEgg, + ExperienceBottle, + FireCharge, + WritableBook, + WrittenBook, + Emerald, + ItemFrame, + FlowerPot, + Carrot, + Potato, + BakedPotato, + PoisonousPotato, + Map, + GoldenCarrot, + SkeletonSkull, + WitherSkeletonSkull, + PlayerHead, + ZombieHead, + CreeperHead, + DragonHead, + CarrotOnAStick, + WarpedFungusOnAStick, + NetherStar, + PumpkinPie, + FireworkRocket, + FireworkStar, + EnchantedBook, + NetherBrick, + Quartz, + TntMinecart, + HopperMinecart, + PrismarineShard, + PrismarineCrystals, + Rabbit, + CookedRabbit, + RabbitStew, + RabbitFoot, + RabbitHide, + ArmorStand, + IronHorseArmor, + GoldenHorseArmor, + DiamondHorseArmor, + LeatherHorseArmor, + Lead, + NameTag, + CommandBlockMinecart, + Mutton, + CookedMutton, + WhiteBanner, + OrangeBanner, + MagentaBanner, + LightBlueBanner, + YellowBanner, + LimeBanner, + PinkBanner, + GrayBanner, + LightGrayBanner, + CyanBanner, + PurpleBanner, + BlueBanner, + BrownBanner, + GreenBanner, + RedBanner, + BlackBanner, + EndCrystal, + ChorusFruit, + PoppedChorusFruit, + Beetroot, + BeetrootSeeds, + BeetrootSoup, + DragonBreath, + SplashPotion, + SpectralArrow, + TippedArrow, + LingeringPotion, + Shield, + Elytra, + SpruceBoat, + BirchBoat, + JungleBoat, + AcaciaBoat, + DarkOakBoat, + TotemOfUndying, + ShulkerShell, + IronNugget, + KnowledgeBook, + DebugStick, + MusicDisc13, + MusicDiscCat, + MusicDiscBlocks, + MusicDiscChirp, + MusicDiscFar, + MusicDiscMall, + MusicDiscMellohi, + MusicDiscStal, + MusicDiscStrad, + MusicDiscWard, + MusicDisc11, + MusicDiscWait, + MusicDiscPigstep, + Trident, + PhantomMembrane, + NautilusShell, + HeartOfTheSea, + Crossbow, + SuspiciousStew, + Loom, + FlowerBannerPattern, + CreeperBannerPattern, + SkullBannerPattern, + MojangBannerPattern, + GlobeBannerPattern, + PiglinBannerPattern, + Composter, + Barrel, + Smoker, + BlastFurnace, + CartographyTable, + FletchingTable, + Grindstone, + Lectern, + SmithingTable, + Stonecutter, + Bell, + Lantern, + SoulLantern, + SweetBerries, + Campfire, + SoulCampfire, + Shroomlight, + Honeycomb, + BeeNest, + Beehive, + HoneyBottle, + HoneyBlock, + HoneycombBlock, + Lodestone, + NetheriteBlock, + AncientDebris, + Target, + CryingObsidian, + Blackstone, + BlackstoneSlab, + BlackstoneStairs, + GildedBlackstone, + PolishedBlackstone, + PolishedBlackstoneSlab, + PolishedBlackstoneStairs, + ChiseledPolishedBlackstone, + PolishedBlackstoneBricks, + PolishedBlackstoneBrickSlab, + PolishedBlackstoneBrickStairs, + CrackedPolishedBlackstoneBricks, + RespawnAnchor, +} + +#[allow(warnings)] +#[allow(clippy::all)] +impl Item { + /// Returns the `id` property of this `Item`. + pub fn id(&self) -> u32 { + match self { + Item::Air => 0, + Item::Stone => 1, + Item::Granite => 2, + Item::PolishedGranite => 3, + Item::Diorite => 4, + Item::PolishedDiorite => 5, + Item::Andesite => 6, + Item::PolishedAndesite => 7, + Item::GrassBlock => 8, + Item::Dirt => 9, + Item::CoarseDirt => 10, + Item::Podzol => 11, + Item::CrimsonNylium => 12, + Item::WarpedNylium => 13, + Item::Cobblestone => 14, + Item::OakPlanks => 15, + Item::SprucePlanks => 16, + Item::BirchPlanks => 17, + Item::JunglePlanks => 18, + Item::AcaciaPlanks => 19, + Item::DarkOakPlanks => 20, + Item::CrimsonPlanks => 21, + Item::WarpedPlanks => 22, + Item::OakSapling => 23, + Item::SpruceSapling => 24, + Item::BirchSapling => 25, + Item::JungleSapling => 26, + Item::AcaciaSapling => 27, + Item::DarkOakSapling => 28, + Item::Bedrock => 29, + Item::Sand => 30, + Item::RedSand => 31, + Item::Gravel => 32, + Item::GoldOre => 33, + Item::IronOre => 34, + Item::CoalOre => 35, + Item::NetherGoldOre => 36, + Item::OakLog => 37, + Item::SpruceLog => 38, + Item::BirchLog => 39, + Item::JungleLog => 40, + Item::AcaciaLog => 41, + Item::DarkOakLog => 42, + Item::CrimsonStem => 43, + Item::WarpedStem => 44, + Item::StrippedOakLog => 45, + Item::StrippedSpruceLog => 46, + Item::StrippedBirchLog => 47, + Item::StrippedJungleLog => 48, + Item::StrippedAcaciaLog => 49, + Item::StrippedDarkOakLog => 50, + Item::StrippedCrimsonStem => 51, + Item::StrippedWarpedStem => 52, + Item::StrippedOakWood => 53, + Item::StrippedSpruceWood => 54, + Item::StrippedBirchWood => 55, + Item::StrippedJungleWood => 56, + Item::StrippedAcaciaWood => 57, + Item::StrippedDarkOakWood => 58, + Item::StrippedCrimsonHyphae => 59, + Item::StrippedWarpedHyphae => 60, + Item::OakWood => 61, + Item::SpruceWood => 62, + Item::BirchWood => 63, + Item::JungleWood => 64, + Item::AcaciaWood => 65, + Item::DarkOakWood => 66, + Item::CrimsonHyphae => 67, + Item::WarpedHyphae => 68, + Item::OakLeaves => 69, + Item::SpruceLeaves => 70, + Item::BirchLeaves => 71, + Item::JungleLeaves => 72, + Item::AcaciaLeaves => 73, + Item::DarkOakLeaves => 74, + Item::Sponge => 75, + Item::WetSponge => 76, + Item::Glass => 77, + Item::LapisOre => 78, + Item::LapisBlock => 79, + Item::Dispenser => 80, + Item::Sandstone => 81, + Item::ChiseledSandstone => 82, + Item::CutSandstone => 83, + Item::NoteBlock => 84, + Item::PoweredRail => 85, + Item::DetectorRail => 86, + Item::StickyPiston => 87, + Item::Cobweb => 88, + Item::Grass => 89, + Item::Fern => 90, + Item::DeadBush => 91, + Item::Seagrass => 92, + Item::SeaPickle => 93, + Item::Piston => 94, + Item::WhiteWool => 95, + Item::OrangeWool => 96, + Item::MagentaWool => 97, + Item::LightBlueWool => 98, + Item::YellowWool => 99, + Item::LimeWool => 100, + Item::PinkWool => 101, + Item::GrayWool => 102, + Item::LightGrayWool => 103, + Item::CyanWool => 104, + Item::PurpleWool => 105, + Item::BlueWool => 106, + Item::BrownWool => 107, + Item::GreenWool => 108, + Item::RedWool => 109, + Item::BlackWool => 110, + Item::Dandelion => 111, + Item::Poppy => 112, + Item::BlueOrchid => 113, + Item::Allium => 114, + Item::AzureBluet => 115, + Item::RedTulip => 116, + Item::OrangeTulip => 117, + Item::WhiteTulip => 118, + Item::PinkTulip => 119, + Item::OxeyeDaisy => 120, + Item::Cornflower => 121, + Item::LilyOfTheValley => 122, + Item::WitherRose => 123, + Item::BrownMushroom => 124, + Item::RedMushroom => 125, + Item::CrimsonFungus => 126, + Item::WarpedFungus => 127, + Item::CrimsonRoots => 128, + Item::WarpedRoots => 129, + Item::NetherSprouts => 130, + Item::WeepingVines => 131, + Item::TwistingVines => 132, + Item::SugarCane => 133, + Item::Kelp => 134, + Item::Bamboo => 135, + Item::GoldBlock => 136, + Item::IronBlock => 137, + Item::OakSlab => 138, + Item::SpruceSlab => 139, + Item::BirchSlab => 140, + Item::JungleSlab => 141, + Item::AcaciaSlab => 142, + Item::DarkOakSlab => 143, + Item::CrimsonSlab => 144, + Item::WarpedSlab => 145, + Item::StoneSlab => 146, + Item::SmoothStoneSlab => 147, + Item::SandstoneSlab => 148, + Item::CutSandstoneSlab => 149, + Item::PetrifiedOakSlab => 150, + Item::CobblestoneSlab => 151, + Item::BrickSlab => 152, + Item::StoneBrickSlab => 153, + Item::NetherBrickSlab => 154, + Item::QuartzSlab => 155, + Item::RedSandstoneSlab => 156, + Item::CutRedSandstoneSlab => 157, + Item::PurpurSlab => 158, + Item::PrismarineSlab => 159, + Item::PrismarineBrickSlab => 160, + Item::DarkPrismarineSlab => 161, + Item::SmoothQuartz => 162, + Item::SmoothRedSandstone => 163, + Item::SmoothSandstone => 164, + Item::SmoothStone => 165, + Item::Bricks => 166, + Item::Tnt => 167, + Item::Bookshelf => 168, + Item::MossyCobblestone => 169, + Item::Obsidian => 170, + Item::Torch => 171, + Item::EndRod => 172, + Item::ChorusPlant => 173, + Item::ChorusFlower => 174, + Item::PurpurBlock => 175, + Item::PurpurPillar => 176, + Item::PurpurStairs => 177, + Item::Spawner => 178, + Item::OakStairs => 179, + Item::Chest => 180, + Item::DiamondOre => 181, + Item::DiamondBlock => 182, + Item::CraftingTable => 183, + Item::Farmland => 184, + Item::Furnace => 185, + Item::Ladder => 186, + Item::Rail => 187, + Item::CobblestoneStairs => 188, + Item::Lever => 189, + Item::StonePressurePlate => 190, + Item::OakPressurePlate => 191, + Item::SprucePressurePlate => 192, + Item::BirchPressurePlate => 193, + Item::JunglePressurePlate => 194, + Item::AcaciaPressurePlate => 195, + Item::DarkOakPressurePlate => 196, + Item::CrimsonPressurePlate => 197, + Item::WarpedPressurePlate => 198, + Item::PolishedBlackstonePressurePlate => 199, + Item::RedstoneOre => 200, + Item::RedstoneTorch => 201, + Item::Snow => 202, + Item::Ice => 203, + Item::SnowBlock => 204, + Item::Cactus => 205, + Item::Clay => 206, + Item::Jukebox => 207, + Item::OakFence => 208, + Item::SpruceFence => 209, + Item::BirchFence => 210, + Item::JungleFence => 211, + Item::AcaciaFence => 212, + Item::DarkOakFence => 213, + Item::CrimsonFence => 214, + Item::WarpedFence => 215, + Item::Pumpkin => 216, + Item::CarvedPumpkin => 217, + Item::Netherrack => 218, + Item::SoulSand => 219, + Item::SoulSoil => 220, + Item::Basalt => 221, + Item::PolishedBasalt => 222, + Item::SoulTorch => 223, + Item::Glowstone => 224, + Item::JackOLantern => 225, + Item::OakTrapdoor => 226, + Item::SpruceTrapdoor => 227, + Item::BirchTrapdoor => 228, + Item::JungleTrapdoor => 229, + Item::AcaciaTrapdoor => 230, + Item::DarkOakTrapdoor => 231, + Item::CrimsonTrapdoor => 232, + Item::WarpedTrapdoor => 233, + Item::InfestedStone => 234, + Item::InfestedCobblestone => 235, + Item::InfestedStoneBricks => 236, + Item::InfestedMossyStoneBricks => 237, + Item::InfestedCrackedStoneBricks => 238, + Item::InfestedChiseledStoneBricks => 239, + Item::StoneBricks => 240, + Item::MossyStoneBricks => 241, + Item::CrackedStoneBricks => 242, + Item::ChiseledStoneBricks => 243, + Item::BrownMushroomBlock => 244, + Item::RedMushroomBlock => 245, + Item::MushroomStem => 246, + Item::IronBars => 247, + Item::Chain => 248, + Item::GlassPane => 249, + Item::Melon => 250, + Item::Vine => 251, + Item::OakFenceGate => 252, + Item::SpruceFenceGate => 253, + Item::BirchFenceGate => 254, + Item::JungleFenceGate => 255, + Item::AcaciaFenceGate => 256, + Item::DarkOakFenceGate => 257, + Item::CrimsonFenceGate => 258, + Item::WarpedFenceGate => 259, + Item::BrickStairs => 260, + Item::StoneBrickStairs => 261, + Item::Mycelium => 262, + Item::LilyPad => 263, + Item::NetherBricks => 264, + Item::CrackedNetherBricks => 265, + Item::ChiseledNetherBricks => 266, + Item::NetherBrickFence => 267, + Item::NetherBrickStairs => 268, + Item::EnchantingTable => 269, + Item::EndPortalFrame => 270, + Item::EndStone => 271, + Item::EndStoneBricks => 272, + Item::DragonEgg => 273, + Item::RedstoneLamp => 274, + Item::SandstoneStairs => 275, + Item::EmeraldOre => 276, + Item::EnderChest => 277, + Item::TripwireHook => 278, + Item::EmeraldBlock => 279, + Item::SpruceStairs => 280, + Item::BirchStairs => 281, + Item::JungleStairs => 282, + Item::CrimsonStairs => 283, + Item::WarpedStairs => 284, + Item::CommandBlock => 285, + Item::Beacon => 286, + Item::CobblestoneWall => 287, + Item::MossyCobblestoneWall => 288, + Item::BrickWall => 289, + Item::PrismarineWall => 290, + Item::RedSandstoneWall => 291, + Item::MossyStoneBrickWall => 292, + Item::GraniteWall => 293, + Item::StoneBrickWall => 294, + Item::NetherBrickWall => 295, + Item::AndesiteWall => 296, + Item::RedNetherBrickWall => 297, + Item::SandstoneWall => 298, + Item::EndStoneBrickWall => 299, + Item::DioriteWall => 300, + Item::BlackstoneWall => 301, + Item::PolishedBlackstoneWall => 302, + Item::PolishedBlackstoneBrickWall => 303, + Item::StoneButton => 304, + Item::OakButton => 305, + Item::SpruceButton => 306, + Item::BirchButton => 307, + Item::JungleButton => 308, + Item::AcaciaButton => 309, + Item::DarkOakButton => 310, + Item::CrimsonButton => 311, + Item::WarpedButton => 312, + Item::PolishedBlackstoneButton => 313, + Item::Anvil => 314, + Item::ChippedAnvil => 315, + Item::DamagedAnvil => 316, + Item::TrappedChest => 317, + Item::LightWeightedPressurePlate => 318, + Item::HeavyWeightedPressurePlate => 319, + Item::DaylightDetector => 320, + Item::RedstoneBlock => 321, + Item::NetherQuartzOre => 322, + Item::Hopper => 323, + Item::ChiseledQuartzBlock => 324, + Item::QuartzBlock => 325, + Item::QuartzBricks => 326, + Item::QuartzPillar => 327, + Item::QuartzStairs => 328, + Item::ActivatorRail => 329, + Item::Dropper => 330, + Item::WhiteTerracotta => 331, + Item::OrangeTerracotta => 332, + Item::MagentaTerracotta => 333, + Item::LightBlueTerracotta => 334, + Item::YellowTerracotta => 335, + Item::LimeTerracotta => 336, + Item::PinkTerracotta => 337, + Item::GrayTerracotta => 338, + Item::LightGrayTerracotta => 339, + Item::CyanTerracotta => 340, + Item::PurpleTerracotta => 341, + Item::BlueTerracotta => 342, + Item::BrownTerracotta => 343, + Item::GreenTerracotta => 344, + Item::RedTerracotta => 345, + Item::BlackTerracotta => 346, + Item::Barrier => 347, + Item::IronTrapdoor => 348, + Item::HayBlock => 349, + Item::WhiteCarpet => 350, + Item::OrangeCarpet => 351, + Item::MagentaCarpet => 352, + Item::LightBlueCarpet => 353, + Item::YellowCarpet => 354, + Item::LimeCarpet => 355, + Item::PinkCarpet => 356, + Item::GrayCarpet => 357, + Item::LightGrayCarpet => 358, + Item::CyanCarpet => 359, + Item::PurpleCarpet => 360, + Item::BlueCarpet => 361, + Item::BrownCarpet => 362, + Item::GreenCarpet => 363, + Item::RedCarpet => 364, + Item::BlackCarpet => 365, + Item::Terracotta => 366, + Item::CoalBlock => 367, + Item::PackedIce => 368, + Item::AcaciaStairs => 369, + Item::DarkOakStairs => 370, + Item::SlimeBlock => 371, + Item::GrassPath => 372, + Item::Sunflower => 373, + Item::Lilac => 374, + Item::RoseBush => 375, + Item::Peony => 376, + Item::TallGrass => 377, + Item::LargeFern => 378, + Item::WhiteStainedGlass => 379, + Item::OrangeStainedGlass => 380, + Item::MagentaStainedGlass => 381, + Item::LightBlueStainedGlass => 382, + Item::YellowStainedGlass => 383, + Item::LimeStainedGlass => 384, + Item::PinkStainedGlass => 385, + Item::GrayStainedGlass => 386, + Item::LightGrayStainedGlass => 387, + Item::CyanStainedGlass => 388, + Item::PurpleStainedGlass => 389, + Item::BlueStainedGlass => 390, + Item::BrownStainedGlass => 391, + Item::GreenStainedGlass => 392, + Item::RedStainedGlass => 393, + Item::BlackStainedGlass => 394, + Item::WhiteStainedGlassPane => 395, + Item::OrangeStainedGlassPane => 396, + Item::MagentaStainedGlassPane => 397, + Item::LightBlueStainedGlassPane => 398, + Item::YellowStainedGlassPane => 399, + Item::LimeStainedGlassPane => 400, + Item::PinkStainedGlassPane => 401, + Item::GrayStainedGlassPane => 402, + Item::LightGrayStainedGlassPane => 403, + Item::CyanStainedGlassPane => 404, + Item::PurpleStainedGlassPane => 405, + Item::BlueStainedGlassPane => 406, + Item::BrownStainedGlassPane => 407, + Item::GreenStainedGlassPane => 408, + Item::RedStainedGlassPane => 409, + Item::BlackStainedGlassPane => 410, + Item::Prismarine => 411, + Item::PrismarineBricks => 412, + Item::DarkPrismarine => 413, + Item::PrismarineStairs => 414, + Item::PrismarineBrickStairs => 415, + Item::DarkPrismarineStairs => 416, + Item::SeaLantern => 417, + Item::RedSandstone => 418, + Item::ChiseledRedSandstone => 419, + Item::CutRedSandstone => 420, + Item::RedSandstoneStairs => 421, + Item::RepeatingCommandBlock => 422, + Item::ChainCommandBlock => 423, + Item::MagmaBlock => 424, + Item::NetherWartBlock => 425, + Item::WarpedWartBlock => 426, + Item::RedNetherBricks => 427, + Item::BoneBlock => 428, + Item::StructureVoid => 429, + Item::Observer => 430, + Item::ShulkerBox => 431, + Item::WhiteShulkerBox => 432, + Item::OrangeShulkerBox => 433, + Item::MagentaShulkerBox => 434, + Item::LightBlueShulkerBox => 435, + Item::YellowShulkerBox => 436, + Item::LimeShulkerBox => 437, + Item::PinkShulkerBox => 438, + Item::GrayShulkerBox => 439, + Item::LightGrayShulkerBox => 440, + Item::CyanShulkerBox => 441, + Item::PurpleShulkerBox => 442, + Item::BlueShulkerBox => 443, + Item::BrownShulkerBox => 444, + Item::GreenShulkerBox => 445, + Item::RedShulkerBox => 446, + Item::BlackShulkerBox => 447, + Item::WhiteGlazedTerracotta => 448, + Item::OrangeGlazedTerracotta => 449, + Item::MagentaGlazedTerracotta => 450, + Item::LightBlueGlazedTerracotta => 451, + Item::YellowGlazedTerracotta => 452, + Item::LimeGlazedTerracotta => 453, + Item::PinkGlazedTerracotta => 454, + Item::GrayGlazedTerracotta => 455, + Item::LightGrayGlazedTerracotta => 456, + Item::CyanGlazedTerracotta => 457, + Item::PurpleGlazedTerracotta => 458, + Item::BlueGlazedTerracotta => 459, + Item::BrownGlazedTerracotta => 460, + Item::GreenGlazedTerracotta => 461, + Item::RedGlazedTerracotta => 462, + Item::BlackGlazedTerracotta => 463, + Item::WhiteConcrete => 464, + Item::OrangeConcrete => 465, + Item::MagentaConcrete => 466, + Item::LightBlueConcrete => 467, + Item::YellowConcrete => 468, + Item::LimeConcrete => 469, + Item::PinkConcrete => 470, + Item::GrayConcrete => 471, + Item::LightGrayConcrete => 472, + Item::CyanConcrete => 473, + Item::PurpleConcrete => 474, + Item::BlueConcrete => 475, + Item::BrownConcrete => 476, + Item::GreenConcrete => 477, + Item::RedConcrete => 478, + Item::BlackConcrete => 479, + Item::WhiteConcretePowder => 480, + Item::OrangeConcretePowder => 481, + Item::MagentaConcretePowder => 482, + Item::LightBlueConcretePowder => 483, + Item::YellowConcretePowder => 484, + Item::LimeConcretePowder => 485, + Item::PinkConcretePowder => 486, + Item::GrayConcretePowder => 487, + Item::LightGrayConcretePowder => 488, + Item::CyanConcretePowder => 489, + Item::PurpleConcretePowder => 490, + Item::BlueConcretePowder => 491, + Item::BrownConcretePowder => 492, + Item::GreenConcretePowder => 493, + Item::RedConcretePowder => 494, + Item::BlackConcretePowder => 495, + Item::TurtleEgg => 496, + Item::DeadTubeCoralBlock => 497, + Item::DeadBrainCoralBlock => 498, + Item::DeadBubbleCoralBlock => 499, + Item::DeadFireCoralBlock => 500, + Item::DeadHornCoralBlock => 501, + Item::TubeCoralBlock => 502, + Item::BrainCoralBlock => 503, + Item::BubbleCoralBlock => 504, + Item::FireCoralBlock => 505, + Item::HornCoralBlock => 506, + Item::TubeCoral => 507, + Item::BrainCoral => 508, + Item::BubbleCoral => 509, + Item::FireCoral => 510, + Item::HornCoral => 511, + Item::DeadBrainCoral => 512, + Item::DeadBubbleCoral => 513, + Item::DeadFireCoral => 514, + Item::DeadHornCoral => 515, + Item::DeadTubeCoral => 516, + Item::TubeCoralFan => 517, + Item::BrainCoralFan => 518, + Item::BubbleCoralFan => 519, + Item::FireCoralFan => 520, + Item::HornCoralFan => 521, + Item::DeadTubeCoralFan => 522, + Item::DeadBrainCoralFan => 523, + Item::DeadBubbleCoralFan => 524, + Item::DeadFireCoralFan => 525, + Item::DeadHornCoralFan => 526, + Item::BlueIce => 527, + Item::Conduit => 528, + Item::PolishedGraniteStairs => 529, + Item::SmoothRedSandstoneStairs => 530, + Item::MossyStoneBrickStairs => 531, + Item::PolishedDioriteStairs => 532, + Item::MossyCobblestoneStairs => 533, + Item::EndStoneBrickStairs => 534, + Item::StoneStairs => 535, + Item::SmoothSandstoneStairs => 536, + Item::SmoothQuartzStairs => 537, + Item::GraniteStairs => 538, + Item::AndesiteStairs => 539, + Item::RedNetherBrickStairs => 540, + Item::PolishedAndesiteStairs => 541, + Item::DioriteStairs => 542, + Item::PolishedGraniteSlab => 543, + Item::SmoothRedSandstoneSlab => 544, + Item::MossyStoneBrickSlab => 545, + Item::PolishedDioriteSlab => 546, + Item::MossyCobblestoneSlab => 547, + Item::EndStoneBrickSlab => 548, + Item::SmoothSandstoneSlab => 549, + Item::SmoothQuartzSlab => 550, + Item::GraniteSlab => 551, + Item::AndesiteSlab => 552, + Item::RedNetherBrickSlab => 553, + Item::PolishedAndesiteSlab => 554, + Item::DioriteSlab => 555, + Item::Scaffolding => 556, + Item::IronDoor => 557, + Item::OakDoor => 558, + Item::SpruceDoor => 559, + Item::BirchDoor => 560, + Item::JungleDoor => 561, + Item::AcaciaDoor => 562, + Item::DarkOakDoor => 563, + Item::CrimsonDoor => 564, + Item::WarpedDoor => 565, + Item::Repeater => 566, + Item::Comparator => 567, + Item::StructureBlock => 568, + Item::Jigsaw => 569, + Item::TurtleHelmet => 570, + Item::Scute => 571, + Item::FlintAndSteel => 572, + Item::Apple => 573, + Item::Bow => 574, + Item::Arrow => 575, + Item::Coal => 576, + Item::Charcoal => 577, + Item::Diamond => 578, + Item::IronIngot => 579, + Item::GoldIngot => 580, + Item::NetheriteIngot => 581, + Item::NetheriteScrap => 582, + Item::WoodenSword => 583, + Item::WoodenShovel => 584, + Item::WoodenPickaxe => 585, + Item::WoodenAxe => 586, + Item::WoodenHoe => 587, + Item::StoneSword => 588, + Item::StoneShovel => 589, + Item::StonePickaxe => 590, + Item::StoneAxe => 591, + Item::StoneHoe => 592, + Item::GoldenSword => 593, + Item::GoldenShovel => 594, + Item::GoldenPickaxe => 595, + Item::GoldenAxe => 596, + Item::GoldenHoe => 597, + Item::IronSword => 598, + Item::IronShovel => 599, + Item::IronPickaxe => 600, + Item::IronAxe => 601, + Item::IronHoe => 602, + Item::DiamondSword => 603, + Item::DiamondShovel => 604, + Item::DiamondPickaxe => 605, + Item::DiamondAxe => 606, + Item::DiamondHoe => 607, + Item::NetheriteSword => 608, + Item::NetheriteShovel => 609, + Item::NetheritePickaxe => 610, + Item::NetheriteAxe => 611, + Item::NetheriteHoe => 612, + Item::Stick => 613, + Item::Bowl => 614, + Item::MushroomStew => 615, + Item::String => 616, + Item::Feather => 617, + Item::Gunpowder => 618, + Item::WheatSeeds => 619, + Item::Wheat => 620, + Item::Bread => 621, + Item::LeatherHelmet => 622, + Item::LeatherChestplate => 623, + Item::LeatherLeggings => 624, + Item::LeatherBoots => 625, + Item::ChainmailHelmet => 626, + Item::ChainmailChestplate => 627, + Item::ChainmailLeggings => 628, + Item::ChainmailBoots => 629, + Item::IronHelmet => 630, + Item::IronChestplate => 631, + Item::IronLeggings => 632, + Item::IronBoots => 633, + Item::DiamondHelmet => 634, + Item::DiamondChestplate => 635, + Item::DiamondLeggings => 636, + Item::DiamondBoots => 637, + Item::GoldenHelmet => 638, + Item::GoldenChestplate => 639, + Item::GoldenLeggings => 640, + Item::GoldenBoots => 641, + Item::NetheriteHelmet => 642, + Item::NetheriteChestplate => 643, + Item::NetheriteLeggings => 644, + Item::NetheriteBoots => 645, + Item::Flint => 646, + Item::Porkchop => 647, + Item::CookedPorkchop => 648, + Item::Painting => 649, + Item::GoldenApple => 650, + Item::EnchantedGoldenApple => 651, + Item::OakSign => 652, + Item::SpruceSign => 653, + Item::BirchSign => 654, + Item::JungleSign => 655, + Item::AcaciaSign => 656, + Item::DarkOakSign => 657, + Item::CrimsonSign => 658, + Item::WarpedSign => 659, + Item::Bucket => 660, + Item::WaterBucket => 661, + Item::LavaBucket => 662, + Item::Minecart => 663, + Item::Saddle => 664, + Item::Redstone => 665, + Item::Snowball => 666, + Item::OakBoat => 667, + Item::Leather => 668, + Item::MilkBucket => 669, + Item::PufferfishBucket => 670, + Item::SalmonBucket => 671, + Item::CodBucket => 672, + Item::TropicalFishBucket => 673, + Item::Brick => 674, + Item::ClayBall => 675, + Item::DriedKelpBlock => 676, + Item::Paper => 677, + Item::Book => 678, + Item::SlimeBall => 679, + Item::ChestMinecart => 680, + Item::FurnaceMinecart => 681, + Item::Egg => 682, + Item::Compass => 683, + Item::FishingRod => 684, + Item::Clock => 685, + Item::GlowstoneDust => 686, + Item::Cod => 687, + Item::Salmon => 688, + Item::TropicalFish => 689, + Item::Pufferfish => 690, + Item::CookedCod => 691, + Item::CookedSalmon => 692, + Item::InkSac => 693, + Item::CocoaBeans => 694, + Item::LapisLazuli => 695, + Item::WhiteDye => 696, + Item::OrangeDye => 697, + Item::MagentaDye => 698, + Item::LightBlueDye => 699, + Item::YellowDye => 700, + Item::LimeDye => 701, + Item::PinkDye => 702, + Item::GrayDye => 703, + Item::LightGrayDye => 704, + Item::CyanDye => 705, + Item::PurpleDye => 706, + Item::BlueDye => 707, + Item::BrownDye => 708, + Item::GreenDye => 709, + Item::RedDye => 710, + Item::BlackDye => 711, + Item::BoneMeal => 712, + Item::Bone => 713, + Item::Sugar => 714, + Item::Cake => 715, + Item::WhiteBed => 716, + Item::OrangeBed => 717, + Item::MagentaBed => 718, + Item::LightBlueBed => 719, + Item::YellowBed => 720, + Item::LimeBed => 721, + Item::PinkBed => 722, + Item::GrayBed => 723, + Item::LightGrayBed => 724, + Item::CyanBed => 725, + Item::PurpleBed => 726, + Item::BlueBed => 727, + Item::BrownBed => 728, + Item::GreenBed => 729, + Item::RedBed => 730, + Item::BlackBed => 731, + Item::Cookie => 732, + Item::FilledMap => 733, + Item::Shears => 734, + Item::MelonSlice => 735, + Item::DriedKelp => 736, + Item::PumpkinSeeds => 737, + Item::MelonSeeds => 738, + Item::Beef => 739, + Item::CookedBeef => 740, + Item::Chicken => 741, + Item::CookedChicken => 742, + Item::RottenFlesh => 743, + Item::EnderPearl => 744, + Item::BlazeRod => 745, + Item::GhastTear => 746, + Item::GoldNugget => 747, + Item::NetherWart => 748, + Item::Potion => 749, + Item::GlassBottle => 750, + Item::SpiderEye => 751, + Item::FermentedSpiderEye => 752, + Item::BlazePowder => 753, + Item::MagmaCream => 754, + Item::BrewingStand => 755, + Item::Cauldron => 756, + Item::EnderEye => 757, + Item::GlisteringMelonSlice => 758, + Item::BatSpawnEgg => 759, + Item::BeeSpawnEgg => 760, + Item::BlazeSpawnEgg => 761, + Item::CatSpawnEgg => 762, + Item::CaveSpiderSpawnEgg => 763, + Item::ChickenSpawnEgg => 764, + Item::CodSpawnEgg => 765, + Item::CowSpawnEgg => 766, + Item::CreeperSpawnEgg => 767, + Item::DolphinSpawnEgg => 768, + Item::DonkeySpawnEgg => 769, + Item::DrownedSpawnEgg => 770, + Item::ElderGuardianSpawnEgg => 771, + Item::EndermanSpawnEgg => 772, + Item::EndermiteSpawnEgg => 773, + Item::EvokerSpawnEgg => 774, + Item::FoxSpawnEgg => 775, + Item::GhastSpawnEgg => 776, + Item::GuardianSpawnEgg => 777, + Item::HoglinSpawnEgg => 778, + Item::HorseSpawnEgg => 779, + Item::HuskSpawnEgg => 780, + Item::LlamaSpawnEgg => 781, + Item::MagmaCubeSpawnEgg => 782, + Item::MooshroomSpawnEgg => 783, + Item::MuleSpawnEgg => 784, + Item::OcelotSpawnEgg => 785, + Item::PandaSpawnEgg => 786, + Item::ParrotSpawnEgg => 787, + Item::PhantomSpawnEgg => 788, + Item::PigSpawnEgg => 789, + Item::PiglinSpawnEgg => 790, + Item::PiglinBruteSpawnEgg => 791, + Item::PillagerSpawnEgg => 792, + Item::PolarBearSpawnEgg => 793, + Item::PufferfishSpawnEgg => 794, + Item::RabbitSpawnEgg => 795, + Item::RavagerSpawnEgg => 796, + Item::SalmonSpawnEgg => 797, + Item::SheepSpawnEgg => 798, + Item::ShulkerSpawnEgg => 799, + Item::SilverfishSpawnEgg => 800, + Item::SkeletonSpawnEgg => 801, + Item::SkeletonHorseSpawnEgg => 802, + Item::SlimeSpawnEgg => 803, + Item::SpiderSpawnEgg => 804, + Item::SquidSpawnEgg => 805, + Item::StraySpawnEgg => 806, + Item::StriderSpawnEgg => 807, + Item::TraderLlamaSpawnEgg => 808, + Item::TropicalFishSpawnEgg => 809, + Item::TurtleSpawnEgg => 810, + Item::VexSpawnEgg => 811, + Item::VillagerSpawnEgg => 812, + Item::VindicatorSpawnEgg => 813, + Item::WanderingTraderSpawnEgg => 814, + Item::WitchSpawnEgg => 815, + Item::WitherSkeletonSpawnEgg => 816, + Item::WolfSpawnEgg => 817, + Item::ZoglinSpawnEgg => 818, + Item::ZombieSpawnEgg => 819, + Item::ZombieHorseSpawnEgg => 820, + Item::ZombieVillagerSpawnEgg => 821, + Item::ZombifiedPiglinSpawnEgg => 822, + Item::ExperienceBottle => 823, + Item::FireCharge => 824, + Item::WritableBook => 825, + Item::WrittenBook => 826, + Item::Emerald => 827, + Item::ItemFrame => 828, + Item::FlowerPot => 829, + Item::Carrot => 830, + Item::Potato => 831, + Item::BakedPotato => 832, + Item::PoisonousPotato => 833, + Item::Map => 834, + Item::GoldenCarrot => 835, + Item::SkeletonSkull => 836, + Item::WitherSkeletonSkull => 837, + Item::PlayerHead => 838, + Item::ZombieHead => 839, + Item::CreeperHead => 840, + Item::DragonHead => 841, + Item::CarrotOnAStick => 842, + Item::WarpedFungusOnAStick => 843, + Item::NetherStar => 844, + Item::PumpkinPie => 845, + Item::FireworkRocket => 846, + Item::FireworkStar => 847, + Item::EnchantedBook => 848, + Item::NetherBrick => 849, + Item::Quartz => 850, + Item::TntMinecart => 851, + Item::HopperMinecart => 852, + Item::PrismarineShard => 853, + Item::PrismarineCrystals => 854, + Item::Rabbit => 855, + Item::CookedRabbit => 856, + Item::RabbitStew => 857, + Item::RabbitFoot => 858, + Item::RabbitHide => 859, + Item::ArmorStand => 860, + Item::IronHorseArmor => 861, + Item::GoldenHorseArmor => 862, + Item::DiamondHorseArmor => 863, + Item::LeatherHorseArmor => 864, + Item::Lead => 865, + Item::NameTag => 866, + Item::CommandBlockMinecart => 867, + Item::Mutton => 868, + Item::CookedMutton => 869, + Item::WhiteBanner => 870, + Item::OrangeBanner => 871, + Item::MagentaBanner => 872, + Item::LightBlueBanner => 873, + Item::YellowBanner => 874, + Item::LimeBanner => 875, + Item::PinkBanner => 876, + Item::GrayBanner => 877, + Item::LightGrayBanner => 878, + Item::CyanBanner => 879, + Item::PurpleBanner => 880, + Item::BlueBanner => 881, + Item::BrownBanner => 882, + Item::GreenBanner => 883, + Item::RedBanner => 884, + Item::BlackBanner => 885, + Item::EndCrystal => 886, + Item::ChorusFruit => 887, + Item::PoppedChorusFruit => 888, + Item::Beetroot => 889, + Item::BeetrootSeeds => 890, + Item::BeetrootSoup => 891, + Item::DragonBreath => 892, + Item::SplashPotion => 893, + Item::SpectralArrow => 894, + Item::TippedArrow => 895, + Item::LingeringPotion => 896, + Item::Shield => 897, + Item::Elytra => 898, + Item::SpruceBoat => 899, + Item::BirchBoat => 900, + Item::JungleBoat => 901, + Item::AcaciaBoat => 902, + Item::DarkOakBoat => 903, + Item::TotemOfUndying => 904, + Item::ShulkerShell => 905, + Item::IronNugget => 906, + Item::KnowledgeBook => 907, + Item::DebugStick => 908, + Item::MusicDisc13 => 909, + Item::MusicDiscCat => 910, + Item::MusicDiscBlocks => 911, + Item::MusicDiscChirp => 912, + Item::MusicDiscFar => 913, + Item::MusicDiscMall => 914, + Item::MusicDiscMellohi => 915, + Item::MusicDiscStal => 916, + Item::MusicDiscStrad => 917, + Item::MusicDiscWard => 918, + Item::MusicDisc11 => 919, + Item::MusicDiscWait => 920, + Item::MusicDiscPigstep => 921, + Item::Trident => 922, + Item::PhantomMembrane => 923, + Item::NautilusShell => 924, + Item::HeartOfTheSea => 925, + Item::Crossbow => 926, + Item::SuspiciousStew => 927, + Item::Loom => 928, + Item::FlowerBannerPattern => 929, + Item::CreeperBannerPattern => 930, + Item::SkullBannerPattern => 931, + Item::MojangBannerPattern => 932, + Item::GlobeBannerPattern => 933, + Item::PiglinBannerPattern => 934, + Item::Composter => 935, + Item::Barrel => 936, + Item::Smoker => 937, + Item::BlastFurnace => 938, + Item::CartographyTable => 939, + Item::FletchingTable => 940, + Item::Grindstone => 941, + Item::Lectern => 942, + Item::SmithingTable => 943, + Item::Stonecutter => 944, + Item::Bell => 945, + Item::Lantern => 946, + Item::SoulLantern => 947, + Item::SweetBerries => 948, + Item::Campfire => 949, + Item::SoulCampfire => 950, + Item::Shroomlight => 951, + Item::Honeycomb => 952, + Item::BeeNest => 953, + Item::Beehive => 954, + Item::HoneyBottle => 955, + Item::HoneyBlock => 956, + Item::HoneycombBlock => 957, + Item::Lodestone => 958, + Item::NetheriteBlock => 959, + Item::AncientDebris => 960, + Item::Target => 961, + Item::CryingObsidian => 962, + Item::Blackstone => 963, + Item::BlackstoneSlab => 964, + Item::BlackstoneStairs => 965, + Item::GildedBlackstone => 966, + Item::PolishedBlackstone => 967, + Item::PolishedBlackstoneSlab => 968, + Item::PolishedBlackstoneStairs => 969, + Item::ChiseledPolishedBlackstone => 970, + Item::PolishedBlackstoneBricks => 971, + Item::PolishedBlackstoneBrickSlab => 972, + Item::PolishedBlackstoneBrickStairs => 973, + Item::CrackedPolishedBlackstoneBricks => 974, + Item::RespawnAnchor => 975, + } + } + + /// Gets a `Item` by its `id`. + pub fn from_id(id: u32) -> Option { + match id { + 0 => Some(Item::Air), + 1 => Some(Item::Stone), + 2 => Some(Item::Granite), + 3 => Some(Item::PolishedGranite), + 4 => Some(Item::Diorite), + 5 => Some(Item::PolishedDiorite), + 6 => Some(Item::Andesite), + 7 => Some(Item::PolishedAndesite), + 8 => Some(Item::GrassBlock), + 9 => Some(Item::Dirt), + 10 => Some(Item::CoarseDirt), + 11 => Some(Item::Podzol), + 12 => Some(Item::CrimsonNylium), + 13 => Some(Item::WarpedNylium), + 14 => Some(Item::Cobblestone), + 15 => Some(Item::OakPlanks), + 16 => Some(Item::SprucePlanks), + 17 => Some(Item::BirchPlanks), + 18 => Some(Item::JunglePlanks), + 19 => Some(Item::AcaciaPlanks), + 20 => Some(Item::DarkOakPlanks), + 21 => Some(Item::CrimsonPlanks), + 22 => Some(Item::WarpedPlanks), + 23 => Some(Item::OakSapling), + 24 => Some(Item::SpruceSapling), + 25 => Some(Item::BirchSapling), + 26 => Some(Item::JungleSapling), + 27 => Some(Item::AcaciaSapling), + 28 => Some(Item::DarkOakSapling), + 29 => Some(Item::Bedrock), + 30 => Some(Item::Sand), + 31 => Some(Item::RedSand), + 32 => Some(Item::Gravel), + 33 => Some(Item::GoldOre), + 34 => Some(Item::IronOre), + 35 => Some(Item::CoalOre), + 36 => Some(Item::NetherGoldOre), + 37 => Some(Item::OakLog), + 38 => Some(Item::SpruceLog), + 39 => Some(Item::BirchLog), + 40 => Some(Item::JungleLog), + 41 => Some(Item::AcaciaLog), + 42 => Some(Item::DarkOakLog), + 43 => Some(Item::CrimsonStem), + 44 => Some(Item::WarpedStem), + 45 => Some(Item::StrippedOakLog), + 46 => Some(Item::StrippedSpruceLog), + 47 => Some(Item::StrippedBirchLog), + 48 => Some(Item::StrippedJungleLog), + 49 => Some(Item::StrippedAcaciaLog), + 50 => Some(Item::StrippedDarkOakLog), + 51 => Some(Item::StrippedCrimsonStem), + 52 => Some(Item::StrippedWarpedStem), + 53 => Some(Item::StrippedOakWood), + 54 => Some(Item::StrippedSpruceWood), + 55 => Some(Item::StrippedBirchWood), + 56 => Some(Item::StrippedJungleWood), + 57 => Some(Item::StrippedAcaciaWood), + 58 => Some(Item::StrippedDarkOakWood), + 59 => Some(Item::StrippedCrimsonHyphae), + 60 => Some(Item::StrippedWarpedHyphae), + 61 => Some(Item::OakWood), + 62 => Some(Item::SpruceWood), + 63 => Some(Item::BirchWood), + 64 => Some(Item::JungleWood), + 65 => Some(Item::AcaciaWood), + 66 => Some(Item::DarkOakWood), + 67 => Some(Item::CrimsonHyphae), + 68 => Some(Item::WarpedHyphae), + 69 => Some(Item::OakLeaves), + 70 => Some(Item::SpruceLeaves), + 71 => Some(Item::BirchLeaves), + 72 => Some(Item::JungleLeaves), + 73 => Some(Item::AcaciaLeaves), + 74 => Some(Item::DarkOakLeaves), + 75 => Some(Item::Sponge), + 76 => Some(Item::WetSponge), + 77 => Some(Item::Glass), + 78 => Some(Item::LapisOre), + 79 => Some(Item::LapisBlock), + 80 => Some(Item::Dispenser), + 81 => Some(Item::Sandstone), + 82 => Some(Item::ChiseledSandstone), + 83 => Some(Item::CutSandstone), + 84 => Some(Item::NoteBlock), + 85 => Some(Item::PoweredRail), + 86 => Some(Item::DetectorRail), + 87 => Some(Item::StickyPiston), + 88 => Some(Item::Cobweb), + 89 => Some(Item::Grass), + 90 => Some(Item::Fern), + 91 => Some(Item::DeadBush), + 92 => Some(Item::Seagrass), + 93 => Some(Item::SeaPickle), + 94 => Some(Item::Piston), + 95 => Some(Item::WhiteWool), + 96 => Some(Item::OrangeWool), + 97 => Some(Item::MagentaWool), + 98 => Some(Item::LightBlueWool), + 99 => Some(Item::YellowWool), + 100 => Some(Item::LimeWool), + 101 => Some(Item::PinkWool), + 102 => Some(Item::GrayWool), + 103 => Some(Item::LightGrayWool), + 104 => Some(Item::CyanWool), + 105 => Some(Item::PurpleWool), + 106 => Some(Item::BlueWool), + 107 => Some(Item::BrownWool), + 108 => Some(Item::GreenWool), + 109 => Some(Item::RedWool), + 110 => Some(Item::BlackWool), + 111 => Some(Item::Dandelion), + 112 => Some(Item::Poppy), + 113 => Some(Item::BlueOrchid), + 114 => Some(Item::Allium), + 115 => Some(Item::AzureBluet), + 116 => Some(Item::RedTulip), + 117 => Some(Item::OrangeTulip), + 118 => Some(Item::WhiteTulip), + 119 => Some(Item::PinkTulip), + 120 => Some(Item::OxeyeDaisy), + 121 => Some(Item::Cornflower), + 122 => Some(Item::LilyOfTheValley), + 123 => Some(Item::WitherRose), + 124 => Some(Item::BrownMushroom), + 125 => Some(Item::RedMushroom), + 126 => Some(Item::CrimsonFungus), + 127 => Some(Item::WarpedFungus), + 128 => Some(Item::CrimsonRoots), + 129 => Some(Item::WarpedRoots), + 130 => Some(Item::NetherSprouts), + 131 => Some(Item::WeepingVines), + 132 => Some(Item::TwistingVines), + 133 => Some(Item::SugarCane), + 134 => Some(Item::Kelp), + 135 => Some(Item::Bamboo), + 136 => Some(Item::GoldBlock), + 137 => Some(Item::IronBlock), + 138 => Some(Item::OakSlab), + 139 => Some(Item::SpruceSlab), + 140 => Some(Item::BirchSlab), + 141 => Some(Item::JungleSlab), + 142 => Some(Item::AcaciaSlab), + 143 => Some(Item::DarkOakSlab), + 144 => Some(Item::CrimsonSlab), + 145 => Some(Item::WarpedSlab), + 146 => Some(Item::StoneSlab), + 147 => Some(Item::SmoothStoneSlab), + 148 => Some(Item::SandstoneSlab), + 149 => Some(Item::CutSandstoneSlab), + 150 => Some(Item::PetrifiedOakSlab), + 151 => Some(Item::CobblestoneSlab), + 152 => Some(Item::BrickSlab), + 153 => Some(Item::StoneBrickSlab), + 154 => Some(Item::NetherBrickSlab), + 155 => Some(Item::QuartzSlab), + 156 => Some(Item::RedSandstoneSlab), + 157 => Some(Item::CutRedSandstoneSlab), + 158 => Some(Item::PurpurSlab), + 159 => Some(Item::PrismarineSlab), + 160 => Some(Item::PrismarineBrickSlab), + 161 => Some(Item::DarkPrismarineSlab), + 162 => Some(Item::SmoothQuartz), + 163 => Some(Item::SmoothRedSandstone), + 164 => Some(Item::SmoothSandstone), + 165 => Some(Item::SmoothStone), + 166 => Some(Item::Bricks), + 167 => Some(Item::Tnt), + 168 => Some(Item::Bookshelf), + 169 => Some(Item::MossyCobblestone), + 170 => Some(Item::Obsidian), + 171 => Some(Item::Torch), + 172 => Some(Item::EndRod), + 173 => Some(Item::ChorusPlant), + 174 => Some(Item::ChorusFlower), + 175 => Some(Item::PurpurBlock), + 176 => Some(Item::PurpurPillar), + 177 => Some(Item::PurpurStairs), + 178 => Some(Item::Spawner), + 179 => Some(Item::OakStairs), + 180 => Some(Item::Chest), + 181 => Some(Item::DiamondOre), + 182 => Some(Item::DiamondBlock), + 183 => Some(Item::CraftingTable), + 184 => Some(Item::Farmland), + 185 => Some(Item::Furnace), + 186 => Some(Item::Ladder), + 187 => Some(Item::Rail), + 188 => Some(Item::CobblestoneStairs), + 189 => Some(Item::Lever), + 190 => Some(Item::StonePressurePlate), + 191 => Some(Item::OakPressurePlate), + 192 => Some(Item::SprucePressurePlate), + 193 => Some(Item::BirchPressurePlate), + 194 => Some(Item::JunglePressurePlate), + 195 => Some(Item::AcaciaPressurePlate), + 196 => Some(Item::DarkOakPressurePlate), + 197 => Some(Item::CrimsonPressurePlate), + 198 => Some(Item::WarpedPressurePlate), + 199 => Some(Item::PolishedBlackstonePressurePlate), + 200 => Some(Item::RedstoneOre), + 201 => Some(Item::RedstoneTorch), + 202 => Some(Item::Snow), + 203 => Some(Item::Ice), + 204 => Some(Item::SnowBlock), + 205 => Some(Item::Cactus), + 206 => Some(Item::Clay), + 207 => Some(Item::Jukebox), + 208 => Some(Item::OakFence), + 209 => Some(Item::SpruceFence), + 210 => Some(Item::BirchFence), + 211 => Some(Item::JungleFence), + 212 => Some(Item::AcaciaFence), + 213 => Some(Item::DarkOakFence), + 214 => Some(Item::CrimsonFence), + 215 => Some(Item::WarpedFence), + 216 => Some(Item::Pumpkin), + 217 => Some(Item::CarvedPumpkin), + 218 => Some(Item::Netherrack), + 219 => Some(Item::SoulSand), + 220 => Some(Item::SoulSoil), + 221 => Some(Item::Basalt), + 222 => Some(Item::PolishedBasalt), + 223 => Some(Item::SoulTorch), + 224 => Some(Item::Glowstone), + 225 => Some(Item::JackOLantern), + 226 => Some(Item::OakTrapdoor), + 227 => Some(Item::SpruceTrapdoor), + 228 => Some(Item::BirchTrapdoor), + 229 => Some(Item::JungleTrapdoor), + 230 => Some(Item::AcaciaTrapdoor), + 231 => Some(Item::DarkOakTrapdoor), + 232 => Some(Item::CrimsonTrapdoor), + 233 => Some(Item::WarpedTrapdoor), + 234 => Some(Item::InfestedStone), + 235 => Some(Item::InfestedCobblestone), + 236 => Some(Item::InfestedStoneBricks), + 237 => Some(Item::InfestedMossyStoneBricks), + 238 => Some(Item::InfestedCrackedStoneBricks), + 239 => Some(Item::InfestedChiseledStoneBricks), + 240 => Some(Item::StoneBricks), + 241 => Some(Item::MossyStoneBricks), + 242 => Some(Item::CrackedStoneBricks), + 243 => Some(Item::ChiseledStoneBricks), + 244 => Some(Item::BrownMushroomBlock), + 245 => Some(Item::RedMushroomBlock), + 246 => Some(Item::MushroomStem), + 247 => Some(Item::IronBars), + 248 => Some(Item::Chain), + 249 => Some(Item::GlassPane), + 250 => Some(Item::Melon), + 251 => Some(Item::Vine), + 252 => Some(Item::OakFenceGate), + 253 => Some(Item::SpruceFenceGate), + 254 => Some(Item::BirchFenceGate), + 255 => Some(Item::JungleFenceGate), + 256 => Some(Item::AcaciaFenceGate), + 257 => Some(Item::DarkOakFenceGate), + 258 => Some(Item::CrimsonFenceGate), + 259 => Some(Item::WarpedFenceGate), + 260 => Some(Item::BrickStairs), + 261 => Some(Item::StoneBrickStairs), + 262 => Some(Item::Mycelium), + 263 => Some(Item::LilyPad), + 264 => Some(Item::NetherBricks), + 265 => Some(Item::CrackedNetherBricks), + 266 => Some(Item::ChiseledNetherBricks), + 267 => Some(Item::NetherBrickFence), + 268 => Some(Item::NetherBrickStairs), + 269 => Some(Item::EnchantingTable), + 270 => Some(Item::EndPortalFrame), + 271 => Some(Item::EndStone), + 272 => Some(Item::EndStoneBricks), + 273 => Some(Item::DragonEgg), + 274 => Some(Item::RedstoneLamp), + 275 => Some(Item::SandstoneStairs), + 276 => Some(Item::EmeraldOre), + 277 => Some(Item::EnderChest), + 278 => Some(Item::TripwireHook), + 279 => Some(Item::EmeraldBlock), + 280 => Some(Item::SpruceStairs), + 281 => Some(Item::BirchStairs), + 282 => Some(Item::JungleStairs), + 283 => Some(Item::CrimsonStairs), + 284 => Some(Item::WarpedStairs), + 285 => Some(Item::CommandBlock), + 286 => Some(Item::Beacon), + 287 => Some(Item::CobblestoneWall), + 288 => Some(Item::MossyCobblestoneWall), + 289 => Some(Item::BrickWall), + 290 => Some(Item::PrismarineWall), + 291 => Some(Item::RedSandstoneWall), + 292 => Some(Item::MossyStoneBrickWall), + 293 => Some(Item::GraniteWall), + 294 => Some(Item::StoneBrickWall), + 295 => Some(Item::NetherBrickWall), + 296 => Some(Item::AndesiteWall), + 297 => Some(Item::RedNetherBrickWall), + 298 => Some(Item::SandstoneWall), + 299 => Some(Item::EndStoneBrickWall), + 300 => Some(Item::DioriteWall), + 301 => Some(Item::BlackstoneWall), + 302 => Some(Item::PolishedBlackstoneWall), + 303 => Some(Item::PolishedBlackstoneBrickWall), + 304 => Some(Item::StoneButton), + 305 => Some(Item::OakButton), + 306 => Some(Item::SpruceButton), + 307 => Some(Item::BirchButton), + 308 => Some(Item::JungleButton), + 309 => Some(Item::AcaciaButton), + 310 => Some(Item::DarkOakButton), + 311 => Some(Item::CrimsonButton), + 312 => Some(Item::WarpedButton), + 313 => Some(Item::PolishedBlackstoneButton), + 314 => Some(Item::Anvil), + 315 => Some(Item::ChippedAnvil), + 316 => Some(Item::DamagedAnvil), + 317 => Some(Item::TrappedChest), + 318 => Some(Item::LightWeightedPressurePlate), + 319 => Some(Item::HeavyWeightedPressurePlate), + 320 => Some(Item::DaylightDetector), + 321 => Some(Item::RedstoneBlock), + 322 => Some(Item::NetherQuartzOre), + 323 => Some(Item::Hopper), + 324 => Some(Item::ChiseledQuartzBlock), + 325 => Some(Item::QuartzBlock), + 326 => Some(Item::QuartzBricks), + 327 => Some(Item::QuartzPillar), + 328 => Some(Item::QuartzStairs), + 329 => Some(Item::ActivatorRail), + 330 => Some(Item::Dropper), + 331 => Some(Item::WhiteTerracotta), + 332 => Some(Item::OrangeTerracotta), + 333 => Some(Item::MagentaTerracotta), + 334 => Some(Item::LightBlueTerracotta), + 335 => Some(Item::YellowTerracotta), + 336 => Some(Item::LimeTerracotta), + 337 => Some(Item::PinkTerracotta), + 338 => Some(Item::GrayTerracotta), + 339 => Some(Item::LightGrayTerracotta), + 340 => Some(Item::CyanTerracotta), + 341 => Some(Item::PurpleTerracotta), + 342 => Some(Item::BlueTerracotta), + 343 => Some(Item::BrownTerracotta), + 344 => Some(Item::GreenTerracotta), + 345 => Some(Item::RedTerracotta), + 346 => Some(Item::BlackTerracotta), + 347 => Some(Item::Barrier), + 348 => Some(Item::IronTrapdoor), + 349 => Some(Item::HayBlock), + 350 => Some(Item::WhiteCarpet), + 351 => Some(Item::OrangeCarpet), + 352 => Some(Item::MagentaCarpet), + 353 => Some(Item::LightBlueCarpet), + 354 => Some(Item::YellowCarpet), + 355 => Some(Item::LimeCarpet), + 356 => Some(Item::PinkCarpet), + 357 => Some(Item::GrayCarpet), + 358 => Some(Item::LightGrayCarpet), + 359 => Some(Item::CyanCarpet), + 360 => Some(Item::PurpleCarpet), + 361 => Some(Item::BlueCarpet), + 362 => Some(Item::BrownCarpet), + 363 => Some(Item::GreenCarpet), + 364 => Some(Item::RedCarpet), + 365 => Some(Item::BlackCarpet), + 366 => Some(Item::Terracotta), + 367 => Some(Item::CoalBlock), + 368 => Some(Item::PackedIce), + 369 => Some(Item::AcaciaStairs), + 370 => Some(Item::DarkOakStairs), + 371 => Some(Item::SlimeBlock), + 372 => Some(Item::GrassPath), + 373 => Some(Item::Sunflower), + 374 => Some(Item::Lilac), + 375 => Some(Item::RoseBush), + 376 => Some(Item::Peony), + 377 => Some(Item::TallGrass), + 378 => Some(Item::LargeFern), + 379 => Some(Item::WhiteStainedGlass), + 380 => Some(Item::OrangeStainedGlass), + 381 => Some(Item::MagentaStainedGlass), + 382 => Some(Item::LightBlueStainedGlass), + 383 => Some(Item::YellowStainedGlass), + 384 => Some(Item::LimeStainedGlass), + 385 => Some(Item::PinkStainedGlass), + 386 => Some(Item::GrayStainedGlass), + 387 => Some(Item::LightGrayStainedGlass), + 388 => Some(Item::CyanStainedGlass), + 389 => Some(Item::PurpleStainedGlass), + 390 => Some(Item::BlueStainedGlass), + 391 => Some(Item::BrownStainedGlass), + 392 => Some(Item::GreenStainedGlass), + 393 => Some(Item::RedStainedGlass), + 394 => Some(Item::BlackStainedGlass), + 395 => Some(Item::WhiteStainedGlassPane), + 396 => Some(Item::OrangeStainedGlassPane), + 397 => Some(Item::MagentaStainedGlassPane), + 398 => Some(Item::LightBlueStainedGlassPane), + 399 => Some(Item::YellowStainedGlassPane), + 400 => Some(Item::LimeStainedGlassPane), + 401 => Some(Item::PinkStainedGlassPane), + 402 => Some(Item::GrayStainedGlassPane), + 403 => Some(Item::LightGrayStainedGlassPane), + 404 => Some(Item::CyanStainedGlassPane), + 405 => Some(Item::PurpleStainedGlassPane), + 406 => Some(Item::BlueStainedGlassPane), + 407 => Some(Item::BrownStainedGlassPane), + 408 => Some(Item::GreenStainedGlassPane), + 409 => Some(Item::RedStainedGlassPane), + 410 => Some(Item::BlackStainedGlassPane), + 411 => Some(Item::Prismarine), + 412 => Some(Item::PrismarineBricks), + 413 => Some(Item::DarkPrismarine), + 414 => Some(Item::PrismarineStairs), + 415 => Some(Item::PrismarineBrickStairs), + 416 => Some(Item::DarkPrismarineStairs), + 417 => Some(Item::SeaLantern), + 418 => Some(Item::RedSandstone), + 419 => Some(Item::ChiseledRedSandstone), + 420 => Some(Item::CutRedSandstone), + 421 => Some(Item::RedSandstoneStairs), + 422 => Some(Item::RepeatingCommandBlock), + 423 => Some(Item::ChainCommandBlock), + 424 => Some(Item::MagmaBlock), + 425 => Some(Item::NetherWartBlock), + 426 => Some(Item::WarpedWartBlock), + 427 => Some(Item::RedNetherBricks), + 428 => Some(Item::BoneBlock), + 429 => Some(Item::StructureVoid), + 430 => Some(Item::Observer), + 431 => Some(Item::ShulkerBox), + 432 => Some(Item::WhiteShulkerBox), + 433 => Some(Item::OrangeShulkerBox), + 434 => Some(Item::MagentaShulkerBox), + 435 => Some(Item::LightBlueShulkerBox), + 436 => Some(Item::YellowShulkerBox), + 437 => Some(Item::LimeShulkerBox), + 438 => Some(Item::PinkShulkerBox), + 439 => Some(Item::GrayShulkerBox), + 440 => Some(Item::LightGrayShulkerBox), + 441 => Some(Item::CyanShulkerBox), + 442 => Some(Item::PurpleShulkerBox), + 443 => Some(Item::BlueShulkerBox), + 444 => Some(Item::BrownShulkerBox), + 445 => Some(Item::GreenShulkerBox), + 446 => Some(Item::RedShulkerBox), + 447 => Some(Item::BlackShulkerBox), + 448 => Some(Item::WhiteGlazedTerracotta), + 449 => Some(Item::OrangeGlazedTerracotta), + 450 => Some(Item::MagentaGlazedTerracotta), + 451 => Some(Item::LightBlueGlazedTerracotta), + 452 => Some(Item::YellowGlazedTerracotta), + 453 => Some(Item::LimeGlazedTerracotta), + 454 => Some(Item::PinkGlazedTerracotta), + 455 => Some(Item::GrayGlazedTerracotta), + 456 => Some(Item::LightGrayGlazedTerracotta), + 457 => Some(Item::CyanGlazedTerracotta), + 458 => Some(Item::PurpleGlazedTerracotta), + 459 => Some(Item::BlueGlazedTerracotta), + 460 => Some(Item::BrownGlazedTerracotta), + 461 => Some(Item::GreenGlazedTerracotta), + 462 => Some(Item::RedGlazedTerracotta), + 463 => Some(Item::BlackGlazedTerracotta), + 464 => Some(Item::WhiteConcrete), + 465 => Some(Item::OrangeConcrete), + 466 => Some(Item::MagentaConcrete), + 467 => Some(Item::LightBlueConcrete), + 468 => Some(Item::YellowConcrete), + 469 => Some(Item::LimeConcrete), + 470 => Some(Item::PinkConcrete), + 471 => Some(Item::GrayConcrete), + 472 => Some(Item::LightGrayConcrete), + 473 => Some(Item::CyanConcrete), + 474 => Some(Item::PurpleConcrete), + 475 => Some(Item::BlueConcrete), + 476 => Some(Item::BrownConcrete), + 477 => Some(Item::GreenConcrete), + 478 => Some(Item::RedConcrete), + 479 => Some(Item::BlackConcrete), + 480 => Some(Item::WhiteConcretePowder), + 481 => Some(Item::OrangeConcretePowder), + 482 => Some(Item::MagentaConcretePowder), + 483 => Some(Item::LightBlueConcretePowder), + 484 => Some(Item::YellowConcretePowder), + 485 => Some(Item::LimeConcretePowder), + 486 => Some(Item::PinkConcretePowder), + 487 => Some(Item::GrayConcretePowder), + 488 => Some(Item::LightGrayConcretePowder), + 489 => Some(Item::CyanConcretePowder), + 490 => Some(Item::PurpleConcretePowder), + 491 => Some(Item::BlueConcretePowder), + 492 => Some(Item::BrownConcretePowder), + 493 => Some(Item::GreenConcretePowder), + 494 => Some(Item::RedConcretePowder), + 495 => Some(Item::BlackConcretePowder), + 496 => Some(Item::TurtleEgg), + 497 => Some(Item::DeadTubeCoralBlock), + 498 => Some(Item::DeadBrainCoralBlock), + 499 => Some(Item::DeadBubbleCoralBlock), + 500 => Some(Item::DeadFireCoralBlock), + 501 => Some(Item::DeadHornCoralBlock), + 502 => Some(Item::TubeCoralBlock), + 503 => Some(Item::BrainCoralBlock), + 504 => Some(Item::BubbleCoralBlock), + 505 => Some(Item::FireCoralBlock), + 506 => Some(Item::HornCoralBlock), + 507 => Some(Item::TubeCoral), + 508 => Some(Item::BrainCoral), + 509 => Some(Item::BubbleCoral), + 510 => Some(Item::FireCoral), + 511 => Some(Item::HornCoral), + 512 => Some(Item::DeadBrainCoral), + 513 => Some(Item::DeadBubbleCoral), + 514 => Some(Item::DeadFireCoral), + 515 => Some(Item::DeadHornCoral), + 516 => Some(Item::DeadTubeCoral), + 517 => Some(Item::TubeCoralFan), + 518 => Some(Item::BrainCoralFan), + 519 => Some(Item::BubbleCoralFan), + 520 => Some(Item::FireCoralFan), + 521 => Some(Item::HornCoralFan), + 522 => Some(Item::DeadTubeCoralFan), + 523 => Some(Item::DeadBrainCoralFan), + 524 => Some(Item::DeadBubbleCoralFan), + 525 => Some(Item::DeadFireCoralFan), + 526 => Some(Item::DeadHornCoralFan), + 527 => Some(Item::BlueIce), + 528 => Some(Item::Conduit), + 529 => Some(Item::PolishedGraniteStairs), + 530 => Some(Item::SmoothRedSandstoneStairs), + 531 => Some(Item::MossyStoneBrickStairs), + 532 => Some(Item::PolishedDioriteStairs), + 533 => Some(Item::MossyCobblestoneStairs), + 534 => Some(Item::EndStoneBrickStairs), + 535 => Some(Item::StoneStairs), + 536 => Some(Item::SmoothSandstoneStairs), + 537 => Some(Item::SmoothQuartzStairs), + 538 => Some(Item::GraniteStairs), + 539 => Some(Item::AndesiteStairs), + 540 => Some(Item::RedNetherBrickStairs), + 541 => Some(Item::PolishedAndesiteStairs), + 542 => Some(Item::DioriteStairs), + 543 => Some(Item::PolishedGraniteSlab), + 544 => Some(Item::SmoothRedSandstoneSlab), + 545 => Some(Item::MossyStoneBrickSlab), + 546 => Some(Item::PolishedDioriteSlab), + 547 => Some(Item::MossyCobblestoneSlab), + 548 => Some(Item::EndStoneBrickSlab), + 549 => Some(Item::SmoothSandstoneSlab), + 550 => Some(Item::SmoothQuartzSlab), + 551 => Some(Item::GraniteSlab), + 552 => Some(Item::AndesiteSlab), + 553 => Some(Item::RedNetherBrickSlab), + 554 => Some(Item::PolishedAndesiteSlab), + 555 => Some(Item::DioriteSlab), + 556 => Some(Item::Scaffolding), + 557 => Some(Item::IronDoor), + 558 => Some(Item::OakDoor), + 559 => Some(Item::SpruceDoor), + 560 => Some(Item::BirchDoor), + 561 => Some(Item::JungleDoor), + 562 => Some(Item::AcaciaDoor), + 563 => Some(Item::DarkOakDoor), + 564 => Some(Item::CrimsonDoor), + 565 => Some(Item::WarpedDoor), + 566 => Some(Item::Repeater), + 567 => Some(Item::Comparator), + 568 => Some(Item::StructureBlock), + 569 => Some(Item::Jigsaw), + 570 => Some(Item::TurtleHelmet), + 571 => Some(Item::Scute), + 572 => Some(Item::FlintAndSteel), + 573 => Some(Item::Apple), + 574 => Some(Item::Bow), + 575 => Some(Item::Arrow), + 576 => Some(Item::Coal), + 577 => Some(Item::Charcoal), + 578 => Some(Item::Diamond), + 579 => Some(Item::IronIngot), + 580 => Some(Item::GoldIngot), + 581 => Some(Item::NetheriteIngot), + 582 => Some(Item::NetheriteScrap), + 583 => Some(Item::WoodenSword), + 584 => Some(Item::WoodenShovel), + 585 => Some(Item::WoodenPickaxe), + 586 => Some(Item::WoodenAxe), + 587 => Some(Item::WoodenHoe), + 588 => Some(Item::StoneSword), + 589 => Some(Item::StoneShovel), + 590 => Some(Item::StonePickaxe), + 591 => Some(Item::StoneAxe), + 592 => Some(Item::StoneHoe), + 593 => Some(Item::GoldenSword), + 594 => Some(Item::GoldenShovel), + 595 => Some(Item::GoldenPickaxe), + 596 => Some(Item::GoldenAxe), + 597 => Some(Item::GoldenHoe), + 598 => Some(Item::IronSword), + 599 => Some(Item::IronShovel), + 600 => Some(Item::IronPickaxe), + 601 => Some(Item::IronAxe), + 602 => Some(Item::IronHoe), + 603 => Some(Item::DiamondSword), + 604 => Some(Item::DiamondShovel), + 605 => Some(Item::DiamondPickaxe), + 606 => Some(Item::DiamondAxe), + 607 => Some(Item::DiamondHoe), + 608 => Some(Item::NetheriteSword), + 609 => Some(Item::NetheriteShovel), + 610 => Some(Item::NetheritePickaxe), + 611 => Some(Item::NetheriteAxe), + 612 => Some(Item::NetheriteHoe), + 613 => Some(Item::Stick), + 614 => Some(Item::Bowl), + 615 => Some(Item::MushroomStew), + 616 => Some(Item::String), + 617 => Some(Item::Feather), + 618 => Some(Item::Gunpowder), + 619 => Some(Item::WheatSeeds), + 620 => Some(Item::Wheat), + 621 => Some(Item::Bread), + 622 => Some(Item::LeatherHelmet), + 623 => Some(Item::LeatherChestplate), + 624 => Some(Item::LeatherLeggings), + 625 => Some(Item::LeatherBoots), + 626 => Some(Item::ChainmailHelmet), + 627 => Some(Item::ChainmailChestplate), + 628 => Some(Item::ChainmailLeggings), + 629 => Some(Item::ChainmailBoots), + 630 => Some(Item::IronHelmet), + 631 => Some(Item::IronChestplate), + 632 => Some(Item::IronLeggings), + 633 => Some(Item::IronBoots), + 634 => Some(Item::DiamondHelmet), + 635 => Some(Item::DiamondChestplate), + 636 => Some(Item::DiamondLeggings), + 637 => Some(Item::DiamondBoots), + 638 => Some(Item::GoldenHelmet), + 639 => Some(Item::GoldenChestplate), + 640 => Some(Item::GoldenLeggings), + 641 => Some(Item::GoldenBoots), + 642 => Some(Item::NetheriteHelmet), + 643 => Some(Item::NetheriteChestplate), + 644 => Some(Item::NetheriteLeggings), + 645 => Some(Item::NetheriteBoots), + 646 => Some(Item::Flint), + 647 => Some(Item::Porkchop), + 648 => Some(Item::CookedPorkchop), + 649 => Some(Item::Painting), + 650 => Some(Item::GoldenApple), + 651 => Some(Item::EnchantedGoldenApple), + 652 => Some(Item::OakSign), + 653 => Some(Item::SpruceSign), + 654 => Some(Item::BirchSign), + 655 => Some(Item::JungleSign), + 656 => Some(Item::AcaciaSign), + 657 => Some(Item::DarkOakSign), + 658 => Some(Item::CrimsonSign), + 659 => Some(Item::WarpedSign), + 660 => Some(Item::Bucket), + 661 => Some(Item::WaterBucket), + 662 => Some(Item::LavaBucket), + 663 => Some(Item::Minecart), + 664 => Some(Item::Saddle), + 665 => Some(Item::Redstone), + 666 => Some(Item::Snowball), + 667 => Some(Item::OakBoat), + 668 => Some(Item::Leather), + 669 => Some(Item::MilkBucket), + 670 => Some(Item::PufferfishBucket), + 671 => Some(Item::SalmonBucket), + 672 => Some(Item::CodBucket), + 673 => Some(Item::TropicalFishBucket), + 674 => Some(Item::Brick), + 675 => Some(Item::ClayBall), + 676 => Some(Item::DriedKelpBlock), + 677 => Some(Item::Paper), + 678 => Some(Item::Book), + 679 => Some(Item::SlimeBall), + 680 => Some(Item::ChestMinecart), + 681 => Some(Item::FurnaceMinecart), + 682 => Some(Item::Egg), + 683 => Some(Item::Compass), + 684 => Some(Item::FishingRod), + 685 => Some(Item::Clock), + 686 => Some(Item::GlowstoneDust), + 687 => Some(Item::Cod), + 688 => Some(Item::Salmon), + 689 => Some(Item::TropicalFish), + 690 => Some(Item::Pufferfish), + 691 => Some(Item::CookedCod), + 692 => Some(Item::CookedSalmon), + 693 => Some(Item::InkSac), + 694 => Some(Item::CocoaBeans), + 695 => Some(Item::LapisLazuli), + 696 => Some(Item::WhiteDye), + 697 => Some(Item::OrangeDye), + 698 => Some(Item::MagentaDye), + 699 => Some(Item::LightBlueDye), + 700 => Some(Item::YellowDye), + 701 => Some(Item::LimeDye), + 702 => Some(Item::PinkDye), + 703 => Some(Item::GrayDye), + 704 => Some(Item::LightGrayDye), + 705 => Some(Item::CyanDye), + 706 => Some(Item::PurpleDye), + 707 => Some(Item::BlueDye), + 708 => Some(Item::BrownDye), + 709 => Some(Item::GreenDye), + 710 => Some(Item::RedDye), + 711 => Some(Item::BlackDye), + 712 => Some(Item::BoneMeal), + 713 => Some(Item::Bone), + 714 => Some(Item::Sugar), + 715 => Some(Item::Cake), + 716 => Some(Item::WhiteBed), + 717 => Some(Item::OrangeBed), + 718 => Some(Item::MagentaBed), + 719 => Some(Item::LightBlueBed), + 720 => Some(Item::YellowBed), + 721 => Some(Item::LimeBed), + 722 => Some(Item::PinkBed), + 723 => Some(Item::GrayBed), + 724 => Some(Item::LightGrayBed), + 725 => Some(Item::CyanBed), + 726 => Some(Item::PurpleBed), + 727 => Some(Item::BlueBed), + 728 => Some(Item::BrownBed), + 729 => Some(Item::GreenBed), + 730 => Some(Item::RedBed), + 731 => Some(Item::BlackBed), + 732 => Some(Item::Cookie), + 733 => Some(Item::FilledMap), + 734 => Some(Item::Shears), + 735 => Some(Item::MelonSlice), + 736 => Some(Item::DriedKelp), + 737 => Some(Item::PumpkinSeeds), + 738 => Some(Item::MelonSeeds), + 739 => Some(Item::Beef), + 740 => Some(Item::CookedBeef), + 741 => Some(Item::Chicken), + 742 => Some(Item::CookedChicken), + 743 => Some(Item::RottenFlesh), + 744 => Some(Item::EnderPearl), + 745 => Some(Item::BlazeRod), + 746 => Some(Item::GhastTear), + 747 => Some(Item::GoldNugget), + 748 => Some(Item::NetherWart), + 749 => Some(Item::Potion), + 750 => Some(Item::GlassBottle), + 751 => Some(Item::SpiderEye), + 752 => Some(Item::FermentedSpiderEye), + 753 => Some(Item::BlazePowder), + 754 => Some(Item::MagmaCream), + 755 => Some(Item::BrewingStand), + 756 => Some(Item::Cauldron), + 757 => Some(Item::EnderEye), + 758 => Some(Item::GlisteringMelonSlice), + 759 => Some(Item::BatSpawnEgg), + 760 => Some(Item::BeeSpawnEgg), + 761 => Some(Item::BlazeSpawnEgg), + 762 => Some(Item::CatSpawnEgg), + 763 => Some(Item::CaveSpiderSpawnEgg), + 764 => Some(Item::ChickenSpawnEgg), + 765 => Some(Item::CodSpawnEgg), + 766 => Some(Item::CowSpawnEgg), + 767 => Some(Item::CreeperSpawnEgg), + 768 => Some(Item::DolphinSpawnEgg), + 769 => Some(Item::DonkeySpawnEgg), + 770 => Some(Item::DrownedSpawnEgg), + 771 => Some(Item::ElderGuardianSpawnEgg), + 772 => Some(Item::EndermanSpawnEgg), + 773 => Some(Item::EndermiteSpawnEgg), + 774 => Some(Item::EvokerSpawnEgg), + 775 => Some(Item::FoxSpawnEgg), + 776 => Some(Item::GhastSpawnEgg), + 777 => Some(Item::GuardianSpawnEgg), + 778 => Some(Item::HoglinSpawnEgg), + 779 => Some(Item::HorseSpawnEgg), + 780 => Some(Item::HuskSpawnEgg), + 781 => Some(Item::LlamaSpawnEgg), + 782 => Some(Item::MagmaCubeSpawnEgg), + 783 => Some(Item::MooshroomSpawnEgg), + 784 => Some(Item::MuleSpawnEgg), + 785 => Some(Item::OcelotSpawnEgg), + 786 => Some(Item::PandaSpawnEgg), + 787 => Some(Item::ParrotSpawnEgg), + 788 => Some(Item::PhantomSpawnEgg), + 789 => Some(Item::PigSpawnEgg), + 790 => Some(Item::PiglinSpawnEgg), + 791 => Some(Item::PiglinBruteSpawnEgg), + 792 => Some(Item::PillagerSpawnEgg), + 793 => Some(Item::PolarBearSpawnEgg), + 794 => Some(Item::PufferfishSpawnEgg), + 795 => Some(Item::RabbitSpawnEgg), + 796 => Some(Item::RavagerSpawnEgg), + 797 => Some(Item::SalmonSpawnEgg), + 798 => Some(Item::SheepSpawnEgg), + 799 => Some(Item::ShulkerSpawnEgg), + 800 => Some(Item::SilverfishSpawnEgg), + 801 => Some(Item::SkeletonSpawnEgg), + 802 => Some(Item::SkeletonHorseSpawnEgg), + 803 => Some(Item::SlimeSpawnEgg), + 804 => Some(Item::SpiderSpawnEgg), + 805 => Some(Item::SquidSpawnEgg), + 806 => Some(Item::StraySpawnEgg), + 807 => Some(Item::StriderSpawnEgg), + 808 => Some(Item::TraderLlamaSpawnEgg), + 809 => Some(Item::TropicalFishSpawnEgg), + 810 => Some(Item::TurtleSpawnEgg), + 811 => Some(Item::VexSpawnEgg), + 812 => Some(Item::VillagerSpawnEgg), + 813 => Some(Item::VindicatorSpawnEgg), + 814 => Some(Item::WanderingTraderSpawnEgg), + 815 => Some(Item::WitchSpawnEgg), + 816 => Some(Item::WitherSkeletonSpawnEgg), + 817 => Some(Item::WolfSpawnEgg), + 818 => Some(Item::ZoglinSpawnEgg), + 819 => Some(Item::ZombieSpawnEgg), + 820 => Some(Item::ZombieHorseSpawnEgg), + 821 => Some(Item::ZombieVillagerSpawnEgg), + 822 => Some(Item::ZombifiedPiglinSpawnEgg), + 823 => Some(Item::ExperienceBottle), + 824 => Some(Item::FireCharge), + 825 => Some(Item::WritableBook), + 826 => Some(Item::WrittenBook), + 827 => Some(Item::Emerald), + 828 => Some(Item::ItemFrame), + 829 => Some(Item::FlowerPot), + 830 => Some(Item::Carrot), + 831 => Some(Item::Potato), + 832 => Some(Item::BakedPotato), + 833 => Some(Item::PoisonousPotato), + 834 => Some(Item::Map), + 835 => Some(Item::GoldenCarrot), + 836 => Some(Item::SkeletonSkull), + 837 => Some(Item::WitherSkeletonSkull), + 838 => Some(Item::PlayerHead), + 839 => Some(Item::ZombieHead), + 840 => Some(Item::CreeperHead), + 841 => Some(Item::DragonHead), + 842 => Some(Item::CarrotOnAStick), + 843 => Some(Item::WarpedFungusOnAStick), + 844 => Some(Item::NetherStar), + 845 => Some(Item::PumpkinPie), + 846 => Some(Item::FireworkRocket), + 847 => Some(Item::FireworkStar), + 848 => Some(Item::EnchantedBook), + 849 => Some(Item::NetherBrick), + 850 => Some(Item::Quartz), + 851 => Some(Item::TntMinecart), + 852 => Some(Item::HopperMinecart), + 853 => Some(Item::PrismarineShard), + 854 => Some(Item::PrismarineCrystals), + 855 => Some(Item::Rabbit), + 856 => Some(Item::CookedRabbit), + 857 => Some(Item::RabbitStew), + 858 => Some(Item::RabbitFoot), + 859 => Some(Item::RabbitHide), + 860 => Some(Item::ArmorStand), + 861 => Some(Item::IronHorseArmor), + 862 => Some(Item::GoldenHorseArmor), + 863 => Some(Item::DiamondHorseArmor), + 864 => Some(Item::LeatherHorseArmor), + 865 => Some(Item::Lead), + 866 => Some(Item::NameTag), + 867 => Some(Item::CommandBlockMinecart), + 868 => Some(Item::Mutton), + 869 => Some(Item::CookedMutton), + 870 => Some(Item::WhiteBanner), + 871 => Some(Item::OrangeBanner), + 872 => Some(Item::MagentaBanner), + 873 => Some(Item::LightBlueBanner), + 874 => Some(Item::YellowBanner), + 875 => Some(Item::LimeBanner), + 876 => Some(Item::PinkBanner), + 877 => Some(Item::GrayBanner), + 878 => Some(Item::LightGrayBanner), + 879 => Some(Item::CyanBanner), + 880 => Some(Item::PurpleBanner), + 881 => Some(Item::BlueBanner), + 882 => Some(Item::BrownBanner), + 883 => Some(Item::GreenBanner), + 884 => Some(Item::RedBanner), + 885 => Some(Item::BlackBanner), + 886 => Some(Item::EndCrystal), + 887 => Some(Item::ChorusFruit), + 888 => Some(Item::PoppedChorusFruit), + 889 => Some(Item::Beetroot), + 890 => Some(Item::BeetrootSeeds), + 891 => Some(Item::BeetrootSoup), + 892 => Some(Item::DragonBreath), + 893 => Some(Item::SplashPotion), + 894 => Some(Item::SpectralArrow), + 895 => Some(Item::TippedArrow), + 896 => Some(Item::LingeringPotion), + 897 => Some(Item::Shield), + 898 => Some(Item::Elytra), + 899 => Some(Item::SpruceBoat), + 900 => Some(Item::BirchBoat), + 901 => Some(Item::JungleBoat), + 902 => Some(Item::AcaciaBoat), + 903 => Some(Item::DarkOakBoat), + 904 => Some(Item::TotemOfUndying), + 905 => Some(Item::ShulkerShell), + 906 => Some(Item::IronNugget), + 907 => Some(Item::KnowledgeBook), + 908 => Some(Item::DebugStick), + 909 => Some(Item::MusicDisc13), + 910 => Some(Item::MusicDiscCat), + 911 => Some(Item::MusicDiscBlocks), + 912 => Some(Item::MusicDiscChirp), + 913 => Some(Item::MusicDiscFar), + 914 => Some(Item::MusicDiscMall), + 915 => Some(Item::MusicDiscMellohi), + 916 => Some(Item::MusicDiscStal), + 917 => Some(Item::MusicDiscStrad), + 918 => Some(Item::MusicDiscWard), + 919 => Some(Item::MusicDisc11), + 920 => Some(Item::MusicDiscWait), + 921 => Some(Item::MusicDiscPigstep), + 922 => Some(Item::Trident), + 923 => Some(Item::PhantomMembrane), + 924 => Some(Item::NautilusShell), + 925 => Some(Item::HeartOfTheSea), + 926 => Some(Item::Crossbow), + 927 => Some(Item::SuspiciousStew), + 928 => Some(Item::Loom), + 929 => Some(Item::FlowerBannerPattern), + 930 => Some(Item::CreeperBannerPattern), + 931 => Some(Item::SkullBannerPattern), + 932 => Some(Item::MojangBannerPattern), + 933 => Some(Item::GlobeBannerPattern), + 934 => Some(Item::PiglinBannerPattern), + 935 => Some(Item::Composter), + 936 => Some(Item::Barrel), + 937 => Some(Item::Smoker), + 938 => Some(Item::BlastFurnace), + 939 => Some(Item::CartographyTable), + 940 => Some(Item::FletchingTable), + 941 => Some(Item::Grindstone), + 942 => Some(Item::Lectern), + 943 => Some(Item::SmithingTable), + 944 => Some(Item::Stonecutter), + 945 => Some(Item::Bell), + 946 => Some(Item::Lantern), + 947 => Some(Item::SoulLantern), + 948 => Some(Item::SweetBerries), + 949 => Some(Item::Campfire), + 950 => Some(Item::SoulCampfire), + 951 => Some(Item::Shroomlight), + 952 => Some(Item::Honeycomb), + 953 => Some(Item::BeeNest), + 954 => Some(Item::Beehive), + 955 => Some(Item::HoneyBottle), + 956 => Some(Item::HoneyBlock), + 957 => Some(Item::HoneycombBlock), + 958 => Some(Item::Lodestone), + 959 => Some(Item::NetheriteBlock), + 960 => Some(Item::AncientDebris), + 961 => Some(Item::Target), + 962 => Some(Item::CryingObsidian), + 963 => Some(Item::Blackstone), + 964 => Some(Item::BlackstoneSlab), + 965 => Some(Item::BlackstoneStairs), + 966 => Some(Item::GildedBlackstone), + 967 => Some(Item::PolishedBlackstone), + 968 => Some(Item::PolishedBlackstoneSlab), + 969 => Some(Item::PolishedBlackstoneStairs), + 970 => Some(Item::ChiseledPolishedBlackstone), + 971 => Some(Item::PolishedBlackstoneBricks), + 972 => Some(Item::PolishedBlackstoneBrickSlab), + 973 => Some(Item::PolishedBlackstoneBrickStairs), + 974 => Some(Item::CrackedPolishedBlackstoneBricks), + 975 => Some(Item::RespawnAnchor), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Item { + /// Returns the `name` property of this `Item`. + pub fn name(&self) -> &'static str { + match self { + Item::Air => "air", + Item::Stone => "stone", + Item::Granite => "granite", + Item::PolishedGranite => "polished_granite", + Item::Diorite => "diorite", + Item::PolishedDiorite => "polished_diorite", + Item::Andesite => "andesite", + Item::PolishedAndesite => "polished_andesite", + Item::GrassBlock => "grass_block", + Item::Dirt => "dirt", + Item::CoarseDirt => "coarse_dirt", + Item::Podzol => "podzol", + Item::CrimsonNylium => "crimson_nylium", + Item::WarpedNylium => "warped_nylium", + Item::Cobblestone => "cobblestone", + Item::OakPlanks => "oak_planks", + Item::SprucePlanks => "spruce_planks", + Item::BirchPlanks => "birch_planks", + Item::JunglePlanks => "jungle_planks", + Item::AcaciaPlanks => "acacia_planks", + Item::DarkOakPlanks => "dark_oak_planks", + Item::CrimsonPlanks => "crimson_planks", + Item::WarpedPlanks => "warped_planks", + Item::OakSapling => "oak_sapling", + Item::SpruceSapling => "spruce_sapling", + Item::BirchSapling => "birch_sapling", + Item::JungleSapling => "jungle_sapling", + Item::AcaciaSapling => "acacia_sapling", + Item::DarkOakSapling => "dark_oak_sapling", + Item::Bedrock => "bedrock", + Item::Sand => "sand", + Item::RedSand => "red_sand", + Item::Gravel => "gravel", + Item::GoldOre => "gold_ore", + Item::IronOre => "iron_ore", + Item::CoalOre => "coal_ore", + Item::NetherGoldOre => "nether_gold_ore", + Item::OakLog => "oak_log", + Item::SpruceLog => "spruce_log", + Item::BirchLog => "birch_log", + Item::JungleLog => "jungle_log", + Item::AcaciaLog => "acacia_log", + Item::DarkOakLog => "dark_oak_log", + Item::CrimsonStem => "crimson_stem", + Item::WarpedStem => "warped_stem", + Item::StrippedOakLog => "stripped_oak_log", + Item::StrippedSpruceLog => "stripped_spruce_log", + Item::StrippedBirchLog => "stripped_birch_log", + Item::StrippedJungleLog => "stripped_jungle_log", + Item::StrippedAcaciaLog => "stripped_acacia_log", + Item::StrippedDarkOakLog => "stripped_dark_oak_log", + Item::StrippedCrimsonStem => "stripped_crimson_stem", + Item::StrippedWarpedStem => "stripped_warped_stem", + Item::StrippedOakWood => "stripped_oak_wood", + Item::StrippedSpruceWood => "stripped_spruce_wood", + Item::StrippedBirchWood => "stripped_birch_wood", + Item::StrippedJungleWood => "stripped_jungle_wood", + Item::StrippedAcaciaWood => "stripped_acacia_wood", + Item::StrippedDarkOakWood => "stripped_dark_oak_wood", + Item::StrippedCrimsonHyphae => "stripped_crimson_hyphae", + Item::StrippedWarpedHyphae => "stripped_warped_hyphae", + Item::OakWood => "oak_wood", + Item::SpruceWood => "spruce_wood", + Item::BirchWood => "birch_wood", + Item::JungleWood => "jungle_wood", + Item::AcaciaWood => "acacia_wood", + Item::DarkOakWood => "dark_oak_wood", + Item::CrimsonHyphae => "crimson_hyphae", + Item::WarpedHyphae => "warped_hyphae", + Item::OakLeaves => "oak_leaves", + Item::SpruceLeaves => "spruce_leaves", + Item::BirchLeaves => "birch_leaves", + Item::JungleLeaves => "jungle_leaves", + Item::AcaciaLeaves => "acacia_leaves", + Item::DarkOakLeaves => "dark_oak_leaves", + Item::Sponge => "sponge", + Item::WetSponge => "wet_sponge", + Item::Glass => "glass", + Item::LapisOre => "lapis_ore", + Item::LapisBlock => "lapis_block", + Item::Dispenser => "dispenser", + Item::Sandstone => "sandstone", + Item::ChiseledSandstone => "chiseled_sandstone", + Item::CutSandstone => "cut_sandstone", + Item::NoteBlock => "note_block", + Item::PoweredRail => "powered_rail", + Item::DetectorRail => "detector_rail", + Item::StickyPiston => "sticky_piston", + Item::Cobweb => "cobweb", + Item::Grass => "grass", + Item::Fern => "fern", + Item::DeadBush => "dead_bush", + Item::Seagrass => "seagrass", + Item::SeaPickle => "sea_pickle", + Item::Piston => "piston", + Item::WhiteWool => "white_wool", + Item::OrangeWool => "orange_wool", + Item::MagentaWool => "magenta_wool", + Item::LightBlueWool => "light_blue_wool", + Item::YellowWool => "yellow_wool", + Item::LimeWool => "lime_wool", + Item::PinkWool => "pink_wool", + Item::GrayWool => "gray_wool", + Item::LightGrayWool => "light_gray_wool", + Item::CyanWool => "cyan_wool", + Item::PurpleWool => "purple_wool", + Item::BlueWool => "blue_wool", + Item::BrownWool => "brown_wool", + Item::GreenWool => "green_wool", + Item::RedWool => "red_wool", + Item::BlackWool => "black_wool", + Item::Dandelion => "dandelion", + Item::Poppy => "poppy", + Item::BlueOrchid => "blue_orchid", + Item::Allium => "allium", + Item::AzureBluet => "azure_bluet", + Item::RedTulip => "red_tulip", + Item::OrangeTulip => "orange_tulip", + Item::WhiteTulip => "white_tulip", + Item::PinkTulip => "pink_tulip", + Item::OxeyeDaisy => "oxeye_daisy", + Item::Cornflower => "cornflower", + Item::LilyOfTheValley => "lily_of_the_valley", + Item::WitherRose => "wither_rose", + Item::BrownMushroom => "brown_mushroom", + Item::RedMushroom => "red_mushroom", + Item::CrimsonFungus => "crimson_fungus", + Item::WarpedFungus => "warped_fungus", + Item::CrimsonRoots => "crimson_roots", + Item::WarpedRoots => "warped_roots", + Item::NetherSprouts => "nether_sprouts", + Item::WeepingVines => "weeping_vines", + Item::TwistingVines => "twisting_vines", + Item::SugarCane => "sugar_cane", + Item::Kelp => "kelp", + Item::Bamboo => "bamboo", + Item::GoldBlock => "gold_block", + Item::IronBlock => "iron_block", + Item::OakSlab => "oak_slab", + Item::SpruceSlab => "spruce_slab", + Item::BirchSlab => "birch_slab", + Item::JungleSlab => "jungle_slab", + Item::AcaciaSlab => "acacia_slab", + Item::DarkOakSlab => "dark_oak_slab", + Item::CrimsonSlab => "crimson_slab", + Item::WarpedSlab => "warped_slab", + Item::StoneSlab => "stone_slab", + Item::SmoothStoneSlab => "smooth_stone_slab", + Item::SandstoneSlab => "sandstone_slab", + Item::CutSandstoneSlab => "cut_sandstone_slab", + Item::PetrifiedOakSlab => "petrified_oak_slab", + Item::CobblestoneSlab => "cobblestone_slab", + Item::BrickSlab => "brick_slab", + Item::StoneBrickSlab => "stone_brick_slab", + Item::NetherBrickSlab => "nether_brick_slab", + Item::QuartzSlab => "quartz_slab", + Item::RedSandstoneSlab => "red_sandstone_slab", + Item::CutRedSandstoneSlab => "cut_red_sandstone_slab", + Item::PurpurSlab => "purpur_slab", + Item::PrismarineSlab => "prismarine_slab", + Item::PrismarineBrickSlab => "prismarine_brick_slab", + Item::DarkPrismarineSlab => "dark_prismarine_slab", + Item::SmoothQuartz => "smooth_quartz", + Item::SmoothRedSandstone => "smooth_red_sandstone", + Item::SmoothSandstone => "smooth_sandstone", + Item::SmoothStone => "smooth_stone", + Item::Bricks => "bricks", + Item::Tnt => "tnt", + Item::Bookshelf => "bookshelf", + Item::MossyCobblestone => "mossy_cobblestone", + Item::Obsidian => "obsidian", + Item::Torch => "torch", + Item::EndRod => "end_rod", + Item::ChorusPlant => "chorus_plant", + Item::ChorusFlower => "chorus_flower", + Item::PurpurBlock => "purpur_block", + Item::PurpurPillar => "purpur_pillar", + Item::PurpurStairs => "purpur_stairs", + Item::Spawner => "spawner", + Item::OakStairs => "oak_stairs", + Item::Chest => "chest", + Item::DiamondOre => "diamond_ore", + Item::DiamondBlock => "diamond_block", + Item::CraftingTable => "crafting_table", + Item::Farmland => "farmland", + Item::Furnace => "furnace", + Item::Ladder => "ladder", + Item::Rail => "rail", + Item::CobblestoneStairs => "cobblestone_stairs", + Item::Lever => "lever", + Item::StonePressurePlate => "stone_pressure_plate", + Item::OakPressurePlate => "oak_pressure_plate", + Item::SprucePressurePlate => "spruce_pressure_plate", + Item::BirchPressurePlate => "birch_pressure_plate", + Item::JunglePressurePlate => "jungle_pressure_plate", + Item::AcaciaPressurePlate => "acacia_pressure_plate", + Item::DarkOakPressurePlate => "dark_oak_pressure_plate", + Item::CrimsonPressurePlate => "crimson_pressure_plate", + Item::WarpedPressurePlate => "warped_pressure_plate", + Item::PolishedBlackstonePressurePlate => "polished_blackstone_pressure_plate", + Item::RedstoneOre => "redstone_ore", + Item::RedstoneTorch => "redstone_torch", + Item::Snow => "snow", + Item::Ice => "ice", + Item::SnowBlock => "snow_block", + Item::Cactus => "cactus", + Item::Clay => "clay", + Item::Jukebox => "jukebox", + Item::OakFence => "oak_fence", + Item::SpruceFence => "spruce_fence", + Item::BirchFence => "birch_fence", + Item::JungleFence => "jungle_fence", + Item::AcaciaFence => "acacia_fence", + Item::DarkOakFence => "dark_oak_fence", + Item::CrimsonFence => "crimson_fence", + Item::WarpedFence => "warped_fence", + Item::Pumpkin => "pumpkin", + Item::CarvedPumpkin => "carved_pumpkin", + Item::Netherrack => "netherrack", + Item::SoulSand => "soul_sand", + Item::SoulSoil => "soul_soil", + Item::Basalt => "basalt", + Item::PolishedBasalt => "polished_basalt", + Item::SoulTorch => "soul_torch", + Item::Glowstone => "glowstone", + Item::JackOLantern => "jack_o_lantern", + Item::OakTrapdoor => "oak_trapdoor", + Item::SpruceTrapdoor => "spruce_trapdoor", + Item::BirchTrapdoor => "birch_trapdoor", + Item::JungleTrapdoor => "jungle_trapdoor", + Item::AcaciaTrapdoor => "acacia_trapdoor", + Item::DarkOakTrapdoor => "dark_oak_trapdoor", + Item::CrimsonTrapdoor => "crimson_trapdoor", + Item::WarpedTrapdoor => "warped_trapdoor", + Item::InfestedStone => "infested_stone", + Item::InfestedCobblestone => "infested_cobblestone", + Item::InfestedStoneBricks => "infested_stone_bricks", + Item::InfestedMossyStoneBricks => "infested_mossy_stone_bricks", + Item::InfestedCrackedStoneBricks => "infested_cracked_stone_bricks", + Item::InfestedChiseledStoneBricks => "infested_chiseled_stone_bricks", + Item::StoneBricks => "stone_bricks", + Item::MossyStoneBricks => "mossy_stone_bricks", + Item::CrackedStoneBricks => "cracked_stone_bricks", + Item::ChiseledStoneBricks => "chiseled_stone_bricks", + Item::BrownMushroomBlock => "brown_mushroom_block", + Item::RedMushroomBlock => "red_mushroom_block", + Item::MushroomStem => "mushroom_stem", + Item::IronBars => "iron_bars", + Item::Chain => "chain", + Item::GlassPane => "glass_pane", + Item::Melon => "melon", + Item::Vine => "vine", + Item::OakFenceGate => "oak_fence_gate", + Item::SpruceFenceGate => "spruce_fence_gate", + Item::BirchFenceGate => "birch_fence_gate", + Item::JungleFenceGate => "jungle_fence_gate", + Item::AcaciaFenceGate => "acacia_fence_gate", + Item::DarkOakFenceGate => "dark_oak_fence_gate", + Item::CrimsonFenceGate => "crimson_fence_gate", + Item::WarpedFenceGate => "warped_fence_gate", + Item::BrickStairs => "brick_stairs", + Item::StoneBrickStairs => "stone_brick_stairs", + Item::Mycelium => "mycelium", + Item::LilyPad => "lily_pad", + Item::NetherBricks => "nether_bricks", + Item::CrackedNetherBricks => "cracked_nether_bricks", + Item::ChiseledNetherBricks => "chiseled_nether_bricks", + Item::NetherBrickFence => "nether_brick_fence", + Item::NetherBrickStairs => "nether_brick_stairs", + Item::EnchantingTable => "enchanting_table", + Item::EndPortalFrame => "end_portal_frame", + Item::EndStone => "end_stone", + Item::EndStoneBricks => "end_stone_bricks", + Item::DragonEgg => "dragon_egg", + Item::RedstoneLamp => "redstone_lamp", + Item::SandstoneStairs => "sandstone_stairs", + Item::EmeraldOre => "emerald_ore", + Item::EnderChest => "ender_chest", + Item::TripwireHook => "tripwire_hook", + Item::EmeraldBlock => "emerald_block", + Item::SpruceStairs => "spruce_stairs", + Item::BirchStairs => "birch_stairs", + Item::JungleStairs => "jungle_stairs", + Item::CrimsonStairs => "crimson_stairs", + Item::WarpedStairs => "warped_stairs", + Item::CommandBlock => "command_block", + Item::Beacon => "beacon", + Item::CobblestoneWall => "cobblestone_wall", + Item::MossyCobblestoneWall => "mossy_cobblestone_wall", + Item::BrickWall => "brick_wall", + Item::PrismarineWall => "prismarine_wall", + Item::RedSandstoneWall => "red_sandstone_wall", + Item::MossyStoneBrickWall => "mossy_stone_brick_wall", + Item::GraniteWall => "granite_wall", + Item::StoneBrickWall => "stone_brick_wall", + Item::NetherBrickWall => "nether_brick_wall", + Item::AndesiteWall => "andesite_wall", + Item::RedNetherBrickWall => "red_nether_brick_wall", + Item::SandstoneWall => "sandstone_wall", + Item::EndStoneBrickWall => "end_stone_brick_wall", + Item::DioriteWall => "diorite_wall", + Item::BlackstoneWall => "blackstone_wall", + Item::PolishedBlackstoneWall => "polished_blackstone_wall", + Item::PolishedBlackstoneBrickWall => "polished_blackstone_brick_wall", + Item::StoneButton => "stone_button", + Item::OakButton => "oak_button", + Item::SpruceButton => "spruce_button", + Item::BirchButton => "birch_button", + Item::JungleButton => "jungle_button", + Item::AcaciaButton => "acacia_button", + Item::DarkOakButton => "dark_oak_button", + Item::CrimsonButton => "crimson_button", + Item::WarpedButton => "warped_button", + Item::PolishedBlackstoneButton => "polished_blackstone_button", + Item::Anvil => "anvil", + Item::ChippedAnvil => "chipped_anvil", + Item::DamagedAnvil => "damaged_anvil", + Item::TrappedChest => "trapped_chest", + Item::LightWeightedPressurePlate => "light_weighted_pressure_plate", + Item::HeavyWeightedPressurePlate => "heavy_weighted_pressure_plate", + Item::DaylightDetector => "daylight_detector", + Item::RedstoneBlock => "redstone_block", + Item::NetherQuartzOre => "nether_quartz_ore", + Item::Hopper => "hopper", + Item::ChiseledQuartzBlock => "chiseled_quartz_block", + Item::QuartzBlock => "quartz_block", + Item::QuartzBricks => "quartz_bricks", + Item::QuartzPillar => "quartz_pillar", + Item::QuartzStairs => "quartz_stairs", + Item::ActivatorRail => "activator_rail", + Item::Dropper => "dropper", + Item::WhiteTerracotta => "white_terracotta", + Item::OrangeTerracotta => "orange_terracotta", + Item::MagentaTerracotta => "magenta_terracotta", + Item::LightBlueTerracotta => "light_blue_terracotta", + Item::YellowTerracotta => "yellow_terracotta", + Item::LimeTerracotta => "lime_terracotta", + Item::PinkTerracotta => "pink_terracotta", + Item::GrayTerracotta => "gray_terracotta", + Item::LightGrayTerracotta => "light_gray_terracotta", + Item::CyanTerracotta => "cyan_terracotta", + Item::PurpleTerracotta => "purple_terracotta", + Item::BlueTerracotta => "blue_terracotta", + Item::BrownTerracotta => "brown_terracotta", + Item::GreenTerracotta => "green_terracotta", + Item::RedTerracotta => "red_terracotta", + Item::BlackTerracotta => "black_terracotta", + Item::Barrier => "barrier", + Item::IronTrapdoor => "iron_trapdoor", + Item::HayBlock => "hay_block", + Item::WhiteCarpet => "white_carpet", + Item::OrangeCarpet => "orange_carpet", + Item::MagentaCarpet => "magenta_carpet", + Item::LightBlueCarpet => "light_blue_carpet", + Item::YellowCarpet => "yellow_carpet", + Item::LimeCarpet => "lime_carpet", + Item::PinkCarpet => "pink_carpet", + Item::GrayCarpet => "gray_carpet", + Item::LightGrayCarpet => "light_gray_carpet", + Item::CyanCarpet => "cyan_carpet", + Item::PurpleCarpet => "purple_carpet", + Item::BlueCarpet => "blue_carpet", + Item::BrownCarpet => "brown_carpet", + Item::GreenCarpet => "green_carpet", + Item::RedCarpet => "red_carpet", + Item::BlackCarpet => "black_carpet", + Item::Terracotta => "terracotta", + Item::CoalBlock => "coal_block", + Item::PackedIce => "packed_ice", + Item::AcaciaStairs => "acacia_stairs", + Item::DarkOakStairs => "dark_oak_stairs", + Item::SlimeBlock => "slime_block", + Item::GrassPath => "grass_path", + Item::Sunflower => "sunflower", + Item::Lilac => "lilac", + Item::RoseBush => "rose_bush", + Item::Peony => "peony", + Item::TallGrass => "tall_grass", + Item::LargeFern => "large_fern", + Item::WhiteStainedGlass => "white_stained_glass", + Item::OrangeStainedGlass => "orange_stained_glass", + Item::MagentaStainedGlass => "magenta_stained_glass", + Item::LightBlueStainedGlass => "light_blue_stained_glass", + Item::YellowStainedGlass => "yellow_stained_glass", + Item::LimeStainedGlass => "lime_stained_glass", + Item::PinkStainedGlass => "pink_stained_glass", + Item::GrayStainedGlass => "gray_stained_glass", + Item::LightGrayStainedGlass => "light_gray_stained_glass", + Item::CyanStainedGlass => "cyan_stained_glass", + Item::PurpleStainedGlass => "purple_stained_glass", + Item::BlueStainedGlass => "blue_stained_glass", + Item::BrownStainedGlass => "brown_stained_glass", + Item::GreenStainedGlass => "green_stained_glass", + Item::RedStainedGlass => "red_stained_glass", + Item::BlackStainedGlass => "black_stained_glass", + Item::WhiteStainedGlassPane => "white_stained_glass_pane", + Item::OrangeStainedGlassPane => "orange_stained_glass_pane", + Item::MagentaStainedGlassPane => "magenta_stained_glass_pane", + Item::LightBlueStainedGlassPane => "light_blue_stained_glass_pane", + Item::YellowStainedGlassPane => "yellow_stained_glass_pane", + Item::LimeStainedGlassPane => "lime_stained_glass_pane", + Item::PinkStainedGlassPane => "pink_stained_glass_pane", + Item::GrayStainedGlassPane => "gray_stained_glass_pane", + Item::LightGrayStainedGlassPane => "light_gray_stained_glass_pane", + Item::CyanStainedGlassPane => "cyan_stained_glass_pane", + Item::PurpleStainedGlassPane => "purple_stained_glass_pane", + Item::BlueStainedGlassPane => "blue_stained_glass_pane", + Item::BrownStainedGlassPane => "brown_stained_glass_pane", + Item::GreenStainedGlassPane => "green_stained_glass_pane", + Item::RedStainedGlassPane => "red_stained_glass_pane", + Item::BlackStainedGlassPane => "black_stained_glass_pane", + Item::Prismarine => "prismarine", + Item::PrismarineBricks => "prismarine_bricks", + Item::DarkPrismarine => "dark_prismarine", + Item::PrismarineStairs => "prismarine_stairs", + Item::PrismarineBrickStairs => "prismarine_brick_stairs", + Item::DarkPrismarineStairs => "dark_prismarine_stairs", + Item::SeaLantern => "sea_lantern", + Item::RedSandstone => "red_sandstone", + Item::ChiseledRedSandstone => "chiseled_red_sandstone", + Item::CutRedSandstone => "cut_red_sandstone", + Item::RedSandstoneStairs => "red_sandstone_stairs", + Item::RepeatingCommandBlock => "repeating_command_block", + Item::ChainCommandBlock => "chain_command_block", + Item::MagmaBlock => "magma_block", + Item::NetherWartBlock => "nether_wart_block", + Item::WarpedWartBlock => "warped_wart_block", + Item::RedNetherBricks => "red_nether_bricks", + Item::BoneBlock => "bone_block", + Item::StructureVoid => "structure_void", + Item::Observer => "observer", + Item::ShulkerBox => "shulker_box", + Item::WhiteShulkerBox => "white_shulker_box", + Item::OrangeShulkerBox => "orange_shulker_box", + Item::MagentaShulkerBox => "magenta_shulker_box", + Item::LightBlueShulkerBox => "light_blue_shulker_box", + Item::YellowShulkerBox => "yellow_shulker_box", + Item::LimeShulkerBox => "lime_shulker_box", + Item::PinkShulkerBox => "pink_shulker_box", + Item::GrayShulkerBox => "gray_shulker_box", + Item::LightGrayShulkerBox => "light_gray_shulker_box", + Item::CyanShulkerBox => "cyan_shulker_box", + Item::PurpleShulkerBox => "purple_shulker_box", + Item::BlueShulkerBox => "blue_shulker_box", + Item::BrownShulkerBox => "brown_shulker_box", + Item::GreenShulkerBox => "green_shulker_box", + Item::RedShulkerBox => "red_shulker_box", + Item::BlackShulkerBox => "black_shulker_box", + Item::WhiteGlazedTerracotta => "white_glazed_terracotta", + Item::OrangeGlazedTerracotta => "orange_glazed_terracotta", + Item::MagentaGlazedTerracotta => "magenta_glazed_terracotta", + Item::LightBlueGlazedTerracotta => "light_blue_glazed_terracotta", + Item::YellowGlazedTerracotta => "yellow_glazed_terracotta", + Item::LimeGlazedTerracotta => "lime_glazed_terracotta", + Item::PinkGlazedTerracotta => "pink_glazed_terracotta", + Item::GrayGlazedTerracotta => "gray_glazed_terracotta", + Item::LightGrayGlazedTerracotta => "light_gray_glazed_terracotta", + Item::CyanGlazedTerracotta => "cyan_glazed_terracotta", + Item::PurpleGlazedTerracotta => "purple_glazed_terracotta", + Item::BlueGlazedTerracotta => "blue_glazed_terracotta", + Item::BrownGlazedTerracotta => "brown_glazed_terracotta", + Item::GreenGlazedTerracotta => "green_glazed_terracotta", + Item::RedGlazedTerracotta => "red_glazed_terracotta", + Item::BlackGlazedTerracotta => "black_glazed_terracotta", + Item::WhiteConcrete => "white_concrete", + Item::OrangeConcrete => "orange_concrete", + Item::MagentaConcrete => "magenta_concrete", + Item::LightBlueConcrete => "light_blue_concrete", + Item::YellowConcrete => "yellow_concrete", + Item::LimeConcrete => "lime_concrete", + Item::PinkConcrete => "pink_concrete", + Item::GrayConcrete => "gray_concrete", + Item::LightGrayConcrete => "light_gray_concrete", + Item::CyanConcrete => "cyan_concrete", + Item::PurpleConcrete => "purple_concrete", + Item::BlueConcrete => "blue_concrete", + Item::BrownConcrete => "brown_concrete", + Item::GreenConcrete => "green_concrete", + Item::RedConcrete => "red_concrete", + Item::BlackConcrete => "black_concrete", + Item::WhiteConcretePowder => "white_concrete_powder", + Item::OrangeConcretePowder => "orange_concrete_powder", + Item::MagentaConcretePowder => "magenta_concrete_powder", + Item::LightBlueConcretePowder => "light_blue_concrete_powder", + Item::YellowConcretePowder => "yellow_concrete_powder", + Item::LimeConcretePowder => "lime_concrete_powder", + Item::PinkConcretePowder => "pink_concrete_powder", + Item::GrayConcretePowder => "gray_concrete_powder", + Item::LightGrayConcretePowder => "light_gray_concrete_powder", + Item::CyanConcretePowder => "cyan_concrete_powder", + Item::PurpleConcretePowder => "purple_concrete_powder", + Item::BlueConcretePowder => "blue_concrete_powder", + Item::BrownConcretePowder => "brown_concrete_powder", + Item::GreenConcretePowder => "green_concrete_powder", + Item::RedConcretePowder => "red_concrete_powder", + Item::BlackConcretePowder => "black_concrete_powder", + Item::TurtleEgg => "turtle_egg", + Item::DeadTubeCoralBlock => "dead_tube_coral_block", + Item::DeadBrainCoralBlock => "dead_brain_coral_block", + Item::DeadBubbleCoralBlock => "dead_bubble_coral_block", + Item::DeadFireCoralBlock => "dead_fire_coral_block", + Item::DeadHornCoralBlock => "dead_horn_coral_block", + Item::TubeCoralBlock => "tube_coral_block", + Item::BrainCoralBlock => "brain_coral_block", + Item::BubbleCoralBlock => "bubble_coral_block", + Item::FireCoralBlock => "fire_coral_block", + Item::HornCoralBlock => "horn_coral_block", + Item::TubeCoral => "tube_coral", + Item::BrainCoral => "brain_coral", + Item::BubbleCoral => "bubble_coral", + Item::FireCoral => "fire_coral", + Item::HornCoral => "horn_coral", + Item::DeadBrainCoral => "dead_brain_coral", + Item::DeadBubbleCoral => "dead_bubble_coral", + Item::DeadFireCoral => "dead_fire_coral", + Item::DeadHornCoral => "dead_horn_coral", + Item::DeadTubeCoral => "dead_tube_coral", + Item::TubeCoralFan => "tube_coral_fan", + Item::BrainCoralFan => "brain_coral_fan", + Item::BubbleCoralFan => "bubble_coral_fan", + Item::FireCoralFan => "fire_coral_fan", + Item::HornCoralFan => "horn_coral_fan", + Item::DeadTubeCoralFan => "dead_tube_coral_fan", + Item::DeadBrainCoralFan => "dead_brain_coral_fan", + Item::DeadBubbleCoralFan => "dead_bubble_coral_fan", + Item::DeadFireCoralFan => "dead_fire_coral_fan", + Item::DeadHornCoralFan => "dead_horn_coral_fan", + Item::BlueIce => "blue_ice", + Item::Conduit => "conduit", + Item::PolishedGraniteStairs => "polished_granite_stairs", + Item::SmoothRedSandstoneStairs => "smooth_red_sandstone_stairs", + Item::MossyStoneBrickStairs => "mossy_stone_brick_stairs", + Item::PolishedDioriteStairs => "polished_diorite_stairs", + Item::MossyCobblestoneStairs => "mossy_cobblestone_stairs", + Item::EndStoneBrickStairs => "end_stone_brick_stairs", + Item::StoneStairs => "stone_stairs", + Item::SmoothSandstoneStairs => "smooth_sandstone_stairs", + Item::SmoothQuartzStairs => "smooth_quartz_stairs", + Item::GraniteStairs => "granite_stairs", + Item::AndesiteStairs => "andesite_stairs", + Item::RedNetherBrickStairs => "red_nether_brick_stairs", + Item::PolishedAndesiteStairs => "polished_andesite_stairs", + Item::DioriteStairs => "diorite_stairs", + Item::PolishedGraniteSlab => "polished_granite_slab", + Item::SmoothRedSandstoneSlab => "smooth_red_sandstone_slab", + Item::MossyStoneBrickSlab => "mossy_stone_brick_slab", + Item::PolishedDioriteSlab => "polished_diorite_slab", + Item::MossyCobblestoneSlab => "mossy_cobblestone_slab", + Item::EndStoneBrickSlab => "end_stone_brick_slab", + Item::SmoothSandstoneSlab => "smooth_sandstone_slab", + Item::SmoothQuartzSlab => "smooth_quartz_slab", + Item::GraniteSlab => "granite_slab", + Item::AndesiteSlab => "andesite_slab", + Item::RedNetherBrickSlab => "red_nether_brick_slab", + Item::PolishedAndesiteSlab => "polished_andesite_slab", + Item::DioriteSlab => "diorite_slab", + Item::Scaffolding => "scaffolding", + Item::IronDoor => "iron_door", + Item::OakDoor => "oak_door", + Item::SpruceDoor => "spruce_door", + Item::BirchDoor => "birch_door", + Item::JungleDoor => "jungle_door", + Item::AcaciaDoor => "acacia_door", + Item::DarkOakDoor => "dark_oak_door", + Item::CrimsonDoor => "crimson_door", + Item::WarpedDoor => "warped_door", + Item::Repeater => "repeater", + Item::Comparator => "comparator", + Item::StructureBlock => "structure_block", + Item::Jigsaw => "jigsaw", + Item::TurtleHelmet => "turtle_helmet", + Item::Scute => "scute", + Item::FlintAndSteel => "flint_and_steel", + Item::Apple => "apple", + Item::Bow => "bow", + Item::Arrow => "arrow", + Item::Coal => "coal", + Item::Charcoal => "charcoal", + Item::Diamond => "diamond", + Item::IronIngot => "iron_ingot", + Item::GoldIngot => "gold_ingot", + Item::NetheriteIngot => "netherite_ingot", + Item::NetheriteScrap => "netherite_scrap", + Item::WoodenSword => "wooden_sword", + Item::WoodenShovel => "wooden_shovel", + Item::WoodenPickaxe => "wooden_pickaxe", + Item::WoodenAxe => "wooden_axe", + Item::WoodenHoe => "wooden_hoe", + Item::StoneSword => "stone_sword", + Item::StoneShovel => "stone_shovel", + Item::StonePickaxe => "stone_pickaxe", + Item::StoneAxe => "stone_axe", + Item::StoneHoe => "stone_hoe", + Item::GoldenSword => "golden_sword", + Item::GoldenShovel => "golden_shovel", + Item::GoldenPickaxe => "golden_pickaxe", + Item::GoldenAxe => "golden_axe", + Item::GoldenHoe => "golden_hoe", + Item::IronSword => "iron_sword", + Item::IronShovel => "iron_shovel", + Item::IronPickaxe => "iron_pickaxe", + Item::IronAxe => "iron_axe", + Item::IronHoe => "iron_hoe", + Item::DiamondSword => "diamond_sword", + Item::DiamondShovel => "diamond_shovel", + Item::DiamondPickaxe => "diamond_pickaxe", + Item::DiamondAxe => "diamond_axe", + Item::DiamondHoe => "diamond_hoe", + Item::NetheriteSword => "netherite_sword", + Item::NetheriteShovel => "netherite_shovel", + Item::NetheritePickaxe => "netherite_pickaxe", + Item::NetheriteAxe => "netherite_axe", + Item::NetheriteHoe => "netherite_hoe", + Item::Stick => "stick", + Item::Bowl => "bowl", + Item::MushroomStew => "mushroom_stew", + Item::String => "string", + Item::Feather => "feather", + Item::Gunpowder => "gunpowder", + Item::WheatSeeds => "wheat_seeds", + Item::Wheat => "wheat", + Item::Bread => "bread", + Item::LeatherHelmet => "leather_helmet", + Item::LeatherChestplate => "leather_chestplate", + Item::LeatherLeggings => "leather_leggings", + Item::LeatherBoots => "leather_boots", + Item::ChainmailHelmet => "chainmail_helmet", + Item::ChainmailChestplate => "chainmail_chestplate", + Item::ChainmailLeggings => "chainmail_leggings", + Item::ChainmailBoots => "chainmail_boots", + Item::IronHelmet => "iron_helmet", + Item::IronChestplate => "iron_chestplate", + Item::IronLeggings => "iron_leggings", + Item::IronBoots => "iron_boots", + Item::DiamondHelmet => "diamond_helmet", + Item::DiamondChestplate => "diamond_chestplate", + Item::DiamondLeggings => "diamond_leggings", + Item::DiamondBoots => "diamond_boots", + Item::GoldenHelmet => "golden_helmet", + Item::GoldenChestplate => "golden_chestplate", + Item::GoldenLeggings => "golden_leggings", + Item::GoldenBoots => "golden_boots", + Item::NetheriteHelmet => "netherite_helmet", + Item::NetheriteChestplate => "netherite_chestplate", + Item::NetheriteLeggings => "netherite_leggings", + Item::NetheriteBoots => "netherite_boots", + Item::Flint => "flint", + Item::Porkchop => "porkchop", + Item::CookedPorkchop => "cooked_porkchop", + Item::Painting => "painting", + Item::GoldenApple => "golden_apple", + Item::EnchantedGoldenApple => "enchanted_golden_apple", + Item::OakSign => "oak_sign", + Item::SpruceSign => "spruce_sign", + Item::BirchSign => "birch_sign", + Item::JungleSign => "jungle_sign", + Item::AcaciaSign => "acacia_sign", + Item::DarkOakSign => "dark_oak_sign", + Item::CrimsonSign => "crimson_sign", + Item::WarpedSign => "warped_sign", + Item::Bucket => "bucket", + Item::WaterBucket => "water_bucket", + Item::LavaBucket => "lava_bucket", + Item::Minecart => "minecart", + Item::Saddle => "saddle", + Item::Redstone => "redstone", + Item::Snowball => "snowball", + Item::OakBoat => "oak_boat", + Item::Leather => "leather", + Item::MilkBucket => "milk_bucket", + Item::PufferfishBucket => "pufferfish_bucket", + Item::SalmonBucket => "salmon_bucket", + Item::CodBucket => "cod_bucket", + Item::TropicalFishBucket => "tropical_fish_bucket", + Item::Brick => "brick", + Item::ClayBall => "clay_ball", + Item::DriedKelpBlock => "dried_kelp_block", + Item::Paper => "paper", + Item::Book => "book", + Item::SlimeBall => "slime_ball", + Item::ChestMinecart => "chest_minecart", + Item::FurnaceMinecart => "furnace_minecart", + Item::Egg => "egg", + Item::Compass => "compass", + Item::FishingRod => "fishing_rod", + Item::Clock => "clock", + Item::GlowstoneDust => "glowstone_dust", + Item::Cod => "cod", + Item::Salmon => "salmon", + Item::TropicalFish => "tropical_fish", + Item::Pufferfish => "pufferfish", + Item::CookedCod => "cooked_cod", + Item::CookedSalmon => "cooked_salmon", + Item::InkSac => "ink_sac", + Item::CocoaBeans => "cocoa_beans", + Item::LapisLazuli => "lapis_lazuli", + Item::WhiteDye => "white_dye", + Item::OrangeDye => "orange_dye", + Item::MagentaDye => "magenta_dye", + Item::LightBlueDye => "light_blue_dye", + Item::YellowDye => "yellow_dye", + Item::LimeDye => "lime_dye", + Item::PinkDye => "pink_dye", + Item::GrayDye => "gray_dye", + Item::LightGrayDye => "light_gray_dye", + Item::CyanDye => "cyan_dye", + Item::PurpleDye => "purple_dye", + Item::BlueDye => "blue_dye", + Item::BrownDye => "brown_dye", + Item::GreenDye => "green_dye", + Item::RedDye => "red_dye", + Item::BlackDye => "black_dye", + Item::BoneMeal => "bone_meal", + Item::Bone => "bone", + Item::Sugar => "sugar", + Item::Cake => "cake", + Item::WhiteBed => "white_bed", + Item::OrangeBed => "orange_bed", + Item::MagentaBed => "magenta_bed", + Item::LightBlueBed => "light_blue_bed", + Item::YellowBed => "yellow_bed", + Item::LimeBed => "lime_bed", + Item::PinkBed => "pink_bed", + Item::GrayBed => "gray_bed", + Item::LightGrayBed => "light_gray_bed", + Item::CyanBed => "cyan_bed", + Item::PurpleBed => "purple_bed", + Item::BlueBed => "blue_bed", + Item::BrownBed => "brown_bed", + Item::GreenBed => "green_bed", + Item::RedBed => "red_bed", + Item::BlackBed => "black_bed", + Item::Cookie => "cookie", + Item::FilledMap => "filled_map", + Item::Shears => "shears", + Item::MelonSlice => "melon_slice", + Item::DriedKelp => "dried_kelp", + Item::PumpkinSeeds => "pumpkin_seeds", + Item::MelonSeeds => "melon_seeds", + Item::Beef => "beef", + Item::CookedBeef => "cooked_beef", + Item::Chicken => "chicken", + Item::CookedChicken => "cooked_chicken", + Item::RottenFlesh => "rotten_flesh", + Item::EnderPearl => "ender_pearl", + Item::BlazeRod => "blaze_rod", + Item::GhastTear => "ghast_tear", + Item::GoldNugget => "gold_nugget", + Item::NetherWart => "nether_wart", + Item::Potion => "potion", + Item::GlassBottle => "glass_bottle", + Item::SpiderEye => "spider_eye", + Item::FermentedSpiderEye => "fermented_spider_eye", + Item::BlazePowder => "blaze_powder", + Item::MagmaCream => "magma_cream", + Item::BrewingStand => "brewing_stand", + Item::Cauldron => "cauldron", + Item::EnderEye => "ender_eye", + Item::GlisteringMelonSlice => "glistering_melon_slice", + Item::BatSpawnEgg => "bat_spawn_egg", + Item::BeeSpawnEgg => "bee_spawn_egg", + Item::BlazeSpawnEgg => "blaze_spawn_egg", + Item::CatSpawnEgg => "cat_spawn_egg", + Item::CaveSpiderSpawnEgg => "cave_spider_spawn_egg", + Item::ChickenSpawnEgg => "chicken_spawn_egg", + Item::CodSpawnEgg => "cod_spawn_egg", + Item::CowSpawnEgg => "cow_spawn_egg", + Item::CreeperSpawnEgg => "creeper_spawn_egg", + Item::DolphinSpawnEgg => "dolphin_spawn_egg", + Item::DonkeySpawnEgg => "donkey_spawn_egg", + Item::DrownedSpawnEgg => "drowned_spawn_egg", + Item::ElderGuardianSpawnEgg => "elder_guardian_spawn_egg", + Item::EndermanSpawnEgg => "enderman_spawn_egg", + Item::EndermiteSpawnEgg => "endermite_spawn_egg", + Item::EvokerSpawnEgg => "evoker_spawn_egg", + Item::FoxSpawnEgg => "fox_spawn_egg", + Item::GhastSpawnEgg => "ghast_spawn_egg", + Item::GuardianSpawnEgg => "guardian_spawn_egg", + Item::HoglinSpawnEgg => "hoglin_spawn_egg", + Item::HorseSpawnEgg => "horse_spawn_egg", + Item::HuskSpawnEgg => "husk_spawn_egg", + Item::LlamaSpawnEgg => "llama_spawn_egg", + Item::MagmaCubeSpawnEgg => "magma_cube_spawn_egg", + Item::MooshroomSpawnEgg => "mooshroom_spawn_egg", + Item::MuleSpawnEgg => "mule_spawn_egg", + Item::OcelotSpawnEgg => "ocelot_spawn_egg", + Item::PandaSpawnEgg => "panda_spawn_egg", + Item::ParrotSpawnEgg => "parrot_spawn_egg", + Item::PhantomSpawnEgg => "phantom_spawn_egg", + Item::PigSpawnEgg => "pig_spawn_egg", + Item::PiglinSpawnEgg => "piglin_spawn_egg", + Item::PiglinBruteSpawnEgg => "piglin_brute_spawn_egg", + Item::PillagerSpawnEgg => "pillager_spawn_egg", + Item::PolarBearSpawnEgg => "polar_bear_spawn_egg", + Item::PufferfishSpawnEgg => "pufferfish_spawn_egg", + Item::RabbitSpawnEgg => "rabbit_spawn_egg", + Item::RavagerSpawnEgg => "ravager_spawn_egg", + Item::SalmonSpawnEgg => "salmon_spawn_egg", + Item::SheepSpawnEgg => "sheep_spawn_egg", + Item::ShulkerSpawnEgg => "shulker_spawn_egg", + Item::SilverfishSpawnEgg => "silverfish_spawn_egg", + Item::SkeletonSpawnEgg => "skeleton_spawn_egg", + Item::SkeletonHorseSpawnEgg => "skeleton_horse_spawn_egg", + Item::SlimeSpawnEgg => "slime_spawn_egg", + Item::SpiderSpawnEgg => "spider_spawn_egg", + Item::SquidSpawnEgg => "squid_spawn_egg", + Item::StraySpawnEgg => "stray_spawn_egg", + Item::StriderSpawnEgg => "strider_spawn_egg", + Item::TraderLlamaSpawnEgg => "trader_llama_spawn_egg", + Item::TropicalFishSpawnEgg => "tropical_fish_spawn_egg", + Item::TurtleSpawnEgg => "turtle_spawn_egg", + Item::VexSpawnEgg => "vex_spawn_egg", + Item::VillagerSpawnEgg => "villager_spawn_egg", + Item::VindicatorSpawnEgg => "vindicator_spawn_egg", + Item::WanderingTraderSpawnEgg => "wandering_trader_spawn_egg", + Item::WitchSpawnEgg => "witch_spawn_egg", + Item::WitherSkeletonSpawnEgg => "wither_skeleton_spawn_egg", + Item::WolfSpawnEgg => "wolf_spawn_egg", + Item::ZoglinSpawnEgg => "zoglin_spawn_egg", + Item::ZombieSpawnEgg => "zombie_spawn_egg", + Item::ZombieHorseSpawnEgg => "zombie_horse_spawn_egg", + Item::ZombieVillagerSpawnEgg => "zombie_villager_spawn_egg", + Item::ZombifiedPiglinSpawnEgg => "zombified_piglin_spawn_egg", + Item::ExperienceBottle => "experience_bottle", + Item::FireCharge => "fire_charge", + Item::WritableBook => "writable_book", + Item::WrittenBook => "written_book", + Item::Emerald => "emerald", + Item::ItemFrame => "item_frame", + Item::FlowerPot => "flower_pot", + Item::Carrot => "carrot", + Item::Potato => "potato", + Item::BakedPotato => "baked_potato", + Item::PoisonousPotato => "poisonous_potato", + Item::Map => "map", + Item::GoldenCarrot => "golden_carrot", + Item::SkeletonSkull => "skeleton_skull", + Item::WitherSkeletonSkull => "wither_skeleton_skull", + Item::PlayerHead => "player_head", + Item::ZombieHead => "zombie_head", + Item::CreeperHead => "creeper_head", + Item::DragonHead => "dragon_head", + Item::CarrotOnAStick => "carrot_on_a_stick", + Item::WarpedFungusOnAStick => "warped_fungus_on_a_stick", + Item::NetherStar => "nether_star", + Item::PumpkinPie => "pumpkin_pie", + Item::FireworkRocket => "firework_rocket", + Item::FireworkStar => "firework_star", + Item::EnchantedBook => "enchanted_book", + Item::NetherBrick => "nether_brick", + Item::Quartz => "quartz", + Item::TntMinecart => "tnt_minecart", + Item::HopperMinecart => "hopper_minecart", + Item::PrismarineShard => "prismarine_shard", + Item::PrismarineCrystals => "prismarine_crystals", + Item::Rabbit => "rabbit", + Item::CookedRabbit => "cooked_rabbit", + Item::RabbitStew => "rabbit_stew", + Item::RabbitFoot => "rabbit_foot", + Item::RabbitHide => "rabbit_hide", + Item::ArmorStand => "armor_stand", + Item::IronHorseArmor => "iron_horse_armor", + Item::GoldenHorseArmor => "golden_horse_armor", + Item::DiamondHorseArmor => "diamond_horse_armor", + Item::LeatherHorseArmor => "leather_horse_armor", + Item::Lead => "lead", + Item::NameTag => "name_tag", + Item::CommandBlockMinecart => "command_block_minecart", + Item::Mutton => "mutton", + Item::CookedMutton => "cooked_mutton", + Item::WhiteBanner => "white_banner", + Item::OrangeBanner => "orange_banner", + Item::MagentaBanner => "magenta_banner", + Item::LightBlueBanner => "light_blue_banner", + Item::YellowBanner => "yellow_banner", + Item::LimeBanner => "lime_banner", + Item::PinkBanner => "pink_banner", + Item::GrayBanner => "gray_banner", + Item::LightGrayBanner => "light_gray_banner", + Item::CyanBanner => "cyan_banner", + Item::PurpleBanner => "purple_banner", + Item::BlueBanner => "blue_banner", + Item::BrownBanner => "brown_banner", + Item::GreenBanner => "green_banner", + Item::RedBanner => "red_banner", + Item::BlackBanner => "black_banner", + Item::EndCrystal => "end_crystal", + Item::ChorusFruit => "chorus_fruit", + Item::PoppedChorusFruit => "popped_chorus_fruit", + Item::Beetroot => "beetroot", + Item::BeetrootSeeds => "beetroot_seeds", + Item::BeetrootSoup => "beetroot_soup", + Item::DragonBreath => "dragon_breath", + Item::SplashPotion => "splash_potion", + Item::SpectralArrow => "spectral_arrow", + Item::TippedArrow => "tipped_arrow", + Item::LingeringPotion => "lingering_potion", + Item::Shield => "shield", + Item::Elytra => "elytra", + Item::SpruceBoat => "spruce_boat", + Item::BirchBoat => "birch_boat", + Item::JungleBoat => "jungle_boat", + Item::AcaciaBoat => "acacia_boat", + Item::DarkOakBoat => "dark_oak_boat", + Item::TotemOfUndying => "totem_of_undying", + Item::ShulkerShell => "shulker_shell", + Item::IronNugget => "iron_nugget", + Item::KnowledgeBook => "knowledge_book", + Item::DebugStick => "debug_stick", + Item::MusicDisc13 => "music_disc_13", + Item::MusicDiscCat => "music_disc_cat", + Item::MusicDiscBlocks => "music_disc_blocks", + Item::MusicDiscChirp => "music_disc_chirp", + Item::MusicDiscFar => "music_disc_far", + Item::MusicDiscMall => "music_disc_mall", + Item::MusicDiscMellohi => "music_disc_mellohi", + Item::MusicDiscStal => "music_disc_stal", + Item::MusicDiscStrad => "music_disc_strad", + Item::MusicDiscWard => "music_disc_ward", + Item::MusicDisc11 => "music_disc_11", + Item::MusicDiscWait => "music_disc_wait", + Item::MusicDiscPigstep => "music_disc_pigstep", + Item::Trident => "trident", + Item::PhantomMembrane => "phantom_membrane", + Item::NautilusShell => "nautilus_shell", + Item::HeartOfTheSea => "heart_of_the_sea", + Item::Crossbow => "crossbow", + Item::SuspiciousStew => "suspicious_stew", + Item::Loom => "loom", + Item::FlowerBannerPattern => "flower_banner_pattern", + Item::CreeperBannerPattern => "creeper_banner_pattern", + Item::SkullBannerPattern => "skull_banner_pattern", + Item::MojangBannerPattern => "mojang_banner_pattern", + Item::GlobeBannerPattern => "globe_banner_pattern", + Item::PiglinBannerPattern => "piglin_banner_pattern", + Item::Composter => "composter", + Item::Barrel => "barrel", + Item::Smoker => "smoker", + Item::BlastFurnace => "blast_furnace", + Item::CartographyTable => "cartography_table", + Item::FletchingTable => "fletching_table", + Item::Grindstone => "grindstone", + Item::Lectern => "lectern", + Item::SmithingTable => "smithing_table", + Item::Stonecutter => "stonecutter", + Item::Bell => "bell", + Item::Lantern => "lantern", + Item::SoulLantern => "soul_lantern", + Item::SweetBerries => "sweet_berries", + Item::Campfire => "campfire", + Item::SoulCampfire => "soul_campfire", + Item::Shroomlight => "shroomlight", + Item::Honeycomb => "honeycomb", + Item::BeeNest => "bee_nest", + Item::Beehive => "beehive", + Item::HoneyBottle => "honey_bottle", + Item::HoneyBlock => "honey_block", + Item::HoneycombBlock => "honeycomb_block", + Item::Lodestone => "lodestone", + Item::NetheriteBlock => "netherite_block", + Item::AncientDebris => "ancient_debris", + Item::Target => "target", + Item::CryingObsidian => "crying_obsidian", + Item::Blackstone => "blackstone", + Item::BlackstoneSlab => "blackstone_slab", + Item::BlackstoneStairs => "blackstone_stairs", + Item::GildedBlackstone => "gilded_blackstone", + Item::PolishedBlackstone => "polished_blackstone", + Item::PolishedBlackstoneSlab => "polished_blackstone_slab", + Item::PolishedBlackstoneStairs => "polished_blackstone_stairs", + Item::ChiseledPolishedBlackstone => "chiseled_polished_blackstone", + Item::PolishedBlackstoneBricks => "polished_blackstone_bricks", + Item::PolishedBlackstoneBrickSlab => "polished_blackstone_brick_slab", + Item::PolishedBlackstoneBrickStairs => "polished_blackstone_brick_stairs", + Item::CrackedPolishedBlackstoneBricks => "cracked_polished_blackstone_bricks", + Item::RespawnAnchor => "respawn_anchor", + } + } + + /// Gets a `Item` by its `name`. + pub fn from_name(name: &str) -> Option { + match name { + "air" => Some(Item::Air), + "stone" => Some(Item::Stone), + "granite" => Some(Item::Granite), + "polished_granite" => Some(Item::PolishedGranite), + "diorite" => Some(Item::Diorite), + "polished_diorite" => Some(Item::PolishedDiorite), + "andesite" => Some(Item::Andesite), + "polished_andesite" => Some(Item::PolishedAndesite), + "grass_block" => Some(Item::GrassBlock), + "dirt" => Some(Item::Dirt), + "coarse_dirt" => Some(Item::CoarseDirt), + "podzol" => Some(Item::Podzol), + "crimson_nylium" => Some(Item::CrimsonNylium), + "warped_nylium" => Some(Item::WarpedNylium), + "cobblestone" => Some(Item::Cobblestone), + "oak_planks" => Some(Item::OakPlanks), + "spruce_planks" => Some(Item::SprucePlanks), + "birch_planks" => Some(Item::BirchPlanks), + "jungle_planks" => Some(Item::JunglePlanks), + "acacia_planks" => Some(Item::AcaciaPlanks), + "dark_oak_planks" => Some(Item::DarkOakPlanks), + "crimson_planks" => Some(Item::CrimsonPlanks), + "warped_planks" => Some(Item::WarpedPlanks), + "oak_sapling" => Some(Item::OakSapling), + "spruce_sapling" => Some(Item::SpruceSapling), + "birch_sapling" => Some(Item::BirchSapling), + "jungle_sapling" => Some(Item::JungleSapling), + "acacia_sapling" => Some(Item::AcaciaSapling), + "dark_oak_sapling" => Some(Item::DarkOakSapling), + "bedrock" => Some(Item::Bedrock), + "sand" => Some(Item::Sand), + "red_sand" => Some(Item::RedSand), + "gravel" => Some(Item::Gravel), + "gold_ore" => Some(Item::GoldOre), + "iron_ore" => Some(Item::IronOre), + "coal_ore" => Some(Item::CoalOre), + "nether_gold_ore" => Some(Item::NetherGoldOre), + "oak_log" => Some(Item::OakLog), + "spruce_log" => Some(Item::SpruceLog), + "birch_log" => Some(Item::BirchLog), + "jungle_log" => Some(Item::JungleLog), + "acacia_log" => Some(Item::AcaciaLog), + "dark_oak_log" => Some(Item::DarkOakLog), + "crimson_stem" => Some(Item::CrimsonStem), + "warped_stem" => Some(Item::WarpedStem), + "stripped_oak_log" => Some(Item::StrippedOakLog), + "stripped_spruce_log" => Some(Item::StrippedSpruceLog), + "stripped_birch_log" => Some(Item::StrippedBirchLog), + "stripped_jungle_log" => Some(Item::StrippedJungleLog), + "stripped_acacia_log" => Some(Item::StrippedAcaciaLog), + "stripped_dark_oak_log" => Some(Item::StrippedDarkOakLog), + "stripped_crimson_stem" => Some(Item::StrippedCrimsonStem), + "stripped_warped_stem" => Some(Item::StrippedWarpedStem), + "stripped_oak_wood" => Some(Item::StrippedOakWood), + "stripped_spruce_wood" => Some(Item::StrippedSpruceWood), + "stripped_birch_wood" => Some(Item::StrippedBirchWood), + "stripped_jungle_wood" => Some(Item::StrippedJungleWood), + "stripped_acacia_wood" => Some(Item::StrippedAcaciaWood), + "stripped_dark_oak_wood" => Some(Item::StrippedDarkOakWood), + "stripped_crimson_hyphae" => Some(Item::StrippedCrimsonHyphae), + "stripped_warped_hyphae" => Some(Item::StrippedWarpedHyphae), + "oak_wood" => Some(Item::OakWood), + "spruce_wood" => Some(Item::SpruceWood), + "birch_wood" => Some(Item::BirchWood), + "jungle_wood" => Some(Item::JungleWood), + "acacia_wood" => Some(Item::AcaciaWood), + "dark_oak_wood" => Some(Item::DarkOakWood), + "crimson_hyphae" => Some(Item::CrimsonHyphae), + "warped_hyphae" => Some(Item::WarpedHyphae), + "oak_leaves" => Some(Item::OakLeaves), + "spruce_leaves" => Some(Item::SpruceLeaves), + "birch_leaves" => Some(Item::BirchLeaves), + "jungle_leaves" => Some(Item::JungleLeaves), + "acacia_leaves" => Some(Item::AcaciaLeaves), + "dark_oak_leaves" => Some(Item::DarkOakLeaves), + "sponge" => Some(Item::Sponge), + "wet_sponge" => Some(Item::WetSponge), + "glass" => Some(Item::Glass), + "lapis_ore" => Some(Item::LapisOre), + "lapis_block" => Some(Item::LapisBlock), + "dispenser" => Some(Item::Dispenser), + "sandstone" => Some(Item::Sandstone), + "chiseled_sandstone" => Some(Item::ChiseledSandstone), + "cut_sandstone" => Some(Item::CutSandstone), + "note_block" => Some(Item::NoteBlock), + "powered_rail" => Some(Item::PoweredRail), + "detector_rail" => Some(Item::DetectorRail), + "sticky_piston" => Some(Item::StickyPiston), + "cobweb" => Some(Item::Cobweb), + "grass" => Some(Item::Grass), + "fern" => Some(Item::Fern), + "dead_bush" => Some(Item::DeadBush), + "seagrass" => Some(Item::Seagrass), + "sea_pickle" => Some(Item::SeaPickle), + "piston" => Some(Item::Piston), + "white_wool" => Some(Item::WhiteWool), + "orange_wool" => Some(Item::OrangeWool), + "magenta_wool" => Some(Item::MagentaWool), + "light_blue_wool" => Some(Item::LightBlueWool), + "yellow_wool" => Some(Item::YellowWool), + "lime_wool" => Some(Item::LimeWool), + "pink_wool" => Some(Item::PinkWool), + "gray_wool" => Some(Item::GrayWool), + "light_gray_wool" => Some(Item::LightGrayWool), + "cyan_wool" => Some(Item::CyanWool), + "purple_wool" => Some(Item::PurpleWool), + "blue_wool" => Some(Item::BlueWool), + "brown_wool" => Some(Item::BrownWool), + "green_wool" => Some(Item::GreenWool), + "red_wool" => Some(Item::RedWool), + "black_wool" => Some(Item::BlackWool), + "dandelion" => Some(Item::Dandelion), + "poppy" => Some(Item::Poppy), + "blue_orchid" => Some(Item::BlueOrchid), + "allium" => Some(Item::Allium), + "azure_bluet" => Some(Item::AzureBluet), + "red_tulip" => Some(Item::RedTulip), + "orange_tulip" => Some(Item::OrangeTulip), + "white_tulip" => Some(Item::WhiteTulip), + "pink_tulip" => Some(Item::PinkTulip), + "oxeye_daisy" => Some(Item::OxeyeDaisy), + "cornflower" => Some(Item::Cornflower), + "lily_of_the_valley" => Some(Item::LilyOfTheValley), + "wither_rose" => Some(Item::WitherRose), + "brown_mushroom" => Some(Item::BrownMushroom), + "red_mushroom" => Some(Item::RedMushroom), + "crimson_fungus" => Some(Item::CrimsonFungus), + "warped_fungus" => Some(Item::WarpedFungus), + "crimson_roots" => Some(Item::CrimsonRoots), + "warped_roots" => Some(Item::WarpedRoots), + "nether_sprouts" => Some(Item::NetherSprouts), + "weeping_vines" => Some(Item::WeepingVines), + "twisting_vines" => Some(Item::TwistingVines), + "sugar_cane" => Some(Item::SugarCane), + "kelp" => Some(Item::Kelp), + "bamboo" => Some(Item::Bamboo), + "gold_block" => Some(Item::GoldBlock), + "iron_block" => Some(Item::IronBlock), + "oak_slab" => Some(Item::OakSlab), + "spruce_slab" => Some(Item::SpruceSlab), + "birch_slab" => Some(Item::BirchSlab), + "jungle_slab" => Some(Item::JungleSlab), + "acacia_slab" => Some(Item::AcaciaSlab), + "dark_oak_slab" => Some(Item::DarkOakSlab), + "crimson_slab" => Some(Item::CrimsonSlab), + "warped_slab" => Some(Item::WarpedSlab), + "stone_slab" => Some(Item::StoneSlab), + "smooth_stone_slab" => Some(Item::SmoothStoneSlab), + "sandstone_slab" => Some(Item::SandstoneSlab), + "cut_sandstone_slab" => Some(Item::CutSandstoneSlab), + "petrified_oak_slab" => Some(Item::PetrifiedOakSlab), + "cobblestone_slab" => Some(Item::CobblestoneSlab), + "brick_slab" => Some(Item::BrickSlab), + "stone_brick_slab" => Some(Item::StoneBrickSlab), + "nether_brick_slab" => Some(Item::NetherBrickSlab), + "quartz_slab" => Some(Item::QuartzSlab), + "red_sandstone_slab" => Some(Item::RedSandstoneSlab), + "cut_red_sandstone_slab" => Some(Item::CutRedSandstoneSlab), + "purpur_slab" => Some(Item::PurpurSlab), + "prismarine_slab" => Some(Item::PrismarineSlab), + "prismarine_brick_slab" => Some(Item::PrismarineBrickSlab), + "dark_prismarine_slab" => Some(Item::DarkPrismarineSlab), + "smooth_quartz" => Some(Item::SmoothQuartz), + "smooth_red_sandstone" => Some(Item::SmoothRedSandstone), + "smooth_sandstone" => Some(Item::SmoothSandstone), + "smooth_stone" => Some(Item::SmoothStone), + "bricks" => Some(Item::Bricks), + "tnt" => Some(Item::Tnt), + "bookshelf" => Some(Item::Bookshelf), + "mossy_cobblestone" => Some(Item::MossyCobblestone), + "obsidian" => Some(Item::Obsidian), + "torch" => Some(Item::Torch), + "end_rod" => Some(Item::EndRod), + "chorus_plant" => Some(Item::ChorusPlant), + "chorus_flower" => Some(Item::ChorusFlower), + "purpur_block" => Some(Item::PurpurBlock), + "purpur_pillar" => Some(Item::PurpurPillar), + "purpur_stairs" => Some(Item::PurpurStairs), + "spawner" => Some(Item::Spawner), + "oak_stairs" => Some(Item::OakStairs), + "chest" => Some(Item::Chest), + "diamond_ore" => Some(Item::DiamondOre), + "diamond_block" => Some(Item::DiamondBlock), + "crafting_table" => Some(Item::CraftingTable), + "farmland" => Some(Item::Farmland), + "furnace" => Some(Item::Furnace), + "ladder" => Some(Item::Ladder), + "rail" => Some(Item::Rail), + "cobblestone_stairs" => Some(Item::CobblestoneStairs), + "lever" => Some(Item::Lever), + "stone_pressure_plate" => Some(Item::StonePressurePlate), + "oak_pressure_plate" => Some(Item::OakPressurePlate), + "spruce_pressure_plate" => Some(Item::SprucePressurePlate), + "birch_pressure_plate" => Some(Item::BirchPressurePlate), + "jungle_pressure_plate" => Some(Item::JunglePressurePlate), + "acacia_pressure_plate" => Some(Item::AcaciaPressurePlate), + "dark_oak_pressure_plate" => Some(Item::DarkOakPressurePlate), + "crimson_pressure_plate" => Some(Item::CrimsonPressurePlate), + "warped_pressure_plate" => Some(Item::WarpedPressurePlate), + "polished_blackstone_pressure_plate" => Some(Item::PolishedBlackstonePressurePlate), + "redstone_ore" => Some(Item::RedstoneOre), + "redstone_torch" => Some(Item::RedstoneTorch), + "snow" => Some(Item::Snow), + "ice" => Some(Item::Ice), + "snow_block" => Some(Item::SnowBlock), + "cactus" => Some(Item::Cactus), + "clay" => Some(Item::Clay), + "jukebox" => Some(Item::Jukebox), + "oak_fence" => Some(Item::OakFence), + "spruce_fence" => Some(Item::SpruceFence), + "birch_fence" => Some(Item::BirchFence), + "jungle_fence" => Some(Item::JungleFence), + "acacia_fence" => Some(Item::AcaciaFence), + "dark_oak_fence" => Some(Item::DarkOakFence), + "crimson_fence" => Some(Item::CrimsonFence), + "warped_fence" => Some(Item::WarpedFence), + "pumpkin" => Some(Item::Pumpkin), + "carved_pumpkin" => Some(Item::CarvedPumpkin), + "netherrack" => Some(Item::Netherrack), + "soul_sand" => Some(Item::SoulSand), + "soul_soil" => Some(Item::SoulSoil), + "basalt" => Some(Item::Basalt), + "polished_basalt" => Some(Item::PolishedBasalt), + "soul_torch" => Some(Item::SoulTorch), + "glowstone" => Some(Item::Glowstone), + "jack_o_lantern" => Some(Item::JackOLantern), + "oak_trapdoor" => Some(Item::OakTrapdoor), + "spruce_trapdoor" => Some(Item::SpruceTrapdoor), + "birch_trapdoor" => Some(Item::BirchTrapdoor), + "jungle_trapdoor" => Some(Item::JungleTrapdoor), + "acacia_trapdoor" => Some(Item::AcaciaTrapdoor), + "dark_oak_trapdoor" => Some(Item::DarkOakTrapdoor), + "crimson_trapdoor" => Some(Item::CrimsonTrapdoor), + "warped_trapdoor" => Some(Item::WarpedTrapdoor), + "infested_stone" => Some(Item::InfestedStone), + "infested_cobblestone" => Some(Item::InfestedCobblestone), + "infested_stone_bricks" => Some(Item::InfestedStoneBricks), + "infested_mossy_stone_bricks" => Some(Item::InfestedMossyStoneBricks), + "infested_cracked_stone_bricks" => Some(Item::InfestedCrackedStoneBricks), + "infested_chiseled_stone_bricks" => Some(Item::InfestedChiseledStoneBricks), + "stone_bricks" => Some(Item::StoneBricks), + "mossy_stone_bricks" => Some(Item::MossyStoneBricks), + "cracked_stone_bricks" => Some(Item::CrackedStoneBricks), + "chiseled_stone_bricks" => Some(Item::ChiseledStoneBricks), + "brown_mushroom_block" => Some(Item::BrownMushroomBlock), + "red_mushroom_block" => Some(Item::RedMushroomBlock), + "mushroom_stem" => Some(Item::MushroomStem), + "iron_bars" => Some(Item::IronBars), + "chain" => Some(Item::Chain), + "glass_pane" => Some(Item::GlassPane), + "melon" => Some(Item::Melon), + "vine" => Some(Item::Vine), + "oak_fence_gate" => Some(Item::OakFenceGate), + "spruce_fence_gate" => Some(Item::SpruceFenceGate), + "birch_fence_gate" => Some(Item::BirchFenceGate), + "jungle_fence_gate" => Some(Item::JungleFenceGate), + "acacia_fence_gate" => Some(Item::AcaciaFenceGate), + "dark_oak_fence_gate" => Some(Item::DarkOakFenceGate), + "crimson_fence_gate" => Some(Item::CrimsonFenceGate), + "warped_fence_gate" => Some(Item::WarpedFenceGate), + "brick_stairs" => Some(Item::BrickStairs), + "stone_brick_stairs" => Some(Item::StoneBrickStairs), + "mycelium" => Some(Item::Mycelium), + "lily_pad" => Some(Item::LilyPad), + "nether_bricks" => Some(Item::NetherBricks), + "cracked_nether_bricks" => Some(Item::CrackedNetherBricks), + "chiseled_nether_bricks" => Some(Item::ChiseledNetherBricks), + "nether_brick_fence" => Some(Item::NetherBrickFence), + "nether_brick_stairs" => Some(Item::NetherBrickStairs), + "enchanting_table" => Some(Item::EnchantingTable), + "end_portal_frame" => Some(Item::EndPortalFrame), + "end_stone" => Some(Item::EndStone), + "end_stone_bricks" => Some(Item::EndStoneBricks), + "dragon_egg" => Some(Item::DragonEgg), + "redstone_lamp" => Some(Item::RedstoneLamp), + "sandstone_stairs" => Some(Item::SandstoneStairs), + "emerald_ore" => Some(Item::EmeraldOre), + "ender_chest" => Some(Item::EnderChest), + "tripwire_hook" => Some(Item::TripwireHook), + "emerald_block" => Some(Item::EmeraldBlock), + "spruce_stairs" => Some(Item::SpruceStairs), + "birch_stairs" => Some(Item::BirchStairs), + "jungle_stairs" => Some(Item::JungleStairs), + "crimson_stairs" => Some(Item::CrimsonStairs), + "warped_stairs" => Some(Item::WarpedStairs), + "command_block" => Some(Item::CommandBlock), + "beacon" => Some(Item::Beacon), + "cobblestone_wall" => Some(Item::CobblestoneWall), + "mossy_cobblestone_wall" => Some(Item::MossyCobblestoneWall), + "brick_wall" => Some(Item::BrickWall), + "prismarine_wall" => Some(Item::PrismarineWall), + "red_sandstone_wall" => Some(Item::RedSandstoneWall), + "mossy_stone_brick_wall" => Some(Item::MossyStoneBrickWall), + "granite_wall" => Some(Item::GraniteWall), + "stone_brick_wall" => Some(Item::StoneBrickWall), + "nether_brick_wall" => Some(Item::NetherBrickWall), + "andesite_wall" => Some(Item::AndesiteWall), + "red_nether_brick_wall" => Some(Item::RedNetherBrickWall), + "sandstone_wall" => Some(Item::SandstoneWall), + "end_stone_brick_wall" => Some(Item::EndStoneBrickWall), + "diorite_wall" => Some(Item::DioriteWall), + "blackstone_wall" => Some(Item::BlackstoneWall), + "polished_blackstone_wall" => Some(Item::PolishedBlackstoneWall), + "polished_blackstone_brick_wall" => Some(Item::PolishedBlackstoneBrickWall), + "stone_button" => Some(Item::StoneButton), + "oak_button" => Some(Item::OakButton), + "spruce_button" => Some(Item::SpruceButton), + "birch_button" => Some(Item::BirchButton), + "jungle_button" => Some(Item::JungleButton), + "acacia_button" => Some(Item::AcaciaButton), + "dark_oak_button" => Some(Item::DarkOakButton), + "crimson_button" => Some(Item::CrimsonButton), + "warped_button" => Some(Item::WarpedButton), + "polished_blackstone_button" => Some(Item::PolishedBlackstoneButton), + "anvil" => Some(Item::Anvil), + "chipped_anvil" => Some(Item::ChippedAnvil), + "damaged_anvil" => Some(Item::DamagedAnvil), + "trapped_chest" => Some(Item::TrappedChest), + "light_weighted_pressure_plate" => Some(Item::LightWeightedPressurePlate), + "heavy_weighted_pressure_plate" => Some(Item::HeavyWeightedPressurePlate), + "daylight_detector" => Some(Item::DaylightDetector), + "redstone_block" => Some(Item::RedstoneBlock), + "nether_quartz_ore" => Some(Item::NetherQuartzOre), + "hopper" => Some(Item::Hopper), + "chiseled_quartz_block" => Some(Item::ChiseledQuartzBlock), + "quartz_block" => Some(Item::QuartzBlock), + "quartz_bricks" => Some(Item::QuartzBricks), + "quartz_pillar" => Some(Item::QuartzPillar), + "quartz_stairs" => Some(Item::QuartzStairs), + "activator_rail" => Some(Item::ActivatorRail), + "dropper" => Some(Item::Dropper), + "white_terracotta" => Some(Item::WhiteTerracotta), + "orange_terracotta" => Some(Item::OrangeTerracotta), + "magenta_terracotta" => Some(Item::MagentaTerracotta), + "light_blue_terracotta" => Some(Item::LightBlueTerracotta), + "yellow_terracotta" => Some(Item::YellowTerracotta), + "lime_terracotta" => Some(Item::LimeTerracotta), + "pink_terracotta" => Some(Item::PinkTerracotta), + "gray_terracotta" => Some(Item::GrayTerracotta), + "light_gray_terracotta" => Some(Item::LightGrayTerracotta), + "cyan_terracotta" => Some(Item::CyanTerracotta), + "purple_terracotta" => Some(Item::PurpleTerracotta), + "blue_terracotta" => Some(Item::BlueTerracotta), + "brown_terracotta" => Some(Item::BrownTerracotta), + "green_terracotta" => Some(Item::GreenTerracotta), + "red_terracotta" => Some(Item::RedTerracotta), + "black_terracotta" => Some(Item::BlackTerracotta), + "barrier" => Some(Item::Barrier), + "iron_trapdoor" => Some(Item::IronTrapdoor), + "hay_block" => Some(Item::HayBlock), + "white_carpet" => Some(Item::WhiteCarpet), + "orange_carpet" => Some(Item::OrangeCarpet), + "magenta_carpet" => Some(Item::MagentaCarpet), + "light_blue_carpet" => Some(Item::LightBlueCarpet), + "yellow_carpet" => Some(Item::YellowCarpet), + "lime_carpet" => Some(Item::LimeCarpet), + "pink_carpet" => Some(Item::PinkCarpet), + "gray_carpet" => Some(Item::GrayCarpet), + "light_gray_carpet" => Some(Item::LightGrayCarpet), + "cyan_carpet" => Some(Item::CyanCarpet), + "purple_carpet" => Some(Item::PurpleCarpet), + "blue_carpet" => Some(Item::BlueCarpet), + "brown_carpet" => Some(Item::BrownCarpet), + "green_carpet" => Some(Item::GreenCarpet), + "red_carpet" => Some(Item::RedCarpet), + "black_carpet" => Some(Item::BlackCarpet), + "terracotta" => Some(Item::Terracotta), + "coal_block" => Some(Item::CoalBlock), + "packed_ice" => Some(Item::PackedIce), + "acacia_stairs" => Some(Item::AcaciaStairs), + "dark_oak_stairs" => Some(Item::DarkOakStairs), + "slime_block" => Some(Item::SlimeBlock), + "grass_path" => Some(Item::GrassPath), + "sunflower" => Some(Item::Sunflower), + "lilac" => Some(Item::Lilac), + "rose_bush" => Some(Item::RoseBush), + "peony" => Some(Item::Peony), + "tall_grass" => Some(Item::TallGrass), + "large_fern" => Some(Item::LargeFern), + "white_stained_glass" => Some(Item::WhiteStainedGlass), + "orange_stained_glass" => Some(Item::OrangeStainedGlass), + "magenta_stained_glass" => Some(Item::MagentaStainedGlass), + "light_blue_stained_glass" => Some(Item::LightBlueStainedGlass), + "yellow_stained_glass" => Some(Item::YellowStainedGlass), + "lime_stained_glass" => Some(Item::LimeStainedGlass), + "pink_stained_glass" => Some(Item::PinkStainedGlass), + "gray_stained_glass" => Some(Item::GrayStainedGlass), + "light_gray_stained_glass" => Some(Item::LightGrayStainedGlass), + "cyan_stained_glass" => Some(Item::CyanStainedGlass), + "purple_stained_glass" => Some(Item::PurpleStainedGlass), + "blue_stained_glass" => Some(Item::BlueStainedGlass), + "brown_stained_glass" => Some(Item::BrownStainedGlass), + "green_stained_glass" => Some(Item::GreenStainedGlass), + "red_stained_glass" => Some(Item::RedStainedGlass), + "black_stained_glass" => Some(Item::BlackStainedGlass), + "white_stained_glass_pane" => Some(Item::WhiteStainedGlassPane), + "orange_stained_glass_pane" => Some(Item::OrangeStainedGlassPane), + "magenta_stained_glass_pane" => Some(Item::MagentaStainedGlassPane), + "light_blue_stained_glass_pane" => Some(Item::LightBlueStainedGlassPane), + "yellow_stained_glass_pane" => Some(Item::YellowStainedGlassPane), + "lime_stained_glass_pane" => Some(Item::LimeStainedGlassPane), + "pink_stained_glass_pane" => Some(Item::PinkStainedGlassPane), + "gray_stained_glass_pane" => Some(Item::GrayStainedGlassPane), + "light_gray_stained_glass_pane" => Some(Item::LightGrayStainedGlassPane), + "cyan_stained_glass_pane" => Some(Item::CyanStainedGlassPane), + "purple_stained_glass_pane" => Some(Item::PurpleStainedGlassPane), + "blue_stained_glass_pane" => Some(Item::BlueStainedGlassPane), + "brown_stained_glass_pane" => Some(Item::BrownStainedGlassPane), + "green_stained_glass_pane" => Some(Item::GreenStainedGlassPane), + "red_stained_glass_pane" => Some(Item::RedStainedGlassPane), + "black_stained_glass_pane" => Some(Item::BlackStainedGlassPane), + "prismarine" => Some(Item::Prismarine), + "prismarine_bricks" => Some(Item::PrismarineBricks), + "dark_prismarine" => Some(Item::DarkPrismarine), + "prismarine_stairs" => Some(Item::PrismarineStairs), + "prismarine_brick_stairs" => Some(Item::PrismarineBrickStairs), + "dark_prismarine_stairs" => Some(Item::DarkPrismarineStairs), + "sea_lantern" => Some(Item::SeaLantern), + "red_sandstone" => Some(Item::RedSandstone), + "chiseled_red_sandstone" => Some(Item::ChiseledRedSandstone), + "cut_red_sandstone" => Some(Item::CutRedSandstone), + "red_sandstone_stairs" => Some(Item::RedSandstoneStairs), + "repeating_command_block" => Some(Item::RepeatingCommandBlock), + "chain_command_block" => Some(Item::ChainCommandBlock), + "magma_block" => Some(Item::MagmaBlock), + "nether_wart_block" => Some(Item::NetherWartBlock), + "warped_wart_block" => Some(Item::WarpedWartBlock), + "red_nether_bricks" => Some(Item::RedNetherBricks), + "bone_block" => Some(Item::BoneBlock), + "structure_void" => Some(Item::StructureVoid), + "observer" => Some(Item::Observer), + "shulker_box" => Some(Item::ShulkerBox), + "white_shulker_box" => Some(Item::WhiteShulkerBox), + "orange_shulker_box" => Some(Item::OrangeShulkerBox), + "magenta_shulker_box" => Some(Item::MagentaShulkerBox), + "light_blue_shulker_box" => Some(Item::LightBlueShulkerBox), + "yellow_shulker_box" => Some(Item::YellowShulkerBox), + "lime_shulker_box" => Some(Item::LimeShulkerBox), + "pink_shulker_box" => Some(Item::PinkShulkerBox), + "gray_shulker_box" => Some(Item::GrayShulkerBox), + "light_gray_shulker_box" => Some(Item::LightGrayShulkerBox), + "cyan_shulker_box" => Some(Item::CyanShulkerBox), + "purple_shulker_box" => Some(Item::PurpleShulkerBox), + "blue_shulker_box" => Some(Item::BlueShulkerBox), + "brown_shulker_box" => Some(Item::BrownShulkerBox), + "green_shulker_box" => Some(Item::GreenShulkerBox), + "red_shulker_box" => Some(Item::RedShulkerBox), + "black_shulker_box" => Some(Item::BlackShulkerBox), + "white_glazed_terracotta" => Some(Item::WhiteGlazedTerracotta), + "orange_glazed_terracotta" => Some(Item::OrangeGlazedTerracotta), + "magenta_glazed_terracotta" => Some(Item::MagentaGlazedTerracotta), + "light_blue_glazed_terracotta" => Some(Item::LightBlueGlazedTerracotta), + "yellow_glazed_terracotta" => Some(Item::YellowGlazedTerracotta), + "lime_glazed_terracotta" => Some(Item::LimeGlazedTerracotta), + "pink_glazed_terracotta" => Some(Item::PinkGlazedTerracotta), + "gray_glazed_terracotta" => Some(Item::GrayGlazedTerracotta), + "light_gray_glazed_terracotta" => Some(Item::LightGrayGlazedTerracotta), + "cyan_glazed_terracotta" => Some(Item::CyanGlazedTerracotta), + "purple_glazed_terracotta" => Some(Item::PurpleGlazedTerracotta), + "blue_glazed_terracotta" => Some(Item::BlueGlazedTerracotta), + "brown_glazed_terracotta" => Some(Item::BrownGlazedTerracotta), + "green_glazed_terracotta" => Some(Item::GreenGlazedTerracotta), + "red_glazed_terracotta" => Some(Item::RedGlazedTerracotta), + "black_glazed_terracotta" => Some(Item::BlackGlazedTerracotta), + "white_concrete" => Some(Item::WhiteConcrete), + "orange_concrete" => Some(Item::OrangeConcrete), + "magenta_concrete" => Some(Item::MagentaConcrete), + "light_blue_concrete" => Some(Item::LightBlueConcrete), + "yellow_concrete" => Some(Item::YellowConcrete), + "lime_concrete" => Some(Item::LimeConcrete), + "pink_concrete" => Some(Item::PinkConcrete), + "gray_concrete" => Some(Item::GrayConcrete), + "light_gray_concrete" => Some(Item::LightGrayConcrete), + "cyan_concrete" => Some(Item::CyanConcrete), + "purple_concrete" => Some(Item::PurpleConcrete), + "blue_concrete" => Some(Item::BlueConcrete), + "brown_concrete" => Some(Item::BrownConcrete), + "green_concrete" => Some(Item::GreenConcrete), + "red_concrete" => Some(Item::RedConcrete), + "black_concrete" => Some(Item::BlackConcrete), + "white_concrete_powder" => Some(Item::WhiteConcretePowder), + "orange_concrete_powder" => Some(Item::OrangeConcretePowder), + "magenta_concrete_powder" => Some(Item::MagentaConcretePowder), + "light_blue_concrete_powder" => Some(Item::LightBlueConcretePowder), + "yellow_concrete_powder" => Some(Item::YellowConcretePowder), + "lime_concrete_powder" => Some(Item::LimeConcretePowder), + "pink_concrete_powder" => Some(Item::PinkConcretePowder), + "gray_concrete_powder" => Some(Item::GrayConcretePowder), + "light_gray_concrete_powder" => Some(Item::LightGrayConcretePowder), + "cyan_concrete_powder" => Some(Item::CyanConcretePowder), + "purple_concrete_powder" => Some(Item::PurpleConcretePowder), + "blue_concrete_powder" => Some(Item::BlueConcretePowder), + "brown_concrete_powder" => Some(Item::BrownConcretePowder), + "green_concrete_powder" => Some(Item::GreenConcretePowder), + "red_concrete_powder" => Some(Item::RedConcretePowder), + "black_concrete_powder" => Some(Item::BlackConcretePowder), + "turtle_egg" => Some(Item::TurtleEgg), + "dead_tube_coral_block" => Some(Item::DeadTubeCoralBlock), + "dead_brain_coral_block" => Some(Item::DeadBrainCoralBlock), + "dead_bubble_coral_block" => Some(Item::DeadBubbleCoralBlock), + "dead_fire_coral_block" => Some(Item::DeadFireCoralBlock), + "dead_horn_coral_block" => Some(Item::DeadHornCoralBlock), + "tube_coral_block" => Some(Item::TubeCoralBlock), + "brain_coral_block" => Some(Item::BrainCoralBlock), + "bubble_coral_block" => Some(Item::BubbleCoralBlock), + "fire_coral_block" => Some(Item::FireCoralBlock), + "horn_coral_block" => Some(Item::HornCoralBlock), + "tube_coral" => Some(Item::TubeCoral), + "brain_coral" => Some(Item::BrainCoral), + "bubble_coral" => Some(Item::BubbleCoral), + "fire_coral" => Some(Item::FireCoral), + "horn_coral" => Some(Item::HornCoral), + "dead_brain_coral" => Some(Item::DeadBrainCoral), + "dead_bubble_coral" => Some(Item::DeadBubbleCoral), + "dead_fire_coral" => Some(Item::DeadFireCoral), + "dead_horn_coral" => Some(Item::DeadHornCoral), + "dead_tube_coral" => Some(Item::DeadTubeCoral), + "tube_coral_fan" => Some(Item::TubeCoralFan), + "brain_coral_fan" => Some(Item::BrainCoralFan), + "bubble_coral_fan" => Some(Item::BubbleCoralFan), + "fire_coral_fan" => Some(Item::FireCoralFan), + "horn_coral_fan" => Some(Item::HornCoralFan), + "dead_tube_coral_fan" => Some(Item::DeadTubeCoralFan), + "dead_brain_coral_fan" => Some(Item::DeadBrainCoralFan), + "dead_bubble_coral_fan" => Some(Item::DeadBubbleCoralFan), + "dead_fire_coral_fan" => Some(Item::DeadFireCoralFan), + "dead_horn_coral_fan" => Some(Item::DeadHornCoralFan), + "blue_ice" => Some(Item::BlueIce), + "conduit" => Some(Item::Conduit), + "polished_granite_stairs" => Some(Item::PolishedGraniteStairs), + "smooth_red_sandstone_stairs" => Some(Item::SmoothRedSandstoneStairs), + "mossy_stone_brick_stairs" => Some(Item::MossyStoneBrickStairs), + "polished_diorite_stairs" => Some(Item::PolishedDioriteStairs), + "mossy_cobblestone_stairs" => Some(Item::MossyCobblestoneStairs), + "end_stone_brick_stairs" => Some(Item::EndStoneBrickStairs), + "stone_stairs" => Some(Item::StoneStairs), + "smooth_sandstone_stairs" => Some(Item::SmoothSandstoneStairs), + "smooth_quartz_stairs" => Some(Item::SmoothQuartzStairs), + "granite_stairs" => Some(Item::GraniteStairs), + "andesite_stairs" => Some(Item::AndesiteStairs), + "red_nether_brick_stairs" => Some(Item::RedNetherBrickStairs), + "polished_andesite_stairs" => Some(Item::PolishedAndesiteStairs), + "diorite_stairs" => Some(Item::DioriteStairs), + "polished_granite_slab" => Some(Item::PolishedGraniteSlab), + "smooth_red_sandstone_slab" => Some(Item::SmoothRedSandstoneSlab), + "mossy_stone_brick_slab" => Some(Item::MossyStoneBrickSlab), + "polished_diorite_slab" => Some(Item::PolishedDioriteSlab), + "mossy_cobblestone_slab" => Some(Item::MossyCobblestoneSlab), + "end_stone_brick_slab" => Some(Item::EndStoneBrickSlab), + "smooth_sandstone_slab" => Some(Item::SmoothSandstoneSlab), + "smooth_quartz_slab" => Some(Item::SmoothQuartzSlab), + "granite_slab" => Some(Item::GraniteSlab), + "andesite_slab" => Some(Item::AndesiteSlab), + "red_nether_brick_slab" => Some(Item::RedNetherBrickSlab), + "polished_andesite_slab" => Some(Item::PolishedAndesiteSlab), + "diorite_slab" => Some(Item::DioriteSlab), + "scaffolding" => Some(Item::Scaffolding), + "iron_door" => Some(Item::IronDoor), + "oak_door" => Some(Item::OakDoor), + "spruce_door" => Some(Item::SpruceDoor), + "birch_door" => Some(Item::BirchDoor), + "jungle_door" => Some(Item::JungleDoor), + "acacia_door" => Some(Item::AcaciaDoor), + "dark_oak_door" => Some(Item::DarkOakDoor), + "crimson_door" => Some(Item::CrimsonDoor), + "warped_door" => Some(Item::WarpedDoor), + "repeater" => Some(Item::Repeater), + "comparator" => Some(Item::Comparator), + "structure_block" => Some(Item::StructureBlock), + "jigsaw" => Some(Item::Jigsaw), + "turtle_helmet" => Some(Item::TurtleHelmet), + "scute" => Some(Item::Scute), + "flint_and_steel" => Some(Item::FlintAndSteel), + "apple" => Some(Item::Apple), + "bow" => Some(Item::Bow), + "arrow" => Some(Item::Arrow), + "coal" => Some(Item::Coal), + "charcoal" => Some(Item::Charcoal), + "diamond" => Some(Item::Diamond), + "iron_ingot" => Some(Item::IronIngot), + "gold_ingot" => Some(Item::GoldIngot), + "netherite_ingot" => Some(Item::NetheriteIngot), + "netherite_scrap" => Some(Item::NetheriteScrap), + "wooden_sword" => Some(Item::WoodenSword), + "wooden_shovel" => Some(Item::WoodenShovel), + "wooden_pickaxe" => Some(Item::WoodenPickaxe), + "wooden_axe" => Some(Item::WoodenAxe), + "wooden_hoe" => Some(Item::WoodenHoe), + "stone_sword" => Some(Item::StoneSword), + "stone_shovel" => Some(Item::StoneShovel), + "stone_pickaxe" => Some(Item::StonePickaxe), + "stone_axe" => Some(Item::StoneAxe), + "stone_hoe" => Some(Item::StoneHoe), + "golden_sword" => Some(Item::GoldenSword), + "golden_shovel" => Some(Item::GoldenShovel), + "golden_pickaxe" => Some(Item::GoldenPickaxe), + "golden_axe" => Some(Item::GoldenAxe), + "golden_hoe" => Some(Item::GoldenHoe), + "iron_sword" => Some(Item::IronSword), + "iron_shovel" => Some(Item::IronShovel), + "iron_pickaxe" => Some(Item::IronPickaxe), + "iron_axe" => Some(Item::IronAxe), + "iron_hoe" => Some(Item::IronHoe), + "diamond_sword" => Some(Item::DiamondSword), + "diamond_shovel" => Some(Item::DiamondShovel), + "diamond_pickaxe" => Some(Item::DiamondPickaxe), + "diamond_axe" => Some(Item::DiamondAxe), + "diamond_hoe" => Some(Item::DiamondHoe), + "netherite_sword" => Some(Item::NetheriteSword), + "netherite_shovel" => Some(Item::NetheriteShovel), + "netherite_pickaxe" => Some(Item::NetheritePickaxe), + "netherite_axe" => Some(Item::NetheriteAxe), + "netherite_hoe" => Some(Item::NetheriteHoe), + "stick" => Some(Item::Stick), + "bowl" => Some(Item::Bowl), + "mushroom_stew" => Some(Item::MushroomStew), + "string" => Some(Item::String), + "feather" => Some(Item::Feather), + "gunpowder" => Some(Item::Gunpowder), + "wheat_seeds" => Some(Item::WheatSeeds), + "wheat" => Some(Item::Wheat), + "bread" => Some(Item::Bread), + "leather_helmet" => Some(Item::LeatherHelmet), + "leather_chestplate" => Some(Item::LeatherChestplate), + "leather_leggings" => Some(Item::LeatherLeggings), + "leather_boots" => Some(Item::LeatherBoots), + "chainmail_helmet" => Some(Item::ChainmailHelmet), + "chainmail_chestplate" => Some(Item::ChainmailChestplate), + "chainmail_leggings" => Some(Item::ChainmailLeggings), + "chainmail_boots" => Some(Item::ChainmailBoots), + "iron_helmet" => Some(Item::IronHelmet), + "iron_chestplate" => Some(Item::IronChestplate), + "iron_leggings" => Some(Item::IronLeggings), + "iron_boots" => Some(Item::IronBoots), + "diamond_helmet" => Some(Item::DiamondHelmet), + "diamond_chestplate" => Some(Item::DiamondChestplate), + "diamond_leggings" => Some(Item::DiamondLeggings), + "diamond_boots" => Some(Item::DiamondBoots), + "golden_helmet" => Some(Item::GoldenHelmet), + "golden_chestplate" => Some(Item::GoldenChestplate), + "golden_leggings" => Some(Item::GoldenLeggings), + "golden_boots" => Some(Item::GoldenBoots), + "netherite_helmet" => Some(Item::NetheriteHelmet), + "netherite_chestplate" => Some(Item::NetheriteChestplate), + "netherite_leggings" => Some(Item::NetheriteLeggings), + "netherite_boots" => Some(Item::NetheriteBoots), + "flint" => Some(Item::Flint), + "porkchop" => Some(Item::Porkchop), + "cooked_porkchop" => Some(Item::CookedPorkchop), + "painting" => Some(Item::Painting), + "golden_apple" => Some(Item::GoldenApple), + "enchanted_golden_apple" => Some(Item::EnchantedGoldenApple), + "oak_sign" => Some(Item::OakSign), + "spruce_sign" => Some(Item::SpruceSign), + "birch_sign" => Some(Item::BirchSign), + "jungle_sign" => Some(Item::JungleSign), + "acacia_sign" => Some(Item::AcaciaSign), + "dark_oak_sign" => Some(Item::DarkOakSign), + "crimson_sign" => Some(Item::CrimsonSign), + "warped_sign" => Some(Item::WarpedSign), + "bucket" => Some(Item::Bucket), + "water_bucket" => Some(Item::WaterBucket), + "lava_bucket" => Some(Item::LavaBucket), + "minecart" => Some(Item::Minecart), + "saddle" => Some(Item::Saddle), + "redstone" => Some(Item::Redstone), + "snowball" => Some(Item::Snowball), + "oak_boat" => Some(Item::OakBoat), + "leather" => Some(Item::Leather), + "milk_bucket" => Some(Item::MilkBucket), + "pufferfish_bucket" => Some(Item::PufferfishBucket), + "salmon_bucket" => Some(Item::SalmonBucket), + "cod_bucket" => Some(Item::CodBucket), + "tropical_fish_bucket" => Some(Item::TropicalFishBucket), + "brick" => Some(Item::Brick), + "clay_ball" => Some(Item::ClayBall), + "dried_kelp_block" => Some(Item::DriedKelpBlock), + "paper" => Some(Item::Paper), + "book" => Some(Item::Book), + "slime_ball" => Some(Item::SlimeBall), + "chest_minecart" => Some(Item::ChestMinecart), + "furnace_minecart" => Some(Item::FurnaceMinecart), + "egg" => Some(Item::Egg), + "compass" => Some(Item::Compass), + "fishing_rod" => Some(Item::FishingRod), + "clock" => Some(Item::Clock), + "glowstone_dust" => Some(Item::GlowstoneDust), + "cod" => Some(Item::Cod), + "salmon" => Some(Item::Salmon), + "tropical_fish" => Some(Item::TropicalFish), + "pufferfish" => Some(Item::Pufferfish), + "cooked_cod" => Some(Item::CookedCod), + "cooked_salmon" => Some(Item::CookedSalmon), + "ink_sac" => Some(Item::InkSac), + "cocoa_beans" => Some(Item::CocoaBeans), + "lapis_lazuli" => Some(Item::LapisLazuli), + "white_dye" => Some(Item::WhiteDye), + "orange_dye" => Some(Item::OrangeDye), + "magenta_dye" => Some(Item::MagentaDye), + "light_blue_dye" => Some(Item::LightBlueDye), + "yellow_dye" => Some(Item::YellowDye), + "lime_dye" => Some(Item::LimeDye), + "pink_dye" => Some(Item::PinkDye), + "gray_dye" => Some(Item::GrayDye), + "light_gray_dye" => Some(Item::LightGrayDye), + "cyan_dye" => Some(Item::CyanDye), + "purple_dye" => Some(Item::PurpleDye), + "blue_dye" => Some(Item::BlueDye), + "brown_dye" => Some(Item::BrownDye), + "green_dye" => Some(Item::GreenDye), + "red_dye" => Some(Item::RedDye), + "black_dye" => Some(Item::BlackDye), + "bone_meal" => Some(Item::BoneMeal), + "bone" => Some(Item::Bone), + "sugar" => Some(Item::Sugar), + "cake" => Some(Item::Cake), + "white_bed" => Some(Item::WhiteBed), + "orange_bed" => Some(Item::OrangeBed), + "magenta_bed" => Some(Item::MagentaBed), + "light_blue_bed" => Some(Item::LightBlueBed), + "yellow_bed" => Some(Item::YellowBed), + "lime_bed" => Some(Item::LimeBed), + "pink_bed" => Some(Item::PinkBed), + "gray_bed" => Some(Item::GrayBed), + "light_gray_bed" => Some(Item::LightGrayBed), + "cyan_bed" => Some(Item::CyanBed), + "purple_bed" => Some(Item::PurpleBed), + "blue_bed" => Some(Item::BlueBed), + "brown_bed" => Some(Item::BrownBed), + "green_bed" => Some(Item::GreenBed), + "red_bed" => Some(Item::RedBed), + "black_bed" => Some(Item::BlackBed), + "cookie" => Some(Item::Cookie), + "filled_map" => Some(Item::FilledMap), + "shears" => Some(Item::Shears), + "melon_slice" => Some(Item::MelonSlice), + "dried_kelp" => Some(Item::DriedKelp), + "pumpkin_seeds" => Some(Item::PumpkinSeeds), + "melon_seeds" => Some(Item::MelonSeeds), + "beef" => Some(Item::Beef), + "cooked_beef" => Some(Item::CookedBeef), + "chicken" => Some(Item::Chicken), + "cooked_chicken" => Some(Item::CookedChicken), + "rotten_flesh" => Some(Item::RottenFlesh), + "ender_pearl" => Some(Item::EnderPearl), + "blaze_rod" => Some(Item::BlazeRod), + "ghast_tear" => Some(Item::GhastTear), + "gold_nugget" => Some(Item::GoldNugget), + "nether_wart" => Some(Item::NetherWart), + "potion" => Some(Item::Potion), + "glass_bottle" => Some(Item::GlassBottle), + "spider_eye" => Some(Item::SpiderEye), + "fermented_spider_eye" => Some(Item::FermentedSpiderEye), + "blaze_powder" => Some(Item::BlazePowder), + "magma_cream" => Some(Item::MagmaCream), + "brewing_stand" => Some(Item::BrewingStand), + "cauldron" => Some(Item::Cauldron), + "ender_eye" => Some(Item::EnderEye), + "glistering_melon_slice" => Some(Item::GlisteringMelonSlice), + "bat_spawn_egg" => Some(Item::BatSpawnEgg), + "bee_spawn_egg" => Some(Item::BeeSpawnEgg), + "blaze_spawn_egg" => Some(Item::BlazeSpawnEgg), + "cat_spawn_egg" => Some(Item::CatSpawnEgg), + "cave_spider_spawn_egg" => Some(Item::CaveSpiderSpawnEgg), + "chicken_spawn_egg" => Some(Item::ChickenSpawnEgg), + "cod_spawn_egg" => Some(Item::CodSpawnEgg), + "cow_spawn_egg" => Some(Item::CowSpawnEgg), + "creeper_spawn_egg" => Some(Item::CreeperSpawnEgg), + "dolphin_spawn_egg" => Some(Item::DolphinSpawnEgg), + "donkey_spawn_egg" => Some(Item::DonkeySpawnEgg), + "drowned_spawn_egg" => Some(Item::DrownedSpawnEgg), + "elder_guardian_spawn_egg" => Some(Item::ElderGuardianSpawnEgg), + "enderman_spawn_egg" => Some(Item::EndermanSpawnEgg), + "endermite_spawn_egg" => Some(Item::EndermiteSpawnEgg), + "evoker_spawn_egg" => Some(Item::EvokerSpawnEgg), + "fox_spawn_egg" => Some(Item::FoxSpawnEgg), + "ghast_spawn_egg" => Some(Item::GhastSpawnEgg), + "guardian_spawn_egg" => Some(Item::GuardianSpawnEgg), + "hoglin_spawn_egg" => Some(Item::HoglinSpawnEgg), + "horse_spawn_egg" => Some(Item::HorseSpawnEgg), + "husk_spawn_egg" => Some(Item::HuskSpawnEgg), + "llama_spawn_egg" => Some(Item::LlamaSpawnEgg), + "magma_cube_spawn_egg" => Some(Item::MagmaCubeSpawnEgg), + "mooshroom_spawn_egg" => Some(Item::MooshroomSpawnEgg), + "mule_spawn_egg" => Some(Item::MuleSpawnEgg), + "ocelot_spawn_egg" => Some(Item::OcelotSpawnEgg), + "panda_spawn_egg" => Some(Item::PandaSpawnEgg), + "parrot_spawn_egg" => Some(Item::ParrotSpawnEgg), + "phantom_spawn_egg" => Some(Item::PhantomSpawnEgg), + "pig_spawn_egg" => Some(Item::PigSpawnEgg), + "piglin_spawn_egg" => Some(Item::PiglinSpawnEgg), + "piglin_brute_spawn_egg" => Some(Item::PiglinBruteSpawnEgg), + "pillager_spawn_egg" => Some(Item::PillagerSpawnEgg), + "polar_bear_spawn_egg" => Some(Item::PolarBearSpawnEgg), + "pufferfish_spawn_egg" => Some(Item::PufferfishSpawnEgg), + "rabbit_spawn_egg" => Some(Item::RabbitSpawnEgg), + "ravager_spawn_egg" => Some(Item::RavagerSpawnEgg), + "salmon_spawn_egg" => Some(Item::SalmonSpawnEgg), + "sheep_spawn_egg" => Some(Item::SheepSpawnEgg), + "shulker_spawn_egg" => Some(Item::ShulkerSpawnEgg), + "silverfish_spawn_egg" => Some(Item::SilverfishSpawnEgg), + "skeleton_spawn_egg" => Some(Item::SkeletonSpawnEgg), + "skeleton_horse_spawn_egg" => Some(Item::SkeletonHorseSpawnEgg), + "slime_spawn_egg" => Some(Item::SlimeSpawnEgg), + "spider_spawn_egg" => Some(Item::SpiderSpawnEgg), + "squid_spawn_egg" => Some(Item::SquidSpawnEgg), + "stray_spawn_egg" => Some(Item::StraySpawnEgg), + "strider_spawn_egg" => Some(Item::StriderSpawnEgg), + "trader_llama_spawn_egg" => Some(Item::TraderLlamaSpawnEgg), + "tropical_fish_spawn_egg" => Some(Item::TropicalFishSpawnEgg), + "turtle_spawn_egg" => Some(Item::TurtleSpawnEgg), + "vex_spawn_egg" => Some(Item::VexSpawnEgg), + "villager_spawn_egg" => Some(Item::VillagerSpawnEgg), + "vindicator_spawn_egg" => Some(Item::VindicatorSpawnEgg), + "wandering_trader_spawn_egg" => Some(Item::WanderingTraderSpawnEgg), + "witch_spawn_egg" => Some(Item::WitchSpawnEgg), + "wither_skeleton_spawn_egg" => Some(Item::WitherSkeletonSpawnEgg), + "wolf_spawn_egg" => Some(Item::WolfSpawnEgg), + "zoglin_spawn_egg" => Some(Item::ZoglinSpawnEgg), + "zombie_spawn_egg" => Some(Item::ZombieSpawnEgg), + "zombie_horse_spawn_egg" => Some(Item::ZombieHorseSpawnEgg), + "zombie_villager_spawn_egg" => Some(Item::ZombieVillagerSpawnEgg), + "zombified_piglin_spawn_egg" => Some(Item::ZombifiedPiglinSpawnEgg), + "experience_bottle" => Some(Item::ExperienceBottle), + "fire_charge" => Some(Item::FireCharge), + "writable_book" => Some(Item::WritableBook), + "written_book" => Some(Item::WrittenBook), + "emerald" => Some(Item::Emerald), + "item_frame" => Some(Item::ItemFrame), + "flower_pot" => Some(Item::FlowerPot), + "carrot" => Some(Item::Carrot), + "potato" => Some(Item::Potato), + "baked_potato" => Some(Item::BakedPotato), + "poisonous_potato" => Some(Item::PoisonousPotato), + "map" => Some(Item::Map), + "golden_carrot" => Some(Item::GoldenCarrot), + "skeleton_skull" => Some(Item::SkeletonSkull), + "wither_skeleton_skull" => Some(Item::WitherSkeletonSkull), + "player_head" => Some(Item::PlayerHead), + "zombie_head" => Some(Item::ZombieHead), + "creeper_head" => Some(Item::CreeperHead), + "dragon_head" => Some(Item::DragonHead), + "carrot_on_a_stick" => Some(Item::CarrotOnAStick), + "warped_fungus_on_a_stick" => Some(Item::WarpedFungusOnAStick), + "nether_star" => Some(Item::NetherStar), + "pumpkin_pie" => Some(Item::PumpkinPie), + "firework_rocket" => Some(Item::FireworkRocket), + "firework_star" => Some(Item::FireworkStar), + "enchanted_book" => Some(Item::EnchantedBook), + "nether_brick" => Some(Item::NetherBrick), + "quartz" => Some(Item::Quartz), + "tnt_minecart" => Some(Item::TntMinecart), + "hopper_minecart" => Some(Item::HopperMinecart), + "prismarine_shard" => Some(Item::PrismarineShard), + "prismarine_crystals" => Some(Item::PrismarineCrystals), + "rabbit" => Some(Item::Rabbit), + "cooked_rabbit" => Some(Item::CookedRabbit), + "rabbit_stew" => Some(Item::RabbitStew), + "rabbit_foot" => Some(Item::RabbitFoot), + "rabbit_hide" => Some(Item::RabbitHide), + "armor_stand" => Some(Item::ArmorStand), + "iron_horse_armor" => Some(Item::IronHorseArmor), + "golden_horse_armor" => Some(Item::GoldenHorseArmor), + "diamond_horse_armor" => Some(Item::DiamondHorseArmor), + "leather_horse_armor" => Some(Item::LeatherHorseArmor), + "lead" => Some(Item::Lead), + "name_tag" => Some(Item::NameTag), + "command_block_minecart" => Some(Item::CommandBlockMinecart), + "mutton" => Some(Item::Mutton), + "cooked_mutton" => Some(Item::CookedMutton), + "white_banner" => Some(Item::WhiteBanner), + "orange_banner" => Some(Item::OrangeBanner), + "magenta_banner" => Some(Item::MagentaBanner), + "light_blue_banner" => Some(Item::LightBlueBanner), + "yellow_banner" => Some(Item::YellowBanner), + "lime_banner" => Some(Item::LimeBanner), + "pink_banner" => Some(Item::PinkBanner), + "gray_banner" => Some(Item::GrayBanner), + "light_gray_banner" => Some(Item::LightGrayBanner), + "cyan_banner" => Some(Item::CyanBanner), + "purple_banner" => Some(Item::PurpleBanner), + "blue_banner" => Some(Item::BlueBanner), + "brown_banner" => Some(Item::BrownBanner), + "green_banner" => Some(Item::GreenBanner), + "red_banner" => Some(Item::RedBanner), + "black_banner" => Some(Item::BlackBanner), + "end_crystal" => Some(Item::EndCrystal), + "chorus_fruit" => Some(Item::ChorusFruit), + "popped_chorus_fruit" => Some(Item::PoppedChorusFruit), + "beetroot" => Some(Item::Beetroot), + "beetroot_seeds" => Some(Item::BeetrootSeeds), + "beetroot_soup" => Some(Item::BeetrootSoup), + "dragon_breath" => Some(Item::DragonBreath), + "splash_potion" => Some(Item::SplashPotion), + "spectral_arrow" => Some(Item::SpectralArrow), + "tipped_arrow" => Some(Item::TippedArrow), + "lingering_potion" => Some(Item::LingeringPotion), + "shield" => Some(Item::Shield), + "elytra" => Some(Item::Elytra), + "spruce_boat" => Some(Item::SpruceBoat), + "birch_boat" => Some(Item::BirchBoat), + "jungle_boat" => Some(Item::JungleBoat), + "acacia_boat" => Some(Item::AcaciaBoat), + "dark_oak_boat" => Some(Item::DarkOakBoat), + "totem_of_undying" => Some(Item::TotemOfUndying), + "shulker_shell" => Some(Item::ShulkerShell), + "iron_nugget" => Some(Item::IronNugget), + "knowledge_book" => Some(Item::KnowledgeBook), + "debug_stick" => Some(Item::DebugStick), + "music_disc_13" => Some(Item::MusicDisc13), + "music_disc_cat" => Some(Item::MusicDiscCat), + "music_disc_blocks" => Some(Item::MusicDiscBlocks), + "music_disc_chirp" => Some(Item::MusicDiscChirp), + "music_disc_far" => Some(Item::MusicDiscFar), + "music_disc_mall" => Some(Item::MusicDiscMall), + "music_disc_mellohi" => Some(Item::MusicDiscMellohi), + "music_disc_stal" => Some(Item::MusicDiscStal), + "music_disc_strad" => Some(Item::MusicDiscStrad), + "music_disc_ward" => Some(Item::MusicDiscWard), + "music_disc_11" => Some(Item::MusicDisc11), + "music_disc_wait" => Some(Item::MusicDiscWait), + "music_disc_pigstep" => Some(Item::MusicDiscPigstep), + "trident" => Some(Item::Trident), + "phantom_membrane" => Some(Item::PhantomMembrane), + "nautilus_shell" => Some(Item::NautilusShell), + "heart_of_the_sea" => Some(Item::HeartOfTheSea), + "crossbow" => Some(Item::Crossbow), + "suspicious_stew" => Some(Item::SuspiciousStew), + "loom" => Some(Item::Loom), + "flower_banner_pattern" => Some(Item::FlowerBannerPattern), + "creeper_banner_pattern" => Some(Item::CreeperBannerPattern), + "skull_banner_pattern" => Some(Item::SkullBannerPattern), + "mojang_banner_pattern" => Some(Item::MojangBannerPattern), + "globe_banner_pattern" => Some(Item::GlobeBannerPattern), + "piglin_banner_pattern" => Some(Item::PiglinBannerPattern), + "composter" => Some(Item::Composter), + "barrel" => Some(Item::Barrel), + "smoker" => Some(Item::Smoker), + "blast_furnace" => Some(Item::BlastFurnace), + "cartography_table" => Some(Item::CartographyTable), + "fletching_table" => Some(Item::FletchingTable), + "grindstone" => Some(Item::Grindstone), + "lectern" => Some(Item::Lectern), + "smithing_table" => Some(Item::SmithingTable), + "stonecutter" => Some(Item::Stonecutter), + "bell" => Some(Item::Bell), + "lantern" => Some(Item::Lantern), + "soul_lantern" => Some(Item::SoulLantern), + "sweet_berries" => Some(Item::SweetBerries), + "campfire" => Some(Item::Campfire), + "soul_campfire" => Some(Item::SoulCampfire), + "shroomlight" => Some(Item::Shroomlight), + "honeycomb" => Some(Item::Honeycomb), + "bee_nest" => Some(Item::BeeNest), + "beehive" => Some(Item::Beehive), + "honey_bottle" => Some(Item::HoneyBottle), + "honey_block" => Some(Item::HoneyBlock), + "honeycomb_block" => Some(Item::HoneycombBlock), + "lodestone" => Some(Item::Lodestone), + "netherite_block" => Some(Item::NetheriteBlock), + "ancient_debris" => Some(Item::AncientDebris), + "target" => Some(Item::Target), + "crying_obsidian" => Some(Item::CryingObsidian), + "blackstone" => Some(Item::Blackstone), + "blackstone_slab" => Some(Item::BlackstoneSlab), + "blackstone_stairs" => Some(Item::BlackstoneStairs), + "gilded_blackstone" => Some(Item::GildedBlackstone), + "polished_blackstone" => Some(Item::PolishedBlackstone), + "polished_blackstone_slab" => Some(Item::PolishedBlackstoneSlab), + "polished_blackstone_stairs" => Some(Item::PolishedBlackstoneStairs), + "chiseled_polished_blackstone" => Some(Item::ChiseledPolishedBlackstone), + "polished_blackstone_bricks" => Some(Item::PolishedBlackstoneBricks), + "polished_blackstone_brick_slab" => Some(Item::PolishedBlackstoneBrickSlab), + "polished_blackstone_brick_stairs" => Some(Item::PolishedBlackstoneBrickStairs), + "cracked_polished_blackstone_bricks" => Some(Item::CrackedPolishedBlackstoneBricks), + "respawn_anchor" => Some(Item::RespawnAnchor), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Item { + /// Returns the `display_name` property of this `Item`. + pub fn display_name(&self) -> &'static str { + match self { + Item::Air => "Air", + Item::Stone => "Stone", + Item::Granite => "Granite", + Item::PolishedGranite => "Polished Granite", + Item::Diorite => "Diorite", + Item::PolishedDiorite => "Polished Diorite", + Item::Andesite => "Andesite", + Item::PolishedAndesite => "Polished Andesite", + Item::GrassBlock => "Grass Block", + Item::Dirt => "Dirt", + Item::CoarseDirt => "Coarse Dirt", + Item::Podzol => "Podzol", + Item::CrimsonNylium => "Crimson Nylium", + Item::WarpedNylium => "Warped Nylium", + Item::Cobblestone => "Cobblestone", + Item::OakPlanks => "Oak Planks", + Item::SprucePlanks => "Spruce Planks", + Item::BirchPlanks => "Birch Planks", + Item::JunglePlanks => "Jungle Planks", + Item::AcaciaPlanks => "Acacia Planks", + Item::DarkOakPlanks => "Dark Oak Planks", + Item::CrimsonPlanks => "Crimson Planks", + Item::WarpedPlanks => "Warped Planks", + Item::OakSapling => "Oak Sapling", + Item::SpruceSapling => "Spruce Sapling", + Item::BirchSapling => "Birch Sapling", + Item::JungleSapling => "Jungle Sapling", + Item::AcaciaSapling => "Acacia Sapling", + Item::DarkOakSapling => "Dark Oak Sapling", + Item::Bedrock => "Bedrock", + Item::Sand => "Sand", + Item::RedSand => "Red Sand", + Item::Gravel => "Gravel", + Item::GoldOre => "Gold Ore", + Item::IronOre => "Iron Ore", + Item::CoalOre => "Coal Ore", + Item::NetherGoldOre => "Nether Gold Ore", + Item::OakLog => "Oak Log", + Item::SpruceLog => "Spruce Log", + Item::BirchLog => "Birch Log", + Item::JungleLog => "Jungle Log", + Item::AcaciaLog => "Acacia Log", + Item::DarkOakLog => "Dark Oak Log", + Item::CrimsonStem => "Crimson Stem", + Item::WarpedStem => "Warped Stem", + Item::StrippedOakLog => "Stripped Oak Log", + Item::StrippedSpruceLog => "Stripped Spruce Log", + Item::StrippedBirchLog => "Stripped Birch Log", + Item::StrippedJungleLog => "Stripped Jungle Log", + Item::StrippedAcaciaLog => "Stripped Acacia Log", + Item::StrippedDarkOakLog => "Stripped Dark Oak Log", + Item::StrippedCrimsonStem => "Stripped Crimson Stem", + Item::StrippedWarpedStem => "Stripped Warped Stem", + Item::StrippedOakWood => "Stripped Oak Wood", + Item::StrippedSpruceWood => "Stripped Spruce Wood", + Item::StrippedBirchWood => "Stripped Birch Wood", + Item::StrippedJungleWood => "Stripped Jungle Wood", + Item::StrippedAcaciaWood => "Stripped Acacia Wood", + Item::StrippedDarkOakWood => "Stripped Dark Oak Wood", + Item::StrippedCrimsonHyphae => "Stripped Crimson Hyphae", + Item::StrippedWarpedHyphae => "Stripped Warped Hyphae", + Item::OakWood => "Oak Wood", + Item::SpruceWood => "Spruce Wood", + Item::BirchWood => "Birch Wood", + Item::JungleWood => "Jungle Wood", + Item::AcaciaWood => "Acacia Wood", + Item::DarkOakWood => "Dark Oak Wood", + Item::CrimsonHyphae => "Crimson Hyphae", + Item::WarpedHyphae => "Warped Hyphae", + Item::OakLeaves => "Oak Leaves", + Item::SpruceLeaves => "Spruce Leaves", + Item::BirchLeaves => "Birch Leaves", + Item::JungleLeaves => "Jungle Leaves", + Item::AcaciaLeaves => "Acacia Leaves", + Item::DarkOakLeaves => "Dark Oak Leaves", + Item::Sponge => "Sponge", + Item::WetSponge => "Wet Sponge", + Item::Glass => "Glass", + Item::LapisOre => "Lapis Lazuli Ore", + Item::LapisBlock => "Lapis Lazuli Block", + Item::Dispenser => "Dispenser", + Item::Sandstone => "Sandstone", + Item::ChiseledSandstone => "Chiseled Sandstone", + Item::CutSandstone => "Cut Sandstone", + Item::NoteBlock => "Note Block", + Item::PoweredRail => "Powered Rail", + Item::DetectorRail => "Detector Rail", + Item::StickyPiston => "Sticky Piston", + Item::Cobweb => "Cobweb", + Item::Grass => "Grass", + Item::Fern => "Fern", + Item::DeadBush => "Dead Bush", + Item::Seagrass => "Seagrass", + Item::SeaPickle => "Sea Pickle", + Item::Piston => "Piston", + Item::WhiteWool => "White Wool", + Item::OrangeWool => "Orange Wool", + Item::MagentaWool => "Magenta Wool", + Item::LightBlueWool => "Light Blue Wool", + Item::YellowWool => "Yellow Wool", + Item::LimeWool => "Lime Wool", + Item::PinkWool => "Pink Wool", + Item::GrayWool => "Gray Wool", + Item::LightGrayWool => "Light Gray Wool", + Item::CyanWool => "Cyan Wool", + Item::PurpleWool => "Purple Wool", + Item::BlueWool => "Blue Wool", + Item::BrownWool => "Brown Wool", + Item::GreenWool => "Green Wool", + Item::RedWool => "Red Wool", + Item::BlackWool => "Black Wool", + Item::Dandelion => "Dandelion", + Item::Poppy => "Poppy", + Item::BlueOrchid => "Blue Orchid", + Item::Allium => "Allium", + Item::AzureBluet => "Azure Bluet", + Item::RedTulip => "Red Tulip", + Item::OrangeTulip => "Orange Tulip", + Item::WhiteTulip => "White Tulip", + Item::PinkTulip => "Pink Tulip", + Item::OxeyeDaisy => "Oxeye Daisy", + Item::Cornflower => "Cornflower", + Item::LilyOfTheValley => "Lily of the Valley", + Item::WitherRose => "Wither Rose", + Item::BrownMushroom => "Brown Mushroom", + Item::RedMushroom => "Red Mushroom", + Item::CrimsonFungus => "Crimson Fungus", + Item::WarpedFungus => "Warped Fungus", + Item::CrimsonRoots => "Crimson Roots", + Item::WarpedRoots => "Warped Roots", + Item::NetherSprouts => "Nether Sprouts", + Item::WeepingVines => "Weeping Vines", + Item::TwistingVines => "Twisting Vines", + Item::SugarCane => "Sugar Cane", + Item::Kelp => "Kelp", + Item::Bamboo => "Bamboo", + Item::GoldBlock => "Block of Gold", + Item::IronBlock => "Block of Iron", + Item::OakSlab => "Oak Slab", + Item::SpruceSlab => "Spruce Slab", + Item::BirchSlab => "Birch Slab", + Item::JungleSlab => "Jungle Slab", + Item::AcaciaSlab => "Acacia Slab", + Item::DarkOakSlab => "Dark Oak Slab", + Item::CrimsonSlab => "Crimson Slab", + Item::WarpedSlab => "Warped Slab", + Item::StoneSlab => "Stone Slab", + Item::SmoothStoneSlab => "Smooth Stone Slab", + Item::SandstoneSlab => "Sandstone Slab", + Item::CutSandstoneSlab => "Cut Sandstone Slab", + Item::PetrifiedOakSlab => "Petrified Oak Slab", + Item::CobblestoneSlab => "Cobblestone Slab", + Item::BrickSlab => "Brick Slab", + Item::StoneBrickSlab => "Stone Brick Slab", + Item::NetherBrickSlab => "Nether Brick Slab", + Item::QuartzSlab => "Quartz Slab", + Item::RedSandstoneSlab => "Red Sandstone Slab", + Item::CutRedSandstoneSlab => "Cut Red Sandstone Slab", + Item::PurpurSlab => "Purpur Slab", + Item::PrismarineSlab => "Prismarine Slab", + Item::PrismarineBrickSlab => "Prismarine Brick Slab", + Item::DarkPrismarineSlab => "Dark Prismarine Slab", + Item::SmoothQuartz => "Smooth Quartz Block", + Item::SmoothRedSandstone => "Smooth Red Sandstone", + Item::SmoothSandstone => "Smooth Sandstone", + Item::SmoothStone => "Smooth Stone", + Item::Bricks => "Bricks", + Item::Tnt => "TNT", + Item::Bookshelf => "Bookshelf", + Item::MossyCobblestone => "Mossy Cobblestone", + Item::Obsidian => "Obsidian", + Item::Torch => "Torch", + Item::EndRod => "End Rod", + Item::ChorusPlant => "Chorus Plant", + Item::ChorusFlower => "Chorus Flower", + Item::PurpurBlock => "Purpur Block", + Item::PurpurPillar => "Purpur Pillar", + Item::PurpurStairs => "Purpur Stairs", + Item::Spawner => "Spawner", + Item::OakStairs => "Oak Stairs", + Item::Chest => "Chest", + Item::DiamondOre => "Diamond Ore", + Item::DiamondBlock => "Block of Diamond", + Item::CraftingTable => "Crafting Table", + Item::Farmland => "Farmland", + Item::Furnace => "Furnace", + Item::Ladder => "Ladder", + Item::Rail => "Rail", + Item::CobblestoneStairs => "Cobblestone Stairs", + Item::Lever => "Lever", + Item::StonePressurePlate => "Stone Pressure Plate", + Item::OakPressurePlate => "Oak Pressure Plate", + Item::SprucePressurePlate => "Spruce Pressure Plate", + Item::BirchPressurePlate => "Birch Pressure Plate", + Item::JunglePressurePlate => "Jungle Pressure Plate", + Item::AcaciaPressurePlate => "Acacia Pressure Plate", + Item::DarkOakPressurePlate => "Dark Oak Pressure Plate", + Item::CrimsonPressurePlate => "Crimson Pressure Plate", + Item::WarpedPressurePlate => "Warped Pressure Plate", + Item::PolishedBlackstonePressurePlate => "Polished Blackstone Pressure Plate", + Item::RedstoneOre => "Redstone Ore", + Item::RedstoneTorch => "Redstone Torch", + Item::Snow => "Snow", + Item::Ice => "Ice", + Item::SnowBlock => "Snow Block", + Item::Cactus => "Cactus", + Item::Clay => "Clay", + Item::Jukebox => "Jukebox", + Item::OakFence => "Oak Fence", + Item::SpruceFence => "Spruce Fence", + Item::BirchFence => "Birch Fence", + Item::JungleFence => "Jungle Fence", + Item::AcaciaFence => "Acacia Fence", + Item::DarkOakFence => "Dark Oak Fence", + Item::CrimsonFence => "Crimson Fence", + Item::WarpedFence => "Warped Fence", + Item::Pumpkin => "Pumpkin", + Item::CarvedPumpkin => "Carved Pumpkin", + Item::Netherrack => "Netherrack", + Item::SoulSand => "Soul Sand", + Item::SoulSoil => "Soul Soil", + Item::Basalt => "Basalt", + Item::PolishedBasalt => "Polished Basalt", + Item::SoulTorch => "Soul Torch", + Item::Glowstone => "Glowstone", + Item::JackOLantern => "Jack o'Lantern", + Item::OakTrapdoor => "Oak Trapdoor", + Item::SpruceTrapdoor => "Spruce Trapdoor", + Item::BirchTrapdoor => "Birch Trapdoor", + Item::JungleTrapdoor => "Jungle Trapdoor", + Item::AcaciaTrapdoor => "Acacia Trapdoor", + Item::DarkOakTrapdoor => "Dark Oak Trapdoor", + Item::CrimsonTrapdoor => "Crimson Trapdoor", + Item::WarpedTrapdoor => "Warped Trapdoor", + Item::InfestedStone => "Infested Stone", + Item::InfestedCobblestone => "Infested Cobblestone", + Item::InfestedStoneBricks => "Infested Stone Bricks", + Item::InfestedMossyStoneBricks => "Infested Mossy Stone Bricks", + Item::InfestedCrackedStoneBricks => "Infested Cracked Stone Bricks", + Item::InfestedChiseledStoneBricks => "Infested Chiseled Stone Bricks", + Item::StoneBricks => "Stone Bricks", + Item::MossyStoneBricks => "Mossy Stone Bricks", + Item::CrackedStoneBricks => "Cracked Stone Bricks", + Item::ChiseledStoneBricks => "Chiseled Stone Bricks", + Item::BrownMushroomBlock => "Brown Mushroom Block", + Item::RedMushroomBlock => "Red Mushroom Block", + Item::MushroomStem => "Mushroom Stem", + Item::IronBars => "Iron Bars", + Item::Chain => "Chain", + Item::GlassPane => "Glass Pane", + Item::Melon => "Melon", + Item::Vine => "Vines", + Item::OakFenceGate => "Oak Fence Gate", + Item::SpruceFenceGate => "Spruce Fence Gate", + Item::BirchFenceGate => "Birch Fence Gate", + Item::JungleFenceGate => "Jungle Fence Gate", + Item::AcaciaFenceGate => "Acacia Fence Gate", + Item::DarkOakFenceGate => "Dark Oak Fence Gate", + Item::CrimsonFenceGate => "Crimson Fence Gate", + Item::WarpedFenceGate => "Warped Fence Gate", + Item::BrickStairs => "Brick Stairs", + Item::StoneBrickStairs => "Stone Brick Stairs", + Item::Mycelium => "Mycelium", + Item::LilyPad => "Lily Pad", + Item::NetherBricks => "Nether Bricks", + Item::CrackedNetherBricks => "Cracked Nether Bricks", + Item::ChiseledNetherBricks => "Chiseled Nether Bricks", + Item::NetherBrickFence => "Nether Brick Fence", + Item::NetherBrickStairs => "Nether Brick Stairs", + Item::EnchantingTable => "Enchanting Table", + Item::EndPortalFrame => "End Portal Frame", + Item::EndStone => "End Stone", + Item::EndStoneBricks => "End Stone Bricks", + Item::DragonEgg => "Dragon Egg", + Item::RedstoneLamp => "Redstone Lamp", + Item::SandstoneStairs => "Sandstone Stairs", + Item::EmeraldOre => "Emerald Ore", + Item::EnderChest => "Ender Chest", + Item::TripwireHook => "Tripwire Hook", + Item::EmeraldBlock => "Block of Emerald", + Item::SpruceStairs => "Spruce Stairs", + Item::BirchStairs => "Birch Stairs", + Item::JungleStairs => "Jungle Stairs", + Item::CrimsonStairs => "Crimson Stairs", + Item::WarpedStairs => "Warped Stairs", + Item::CommandBlock => "Command Block", + Item::Beacon => "Beacon", + Item::CobblestoneWall => "Cobblestone Wall", + Item::MossyCobblestoneWall => "Mossy Cobblestone Wall", + Item::BrickWall => "Brick Wall", + Item::PrismarineWall => "Prismarine Wall", + Item::RedSandstoneWall => "Red Sandstone Wall", + Item::MossyStoneBrickWall => "Mossy Stone Brick Wall", + Item::GraniteWall => "Granite Wall", + Item::StoneBrickWall => "Stone Brick Wall", + Item::NetherBrickWall => "Nether Brick Wall", + Item::AndesiteWall => "Andesite Wall", + Item::RedNetherBrickWall => "Red Nether Brick Wall", + Item::SandstoneWall => "Sandstone Wall", + Item::EndStoneBrickWall => "End Stone Brick Wall", + Item::DioriteWall => "Diorite Wall", + Item::BlackstoneWall => "Blackstone Wall", + Item::PolishedBlackstoneWall => "Polished Blackstone Wall", + Item::PolishedBlackstoneBrickWall => "Polished Blackstone Brick Wall", + Item::StoneButton => "Stone Button", + Item::OakButton => "Oak Button", + Item::SpruceButton => "Spruce Button", + Item::BirchButton => "Birch Button", + Item::JungleButton => "Jungle Button", + Item::AcaciaButton => "Acacia Button", + Item::DarkOakButton => "Dark Oak Button", + Item::CrimsonButton => "Crimson Button", + Item::WarpedButton => "Warped Button", + Item::PolishedBlackstoneButton => "Polished Blackstone Button", + Item::Anvil => "Anvil", + Item::ChippedAnvil => "Chipped Anvil", + Item::DamagedAnvil => "Damaged Anvil", + Item::TrappedChest => "Trapped Chest", + Item::LightWeightedPressurePlate => "Light Weighted Pressure Plate", + Item::HeavyWeightedPressurePlate => "Heavy Weighted Pressure Plate", + Item::DaylightDetector => "Daylight Detector", + Item::RedstoneBlock => "Block of Redstone", + Item::NetherQuartzOre => "Nether Quartz Ore", + Item::Hopper => "Hopper", + Item::ChiseledQuartzBlock => "Chiseled Quartz Block", + Item::QuartzBlock => "Block of Quartz", + Item::QuartzBricks => "Quartz Bricks", + Item::QuartzPillar => "Quartz Pillar", + Item::QuartzStairs => "Quartz Stairs", + Item::ActivatorRail => "Activator Rail", + Item::Dropper => "Dropper", + Item::WhiteTerracotta => "White Terracotta", + Item::OrangeTerracotta => "Orange Terracotta", + Item::MagentaTerracotta => "Magenta Terracotta", + Item::LightBlueTerracotta => "Light Blue Terracotta", + Item::YellowTerracotta => "Yellow Terracotta", + Item::LimeTerracotta => "Lime Terracotta", + Item::PinkTerracotta => "Pink Terracotta", + Item::GrayTerracotta => "Gray Terracotta", + Item::LightGrayTerracotta => "Light Gray Terracotta", + Item::CyanTerracotta => "Cyan Terracotta", + Item::PurpleTerracotta => "Purple Terracotta", + Item::BlueTerracotta => "Blue Terracotta", + Item::BrownTerracotta => "Brown Terracotta", + Item::GreenTerracotta => "Green Terracotta", + Item::RedTerracotta => "Red Terracotta", + Item::BlackTerracotta => "Black Terracotta", + Item::Barrier => "Barrier", + Item::IronTrapdoor => "Iron Trapdoor", + Item::HayBlock => "Hay Bale", + Item::WhiteCarpet => "White Carpet", + Item::OrangeCarpet => "Orange Carpet", + Item::MagentaCarpet => "Magenta Carpet", + Item::LightBlueCarpet => "Light Blue Carpet", + Item::YellowCarpet => "Yellow Carpet", + Item::LimeCarpet => "Lime Carpet", + Item::PinkCarpet => "Pink Carpet", + Item::GrayCarpet => "Gray Carpet", + Item::LightGrayCarpet => "Light Gray Carpet", + Item::CyanCarpet => "Cyan Carpet", + Item::PurpleCarpet => "Purple Carpet", + Item::BlueCarpet => "Blue Carpet", + Item::BrownCarpet => "Brown Carpet", + Item::GreenCarpet => "Green Carpet", + Item::RedCarpet => "Red Carpet", + Item::BlackCarpet => "Black Carpet", + Item::Terracotta => "Terracotta", + Item::CoalBlock => "Block of Coal", + Item::PackedIce => "Packed Ice", + Item::AcaciaStairs => "Acacia Stairs", + Item::DarkOakStairs => "Dark Oak Stairs", + Item::SlimeBlock => "Slime Block", + Item::GrassPath => "Grass Path", + Item::Sunflower => "Sunflower", + Item::Lilac => "Lilac", + Item::RoseBush => "Rose Bush", + Item::Peony => "Peony", + Item::TallGrass => "Tall Grass", + Item::LargeFern => "Large Fern", + Item::WhiteStainedGlass => "White Stained Glass", + Item::OrangeStainedGlass => "Orange Stained Glass", + Item::MagentaStainedGlass => "Magenta Stained Glass", + Item::LightBlueStainedGlass => "Light Blue Stained Glass", + Item::YellowStainedGlass => "Yellow Stained Glass", + Item::LimeStainedGlass => "Lime Stained Glass", + Item::PinkStainedGlass => "Pink Stained Glass", + Item::GrayStainedGlass => "Gray Stained Glass", + Item::LightGrayStainedGlass => "Light Gray Stained Glass", + Item::CyanStainedGlass => "Cyan Stained Glass", + Item::PurpleStainedGlass => "Purple Stained Glass", + Item::BlueStainedGlass => "Blue Stained Glass", + Item::BrownStainedGlass => "Brown Stained Glass", + Item::GreenStainedGlass => "Green Stained Glass", + Item::RedStainedGlass => "Red Stained Glass", + Item::BlackStainedGlass => "Black Stained Glass", + Item::WhiteStainedGlassPane => "White Stained Glass Pane", + Item::OrangeStainedGlassPane => "Orange Stained Glass Pane", + Item::MagentaStainedGlassPane => "Magenta Stained Glass Pane", + Item::LightBlueStainedGlassPane => "Light Blue Stained Glass Pane", + Item::YellowStainedGlassPane => "Yellow Stained Glass Pane", + Item::LimeStainedGlassPane => "Lime Stained Glass Pane", + Item::PinkStainedGlassPane => "Pink Stained Glass Pane", + Item::GrayStainedGlassPane => "Gray Stained Glass Pane", + Item::LightGrayStainedGlassPane => "Light Gray Stained Glass Pane", + Item::CyanStainedGlassPane => "Cyan Stained Glass Pane", + Item::PurpleStainedGlassPane => "Purple Stained Glass Pane", + Item::BlueStainedGlassPane => "Blue Stained Glass Pane", + Item::BrownStainedGlassPane => "Brown Stained Glass Pane", + Item::GreenStainedGlassPane => "Green Stained Glass Pane", + Item::RedStainedGlassPane => "Red Stained Glass Pane", + Item::BlackStainedGlassPane => "Black Stained Glass Pane", + Item::Prismarine => "Prismarine", + Item::PrismarineBricks => "Prismarine Bricks", + Item::DarkPrismarine => "Dark Prismarine", + Item::PrismarineStairs => "Prismarine Stairs", + Item::PrismarineBrickStairs => "Prismarine Brick Stairs", + Item::DarkPrismarineStairs => "Dark Prismarine Stairs", + Item::SeaLantern => "Sea Lantern", + Item::RedSandstone => "Red Sandstone", + Item::ChiseledRedSandstone => "Chiseled Red Sandstone", + Item::CutRedSandstone => "Cut Red Sandstone", + Item::RedSandstoneStairs => "Red Sandstone Stairs", + Item::RepeatingCommandBlock => "Repeating Command Block", + Item::ChainCommandBlock => "Chain Command Block", + Item::MagmaBlock => "Magma Block", + Item::NetherWartBlock => "Nether Wart Block", + Item::WarpedWartBlock => "Warped Wart Block", + Item::RedNetherBricks => "Red Nether Bricks", + Item::BoneBlock => "Bone Block", + Item::StructureVoid => "Structure Void", + Item::Observer => "Observer", + Item::ShulkerBox => "Shulker Box", + Item::WhiteShulkerBox => "White Shulker Box", + Item::OrangeShulkerBox => "Orange Shulker Box", + Item::MagentaShulkerBox => "Magenta Shulker Box", + Item::LightBlueShulkerBox => "Light Blue Shulker Box", + Item::YellowShulkerBox => "Yellow Shulker Box", + Item::LimeShulkerBox => "Lime Shulker Box", + Item::PinkShulkerBox => "Pink Shulker Box", + Item::GrayShulkerBox => "Gray Shulker Box", + Item::LightGrayShulkerBox => "Light Gray Shulker Box", + Item::CyanShulkerBox => "Cyan Shulker Box", + Item::PurpleShulkerBox => "Purple Shulker Box", + Item::BlueShulkerBox => "Blue Shulker Box", + Item::BrownShulkerBox => "Brown Shulker Box", + Item::GreenShulkerBox => "Green Shulker Box", + Item::RedShulkerBox => "Red Shulker Box", + Item::BlackShulkerBox => "Black Shulker Box", + Item::WhiteGlazedTerracotta => "White Glazed Terracotta", + Item::OrangeGlazedTerracotta => "Orange Glazed Terracotta", + Item::MagentaGlazedTerracotta => "Magenta Glazed Terracotta", + Item::LightBlueGlazedTerracotta => "Light Blue Glazed Terracotta", + Item::YellowGlazedTerracotta => "Yellow Glazed Terracotta", + Item::LimeGlazedTerracotta => "Lime Glazed Terracotta", + Item::PinkGlazedTerracotta => "Pink Glazed Terracotta", + Item::GrayGlazedTerracotta => "Gray Glazed Terracotta", + Item::LightGrayGlazedTerracotta => "Light Gray Glazed Terracotta", + Item::CyanGlazedTerracotta => "Cyan Glazed Terracotta", + Item::PurpleGlazedTerracotta => "Purple Glazed Terracotta", + Item::BlueGlazedTerracotta => "Blue Glazed Terracotta", + Item::BrownGlazedTerracotta => "Brown Glazed Terracotta", + Item::GreenGlazedTerracotta => "Green Glazed Terracotta", + Item::RedGlazedTerracotta => "Red Glazed Terracotta", + Item::BlackGlazedTerracotta => "Black Glazed Terracotta", + Item::WhiteConcrete => "White Concrete", + Item::OrangeConcrete => "Orange Concrete", + Item::MagentaConcrete => "Magenta Concrete", + Item::LightBlueConcrete => "Light Blue Concrete", + Item::YellowConcrete => "Yellow Concrete", + Item::LimeConcrete => "Lime Concrete", + Item::PinkConcrete => "Pink Concrete", + Item::GrayConcrete => "Gray Concrete", + Item::LightGrayConcrete => "Light Gray Concrete", + Item::CyanConcrete => "Cyan Concrete", + Item::PurpleConcrete => "Purple Concrete", + Item::BlueConcrete => "Blue Concrete", + Item::BrownConcrete => "Brown Concrete", + Item::GreenConcrete => "Green Concrete", + Item::RedConcrete => "Red Concrete", + Item::BlackConcrete => "Black Concrete", + Item::WhiteConcretePowder => "White Concrete Powder", + Item::OrangeConcretePowder => "Orange Concrete Powder", + Item::MagentaConcretePowder => "Magenta Concrete Powder", + Item::LightBlueConcretePowder => "Light Blue Concrete Powder", + Item::YellowConcretePowder => "Yellow Concrete Powder", + Item::LimeConcretePowder => "Lime Concrete Powder", + Item::PinkConcretePowder => "Pink Concrete Powder", + Item::GrayConcretePowder => "Gray Concrete Powder", + Item::LightGrayConcretePowder => "Light Gray Concrete Powder", + Item::CyanConcretePowder => "Cyan Concrete Powder", + Item::PurpleConcretePowder => "Purple Concrete Powder", + Item::BlueConcretePowder => "Blue Concrete Powder", + Item::BrownConcretePowder => "Brown Concrete Powder", + Item::GreenConcretePowder => "Green Concrete Powder", + Item::RedConcretePowder => "Red Concrete Powder", + Item::BlackConcretePowder => "Black Concrete Powder", + Item::TurtleEgg => "Turtle Egg", + Item::DeadTubeCoralBlock => "Dead Tube Coral Block", + Item::DeadBrainCoralBlock => "Dead Brain Coral Block", + Item::DeadBubbleCoralBlock => "Dead Bubble Coral Block", + Item::DeadFireCoralBlock => "Dead Fire Coral Block", + Item::DeadHornCoralBlock => "Dead Horn Coral Block", + Item::TubeCoralBlock => "Tube Coral Block", + Item::BrainCoralBlock => "Brain Coral Block", + Item::BubbleCoralBlock => "Bubble Coral Block", + Item::FireCoralBlock => "Fire Coral Block", + Item::HornCoralBlock => "Horn Coral Block", + Item::TubeCoral => "Tube Coral", + Item::BrainCoral => "Brain Coral", + Item::BubbleCoral => "Bubble Coral", + Item::FireCoral => "Fire Coral", + Item::HornCoral => "Horn Coral", + Item::DeadBrainCoral => "Dead Brain Coral", + Item::DeadBubbleCoral => "Dead Bubble Coral", + Item::DeadFireCoral => "Dead Fire Coral", + Item::DeadHornCoral => "Dead Horn Coral", + Item::DeadTubeCoral => "Dead Tube Coral", + Item::TubeCoralFan => "Tube Coral Fan", + Item::BrainCoralFan => "Brain Coral Fan", + Item::BubbleCoralFan => "Bubble Coral Fan", + Item::FireCoralFan => "Fire Coral Fan", + Item::HornCoralFan => "Horn Coral Fan", + Item::DeadTubeCoralFan => "Dead Tube Coral Fan", + Item::DeadBrainCoralFan => "Dead Brain Coral Fan", + Item::DeadBubbleCoralFan => "Dead Bubble Coral Fan", + Item::DeadFireCoralFan => "Dead Fire Coral Fan", + Item::DeadHornCoralFan => "Dead Horn Coral Fan", + Item::BlueIce => "Blue Ice", + Item::Conduit => "Conduit", + Item::PolishedGraniteStairs => "Polished Granite Stairs", + Item::SmoothRedSandstoneStairs => "Smooth Red Sandstone Stairs", + Item::MossyStoneBrickStairs => "Mossy Stone Brick Stairs", + Item::PolishedDioriteStairs => "Polished Diorite Stairs", + Item::MossyCobblestoneStairs => "Mossy Cobblestone Stairs", + Item::EndStoneBrickStairs => "End Stone Brick Stairs", + Item::StoneStairs => "Stone Stairs", + Item::SmoothSandstoneStairs => "Smooth Sandstone Stairs", + Item::SmoothQuartzStairs => "Smooth Quartz Stairs", + Item::GraniteStairs => "Granite Stairs", + Item::AndesiteStairs => "Andesite Stairs", + Item::RedNetherBrickStairs => "Red Nether Brick Stairs", + Item::PolishedAndesiteStairs => "Polished Andesite Stairs", + Item::DioriteStairs => "Diorite Stairs", + Item::PolishedGraniteSlab => "Polished Granite Slab", + Item::SmoothRedSandstoneSlab => "Smooth Red Sandstone Slab", + Item::MossyStoneBrickSlab => "Mossy Stone Brick Slab", + Item::PolishedDioriteSlab => "Polished Diorite Slab", + Item::MossyCobblestoneSlab => "Mossy Cobblestone Slab", + Item::EndStoneBrickSlab => "End Stone Brick Slab", + Item::SmoothSandstoneSlab => "Smooth Sandstone Slab", + Item::SmoothQuartzSlab => "Smooth Quartz Slab", + Item::GraniteSlab => "Granite Slab", + Item::AndesiteSlab => "Andesite Slab", + Item::RedNetherBrickSlab => "Red Nether Brick Slab", + Item::PolishedAndesiteSlab => "Polished Andesite Slab", + Item::DioriteSlab => "Diorite Slab", + Item::Scaffolding => "Scaffolding", + Item::IronDoor => "Iron Door", + Item::OakDoor => "Oak Door", + Item::SpruceDoor => "Spruce Door", + Item::BirchDoor => "Birch Door", + Item::JungleDoor => "Jungle Door", + Item::AcaciaDoor => "Acacia Door", + Item::DarkOakDoor => "Dark Oak Door", + Item::CrimsonDoor => "Crimson Door", + Item::WarpedDoor => "Warped Door", + Item::Repeater => "Redstone Repeater", + Item::Comparator => "Redstone Comparator", + Item::StructureBlock => "Structure Block", + Item::Jigsaw => "Jigsaw Block", + Item::TurtleHelmet => "Turtle Shell", + Item::Scute => "Scute", + Item::FlintAndSteel => "Flint and Steel", + Item::Apple => "Apple", + Item::Bow => "Bow", + Item::Arrow => "Arrow", + Item::Coal => "Coal", + Item::Charcoal => "Charcoal", + Item::Diamond => "Diamond", + Item::IronIngot => "Iron Ingot", + Item::GoldIngot => "Gold Ingot", + Item::NetheriteIngot => "Netherite Ingot", + Item::NetheriteScrap => "Netherite Scrap", + Item::WoodenSword => "Wooden Sword", + Item::WoodenShovel => "Wooden Shovel", + Item::WoodenPickaxe => "Wooden Pickaxe", + Item::WoodenAxe => "Wooden Axe", + Item::WoodenHoe => "Wooden Hoe", + Item::StoneSword => "Stone Sword", + Item::StoneShovel => "Stone Shovel", + Item::StonePickaxe => "Stone Pickaxe", + Item::StoneAxe => "Stone Axe", + Item::StoneHoe => "Stone Hoe", + Item::GoldenSword => "Golden Sword", + Item::GoldenShovel => "Golden Shovel", + Item::GoldenPickaxe => "Golden Pickaxe", + Item::GoldenAxe => "Golden Axe", + Item::GoldenHoe => "Golden Hoe", + Item::IronSword => "Iron Sword", + Item::IronShovel => "Iron Shovel", + Item::IronPickaxe => "Iron Pickaxe", + Item::IronAxe => "Iron Axe", + Item::IronHoe => "Iron Hoe", + Item::DiamondSword => "Diamond Sword", + Item::DiamondShovel => "Diamond Shovel", + Item::DiamondPickaxe => "Diamond Pickaxe", + Item::DiamondAxe => "Diamond Axe", + Item::DiamondHoe => "Diamond Hoe", + Item::NetheriteSword => "Netherite Sword", + Item::NetheriteShovel => "Netherite Shovel", + Item::NetheritePickaxe => "Netherite Pickaxe", + Item::NetheriteAxe => "Netherite Axe", + Item::NetheriteHoe => "Netherite Hoe", + Item::Stick => "Stick", + Item::Bowl => "Bowl", + Item::MushroomStew => "Mushroom Stew", + Item::String => "String", + Item::Feather => "Feather", + Item::Gunpowder => "Gunpowder", + Item::WheatSeeds => "Wheat Seeds", + Item::Wheat => "Wheat", + Item::Bread => "Bread", + Item::LeatherHelmet => "Leather Cap", + Item::LeatherChestplate => "Leather Tunic", + Item::LeatherLeggings => "Leather Pants", + Item::LeatherBoots => "Leather Boots", + Item::ChainmailHelmet => "Chainmail Helmet", + Item::ChainmailChestplate => "Chainmail Chestplate", + Item::ChainmailLeggings => "Chainmail Leggings", + Item::ChainmailBoots => "Chainmail Boots", + Item::IronHelmet => "Iron Helmet", + Item::IronChestplate => "Iron Chestplate", + Item::IronLeggings => "Iron Leggings", + Item::IronBoots => "Iron Boots", + Item::DiamondHelmet => "Diamond Helmet", + Item::DiamondChestplate => "Diamond Chestplate", + Item::DiamondLeggings => "Diamond Leggings", + Item::DiamondBoots => "Diamond Boots", + Item::GoldenHelmet => "Golden Helmet", + Item::GoldenChestplate => "Golden Chestplate", + Item::GoldenLeggings => "Golden Leggings", + Item::GoldenBoots => "Golden Boots", + Item::NetheriteHelmet => "Netherite Helmet", + Item::NetheriteChestplate => "Netherite Chestplate", + Item::NetheriteLeggings => "Netherite Leggings", + Item::NetheriteBoots => "Netherite Boots", + Item::Flint => "Flint", + Item::Porkchop => "Raw Porkchop", + Item::CookedPorkchop => "Cooked Porkchop", + Item::Painting => "Painting", + Item::GoldenApple => "Golden Apple", + Item::EnchantedGoldenApple => "Enchanted Golden Apple", + Item::OakSign => "Oak Sign", + Item::SpruceSign => "Spruce Sign", + Item::BirchSign => "Birch Sign", + Item::JungleSign => "Jungle Sign", + Item::AcaciaSign => "Acacia Sign", + Item::DarkOakSign => "Dark Oak Sign", + Item::CrimsonSign => "Crimson Sign", + Item::WarpedSign => "Warped Sign", + Item::Bucket => "Bucket", + Item::WaterBucket => "Water Bucket", + Item::LavaBucket => "Lava Bucket", + Item::Minecart => "Minecart", + Item::Saddle => "Saddle", + Item::Redstone => "Redstone Dust", + Item::Snowball => "Snowball", + Item::OakBoat => "Oak Boat", + Item::Leather => "Leather", + Item::MilkBucket => "Milk Bucket", + Item::PufferfishBucket => "Bucket of Pufferfish", + Item::SalmonBucket => "Bucket of Salmon", + Item::CodBucket => "Bucket of Cod", + Item::TropicalFishBucket => "Bucket of Tropical Fish", + Item::Brick => "Brick", + Item::ClayBall => "Clay Ball", + Item::DriedKelpBlock => "Dried Kelp Block", + Item::Paper => "Paper", + Item::Book => "Book", + Item::SlimeBall => "Slimeball", + Item::ChestMinecart => "Minecart with Chest", + Item::FurnaceMinecart => "Minecart with Furnace", + Item::Egg => "Egg", + Item::Compass => "Compass", + Item::FishingRod => "Fishing Rod", + Item::Clock => "Clock", + Item::GlowstoneDust => "Glowstone Dust", + Item::Cod => "Raw Cod", + Item::Salmon => "Raw Salmon", + Item::TropicalFish => "Tropical Fish", + Item::Pufferfish => "Pufferfish", + Item::CookedCod => "Cooked Cod", + Item::CookedSalmon => "Cooked Salmon", + Item::InkSac => "Ink Sac", + Item::CocoaBeans => "Cocoa Beans", + Item::LapisLazuli => "Lapis Lazuli", + Item::WhiteDye => "White Dye", + Item::OrangeDye => "Orange Dye", + Item::MagentaDye => "Magenta Dye", + Item::LightBlueDye => "Light Blue Dye", + Item::YellowDye => "Yellow Dye", + Item::LimeDye => "Lime Dye", + Item::PinkDye => "Pink Dye", + Item::GrayDye => "Gray Dye", + Item::LightGrayDye => "Light Gray Dye", + Item::CyanDye => "Cyan Dye", + Item::PurpleDye => "Purple Dye", + Item::BlueDye => "Blue Dye", + Item::BrownDye => "Brown Dye", + Item::GreenDye => "Green Dye", + Item::RedDye => "Red Dye", + Item::BlackDye => "Black Dye", + Item::BoneMeal => "Bone Meal", + Item::Bone => "Bone", + Item::Sugar => "Sugar", + Item::Cake => "Cake", + Item::WhiteBed => "White Bed", + Item::OrangeBed => "Orange Bed", + Item::MagentaBed => "Magenta Bed", + Item::LightBlueBed => "Light Blue Bed", + Item::YellowBed => "Yellow Bed", + Item::LimeBed => "Lime Bed", + Item::PinkBed => "Pink Bed", + Item::GrayBed => "Gray Bed", + Item::LightGrayBed => "Light Gray Bed", + Item::CyanBed => "Cyan Bed", + Item::PurpleBed => "Purple Bed", + Item::BlueBed => "Blue Bed", + Item::BrownBed => "Brown Bed", + Item::GreenBed => "Green Bed", + Item::RedBed => "Red Bed", + Item::BlackBed => "Black Bed", + Item::Cookie => "Cookie", + Item::FilledMap => "Map", + Item::Shears => "Shears", + Item::MelonSlice => "Melon Slice", + Item::DriedKelp => "Dried Kelp", + Item::PumpkinSeeds => "Pumpkin Seeds", + Item::MelonSeeds => "Melon Seeds", + Item::Beef => "Raw Beef", + Item::CookedBeef => "Steak", + Item::Chicken => "Raw Chicken", + Item::CookedChicken => "Cooked Chicken", + Item::RottenFlesh => "Rotten Flesh", + Item::EnderPearl => "Ender Pearl", + Item::BlazeRod => "Blaze Rod", + Item::GhastTear => "Ghast Tear", + Item::GoldNugget => "Gold Nugget", + Item::NetherWart => "Nether Wart", + Item::Potion => "Potion", + Item::GlassBottle => "Glass Bottle", + Item::SpiderEye => "Spider Eye", + Item::FermentedSpiderEye => "Fermented Spider Eye", + Item::BlazePowder => "Blaze Powder", + Item::MagmaCream => "Magma Cream", + Item::BrewingStand => "Brewing Stand", + Item::Cauldron => "Cauldron", + Item::EnderEye => "Eye of Ender", + Item::GlisteringMelonSlice => "Glistering Melon Slice", + Item::BatSpawnEgg => "Bat Spawn Egg", + Item::BeeSpawnEgg => "Bee Spawn Egg", + Item::BlazeSpawnEgg => "Blaze Spawn Egg", + Item::CatSpawnEgg => "Cat Spawn Egg", + Item::CaveSpiderSpawnEgg => "Cave Spider Spawn Egg", + Item::ChickenSpawnEgg => "Chicken Spawn Egg", + Item::CodSpawnEgg => "Cod Spawn Egg", + Item::CowSpawnEgg => "Cow Spawn Egg", + Item::CreeperSpawnEgg => "Creeper Spawn Egg", + Item::DolphinSpawnEgg => "Dolphin Spawn Egg", + Item::DonkeySpawnEgg => "Donkey Spawn Egg", + Item::DrownedSpawnEgg => "Drowned Spawn Egg", + Item::ElderGuardianSpawnEgg => "Elder Guardian Spawn Egg", + Item::EndermanSpawnEgg => "Enderman Spawn Egg", + Item::EndermiteSpawnEgg => "Endermite Spawn Egg", + Item::EvokerSpawnEgg => "Evoker Spawn Egg", + Item::FoxSpawnEgg => "Fox Spawn Egg", + Item::GhastSpawnEgg => "Ghast Spawn Egg", + Item::GuardianSpawnEgg => "Guardian Spawn Egg", + Item::HoglinSpawnEgg => "Hoglin Spawn Egg", + Item::HorseSpawnEgg => "Horse Spawn Egg", + Item::HuskSpawnEgg => "Husk Spawn Egg", + Item::LlamaSpawnEgg => "Llama Spawn Egg", + Item::MagmaCubeSpawnEgg => "Magma Cube Spawn Egg", + Item::MooshroomSpawnEgg => "Mooshroom Spawn Egg", + Item::MuleSpawnEgg => "Mule Spawn Egg", + Item::OcelotSpawnEgg => "Ocelot Spawn Egg", + Item::PandaSpawnEgg => "Panda Spawn Egg", + Item::ParrotSpawnEgg => "Parrot Spawn Egg", + Item::PhantomSpawnEgg => "Phantom Spawn Egg", + Item::PigSpawnEgg => "Pig Spawn Egg", + Item::PiglinSpawnEgg => "Piglin Spawn Egg", + Item::PiglinBruteSpawnEgg => "Piglin Brute Spawn Egg", + Item::PillagerSpawnEgg => "Pillager Spawn Egg", + Item::PolarBearSpawnEgg => "Polar Bear Spawn Egg", + Item::PufferfishSpawnEgg => "Pufferfish Spawn Egg", + Item::RabbitSpawnEgg => "Rabbit Spawn Egg", + Item::RavagerSpawnEgg => "Ravager Spawn Egg", + Item::SalmonSpawnEgg => "Salmon Spawn Egg", + Item::SheepSpawnEgg => "Sheep Spawn Egg", + Item::ShulkerSpawnEgg => "Shulker Spawn Egg", + Item::SilverfishSpawnEgg => "Silverfish Spawn Egg", + Item::SkeletonSpawnEgg => "Skeleton Spawn Egg", + Item::SkeletonHorseSpawnEgg => "Skeleton Horse Spawn Egg", + Item::SlimeSpawnEgg => "Slime Spawn Egg", + Item::SpiderSpawnEgg => "Spider Spawn Egg", + Item::SquidSpawnEgg => "Squid Spawn Egg", + Item::StraySpawnEgg => "Stray Spawn Egg", + Item::StriderSpawnEgg => "Strider Spawn Egg", + Item::TraderLlamaSpawnEgg => "Trader Llama Spawn Egg", + Item::TropicalFishSpawnEgg => "Tropical Fish Spawn Egg", + Item::TurtleSpawnEgg => "Turtle Spawn Egg", + Item::VexSpawnEgg => "Vex Spawn Egg", + Item::VillagerSpawnEgg => "Villager Spawn Egg", + Item::VindicatorSpawnEgg => "Vindicator Spawn Egg", + Item::WanderingTraderSpawnEgg => "Wandering Trader Spawn Egg", + Item::WitchSpawnEgg => "Witch Spawn Egg", + Item::WitherSkeletonSpawnEgg => "Wither Skeleton Spawn Egg", + Item::WolfSpawnEgg => "Wolf Spawn Egg", + Item::ZoglinSpawnEgg => "Zoglin Spawn Egg", + Item::ZombieSpawnEgg => "Zombie Spawn Egg", + Item::ZombieHorseSpawnEgg => "Zombie Horse Spawn Egg", + Item::ZombieVillagerSpawnEgg => "Zombie Villager Spawn Egg", + Item::ZombifiedPiglinSpawnEgg => "Zombified Piglin Spawn Egg", + Item::ExperienceBottle => "Bottle o' Enchanting", + Item::FireCharge => "Fire Charge", + Item::WritableBook => "Book and Quill", + Item::WrittenBook => "Written Book", + Item::Emerald => "Emerald", + Item::ItemFrame => "Item Frame", + Item::FlowerPot => "Flower Pot", + Item::Carrot => "Carrot", + Item::Potato => "Potato", + Item::BakedPotato => "Baked Potato", + Item::PoisonousPotato => "Poisonous Potato", + Item::Map => "Empty Map", + Item::GoldenCarrot => "Golden Carrot", + Item::SkeletonSkull => "Skeleton Skull", + Item::WitherSkeletonSkull => "Wither Skeleton Skull", + Item::PlayerHead => "Player Head", + Item::ZombieHead => "Zombie Head", + Item::CreeperHead => "Creeper Head", + Item::DragonHead => "Dragon Head", + Item::CarrotOnAStick => "Carrot on a Stick", + Item::WarpedFungusOnAStick => "Warped Fungus on a Stick", + Item::NetherStar => "Nether Star", + Item::PumpkinPie => "Pumpkin Pie", + Item::FireworkRocket => "Firework Rocket", + Item::FireworkStar => "Firework Star", + Item::EnchantedBook => "Enchanted Book", + Item::NetherBrick => "Nether Brick", + Item::Quartz => "Nether Quartz", + Item::TntMinecart => "Minecart with TNT", + Item::HopperMinecart => "Minecart with Hopper", + Item::PrismarineShard => "Prismarine Shard", + Item::PrismarineCrystals => "Prismarine Crystals", + Item::Rabbit => "Raw Rabbit", + Item::CookedRabbit => "Cooked Rabbit", + Item::RabbitStew => "Rabbit Stew", + Item::RabbitFoot => "Rabbit's Foot", + Item::RabbitHide => "Rabbit Hide", + Item::ArmorStand => "Armor Stand", + Item::IronHorseArmor => "Iron Horse Armor", + Item::GoldenHorseArmor => "Golden Horse Armor", + Item::DiamondHorseArmor => "Diamond Horse Armor", + Item::LeatherHorseArmor => "Leather Horse Armor", + Item::Lead => "Lead", + Item::NameTag => "Name Tag", + Item::CommandBlockMinecart => "Minecart with Command Block", + Item::Mutton => "Raw Mutton", + Item::CookedMutton => "Cooked Mutton", + Item::WhiteBanner => "White Banner", + Item::OrangeBanner => "Orange Banner", + Item::MagentaBanner => "Magenta Banner", + Item::LightBlueBanner => "Light Blue Banner", + Item::YellowBanner => "Yellow Banner", + Item::LimeBanner => "Lime Banner", + Item::PinkBanner => "Pink Banner", + Item::GrayBanner => "Gray Banner", + Item::LightGrayBanner => "Light Gray Banner", + Item::CyanBanner => "Cyan Banner", + Item::PurpleBanner => "Purple Banner", + Item::BlueBanner => "Blue Banner", + Item::BrownBanner => "Brown Banner", + Item::GreenBanner => "Green Banner", + Item::RedBanner => "Red Banner", + Item::BlackBanner => "Black Banner", + Item::EndCrystal => "End Crystal", + Item::ChorusFruit => "Chorus Fruit", + Item::PoppedChorusFruit => "Popped Chorus Fruit", + Item::Beetroot => "Beetroot", + Item::BeetrootSeeds => "Beetroot Seeds", + Item::BeetrootSoup => "Beetroot Soup", + Item::DragonBreath => "Dragon's Breath", + Item::SplashPotion => "Splash Potion", + Item::SpectralArrow => "Spectral Arrow", + Item::TippedArrow => "Tipped Arrow", + Item::LingeringPotion => "Lingering Potion", + Item::Shield => "Shield", + Item::Elytra => "Elytra", + Item::SpruceBoat => "Spruce Boat", + Item::BirchBoat => "Birch Boat", + Item::JungleBoat => "Jungle Boat", + Item::AcaciaBoat => "Acacia Boat", + Item::DarkOakBoat => "Dark Oak Boat", + Item::TotemOfUndying => "Totem of Undying", + Item::ShulkerShell => "Shulker Shell", + Item::IronNugget => "Iron Nugget", + Item::KnowledgeBook => "Knowledge Book", + Item::DebugStick => "Debug Stick", + Item::MusicDisc13 => "13 Disc", + Item::MusicDiscCat => "Cat Disc", + Item::MusicDiscBlocks => "Blocks Disc", + Item::MusicDiscChirp => "Chirp Disc", + Item::MusicDiscFar => "Far Disc", + Item::MusicDiscMall => "Mall Disc", + Item::MusicDiscMellohi => "Mellohi Disc", + Item::MusicDiscStal => "Stal Disc", + Item::MusicDiscStrad => "Strad Disc", + Item::MusicDiscWard => "Ward Disc", + Item::MusicDisc11 => "11 Disc", + Item::MusicDiscWait => "Wait Disc", + Item::MusicDiscPigstep => "Music Disc", + Item::Trident => "Trident", + Item::PhantomMembrane => "Phantom Membrane", + Item::NautilusShell => "Nautilus Shell", + Item::HeartOfTheSea => "Heart of the Sea", + Item::Crossbow => "Crossbow", + Item::SuspiciousStew => "Suspicious Stew", + Item::Loom => "Loom", + Item::FlowerBannerPattern => "Banner Pattern", + Item::CreeperBannerPattern => "Banner Pattern", + Item::SkullBannerPattern => "Banner Pattern", + Item::MojangBannerPattern => "Banner Pattern", + Item::GlobeBannerPattern => "Banner Pattern", + Item::PiglinBannerPattern => "Banner Pattern", + Item::Composter => "Composter", + Item::Barrel => "Barrel", + Item::Smoker => "Smoker", + Item::BlastFurnace => "Blast Furnace", + Item::CartographyTable => "Cartography Table", + Item::FletchingTable => "Fletching Table", + Item::Grindstone => "Grindstone", + Item::Lectern => "Lectern", + Item::SmithingTable => "Smithing Table", + Item::Stonecutter => "Stonecutter", + Item::Bell => "Bell", + Item::Lantern => "Lantern", + Item::SoulLantern => "Soul Lantern", + Item::SweetBerries => "Sweet Berries", + Item::Campfire => "Campfire", + Item::SoulCampfire => "Soul Campfire", + Item::Shroomlight => "Shroomlight", + Item::Honeycomb => "Honeycomb", + Item::BeeNest => "Bee Nest", + Item::Beehive => "Beehive", + Item::HoneyBottle => "Honey Bottle", + Item::HoneyBlock => "Honey Block", + Item::HoneycombBlock => "Honeycomb Block", + Item::Lodestone => "Lodestone", + Item::NetheriteBlock => "Block of Netherite", + Item::AncientDebris => "Ancient Debris", + Item::Target => "Target", + Item::CryingObsidian => "Crying Obsidian", + Item::Blackstone => "Blackstone", + Item::BlackstoneSlab => "Blackstone Slab", + Item::BlackstoneStairs => "Blackstone Stairs", + Item::GildedBlackstone => "Gilded Blackstone", + Item::PolishedBlackstone => "Polished Blackstone", + Item::PolishedBlackstoneSlab => "Polished Blackstone Slab", + Item::PolishedBlackstoneStairs => "Polished Blackstone Stairs", + Item::ChiseledPolishedBlackstone => "Chiseled Polished Blackstone", + Item::PolishedBlackstoneBricks => "Polished Blackstone Bricks", + Item::PolishedBlackstoneBrickSlab => "Polished Blackstone Brick Slab", + Item::PolishedBlackstoneBrickStairs => "Polished Blackstone Brick Stairs", + Item::CrackedPolishedBlackstoneBricks => "Cracked Polished Blackstone Bricks", + Item::RespawnAnchor => "Respawn Anchor", + } + } + + /// Gets a `Item` by its `display_name`. + pub fn from_display_name(display_name: &str) -> Option { + match display_name { + "Air" => Some(Item::Air), + "Stone" => Some(Item::Stone), + "Granite" => Some(Item::Granite), + "Polished Granite" => Some(Item::PolishedGranite), + "Diorite" => Some(Item::Diorite), + "Polished Diorite" => Some(Item::PolishedDiorite), + "Andesite" => Some(Item::Andesite), + "Polished Andesite" => Some(Item::PolishedAndesite), + "Grass Block" => Some(Item::GrassBlock), + "Dirt" => Some(Item::Dirt), + "Coarse Dirt" => Some(Item::CoarseDirt), + "Podzol" => Some(Item::Podzol), + "Crimson Nylium" => Some(Item::CrimsonNylium), + "Warped Nylium" => Some(Item::WarpedNylium), + "Cobblestone" => Some(Item::Cobblestone), + "Oak Planks" => Some(Item::OakPlanks), + "Spruce Planks" => Some(Item::SprucePlanks), + "Birch Planks" => Some(Item::BirchPlanks), + "Jungle Planks" => Some(Item::JunglePlanks), + "Acacia Planks" => Some(Item::AcaciaPlanks), + "Dark Oak Planks" => Some(Item::DarkOakPlanks), + "Crimson Planks" => Some(Item::CrimsonPlanks), + "Warped Planks" => Some(Item::WarpedPlanks), + "Oak Sapling" => Some(Item::OakSapling), + "Spruce Sapling" => Some(Item::SpruceSapling), + "Birch Sapling" => Some(Item::BirchSapling), + "Jungle Sapling" => Some(Item::JungleSapling), + "Acacia Sapling" => Some(Item::AcaciaSapling), + "Dark Oak Sapling" => Some(Item::DarkOakSapling), + "Bedrock" => Some(Item::Bedrock), + "Sand" => Some(Item::Sand), + "Red Sand" => Some(Item::RedSand), + "Gravel" => Some(Item::Gravel), + "Gold Ore" => Some(Item::GoldOre), + "Iron Ore" => Some(Item::IronOre), + "Coal Ore" => Some(Item::CoalOre), + "Nether Gold Ore" => Some(Item::NetherGoldOre), + "Oak Log" => Some(Item::OakLog), + "Spruce Log" => Some(Item::SpruceLog), + "Birch Log" => Some(Item::BirchLog), + "Jungle Log" => Some(Item::JungleLog), + "Acacia Log" => Some(Item::AcaciaLog), + "Dark Oak Log" => Some(Item::DarkOakLog), + "Crimson Stem" => Some(Item::CrimsonStem), + "Warped Stem" => Some(Item::WarpedStem), + "Stripped Oak Log" => Some(Item::StrippedOakLog), + "Stripped Spruce Log" => Some(Item::StrippedSpruceLog), + "Stripped Birch Log" => Some(Item::StrippedBirchLog), + "Stripped Jungle Log" => Some(Item::StrippedJungleLog), + "Stripped Acacia Log" => Some(Item::StrippedAcaciaLog), + "Stripped Dark Oak Log" => Some(Item::StrippedDarkOakLog), + "Stripped Crimson Stem" => Some(Item::StrippedCrimsonStem), + "Stripped Warped Stem" => Some(Item::StrippedWarpedStem), + "Stripped Oak Wood" => Some(Item::StrippedOakWood), + "Stripped Spruce Wood" => Some(Item::StrippedSpruceWood), + "Stripped Birch Wood" => Some(Item::StrippedBirchWood), + "Stripped Jungle Wood" => Some(Item::StrippedJungleWood), + "Stripped Acacia Wood" => Some(Item::StrippedAcaciaWood), + "Stripped Dark Oak Wood" => Some(Item::StrippedDarkOakWood), + "Stripped Crimson Hyphae" => Some(Item::StrippedCrimsonHyphae), + "Stripped Warped Hyphae" => Some(Item::StrippedWarpedHyphae), + "Oak Wood" => Some(Item::OakWood), + "Spruce Wood" => Some(Item::SpruceWood), + "Birch Wood" => Some(Item::BirchWood), + "Jungle Wood" => Some(Item::JungleWood), + "Acacia Wood" => Some(Item::AcaciaWood), + "Dark Oak Wood" => Some(Item::DarkOakWood), + "Crimson Hyphae" => Some(Item::CrimsonHyphae), + "Warped Hyphae" => Some(Item::WarpedHyphae), + "Oak Leaves" => Some(Item::OakLeaves), + "Spruce Leaves" => Some(Item::SpruceLeaves), + "Birch Leaves" => Some(Item::BirchLeaves), + "Jungle Leaves" => Some(Item::JungleLeaves), + "Acacia Leaves" => Some(Item::AcaciaLeaves), + "Dark Oak Leaves" => Some(Item::DarkOakLeaves), + "Sponge" => Some(Item::Sponge), + "Wet Sponge" => Some(Item::WetSponge), + "Glass" => Some(Item::Glass), + "Lapis Lazuli Ore" => Some(Item::LapisOre), + "Lapis Lazuli Block" => Some(Item::LapisBlock), + "Dispenser" => Some(Item::Dispenser), + "Sandstone" => Some(Item::Sandstone), + "Chiseled Sandstone" => Some(Item::ChiseledSandstone), + "Cut Sandstone" => Some(Item::CutSandstone), + "Note Block" => Some(Item::NoteBlock), + "Powered Rail" => Some(Item::PoweredRail), + "Detector Rail" => Some(Item::DetectorRail), + "Sticky Piston" => Some(Item::StickyPiston), + "Cobweb" => Some(Item::Cobweb), + "Grass" => Some(Item::Grass), + "Fern" => Some(Item::Fern), + "Dead Bush" => Some(Item::DeadBush), + "Seagrass" => Some(Item::Seagrass), + "Sea Pickle" => Some(Item::SeaPickle), + "Piston" => Some(Item::Piston), + "White Wool" => Some(Item::WhiteWool), + "Orange Wool" => Some(Item::OrangeWool), + "Magenta Wool" => Some(Item::MagentaWool), + "Light Blue Wool" => Some(Item::LightBlueWool), + "Yellow Wool" => Some(Item::YellowWool), + "Lime Wool" => Some(Item::LimeWool), + "Pink Wool" => Some(Item::PinkWool), + "Gray Wool" => Some(Item::GrayWool), + "Light Gray Wool" => Some(Item::LightGrayWool), + "Cyan Wool" => Some(Item::CyanWool), + "Purple Wool" => Some(Item::PurpleWool), + "Blue Wool" => Some(Item::BlueWool), + "Brown Wool" => Some(Item::BrownWool), + "Green Wool" => Some(Item::GreenWool), + "Red Wool" => Some(Item::RedWool), + "Black Wool" => Some(Item::BlackWool), + "Dandelion" => Some(Item::Dandelion), + "Poppy" => Some(Item::Poppy), + "Blue Orchid" => Some(Item::BlueOrchid), + "Allium" => Some(Item::Allium), + "Azure Bluet" => Some(Item::AzureBluet), + "Red Tulip" => Some(Item::RedTulip), + "Orange Tulip" => Some(Item::OrangeTulip), + "White Tulip" => Some(Item::WhiteTulip), + "Pink Tulip" => Some(Item::PinkTulip), + "Oxeye Daisy" => Some(Item::OxeyeDaisy), + "Cornflower" => Some(Item::Cornflower), + "Lily of the Valley" => Some(Item::LilyOfTheValley), + "Wither Rose" => Some(Item::WitherRose), + "Brown Mushroom" => Some(Item::BrownMushroom), + "Red Mushroom" => Some(Item::RedMushroom), + "Crimson Fungus" => Some(Item::CrimsonFungus), + "Warped Fungus" => Some(Item::WarpedFungus), + "Crimson Roots" => Some(Item::CrimsonRoots), + "Warped Roots" => Some(Item::WarpedRoots), + "Nether Sprouts" => Some(Item::NetherSprouts), + "Weeping Vines" => Some(Item::WeepingVines), + "Twisting Vines" => Some(Item::TwistingVines), + "Sugar Cane" => Some(Item::SugarCane), + "Kelp" => Some(Item::Kelp), + "Bamboo" => Some(Item::Bamboo), + "Block of Gold" => Some(Item::GoldBlock), + "Block of Iron" => Some(Item::IronBlock), + "Oak Slab" => Some(Item::OakSlab), + "Spruce Slab" => Some(Item::SpruceSlab), + "Birch Slab" => Some(Item::BirchSlab), + "Jungle Slab" => Some(Item::JungleSlab), + "Acacia Slab" => Some(Item::AcaciaSlab), + "Dark Oak Slab" => Some(Item::DarkOakSlab), + "Crimson Slab" => Some(Item::CrimsonSlab), + "Warped Slab" => Some(Item::WarpedSlab), + "Stone Slab" => Some(Item::StoneSlab), + "Smooth Stone Slab" => Some(Item::SmoothStoneSlab), + "Sandstone Slab" => Some(Item::SandstoneSlab), + "Cut Sandstone Slab" => Some(Item::CutSandstoneSlab), + "Petrified Oak Slab" => Some(Item::PetrifiedOakSlab), + "Cobblestone Slab" => Some(Item::CobblestoneSlab), + "Brick Slab" => Some(Item::BrickSlab), + "Stone Brick Slab" => Some(Item::StoneBrickSlab), + "Nether Brick Slab" => Some(Item::NetherBrickSlab), + "Quartz Slab" => Some(Item::QuartzSlab), + "Red Sandstone Slab" => Some(Item::RedSandstoneSlab), + "Cut Red Sandstone Slab" => Some(Item::CutRedSandstoneSlab), + "Purpur Slab" => Some(Item::PurpurSlab), + "Prismarine Slab" => Some(Item::PrismarineSlab), + "Prismarine Brick Slab" => Some(Item::PrismarineBrickSlab), + "Dark Prismarine Slab" => Some(Item::DarkPrismarineSlab), + "Smooth Quartz Block" => Some(Item::SmoothQuartz), + "Smooth Red Sandstone" => Some(Item::SmoothRedSandstone), + "Smooth Sandstone" => Some(Item::SmoothSandstone), + "Smooth Stone" => Some(Item::SmoothStone), + "Bricks" => Some(Item::Bricks), + "TNT" => Some(Item::Tnt), + "Bookshelf" => Some(Item::Bookshelf), + "Mossy Cobblestone" => Some(Item::MossyCobblestone), + "Obsidian" => Some(Item::Obsidian), + "Torch" => Some(Item::Torch), + "End Rod" => Some(Item::EndRod), + "Chorus Plant" => Some(Item::ChorusPlant), + "Chorus Flower" => Some(Item::ChorusFlower), + "Purpur Block" => Some(Item::PurpurBlock), + "Purpur Pillar" => Some(Item::PurpurPillar), + "Purpur Stairs" => Some(Item::PurpurStairs), + "Spawner" => Some(Item::Spawner), + "Oak Stairs" => Some(Item::OakStairs), + "Chest" => Some(Item::Chest), + "Diamond Ore" => Some(Item::DiamondOre), + "Block of Diamond" => Some(Item::DiamondBlock), + "Crafting Table" => Some(Item::CraftingTable), + "Farmland" => Some(Item::Farmland), + "Furnace" => Some(Item::Furnace), + "Ladder" => Some(Item::Ladder), + "Rail" => Some(Item::Rail), + "Cobblestone Stairs" => Some(Item::CobblestoneStairs), + "Lever" => Some(Item::Lever), + "Stone Pressure Plate" => Some(Item::StonePressurePlate), + "Oak Pressure Plate" => Some(Item::OakPressurePlate), + "Spruce Pressure Plate" => Some(Item::SprucePressurePlate), + "Birch Pressure Plate" => Some(Item::BirchPressurePlate), + "Jungle Pressure Plate" => Some(Item::JunglePressurePlate), + "Acacia Pressure Plate" => Some(Item::AcaciaPressurePlate), + "Dark Oak Pressure Plate" => Some(Item::DarkOakPressurePlate), + "Crimson Pressure Plate" => Some(Item::CrimsonPressurePlate), + "Warped Pressure Plate" => Some(Item::WarpedPressurePlate), + "Polished Blackstone Pressure Plate" => Some(Item::PolishedBlackstonePressurePlate), + "Redstone Ore" => Some(Item::RedstoneOre), + "Redstone Torch" => Some(Item::RedstoneTorch), + "Snow" => Some(Item::Snow), + "Ice" => Some(Item::Ice), + "Snow Block" => Some(Item::SnowBlock), + "Cactus" => Some(Item::Cactus), + "Clay" => Some(Item::Clay), + "Jukebox" => Some(Item::Jukebox), + "Oak Fence" => Some(Item::OakFence), + "Spruce Fence" => Some(Item::SpruceFence), + "Birch Fence" => Some(Item::BirchFence), + "Jungle Fence" => Some(Item::JungleFence), + "Acacia Fence" => Some(Item::AcaciaFence), + "Dark Oak Fence" => Some(Item::DarkOakFence), + "Crimson Fence" => Some(Item::CrimsonFence), + "Warped Fence" => Some(Item::WarpedFence), + "Pumpkin" => Some(Item::Pumpkin), + "Carved Pumpkin" => Some(Item::CarvedPumpkin), + "Netherrack" => Some(Item::Netherrack), + "Soul Sand" => Some(Item::SoulSand), + "Soul Soil" => Some(Item::SoulSoil), + "Basalt" => Some(Item::Basalt), + "Polished Basalt" => Some(Item::PolishedBasalt), + "Soul Torch" => Some(Item::SoulTorch), + "Glowstone" => Some(Item::Glowstone), + "Jack o'Lantern" => Some(Item::JackOLantern), + "Oak Trapdoor" => Some(Item::OakTrapdoor), + "Spruce Trapdoor" => Some(Item::SpruceTrapdoor), + "Birch Trapdoor" => Some(Item::BirchTrapdoor), + "Jungle Trapdoor" => Some(Item::JungleTrapdoor), + "Acacia Trapdoor" => Some(Item::AcaciaTrapdoor), + "Dark Oak Trapdoor" => Some(Item::DarkOakTrapdoor), + "Crimson Trapdoor" => Some(Item::CrimsonTrapdoor), + "Warped Trapdoor" => Some(Item::WarpedTrapdoor), + "Infested Stone" => Some(Item::InfestedStone), + "Infested Cobblestone" => Some(Item::InfestedCobblestone), + "Infested Stone Bricks" => Some(Item::InfestedStoneBricks), + "Infested Mossy Stone Bricks" => Some(Item::InfestedMossyStoneBricks), + "Infested Cracked Stone Bricks" => Some(Item::InfestedCrackedStoneBricks), + "Infested Chiseled Stone Bricks" => Some(Item::InfestedChiseledStoneBricks), + "Stone Bricks" => Some(Item::StoneBricks), + "Mossy Stone Bricks" => Some(Item::MossyStoneBricks), + "Cracked Stone Bricks" => Some(Item::CrackedStoneBricks), + "Chiseled Stone Bricks" => Some(Item::ChiseledStoneBricks), + "Brown Mushroom Block" => Some(Item::BrownMushroomBlock), + "Red Mushroom Block" => Some(Item::RedMushroomBlock), + "Mushroom Stem" => Some(Item::MushroomStem), + "Iron Bars" => Some(Item::IronBars), + "Chain" => Some(Item::Chain), + "Glass Pane" => Some(Item::GlassPane), + "Melon" => Some(Item::Melon), + "Vines" => Some(Item::Vine), + "Oak Fence Gate" => Some(Item::OakFenceGate), + "Spruce Fence Gate" => Some(Item::SpruceFenceGate), + "Birch Fence Gate" => Some(Item::BirchFenceGate), + "Jungle Fence Gate" => Some(Item::JungleFenceGate), + "Acacia Fence Gate" => Some(Item::AcaciaFenceGate), + "Dark Oak Fence Gate" => Some(Item::DarkOakFenceGate), + "Crimson Fence Gate" => Some(Item::CrimsonFenceGate), + "Warped Fence Gate" => Some(Item::WarpedFenceGate), + "Brick Stairs" => Some(Item::BrickStairs), + "Stone Brick Stairs" => Some(Item::StoneBrickStairs), + "Mycelium" => Some(Item::Mycelium), + "Lily Pad" => Some(Item::LilyPad), + "Nether Bricks" => Some(Item::NetherBricks), + "Cracked Nether Bricks" => Some(Item::CrackedNetherBricks), + "Chiseled Nether Bricks" => Some(Item::ChiseledNetherBricks), + "Nether Brick Fence" => Some(Item::NetherBrickFence), + "Nether Brick Stairs" => Some(Item::NetherBrickStairs), + "Enchanting Table" => Some(Item::EnchantingTable), + "End Portal Frame" => Some(Item::EndPortalFrame), + "End Stone" => Some(Item::EndStone), + "End Stone Bricks" => Some(Item::EndStoneBricks), + "Dragon Egg" => Some(Item::DragonEgg), + "Redstone Lamp" => Some(Item::RedstoneLamp), + "Sandstone Stairs" => Some(Item::SandstoneStairs), + "Emerald Ore" => Some(Item::EmeraldOre), + "Ender Chest" => Some(Item::EnderChest), + "Tripwire Hook" => Some(Item::TripwireHook), + "Block of Emerald" => Some(Item::EmeraldBlock), + "Spruce Stairs" => Some(Item::SpruceStairs), + "Birch Stairs" => Some(Item::BirchStairs), + "Jungle Stairs" => Some(Item::JungleStairs), + "Crimson Stairs" => Some(Item::CrimsonStairs), + "Warped Stairs" => Some(Item::WarpedStairs), + "Command Block" => Some(Item::CommandBlock), + "Beacon" => Some(Item::Beacon), + "Cobblestone Wall" => Some(Item::CobblestoneWall), + "Mossy Cobblestone Wall" => Some(Item::MossyCobblestoneWall), + "Brick Wall" => Some(Item::BrickWall), + "Prismarine Wall" => Some(Item::PrismarineWall), + "Red Sandstone Wall" => Some(Item::RedSandstoneWall), + "Mossy Stone Brick Wall" => Some(Item::MossyStoneBrickWall), + "Granite Wall" => Some(Item::GraniteWall), + "Stone Brick Wall" => Some(Item::StoneBrickWall), + "Nether Brick Wall" => Some(Item::NetherBrickWall), + "Andesite Wall" => Some(Item::AndesiteWall), + "Red Nether Brick Wall" => Some(Item::RedNetherBrickWall), + "Sandstone Wall" => Some(Item::SandstoneWall), + "End Stone Brick Wall" => Some(Item::EndStoneBrickWall), + "Diorite Wall" => Some(Item::DioriteWall), + "Blackstone Wall" => Some(Item::BlackstoneWall), + "Polished Blackstone Wall" => Some(Item::PolishedBlackstoneWall), + "Polished Blackstone Brick Wall" => Some(Item::PolishedBlackstoneBrickWall), + "Stone Button" => Some(Item::StoneButton), + "Oak Button" => Some(Item::OakButton), + "Spruce Button" => Some(Item::SpruceButton), + "Birch Button" => Some(Item::BirchButton), + "Jungle Button" => Some(Item::JungleButton), + "Acacia Button" => Some(Item::AcaciaButton), + "Dark Oak Button" => Some(Item::DarkOakButton), + "Crimson Button" => Some(Item::CrimsonButton), + "Warped Button" => Some(Item::WarpedButton), + "Polished Blackstone Button" => Some(Item::PolishedBlackstoneButton), + "Anvil" => Some(Item::Anvil), + "Chipped Anvil" => Some(Item::ChippedAnvil), + "Damaged Anvil" => Some(Item::DamagedAnvil), + "Trapped Chest" => Some(Item::TrappedChest), + "Light Weighted Pressure Plate" => Some(Item::LightWeightedPressurePlate), + "Heavy Weighted Pressure Plate" => Some(Item::HeavyWeightedPressurePlate), + "Daylight Detector" => Some(Item::DaylightDetector), + "Block of Redstone" => Some(Item::RedstoneBlock), + "Nether Quartz Ore" => Some(Item::NetherQuartzOre), + "Hopper" => Some(Item::Hopper), + "Chiseled Quartz Block" => Some(Item::ChiseledQuartzBlock), + "Block of Quartz" => Some(Item::QuartzBlock), + "Quartz Bricks" => Some(Item::QuartzBricks), + "Quartz Pillar" => Some(Item::QuartzPillar), + "Quartz Stairs" => Some(Item::QuartzStairs), + "Activator Rail" => Some(Item::ActivatorRail), + "Dropper" => Some(Item::Dropper), + "White Terracotta" => Some(Item::WhiteTerracotta), + "Orange Terracotta" => Some(Item::OrangeTerracotta), + "Magenta Terracotta" => Some(Item::MagentaTerracotta), + "Light Blue Terracotta" => Some(Item::LightBlueTerracotta), + "Yellow Terracotta" => Some(Item::YellowTerracotta), + "Lime Terracotta" => Some(Item::LimeTerracotta), + "Pink Terracotta" => Some(Item::PinkTerracotta), + "Gray Terracotta" => Some(Item::GrayTerracotta), + "Light Gray Terracotta" => Some(Item::LightGrayTerracotta), + "Cyan Terracotta" => Some(Item::CyanTerracotta), + "Purple Terracotta" => Some(Item::PurpleTerracotta), + "Blue Terracotta" => Some(Item::BlueTerracotta), + "Brown Terracotta" => Some(Item::BrownTerracotta), + "Green Terracotta" => Some(Item::GreenTerracotta), + "Red Terracotta" => Some(Item::RedTerracotta), + "Black Terracotta" => Some(Item::BlackTerracotta), + "Barrier" => Some(Item::Barrier), + "Iron Trapdoor" => Some(Item::IronTrapdoor), + "Hay Bale" => Some(Item::HayBlock), + "White Carpet" => Some(Item::WhiteCarpet), + "Orange Carpet" => Some(Item::OrangeCarpet), + "Magenta Carpet" => Some(Item::MagentaCarpet), + "Light Blue Carpet" => Some(Item::LightBlueCarpet), + "Yellow Carpet" => Some(Item::YellowCarpet), + "Lime Carpet" => Some(Item::LimeCarpet), + "Pink Carpet" => Some(Item::PinkCarpet), + "Gray Carpet" => Some(Item::GrayCarpet), + "Light Gray Carpet" => Some(Item::LightGrayCarpet), + "Cyan Carpet" => Some(Item::CyanCarpet), + "Purple Carpet" => Some(Item::PurpleCarpet), + "Blue Carpet" => Some(Item::BlueCarpet), + "Brown Carpet" => Some(Item::BrownCarpet), + "Green Carpet" => Some(Item::GreenCarpet), + "Red Carpet" => Some(Item::RedCarpet), + "Black Carpet" => Some(Item::BlackCarpet), + "Terracotta" => Some(Item::Terracotta), + "Block of Coal" => Some(Item::CoalBlock), + "Packed Ice" => Some(Item::PackedIce), + "Acacia Stairs" => Some(Item::AcaciaStairs), + "Dark Oak Stairs" => Some(Item::DarkOakStairs), + "Slime Block" => Some(Item::SlimeBlock), + "Grass Path" => Some(Item::GrassPath), + "Sunflower" => Some(Item::Sunflower), + "Lilac" => Some(Item::Lilac), + "Rose Bush" => Some(Item::RoseBush), + "Peony" => Some(Item::Peony), + "Tall Grass" => Some(Item::TallGrass), + "Large Fern" => Some(Item::LargeFern), + "White Stained Glass" => Some(Item::WhiteStainedGlass), + "Orange Stained Glass" => Some(Item::OrangeStainedGlass), + "Magenta Stained Glass" => Some(Item::MagentaStainedGlass), + "Light Blue Stained Glass" => Some(Item::LightBlueStainedGlass), + "Yellow Stained Glass" => Some(Item::YellowStainedGlass), + "Lime Stained Glass" => Some(Item::LimeStainedGlass), + "Pink Stained Glass" => Some(Item::PinkStainedGlass), + "Gray Stained Glass" => Some(Item::GrayStainedGlass), + "Light Gray Stained Glass" => Some(Item::LightGrayStainedGlass), + "Cyan Stained Glass" => Some(Item::CyanStainedGlass), + "Purple Stained Glass" => Some(Item::PurpleStainedGlass), + "Blue Stained Glass" => Some(Item::BlueStainedGlass), + "Brown Stained Glass" => Some(Item::BrownStainedGlass), + "Green Stained Glass" => Some(Item::GreenStainedGlass), + "Red Stained Glass" => Some(Item::RedStainedGlass), + "Black Stained Glass" => Some(Item::BlackStainedGlass), + "White Stained Glass Pane" => Some(Item::WhiteStainedGlassPane), + "Orange Stained Glass Pane" => Some(Item::OrangeStainedGlassPane), + "Magenta Stained Glass Pane" => Some(Item::MagentaStainedGlassPane), + "Light Blue Stained Glass Pane" => Some(Item::LightBlueStainedGlassPane), + "Yellow Stained Glass Pane" => Some(Item::YellowStainedGlassPane), + "Lime Stained Glass Pane" => Some(Item::LimeStainedGlassPane), + "Pink Stained Glass Pane" => Some(Item::PinkStainedGlassPane), + "Gray Stained Glass Pane" => Some(Item::GrayStainedGlassPane), + "Light Gray Stained Glass Pane" => Some(Item::LightGrayStainedGlassPane), + "Cyan Stained Glass Pane" => Some(Item::CyanStainedGlassPane), + "Purple Stained Glass Pane" => Some(Item::PurpleStainedGlassPane), + "Blue Stained Glass Pane" => Some(Item::BlueStainedGlassPane), + "Brown Stained Glass Pane" => Some(Item::BrownStainedGlassPane), + "Green Stained Glass Pane" => Some(Item::GreenStainedGlassPane), + "Red Stained Glass Pane" => Some(Item::RedStainedGlassPane), + "Black Stained Glass Pane" => Some(Item::BlackStainedGlassPane), + "Prismarine" => Some(Item::Prismarine), + "Prismarine Bricks" => Some(Item::PrismarineBricks), + "Dark Prismarine" => Some(Item::DarkPrismarine), + "Prismarine Stairs" => Some(Item::PrismarineStairs), + "Prismarine Brick Stairs" => Some(Item::PrismarineBrickStairs), + "Dark Prismarine Stairs" => Some(Item::DarkPrismarineStairs), + "Sea Lantern" => Some(Item::SeaLantern), + "Red Sandstone" => Some(Item::RedSandstone), + "Chiseled Red Sandstone" => Some(Item::ChiseledRedSandstone), + "Cut Red Sandstone" => Some(Item::CutRedSandstone), + "Red Sandstone Stairs" => Some(Item::RedSandstoneStairs), + "Repeating Command Block" => Some(Item::RepeatingCommandBlock), + "Chain Command Block" => Some(Item::ChainCommandBlock), + "Magma Block" => Some(Item::MagmaBlock), + "Nether Wart Block" => Some(Item::NetherWartBlock), + "Warped Wart Block" => Some(Item::WarpedWartBlock), + "Red Nether Bricks" => Some(Item::RedNetherBricks), + "Bone Block" => Some(Item::BoneBlock), + "Structure Void" => Some(Item::StructureVoid), + "Observer" => Some(Item::Observer), + "Shulker Box" => Some(Item::ShulkerBox), + "White Shulker Box" => Some(Item::WhiteShulkerBox), + "Orange Shulker Box" => Some(Item::OrangeShulkerBox), + "Magenta Shulker Box" => Some(Item::MagentaShulkerBox), + "Light Blue Shulker Box" => Some(Item::LightBlueShulkerBox), + "Yellow Shulker Box" => Some(Item::YellowShulkerBox), + "Lime Shulker Box" => Some(Item::LimeShulkerBox), + "Pink Shulker Box" => Some(Item::PinkShulkerBox), + "Gray Shulker Box" => Some(Item::GrayShulkerBox), + "Light Gray Shulker Box" => Some(Item::LightGrayShulkerBox), + "Cyan Shulker Box" => Some(Item::CyanShulkerBox), + "Purple Shulker Box" => Some(Item::PurpleShulkerBox), + "Blue Shulker Box" => Some(Item::BlueShulkerBox), + "Brown Shulker Box" => Some(Item::BrownShulkerBox), + "Green Shulker Box" => Some(Item::GreenShulkerBox), + "Red Shulker Box" => Some(Item::RedShulkerBox), + "Black Shulker Box" => Some(Item::BlackShulkerBox), + "White Glazed Terracotta" => Some(Item::WhiteGlazedTerracotta), + "Orange Glazed Terracotta" => Some(Item::OrangeGlazedTerracotta), + "Magenta Glazed Terracotta" => Some(Item::MagentaGlazedTerracotta), + "Light Blue Glazed Terracotta" => Some(Item::LightBlueGlazedTerracotta), + "Yellow Glazed Terracotta" => Some(Item::YellowGlazedTerracotta), + "Lime Glazed Terracotta" => Some(Item::LimeGlazedTerracotta), + "Pink Glazed Terracotta" => Some(Item::PinkGlazedTerracotta), + "Gray Glazed Terracotta" => Some(Item::GrayGlazedTerracotta), + "Light Gray Glazed Terracotta" => Some(Item::LightGrayGlazedTerracotta), + "Cyan Glazed Terracotta" => Some(Item::CyanGlazedTerracotta), + "Purple Glazed Terracotta" => Some(Item::PurpleGlazedTerracotta), + "Blue Glazed Terracotta" => Some(Item::BlueGlazedTerracotta), + "Brown Glazed Terracotta" => Some(Item::BrownGlazedTerracotta), + "Green Glazed Terracotta" => Some(Item::GreenGlazedTerracotta), + "Red Glazed Terracotta" => Some(Item::RedGlazedTerracotta), + "Black Glazed Terracotta" => Some(Item::BlackGlazedTerracotta), + "White Concrete" => Some(Item::WhiteConcrete), + "Orange Concrete" => Some(Item::OrangeConcrete), + "Magenta Concrete" => Some(Item::MagentaConcrete), + "Light Blue Concrete" => Some(Item::LightBlueConcrete), + "Yellow Concrete" => Some(Item::YellowConcrete), + "Lime Concrete" => Some(Item::LimeConcrete), + "Pink Concrete" => Some(Item::PinkConcrete), + "Gray Concrete" => Some(Item::GrayConcrete), + "Light Gray Concrete" => Some(Item::LightGrayConcrete), + "Cyan Concrete" => Some(Item::CyanConcrete), + "Purple Concrete" => Some(Item::PurpleConcrete), + "Blue Concrete" => Some(Item::BlueConcrete), + "Brown Concrete" => Some(Item::BrownConcrete), + "Green Concrete" => Some(Item::GreenConcrete), + "Red Concrete" => Some(Item::RedConcrete), + "Black Concrete" => Some(Item::BlackConcrete), + "White Concrete Powder" => Some(Item::WhiteConcretePowder), + "Orange Concrete Powder" => Some(Item::OrangeConcretePowder), + "Magenta Concrete Powder" => Some(Item::MagentaConcretePowder), + "Light Blue Concrete Powder" => Some(Item::LightBlueConcretePowder), + "Yellow Concrete Powder" => Some(Item::YellowConcretePowder), + "Lime Concrete Powder" => Some(Item::LimeConcretePowder), + "Pink Concrete Powder" => Some(Item::PinkConcretePowder), + "Gray Concrete Powder" => Some(Item::GrayConcretePowder), + "Light Gray Concrete Powder" => Some(Item::LightGrayConcretePowder), + "Cyan Concrete Powder" => Some(Item::CyanConcretePowder), + "Purple Concrete Powder" => Some(Item::PurpleConcretePowder), + "Blue Concrete Powder" => Some(Item::BlueConcretePowder), + "Brown Concrete Powder" => Some(Item::BrownConcretePowder), + "Green Concrete Powder" => Some(Item::GreenConcretePowder), + "Red Concrete Powder" => Some(Item::RedConcretePowder), + "Black Concrete Powder" => Some(Item::BlackConcretePowder), + "Turtle Egg" => Some(Item::TurtleEgg), + "Dead Tube Coral Block" => Some(Item::DeadTubeCoralBlock), + "Dead Brain Coral Block" => Some(Item::DeadBrainCoralBlock), + "Dead Bubble Coral Block" => Some(Item::DeadBubbleCoralBlock), + "Dead Fire Coral Block" => Some(Item::DeadFireCoralBlock), + "Dead Horn Coral Block" => Some(Item::DeadHornCoralBlock), + "Tube Coral Block" => Some(Item::TubeCoralBlock), + "Brain Coral Block" => Some(Item::BrainCoralBlock), + "Bubble Coral Block" => Some(Item::BubbleCoralBlock), + "Fire Coral Block" => Some(Item::FireCoralBlock), + "Horn Coral Block" => Some(Item::HornCoralBlock), + "Tube Coral" => Some(Item::TubeCoral), + "Brain Coral" => Some(Item::BrainCoral), + "Bubble Coral" => Some(Item::BubbleCoral), + "Fire Coral" => Some(Item::FireCoral), + "Horn Coral" => Some(Item::HornCoral), + "Dead Brain Coral" => Some(Item::DeadBrainCoral), + "Dead Bubble Coral" => Some(Item::DeadBubbleCoral), + "Dead Fire Coral" => Some(Item::DeadFireCoral), + "Dead Horn Coral" => Some(Item::DeadHornCoral), + "Dead Tube Coral" => Some(Item::DeadTubeCoral), + "Tube Coral Fan" => Some(Item::TubeCoralFan), + "Brain Coral Fan" => Some(Item::BrainCoralFan), + "Bubble Coral Fan" => Some(Item::BubbleCoralFan), + "Fire Coral Fan" => Some(Item::FireCoralFan), + "Horn Coral Fan" => Some(Item::HornCoralFan), + "Dead Tube Coral Fan" => Some(Item::DeadTubeCoralFan), + "Dead Brain Coral Fan" => Some(Item::DeadBrainCoralFan), + "Dead Bubble Coral Fan" => Some(Item::DeadBubbleCoralFan), + "Dead Fire Coral Fan" => Some(Item::DeadFireCoralFan), + "Dead Horn Coral Fan" => Some(Item::DeadHornCoralFan), + "Blue Ice" => Some(Item::BlueIce), + "Conduit" => Some(Item::Conduit), + "Polished Granite Stairs" => Some(Item::PolishedGraniteStairs), + "Smooth Red Sandstone Stairs" => Some(Item::SmoothRedSandstoneStairs), + "Mossy Stone Brick Stairs" => Some(Item::MossyStoneBrickStairs), + "Polished Diorite Stairs" => Some(Item::PolishedDioriteStairs), + "Mossy Cobblestone Stairs" => Some(Item::MossyCobblestoneStairs), + "End Stone Brick Stairs" => Some(Item::EndStoneBrickStairs), + "Stone Stairs" => Some(Item::StoneStairs), + "Smooth Sandstone Stairs" => Some(Item::SmoothSandstoneStairs), + "Smooth Quartz Stairs" => Some(Item::SmoothQuartzStairs), + "Granite Stairs" => Some(Item::GraniteStairs), + "Andesite Stairs" => Some(Item::AndesiteStairs), + "Red Nether Brick Stairs" => Some(Item::RedNetherBrickStairs), + "Polished Andesite Stairs" => Some(Item::PolishedAndesiteStairs), + "Diorite Stairs" => Some(Item::DioriteStairs), + "Polished Granite Slab" => Some(Item::PolishedGraniteSlab), + "Smooth Red Sandstone Slab" => Some(Item::SmoothRedSandstoneSlab), + "Mossy Stone Brick Slab" => Some(Item::MossyStoneBrickSlab), + "Polished Diorite Slab" => Some(Item::PolishedDioriteSlab), + "Mossy Cobblestone Slab" => Some(Item::MossyCobblestoneSlab), + "End Stone Brick Slab" => Some(Item::EndStoneBrickSlab), + "Smooth Sandstone Slab" => Some(Item::SmoothSandstoneSlab), + "Smooth Quartz Slab" => Some(Item::SmoothQuartzSlab), + "Granite Slab" => Some(Item::GraniteSlab), + "Andesite Slab" => Some(Item::AndesiteSlab), + "Red Nether Brick Slab" => Some(Item::RedNetherBrickSlab), + "Polished Andesite Slab" => Some(Item::PolishedAndesiteSlab), + "Diorite Slab" => Some(Item::DioriteSlab), + "Scaffolding" => Some(Item::Scaffolding), + "Iron Door" => Some(Item::IronDoor), + "Oak Door" => Some(Item::OakDoor), + "Spruce Door" => Some(Item::SpruceDoor), + "Birch Door" => Some(Item::BirchDoor), + "Jungle Door" => Some(Item::JungleDoor), + "Acacia Door" => Some(Item::AcaciaDoor), + "Dark Oak Door" => Some(Item::DarkOakDoor), + "Crimson Door" => Some(Item::CrimsonDoor), + "Warped Door" => Some(Item::WarpedDoor), + "Redstone Repeater" => Some(Item::Repeater), + "Redstone Comparator" => Some(Item::Comparator), + "Structure Block" => Some(Item::StructureBlock), + "Jigsaw Block" => Some(Item::Jigsaw), + "Turtle Shell" => Some(Item::TurtleHelmet), + "Scute" => Some(Item::Scute), + "Flint and Steel" => Some(Item::FlintAndSteel), + "Apple" => Some(Item::Apple), + "Bow" => Some(Item::Bow), + "Arrow" => Some(Item::Arrow), + "Coal" => Some(Item::Coal), + "Charcoal" => Some(Item::Charcoal), + "Diamond" => Some(Item::Diamond), + "Iron Ingot" => Some(Item::IronIngot), + "Gold Ingot" => Some(Item::GoldIngot), + "Netherite Ingot" => Some(Item::NetheriteIngot), + "Netherite Scrap" => Some(Item::NetheriteScrap), + "Wooden Sword" => Some(Item::WoodenSword), + "Wooden Shovel" => Some(Item::WoodenShovel), + "Wooden Pickaxe" => Some(Item::WoodenPickaxe), + "Wooden Axe" => Some(Item::WoodenAxe), + "Wooden Hoe" => Some(Item::WoodenHoe), + "Stone Sword" => Some(Item::StoneSword), + "Stone Shovel" => Some(Item::StoneShovel), + "Stone Pickaxe" => Some(Item::StonePickaxe), + "Stone Axe" => Some(Item::StoneAxe), + "Stone Hoe" => Some(Item::StoneHoe), + "Golden Sword" => Some(Item::GoldenSword), + "Golden Shovel" => Some(Item::GoldenShovel), + "Golden Pickaxe" => Some(Item::GoldenPickaxe), + "Golden Axe" => Some(Item::GoldenAxe), + "Golden Hoe" => Some(Item::GoldenHoe), + "Iron Sword" => Some(Item::IronSword), + "Iron Shovel" => Some(Item::IronShovel), + "Iron Pickaxe" => Some(Item::IronPickaxe), + "Iron Axe" => Some(Item::IronAxe), + "Iron Hoe" => Some(Item::IronHoe), + "Diamond Sword" => Some(Item::DiamondSword), + "Diamond Shovel" => Some(Item::DiamondShovel), + "Diamond Pickaxe" => Some(Item::DiamondPickaxe), + "Diamond Axe" => Some(Item::DiamondAxe), + "Diamond Hoe" => Some(Item::DiamondHoe), + "Netherite Sword" => Some(Item::NetheriteSword), + "Netherite Shovel" => Some(Item::NetheriteShovel), + "Netherite Pickaxe" => Some(Item::NetheritePickaxe), + "Netherite Axe" => Some(Item::NetheriteAxe), + "Netherite Hoe" => Some(Item::NetheriteHoe), + "Stick" => Some(Item::Stick), + "Bowl" => Some(Item::Bowl), + "Mushroom Stew" => Some(Item::MushroomStew), + "String" => Some(Item::String), + "Feather" => Some(Item::Feather), + "Gunpowder" => Some(Item::Gunpowder), + "Wheat Seeds" => Some(Item::WheatSeeds), + "Wheat" => Some(Item::Wheat), + "Bread" => Some(Item::Bread), + "Leather Cap" => Some(Item::LeatherHelmet), + "Leather Tunic" => Some(Item::LeatherChestplate), + "Leather Pants" => Some(Item::LeatherLeggings), + "Leather Boots" => Some(Item::LeatherBoots), + "Chainmail Helmet" => Some(Item::ChainmailHelmet), + "Chainmail Chestplate" => Some(Item::ChainmailChestplate), + "Chainmail Leggings" => Some(Item::ChainmailLeggings), + "Chainmail Boots" => Some(Item::ChainmailBoots), + "Iron Helmet" => Some(Item::IronHelmet), + "Iron Chestplate" => Some(Item::IronChestplate), + "Iron Leggings" => Some(Item::IronLeggings), + "Iron Boots" => Some(Item::IronBoots), + "Diamond Helmet" => Some(Item::DiamondHelmet), + "Diamond Chestplate" => Some(Item::DiamondChestplate), + "Diamond Leggings" => Some(Item::DiamondLeggings), + "Diamond Boots" => Some(Item::DiamondBoots), + "Golden Helmet" => Some(Item::GoldenHelmet), + "Golden Chestplate" => Some(Item::GoldenChestplate), + "Golden Leggings" => Some(Item::GoldenLeggings), + "Golden Boots" => Some(Item::GoldenBoots), + "Netherite Helmet" => Some(Item::NetheriteHelmet), + "Netherite Chestplate" => Some(Item::NetheriteChestplate), + "Netherite Leggings" => Some(Item::NetheriteLeggings), + "Netherite Boots" => Some(Item::NetheriteBoots), + "Flint" => Some(Item::Flint), + "Raw Porkchop" => Some(Item::Porkchop), + "Cooked Porkchop" => Some(Item::CookedPorkchop), + "Painting" => Some(Item::Painting), + "Golden Apple" => Some(Item::GoldenApple), + "Enchanted Golden Apple" => Some(Item::EnchantedGoldenApple), + "Oak Sign" => Some(Item::OakSign), + "Spruce Sign" => Some(Item::SpruceSign), + "Birch Sign" => Some(Item::BirchSign), + "Jungle Sign" => Some(Item::JungleSign), + "Acacia Sign" => Some(Item::AcaciaSign), + "Dark Oak Sign" => Some(Item::DarkOakSign), + "Crimson Sign" => Some(Item::CrimsonSign), + "Warped Sign" => Some(Item::WarpedSign), + "Bucket" => Some(Item::Bucket), + "Water Bucket" => Some(Item::WaterBucket), + "Lava Bucket" => Some(Item::LavaBucket), + "Minecart" => Some(Item::Minecart), + "Saddle" => Some(Item::Saddle), + "Redstone Dust" => Some(Item::Redstone), + "Snowball" => Some(Item::Snowball), + "Oak Boat" => Some(Item::OakBoat), + "Leather" => Some(Item::Leather), + "Milk Bucket" => Some(Item::MilkBucket), + "Bucket of Pufferfish" => Some(Item::PufferfishBucket), + "Bucket of Salmon" => Some(Item::SalmonBucket), + "Bucket of Cod" => Some(Item::CodBucket), + "Bucket of Tropical Fish" => Some(Item::TropicalFishBucket), + "Brick" => Some(Item::Brick), + "Clay Ball" => Some(Item::ClayBall), + "Dried Kelp Block" => Some(Item::DriedKelpBlock), + "Paper" => Some(Item::Paper), + "Book" => Some(Item::Book), + "Slimeball" => Some(Item::SlimeBall), + "Minecart with Chest" => Some(Item::ChestMinecart), + "Minecart with Furnace" => Some(Item::FurnaceMinecart), + "Egg" => Some(Item::Egg), + "Compass" => Some(Item::Compass), + "Fishing Rod" => Some(Item::FishingRod), + "Clock" => Some(Item::Clock), + "Glowstone Dust" => Some(Item::GlowstoneDust), + "Raw Cod" => Some(Item::Cod), + "Raw Salmon" => Some(Item::Salmon), + "Tropical Fish" => Some(Item::TropicalFish), + "Pufferfish" => Some(Item::Pufferfish), + "Cooked Cod" => Some(Item::CookedCod), + "Cooked Salmon" => Some(Item::CookedSalmon), + "Ink Sac" => Some(Item::InkSac), + "Cocoa Beans" => Some(Item::CocoaBeans), + "Lapis Lazuli" => Some(Item::LapisLazuli), + "White Dye" => Some(Item::WhiteDye), + "Orange Dye" => Some(Item::OrangeDye), + "Magenta Dye" => Some(Item::MagentaDye), + "Light Blue Dye" => Some(Item::LightBlueDye), + "Yellow Dye" => Some(Item::YellowDye), + "Lime Dye" => Some(Item::LimeDye), + "Pink Dye" => Some(Item::PinkDye), + "Gray Dye" => Some(Item::GrayDye), + "Light Gray Dye" => Some(Item::LightGrayDye), + "Cyan Dye" => Some(Item::CyanDye), + "Purple Dye" => Some(Item::PurpleDye), + "Blue Dye" => Some(Item::BlueDye), + "Brown Dye" => Some(Item::BrownDye), + "Green Dye" => Some(Item::GreenDye), + "Red Dye" => Some(Item::RedDye), + "Black Dye" => Some(Item::BlackDye), + "Bone Meal" => Some(Item::BoneMeal), + "Bone" => Some(Item::Bone), + "Sugar" => Some(Item::Sugar), + "Cake" => Some(Item::Cake), + "White Bed" => Some(Item::WhiteBed), + "Orange Bed" => Some(Item::OrangeBed), + "Magenta Bed" => Some(Item::MagentaBed), + "Light Blue Bed" => Some(Item::LightBlueBed), + "Yellow Bed" => Some(Item::YellowBed), + "Lime Bed" => Some(Item::LimeBed), + "Pink Bed" => Some(Item::PinkBed), + "Gray Bed" => Some(Item::GrayBed), + "Light Gray Bed" => Some(Item::LightGrayBed), + "Cyan Bed" => Some(Item::CyanBed), + "Purple Bed" => Some(Item::PurpleBed), + "Blue Bed" => Some(Item::BlueBed), + "Brown Bed" => Some(Item::BrownBed), + "Green Bed" => Some(Item::GreenBed), + "Red Bed" => Some(Item::RedBed), + "Black Bed" => Some(Item::BlackBed), + "Cookie" => Some(Item::Cookie), + "Map" => Some(Item::FilledMap), + "Shears" => Some(Item::Shears), + "Melon Slice" => Some(Item::MelonSlice), + "Dried Kelp" => Some(Item::DriedKelp), + "Pumpkin Seeds" => Some(Item::PumpkinSeeds), + "Melon Seeds" => Some(Item::MelonSeeds), + "Raw Beef" => Some(Item::Beef), + "Steak" => Some(Item::CookedBeef), + "Raw Chicken" => Some(Item::Chicken), + "Cooked Chicken" => Some(Item::CookedChicken), + "Rotten Flesh" => Some(Item::RottenFlesh), + "Ender Pearl" => Some(Item::EnderPearl), + "Blaze Rod" => Some(Item::BlazeRod), + "Ghast Tear" => Some(Item::GhastTear), + "Gold Nugget" => Some(Item::GoldNugget), + "Nether Wart" => Some(Item::NetherWart), + "Potion" => Some(Item::Potion), + "Glass Bottle" => Some(Item::GlassBottle), + "Spider Eye" => Some(Item::SpiderEye), + "Fermented Spider Eye" => Some(Item::FermentedSpiderEye), + "Blaze Powder" => Some(Item::BlazePowder), + "Magma Cream" => Some(Item::MagmaCream), + "Brewing Stand" => Some(Item::BrewingStand), + "Cauldron" => Some(Item::Cauldron), + "Eye of Ender" => Some(Item::EnderEye), + "Glistering Melon Slice" => Some(Item::GlisteringMelonSlice), + "Bat Spawn Egg" => Some(Item::BatSpawnEgg), + "Bee Spawn Egg" => Some(Item::BeeSpawnEgg), + "Blaze Spawn Egg" => Some(Item::BlazeSpawnEgg), + "Cat Spawn Egg" => Some(Item::CatSpawnEgg), + "Cave Spider Spawn Egg" => Some(Item::CaveSpiderSpawnEgg), + "Chicken Spawn Egg" => Some(Item::ChickenSpawnEgg), + "Cod Spawn Egg" => Some(Item::CodSpawnEgg), + "Cow Spawn Egg" => Some(Item::CowSpawnEgg), + "Creeper Spawn Egg" => Some(Item::CreeperSpawnEgg), + "Dolphin Spawn Egg" => Some(Item::DolphinSpawnEgg), + "Donkey Spawn Egg" => Some(Item::DonkeySpawnEgg), + "Drowned Spawn Egg" => Some(Item::DrownedSpawnEgg), + "Elder Guardian Spawn Egg" => Some(Item::ElderGuardianSpawnEgg), + "Enderman Spawn Egg" => Some(Item::EndermanSpawnEgg), + "Endermite Spawn Egg" => Some(Item::EndermiteSpawnEgg), + "Evoker Spawn Egg" => Some(Item::EvokerSpawnEgg), + "Fox Spawn Egg" => Some(Item::FoxSpawnEgg), + "Ghast Spawn Egg" => Some(Item::GhastSpawnEgg), + "Guardian Spawn Egg" => Some(Item::GuardianSpawnEgg), + "Hoglin Spawn Egg" => Some(Item::HoglinSpawnEgg), + "Horse Spawn Egg" => Some(Item::HorseSpawnEgg), + "Husk Spawn Egg" => Some(Item::HuskSpawnEgg), + "Llama Spawn Egg" => Some(Item::LlamaSpawnEgg), + "Magma Cube Spawn Egg" => Some(Item::MagmaCubeSpawnEgg), + "Mooshroom Spawn Egg" => Some(Item::MooshroomSpawnEgg), + "Mule Spawn Egg" => Some(Item::MuleSpawnEgg), + "Ocelot Spawn Egg" => Some(Item::OcelotSpawnEgg), + "Panda Spawn Egg" => Some(Item::PandaSpawnEgg), + "Parrot Spawn Egg" => Some(Item::ParrotSpawnEgg), + "Phantom Spawn Egg" => Some(Item::PhantomSpawnEgg), + "Pig Spawn Egg" => Some(Item::PigSpawnEgg), + "Piglin Spawn Egg" => Some(Item::PiglinSpawnEgg), + "Piglin Brute Spawn Egg" => Some(Item::PiglinBruteSpawnEgg), + "Pillager Spawn Egg" => Some(Item::PillagerSpawnEgg), + "Polar Bear Spawn Egg" => Some(Item::PolarBearSpawnEgg), + "Pufferfish Spawn Egg" => Some(Item::PufferfishSpawnEgg), + "Rabbit Spawn Egg" => Some(Item::RabbitSpawnEgg), + "Ravager Spawn Egg" => Some(Item::RavagerSpawnEgg), + "Salmon Spawn Egg" => Some(Item::SalmonSpawnEgg), + "Sheep Spawn Egg" => Some(Item::SheepSpawnEgg), + "Shulker Spawn Egg" => Some(Item::ShulkerSpawnEgg), + "Silverfish Spawn Egg" => Some(Item::SilverfishSpawnEgg), + "Skeleton Spawn Egg" => Some(Item::SkeletonSpawnEgg), + "Skeleton Horse Spawn Egg" => Some(Item::SkeletonHorseSpawnEgg), + "Slime Spawn Egg" => Some(Item::SlimeSpawnEgg), + "Spider Spawn Egg" => Some(Item::SpiderSpawnEgg), + "Squid Spawn Egg" => Some(Item::SquidSpawnEgg), + "Stray Spawn Egg" => Some(Item::StraySpawnEgg), + "Strider Spawn Egg" => Some(Item::StriderSpawnEgg), + "Trader Llama Spawn Egg" => Some(Item::TraderLlamaSpawnEgg), + "Tropical Fish Spawn Egg" => Some(Item::TropicalFishSpawnEgg), + "Turtle Spawn Egg" => Some(Item::TurtleSpawnEgg), + "Vex Spawn Egg" => Some(Item::VexSpawnEgg), + "Villager Spawn Egg" => Some(Item::VillagerSpawnEgg), + "Vindicator Spawn Egg" => Some(Item::VindicatorSpawnEgg), + "Wandering Trader Spawn Egg" => Some(Item::WanderingTraderSpawnEgg), + "Witch Spawn Egg" => Some(Item::WitchSpawnEgg), + "Wither Skeleton Spawn Egg" => Some(Item::WitherSkeletonSpawnEgg), + "Wolf Spawn Egg" => Some(Item::WolfSpawnEgg), + "Zoglin Spawn Egg" => Some(Item::ZoglinSpawnEgg), + "Zombie Spawn Egg" => Some(Item::ZombieSpawnEgg), + "Zombie Horse Spawn Egg" => Some(Item::ZombieHorseSpawnEgg), + "Zombie Villager Spawn Egg" => Some(Item::ZombieVillagerSpawnEgg), + "Zombified Piglin Spawn Egg" => Some(Item::ZombifiedPiglinSpawnEgg), + "Bottle o' Enchanting" => Some(Item::ExperienceBottle), + "Fire Charge" => Some(Item::FireCharge), + "Book and Quill" => Some(Item::WritableBook), + "Written Book" => Some(Item::WrittenBook), + "Emerald" => Some(Item::Emerald), + "Item Frame" => Some(Item::ItemFrame), + "Flower Pot" => Some(Item::FlowerPot), + "Carrot" => Some(Item::Carrot), + "Potato" => Some(Item::Potato), + "Baked Potato" => Some(Item::BakedPotato), + "Poisonous Potato" => Some(Item::PoisonousPotato), + "Empty Map" => Some(Item::Map), + "Golden Carrot" => Some(Item::GoldenCarrot), + "Skeleton Skull" => Some(Item::SkeletonSkull), + "Wither Skeleton Skull" => Some(Item::WitherSkeletonSkull), + "Player Head" => Some(Item::PlayerHead), + "Zombie Head" => Some(Item::ZombieHead), + "Creeper Head" => Some(Item::CreeperHead), + "Dragon Head" => Some(Item::DragonHead), + "Carrot on a Stick" => Some(Item::CarrotOnAStick), + "Warped Fungus on a Stick" => Some(Item::WarpedFungusOnAStick), + "Nether Star" => Some(Item::NetherStar), + "Pumpkin Pie" => Some(Item::PumpkinPie), + "Firework Rocket" => Some(Item::FireworkRocket), + "Firework Star" => Some(Item::FireworkStar), + "Enchanted Book" => Some(Item::EnchantedBook), + "Nether Brick" => Some(Item::NetherBrick), + "Nether Quartz" => Some(Item::Quartz), + "Minecart with TNT" => Some(Item::TntMinecart), + "Minecart with Hopper" => Some(Item::HopperMinecart), + "Prismarine Shard" => Some(Item::PrismarineShard), + "Prismarine Crystals" => Some(Item::PrismarineCrystals), + "Raw Rabbit" => Some(Item::Rabbit), + "Cooked Rabbit" => Some(Item::CookedRabbit), + "Rabbit Stew" => Some(Item::RabbitStew), + "Rabbit's Foot" => Some(Item::RabbitFoot), + "Rabbit Hide" => Some(Item::RabbitHide), + "Armor Stand" => Some(Item::ArmorStand), + "Iron Horse Armor" => Some(Item::IronHorseArmor), + "Golden Horse Armor" => Some(Item::GoldenHorseArmor), + "Diamond Horse Armor" => Some(Item::DiamondHorseArmor), + "Leather Horse Armor" => Some(Item::LeatherHorseArmor), + "Lead" => Some(Item::Lead), + "Name Tag" => Some(Item::NameTag), + "Minecart with Command Block" => Some(Item::CommandBlockMinecart), + "Raw Mutton" => Some(Item::Mutton), + "Cooked Mutton" => Some(Item::CookedMutton), + "White Banner" => Some(Item::WhiteBanner), + "Orange Banner" => Some(Item::OrangeBanner), + "Magenta Banner" => Some(Item::MagentaBanner), + "Light Blue Banner" => Some(Item::LightBlueBanner), + "Yellow Banner" => Some(Item::YellowBanner), + "Lime Banner" => Some(Item::LimeBanner), + "Pink Banner" => Some(Item::PinkBanner), + "Gray Banner" => Some(Item::GrayBanner), + "Light Gray Banner" => Some(Item::LightGrayBanner), + "Cyan Banner" => Some(Item::CyanBanner), + "Purple Banner" => Some(Item::PurpleBanner), + "Blue Banner" => Some(Item::BlueBanner), + "Brown Banner" => Some(Item::BrownBanner), + "Green Banner" => Some(Item::GreenBanner), + "Red Banner" => Some(Item::RedBanner), + "Black Banner" => Some(Item::BlackBanner), + "End Crystal" => Some(Item::EndCrystal), + "Chorus Fruit" => Some(Item::ChorusFruit), + "Popped Chorus Fruit" => Some(Item::PoppedChorusFruit), + "Beetroot" => Some(Item::Beetroot), + "Beetroot Seeds" => Some(Item::BeetrootSeeds), + "Beetroot Soup" => Some(Item::BeetrootSoup), + "Dragon's Breath" => Some(Item::DragonBreath), + "Splash Potion" => Some(Item::SplashPotion), + "Spectral Arrow" => Some(Item::SpectralArrow), + "Tipped Arrow" => Some(Item::TippedArrow), + "Lingering Potion" => Some(Item::LingeringPotion), + "Shield" => Some(Item::Shield), + "Elytra" => Some(Item::Elytra), + "Spruce Boat" => Some(Item::SpruceBoat), + "Birch Boat" => Some(Item::BirchBoat), + "Jungle Boat" => Some(Item::JungleBoat), + "Acacia Boat" => Some(Item::AcaciaBoat), + "Dark Oak Boat" => Some(Item::DarkOakBoat), + "Totem of Undying" => Some(Item::TotemOfUndying), + "Shulker Shell" => Some(Item::ShulkerShell), + "Iron Nugget" => Some(Item::IronNugget), + "Knowledge Book" => Some(Item::KnowledgeBook), + "Debug Stick" => Some(Item::DebugStick), + "13 Disc" => Some(Item::MusicDisc13), + "Cat Disc" => Some(Item::MusicDiscCat), + "Blocks Disc" => Some(Item::MusicDiscBlocks), + "Chirp Disc" => Some(Item::MusicDiscChirp), + "Far Disc" => Some(Item::MusicDiscFar), + "Mall Disc" => Some(Item::MusicDiscMall), + "Mellohi Disc" => Some(Item::MusicDiscMellohi), + "Stal Disc" => Some(Item::MusicDiscStal), + "Strad Disc" => Some(Item::MusicDiscStrad), + "Ward Disc" => Some(Item::MusicDiscWard), + "11 Disc" => Some(Item::MusicDisc11), + "Wait Disc" => Some(Item::MusicDiscWait), + "Music Disc" => Some(Item::MusicDiscPigstep), + "Trident" => Some(Item::Trident), + "Phantom Membrane" => Some(Item::PhantomMembrane), + "Nautilus Shell" => Some(Item::NautilusShell), + "Heart of the Sea" => Some(Item::HeartOfTheSea), + "Crossbow" => Some(Item::Crossbow), + "Suspicious Stew" => Some(Item::SuspiciousStew), + "Loom" => Some(Item::Loom), + "Banner Pattern" => Some(Item::FlowerBannerPattern), + "Banner Pattern" => Some(Item::CreeperBannerPattern), + "Banner Pattern" => Some(Item::SkullBannerPattern), + "Banner Pattern" => Some(Item::MojangBannerPattern), + "Banner Pattern" => Some(Item::GlobeBannerPattern), + "Banner Pattern" => Some(Item::PiglinBannerPattern), + "Composter" => Some(Item::Composter), + "Barrel" => Some(Item::Barrel), + "Smoker" => Some(Item::Smoker), + "Blast Furnace" => Some(Item::BlastFurnace), + "Cartography Table" => Some(Item::CartographyTable), + "Fletching Table" => Some(Item::FletchingTable), + "Grindstone" => Some(Item::Grindstone), + "Lectern" => Some(Item::Lectern), + "Smithing Table" => Some(Item::SmithingTable), + "Stonecutter" => Some(Item::Stonecutter), + "Bell" => Some(Item::Bell), + "Lantern" => Some(Item::Lantern), + "Soul Lantern" => Some(Item::SoulLantern), + "Sweet Berries" => Some(Item::SweetBerries), + "Campfire" => Some(Item::Campfire), + "Soul Campfire" => Some(Item::SoulCampfire), + "Shroomlight" => Some(Item::Shroomlight), + "Honeycomb" => Some(Item::Honeycomb), + "Bee Nest" => Some(Item::BeeNest), + "Beehive" => Some(Item::Beehive), + "Honey Bottle" => Some(Item::HoneyBottle), + "Honey Block" => Some(Item::HoneyBlock), + "Honeycomb Block" => Some(Item::HoneycombBlock), + "Lodestone" => Some(Item::Lodestone), + "Block of Netherite" => Some(Item::NetheriteBlock), + "Ancient Debris" => Some(Item::AncientDebris), + "Target" => Some(Item::Target), + "Crying Obsidian" => Some(Item::CryingObsidian), + "Blackstone" => Some(Item::Blackstone), + "Blackstone Slab" => Some(Item::BlackstoneSlab), + "Blackstone Stairs" => Some(Item::BlackstoneStairs), + "Gilded Blackstone" => Some(Item::GildedBlackstone), + "Polished Blackstone" => Some(Item::PolishedBlackstone), + "Polished Blackstone Slab" => Some(Item::PolishedBlackstoneSlab), + "Polished Blackstone Stairs" => Some(Item::PolishedBlackstoneStairs), + "Chiseled Polished Blackstone" => Some(Item::ChiseledPolishedBlackstone), + "Polished Blackstone Bricks" => Some(Item::PolishedBlackstoneBricks), + "Polished Blackstone Brick Slab" => Some(Item::PolishedBlackstoneBrickSlab), + "Polished Blackstone Brick Stairs" => Some(Item::PolishedBlackstoneBrickStairs), + "Cracked Polished Blackstone Bricks" => Some(Item::CrackedPolishedBlackstoneBricks), + "Respawn Anchor" => Some(Item::RespawnAnchor), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Item { + /// Returns the `stack_size` property of this `Item`. + pub fn stack_size(&self) -> u32 { + match self { + Item::Air => 0, + Item::Stone => 64, + Item::Granite => 64, + Item::PolishedGranite => 64, + Item::Diorite => 64, + Item::PolishedDiorite => 64, + Item::Andesite => 64, + Item::PolishedAndesite => 64, + Item::GrassBlock => 64, + Item::Dirt => 64, + Item::CoarseDirt => 64, + Item::Podzol => 64, + Item::CrimsonNylium => 64, + Item::WarpedNylium => 64, + Item::Cobblestone => 64, + Item::OakPlanks => 64, + Item::SprucePlanks => 64, + Item::BirchPlanks => 64, + Item::JunglePlanks => 64, + Item::AcaciaPlanks => 64, + Item::DarkOakPlanks => 64, + Item::CrimsonPlanks => 64, + Item::WarpedPlanks => 64, + Item::OakSapling => 64, + Item::SpruceSapling => 64, + Item::BirchSapling => 64, + Item::JungleSapling => 64, + Item::AcaciaSapling => 64, + Item::DarkOakSapling => 64, + Item::Bedrock => 64, + Item::Sand => 64, + Item::RedSand => 64, + Item::Gravel => 64, + Item::GoldOre => 64, + Item::IronOre => 64, + Item::CoalOre => 64, + Item::NetherGoldOre => 64, + Item::OakLog => 64, + Item::SpruceLog => 64, + Item::BirchLog => 64, + Item::JungleLog => 64, + Item::AcaciaLog => 64, + Item::DarkOakLog => 64, + Item::CrimsonStem => 64, + Item::WarpedStem => 64, + Item::StrippedOakLog => 64, + Item::StrippedSpruceLog => 64, + Item::StrippedBirchLog => 64, + Item::StrippedJungleLog => 64, + Item::StrippedAcaciaLog => 64, + Item::StrippedDarkOakLog => 64, + Item::StrippedCrimsonStem => 64, + Item::StrippedWarpedStem => 64, + Item::StrippedOakWood => 64, + Item::StrippedSpruceWood => 64, + Item::StrippedBirchWood => 64, + Item::StrippedJungleWood => 64, + Item::StrippedAcaciaWood => 64, + Item::StrippedDarkOakWood => 64, + Item::StrippedCrimsonHyphae => 64, + Item::StrippedWarpedHyphae => 64, + Item::OakWood => 64, + Item::SpruceWood => 64, + Item::BirchWood => 64, + Item::JungleWood => 64, + Item::AcaciaWood => 64, + Item::DarkOakWood => 64, + Item::CrimsonHyphae => 64, + Item::WarpedHyphae => 64, + Item::OakLeaves => 64, + Item::SpruceLeaves => 64, + Item::BirchLeaves => 64, + Item::JungleLeaves => 64, + Item::AcaciaLeaves => 64, + Item::DarkOakLeaves => 64, + Item::Sponge => 64, + Item::WetSponge => 64, + Item::Glass => 64, + Item::LapisOre => 64, + Item::LapisBlock => 64, + Item::Dispenser => 64, + Item::Sandstone => 64, + Item::ChiseledSandstone => 64, + Item::CutSandstone => 64, + Item::NoteBlock => 64, + Item::PoweredRail => 64, + Item::DetectorRail => 64, + Item::StickyPiston => 64, + Item::Cobweb => 64, + Item::Grass => 64, + Item::Fern => 64, + Item::DeadBush => 64, + Item::Seagrass => 64, + Item::SeaPickle => 64, + Item::Piston => 64, + Item::WhiteWool => 64, + Item::OrangeWool => 64, + Item::MagentaWool => 64, + Item::LightBlueWool => 64, + Item::YellowWool => 64, + Item::LimeWool => 64, + Item::PinkWool => 64, + Item::GrayWool => 64, + Item::LightGrayWool => 64, + Item::CyanWool => 64, + Item::PurpleWool => 64, + Item::BlueWool => 64, + Item::BrownWool => 64, + Item::GreenWool => 64, + Item::RedWool => 64, + Item::BlackWool => 64, + Item::Dandelion => 64, + Item::Poppy => 64, + Item::BlueOrchid => 64, + Item::Allium => 64, + Item::AzureBluet => 64, + Item::RedTulip => 64, + Item::OrangeTulip => 64, + Item::WhiteTulip => 64, + Item::PinkTulip => 64, + Item::OxeyeDaisy => 64, + Item::Cornflower => 64, + Item::LilyOfTheValley => 64, + Item::WitherRose => 64, + Item::BrownMushroom => 64, + Item::RedMushroom => 64, + Item::CrimsonFungus => 64, + Item::WarpedFungus => 64, + Item::CrimsonRoots => 64, + Item::WarpedRoots => 64, + Item::NetherSprouts => 64, + Item::WeepingVines => 64, + Item::TwistingVines => 64, + Item::SugarCane => 64, + Item::Kelp => 64, + Item::Bamboo => 64, + Item::GoldBlock => 64, + Item::IronBlock => 64, + Item::OakSlab => 64, + Item::SpruceSlab => 64, + Item::BirchSlab => 64, + Item::JungleSlab => 64, + Item::AcaciaSlab => 64, + Item::DarkOakSlab => 64, + Item::CrimsonSlab => 64, + Item::WarpedSlab => 64, + Item::StoneSlab => 64, + Item::SmoothStoneSlab => 64, + Item::SandstoneSlab => 64, + Item::CutSandstoneSlab => 64, + Item::PetrifiedOakSlab => 64, + Item::CobblestoneSlab => 64, + Item::BrickSlab => 64, + Item::StoneBrickSlab => 64, + Item::NetherBrickSlab => 64, + Item::QuartzSlab => 64, + Item::RedSandstoneSlab => 64, + Item::CutRedSandstoneSlab => 64, + Item::PurpurSlab => 64, + Item::PrismarineSlab => 64, + Item::PrismarineBrickSlab => 64, + Item::DarkPrismarineSlab => 64, + Item::SmoothQuartz => 64, + Item::SmoothRedSandstone => 64, + Item::SmoothSandstone => 64, + Item::SmoothStone => 64, + Item::Bricks => 64, + Item::Tnt => 64, + Item::Bookshelf => 64, + Item::MossyCobblestone => 64, + Item::Obsidian => 64, + Item::Torch => 64, + Item::EndRod => 64, + Item::ChorusPlant => 64, + Item::ChorusFlower => 64, + Item::PurpurBlock => 64, + Item::PurpurPillar => 64, + Item::PurpurStairs => 64, + Item::Spawner => 64, + Item::OakStairs => 64, + Item::Chest => 64, + Item::DiamondOre => 64, + Item::DiamondBlock => 64, + Item::CraftingTable => 64, + Item::Farmland => 64, + Item::Furnace => 64, + Item::Ladder => 64, + Item::Rail => 64, + Item::CobblestoneStairs => 64, + Item::Lever => 64, + Item::StonePressurePlate => 64, + Item::OakPressurePlate => 64, + Item::SprucePressurePlate => 64, + Item::BirchPressurePlate => 64, + Item::JunglePressurePlate => 64, + Item::AcaciaPressurePlate => 64, + Item::DarkOakPressurePlate => 64, + Item::CrimsonPressurePlate => 64, + Item::WarpedPressurePlate => 64, + Item::PolishedBlackstonePressurePlate => 64, + Item::RedstoneOre => 64, + Item::RedstoneTorch => 64, + Item::Snow => 64, + Item::Ice => 64, + Item::SnowBlock => 64, + Item::Cactus => 64, + Item::Clay => 64, + Item::Jukebox => 64, + Item::OakFence => 64, + Item::SpruceFence => 64, + Item::BirchFence => 64, + Item::JungleFence => 64, + Item::AcaciaFence => 64, + Item::DarkOakFence => 64, + Item::CrimsonFence => 64, + Item::WarpedFence => 64, + Item::Pumpkin => 64, + Item::CarvedPumpkin => 64, + Item::Netherrack => 64, + Item::SoulSand => 64, + Item::SoulSoil => 64, + Item::Basalt => 64, + Item::PolishedBasalt => 64, + Item::SoulTorch => 64, + Item::Glowstone => 64, + Item::JackOLantern => 64, + Item::OakTrapdoor => 64, + Item::SpruceTrapdoor => 64, + Item::BirchTrapdoor => 64, + Item::JungleTrapdoor => 64, + Item::AcaciaTrapdoor => 64, + Item::DarkOakTrapdoor => 64, + Item::CrimsonTrapdoor => 64, + Item::WarpedTrapdoor => 64, + Item::InfestedStone => 64, + Item::InfestedCobblestone => 64, + Item::InfestedStoneBricks => 64, + Item::InfestedMossyStoneBricks => 64, + Item::InfestedCrackedStoneBricks => 64, + Item::InfestedChiseledStoneBricks => 64, + Item::StoneBricks => 64, + Item::MossyStoneBricks => 64, + Item::CrackedStoneBricks => 64, + Item::ChiseledStoneBricks => 64, + Item::BrownMushroomBlock => 64, + Item::RedMushroomBlock => 64, + Item::MushroomStem => 64, + Item::IronBars => 64, + Item::Chain => 64, + Item::GlassPane => 64, + Item::Melon => 64, + Item::Vine => 64, + Item::OakFenceGate => 64, + Item::SpruceFenceGate => 64, + Item::BirchFenceGate => 64, + Item::JungleFenceGate => 64, + Item::AcaciaFenceGate => 64, + Item::DarkOakFenceGate => 64, + Item::CrimsonFenceGate => 64, + Item::WarpedFenceGate => 64, + Item::BrickStairs => 64, + Item::StoneBrickStairs => 64, + Item::Mycelium => 64, + Item::LilyPad => 64, + Item::NetherBricks => 64, + Item::CrackedNetherBricks => 64, + Item::ChiseledNetherBricks => 64, + Item::NetherBrickFence => 64, + Item::NetherBrickStairs => 64, + Item::EnchantingTable => 64, + Item::EndPortalFrame => 64, + Item::EndStone => 64, + Item::EndStoneBricks => 64, + Item::DragonEgg => 64, + Item::RedstoneLamp => 64, + Item::SandstoneStairs => 64, + Item::EmeraldOre => 64, + Item::EnderChest => 64, + Item::TripwireHook => 64, + Item::EmeraldBlock => 64, + Item::SpruceStairs => 64, + Item::BirchStairs => 64, + Item::JungleStairs => 64, + Item::CrimsonStairs => 64, + Item::WarpedStairs => 64, + Item::CommandBlock => 64, + Item::Beacon => 64, + Item::CobblestoneWall => 64, + Item::MossyCobblestoneWall => 64, + Item::BrickWall => 64, + Item::PrismarineWall => 64, + Item::RedSandstoneWall => 64, + Item::MossyStoneBrickWall => 64, + Item::GraniteWall => 64, + Item::StoneBrickWall => 64, + Item::NetherBrickWall => 64, + Item::AndesiteWall => 64, + Item::RedNetherBrickWall => 64, + Item::SandstoneWall => 64, + Item::EndStoneBrickWall => 64, + Item::DioriteWall => 64, + Item::BlackstoneWall => 64, + Item::PolishedBlackstoneWall => 64, + Item::PolishedBlackstoneBrickWall => 64, + Item::StoneButton => 64, + Item::OakButton => 64, + Item::SpruceButton => 64, + Item::BirchButton => 64, + Item::JungleButton => 64, + Item::AcaciaButton => 64, + Item::DarkOakButton => 64, + Item::CrimsonButton => 64, + Item::WarpedButton => 64, + Item::PolishedBlackstoneButton => 64, + Item::Anvil => 64, + Item::ChippedAnvil => 64, + Item::DamagedAnvil => 64, + Item::TrappedChest => 64, + Item::LightWeightedPressurePlate => 64, + Item::HeavyWeightedPressurePlate => 64, + Item::DaylightDetector => 64, + Item::RedstoneBlock => 64, + Item::NetherQuartzOre => 64, + Item::Hopper => 64, + Item::ChiseledQuartzBlock => 64, + Item::QuartzBlock => 64, + Item::QuartzBricks => 64, + Item::QuartzPillar => 64, + Item::QuartzStairs => 64, + Item::ActivatorRail => 64, + Item::Dropper => 64, + Item::WhiteTerracotta => 64, + Item::OrangeTerracotta => 64, + Item::MagentaTerracotta => 64, + Item::LightBlueTerracotta => 64, + Item::YellowTerracotta => 64, + Item::LimeTerracotta => 64, + Item::PinkTerracotta => 64, + Item::GrayTerracotta => 64, + Item::LightGrayTerracotta => 64, + Item::CyanTerracotta => 64, + Item::PurpleTerracotta => 64, + Item::BlueTerracotta => 64, + Item::BrownTerracotta => 64, + Item::GreenTerracotta => 64, + Item::RedTerracotta => 64, + Item::BlackTerracotta => 64, + Item::Barrier => 64, + Item::IronTrapdoor => 64, + Item::HayBlock => 64, + Item::WhiteCarpet => 64, + Item::OrangeCarpet => 64, + Item::MagentaCarpet => 64, + Item::LightBlueCarpet => 64, + Item::YellowCarpet => 64, + Item::LimeCarpet => 64, + Item::PinkCarpet => 64, + Item::GrayCarpet => 64, + Item::LightGrayCarpet => 64, + Item::CyanCarpet => 64, + Item::PurpleCarpet => 64, + Item::BlueCarpet => 64, + Item::BrownCarpet => 64, + Item::GreenCarpet => 64, + Item::RedCarpet => 64, + Item::BlackCarpet => 64, + Item::Terracotta => 64, + Item::CoalBlock => 64, + Item::PackedIce => 64, + Item::AcaciaStairs => 64, + Item::DarkOakStairs => 64, + Item::SlimeBlock => 64, + Item::GrassPath => 64, + Item::Sunflower => 64, + Item::Lilac => 64, + Item::RoseBush => 64, + Item::Peony => 64, + Item::TallGrass => 64, + Item::LargeFern => 64, + Item::WhiteStainedGlass => 64, + Item::OrangeStainedGlass => 64, + Item::MagentaStainedGlass => 64, + Item::LightBlueStainedGlass => 64, + Item::YellowStainedGlass => 64, + Item::LimeStainedGlass => 64, + Item::PinkStainedGlass => 64, + Item::GrayStainedGlass => 64, + Item::LightGrayStainedGlass => 64, + Item::CyanStainedGlass => 64, + Item::PurpleStainedGlass => 64, + Item::BlueStainedGlass => 64, + Item::BrownStainedGlass => 64, + Item::GreenStainedGlass => 64, + Item::RedStainedGlass => 64, + Item::BlackStainedGlass => 64, + Item::WhiteStainedGlassPane => 64, + Item::OrangeStainedGlassPane => 64, + Item::MagentaStainedGlassPane => 64, + Item::LightBlueStainedGlassPane => 64, + Item::YellowStainedGlassPane => 64, + Item::LimeStainedGlassPane => 64, + Item::PinkStainedGlassPane => 64, + Item::GrayStainedGlassPane => 64, + Item::LightGrayStainedGlassPane => 64, + Item::CyanStainedGlassPane => 64, + Item::PurpleStainedGlassPane => 64, + Item::BlueStainedGlassPane => 64, + Item::BrownStainedGlassPane => 64, + Item::GreenStainedGlassPane => 64, + Item::RedStainedGlassPane => 64, + Item::BlackStainedGlassPane => 64, + Item::Prismarine => 64, + Item::PrismarineBricks => 64, + Item::DarkPrismarine => 64, + Item::PrismarineStairs => 64, + Item::PrismarineBrickStairs => 64, + Item::DarkPrismarineStairs => 64, + Item::SeaLantern => 64, + Item::RedSandstone => 64, + Item::ChiseledRedSandstone => 64, + Item::CutRedSandstone => 64, + Item::RedSandstoneStairs => 64, + Item::RepeatingCommandBlock => 64, + Item::ChainCommandBlock => 64, + Item::MagmaBlock => 64, + Item::NetherWartBlock => 64, + Item::WarpedWartBlock => 64, + Item::RedNetherBricks => 64, + Item::BoneBlock => 64, + Item::StructureVoid => 64, + Item::Observer => 64, + Item::ShulkerBox => 1, + Item::WhiteShulkerBox => 1, + Item::OrangeShulkerBox => 1, + Item::MagentaShulkerBox => 1, + Item::LightBlueShulkerBox => 1, + Item::YellowShulkerBox => 1, + Item::LimeShulkerBox => 1, + Item::PinkShulkerBox => 1, + Item::GrayShulkerBox => 1, + Item::LightGrayShulkerBox => 1, + Item::CyanShulkerBox => 1, + Item::PurpleShulkerBox => 1, + Item::BlueShulkerBox => 1, + Item::BrownShulkerBox => 1, + Item::GreenShulkerBox => 1, + Item::RedShulkerBox => 1, + Item::BlackShulkerBox => 1, + Item::WhiteGlazedTerracotta => 64, + Item::OrangeGlazedTerracotta => 64, + Item::MagentaGlazedTerracotta => 64, + Item::LightBlueGlazedTerracotta => 64, + Item::YellowGlazedTerracotta => 64, + Item::LimeGlazedTerracotta => 64, + Item::PinkGlazedTerracotta => 64, + Item::GrayGlazedTerracotta => 64, + Item::LightGrayGlazedTerracotta => 64, + Item::CyanGlazedTerracotta => 64, + Item::PurpleGlazedTerracotta => 64, + Item::BlueGlazedTerracotta => 64, + Item::BrownGlazedTerracotta => 64, + Item::GreenGlazedTerracotta => 64, + Item::RedGlazedTerracotta => 64, + Item::BlackGlazedTerracotta => 64, + Item::WhiteConcrete => 64, + Item::OrangeConcrete => 64, + Item::MagentaConcrete => 64, + Item::LightBlueConcrete => 64, + Item::YellowConcrete => 64, + Item::LimeConcrete => 64, + Item::PinkConcrete => 64, + Item::GrayConcrete => 64, + Item::LightGrayConcrete => 64, + Item::CyanConcrete => 64, + Item::PurpleConcrete => 64, + Item::BlueConcrete => 64, + Item::BrownConcrete => 64, + Item::GreenConcrete => 64, + Item::RedConcrete => 64, + Item::BlackConcrete => 64, + Item::WhiteConcretePowder => 64, + Item::OrangeConcretePowder => 64, + Item::MagentaConcretePowder => 64, + Item::LightBlueConcretePowder => 64, + Item::YellowConcretePowder => 64, + Item::LimeConcretePowder => 64, + Item::PinkConcretePowder => 64, + Item::GrayConcretePowder => 64, + Item::LightGrayConcretePowder => 64, + Item::CyanConcretePowder => 64, + Item::PurpleConcretePowder => 64, + Item::BlueConcretePowder => 64, + Item::BrownConcretePowder => 64, + Item::GreenConcretePowder => 64, + Item::RedConcretePowder => 64, + Item::BlackConcretePowder => 64, + Item::TurtleEgg => 64, + Item::DeadTubeCoralBlock => 64, + Item::DeadBrainCoralBlock => 64, + Item::DeadBubbleCoralBlock => 64, + Item::DeadFireCoralBlock => 64, + Item::DeadHornCoralBlock => 64, + Item::TubeCoralBlock => 64, + Item::BrainCoralBlock => 64, + Item::BubbleCoralBlock => 64, + Item::FireCoralBlock => 64, + Item::HornCoralBlock => 64, + Item::TubeCoral => 64, + Item::BrainCoral => 64, + Item::BubbleCoral => 64, + Item::FireCoral => 64, + Item::HornCoral => 64, + Item::DeadBrainCoral => 64, + Item::DeadBubbleCoral => 64, + Item::DeadFireCoral => 64, + Item::DeadHornCoral => 64, + Item::DeadTubeCoral => 64, + Item::TubeCoralFan => 64, + Item::BrainCoralFan => 64, + Item::BubbleCoralFan => 64, + Item::FireCoralFan => 64, + Item::HornCoralFan => 64, + Item::DeadTubeCoralFan => 64, + Item::DeadBrainCoralFan => 64, + Item::DeadBubbleCoralFan => 64, + Item::DeadFireCoralFan => 64, + Item::DeadHornCoralFan => 64, + Item::BlueIce => 64, + Item::Conduit => 64, + Item::PolishedGraniteStairs => 64, + Item::SmoothRedSandstoneStairs => 64, + Item::MossyStoneBrickStairs => 64, + Item::PolishedDioriteStairs => 64, + Item::MossyCobblestoneStairs => 64, + Item::EndStoneBrickStairs => 64, + Item::StoneStairs => 64, + Item::SmoothSandstoneStairs => 64, + Item::SmoothQuartzStairs => 64, + Item::GraniteStairs => 64, + Item::AndesiteStairs => 64, + Item::RedNetherBrickStairs => 64, + Item::PolishedAndesiteStairs => 64, + Item::DioriteStairs => 64, + Item::PolishedGraniteSlab => 64, + Item::SmoothRedSandstoneSlab => 64, + Item::MossyStoneBrickSlab => 64, + Item::PolishedDioriteSlab => 64, + Item::MossyCobblestoneSlab => 64, + Item::EndStoneBrickSlab => 64, + Item::SmoothSandstoneSlab => 64, + Item::SmoothQuartzSlab => 64, + Item::GraniteSlab => 64, + Item::AndesiteSlab => 64, + Item::RedNetherBrickSlab => 64, + Item::PolishedAndesiteSlab => 64, + Item::DioriteSlab => 64, + Item::Scaffolding => 64, + Item::IronDoor => 64, + Item::OakDoor => 64, + Item::SpruceDoor => 64, + Item::BirchDoor => 64, + Item::JungleDoor => 64, + Item::AcaciaDoor => 64, + Item::DarkOakDoor => 64, + Item::CrimsonDoor => 64, + Item::WarpedDoor => 64, + Item::Repeater => 64, + Item::Comparator => 64, + Item::StructureBlock => 64, + Item::Jigsaw => 64, + Item::TurtleHelmet => 1, + Item::Scute => 64, + Item::FlintAndSteel => 1, + Item::Apple => 64, + Item::Bow => 1, + Item::Arrow => 64, + Item::Coal => 64, + Item::Charcoal => 64, + Item::Diamond => 64, + Item::IronIngot => 64, + Item::GoldIngot => 64, + Item::NetheriteIngot => 64, + Item::NetheriteScrap => 64, + Item::WoodenSword => 1, + Item::WoodenShovel => 1, + Item::WoodenPickaxe => 1, + Item::WoodenAxe => 1, + Item::WoodenHoe => 1, + Item::StoneSword => 1, + Item::StoneShovel => 1, + Item::StonePickaxe => 1, + Item::StoneAxe => 1, + Item::StoneHoe => 1, + Item::GoldenSword => 1, + Item::GoldenShovel => 1, + Item::GoldenPickaxe => 1, + Item::GoldenAxe => 1, + Item::GoldenHoe => 1, + Item::IronSword => 1, + Item::IronShovel => 1, + Item::IronPickaxe => 1, + Item::IronAxe => 1, + Item::IronHoe => 1, + Item::DiamondSword => 1, + Item::DiamondShovel => 1, + Item::DiamondPickaxe => 1, + Item::DiamondAxe => 1, + Item::DiamondHoe => 1, + Item::NetheriteSword => 1, + Item::NetheriteShovel => 1, + Item::NetheritePickaxe => 1, + Item::NetheriteAxe => 1, + Item::NetheriteHoe => 1, + Item::Stick => 64, + Item::Bowl => 64, + Item::MushroomStew => 1, + Item::String => 64, + Item::Feather => 64, + Item::Gunpowder => 64, + Item::WheatSeeds => 64, + Item::Wheat => 64, + Item::Bread => 64, + Item::LeatherHelmet => 1, + Item::LeatherChestplate => 1, + Item::LeatherLeggings => 1, + Item::LeatherBoots => 1, + Item::ChainmailHelmet => 1, + Item::ChainmailChestplate => 1, + Item::ChainmailLeggings => 1, + Item::ChainmailBoots => 1, + Item::IronHelmet => 1, + Item::IronChestplate => 1, + Item::IronLeggings => 1, + Item::IronBoots => 1, + Item::DiamondHelmet => 1, + Item::DiamondChestplate => 1, + Item::DiamondLeggings => 1, + Item::DiamondBoots => 1, + Item::GoldenHelmet => 1, + Item::GoldenChestplate => 1, + Item::GoldenLeggings => 1, + Item::GoldenBoots => 1, + Item::NetheriteHelmet => 1, + Item::NetheriteChestplate => 1, + Item::NetheriteLeggings => 1, + Item::NetheriteBoots => 1, + Item::Flint => 64, + Item::Porkchop => 64, + Item::CookedPorkchop => 64, + Item::Painting => 64, + Item::GoldenApple => 64, + Item::EnchantedGoldenApple => 64, + Item::OakSign => 16, + Item::SpruceSign => 16, + Item::BirchSign => 16, + Item::JungleSign => 16, + Item::AcaciaSign => 16, + Item::DarkOakSign => 16, + Item::CrimsonSign => 16, + Item::WarpedSign => 16, + Item::Bucket => 16, + Item::WaterBucket => 1, + Item::LavaBucket => 1, + Item::Minecart => 1, + Item::Saddle => 1, + Item::Redstone => 64, + Item::Snowball => 16, + Item::OakBoat => 1, + Item::Leather => 64, + Item::MilkBucket => 1, + Item::PufferfishBucket => 1, + Item::SalmonBucket => 1, + Item::CodBucket => 1, + Item::TropicalFishBucket => 1, + Item::Brick => 64, + Item::ClayBall => 64, + Item::DriedKelpBlock => 64, + Item::Paper => 64, + Item::Book => 64, + Item::SlimeBall => 64, + Item::ChestMinecart => 1, + Item::FurnaceMinecart => 1, + Item::Egg => 16, + Item::Compass => 64, + Item::FishingRod => 1, + Item::Clock => 64, + Item::GlowstoneDust => 64, + Item::Cod => 64, + Item::Salmon => 64, + Item::TropicalFish => 64, + Item::Pufferfish => 64, + Item::CookedCod => 64, + Item::CookedSalmon => 64, + Item::InkSac => 64, + Item::CocoaBeans => 64, + Item::LapisLazuli => 64, + Item::WhiteDye => 64, + Item::OrangeDye => 64, + Item::MagentaDye => 64, + Item::LightBlueDye => 64, + Item::YellowDye => 64, + Item::LimeDye => 64, + Item::PinkDye => 64, + Item::GrayDye => 64, + Item::LightGrayDye => 64, + Item::CyanDye => 64, + Item::PurpleDye => 64, + Item::BlueDye => 64, + Item::BrownDye => 64, + Item::GreenDye => 64, + Item::RedDye => 64, + Item::BlackDye => 64, + Item::BoneMeal => 64, + Item::Bone => 64, + Item::Sugar => 64, + Item::Cake => 1, + Item::WhiteBed => 1, + Item::OrangeBed => 1, + Item::MagentaBed => 1, + Item::LightBlueBed => 1, + Item::YellowBed => 1, + Item::LimeBed => 1, + Item::PinkBed => 1, + Item::GrayBed => 1, + Item::LightGrayBed => 1, + Item::CyanBed => 1, + Item::PurpleBed => 1, + Item::BlueBed => 1, + Item::BrownBed => 1, + Item::GreenBed => 1, + Item::RedBed => 1, + Item::BlackBed => 1, + Item::Cookie => 64, + Item::FilledMap => 64, + Item::Shears => 1, + Item::MelonSlice => 64, + Item::DriedKelp => 64, + Item::PumpkinSeeds => 64, + Item::MelonSeeds => 64, + Item::Beef => 64, + Item::CookedBeef => 64, + Item::Chicken => 64, + Item::CookedChicken => 64, + Item::RottenFlesh => 64, + Item::EnderPearl => 16, + Item::BlazeRod => 64, + Item::GhastTear => 64, + Item::GoldNugget => 64, + Item::NetherWart => 64, + Item::Potion => 1, + Item::GlassBottle => 64, + Item::SpiderEye => 64, + Item::FermentedSpiderEye => 64, + Item::BlazePowder => 64, + Item::MagmaCream => 64, + Item::BrewingStand => 64, + Item::Cauldron => 64, + Item::EnderEye => 64, + Item::GlisteringMelonSlice => 64, + Item::BatSpawnEgg => 64, + Item::BeeSpawnEgg => 64, + Item::BlazeSpawnEgg => 64, + Item::CatSpawnEgg => 64, + Item::CaveSpiderSpawnEgg => 64, + Item::ChickenSpawnEgg => 64, + Item::CodSpawnEgg => 64, + Item::CowSpawnEgg => 64, + Item::CreeperSpawnEgg => 64, + Item::DolphinSpawnEgg => 64, + Item::DonkeySpawnEgg => 64, + Item::DrownedSpawnEgg => 64, + Item::ElderGuardianSpawnEgg => 64, + Item::EndermanSpawnEgg => 64, + Item::EndermiteSpawnEgg => 64, + Item::EvokerSpawnEgg => 64, + Item::FoxSpawnEgg => 64, + Item::GhastSpawnEgg => 64, + Item::GuardianSpawnEgg => 64, + Item::HoglinSpawnEgg => 64, + Item::HorseSpawnEgg => 64, + Item::HuskSpawnEgg => 64, + Item::LlamaSpawnEgg => 64, + Item::MagmaCubeSpawnEgg => 64, + Item::MooshroomSpawnEgg => 64, + Item::MuleSpawnEgg => 64, + Item::OcelotSpawnEgg => 64, + Item::PandaSpawnEgg => 64, + Item::ParrotSpawnEgg => 64, + Item::PhantomSpawnEgg => 64, + Item::PigSpawnEgg => 64, + Item::PiglinSpawnEgg => 64, + Item::PiglinBruteSpawnEgg => 64, + Item::PillagerSpawnEgg => 64, + Item::PolarBearSpawnEgg => 64, + Item::PufferfishSpawnEgg => 64, + Item::RabbitSpawnEgg => 64, + Item::RavagerSpawnEgg => 64, + Item::SalmonSpawnEgg => 64, + Item::SheepSpawnEgg => 64, + Item::ShulkerSpawnEgg => 64, + Item::SilverfishSpawnEgg => 64, + Item::SkeletonSpawnEgg => 64, + Item::SkeletonHorseSpawnEgg => 64, + Item::SlimeSpawnEgg => 64, + Item::SpiderSpawnEgg => 64, + Item::SquidSpawnEgg => 64, + Item::StraySpawnEgg => 64, + Item::StriderSpawnEgg => 64, + Item::TraderLlamaSpawnEgg => 64, + Item::TropicalFishSpawnEgg => 64, + Item::TurtleSpawnEgg => 64, + Item::VexSpawnEgg => 64, + Item::VillagerSpawnEgg => 64, + Item::VindicatorSpawnEgg => 64, + Item::WanderingTraderSpawnEgg => 64, + Item::WitchSpawnEgg => 64, + Item::WitherSkeletonSpawnEgg => 64, + Item::WolfSpawnEgg => 64, + Item::ZoglinSpawnEgg => 64, + Item::ZombieSpawnEgg => 64, + Item::ZombieHorseSpawnEgg => 64, + Item::ZombieVillagerSpawnEgg => 64, + Item::ZombifiedPiglinSpawnEgg => 64, + Item::ExperienceBottle => 64, + Item::FireCharge => 64, + Item::WritableBook => 1, + Item::WrittenBook => 16, + Item::Emerald => 64, + Item::ItemFrame => 64, + Item::FlowerPot => 64, + Item::Carrot => 64, + Item::Potato => 64, + Item::BakedPotato => 64, + Item::PoisonousPotato => 64, + Item::Map => 64, + Item::GoldenCarrot => 64, + Item::SkeletonSkull => 64, + Item::WitherSkeletonSkull => 64, + Item::PlayerHead => 64, + Item::ZombieHead => 64, + Item::CreeperHead => 64, + Item::DragonHead => 64, + Item::CarrotOnAStick => 1, + Item::WarpedFungusOnAStick => 64, + Item::NetherStar => 64, + Item::PumpkinPie => 64, + Item::FireworkRocket => 64, + Item::FireworkStar => 64, + Item::EnchantedBook => 1, + Item::NetherBrick => 64, + Item::Quartz => 64, + Item::TntMinecart => 1, + Item::HopperMinecart => 1, + Item::PrismarineShard => 64, + Item::PrismarineCrystals => 64, + Item::Rabbit => 64, + Item::CookedRabbit => 64, + Item::RabbitStew => 1, + Item::RabbitFoot => 64, + Item::RabbitHide => 64, + Item::ArmorStand => 16, + Item::IronHorseArmor => 1, + Item::GoldenHorseArmor => 1, + Item::DiamondHorseArmor => 1, + Item::LeatherHorseArmor => 1, + Item::Lead => 64, + Item::NameTag => 64, + Item::CommandBlockMinecart => 1, + Item::Mutton => 64, + Item::CookedMutton => 64, + Item::WhiteBanner => 16, + Item::OrangeBanner => 16, + Item::MagentaBanner => 16, + Item::LightBlueBanner => 16, + Item::YellowBanner => 16, + Item::LimeBanner => 16, + Item::PinkBanner => 16, + Item::GrayBanner => 16, + Item::LightGrayBanner => 16, + Item::CyanBanner => 16, + Item::PurpleBanner => 16, + Item::BlueBanner => 16, + Item::BrownBanner => 16, + Item::GreenBanner => 16, + Item::RedBanner => 16, + Item::BlackBanner => 16, + Item::EndCrystal => 64, + Item::ChorusFruit => 64, + Item::PoppedChorusFruit => 64, + Item::Beetroot => 64, + Item::BeetrootSeeds => 64, + Item::BeetrootSoup => 1, + Item::DragonBreath => 64, + Item::SplashPotion => 1, + Item::SpectralArrow => 64, + Item::TippedArrow => 64, + Item::LingeringPotion => 1, + Item::Shield => 1, + Item::Elytra => 1, + Item::SpruceBoat => 1, + Item::BirchBoat => 1, + Item::JungleBoat => 1, + Item::AcaciaBoat => 1, + Item::DarkOakBoat => 1, + Item::TotemOfUndying => 1, + Item::ShulkerShell => 64, + Item::IronNugget => 64, + Item::KnowledgeBook => 1, + Item::DebugStick => 1, + Item::MusicDisc13 => 1, + Item::MusicDiscCat => 1, + Item::MusicDiscBlocks => 1, + Item::MusicDiscChirp => 1, + Item::MusicDiscFar => 1, + Item::MusicDiscMall => 1, + Item::MusicDiscMellohi => 1, + Item::MusicDiscStal => 1, + Item::MusicDiscStrad => 1, + Item::MusicDiscWard => 1, + Item::MusicDisc11 => 1, + Item::MusicDiscWait => 1, + Item::MusicDiscPigstep => 1, + Item::Trident => 1, + Item::PhantomMembrane => 64, + Item::NautilusShell => 64, + Item::HeartOfTheSea => 64, + Item::Crossbow => 1, + Item::SuspiciousStew => 1, + Item::Loom => 64, + Item::FlowerBannerPattern => 1, + Item::CreeperBannerPattern => 1, + Item::SkullBannerPattern => 1, + Item::MojangBannerPattern => 1, + Item::GlobeBannerPattern => 1, + Item::PiglinBannerPattern => 1, + Item::Composter => 64, + Item::Barrel => 64, + Item::Smoker => 64, + Item::BlastFurnace => 64, + Item::CartographyTable => 64, + Item::FletchingTable => 64, + Item::Grindstone => 64, + Item::Lectern => 64, + Item::SmithingTable => 64, + Item::Stonecutter => 64, + Item::Bell => 64, + Item::Lantern => 64, + Item::SoulLantern => 64, + Item::SweetBerries => 64, + Item::Campfire => 64, + Item::SoulCampfire => 64, + Item::Shroomlight => 64, + Item::Honeycomb => 64, + Item::BeeNest => 64, + Item::Beehive => 64, + Item::HoneyBottle => 16, + Item::HoneyBlock => 64, + Item::HoneycombBlock => 64, + Item::Lodestone => 64, + Item::NetheriteBlock => 64, + Item::AncientDebris => 64, + Item::Target => 64, + Item::CryingObsidian => 64, + Item::Blackstone => 64, + Item::BlackstoneSlab => 64, + Item::BlackstoneStairs => 64, + Item::GildedBlackstone => 64, + Item::PolishedBlackstone => 64, + Item::PolishedBlackstoneSlab => 64, + Item::PolishedBlackstoneStairs => 64, + Item::ChiseledPolishedBlackstone => 64, + Item::PolishedBlackstoneBricks => 64, + Item::PolishedBlackstoneBrickSlab => 64, + Item::PolishedBlackstoneBrickStairs => 64, + Item::CrackedPolishedBlackstoneBricks => 64, + Item::RespawnAnchor => 64, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Item { + /// Returns the `durability` property of this `Item`. + pub fn durability(&self) -> Option { + match self { + Item::Air => None, + Item::Stone => None, + Item::Granite => None, + Item::PolishedGranite => None, + Item::Diorite => None, + Item::PolishedDiorite => None, + Item::Andesite => None, + Item::PolishedAndesite => None, + Item::GrassBlock => None, + Item::Dirt => None, + Item::CoarseDirt => None, + Item::Podzol => None, + Item::CrimsonNylium => None, + Item::WarpedNylium => None, + Item::Cobblestone => None, + Item::OakPlanks => None, + Item::SprucePlanks => None, + Item::BirchPlanks => None, + Item::JunglePlanks => None, + Item::AcaciaPlanks => None, + Item::DarkOakPlanks => None, + Item::CrimsonPlanks => None, + Item::WarpedPlanks => None, + Item::OakSapling => None, + Item::SpruceSapling => None, + Item::BirchSapling => None, + Item::JungleSapling => None, + Item::AcaciaSapling => None, + Item::DarkOakSapling => None, + Item::Bedrock => None, + Item::Sand => None, + Item::RedSand => None, + Item::Gravel => None, + Item::GoldOre => None, + Item::IronOre => None, + Item::CoalOre => None, + Item::NetherGoldOre => None, + Item::OakLog => None, + Item::SpruceLog => None, + Item::BirchLog => None, + Item::JungleLog => None, + Item::AcaciaLog => None, + Item::DarkOakLog => None, + Item::CrimsonStem => None, + Item::WarpedStem => None, + Item::StrippedOakLog => None, + Item::StrippedSpruceLog => None, + Item::StrippedBirchLog => None, + Item::StrippedJungleLog => None, + Item::StrippedAcaciaLog => None, + Item::StrippedDarkOakLog => None, + Item::StrippedCrimsonStem => None, + Item::StrippedWarpedStem => None, + Item::StrippedOakWood => None, + Item::StrippedSpruceWood => None, + Item::StrippedBirchWood => None, + Item::StrippedJungleWood => None, + Item::StrippedAcaciaWood => None, + Item::StrippedDarkOakWood => None, + Item::StrippedCrimsonHyphae => None, + Item::StrippedWarpedHyphae => None, + Item::OakWood => None, + Item::SpruceWood => None, + Item::BirchWood => None, + Item::JungleWood => None, + Item::AcaciaWood => None, + Item::DarkOakWood => None, + Item::CrimsonHyphae => None, + Item::WarpedHyphae => None, + Item::OakLeaves => None, + Item::SpruceLeaves => None, + Item::BirchLeaves => None, + Item::JungleLeaves => None, + Item::AcaciaLeaves => None, + Item::DarkOakLeaves => None, + Item::Sponge => None, + Item::WetSponge => None, + Item::Glass => None, + Item::LapisOre => None, + Item::LapisBlock => None, + Item::Dispenser => None, + Item::Sandstone => None, + Item::ChiseledSandstone => None, + Item::CutSandstone => None, + Item::NoteBlock => None, + Item::PoweredRail => None, + Item::DetectorRail => None, + Item::StickyPiston => None, + Item::Cobweb => None, + Item::Grass => None, + Item::Fern => None, + Item::DeadBush => None, + Item::Seagrass => None, + Item::SeaPickle => None, + Item::Piston => None, + Item::WhiteWool => None, + Item::OrangeWool => None, + Item::MagentaWool => None, + Item::LightBlueWool => None, + Item::YellowWool => None, + Item::LimeWool => None, + Item::PinkWool => None, + Item::GrayWool => None, + Item::LightGrayWool => None, + Item::CyanWool => None, + Item::PurpleWool => None, + Item::BlueWool => None, + Item::BrownWool => None, + Item::GreenWool => None, + Item::RedWool => None, + Item::BlackWool => None, + Item::Dandelion => None, + Item::Poppy => None, + Item::BlueOrchid => None, + Item::Allium => None, + Item::AzureBluet => None, + Item::RedTulip => None, + Item::OrangeTulip => None, + Item::WhiteTulip => None, + Item::PinkTulip => None, + Item::OxeyeDaisy => None, + Item::Cornflower => None, + Item::LilyOfTheValley => None, + Item::WitherRose => None, + Item::BrownMushroom => None, + Item::RedMushroom => None, + Item::CrimsonFungus => None, + Item::WarpedFungus => None, + Item::CrimsonRoots => None, + Item::WarpedRoots => None, + Item::NetherSprouts => None, + Item::WeepingVines => None, + Item::TwistingVines => None, + Item::SugarCane => None, + Item::Kelp => None, + Item::Bamboo => None, + Item::GoldBlock => None, + Item::IronBlock => None, + Item::OakSlab => None, + Item::SpruceSlab => None, + Item::BirchSlab => None, + Item::JungleSlab => None, + Item::AcaciaSlab => None, + Item::DarkOakSlab => None, + Item::CrimsonSlab => None, + Item::WarpedSlab => None, + Item::StoneSlab => None, + Item::SmoothStoneSlab => None, + Item::SandstoneSlab => None, + Item::CutSandstoneSlab => None, + Item::PetrifiedOakSlab => None, + Item::CobblestoneSlab => None, + Item::BrickSlab => None, + Item::StoneBrickSlab => None, + Item::NetherBrickSlab => None, + Item::QuartzSlab => None, + Item::RedSandstoneSlab => None, + Item::CutRedSandstoneSlab => None, + Item::PurpurSlab => None, + Item::PrismarineSlab => None, + Item::PrismarineBrickSlab => None, + Item::DarkPrismarineSlab => None, + Item::SmoothQuartz => None, + Item::SmoothRedSandstone => None, + Item::SmoothSandstone => None, + Item::SmoothStone => None, + Item::Bricks => None, + Item::Tnt => None, + Item::Bookshelf => None, + Item::MossyCobblestone => None, + Item::Obsidian => None, + Item::Torch => None, + Item::EndRod => None, + Item::ChorusPlant => None, + Item::ChorusFlower => None, + Item::PurpurBlock => None, + Item::PurpurPillar => None, + Item::PurpurStairs => None, + Item::Spawner => None, + Item::OakStairs => None, + Item::Chest => None, + Item::DiamondOre => None, + Item::DiamondBlock => None, + Item::CraftingTable => None, + Item::Farmland => None, + Item::Furnace => None, + Item::Ladder => None, + Item::Rail => None, + Item::CobblestoneStairs => None, + Item::Lever => None, + Item::StonePressurePlate => None, + Item::OakPressurePlate => None, + Item::SprucePressurePlate => None, + Item::BirchPressurePlate => None, + Item::JunglePressurePlate => None, + Item::AcaciaPressurePlate => None, + Item::DarkOakPressurePlate => None, + Item::CrimsonPressurePlate => None, + Item::WarpedPressurePlate => None, + Item::PolishedBlackstonePressurePlate => None, + Item::RedstoneOre => None, + Item::RedstoneTorch => None, + Item::Snow => None, + Item::Ice => None, + Item::SnowBlock => None, + Item::Cactus => None, + Item::Clay => None, + Item::Jukebox => None, + Item::OakFence => None, + Item::SpruceFence => None, + Item::BirchFence => None, + Item::JungleFence => None, + Item::AcaciaFence => None, + Item::DarkOakFence => None, + Item::CrimsonFence => None, + Item::WarpedFence => None, + Item::Pumpkin => None, + Item::CarvedPumpkin => None, + Item::Netherrack => None, + Item::SoulSand => None, + Item::SoulSoil => None, + Item::Basalt => None, + Item::PolishedBasalt => None, + Item::SoulTorch => None, + Item::Glowstone => None, + Item::JackOLantern => None, + Item::OakTrapdoor => None, + Item::SpruceTrapdoor => None, + Item::BirchTrapdoor => None, + Item::JungleTrapdoor => None, + Item::AcaciaTrapdoor => None, + Item::DarkOakTrapdoor => None, + Item::CrimsonTrapdoor => None, + Item::WarpedTrapdoor => None, + Item::InfestedStone => None, + Item::InfestedCobblestone => None, + Item::InfestedStoneBricks => None, + Item::InfestedMossyStoneBricks => None, + Item::InfestedCrackedStoneBricks => None, + Item::InfestedChiseledStoneBricks => None, + Item::StoneBricks => None, + Item::MossyStoneBricks => None, + Item::CrackedStoneBricks => None, + Item::ChiseledStoneBricks => None, + Item::BrownMushroomBlock => None, + Item::RedMushroomBlock => None, + Item::MushroomStem => None, + Item::IronBars => None, + Item::Chain => None, + Item::GlassPane => None, + Item::Melon => None, + Item::Vine => None, + Item::OakFenceGate => None, + Item::SpruceFenceGate => None, + Item::BirchFenceGate => None, + Item::JungleFenceGate => None, + Item::AcaciaFenceGate => None, + Item::DarkOakFenceGate => None, + Item::CrimsonFenceGate => None, + Item::WarpedFenceGate => None, + Item::BrickStairs => None, + Item::StoneBrickStairs => None, + Item::Mycelium => None, + Item::LilyPad => None, + Item::NetherBricks => None, + Item::CrackedNetherBricks => None, + Item::ChiseledNetherBricks => None, + Item::NetherBrickFence => None, + Item::NetherBrickStairs => None, + Item::EnchantingTable => None, + Item::EndPortalFrame => None, + Item::EndStone => None, + Item::EndStoneBricks => None, + Item::DragonEgg => None, + Item::RedstoneLamp => None, + Item::SandstoneStairs => None, + Item::EmeraldOre => None, + Item::EnderChest => None, + Item::TripwireHook => None, + Item::EmeraldBlock => None, + Item::SpruceStairs => None, + Item::BirchStairs => None, + Item::JungleStairs => None, + Item::CrimsonStairs => None, + Item::WarpedStairs => None, + Item::CommandBlock => None, + Item::Beacon => None, + Item::CobblestoneWall => None, + Item::MossyCobblestoneWall => None, + Item::BrickWall => None, + Item::PrismarineWall => None, + Item::RedSandstoneWall => None, + Item::MossyStoneBrickWall => None, + Item::GraniteWall => None, + Item::StoneBrickWall => None, + Item::NetherBrickWall => None, + Item::AndesiteWall => None, + Item::RedNetherBrickWall => None, + Item::SandstoneWall => None, + Item::EndStoneBrickWall => None, + Item::DioriteWall => None, + Item::BlackstoneWall => None, + Item::PolishedBlackstoneWall => None, + Item::PolishedBlackstoneBrickWall => None, + Item::StoneButton => None, + Item::OakButton => None, + Item::SpruceButton => None, + Item::BirchButton => None, + Item::JungleButton => None, + Item::AcaciaButton => None, + Item::DarkOakButton => None, + Item::CrimsonButton => None, + Item::WarpedButton => None, + Item::PolishedBlackstoneButton => None, + Item::Anvil => None, + Item::ChippedAnvil => None, + Item::DamagedAnvil => None, + Item::TrappedChest => None, + Item::LightWeightedPressurePlate => None, + Item::HeavyWeightedPressurePlate => None, + Item::DaylightDetector => None, + Item::RedstoneBlock => None, + Item::NetherQuartzOre => None, + Item::Hopper => None, + Item::ChiseledQuartzBlock => None, + Item::QuartzBlock => None, + Item::QuartzBricks => None, + Item::QuartzPillar => None, + Item::QuartzStairs => None, + Item::ActivatorRail => None, + Item::Dropper => None, + Item::WhiteTerracotta => None, + Item::OrangeTerracotta => None, + Item::MagentaTerracotta => None, + Item::LightBlueTerracotta => None, + Item::YellowTerracotta => None, + Item::LimeTerracotta => None, + Item::PinkTerracotta => None, + Item::GrayTerracotta => None, + Item::LightGrayTerracotta => None, + Item::CyanTerracotta => None, + Item::PurpleTerracotta => None, + Item::BlueTerracotta => None, + Item::BrownTerracotta => None, + Item::GreenTerracotta => None, + Item::RedTerracotta => None, + Item::BlackTerracotta => None, + Item::Barrier => None, + Item::IronTrapdoor => None, + Item::HayBlock => None, + Item::WhiteCarpet => None, + Item::OrangeCarpet => None, + Item::MagentaCarpet => None, + Item::LightBlueCarpet => None, + Item::YellowCarpet => None, + Item::LimeCarpet => None, + Item::PinkCarpet => None, + Item::GrayCarpet => None, + Item::LightGrayCarpet => None, + Item::CyanCarpet => None, + Item::PurpleCarpet => None, + Item::BlueCarpet => None, + Item::BrownCarpet => None, + Item::GreenCarpet => None, + Item::RedCarpet => None, + Item::BlackCarpet => None, + Item::Terracotta => None, + Item::CoalBlock => None, + Item::PackedIce => None, + Item::AcaciaStairs => None, + Item::DarkOakStairs => None, + Item::SlimeBlock => None, + Item::GrassPath => None, + Item::Sunflower => None, + Item::Lilac => None, + Item::RoseBush => None, + Item::Peony => None, + Item::TallGrass => None, + Item::LargeFern => None, + Item::WhiteStainedGlass => None, + Item::OrangeStainedGlass => None, + Item::MagentaStainedGlass => None, + Item::LightBlueStainedGlass => None, + Item::YellowStainedGlass => None, + Item::LimeStainedGlass => None, + Item::PinkStainedGlass => None, + Item::GrayStainedGlass => None, + Item::LightGrayStainedGlass => None, + Item::CyanStainedGlass => None, + Item::PurpleStainedGlass => None, + Item::BlueStainedGlass => None, + Item::BrownStainedGlass => None, + Item::GreenStainedGlass => None, + Item::RedStainedGlass => None, + Item::BlackStainedGlass => None, + Item::WhiteStainedGlassPane => None, + Item::OrangeStainedGlassPane => None, + Item::MagentaStainedGlassPane => None, + Item::LightBlueStainedGlassPane => None, + Item::YellowStainedGlassPane => None, + Item::LimeStainedGlassPane => None, + Item::PinkStainedGlassPane => None, + Item::GrayStainedGlassPane => None, + Item::LightGrayStainedGlassPane => None, + Item::CyanStainedGlassPane => None, + Item::PurpleStainedGlassPane => None, + Item::BlueStainedGlassPane => None, + Item::BrownStainedGlassPane => None, + Item::GreenStainedGlassPane => None, + Item::RedStainedGlassPane => None, + Item::BlackStainedGlassPane => None, + Item::Prismarine => None, + Item::PrismarineBricks => None, + Item::DarkPrismarine => None, + Item::PrismarineStairs => None, + Item::PrismarineBrickStairs => None, + Item::DarkPrismarineStairs => None, + Item::SeaLantern => None, + Item::RedSandstone => None, + Item::ChiseledRedSandstone => None, + Item::CutRedSandstone => None, + Item::RedSandstoneStairs => None, + Item::RepeatingCommandBlock => None, + Item::ChainCommandBlock => None, + Item::MagmaBlock => None, + Item::NetherWartBlock => None, + Item::WarpedWartBlock => None, + Item::RedNetherBricks => None, + Item::BoneBlock => None, + Item::StructureVoid => None, + Item::Observer => None, + Item::ShulkerBox => None, + Item::WhiteShulkerBox => None, + Item::OrangeShulkerBox => None, + Item::MagentaShulkerBox => None, + Item::LightBlueShulkerBox => None, + Item::YellowShulkerBox => None, + Item::LimeShulkerBox => None, + Item::PinkShulkerBox => None, + Item::GrayShulkerBox => None, + Item::LightGrayShulkerBox => None, + Item::CyanShulkerBox => None, + Item::PurpleShulkerBox => None, + Item::BlueShulkerBox => None, + Item::BrownShulkerBox => None, + Item::GreenShulkerBox => None, + Item::RedShulkerBox => None, + Item::BlackShulkerBox => None, + Item::WhiteGlazedTerracotta => None, + Item::OrangeGlazedTerracotta => None, + Item::MagentaGlazedTerracotta => None, + Item::LightBlueGlazedTerracotta => None, + Item::YellowGlazedTerracotta => None, + Item::LimeGlazedTerracotta => None, + Item::PinkGlazedTerracotta => None, + Item::GrayGlazedTerracotta => None, + Item::LightGrayGlazedTerracotta => None, + Item::CyanGlazedTerracotta => None, + Item::PurpleGlazedTerracotta => None, + Item::BlueGlazedTerracotta => None, + Item::BrownGlazedTerracotta => None, + Item::GreenGlazedTerracotta => None, + Item::RedGlazedTerracotta => None, + Item::BlackGlazedTerracotta => None, + Item::WhiteConcrete => None, + Item::OrangeConcrete => None, + Item::MagentaConcrete => None, + Item::LightBlueConcrete => None, + Item::YellowConcrete => None, + Item::LimeConcrete => None, + Item::PinkConcrete => None, + Item::GrayConcrete => None, + Item::LightGrayConcrete => None, + Item::CyanConcrete => None, + Item::PurpleConcrete => None, + Item::BlueConcrete => None, + Item::BrownConcrete => None, + Item::GreenConcrete => None, + Item::RedConcrete => None, + Item::BlackConcrete => None, + Item::WhiteConcretePowder => None, + Item::OrangeConcretePowder => None, + Item::MagentaConcretePowder => None, + Item::LightBlueConcretePowder => None, + Item::YellowConcretePowder => None, + Item::LimeConcretePowder => None, + Item::PinkConcretePowder => None, + Item::GrayConcretePowder => None, + Item::LightGrayConcretePowder => None, + Item::CyanConcretePowder => None, + Item::PurpleConcretePowder => None, + Item::BlueConcretePowder => None, + Item::BrownConcretePowder => None, + Item::GreenConcretePowder => None, + Item::RedConcretePowder => None, + Item::BlackConcretePowder => None, + Item::TurtleEgg => None, + Item::DeadTubeCoralBlock => None, + Item::DeadBrainCoralBlock => None, + Item::DeadBubbleCoralBlock => None, + Item::DeadFireCoralBlock => None, + Item::DeadHornCoralBlock => None, + Item::TubeCoralBlock => None, + Item::BrainCoralBlock => None, + Item::BubbleCoralBlock => None, + Item::FireCoralBlock => None, + Item::HornCoralBlock => None, + Item::TubeCoral => None, + Item::BrainCoral => None, + Item::BubbleCoral => None, + Item::FireCoral => None, + Item::HornCoral => None, + Item::DeadBrainCoral => None, + Item::DeadBubbleCoral => None, + Item::DeadFireCoral => None, + Item::DeadHornCoral => None, + Item::DeadTubeCoral => None, + Item::TubeCoralFan => None, + Item::BrainCoralFan => None, + Item::BubbleCoralFan => None, + Item::FireCoralFan => None, + Item::HornCoralFan => None, + Item::DeadTubeCoralFan => None, + Item::DeadBrainCoralFan => None, + Item::DeadBubbleCoralFan => None, + Item::DeadFireCoralFan => None, + Item::DeadHornCoralFan => None, + Item::BlueIce => None, + Item::Conduit => None, + Item::PolishedGraniteStairs => None, + Item::SmoothRedSandstoneStairs => None, + Item::MossyStoneBrickStairs => None, + Item::PolishedDioriteStairs => None, + Item::MossyCobblestoneStairs => None, + Item::EndStoneBrickStairs => None, + Item::StoneStairs => None, + Item::SmoothSandstoneStairs => None, + Item::SmoothQuartzStairs => None, + Item::GraniteStairs => None, + Item::AndesiteStairs => None, + Item::RedNetherBrickStairs => None, + Item::PolishedAndesiteStairs => None, + Item::DioriteStairs => None, + Item::PolishedGraniteSlab => None, + Item::SmoothRedSandstoneSlab => None, + Item::MossyStoneBrickSlab => None, + Item::PolishedDioriteSlab => None, + Item::MossyCobblestoneSlab => None, + Item::EndStoneBrickSlab => None, + Item::SmoothSandstoneSlab => None, + Item::SmoothQuartzSlab => None, + Item::GraniteSlab => None, + Item::AndesiteSlab => None, + Item::RedNetherBrickSlab => None, + Item::PolishedAndesiteSlab => None, + Item::DioriteSlab => None, + Item::Scaffolding => None, + Item::IronDoor => None, + Item::OakDoor => None, + Item::SpruceDoor => None, + Item::BirchDoor => None, + Item::JungleDoor => None, + Item::AcaciaDoor => None, + Item::DarkOakDoor => None, + Item::CrimsonDoor => None, + Item::WarpedDoor => None, + Item::Repeater => None, + Item::Comparator => None, + Item::StructureBlock => None, + Item::Jigsaw => None, + Item::TurtleHelmet => None, + Item::Scute => None, + Item::FlintAndSteel => None, + Item::Apple => None, + Item::Bow => None, + Item::Arrow => None, + Item::Coal => None, + Item::Charcoal => None, + Item::Diamond => None, + Item::IronIngot => None, + Item::GoldIngot => None, + Item::NetheriteIngot => None, + Item::NetheriteScrap => None, + Item::WoodenSword => None, + Item::WoodenShovel => None, + Item::WoodenPickaxe => None, + Item::WoodenAxe => None, + Item::WoodenHoe => None, + Item::StoneSword => None, + Item::StoneShovel => None, + Item::StonePickaxe => None, + Item::StoneAxe => None, + Item::StoneHoe => None, + Item::GoldenSword => None, + Item::GoldenShovel => None, + Item::GoldenPickaxe => None, + Item::GoldenAxe => None, + Item::GoldenHoe => None, + Item::IronSword => None, + Item::IronShovel => None, + Item::IronPickaxe => None, + Item::IronAxe => None, + Item::IronHoe => None, + Item::DiamondSword => None, + Item::DiamondShovel => None, + Item::DiamondPickaxe => None, + Item::DiamondAxe => None, + Item::DiamondHoe => None, + Item::NetheriteSword => None, + Item::NetheriteShovel => None, + Item::NetheritePickaxe => None, + Item::NetheriteAxe => None, + Item::NetheriteHoe => None, + Item::Stick => None, + Item::Bowl => None, + Item::MushroomStew => None, + Item::String => None, + Item::Feather => None, + Item::Gunpowder => None, + Item::WheatSeeds => None, + Item::Wheat => None, + Item::Bread => None, + Item::LeatherHelmet => None, + Item::LeatherChestplate => None, + Item::LeatherLeggings => None, + Item::LeatherBoots => None, + Item::ChainmailHelmet => None, + Item::ChainmailChestplate => None, + Item::ChainmailLeggings => None, + Item::ChainmailBoots => None, + Item::IronHelmet => None, + Item::IronChestplate => None, + Item::IronLeggings => None, + Item::IronBoots => None, + Item::DiamondHelmet => None, + Item::DiamondChestplate => None, + Item::DiamondLeggings => None, + Item::DiamondBoots => None, + Item::GoldenHelmet => None, + Item::GoldenChestplate => None, + Item::GoldenLeggings => None, + Item::GoldenBoots => None, + Item::NetheriteHelmet => None, + Item::NetheriteChestplate => None, + Item::NetheriteLeggings => None, + Item::NetheriteBoots => None, + Item::Flint => None, + Item::Porkchop => None, + Item::CookedPorkchop => None, + Item::Painting => None, + Item::GoldenApple => None, + Item::EnchantedGoldenApple => None, + Item::OakSign => None, + Item::SpruceSign => None, + Item::BirchSign => None, + Item::JungleSign => None, + Item::AcaciaSign => None, + Item::DarkOakSign => None, + Item::CrimsonSign => None, + Item::WarpedSign => None, + Item::Bucket => None, + Item::WaterBucket => None, + Item::LavaBucket => None, + Item::Minecart => None, + Item::Saddle => None, + Item::Redstone => None, + Item::Snowball => None, + Item::OakBoat => None, + Item::Leather => None, + Item::MilkBucket => None, + Item::PufferfishBucket => None, + Item::SalmonBucket => None, + Item::CodBucket => None, + Item::TropicalFishBucket => None, + Item::Brick => None, + Item::ClayBall => None, + Item::DriedKelpBlock => None, + Item::Paper => None, + Item::Book => None, + Item::SlimeBall => None, + Item::ChestMinecart => None, + Item::FurnaceMinecart => None, + Item::Egg => None, + Item::Compass => None, + Item::FishingRod => None, + Item::Clock => None, + Item::GlowstoneDust => None, + Item::Cod => None, + Item::Salmon => None, + Item::TropicalFish => None, + Item::Pufferfish => None, + Item::CookedCod => None, + Item::CookedSalmon => None, + Item::InkSac => None, + Item::CocoaBeans => None, + Item::LapisLazuli => None, + Item::WhiteDye => None, + Item::OrangeDye => None, + Item::MagentaDye => None, + Item::LightBlueDye => None, + Item::YellowDye => None, + Item::LimeDye => None, + Item::PinkDye => None, + Item::GrayDye => None, + Item::LightGrayDye => None, + Item::CyanDye => None, + Item::PurpleDye => None, + Item::BlueDye => None, + Item::BrownDye => None, + Item::GreenDye => None, + Item::RedDye => None, + Item::BlackDye => None, + Item::BoneMeal => None, + Item::Bone => None, + Item::Sugar => None, + Item::Cake => None, + Item::WhiteBed => None, + Item::OrangeBed => None, + Item::MagentaBed => None, + Item::LightBlueBed => None, + Item::YellowBed => None, + Item::LimeBed => None, + Item::PinkBed => None, + Item::GrayBed => None, + Item::LightGrayBed => None, + Item::CyanBed => None, + Item::PurpleBed => None, + Item::BlueBed => None, + Item::BrownBed => None, + Item::GreenBed => None, + Item::RedBed => None, + Item::BlackBed => None, + Item::Cookie => None, + Item::FilledMap => None, + Item::Shears => None, + Item::MelonSlice => None, + Item::DriedKelp => None, + Item::PumpkinSeeds => None, + Item::MelonSeeds => None, + Item::Beef => None, + Item::CookedBeef => None, + Item::Chicken => None, + Item::CookedChicken => None, + Item::RottenFlesh => None, + Item::EnderPearl => None, + Item::BlazeRod => None, + Item::GhastTear => None, + Item::GoldNugget => None, + Item::NetherWart => None, + Item::Potion => None, + Item::GlassBottle => None, + Item::SpiderEye => None, + Item::FermentedSpiderEye => None, + Item::BlazePowder => None, + Item::MagmaCream => None, + Item::BrewingStand => None, + Item::Cauldron => None, + Item::EnderEye => None, + Item::GlisteringMelonSlice => None, + Item::BatSpawnEgg => None, + Item::BeeSpawnEgg => None, + Item::BlazeSpawnEgg => None, + Item::CatSpawnEgg => None, + Item::CaveSpiderSpawnEgg => None, + Item::ChickenSpawnEgg => None, + Item::CodSpawnEgg => None, + Item::CowSpawnEgg => None, + Item::CreeperSpawnEgg => None, + Item::DolphinSpawnEgg => None, + Item::DonkeySpawnEgg => None, + Item::DrownedSpawnEgg => None, + Item::ElderGuardianSpawnEgg => None, + Item::EndermanSpawnEgg => None, + Item::EndermiteSpawnEgg => None, + Item::EvokerSpawnEgg => None, + Item::FoxSpawnEgg => None, + Item::GhastSpawnEgg => None, + Item::GuardianSpawnEgg => None, + Item::HoglinSpawnEgg => None, + Item::HorseSpawnEgg => None, + Item::HuskSpawnEgg => None, + Item::LlamaSpawnEgg => None, + Item::MagmaCubeSpawnEgg => None, + Item::MooshroomSpawnEgg => None, + Item::MuleSpawnEgg => None, + Item::OcelotSpawnEgg => None, + Item::PandaSpawnEgg => None, + Item::ParrotSpawnEgg => None, + Item::PhantomSpawnEgg => None, + Item::PigSpawnEgg => None, + Item::PiglinSpawnEgg => None, + Item::PiglinBruteSpawnEgg => None, + Item::PillagerSpawnEgg => None, + Item::PolarBearSpawnEgg => None, + Item::PufferfishSpawnEgg => None, + Item::RabbitSpawnEgg => None, + Item::RavagerSpawnEgg => None, + Item::SalmonSpawnEgg => None, + Item::SheepSpawnEgg => None, + Item::ShulkerSpawnEgg => None, + Item::SilverfishSpawnEgg => None, + Item::SkeletonSpawnEgg => None, + Item::SkeletonHorseSpawnEgg => None, + Item::SlimeSpawnEgg => None, + Item::SpiderSpawnEgg => None, + Item::SquidSpawnEgg => None, + Item::StraySpawnEgg => None, + Item::StriderSpawnEgg => None, + Item::TraderLlamaSpawnEgg => None, + Item::TropicalFishSpawnEgg => None, + Item::TurtleSpawnEgg => None, + Item::VexSpawnEgg => None, + Item::VillagerSpawnEgg => None, + Item::VindicatorSpawnEgg => None, + Item::WanderingTraderSpawnEgg => None, + Item::WitchSpawnEgg => None, + Item::WitherSkeletonSpawnEgg => None, + Item::WolfSpawnEgg => None, + Item::ZoglinSpawnEgg => None, + Item::ZombieSpawnEgg => None, + Item::ZombieHorseSpawnEgg => None, + Item::ZombieVillagerSpawnEgg => None, + Item::ZombifiedPiglinSpawnEgg => None, + Item::ExperienceBottle => None, + Item::FireCharge => None, + Item::WritableBook => None, + Item::WrittenBook => None, + Item::Emerald => None, + Item::ItemFrame => None, + Item::FlowerPot => None, + Item::Carrot => None, + Item::Potato => None, + Item::BakedPotato => None, + Item::PoisonousPotato => None, + Item::Map => None, + Item::GoldenCarrot => None, + Item::SkeletonSkull => None, + Item::WitherSkeletonSkull => None, + Item::PlayerHead => None, + Item::ZombieHead => None, + Item::CreeperHead => None, + Item::DragonHead => None, + Item::CarrotOnAStick => None, + Item::WarpedFungusOnAStick => None, + Item::NetherStar => None, + Item::PumpkinPie => None, + Item::FireworkRocket => None, + Item::FireworkStar => None, + Item::EnchantedBook => None, + Item::NetherBrick => None, + Item::Quartz => None, + Item::TntMinecart => None, + Item::HopperMinecart => None, + Item::PrismarineShard => None, + Item::PrismarineCrystals => None, + Item::Rabbit => None, + Item::CookedRabbit => None, + Item::RabbitStew => None, + Item::RabbitFoot => None, + Item::RabbitHide => None, + Item::ArmorStand => None, + Item::IronHorseArmor => None, + Item::GoldenHorseArmor => None, + Item::DiamondHorseArmor => None, + Item::LeatherHorseArmor => None, + Item::Lead => None, + Item::NameTag => None, + Item::CommandBlockMinecart => None, + Item::Mutton => None, + Item::CookedMutton => None, + Item::WhiteBanner => None, + Item::OrangeBanner => None, + Item::MagentaBanner => None, + Item::LightBlueBanner => None, + Item::YellowBanner => None, + Item::LimeBanner => None, + Item::PinkBanner => None, + Item::GrayBanner => None, + Item::LightGrayBanner => None, + Item::CyanBanner => None, + Item::PurpleBanner => None, + Item::BlueBanner => None, + Item::BrownBanner => None, + Item::GreenBanner => None, + Item::RedBanner => None, + Item::BlackBanner => None, + Item::EndCrystal => None, + Item::ChorusFruit => None, + Item::PoppedChorusFruit => None, + Item::Beetroot => None, + Item::BeetrootSeeds => None, + Item::BeetrootSoup => None, + Item::DragonBreath => None, + Item::SplashPotion => None, + Item::SpectralArrow => None, + Item::TippedArrow => None, + Item::LingeringPotion => None, + Item::Shield => None, + Item::Elytra => None, + Item::SpruceBoat => None, + Item::BirchBoat => None, + Item::JungleBoat => None, + Item::AcaciaBoat => None, + Item::DarkOakBoat => None, + Item::TotemOfUndying => None, + Item::ShulkerShell => None, + Item::IronNugget => None, + Item::KnowledgeBook => None, + Item::DebugStick => None, + Item::MusicDisc13 => None, + Item::MusicDiscCat => None, + Item::MusicDiscBlocks => None, + Item::MusicDiscChirp => None, + Item::MusicDiscFar => None, + Item::MusicDiscMall => None, + Item::MusicDiscMellohi => None, + Item::MusicDiscStal => None, + Item::MusicDiscStrad => None, + Item::MusicDiscWard => None, + Item::MusicDisc11 => None, + Item::MusicDiscWait => None, + Item::MusicDiscPigstep => None, + Item::Trident => None, + Item::PhantomMembrane => None, + Item::NautilusShell => None, + Item::HeartOfTheSea => None, + Item::Crossbow => None, + Item::SuspiciousStew => None, + Item::Loom => None, + Item::FlowerBannerPattern => None, + Item::CreeperBannerPattern => None, + Item::SkullBannerPattern => None, + Item::MojangBannerPattern => None, + Item::GlobeBannerPattern => None, + Item::PiglinBannerPattern => None, + Item::Composter => None, + Item::Barrel => None, + Item::Smoker => None, + Item::BlastFurnace => None, + Item::CartographyTable => None, + Item::FletchingTable => None, + Item::Grindstone => None, + Item::Lectern => None, + Item::SmithingTable => None, + Item::Stonecutter => None, + Item::Bell => None, + Item::Lantern => None, + Item::SoulLantern => None, + Item::SweetBerries => None, + Item::Campfire => None, + Item::SoulCampfire => None, + Item::Shroomlight => None, + Item::Honeycomb => None, + Item::BeeNest => None, + Item::Beehive => None, + Item::HoneyBottle => None, + Item::HoneyBlock => None, + Item::HoneycombBlock => None, + Item::Lodestone => None, + Item::NetheriteBlock => None, + Item::AncientDebris => None, + Item::Target => None, + Item::CryingObsidian => None, + Item::Blackstone => None, + Item::BlackstoneSlab => None, + Item::BlackstoneStairs => None, + Item::GildedBlackstone => None, + Item::PolishedBlackstone => None, + Item::PolishedBlackstoneSlab => None, + Item::PolishedBlackstoneStairs => None, + Item::ChiseledPolishedBlackstone => None, + Item::PolishedBlackstoneBricks => None, + Item::PolishedBlackstoneBrickSlab => None, + Item::PolishedBlackstoneBrickStairs => None, + Item::CrackedPolishedBlackstoneBricks => None, + Item::RespawnAnchor => None, + } + } +} diff --git a/crates/generated/src/lib.rs b/crates/generated/src/lib.rs new file mode 100644 index 000000000..ba9575b0a --- /dev/null +++ b/crates/generated/src/lib.rs @@ -0,0 +1,240 @@ +use parking_lot::{Mutex, MutexGuard}; +use std::sync::Arc; + +#[allow(clippy::all)] +mod biome; +#[allow(clippy::all)] +mod block; +#[allow(clippy::all)] +mod entity; +#[allow(clippy::all)] +mod inventory; +#[allow(clippy::all)] +mod item; +#[allow(clippy::all)] +mod particle; +#[allow(clippy::all)] +mod simplified_block; + +pub use biome::Biome; +pub use block::BlockKind; +pub use entity::EntityKind; +pub use inventory::{Area, InventoryBacking, Window}; +pub use item::Item; +pub use particle::Particle; +pub use simplified_block::SimplifiedBlockKind; + +#[derive(Debug, Clone, PartialEq, Eq)] +pub struct ItemStack { + pub item: Item, + pub count: u32, + + /// Damage to the item, if it's damageable. + pub damage: Option, +} + +impl ItemStack { + /// Creates a new `ItemStack`. + pub fn new(item: Item, count: u32) -> Self { + Self { + item, + count, + damage: item.durability().map(|_| 0), + } + } + + /// Returns whether the given item stack has + /// the same type as (but not necessarily the same + /// amount as) `self`. + pub fn has_same_type(&self, other: &ItemStack) -> bool { + other.item == self.item && other.damage == self.damage + } + + /// Returns the item type for this `ItemStack`. + pub fn item(&self) -> Item { + self.item + } + + /// Returns the number of items in this `ItemStack`. + pub fn count(&self) -> u32 { + self.count + } + + /// Adds more items to this ItemStack. Returns the new count. + pub fn add(&mut self, count: u32) -> u32 { + self.count += count; + self.count + } + + /// Removes some items from this ItemStack. Returns whether there + /// were enough items to be removed. + pub fn remove(&mut self, count: u32) -> bool { + self.count = match self.count.checked_sub(count) { + Some(count) => count, + None => return false, + }; + true + } + + /// Sets the item for this `ItemStack`. + pub fn set_item(&mut self, item: Item) { + self.item = item; + } + + /// Sets the count for this `ItemStack`. + pub fn set_count(&mut self, count: u32) { + self.count = count; + } + + /// Splits this `ItemStack` in half, returning the + /// second item stack. If the amount is odd, `self` + /// will be left with the least items. + pub fn take_half(&mut self) -> ItemStack { + let count_left = self.count / 2; + let other_half = ItemStack { + count: self.count - count_left, + ..self.clone() + }; + self.count = count_left; + other_half + } + + /// Splits this `ItemStack`. + pub fn take(&mut self, amount: u32) -> ItemStack { + let count_left = self.count.saturating_sub(amount); + let count_lost = self.count - count_left; + self.count = count_left; + ItemStack { + count: count_lost, + ..self.clone() + } + } + + /// Merges another `ItemStack` with this one. + pub fn merge_with(&mut self, other: &mut ItemStack) { + if !self.has_same_type(other) { + return; + } + let new_count = (self.count + other.count).min(self.item.stack_size()); + let amount_added = new_count - self.count; + self.count = new_count; + other.count -= amount_added; + } + + /// Transfers up to `n` items to `other`. + pub fn transfer_to(&mut self, n: u32, other: &mut ItemStack) { + let max_transfer = other.item.stack_size().saturating_sub(other.count); + let transfer = max_transfer.min(self.count).min(n); + self.count -= transfer; + other.count += transfer; + } + + /// Damages the item by the specified amount. + /// If this returns `true`, then the item is broken. + pub fn damage(&mut self, amount: u32) -> bool { + match &mut self.damage { + Some(damage) => { + *damage += amount; + if let Some(durability) = self.item.durability() { + *damage >= durability + } else { + false + } + } + None => false, + } + } +} + +type Slot = Mutex>; + +/// A handle to an inventory. +/// +/// An inventory is composed of one or more _areas_, each +/// if which contains one or more item stacks stored in an array. Areas are defined +/// by the `Area` enum; examples include `Storage`, `Hotbar`, `Helmet`, `Offhand`, +/// and `CraftingInput`. +/// +/// Note that an `Inventory` is a _handle_; it's backed by an `Arc`. As such, cloning +/// it is cheap and creates a new handle to the same inventory. Interior mutability +/// is used to make this safe. +#[derive(Debug, Clone)] +pub struct Inventory { + backing: Arc>, +} + +impl Inventory { + /// Returns whether two `Inventory` handles point to the same + /// backing inventory. + pub fn ptr_eq(&self, other: &Self) -> bool { + Arc::ptr_eq(&self.backing, &other.backing) + } + + /// Gets the item at the given index within an area in this inventory. + /// + /// The returned value is a `MutexGuard` and can be mutated. + /// + /// # Note + /// _Never_ keep two returned `MutexGuard`s for the same inventory alive + /// at once. Deadlocks are not fun. + pub fn item(&self, area: Area, slot: usize) -> Option>> { + let slice = self.backing.area_slice(area)?; + slice.get(slot).map(Mutex::lock) + } + + /// Gets all the items in this inventory. + pub fn to_vec(&self) -> Vec> { + let mut vec = Vec::new(); + for area in self.backing.areas() { + for item in self.backing.area_slice(*area).unwrap() { + vec.push(item.lock().clone()); + } + } + vec + } + + /// Creates a new handle to the same inventory. + /// + /// This operation is the same as calling `clone()`, but it's more explicit + /// in its intent. + pub fn new_handle(&self) -> Inventory { + self.clone() + } +} + +#[derive(Debug, thiserror::Error)] +pub enum WindowError { + #[error("slot index {0} is out of bounds")] + OutOfBounds(usize), +} + +impl Window { + /// Gets the item at the provided protocol index. + /// Returns an error if index is invalid. + pub fn item(&self, index: usize) -> Result>, WindowError> { + let (inventory, area, slot) = self + .index_to_slot(index) + .ok_or(WindowError::OutOfBounds(index))?; + inventory + .item(area, slot) + .ok_or(WindowError::OutOfBounds(index)) + } + + /// Sets the item at the provided protocol index. + /// Returns an error if the index is invalid. + pub fn set_item(&self, index: usize, item: Option) -> Result<(), WindowError> { + *self.item(index)? = item; + Ok(()) + } + + /// Gets a vector of all items in this window. + pub fn to_vec(&self) -> Vec> { + let mut i = 0; + let mut vec = Vec::new(); + while let Ok(item) = self.item(i) { + vec.push(item.clone()); + i += 1; + } + vec + } +} diff --git a/crates/generated/src/particle.rs b/crates/generated/src/particle.rs new file mode 100644 index 000000000..79fefb8db --- /dev/null +++ b/crates/generated/src/particle.rs @@ -0,0 +1,398 @@ +// This file is @generated. Please do not edit. + +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum Particle { + AmbientEntityEffect, + AngryVillager, + Barrier, + Block, + Bubble, + Cloud, + Crit, + DamageIndicator, + DragonBreath, + DrippingLava, + FallingLava, + LandingLava, + DrippingWater, + FallingWater, + Dust, + Effect, + ElderGuardian, + EnchantedHit, + Enchant, + EndRod, + EntityEffect, + ExplosionEmitter, + Explosion, + FallingDust, + Firework, + Fishing, + Flame, + SoulFireFlame, + Soul, + Flash, + HappyVillager, + Composter, + Heart, + InstantEffect, + Item, + ItemSlime, + ItemSnowball, + LargeSmoke, + Lava, + Mycelium, + Note, + Poof, + Portal, + Rain, + Smoke, + Sneeze, + Spit, + SquidInk, + SweepAttack, + TotemOfUndying, + Underwater, + Splash, + Witch, + BubblePop, + CurrentDown, + BubbleColumnUp, + Nautilus, + Dolphin, + CampfireCosySmoke, + CampfireSignalSmoke, + DrippingHoney, + FallingHoney, + LandingHoney, + FallingNectar, + Ash, + CrimsonSpore, + WarpedSpore, + DrippingObsidianTear, + FallingObsidianTear, + LandingObsidianTear, + ReversePortal, + WhiteAsh, +} + +#[allow(warnings)] +#[allow(clippy::all)] +impl Particle { + /// Returns the `id` property of this `Particle`. + pub fn id(&self) -> u32 { + match self { + Particle::AmbientEntityEffect => 0, + Particle::AngryVillager => 1, + Particle::Barrier => 2, + Particle::Block => 3, + Particle::Bubble => 4, + Particle::Cloud => 5, + Particle::Crit => 6, + Particle::DamageIndicator => 7, + Particle::DragonBreath => 8, + Particle::DrippingLava => 9, + Particle::FallingLava => 10, + Particle::LandingLava => 11, + Particle::DrippingWater => 12, + Particle::FallingWater => 13, + Particle::Dust => 14, + Particle::Effect => 15, + Particle::ElderGuardian => 16, + Particle::EnchantedHit => 17, + Particle::Enchant => 18, + Particle::EndRod => 19, + Particle::EntityEffect => 20, + Particle::ExplosionEmitter => 21, + Particle::Explosion => 22, + Particle::FallingDust => 23, + Particle::Firework => 24, + Particle::Fishing => 25, + Particle::Flame => 26, + Particle::SoulFireFlame => 27, + Particle::Soul => 28, + Particle::Flash => 29, + Particle::HappyVillager => 30, + Particle::Composter => 31, + Particle::Heart => 32, + Particle::InstantEffect => 33, + Particle::Item => 34, + Particle::ItemSlime => 35, + Particle::ItemSnowball => 36, + Particle::LargeSmoke => 37, + Particle::Lava => 38, + Particle::Mycelium => 39, + Particle::Note => 40, + Particle::Poof => 41, + Particle::Portal => 42, + Particle::Rain => 43, + Particle::Smoke => 44, + Particle::Sneeze => 45, + Particle::Spit => 46, + Particle::SquidInk => 47, + Particle::SweepAttack => 48, + Particle::TotemOfUndying => 49, + Particle::Underwater => 50, + Particle::Splash => 51, + Particle::Witch => 52, + Particle::BubblePop => 53, + Particle::CurrentDown => 54, + Particle::BubbleColumnUp => 55, + Particle::Nautilus => 56, + Particle::Dolphin => 57, + Particle::CampfireCosySmoke => 58, + Particle::CampfireSignalSmoke => 59, + Particle::DrippingHoney => 60, + Particle::FallingHoney => 61, + Particle::LandingHoney => 62, + Particle::FallingNectar => 63, + Particle::Ash => 64, + Particle::CrimsonSpore => 65, + Particle::WarpedSpore => 66, + Particle::DrippingObsidianTear => 67, + Particle::FallingObsidianTear => 68, + Particle::LandingObsidianTear => 69, + Particle::ReversePortal => 70, + Particle::WhiteAsh => 71, + } + } + + /// Gets a `Particle` by its `id`. + pub fn from_id(id: u32) -> Option { + match id { + 0 => Some(Particle::AmbientEntityEffect), + 1 => Some(Particle::AngryVillager), + 2 => Some(Particle::Barrier), + 3 => Some(Particle::Block), + 4 => Some(Particle::Bubble), + 5 => Some(Particle::Cloud), + 6 => Some(Particle::Crit), + 7 => Some(Particle::DamageIndicator), + 8 => Some(Particle::DragonBreath), + 9 => Some(Particle::DrippingLava), + 10 => Some(Particle::FallingLava), + 11 => Some(Particle::LandingLava), + 12 => Some(Particle::DrippingWater), + 13 => Some(Particle::FallingWater), + 14 => Some(Particle::Dust), + 15 => Some(Particle::Effect), + 16 => Some(Particle::ElderGuardian), + 17 => Some(Particle::EnchantedHit), + 18 => Some(Particle::Enchant), + 19 => Some(Particle::EndRod), + 20 => Some(Particle::EntityEffect), + 21 => Some(Particle::ExplosionEmitter), + 22 => Some(Particle::Explosion), + 23 => Some(Particle::FallingDust), + 24 => Some(Particle::Firework), + 25 => Some(Particle::Fishing), + 26 => Some(Particle::Flame), + 27 => Some(Particle::SoulFireFlame), + 28 => Some(Particle::Soul), + 29 => Some(Particle::Flash), + 30 => Some(Particle::HappyVillager), + 31 => Some(Particle::Composter), + 32 => Some(Particle::Heart), + 33 => Some(Particle::InstantEffect), + 34 => Some(Particle::Item), + 35 => Some(Particle::ItemSlime), + 36 => Some(Particle::ItemSnowball), + 37 => Some(Particle::LargeSmoke), + 38 => Some(Particle::Lava), + 39 => Some(Particle::Mycelium), + 40 => Some(Particle::Note), + 41 => Some(Particle::Poof), + 42 => Some(Particle::Portal), + 43 => Some(Particle::Rain), + 44 => Some(Particle::Smoke), + 45 => Some(Particle::Sneeze), + 46 => Some(Particle::Spit), + 47 => Some(Particle::SquidInk), + 48 => Some(Particle::SweepAttack), + 49 => Some(Particle::TotemOfUndying), + 50 => Some(Particle::Underwater), + 51 => Some(Particle::Splash), + 52 => Some(Particle::Witch), + 53 => Some(Particle::BubblePop), + 54 => Some(Particle::CurrentDown), + 55 => Some(Particle::BubbleColumnUp), + 56 => Some(Particle::Nautilus), + 57 => Some(Particle::Dolphin), + 58 => Some(Particle::CampfireCosySmoke), + 59 => Some(Particle::CampfireSignalSmoke), + 60 => Some(Particle::DrippingHoney), + 61 => Some(Particle::FallingHoney), + 62 => Some(Particle::LandingHoney), + 63 => Some(Particle::FallingNectar), + 64 => Some(Particle::Ash), + 65 => Some(Particle::CrimsonSpore), + 66 => Some(Particle::WarpedSpore), + 67 => Some(Particle::DrippingObsidianTear), + 68 => Some(Particle::FallingObsidianTear), + 69 => Some(Particle::LandingObsidianTear), + 70 => Some(Particle::ReversePortal), + 71 => Some(Particle::WhiteAsh), + _ => None, + } + } +} +#[allow(warnings)] +#[allow(clippy::all)] +impl Particle { + /// Returns the `name` property of this `Particle`. + pub fn name(&self) -> &'static str { + match self { + Particle::AmbientEntityEffect => "ambient_entity_effect", + Particle::AngryVillager => "angry_villager", + Particle::Barrier => "barrier", + Particle::Block => "block", + Particle::Bubble => "bubble", + Particle::Cloud => "cloud", + Particle::Crit => "crit", + Particle::DamageIndicator => "damage_indicator", + Particle::DragonBreath => "dragon_breath", + Particle::DrippingLava => "dripping_lava", + Particle::FallingLava => "falling_lava", + Particle::LandingLava => "landing_lava", + Particle::DrippingWater => "dripping_water", + Particle::FallingWater => "falling_water", + Particle::Dust => "dust", + Particle::Effect => "effect", + Particle::ElderGuardian => "elder_guardian", + Particle::EnchantedHit => "enchanted_hit", + Particle::Enchant => "enchant", + Particle::EndRod => "end_rod", + Particle::EntityEffect => "entity_effect", + Particle::ExplosionEmitter => "explosion_emitter", + Particle::Explosion => "explosion", + Particle::FallingDust => "falling_dust", + Particle::Firework => "firework", + Particle::Fishing => "fishing", + Particle::Flame => "flame", + Particle::SoulFireFlame => "soul_fire_flame", + Particle::Soul => "soul", + Particle::Flash => "flash", + Particle::HappyVillager => "happy_villager", + Particle::Composter => "composter", + Particle::Heart => "heart", + Particle::InstantEffect => "instant_effect", + Particle::Item => "item", + Particle::ItemSlime => "item_slime", + Particle::ItemSnowball => "item_snowball", + Particle::LargeSmoke => "large_smoke", + Particle::Lava => "lava", + Particle::Mycelium => "mycelium", + Particle::Note => "note", + Particle::Poof => "poof", + Particle::Portal => "portal", + Particle::Rain => "rain", + Particle::Smoke => "smoke", + Particle::Sneeze => "sneeze", + Particle::Spit => "spit", + Particle::SquidInk => "squid_ink", + Particle::SweepAttack => "sweep_attack", + Particle::TotemOfUndying => "totem_of_undying", + Particle::Underwater => "underwater", + Particle::Splash => "splash", + Particle::Witch => "witch", + Particle::BubblePop => "bubble_pop", + Particle::CurrentDown => "current_down", + Particle::BubbleColumnUp => "bubble_column_up", + Particle::Nautilus => "nautilus", + Particle::Dolphin => "dolphin", + Particle::CampfireCosySmoke => "campfire_cosy_smoke", + Particle::CampfireSignalSmoke => "campfire_signal_smoke", + Particle::DrippingHoney => "dripping_honey", + Particle::FallingHoney => "falling_honey", + Particle::LandingHoney => "landing_honey", + Particle::FallingNectar => "falling_nectar", + Particle::Ash => "ash", + Particle::CrimsonSpore => "crimson_spore", + Particle::WarpedSpore => "warped_spore", + Particle::DrippingObsidianTear => "dripping_obsidian_tear", + Particle::FallingObsidianTear => "falling_obsidian_tear", + Particle::LandingObsidianTear => "landing_obsidian_tear", + Particle::ReversePortal => "reverse_portal", + Particle::WhiteAsh => "white_ash", + } + } + + /// Gets a `Particle` by its `name`. + pub fn from_name(name: &str) -> Option { + match name { + "ambient_entity_effect" => Some(Particle::AmbientEntityEffect), + "angry_villager" => Some(Particle::AngryVillager), + "barrier" => Some(Particle::Barrier), + "block" => Some(Particle::Block), + "bubble" => Some(Particle::Bubble), + "cloud" => Some(Particle::Cloud), + "crit" => Some(Particle::Crit), + "damage_indicator" => Some(Particle::DamageIndicator), + "dragon_breath" => Some(Particle::DragonBreath), + "dripping_lava" => Some(Particle::DrippingLava), + "falling_lava" => Some(Particle::FallingLava), + "landing_lava" => Some(Particle::LandingLava), + "dripping_water" => Some(Particle::DrippingWater), + "falling_water" => Some(Particle::FallingWater), + "dust" => Some(Particle::Dust), + "effect" => Some(Particle::Effect), + "elder_guardian" => Some(Particle::ElderGuardian), + "enchanted_hit" => Some(Particle::EnchantedHit), + "enchant" => Some(Particle::Enchant), + "end_rod" => Some(Particle::EndRod), + "entity_effect" => Some(Particle::EntityEffect), + "explosion_emitter" => Some(Particle::ExplosionEmitter), + "explosion" => Some(Particle::Explosion), + "falling_dust" => Some(Particle::FallingDust), + "firework" => Some(Particle::Firework), + "fishing" => Some(Particle::Fishing), + "flame" => Some(Particle::Flame), + "soul_fire_flame" => Some(Particle::SoulFireFlame), + "soul" => Some(Particle::Soul), + "flash" => Some(Particle::Flash), + "happy_villager" => Some(Particle::HappyVillager), + "composter" => Some(Particle::Composter), + "heart" => Some(Particle::Heart), + "instant_effect" => Some(Particle::InstantEffect), + "item" => Some(Particle::Item), + "item_slime" => Some(Particle::ItemSlime), + "item_snowball" => Some(Particle::ItemSnowball), + "large_smoke" => Some(Particle::LargeSmoke), + "lava" => Some(Particle::Lava), + "mycelium" => Some(Particle::Mycelium), + "note" => Some(Particle::Note), + "poof" => Some(Particle::Poof), + "portal" => Some(Particle::Portal), + "rain" => Some(Particle::Rain), + "smoke" => Some(Particle::Smoke), + "sneeze" => Some(Particle::Sneeze), + "spit" => Some(Particle::Spit), + "squid_ink" => Some(Particle::SquidInk), + "sweep_attack" => Some(Particle::SweepAttack), + "totem_of_undying" => Some(Particle::TotemOfUndying), + "underwater" => Some(Particle::Underwater), + "splash" => Some(Particle::Splash), + "witch" => Some(Particle::Witch), + "bubble_pop" => Some(Particle::BubblePop), + "current_down" => Some(Particle::CurrentDown), + "bubble_column_up" => Some(Particle::BubbleColumnUp), + "nautilus" => Some(Particle::Nautilus), + "dolphin" => Some(Particle::Dolphin), + "campfire_cosy_smoke" => Some(Particle::CampfireCosySmoke), + "campfire_signal_smoke" => Some(Particle::CampfireSignalSmoke), + "dripping_honey" => Some(Particle::DrippingHoney), + "falling_honey" => Some(Particle::FallingHoney), + "landing_honey" => Some(Particle::LandingHoney), + "falling_nectar" => Some(Particle::FallingNectar), + "ash" => Some(Particle::Ash), + "crimson_spore" => Some(Particle::CrimsonSpore), + "warped_spore" => Some(Particle::WarpedSpore), + "dripping_obsidian_tear" => Some(Particle::DrippingObsidianTear), + "falling_obsidian_tear" => Some(Particle::FallingObsidianTear), + "landing_obsidian_tear" => Some(Particle::LandingObsidianTear), + "reverse_portal" => Some(Particle::ReversePortal), + "white_ash" => Some(Particle::WhiteAsh), + _ => None, + } + } +} diff --git a/crates/generated/src/simplified_block.rs b/crates/generated/src/simplified_block.rs new file mode 100644 index 000000000..2ad8b9c8d --- /dev/null +++ b/crates/generated/src/simplified_block.rs @@ -0,0 +1,1146 @@ +// This file is @generated. Please do not edit. +use crate::BlockKind; +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum SimplifiedBlockKind { + Air, + Planks, + Sapling, + Log, + Leaves, + Bed, + Wool, + Flower, + WoodenPressurePlate, + StainedGlass, + WoodenTrapdoor, + WoodenButton, + Anvil, + GlazedTeracotta, + Teracotta, + StainedGlassPane, + Carpet, + WallBanner, + Banner, + Slab, + Stairs, + FenceGate, + Fence, + WoodenDoor, + ShulkerBox, + Concrete, + ConcretePowder, + Coral, + CoralBlock, + CoralFan, + CoralWallFan, + Mushroom, + WallSign, + Sign, + Stone, + Granite, + PolishedGranite, + Diorite, + PolishedDiorite, + Andesite, + PolishedAndesite, + GrassBlock, + Dirt, + CoarseDirt, + Podzol, + Cobblestone, + Bedrock, + Water, + Lava, + Sand, + RedSand, + Gravel, + GoldOre, + IronOre, + CoalOre, + NetherGoldOre, + Sponge, + WetSponge, + Glass, + LapisOre, + LapisBlock, + Dispenser, + Sandstone, + ChiseledSandstone, + CutSandstone, + NoteBlock, + PoweredRail, + DetectorRail, + StickyPiston, + Cobweb, + Grass, + Fern, + DeadBush, + Seagrass, + TallSeagrass, + Piston, + PistonHead, + MovingPiston, + Cornflower, + WitherRose, + LilyOfTheValley, + GoldBlock, + IronBlock, + Bricks, + Tnt, + Bookshelf, + MossyCobblestone, + Obsidian, + Torch, + WallTorch, + Fire, + SoulFire, + Spawner, + Chest, + RedstoneWire, + DiamondOre, + DiamondBlock, + CraftingTable, + Wheat, + Farmland, + Furnace, + Ladder, + Rail, + Lever, + StonePressurePlate, + IronDoor, + RedstoneOre, + RedstoneTorch, + RedstoneWallTorch, + StoneButton, + Snow, + Ice, + SnowBlock, + Cactus, + Clay, + SugarCane, + Jukebox, + Pumpkin, + Netherrack, + SoulSand, + SoulSoil, + Basalt, + PolishedBasalt, + SoulTorch, + SoulWallTorch, + Glowstone, + NetherPortal, + CarvedPumpkin, + JackOLantern, + Cake, + Repeater, + StoneBricks, + MossyStoneBricks, + CrackedStoneBricks, + ChiseledStoneBricks, + InfestedStone, + InfestedCobblestone, + InfestedStoneBricks, + InfestedMossyStoneBricks, + InfestedCrackedStoneBricks, + InfestedChiseledStoneBricks, + BrownMushroomBlock, + RedMushroomBlock, + MushroomStem, + IronBars, + Chain, + GlassPane, + Melon, + AttachedPumpkinStem, + AttachedMelonStem, + PumpkinStem, + MelonStem, + Vine, + Mycelium, + LilyPad, + NetherBricks, + NetherWart, + EnchantingTable, + BrewingStand, + Cauldron, + EndPortal, + EndPortalFrame, + EndStone, + DragonEgg, + RedstoneLamp, + Cocoa, + EmeraldOre, + EnderChest, + TripwireHook, + Tripwire, + EmeraldBlock, + CommandBlock, + Beacon, + CobblestoneWall, + MossyCobblestoneWall, + FlowerPot, + PottedFern, + PottedDandelion, + PottedPoppy, + PottedAllium, + PottedCornflower, + PottedLilyOfTheValley, + PottedWitherRose, + PottedDeadBush, + PottedCactus, + Carrots, + Potatoes, + SkeletonSkull, + SkeletonWallSkull, + WitherSkeletonSkull, + WitherSkeletonWallSkull, + ZombieHead, + ZombieWallHead, + PlayerHead, + PlayerWallHead, + CreeperHead, + CreeperWallHead, + DragonHead, + DragonWallHead, + TrappedChest, + LightWeightedPressurePlate, + HeavyWeightedPressurePlate, + Comparator, + DaylightDetector, + RedstoneBlock, + NetherQuartzOre, + Hopper, + QuartzBlock, + ChiseledQuartzBlock, + QuartzPillar, + ActivatorRail, + Dropper, + SlimeBlock, + Barrier, + IronTrapdoor, + Prismarine, + PrismarineBricks, + DarkPrismarine, + SeaLantern, + HayBlock, + CoalBlock, + PackedIce, + Sunflower, + Lilac, + RoseBush, + Peony, + TallGrass, + LargeFern, + RedSandstone, + ChiseledRedSandstone, + CutRedSandstone, + SmoothStone, + SmoothSandstone, + SmoothQuartz, + SmoothRedSandstone, + EndRod, + ChorusPlant, + ChorusFlower, + PurpurBlock, + PurpurPillar, + EndStoneBricks, + Beetroots, + GrassPath, + EndGateway, + RepeatingCommandBlock, + ChainCommandBlock, + FrostedIce, + MagmaBlock, + NetherWartBlock, + RedNetherBricks, + BoneBlock, + StructureVoid, + Observer, + Kelp, + KelpPlant, + DriedKelpBlock, + TurtleEgg, + SeaPickle, + BlueIce, + Conduit, + Bamboo, + PottedBamboo, + BubbleColumn, + BrickWall, + PrismarineWall, + RedSandstoneWall, + MossyStoneBrickWall, + GraniteWall, + StoneBrickWall, + NetherBrickWall, + AndesiteWall, + RedNetherBrickWall, + SandstoneWall, + EndStoneBrickWall, + DioriteWall, + Scaffolding, + Loom, + Barrel, + Smoker, + BlastFurnace, + CartographyTable, + FletchingTable, + Grindstone, + Lectern, + SmithingTable, + Stonecutter, + Bell, + Lantern, + SoulLantern, + Campfire, + SoulCampfire, + SweetBerryBush, + WarpedStem, + StrippedWarpedStem, + WarpedHyphae, + StrippedWarpedHyphae, + WarpedNylium, + WarpedFungus, + WarpedWartBlock, + WarpedRoots, + NetherSprouts, + CrimsonStem, + StrippedCrimsonStem, + CrimsonHyphae, + StrippedCrimsonHyphae, + CrimsonNylium, + CrimsonFungus, + Shroomlight, + WeepingVines, + WeepingVinesPlant, + TwistingVines, + TwistingVinesPlant, + CrimsonRoots, + CrimsonPressurePlate, + WarpedPressurePlate, + CrimsonTrapdoor, + WarpedTrapdoor, + CrimsonButton, + WarpedButton, + CrimsonDoor, + WarpedDoor, + StructureBlock, + Jigsaw, + Composter, + Target, + BeeNest, + Beehive, + HoneyBlock, + HoneycombBlock, + NetheriteBlock, + AncientDebris, + CryingObsidian, + RespawnAnchor, + PottedCrimsonFungus, + PottedWarpedFungus, + PottedCrimsonRoots, + PottedWarpedRoots, + Lodestone, + Blackstone, + BlackstoneWall, + PolishedBlackstone, + PolishedBlackstoneBricks, + CrackedPolishedBlackstoneBricks, + ChiseledPolishedBlackstone, + PolishedBlackstoneBrickWall, + GildedBlackstone, + PolishedBlackstonePressurePlate, + PolishedBlackstoneButton, + PolishedBlackstoneWall, + ChiseledNetherBricks, + CrackedNetherBricks, + QuartzBricks, +} + +#[allow(warnings)] +#[allow(clippy::all)] +impl BlockKind { + /// Returns the `simplified_kind` property of this `BlockKind`. + pub fn simplified_kind(&self) -> SimplifiedBlockKind { + match self { + BlockKind::Air => SimplifiedBlockKind::Air, + BlockKind::Stone => SimplifiedBlockKind::Stone, + BlockKind::Granite => SimplifiedBlockKind::Granite, + BlockKind::PolishedGranite => SimplifiedBlockKind::PolishedGranite, + BlockKind::Diorite => SimplifiedBlockKind::Diorite, + BlockKind::PolishedDiorite => SimplifiedBlockKind::PolishedDiorite, + BlockKind::Andesite => SimplifiedBlockKind::Andesite, + BlockKind::PolishedAndesite => SimplifiedBlockKind::PolishedAndesite, + BlockKind::GrassBlock => SimplifiedBlockKind::GrassBlock, + BlockKind::Dirt => SimplifiedBlockKind::Dirt, + BlockKind::CoarseDirt => SimplifiedBlockKind::CoarseDirt, + BlockKind::Podzol => SimplifiedBlockKind::Podzol, + BlockKind::Cobblestone => SimplifiedBlockKind::Cobblestone, + BlockKind::OakPlanks => SimplifiedBlockKind::Planks, + BlockKind::SprucePlanks => SimplifiedBlockKind::Planks, + BlockKind::BirchPlanks => SimplifiedBlockKind::Planks, + BlockKind::JunglePlanks => SimplifiedBlockKind::Planks, + BlockKind::AcaciaPlanks => SimplifiedBlockKind::Planks, + BlockKind::DarkOakPlanks => SimplifiedBlockKind::Planks, + BlockKind::OakSapling => SimplifiedBlockKind::Sapling, + BlockKind::SpruceSapling => SimplifiedBlockKind::Sapling, + BlockKind::BirchSapling => SimplifiedBlockKind::Sapling, + BlockKind::JungleSapling => SimplifiedBlockKind::Sapling, + BlockKind::AcaciaSapling => SimplifiedBlockKind::Sapling, + BlockKind::DarkOakSapling => SimplifiedBlockKind::Sapling, + BlockKind::Bedrock => SimplifiedBlockKind::Bedrock, + BlockKind::Water => SimplifiedBlockKind::Water, + BlockKind::Lava => SimplifiedBlockKind::Lava, + BlockKind::Sand => SimplifiedBlockKind::Sand, + BlockKind::RedSand => SimplifiedBlockKind::RedSand, + BlockKind::Gravel => SimplifiedBlockKind::Gravel, + BlockKind::GoldOre => SimplifiedBlockKind::GoldOre, + BlockKind::IronOre => SimplifiedBlockKind::IronOre, + BlockKind::CoalOre => SimplifiedBlockKind::CoalOre, + BlockKind::NetherGoldOre => SimplifiedBlockKind::NetherGoldOre, + BlockKind::OakLog => SimplifiedBlockKind::Log, + BlockKind::SpruceLog => SimplifiedBlockKind::Log, + BlockKind::BirchLog => SimplifiedBlockKind::Log, + BlockKind::JungleLog => SimplifiedBlockKind::Log, + BlockKind::AcaciaLog => SimplifiedBlockKind::Log, + BlockKind::DarkOakLog => SimplifiedBlockKind::Log, + BlockKind::StrippedSpruceLog => SimplifiedBlockKind::Log, + BlockKind::StrippedBirchLog => SimplifiedBlockKind::Log, + BlockKind::StrippedJungleLog => SimplifiedBlockKind::Log, + BlockKind::StrippedAcaciaLog => SimplifiedBlockKind::Log, + BlockKind::StrippedDarkOakLog => SimplifiedBlockKind::Log, + BlockKind::StrippedOakLog => SimplifiedBlockKind::Log, + BlockKind::OakWood => SimplifiedBlockKind::Log, + BlockKind::SpruceWood => SimplifiedBlockKind::Log, + BlockKind::BirchWood => SimplifiedBlockKind::Log, + BlockKind::JungleWood => SimplifiedBlockKind::Log, + BlockKind::AcaciaWood => SimplifiedBlockKind::Log, + BlockKind::DarkOakWood => SimplifiedBlockKind::Log, + BlockKind::StrippedOakWood => SimplifiedBlockKind::Log, + BlockKind::StrippedSpruceWood => SimplifiedBlockKind::Log, + BlockKind::StrippedBirchWood => SimplifiedBlockKind::Log, + BlockKind::StrippedJungleWood => SimplifiedBlockKind::Log, + BlockKind::StrippedAcaciaWood => SimplifiedBlockKind::Log, + BlockKind::StrippedDarkOakWood => SimplifiedBlockKind::Log, + BlockKind::OakLeaves => SimplifiedBlockKind::Leaves, + BlockKind::SpruceLeaves => SimplifiedBlockKind::Leaves, + BlockKind::BirchLeaves => SimplifiedBlockKind::Leaves, + BlockKind::JungleLeaves => SimplifiedBlockKind::Leaves, + BlockKind::AcaciaLeaves => SimplifiedBlockKind::Leaves, + BlockKind::DarkOakLeaves => SimplifiedBlockKind::Leaves, + BlockKind::Sponge => SimplifiedBlockKind::Sponge, + BlockKind::WetSponge => SimplifiedBlockKind::WetSponge, + BlockKind::Glass => SimplifiedBlockKind::Glass, + BlockKind::LapisOre => SimplifiedBlockKind::LapisOre, + BlockKind::LapisBlock => SimplifiedBlockKind::LapisBlock, + BlockKind::Dispenser => SimplifiedBlockKind::Dispenser, + BlockKind::Sandstone => SimplifiedBlockKind::Sandstone, + BlockKind::ChiseledSandstone => SimplifiedBlockKind::ChiseledSandstone, + BlockKind::CutSandstone => SimplifiedBlockKind::CutSandstone, + BlockKind::NoteBlock => SimplifiedBlockKind::NoteBlock, + BlockKind::WhiteBed => SimplifiedBlockKind::Bed, + BlockKind::OrangeBed => SimplifiedBlockKind::Bed, + BlockKind::MagentaBed => SimplifiedBlockKind::Bed, + BlockKind::LightBlueBed => SimplifiedBlockKind::Bed, + BlockKind::YellowBed => SimplifiedBlockKind::Bed, + BlockKind::LimeBed => SimplifiedBlockKind::Bed, + BlockKind::PinkBed => SimplifiedBlockKind::Bed, + BlockKind::GrayBed => SimplifiedBlockKind::Bed, + BlockKind::LightGrayBed => SimplifiedBlockKind::Bed, + BlockKind::CyanBed => SimplifiedBlockKind::Bed, + BlockKind::PurpleBed => SimplifiedBlockKind::Bed, + BlockKind::BlueBed => SimplifiedBlockKind::Bed, + BlockKind::BrownBed => SimplifiedBlockKind::Bed, + BlockKind::GreenBed => SimplifiedBlockKind::Bed, + BlockKind::RedBed => SimplifiedBlockKind::Bed, + BlockKind::BlackBed => SimplifiedBlockKind::Bed, + BlockKind::PoweredRail => SimplifiedBlockKind::PoweredRail, + BlockKind::DetectorRail => SimplifiedBlockKind::DetectorRail, + BlockKind::StickyPiston => SimplifiedBlockKind::StickyPiston, + BlockKind::Cobweb => SimplifiedBlockKind::Cobweb, + BlockKind::Grass => SimplifiedBlockKind::Grass, + BlockKind::Fern => SimplifiedBlockKind::Fern, + BlockKind::DeadBush => SimplifiedBlockKind::DeadBush, + BlockKind::Seagrass => SimplifiedBlockKind::Seagrass, + BlockKind::TallSeagrass => SimplifiedBlockKind::TallSeagrass, + BlockKind::Piston => SimplifiedBlockKind::Piston, + BlockKind::PistonHead => SimplifiedBlockKind::PistonHead, + BlockKind::WhiteWool => SimplifiedBlockKind::Wool, + BlockKind::OrangeWool => SimplifiedBlockKind::Wool, + BlockKind::MagentaWool => SimplifiedBlockKind::Wool, + BlockKind::LightBlueWool => SimplifiedBlockKind::Wool, + BlockKind::YellowWool => SimplifiedBlockKind::Wool, + BlockKind::LimeWool => SimplifiedBlockKind::Wool, + BlockKind::PinkWool => SimplifiedBlockKind::Wool, + BlockKind::GrayWool => SimplifiedBlockKind::Wool, + BlockKind::LightGrayWool => SimplifiedBlockKind::Wool, + BlockKind::CyanWool => SimplifiedBlockKind::Wool, + BlockKind::PurpleWool => SimplifiedBlockKind::Wool, + BlockKind::BlueWool => SimplifiedBlockKind::Wool, + BlockKind::BrownWool => SimplifiedBlockKind::Wool, + BlockKind::GreenWool => SimplifiedBlockKind::Wool, + BlockKind::RedWool => SimplifiedBlockKind::Wool, + BlockKind::BlackWool => SimplifiedBlockKind::Wool, + BlockKind::MovingPiston => SimplifiedBlockKind::MovingPiston, + BlockKind::Dandelion => SimplifiedBlockKind::Flower, + BlockKind::Poppy => SimplifiedBlockKind::Flower, + BlockKind::BlueOrchid => SimplifiedBlockKind::Flower, + BlockKind::Allium => SimplifiedBlockKind::Flower, + BlockKind::AzureBluet => SimplifiedBlockKind::Flower, + BlockKind::RedTulip => SimplifiedBlockKind::Flower, + BlockKind::OrangeTulip => SimplifiedBlockKind::Flower, + BlockKind::WhiteTulip => SimplifiedBlockKind::Flower, + BlockKind::PinkTulip => SimplifiedBlockKind::Flower, + BlockKind::OxeyeDaisy => SimplifiedBlockKind::Flower, + BlockKind::Cornflower => SimplifiedBlockKind::Cornflower, + BlockKind::WitherRose => SimplifiedBlockKind::WitherRose, + BlockKind::LilyOfTheValley => SimplifiedBlockKind::LilyOfTheValley, + BlockKind::BrownMushroom => SimplifiedBlockKind::Mushroom, + BlockKind::RedMushroom => SimplifiedBlockKind::Mushroom, + BlockKind::GoldBlock => SimplifiedBlockKind::GoldBlock, + BlockKind::IronBlock => SimplifiedBlockKind::IronBlock, + BlockKind::Bricks => SimplifiedBlockKind::Bricks, + BlockKind::Tnt => SimplifiedBlockKind::Tnt, + BlockKind::Bookshelf => SimplifiedBlockKind::Bookshelf, + BlockKind::MossyCobblestone => SimplifiedBlockKind::MossyCobblestone, + BlockKind::Obsidian => SimplifiedBlockKind::Obsidian, + BlockKind::Torch => SimplifiedBlockKind::Torch, + BlockKind::WallTorch => SimplifiedBlockKind::WallTorch, + BlockKind::Fire => SimplifiedBlockKind::Fire, + BlockKind::SoulFire => SimplifiedBlockKind::SoulFire, + BlockKind::Spawner => SimplifiedBlockKind::Spawner, + BlockKind::OakStairs => SimplifiedBlockKind::Stairs, + BlockKind::Chest => SimplifiedBlockKind::Chest, + BlockKind::RedstoneWire => SimplifiedBlockKind::RedstoneWire, + BlockKind::DiamondOre => SimplifiedBlockKind::DiamondOre, + BlockKind::DiamondBlock => SimplifiedBlockKind::DiamondBlock, + BlockKind::CraftingTable => SimplifiedBlockKind::CraftingTable, + BlockKind::Wheat => SimplifiedBlockKind::Wheat, + BlockKind::Farmland => SimplifiedBlockKind::Farmland, + BlockKind::Furnace => SimplifiedBlockKind::Furnace, + BlockKind::OakSign => SimplifiedBlockKind::Sign, + BlockKind::SpruceSign => SimplifiedBlockKind::Sign, + BlockKind::BirchSign => SimplifiedBlockKind::Sign, + BlockKind::AcaciaSign => SimplifiedBlockKind::Sign, + BlockKind::JungleSign => SimplifiedBlockKind::Sign, + BlockKind::DarkOakSign => SimplifiedBlockKind::Sign, + BlockKind::OakDoor => SimplifiedBlockKind::WoodenDoor, + BlockKind::Ladder => SimplifiedBlockKind::Ladder, + BlockKind::Rail => SimplifiedBlockKind::Rail, + BlockKind::CobblestoneStairs => SimplifiedBlockKind::Stairs, + BlockKind::OakWallSign => SimplifiedBlockKind::WallSign, + BlockKind::SpruceWallSign => SimplifiedBlockKind::WallSign, + BlockKind::BirchWallSign => SimplifiedBlockKind::WallSign, + BlockKind::AcaciaWallSign => SimplifiedBlockKind::WallSign, + BlockKind::JungleWallSign => SimplifiedBlockKind::WallSign, + BlockKind::DarkOakWallSign => SimplifiedBlockKind::WallSign, + BlockKind::Lever => SimplifiedBlockKind::Lever, + BlockKind::StonePressurePlate => SimplifiedBlockKind::StonePressurePlate, + BlockKind::IronDoor => SimplifiedBlockKind::IronDoor, + BlockKind::OakPressurePlate => SimplifiedBlockKind::WoodenPressurePlate, + BlockKind::SprucePressurePlate => SimplifiedBlockKind::WoodenPressurePlate, + BlockKind::BirchPressurePlate => SimplifiedBlockKind::WoodenPressurePlate, + BlockKind::JunglePressurePlate => SimplifiedBlockKind::WoodenPressurePlate, + BlockKind::AcaciaPressurePlate => SimplifiedBlockKind::WoodenPressurePlate, + BlockKind::DarkOakPressurePlate => SimplifiedBlockKind::WoodenPressurePlate, + BlockKind::RedstoneOre => SimplifiedBlockKind::RedstoneOre, + BlockKind::RedstoneTorch => SimplifiedBlockKind::RedstoneTorch, + BlockKind::RedstoneWallTorch => SimplifiedBlockKind::RedstoneWallTorch, + BlockKind::StoneButton => SimplifiedBlockKind::StoneButton, + BlockKind::Snow => SimplifiedBlockKind::Snow, + BlockKind::Ice => SimplifiedBlockKind::Ice, + BlockKind::SnowBlock => SimplifiedBlockKind::SnowBlock, + BlockKind::Cactus => SimplifiedBlockKind::Cactus, + BlockKind::Clay => SimplifiedBlockKind::Clay, + BlockKind::SugarCane => SimplifiedBlockKind::SugarCane, + BlockKind::Jukebox => SimplifiedBlockKind::Jukebox, + BlockKind::OakFence => SimplifiedBlockKind::Fence, + BlockKind::Pumpkin => SimplifiedBlockKind::Pumpkin, + BlockKind::Netherrack => SimplifiedBlockKind::Netherrack, + BlockKind::SoulSand => SimplifiedBlockKind::SoulSand, + BlockKind::SoulSoil => SimplifiedBlockKind::SoulSoil, + BlockKind::Basalt => SimplifiedBlockKind::Basalt, + BlockKind::PolishedBasalt => SimplifiedBlockKind::PolishedBasalt, + BlockKind::SoulTorch => SimplifiedBlockKind::SoulTorch, + BlockKind::SoulWallTorch => SimplifiedBlockKind::SoulWallTorch, + BlockKind::Glowstone => SimplifiedBlockKind::Glowstone, + BlockKind::NetherPortal => SimplifiedBlockKind::NetherPortal, + BlockKind::CarvedPumpkin => SimplifiedBlockKind::CarvedPumpkin, + BlockKind::JackOLantern => SimplifiedBlockKind::JackOLantern, + BlockKind::Cake => SimplifiedBlockKind::Cake, + BlockKind::Repeater => SimplifiedBlockKind::Repeater, + BlockKind::WhiteStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::OrangeStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::MagentaStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::LightBlueStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::YellowStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::LimeStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::PinkStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::GrayStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::LightGrayStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::CyanStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::PurpleStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::BlueStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::BrownStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::GreenStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::RedStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::BlackStainedGlass => SimplifiedBlockKind::StainedGlass, + BlockKind::OakTrapdoor => SimplifiedBlockKind::WoodenTrapdoor, + BlockKind::SpruceTrapdoor => SimplifiedBlockKind::WoodenTrapdoor, + BlockKind::BirchTrapdoor => SimplifiedBlockKind::WoodenTrapdoor, + BlockKind::JungleTrapdoor => SimplifiedBlockKind::WoodenTrapdoor, + BlockKind::AcaciaTrapdoor => SimplifiedBlockKind::WoodenTrapdoor, + BlockKind::DarkOakTrapdoor => SimplifiedBlockKind::WoodenTrapdoor, + BlockKind::StoneBricks => SimplifiedBlockKind::StoneBricks, + BlockKind::MossyStoneBricks => SimplifiedBlockKind::MossyStoneBricks, + BlockKind::CrackedStoneBricks => SimplifiedBlockKind::CrackedStoneBricks, + BlockKind::ChiseledStoneBricks => SimplifiedBlockKind::ChiseledStoneBricks, + BlockKind::InfestedStone => SimplifiedBlockKind::InfestedStone, + BlockKind::InfestedCobblestone => SimplifiedBlockKind::InfestedCobblestone, + BlockKind::InfestedStoneBricks => SimplifiedBlockKind::InfestedStoneBricks, + BlockKind::InfestedMossyStoneBricks => SimplifiedBlockKind::InfestedMossyStoneBricks, + BlockKind::InfestedCrackedStoneBricks => { + SimplifiedBlockKind::InfestedCrackedStoneBricks + } + BlockKind::InfestedChiseledStoneBricks => { + SimplifiedBlockKind::InfestedChiseledStoneBricks + } + BlockKind::BrownMushroomBlock => SimplifiedBlockKind::BrownMushroomBlock, + BlockKind::RedMushroomBlock => SimplifiedBlockKind::RedMushroomBlock, + BlockKind::MushroomStem => SimplifiedBlockKind::MushroomStem, + BlockKind::IronBars => SimplifiedBlockKind::IronBars, + BlockKind::Chain => SimplifiedBlockKind::Chain, + BlockKind::GlassPane => SimplifiedBlockKind::GlassPane, + BlockKind::Melon => SimplifiedBlockKind::Melon, + BlockKind::AttachedPumpkinStem => SimplifiedBlockKind::AttachedPumpkinStem, + BlockKind::AttachedMelonStem => SimplifiedBlockKind::AttachedMelonStem, + BlockKind::PumpkinStem => SimplifiedBlockKind::PumpkinStem, + BlockKind::MelonStem => SimplifiedBlockKind::MelonStem, + BlockKind::Vine => SimplifiedBlockKind::Vine, + BlockKind::OakFenceGate => SimplifiedBlockKind::FenceGate, + BlockKind::BrickStairs => SimplifiedBlockKind::Stairs, + BlockKind::StoneBrickStairs => SimplifiedBlockKind::Stairs, + BlockKind::Mycelium => SimplifiedBlockKind::Mycelium, + BlockKind::LilyPad => SimplifiedBlockKind::LilyPad, + BlockKind::NetherBricks => SimplifiedBlockKind::NetherBricks, + BlockKind::NetherBrickFence => SimplifiedBlockKind::Fence, + BlockKind::NetherBrickStairs => SimplifiedBlockKind::Stairs, + BlockKind::NetherWart => SimplifiedBlockKind::NetherWart, + BlockKind::EnchantingTable => SimplifiedBlockKind::EnchantingTable, + BlockKind::BrewingStand => SimplifiedBlockKind::BrewingStand, + BlockKind::Cauldron => SimplifiedBlockKind::Cauldron, + BlockKind::EndPortal => SimplifiedBlockKind::EndPortal, + BlockKind::EndPortalFrame => SimplifiedBlockKind::EndPortalFrame, + BlockKind::EndStone => SimplifiedBlockKind::EndStone, + BlockKind::DragonEgg => SimplifiedBlockKind::DragonEgg, + BlockKind::RedstoneLamp => SimplifiedBlockKind::RedstoneLamp, + BlockKind::Cocoa => SimplifiedBlockKind::Cocoa, + BlockKind::SandstoneStairs => SimplifiedBlockKind::Stairs, + BlockKind::EmeraldOre => SimplifiedBlockKind::EmeraldOre, + BlockKind::EnderChest => SimplifiedBlockKind::EnderChest, + BlockKind::TripwireHook => SimplifiedBlockKind::TripwireHook, + BlockKind::Tripwire => SimplifiedBlockKind::Tripwire, + BlockKind::EmeraldBlock => SimplifiedBlockKind::EmeraldBlock, + BlockKind::SpruceStairs => SimplifiedBlockKind::Stairs, + BlockKind::BirchStairs => SimplifiedBlockKind::Stairs, + BlockKind::JungleStairs => SimplifiedBlockKind::Stairs, + BlockKind::CommandBlock => SimplifiedBlockKind::CommandBlock, + BlockKind::Beacon => SimplifiedBlockKind::Beacon, + BlockKind::CobblestoneWall => SimplifiedBlockKind::CobblestoneWall, + BlockKind::MossyCobblestoneWall => SimplifiedBlockKind::MossyCobblestoneWall, + BlockKind::FlowerPot => SimplifiedBlockKind::FlowerPot, + BlockKind::PottedOakSapling => SimplifiedBlockKind::Sapling, + BlockKind::PottedSpruceSapling => SimplifiedBlockKind::Sapling, + BlockKind::PottedBirchSapling => SimplifiedBlockKind::Sapling, + BlockKind::PottedJungleSapling => SimplifiedBlockKind::Sapling, + BlockKind::PottedAcaciaSapling => SimplifiedBlockKind::Sapling, + BlockKind::PottedDarkOakSapling => SimplifiedBlockKind::Sapling, + BlockKind::PottedFern => SimplifiedBlockKind::PottedFern, + BlockKind::PottedDandelion => SimplifiedBlockKind::PottedDandelion, + BlockKind::PottedPoppy => SimplifiedBlockKind::PottedPoppy, + BlockKind::PottedBlueOrchid => SimplifiedBlockKind::Flower, + BlockKind::PottedAllium => SimplifiedBlockKind::PottedAllium, + BlockKind::PottedAzureBluet => SimplifiedBlockKind::Flower, + BlockKind::PottedRedTulip => SimplifiedBlockKind::Flower, + BlockKind::PottedOrangeTulip => SimplifiedBlockKind::Flower, + BlockKind::PottedWhiteTulip => SimplifiedBlockKind::Flower, + BlockKind::PottedPinkTulip => SimplifiedBlockKind::Flower, + BlockKind::PottedOxeyeDaisy => SimplifiedBlockKind::Flower, + BlockKind::PottedCornflower => SimplifiedBlockKind::PottedCornflower, + BlockKind::PottedLilyOfTheValley => SimplifiedBlockKind::PottedLilyOfTheValley, + BlockKind::PottedWitherRose => SimplifiedBlockKind::PottedWitherRose, + BlockKind::PottedRedMushroom => SimplifiedBlockKind::Mushroom, + BlockKind::PottedBrownMushroom => SimplifiedBlockKind::Mushroom, + BlockKind::PottedDeadBush => SimplifiedBlockKind::PottedDeadBush, + BlockKind::PottedCactus => SimplifiedBlockKind::PottedCactus, + BlockKind::Carrots => SimplifiedBlockKind::Carrots, + BlockKind::Potatoes => SimplifiedBlockKind::Potatoes, + BlockKind::OakButton => SimplifiedBlockKind::WoodenButton, + BlockKind::SpruceButton => SimplifiedBlockKind::WoodenButton, + BlockKind::BirchButton => SimplifiedBlockKind::WoodenButton, + BlockKind::JungleButton => SimplifiedBlockKind::WoodenButton, + BlockKind::AcaciaButton => SimplifiedBlockKind::WoodenButton, + BlockKind::DarkOakButton => SimplifiedBlockKind::WoodenButton, + BlockKind::SkeletonSkull => SimplifiedBlockKind::SkeletonSkull, + BlockKind::SkeletonWallSkull => SimplifiedBlockKind::SkeletonWallSkull, + BlockKind::WitherSkeletonSkull => SimplifiedBlockKind::WitherSkeletonSkull, + BlockKind::WitherSkeletonWallSkull => SimplifiedBlockKind::WitherSkeletonWallSkull, + BlockKind::ZombieHead => SimplifiedBlockKind::ZombieHead, + BlockKind::ZombieWallHead => SimplifiedBlockKind::ZombieWallHead, + BlockKind::PlayerHead => SimplifiedBlockKind::PlayerHead, + BlockKind::PlayerWallHead => SimplifiedBlockKind::PlayerWallHead, + BlockKind::CreeperHead => SimplifiedBlockKind::CreeperHead, + BlockKind::CreeperWallHead => SimplifiedBlockKind::CreeperWallHead, + BlockKind::DragonHead => SimplifiedBlockKind::DragonHead, + BlockKind::DragonWallHead => SimplifiedBlockKind::DragonWallHead, + BlockKind::Anvil => SimplifiedBlockKind::Anvil, + BlockKind::ChippedAnvil => SimplifiedBlockKind::Anvil, + BlockKind::DamagedAnvil => SimplifiedBlockKind::Anvil, + BlockKind::TrappedChest => SimplifiedBlockKind::TrappedChest, + BlockKind::LightWeightedPressurePlate => { + SimplifiedBlockKind::LightWeightedPressurePlate + } + BlockKind::HeavyWeightedPressurePlate => { + SimplifiedBlockKind::HeavyWeightedPressurePlate + } + BlockKind::Comparator => SimplifiedBlockKind::Comparator, + BlockKind::DaylightDetector => SimplifiedBlockKind::DaylightDetector, + BlockKind::RedstoneBlock => SimplifiedBlockKind::RedstoneBlock, + BlockKind::NetherQuartzOre => SimplifiedBlockKind::NetherQuartzOre, + BlockKind::Hopper => SimplifiedBlockKind::Hopper, + BlockKind::QuartzBlock => SimplifiedBlockKind::QuartzBlock, + BlockKind::ChiseledQuartzBlock => SimplifiedBlockKind::ChiseledQuartzBlock, + BlockKind::QuartzPillar => SimplifiedBlockKind::QuartzPillar, + BlockKind::QuartzStairs => SimplifiedBlockKind::Stairs, + BlockKind::ActivatorRail => SimplifiedBlockKind::ActivatorRail, + BlockKind::Dropper => SimplifiedBlockKind::Dropper, + BlockKind::WhiteTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::OrangeTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::MagentaTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::LightBlueTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::YellowTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::LimeTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::PinkTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::GrayTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::LightGrayTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::CyanTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::PurpleTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::BlueTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::BrownTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::GreenTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::RedTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::BlackTerracotta => SimplifiedBlockKind::Teracotta, + BlockKind::WhiteStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::OrangeStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::MagentaStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::LightBlueStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::YellowStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::LimeStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::PinkStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::GrayStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::LightGrayStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::CyanStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::PurpleStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::BlueStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::BrownStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::GreenStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::RedStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::BlackStainedGlassPane => SimplifiedBlockKind::StainedGlassPane, + BlockKind::AcaciaStairs => SimplifiedBlockKind::Stairs, + BlockKind::DarkOakStairs => SimplifiedBlockKind::Stairs, + BlockKind::SlimeBlock => SimplifiedBlockKind::SlimeBlock, + BlockKind::Barrier => SimplifiedBlockKind::Barrier, + BlockKind::IronTrapdoor => SimplifiedBlockKind::IronTrapdoor, + BlockKind::Prismarine => SimplifiedBlockKind::Prismarine, + BlockKind::PrismarineBricks => SimplifiedBlockKind::PrismarineBricks, + BlockKind::DarkPrismarine => SimplifiedBlockKind::DarkPrismarine, + BlockKind::PrismarineStairs => SimplifiedBlockKind::Stairs, + BlockKind::PrismarineBrickStairs => SimplifiedBlockKind::Stairs, + BlockKind::DarkPrismarineStairs => SimplifiedBlockKind::Stairs, + BlockKind::PrismarineSlab => SimplifiedBlockKind::Slab, + BlockKind::PrismarineBrickSlab => SimplifiedBlockKind::Slab, + BlockKind::DarkPrismarineSlab => SimplifiedBlockKind::Slab, + BlockKind::SeaLantern => SimplifiedBlockKind::SeaLantern, + BlockKind::HayBlock => SimplifiedBlockKind::HayBlock, + BlockKind::WhiteCarpet => SimplifiedBlockKind::Carpet, + BlockKind::OrangeCarpet => SimplifiedBlockKind::Carpet, + BlockKind::MagentaCarpet => SimplifiedBlockKind::Carpet, + BlockKind::LightBlueCarpet => SimplifiedBlockKind::Carpet, + BlockKind::YellowCarpet => SimplifiedBlockKind::Carpet, + BlockKind::LimeCarpet => SimplifiedBlockKind::Carpet, + BlockKind::PinkCarpet => SimplifiedBlockKind::Carpet, + BlockKind::GrayCarpet => SimplifiedBlockKind::Carpet, + BlockKind::LightGrayCarpet => SimplifiedBlockKind::Carpet, + BlockKind::CyanCarpet => SimplifiedBlockKind::Carpet, + BlockKind::PurpleCarpet => SimplifiedBlockKind::Carpet, + BlockKind::BlueCarpet => SimplifiedBlockKind::Carpet, + BlockKind::BrownCarpet => SimplifiedBlockKind::Carpet, + BlockKind::GreenCarpet => SimplifiedBlockKind::Carpet, + BlockKind::RedCarpet => SimplifiedBlockKind::Carpet, + BlockKind::BlackCarpet => SimplifiedBlockKind::Carpet, + BlockKind::Terracotta => SimplifiedBlockKind::Teracotta, + BlockKind::CoalBlock => SimplifiedBlockKind::CoalBlock, + BlockKind::PackedIce => SimplifiedBlockKind::PackedIce, + BlockKind::Sunflower => SimplifiedBlockKind::Sunflower, + BlockKind::Lilac => SimplifiedBlockKind::Lilac, + BlockKind::RoseBush => SimplifiedBlockKind::RoseBush, + BlockKind::Peony => SimplifiedBlockKind::Peony, + BlockKind::TallGrass => SimplifiedBlockKind::TallGrass, + BlockKind::LargeFern => SimplifiedBlockKind::LargeFern, + BlockKind::WhiteBanner => SimplifiedBlockKind::Banner, + BlockKind::OrangeBanner => SimplifiedBlockKind::Banner, + BlockKind::MagentaBanner => SimplifiedBlockKind::Banner, + BlockKind::LightBlueBanner => SimplifiedBlockKind::Banner, + BlockKind::YellowBanner => SimplifiedBlockKind::Banner, + BlockKind::LimeBanner => SimplifiedBlockKind::Banner, + BlockKind::PinkBanner => SimplifiedBlockKind::Banner, + BlockKind::GrayBanner => SimplifiedBlockKind::Banner, + BlockKind::LightGrayBanner => SimplifiedBlockKind::Banner, + BlockKind::CyanBanner => SimplifiedBlockKind::Banner, + BlockKind::PurpleBanner => SimplifiedBlockKind::Banner, + BlockKind::BlueBanner => SimplifiedBlockKind::Banner, + BlockKind::BrownBanner => SimplifiedBlockKind::Banner, + BlockKind::GreenBanner => SimplifiedBlockKind::Banner, + BlockKind::RedBanner => SimplifiedBlockKind::Banner, + BlockKind::BlackBanner => SimplifiedBlockKind::Banner, + BlockKind::WhiteWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::OrangeWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::MagentaWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::LightBlueWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::YellowWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::LimeWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::PinkWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::GrayWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::LightGrayWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::CyanWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::PurpleWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::BlueWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::BrownWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::GreenWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::RedWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::BlackWallBanner => SimplifiedBlockKind::WallBanner, + BlockKind::RedSandstone => SimplifiedBlockKind::RedSandstone, + BlockKind::ChiseledRedSandstone => SimplifiedBlockKind::ChiseledRedSandstone, + BlockKind::CutRedSandstone => SimplifiedBlockKind::CutRedSandstone, + BlockKind::RedSandstoneStairs => SimplifiedBlockKind::Stairs, + BlockKind::OakSlab => SimplifiedBlockKind::Slab, + BlockKind::SpruceSlab => SimplifiedBlockKind::Slab, + BlockKind::BirchSlab => SimplifiedBlockKind::Slab, + BlockKind::JungleSlab => SimplifiedBlockKind::Slab, + BlockKind::AcaciaSlab => SimplifiedBlockKind::Slab, + BlockKind::DarkOakSlab => SimplifiedBlockKind::Slab, + BlockKind::StoneSlab => SimplifiedBlockKind::Slab, + BlockKind::SmoothStoneSlab => SimplifiedBlockKind::Slab, + BlockKind::SandstoneSlab => SimplifiedBlockKind::Slab, + BlockKind::CutSandstoneSlab => SimplifiedBlockKind::Slab, + BlockKind::PetrifiedOakSlab => SimplifiedBlockKind::Slab, + BlockKind::CobblestoneSlab => SimplifiedBlockKind::Slab, + BlockKind::BrickSlab => SimplifiedBlockKind::Slab, + BlockKind::StoneBrickSlab => SimplifiedBlockKind::Slab, + BlockKind::NetherBrickSlab => SimplifiedBlockKind::Slab, + BlockKind::QuartzSlab => SimplifiedBlockKind::Slab, + BlockKind::RedSandstoneSlab => SimplifiedBlockKind::Slab, + BlockKind::CutRedSandstoneSlab => SimplifiedBlockKind::Slab, + BlockKind::PurpurSlab => SimplifiedBlockKind::Slab, + BlockKind::SmoothStone => SimplifiedBlockKind::SmoothStone, + BlockKind::SmoothSandstone => SimplifiedBlockKind::SmoothSandstone, + BlockKind::SmoothQuartz => SimplifiedBlockKind::SmoothQuartz, + BlockKind::SmoothRedSandstone => SimplifiedBlockKind::SmoothRedSandstone, + BlockKind::SpruceFenceGate => SimplifiedBlockKind::FenceGate, + BlockKind::BirchFenceGate => SimplifiedBlockKind::FenceGate, + BlockKind::JungleFenceGate => SimplifiedBlockKind::FenceGate, + BlockKind::AcaciaFenceGate => SimplifiedBlockKind::FenceGate, + BlockKind::DarkOakFenceGate => SimplifiedBlockKind::FenceGate, + BlockKind::SpruceFence => SimplifiedBlockKind::Fence, + BlockKind::BirchFence => SimplifiedBlockKind::Fence, + BlockKind::JungleFence => SimplifiedBlockKind::Fence, + BlockKind::AcaciaFence => SimplifiedBlockKind::Fence, + BlockKind::DarkOakFence => SimplifiedBlockKind::Fence, + BlockKind::SpruceDoor => SimplifiedBlockKind::WoodenDoor, + BlockKind::BirchDoor => SimplifiedBlockKind::WoodenDoor, + BlockKind::JungleDoor => SimplifiedBlockKind::WoodenDoor, + BlockKind::AcaciaDoor => SimplifiedBlockKind::WoodenDoor, + BlockKind::DarkOakDoor => SimplifiedBlockKind::WoodenDoor, + BlockKind::EndRod => SimplifiedBlockKind::EndRod, + BlockKind::ChorusPlant => SimplifiedBlockKind::ChorusPlant, + BlockKind::ChorusFlower => SimplifiedBlockKind::ChorusFlower, + BlockKind::PurpurBlock => SimplifiedBlockKind::PurpurBlock, + BlockKind::PurpurPillar => SimplifiedBlockKind::PurpurPillar, + BlockKind::PurpurStairs => SimplifiedBlockKind::Stairs, + BlockKind::EndStoneBricks => SimplifiedBlockKind::EndStoneBricks, + BlockKind::Beetroots => SimplifiedBlockKind::Beetroots, + BlockKind::GrassPath => SimplifiedBlockKind::GrassPath, + BlockKind::EndGateway => SimplifiedBlockKind::EndGateway, + BlockKind::RepeatingCommandBlock => SimplifiedBlockKind::RepeatingCommandBlock, + BlockKind::ChainCommandBlock => SimplifiedBlockKind::ChainCommandBlock, + BlockKind::FrostedIce => SimplifiedBlockKind::FrostedIce, + BlockKind::MagmaBlock => SimplifiedBlockKind::MagmaBlock, + BlockKind::NetherWartBlock => SimplifiedBlockKind::NetherWartBlock, + BlockKind::RedNetherBricks => SimplifiedBlockKind::RedNetherBricks, + BlockKind::BoneBlock => SimplifiedBlockKind::BoneBlock, + BlockKind::StructureVoid => SimplifiedBlockKind::StructureVoid, + BlockKind::Observer => SimplifiedBlockKind::Observer, + BlockKind::ShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::WhiteShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::OrangeShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::MagentaShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::LightBlueShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::YellowShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::LimeShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::PinkShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::GrayShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::LightGrayShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::CyanShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::PurpleShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::BlueShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::BrownShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::GreenShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::RedShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::BlackShulkerBox => SimplifiedBlockKind::ShulkerBox, + BlockKind::WhiteGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::OrangeGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::MagentaGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::LightBlueGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::YellowGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::LimeGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::PinkGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::GrayGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::LightGrayGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::CyanGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::PurpleGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::BlueGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::BrownGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::GreenGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::RedGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::BlackGlazedTerracotta => SimplifiedBlockKind::GlazedTeracotta, + BlockKind::WhiteConcrete => SimplifiedBlockKind::Concrete, + BlockKind::OrangeConcrete => SimplifiedBlockKind::Concrete, + BlockKind::MagentaConcrete => SimplifiedBlockKind::Concrete, + BlockKind::LightBlueConcrete => SimplifiedBlockKind::Concrete, + BlockKind::YellowConcrete => SimplifiedBlockKind::Concrete, + BlockKind::LimeConcrete => SimplifiedBlockKind::Concrete, + BlockKind::PinkConcrete => SimplifiedBlockKind::Concrete, + BlockKind::GrayConcrete => SimplifiedBlockKind::Concrete, + BlockKind::LightGrayConcrete => SimplifiedBlockKind::Concrete, + BlockKind::CyanConcrete => SimplifiedBlockKind::Concrete, + BlockKind::PurpleConcrete => SimplifiedBlockKind::Concrete, + BlockKind::BlueConcrete => SimplifiedBlockKind::Concrete, + BlockKind::BrownConcrete => SimplifiedBlockKind::Concrete, + BlockKind::GreenConcrete => SimplifiedBlockKind::Concrete, + BlockKind::RedConcrete => SimplifiedBlockKind::Concrete, + BlockKind::BlackConcrete => SimplifiedBlockKind::Concrete, + BlockKind::WhiteConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::OrangeConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::MagentaConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::LightBlueConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::YellowConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::LimeConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::PinkConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::GrayConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::LightGrayConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::CyanConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::PurpleConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::BlueConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::BrownConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::GreenConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::RedConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::BlackConcretePowder => SimplifiedBlockKind::ConcretePowder, + BlockKind::Kelp => SimplifiedBlockKind::Kelp, + BlockKind::KelpPlant => SimplifiedBlockKind::KelpPlant, + BlockKind::DriedKelpBlock => SimplifiedBlockKind::DriedKelpBlock, + BlockKind::TurtleEgg => SimplifiedBlockKind::TurtleEgg, + BlockKind::DeadTubeCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::DeadBrainCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::DeadBubbleCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::DeadFireCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::DeadHornCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::TubeCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::BrainCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::BubbleCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::FireCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::HornCoralBlock => SimplifiedBlockKind::CoralBlock, + BlockKind::DeadTubeCoral => SimplifiedBlockKind::Coral, + BlockKind::DeadBrainCoral => SimplifiedBlockKind::Coral, + BlockKind::DeadBubbleCoral => SimplifiedBlockKind::Coral, + BlockKind::DeadFireCoral => SimplifiedBlockKind::Coral, + BlockKind::DeadHornCoral => SimplifiedBlockKind::Coral, + BlockKind::TubeCoral => SimplifiedBlockKind::Coral, + BlockKind::BrainCoral => SimplifiedBlockKind::Coral, + BlockKind::BubbleCoral => SimplifiedBlockKind::Coral, + BlockKind::FireCoral => SimplifiedBlockKind::Coral, + BlockKind::HornCoral => SimplifiedBlockKind::Coral, + BlockKind::DeadTubeCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::DeadBrainCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::DeadBubbleCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::DeadFireCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::DeadHornCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::TubeCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::BrainCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::BubbleCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::FireCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::HornCoralFan => SimplifiedBlockKind::CoralFan, + BlockKind::DeadTubeCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::DeadBrainCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::DeadBubbleCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::DeadFireCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::DeadHornCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::TubeCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::BrainCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::BubbleCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::FireCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::HornCoralWallFan => SimplifiedBlockKind::CoralWallFan, + BlockKind::SeaPickle => SimplifiedBlockKind::SeaPickle, + BlockKind::BlueIce => SimplifiedBlockKind::BlueIce, + BlockKind::Conduit => SimplifiedBlockKind::Conduit, + BlockKind::BambooSapling => SimplifiedBlockKind::Sapling, + BlockKind::Bamboo => SimplifiedBlockKind::Bamboo, + BlockKind::PottedBamboo => SimplifiedBlockKind::PottedBamboo, + BlockKind::VoidAir => SimplifiedBlockKind::Air, + BlockKind::CaveAir => SimplifiedBlockKind::Air, + BlockKind::BubbleColumn => SimplifiedBlockKind::BubbleColumn, + BlockKind::PolishedGraniteStairs => SimplifiedBlockKind::Stairs, + BlockKind::SmoothRedSandstoneStairs => SimplifiedBlockKind::Stairs, + BlockKind::MossyStoneBrickStairs => SimplifiedBlockKind::Stairs, + BlockKind::PolishedDioriteStairs => SimplifiedBlockKind::Stairs, + BlockKind::MossyCobblestoneStairs => SimplifiedBlockKind::Stairs, + BlockKind::EndStoneBrickStairs => SimplifiedBlockKind::Stairs, + BlockKind::StoneStairs => SimplifiedBlockKind::Stairs, + BlockKind::SmoothSandstoneStairs => SimplifiedBlockKind::Stairs, + BlockKind::SmoothQuartzStairs => SimplifiedBlockKind::Stairs, + BlockKind::GraniteStairs => SimplifiedBlockKind::Stairs, + BlockKind::AndesiteStairs => SimplifiedBlockKind::Stairs, + BlockKind::RedNetherBrickStairs => SimplifiedBlockKind::Stairs, + BlockKind::PolishedAndesiteStairs => SimplifiedBlockKind::Stairs, + BlockKind::DioriteStairs => SimplifiedBlockKind::Stairs, + BlockKind::PolishedGraniteSlab => SimplifiedBlockKind::Slab, + BlockKind::SmoothRedSandstoneSlab => SimplifiedBlockKind::Slab, + BlockKind::MossyStoneBrickSlab => SimplifiedBlockKind::Slab, + BlockKind::PolishedDioriteSlab => SimplifiedBlockKind::Slab, + BlockKind::MossyCobblestoneSlab => SimplifiedBlockKind::Slab, + BlockKind::EndStoneBrickSlab => SimplifiedBlockKind::Slab, + BlockKind::SmoothSandstoneSlab => SimplifiedBlockKind::Slab, + BlockKind::SmoothQuartzSlab => SimplifiedBlockKind::Slab, + BlockKind::GraniteSlab => SimplifiedBlockKind::Slab, + BlockKind::AndesiteSlab => SimplifiedBlockKind::Slab, + BlockKind::RedNetherBrickSlab => SimplifiedBlockKind::Slab, + BlockKind::PolishedAndesiteSlab => SimplifiedBlockKind::Slab, + BlockKind::DioriteSlab => SimplifiedBlockKind::Slab, + BlockKind::BrickWall => SimplifiedBlockKind::BrickWall, + BlockKind::PrismarineWall => SimplifiedBlockKind::PrismarineWall, + BlockKind::RedSandstoneWall => SimplifiedBlockKind::RedSandstoneWall, + BlockKind::MossyStoneBrickWall => SimplifiedBlockKind::MossyStoneBrickWall, + BlockKind::GraniteWall => SimplifiedBlockKind::GraniteWall, + BlockKind::StoneBrickWall => SimplifiedBlockKind::StoneBrickWall, + BlockKind::NetherBrickWall => SimplifiedBlockKind::NetherBrickWall, + BlockKind::AndesiteWall => SimplifiedBlockKind::AndesiteWall, + BlockKind::RedNetherBrickWall => SimplifiedBlockKind::RedNetherBrickWall, + BlockKind::SandstoneWall => SimplifiedBlockKind::SandstoneWall, + BlockKind::EndStoneBrickWall => SimplifiedBlockKind::EndStoneBrickWall, + BlockKind::DioriteWall => SimplifiedBlockKind::DioriteWall, + BlockKind::Scaffolding => SimplifiedBlockKind::Scaffolding, + BlockKind::Loom => SimplifiedBlockKind::Loom, + BlockKind::Barrel => SimplifiedBlockKind::Barrel, + BlockKind::Smoker => SimplifiedBlockKind::Smoker, + BlockKind::BlastFurnace => SimplifiedBlockKind::BlastFurnace, + BlockKind::CartographyTable => SimplifiedBlockKind::CartographyTable, + BlockKind::FletchingTable => SimplifiedBlockKind::FletchingTable, + BlockKind::Grindstone => SimplifiedBlockKind::Grindstone, + BlockKind::Lectern => SimplifiedBlockKind::Lectern, + BlockKind::SmithingTable => SimplifiedBlockKind::SmithingTable, + BlockKind::Stonecutter => SimplifiedBlockKind::Stonecutter, + BlockKind::Bell => SimplifiedBlockKind::Bell, + BlockKind::Lantern => SimplifiedBlockKind::Lantern, + BlockKind::SoulLantern => SimplifiedBlockKind::SoulLantern, + BlockKind::Campfire => SimplifiedBlockKind::Campfire, + BlockKind::SoulCampfire => SimplifiedBlockKind::SoulCampfire, + BlockKind::SweetBerryBush => SimplifiedBlockKind::SweetBerryBush, + BlockKind::WarpedStem => SimplifiedBlockKind::WarpedStem, + BlockKind::StrippedWarpedStem => SimplifiedBlockKind::StrippedWarpedStem, + BlockKind::WarpedHyphae => SimplifiedBlockKind::WarpedHyphae, + BlockKind::StrippedWarpedHyphae => SimplifiedBlockKind::StrippedWarpedHyphae, + BlockKind::WarpedNylium => SimplifiedBlockKind::WarpedNylium, + BlockKind::WarpedFungus => SimplifiedBlockKind::WarpedFungus, + BlockKind::WarpedWartBlock => SimplifiedBlockKind::WarpedWartBlock, + BlockKind::WarpedRoots => SimplifiedBlockKind::WarpedRoots, + BlockKind::NetherSprouts => SimplifiedBlockKind::NetherSprouts, + BlockKind::CrimsonStem => SimplifiedBlockKind::CrimsonStem, + BlockKind::StrippedCrimsonStem => SimplifiedBlockKind::StrippedCrimsonStem, + BlockKind::CrimsonHyphae => SimplifiedBlockKind::CrimsonHyphae, + BlockKind::StrippedCrimsonHyphae => SimplifiedBlockKind::StrippedCrimsonHyphae, + BlockKind::CrimsonNylium => SimplifiedBlockKind::CrimsonNylium, + BlockKind::CrimsonFungus => SimplifiedBlockKind::CrimsonFungus, + BlockKind::Shroomlight => SimplifiedBlockKind::Shroomlight, + BlockKind::WeepingVines => SimplifiedBlockKind::WeepingVines, + BlockKind::WeepingVinesPlant => SimplifiedBlockKind::WeepingVinesPlant, + BlockKind::TwistingVines => SimplifiedBlockKind::TwistingVines, + BlockKind::TwistingVinesPlant => SimplifiedBlockKind::TwistingVinesPlant, + BlockKind::CrimsonRoots => SimplifiedBlockKind::CrimsonRoots, + BlockKind::CrimsonPlanks => SimplifiedBlockKind::Planks, + BlockKind::WarpedPlanks => SimplifiedBlockKind::Planks, + BlockKind::CrimsonSlab => SimplifiedBlockKind::Slab, + BlockKind::WarpedSlab => SimplifiedBlockKind::Slab, + BlockKind::CrimsonPressurePlate => SimplifiedBlockKind::CrimsonPressurePlate, + BlockKind::WarpedPressurePlate => SimplifiedBlockKind::WarpedPressurePlate, + BlockKind::CrimsonFence => SimplifiedBlockKind::Fence, + BlockKind::WarpedFence => SimplifiedBlockKind::Fence, + BlockKind::CrimsonTrapdoor => SimplifiedBlockKind::CrimsonTrapdoor, + BlockKind::WarpedTrapdoor => SimplifiedBlockKind::WarpedTrapdoor, + BlockKind::CrimsonFenceGate => SimplifiedBlockKind::FenceGate, + BlockKind::WarpedFenceGate => SimplifiedBlockKind::FenceGate, + BlockKind::CrimsonStairs => SimplifiedBlockKind::Stairs, + BlockKind::WarpedStairs => SimplifiedBlockKind::Stairs, + BlockKind::CrimsonButton => SimplifiedBlockKind::CrimsonButton, + BlockKind::WarpedButton => SimplifiedBlockKind::WarpedButton, + BlockKind::CrimsonDoor => SimplifiedBlockKind::CrimsonDoor, + BlockKind::WarpedDoor => SimplifiedBlockKind::WarpedDoor, + BlockKind::CrimsonSign => SimplifiedBlockKind::Sign, + BlockKind::WarpedSign => SimplifiedBlockKind::Sign, + BlockKind::CrimsonWallSign => SimplifiedBlockKind::WallSign, + BlockKind::WarpedWallSign => SimplifiedBlockKind::WallSign, + BlockKind::StructureBlock => SimplifiedBlockKind::StructureBlock, + BlockKind::Jigsaw => SimplifiedBlockKind::Jigsaw, + BlockKind::Composter => SimplifiedBlockKind::Composter, + BlockKind::Target => SimplifiedBlockKind::Target, + BlockKind::BeeNest => SimplifiedBlockKind::BeeNest, + BlockKind::Beehive => SimplifiedBlockKind::Beehive, + BlockKind::HoneyBlock => SimplifiedBlockKind::HoneyBlock, + BlockKind::HoneycombBlock => SimplifiedBlockKind::HoneycombBlock, + BlockKind::NetheriteBlock => SimplifiedBlockKind::NetheriteBlock, + BlockKind::AncientDebris => SimplifiedBlockKind::AncientDebris, + BlockKind::CryingObsidian => SimplifiedBlockKind::CryingObsidian, + BlockKind::RespawnAnchor => SimplifiedBlockKind::RespawnAnchor, + BlockKind::PottedCrimsonFungus => SimplifiedBlockKind::PottedCrimsonFungus, + BlockKind::PottedWarpedFungus => SimplifiedBlockKind::PottedWarpedFungus, + BlockKind::PottedCrimsonRoots => SimplifiedBlockKind::PottedCrimsonRoots, + BlockKind::PottedWarpedRoots => SimplifiedBlockKind::PottedWarpedRoots, + BlockKind::Lodestone => SimplifiedBlockKind::Lodestone, + BlockKind::Blackstone => SimplifiedBlockKind::Blackstone, + BlockKind::BlackstoneStairs => SimplifiedBlockKind::Stairs, + BlockKind::BlackstoneWall => SimplifiedBlockKind::BlackstoneWall, + BlockKind::BlackstoneSlab => SimplifiedBlockKind::Slab, + BlockKind::PolishedBlackstone => SimplifiedBlockKind::PolishedBlackstone, + BlockKind::PolishedBlackstoneBricks => SimplifiedBlockKind::PolishedBlackstoneBricks, + BlockKind::CrackedPolishedBlackstoneBricks => { + SimplifiedBlockKind::CrackedPolishedBlackstoneBricks + } + BlockKind::ChiseledPolishedBlackstone => { + SimplifiedBlockKind::ChiseledPolishedBlackstone + } + BlockKind::PolishedBlackstoneBrickSlab => SimplifiedBlockKind::Slab, + BlockKind::PolishedBlackstoneBrickStairs => SimplifiedBlockKind::Stairs, + BlockKind::PolishedBlackstoneBrickWall => { + SimplifiedBlockKind::PolishedBlackstoneBrickWall + } + BlockKind::GildedBlackstone => SimplifiedBlockKind::GildedBlackstone, + BlockKind::PolishedBlackstoneStairs => SimplifiedBlockKind::Stairs, + BlockKind::PolishedBlackstoneSlab => SimplifiedBlockKind::Slab, + BlockKind::PolishedBlackstonePressurePlate => { + SimplifiedBlockKind::PolishedBlackstonePressurePlate + } + BlockKind::PolishedBlackstoneButton => SimplifiedBlockKind::PolishedBlackstoneButton, + BlockKind::PolishedBlackstoneWall => SimplifiedBlockKind::PolishedBlackstoneWall, + BlockKind::ChiseledNetherBricks => SimplifiedBlockKind::ChiseledNetherBricks, + BlockKind::CrackedNetherBricks => SimplifiedBlockKind::CrackedNetherBricks, + BlockKind::QuartzBricks => SimplifiedBlockKind::QuartzBricks, + } + } +} diff --git a/crates/plugin-host/Cargo.toml b/crates/plugin-host/Cargo.toml new file mode 100644 index 000000000..545ed1ef2 --- /dev/null +++ b/crates/plugin-host/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "feather-plugin-host" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" + +[dependencies] +feather-common = { path = "../common" } +feather-ecs = { path = "../ecs" } + +quill-common = { git = "https://github.com/feather-rs/quill" } +quill-plugin-format = { git = "https://github.com/feather-rs/quill" } +wasmer = { version = "1", default-features = false, features = ["jit"] } +wasmer-wasi = { version = "1", default-features = false } +anyhow = "1" +bytemuck = "1" +ahash = "0.7" +log = "0.4" +vec-arena = "1" +bincode = "1" +serde = "1" + +[features] +llvm = ["wasmer/llvm"] +cranelift = ["wasmer/cranelift"] diff --git a/crates/plugin-host/src/context.rs b/crates/plugin-host/src/context.rs new file mode 100644 index 000000000..8765444f8 --- /dev/null +++ b/crates/plugin-host/src/context.rs @@ -0,0 +1,224 @@ +use std::{ + alloc::Layout, + cell::{RefCell, RefMut}, + mem::size_of, +}; + +use anyhow::anyhow; +use anyhow::{bail, Context}; +use bump::PluginBump; +use bytemuck::Pod; +use feather_common::Game; +use feather_ecs::EntityBuilder; +use quill_common::Component; +use serde::de::DeserializeOwned; +use vec_arena::Arena; +use wasmer::{Instance, LazyInit, Memory, NativeFunc, WasmPtr}; + +use crate::PluginId; + +mod bump; + +/// Context passed to host functions. +/// +/// Provides access to the [`Game`](feather_common::Game). +#[derive(Default)] +pub struct PluginContext { + /// Pointer to the `Game`. + game: Option>, + + /// The plugin's memory. + memory: LazyInit, + + /// Function to allocate memory within the plugin's linear memory. + allocate: LazyInit>, + /// Function to deallocate memory within the plugin's linear memory. + deallocate: LazyInit>, + /// Function to invoke a system within the plugin. + run_system: LazyInit>, + + /// Bump allocator to allocate temporary memory. + bump: LazyInit>, + + /// ID of this plugin. + plugin_id: LazyInit, + + instance: LazyInit, + + pub entity_builders: Arena, +} + +impl PluginContext { + pub fn init_with_instance(&mut self, plugin_instance: &Instance) -> anyhow::Result<()> { + let memory = plugin_instance.exports.get_memory("memory")?; + + let allocate = plugin_instance + .exports + .get_function("quill_allocate")? + .native()?; + let deallocate = plugin_instance + .exports + .get_function("quill_deallocate")? + .native()?; + let run_system = plugin_instance + .exports + .get_function("quill_run_system")? + .native()?; + + let bump = PluginBump::new(allocate.clone(), deallocate.clone())?; + + self.memory.initialize(memory.clone()); + self.allocate.initialize(allocate); + self.deallocate.initialize(deallocate); + self.run_system.initialize(run_system); + self.bump.initialize(RefCell::new(bump)); + self.instance.initialize(plugin_instance.clone()); + + Ok(()) + } + + pub fn set_plugin_id(&mut self, id: PluginId) { + self.plugin_id.initialize(id); + } + + pub fn plugin_id(&self) -> PluginId { + *self.plugin_id.get_ref().unwrap() + } + + /// Gets a mutable reference to the `Game`. + /// + /// # Safety + /// This function is not marked `unsafe` as it is only + /// accessible internally. However, it may only be called + /// within the context of a host call. + pub fn game_mut(&self) -> RefMut { + let ptr = self + .game + .as_ref() + .expect("not inside host call") + .borrow_mut(); + RefMut::map(ptr, |ptr| unsafe { &mut **ptr }) + } + + /// Sets the `Game` used for host calls. + pub fn set_game(&mut self, game: &mut Game) { + self.game = Some(RefCell::new(game as *mut Game)); + } + + /// Gets the plugin memory. + pub fn memory(&self) -> &Memory { + self.memory.get_ref().unwrap() + } + + /// Gets the function to invoke a system on the plugin + /// given a pointer to its data. + pub fn run_system_fn(&self) -> &NativeFunc { + self.run_system.get_ref().unwrap() + } + + /// Allocates a pointer with the given layout inside the plugin's linear memory. + /// + /// This function uses the bump allocator. Memory + /// is automatically freed when the plugin returns frim + /// the current system. + pub fn bump_allocate(&self, layout: Layout) -> anyhow::Result> { + self.bump.get_ref().unwrap().borrow_mut().alloc(layout) + } + + /// Resets the bump allocator. + /// + /// Will trap the plugin if called incorrectly. + pub fn bump_reset(&self) -> anyhow::Result<()> { + self.bump.get_ref().unwrap().borrow_mut().reset() + } + + /// Copies data into WASM memory, safely. + pub fn write_to_memory(&self, value: T, dst: WasmPtr) -> anyhow::Result<()> { + self.write_slice_to_memory(&[value], dst) + } + + /// Copies a slice of data into WASM memory, safely. + pub fn write_slice_to_memory( + &self, + values: &[T], + dst: WasmPtr, + ) -> anyhow::Result<()> { + let src = values.as_ptr().cast::(); + unsafe { self.write_raw_to_memory(src, values.len() * size_of::(), dst) } + } + + /// Copies raw data into memory. + /// + /// # Safety + /// `ptr` must be a valid pointer into a slice + /// of `len` bytes. + pub unsafe fn write_raw_to_memory( + &self, + src: *const u8, + len: usize, + dst: WasmPtr, + ) -> anyhow::Result<()> { + if dst.offset() as usize + len > self.memory().data_size() as usize { + bail!("ptr out of bounds"); + } + + // SAFETY: we do not access the WASM module while + // we write to its memory, so a data race is not possible. + let dst = self.memory().data_ptr().add(dst.offset() as usize); + std::ptr::copy_nonoverlapping(src, dst, len); + + Ok(()) + } + + /// Allocates memory for and writes `value` into the plugin's memory. + /// Returns the allocated pointer. + /// + /// Uses bump-allocated memory that is freed at + /// the end of the current system. + pub fn insert_to_memory(&self, value: T) -> anyhow::Result> { + let ptr = self.bump_allocate(Layout::new::())?; + self.write_to_memory(value, ptr)?; + Ok(ptr) + } + + /// Gets a `bincode`-encoded value from plugin memory. + pub fn read_bincode( + &self, + ptr: WasmPtr, + len: u32, + ) -> anyhow::Result { + // SAFETY: No other code is currently + // accessing the memory mutably. + let bytes = unsafe { self.read_bytes(ptr, len)? }; + bincode::deserialize(bytes).map_err(From::from) + } + + /// Gets a `Component` from memory. + pub fn read_component(&self, ptr: WasmPtr, len: u32) -> anyhow::Result { + // SAFETY: No other code is currently + // accessing the memory mutably. + let bytes = unsafe { self.read_bytes(ptr, len)? }; + T::from_bytes(bytes) + .context("malformed component") + .map(|(value, _offset)| value) + } + + /// Gets a value implementing `bytemuck::Pod` from memory. + pub fn read_pod(&self, ptr: WasmPtr) -> anyhow::Result { + // SAFETY: No other code is currently + // accessing the memory mutably. + let bytes = unsafe { self.read_bytes(ptr, size_of::() as u32)? }; + let value = *bytemuck::try_from_bytes(bytes).map_err(|e| anyhow!("{}", e))?; + Ok(value) + } + + /// # Safety + /// Mutating the plugin's memory while this slice + /// is alive is undefined behavior. + pub unsafe fn read_bytes(&self, ptr: WasmPtr, len: u32) -> anyhow::Result<&[u8]> { + if ptr.offset() as u64 + len as u64 >= self.memory().data_size() { + bail!("pointer out of bounds"); + } + Ok(&self.memory().data_unchecked()[ptr.offset() as usize..(ptr.offset() + len) as usize]) + } +} diff --git a/crates/plugin-host/src/context/bump.rs b/crates/plugin-host/src/context/bump.rs new file mode 100644 index 000000000..d8523ee43 --- /dev/null +++ b/crates/plugin-host/src/context/bump.rs @@ -0,0 +1,157 @@ +use std::{alloc::Layout, cell::Cell}; + +use anyhow::Context; +use wasmer::{NativeFunc, WasmPtr}; + +const INITIAL_CHUNK_SIZE: usize = 2048; + +const CHUNK_ALIGN: usize = 16; + +fn round_up_to(n: usize, divisor: usize) -> Option { + debug_assert!(divisor > 0); + debug_assert!(divisor.is_power_of_two()); + Some(n.checked_add(divisor - 1)? & !(divisor - 1)) +} + +/// Host-controlled bump allocator for a plugin. +/// See the Quill docs for why we use this. +/// +/// The implementation is mostly ported from the `bumpalo` +/// crate. +pub struct PluginBump { + /// Plugin function to allocate memory. Used + /// for the slow path when the current chunk + /// is exhausted. + allocate_function: NativeFunc<(u32, u32), u32>, + /// Plugin function to deallocate memory. + deallocate_function: NativeFunc<(u32, u32, u32)>, + /// Allocated chunks. + chunks: Vec, +} + +impl PluginBump { + /// Creates a new bump allocator. + pub fn new( + allocate_function: NativeFunc<(u32, u32), u32>, + deallocate_function: NativeFunc<(u32, u32, u32)>, + ) -> anyhow::Result { + let mut this = Self { + allocate_function, + deallocate_function, + chunks: Vec::new(), + }; + let initial_chunk = this.allocate_chunk(None, None)?; + this.chunks.push(initial_chunk); + Ok(this) + } + + /// Allocates memory of the given layout + /// within the plugin's linear memory. + pub fn alloc(&mut self, layout: Layout) -> anyhow::Result> { + let offset = match self.alloc_fast_path(layout) { + Some(offset) => offset, + None => self.alloc_slow_path(layout)?, + }; + Ok(WasmPtr::new(offset)) + } + + fn alloc_fast_path(&self, layout: Layout) -> Option { + let chunk = self.chunks.last().expect(">0 chunks"); + let ptr = chunk.ptr.get(); + let start = chunk.start; + debug_assert!(start <= ptr); + + let ptr = ptr.checked_sub(layout.size() as u32)?; + let aligned_ptr = ptr & !(layout.align() as u32 - 1); + + if aligned_ptr >= start { + chunk.ptr.set(aligned_ptr); + Some(aligned_ptr) + } else { + None + } + } + + /// Slow path for allocation where we need to allocate + /// a new chunk. + fn alloc_slow_path(&mut self, layout: Layout) -> anyhow::Result { + let previous_size = self.chunks.last().expect(">0 chunks").layout.size(); + let new_chunk = self.allocate_chunk(Some(layout), Some(previous_size))?; + self.chunks.push(new_chunk); + Ok(self + .alloc_fast_path(layout) + .expect("new chunk can fit layout")) + } + + fn allocate_chunk( + &self, + min_layout: Option, + previous_size: Option, + ) -> anyhow::Result { + let mut new_size = match previous_size { + Some(previous_size) => previous_size + .checked_mul(2) + .context("chunk overflows usize")?, + None => INITIAL_CHUNK_SIZE, + }; + + let mut align = CHUNK_ALIGN; + if let Some(min_layout) = min_layout { + align = align.max(min_layout.align()); + let requested_size = + round_up_to(min_layout.size(), align).context("allocation too large")?; + new_size = new_size.max(requested_size); + } + + assert_eq!(align % CHUNK_ALIGN, 0); + assert_eq!(new_size % CHUNK_ALIGN, 0); + let layout = Layout::from_size_align(new_size, align).context("size or align is 0")?; + + assert!(new_size >= previous_size.unwrap_or(0) * 2); + + let start = self + .allocate_function + .call(layout.size() as u32, layout.align() as u32)?; + + Ok(Chunk { + start, + layout, + ptr: Cell::new(start + new_size as u32), + }) + } + + /// Resets the bump allocator, freeing + /// all allocated memory. + pub fn reset(&mut self) -> anyhow::Result<()> { + // Free all but the last chunk. + for chunk in self.chunks.drain(..self.chunks.len() - 1) { + self.deallocate_function.call( + chunk.start, + chunk.layout.size() as u32, + chunk.layout.align() as u32, + )?; + } + + assert_eq!(self.chunks.len(), 1); + + // Reset the last chunk's data pointer. + let last_chunk = self.chunks.last_mut().unwrap(); + last_chunk + .ptr + .set(last_chunk.start + last_chunk.layout.size() as u32); + + Ok(()) + } +} + +/// A chunk of memory in the bump allocator. +struct Chunk { + /// Offset into linear memory of the start + /// of this chunk. + start: u32, + /// Layout of the chunk. + layout: Layout, + /// Pointer to the next available byte plus one + /// in the chunk. Starts at the end of the chunk. + ptr: Cell, +} diff --git a/crates/plugin-host/src/env.rs b/crates/plugin-host/src/env.rs new file mode 100644 index 000000000..a1dd407be --- /dev/null +++ b/crates/plugin-host/src/env.rs @@ -0,0 +1,32 @@ +use std::{cell::RefMut, sync::Arc}; + +use wasmer::{ExportError, HostEnvInitError, WasmerEnv}; + +use crate::{context::PluginContext, thread_pinned::ThreadPinned}; + +/// The [`WasmerEnv`] passed to host calls. +#[derive(Clone)] +pub struct PluginEnv { + pub context: Arc>, +} + +impl PluginEnv { + pub fn new() -> Self { + Self { + context: Arc::new(ThreadPinned::new(PluginContext::default())), + } + } + + pub fn context(&self) -> RefMut { + self.context.borrow_mut() + } +} + +impl WasmerEnv for PluginEnv { + fn init_with_instance(&mut self, instance: &wasmer::Instance) -> Result<(), HostEnvInitError> { + self.context + .borrow_mut() + .init_with_instance(instance) + .map_err(|e| HostEnvInitError::Export(ExportError::Missing(e.to_string()))) + } +} diff --git a/crates/plugin-host/src/host_calls.rs b/crates/plugin-host/src/host_calls.rs new file mode 100644 index 000000000..0b541f19b --- /dev/null +++ b/crates/plugin-host/src/host_calls.rs @@ -0,0 +1,111 @@ +//! Implements all host calls defined in the `quill-sys` crate. + +use std::{cell::RefCell, rc::Rc}; + +use crate::{ + context::PluginContext, env::PluginEnv, wasm_ptr_ext::WasmPtrIntoArray, PluginManager, +}; +use anyhow::Context; +use feather_common::{ChatBox, Game}; +use feather_ecs::Entity; +use wasmer::{Function, ImportObject, Store, WasmPtr}; + +mod component; +mod entity_builder; +mod query; + +macro_rules! quill_imports { + ($store:expr, $env:expr, $( + $name:literal => $function:ident($($param:ident),*), + )*) => { + wasmer::imports! { + "quill_01" => { + $( + $name => Function::new_native_with_env($store, $env.clone(), |env: &PluginEnv, $($param,)*| { + let mut cx = env.context(); + let result = $function(&mut *cx, $($param),*); + match result { + Ok(val) => val, + Err(e) => unsafe { wasmer::raise_user_trap(e.into()) }, + } + }), + )* + } + } + } +} + +pub fn create_import_object(store: &Store, env: PluginEnv) -> ImportObject { + use self::component::{entity_get_component, entity_set_component}; + use self::entity_builder::{ + entity_builder_add_component, entity_builder_finish, entity_builder_new, + }; + use self::query::entity_query; + quill_imports! { + store, env, + "register_system" => register_system(system_data_ptr, name_ptr, name_len), + "entity_query" => entity_query(components_ptr, components_len), + "entity_exists" => entity_exists(entity), + "entity_get_component" => entity_get_component(entity, component), + "entity_set_component" => entity_set_component(entity, component, bytes_ptr, bytes_len), + "entity_send_message" => entity_send_message(entity, message_ptr, message_len), + "entity_builder_new" => entity_builder_new(position, init_ptr, init_len), + "entity_builder_add_component" => entity_builder_add_component(builder, component, bytes_ptr, bytes_len), + "entity_builder_finish" => entity_builder_finish(builder), + } +} + +fn register_system( + cx: &mut PluginContext, + system_data_ptr: WasmPtr, + name_ptr: WasmPtr, + name_len: u32, +) -> anyhow::Result<()> { + let id = cx.plugin_id(); + let function = cx.run_system_fn().clone(); + + let system = move |game: &mut Game| { + let plugins = Rc::clone(&*game.resources.get::>>()?); + let mut plugins = plugins.borrow_mut(); + plugins.invoke_plugin(game, id, || { + function + .call(system_data_ptr.offset()) + .map_err(anyhow::Error::from) + }) + }; + + let name = name_ptr + .array() + .get_utf8_string(cx.memory(), name_len) + .context("invalid system name pointer")?; + + cx.game_mut() + .system_executor + .try_borrow_mut()? + .add_system_with_name(system, &name); + Ok(()) +} + +#[allow(clippy::unnecessary_wraps)] +fn entity_exists(cx: &mut PluginContext, entity: u64) -> anyhow::Result { + let entity = Entity::from_bits(entity); + let result = cx.game_mut().ecs.entity(entity).is_ok(); + Ok(result as u32) +} + +fn entity_send_message( + cx: &mut PluginContext, + entity: u64, + message_ptr: WasmPtr, + message_len: u32, +) -> anyhow::Result<()> { + let message = message_ptr + .array() + .get_utf8_string(cx.memory(), message_len) + .context("invalid message")?; + let game = cx.game_mut(); + if let Ok(mut mailbox) = game.ecs.get_mut::(Entity::from_bits(entity)) { + mailbox.send_chat(message); + } + Ok(()) +} diff --git a/crates/plugin-host/src/host_calls/component.rs b/crates/plugin-host/src/host_calls/component.rs new file mode 100644 index 000000000..8c3d4b474 --- /dev/null +++ b/crates/plugin-host/src/host_calls/component.rs @@ -0,0 +1,83 @@ +use std::alloc::Layout; + +use anyhow::Context; +use feather_ecs::Entity; +use quill_common::{component::ComponentVisitor, entity::GetComponentResult, HostComponent}; +use wasmer::WasmPtr; + +use crate::context::PluginContext; + +struct GetComponentVisitor<'a> { + cx: &'a mut PluginContext, + entity: Entity, +} + +impl<'a> ComponentVisitor> for GetComponentVisitor<'a> { + fn visit(self) -> anyhow::Result { + let game = self.cx.game_mut(); + let component = match game.ecs.get::(self.entity) { + Ok(c) => c, + Err(_) => return Ok(0), // corresponds to `None` + }; + let bytes = component.to_cow_bytes(); + let buffer = self.cx.bump_allocate(Layout::array::(bytes.len())?)?; + self.cx.write_slice_to_memory(&bytes, buffer)?; + + Ok(GetComponentResult::new(buffer.offset(), bytes.len() as u32).to_bits()) + } +} + +pub fn entity_get_component( + cx: &mut PluginContext, + entity: u64, + component: u32, +) -> anyhow::Result { + let component = HostComponent::from_u32(component).context("invalid component")?; + let entity = Entity::from_bits(entity); + let visitor = GetComponentVisitor { cx, entity }; + component.visit(visitor) +} + +struct SetComponentVisitor<'a> { + cx: &'a mut PluginContext, + entity: Entity, + bytes_ptr: WasmPtr, + bytes_len: u32, +} + +impl<'a> ComponentVisitor> for SetComponentVisitor<'a> { + fn visit(self) -> anyhow::Result<()> { + let component = self + .cx + .read_component::(self.bytes_ptr, self.bytes_len)?; + let mut game = self.cx.game_mut(); + + let existing_component = game.ecs.get_mut::(self.entity); + if let Ok(mut existing_component) = existing_component { + *existing_component = component; + } else { + drop(existing_component); + let _ = game.ecs.insert(self.entity, component); + } + + Ok(()) + } +} + +pub fn entity_set_component( + cx: &mut PluginContext, + entity: u64, + component: u32, + bytes_ptr: WasmPtr, + bytes_len: u32, +) -> anyhow::Result<()> { + let entity = Entity::from_bits(entity); + let component = HostComponent::from_u32(component).context("invalid component")?; + let visitor = SetComponentVisitor { + cx, + entity, + bytes_ptr, + bytes_len, + }; + component.visit(visitor) +} diff --git a/crates/plugin-host/src/host_calls/entity_builder.rs b/crates/plugin-host/src/host_calls/entity_builder.rs new file mode 100644 index 000000000..24c1a4a3e --- /dev/null +++ b/crates/plugin-host/src/host_calls/entity_builder.rs @@ -0,0 +1,71 @@ +use anyhow::{bail, Context}; +use quill_common::{component::ComponentVisitor, HostComponent}; +use wasmer::WasmPtr; + +use crate::context::PluginContext; + +pub fn entity_builder_new( + cx: &mut PluginContext, + position: WasmPtr, + entity_init_ptr: WasmPtr, + entity_init_len: u32, +) -> anyhow::Result { + let position = cx.read_pod(position)?; + let init = cx.read_bincode(entity_init_ptr, entity_init_len)?; + let builder = cx.game_mut().create_entity_builder(position, init); + let id = cx.entity_builders.insert(builder); + + if id > u32::MAX as usize { + bail!("created too many entity builders"); + } + + Ok(id as u32) +} + +struct BuilderAddComponentVisitor<'a> { + builder: u32, + cx: &'a mut PluginContext, + bytes_ptr: WasmPtr, + bytes_len: u32, +} + +impl<'a> ComponentVisitor> for BuilderAddComponentVisitor<'a> { + fn visit(self) -> anyhow::Result<()> { + let component = self + .cx + .read_component::(self.bytes_ptr, self.bytes_len)?; + self.cx + .entity_builders + .get_mut(self.builder as usize) + .context("invalid entity builder")? + .add(component); + Ok(()) + } +} + +pub fn entity_builder_add_component( + cx: &mut PluginContext, + builder: u32, + component: u32, + bytes_ptr: WasmPtr, + bytes_len: u32, +) -> anyhow::Result<()> { + let component = HostComponent::from_u32(component).context("invalid component")?; + let visitor = BuilderAddComponentVisitor { + builder, + cx, + bytes_ptr, + bytes_len, + }; + component.visit(visitor) +} + +pub fn entity_builder_finish(cx: &mut PluginContext, builder: u32) -> anyhow::Result { + let builder = cx + .entity_builders + .remove(builder as usize) + .context("invalid entity builder")?; + + let entity = cx.game_mut().spawn_entity(builder); + Ok(entity.to_bits()) +} diff --git a/crates/plugin-host/src/host_calls/query.rs b/crates/plugin-host/src/host_calls/query.rs new file mode 100644 index 000000000..b51a1840c --- /dev/null +++ b/crates/plugin-host/src/host_calls/query.rs @@ -0,0 +1,153 @@ +//! Implements the `entity_query` host call. + +use std::{alloc::Layout, any::TypeId, mem::size_of}; + +use anyhow::Context; +use feather_ecs::{DynamicQuery, DynamicQueryTypes, Ecs}; +use quill_common::{ + component::{ComponentVisitor, SerializationMethod}, + entity::QueryData, + Component, EntityId, HostComponent, +}; +use wasmer::WasmPtr; + +use crate::{context::PluginContext, wasm_ptr_ext::WasmPtrExt}; + +pub fn entity_query( + cx: &mut PluginContext, + components_ptr: WasmPtr, + components_len: u32, +) -> anyhow::Result> { + let mut components = Vec::with_capacity(components_len as usize); + for i in 0..components_len { + let id = components_ptr + .add(i as usize * size_of::()) + .deref(cx.memory()) + .context("bad pointer")?; + let component = HostComponent::from_u32(id.get()).context("bad component type")?; + components.push(component); + } + + let game = cx.game_mut(); + let query_data = create_query_data(cx, &game.ecs, &components)?; + + let ptr = cx.insert_to_memory(query_data)?; + Ok(ptr) +} + +struct WrittenComponentData { + pointer: WasmPtr, + len: u32, +} + +/// `ComponentVisitor` implementation used to write +/// component data to plugin memory. +struct WriteComponentsVisitor<'a> { + query: &'a DynamicQuery<'a>, + cx: &'a PluginContext, + num_entities: usize, +} + +impl<'a> ComponentVisitor> for WriteComponentsVisitor<'a> { + fn visit(self) -> anyhow::Result { + let components = self.query.iter_component_slices(TypeId::of::()); + + // Write each component. + // We use a different strategy depending + // on how the component is serialized. + let (buffer, len) = match T::SERIALIZATION_METHOD { + SerializationMethod::Bytemuck => { + // Allocate enough memory to hold all the components. + let layout = Layout::array::(self.num_entities)?; + let buffer = self.cx.bump_allocate(layout)?; + + if size_of::() != 0 { + // Copy the components into the buffer. + let mut byte_index = 0; + for component_slice in components { + for component in component_slice.as_slice::() { + let bytes = component.as_bytes(); + self.cx + .write_slice_to_memory(bytes, buffer.add(byte_index))?; + byte_index += bytes.len(); + } + } + } + + (buffer, self.num_entities * size_of::()) + } + SerializationMethod::Bincode => { + // Memory will need to be allocated dynamically, + // but we can approximate a minimum capacity. + let mut bytes = Vec::with_capacity(self.num_entities * size_of::()); + let mut stride = None; + // Write components into the buffer. + for component_slice in components { + for component in component_slice.as_slice::() { + component.to_bytes(&mut bytes); + if stride.is_none() { + stride = Some(bytes.len()); + } + } + } + + let buffer = self.cx.bump_allocate(Layout::array::(bytes.len())?)?; + self.cx.write_slice_to_memory(&bytes, buffer)?; + (buffer, bytes.len()) + } + }; + + Ok(WrittenComponentData { + pointer: buffer, + len: len as u32, + }) + } +} + +fn create_query_data( + cx: &PluginContext, + ecs: &Ecs, + types: &[HostComponent], +) -> anyhow::Result { + let query_types: Vec = types.iter().copied().map(HostComponent::type_id).collect(); + let query = ecs.query_dynamic(DynamicQueryTypes::new(&query_types, &[])); + + let num_entities = query.iter_entities().count(); + if num_entities == 0 { + return Ok(QueryData { + num_entities: 0, + entities_ptr: 0, + component_ptrs: 0, + component_lens: 0, + }); + } + + let component_ptrs = cx.bump_allocate(Layout::array::(types.len())?)?; + let component_lens = cx.bump_allocate(Layout::array::(types.len())?)?; + for (i, &typ) in types.iter().enumerate() { + let data = typ.visit(WriteComponentsVisitor { + query: &query, + cx, + num_entities, + })?; + + cx.write_to_memory( + data.pointer.offset(), + component_ptrs.add(i * size_of::()), + )?; + cx.write_to_memory(data.len, component_lens.add(i * size_of::()))?; + } + + let entities_ptr = cx.bump_allocate(Layout::array::(num_entities)?)?; + for (i, entity) in query.iter_entities().enumerate() { + let bits = entity.to_bits(); + cx.write_to_memory(bits, entities_ptr.add(i * size_of::()))?; + } + + Ok(QueryData { + num_entities: num_entities as u32, + entities_ptr: entities_ptr.offset(), + component_ptrs: component_ptrs.offset(), + component_lens: component_lens.offset(), + }) +} diff --git a/crates/plugin-host/src/lib.rs b/crates/plugin-host/src/lib.rs new file mode 100644 index 000000000..128f29191 --- /dev/null +++ b/crates/plugin-host/src/lib.rs @@ -0,0 +1,224 @@ +//! Feather's implementation of the [Quill API](https://github.com/feather-rs/quill). +//! +//! Uses [`wasmer`](https://docs.rs/wasmer) to run WebAssembly plugins +//! in a sandbox. + +use std::{ + fs, + path::Path, + sync::atomic::{AtomicUsize, Ordering}, +}; + +use ahash::AHashMap; +use anyhow::Context; +use env::PluginEnv; +use feather_common::Game; +use quill_plugin_format::{PluginFile, PluginMetadata}; +use wasmer::{ + ChainableNamedResolver, CompilerConfig, ExportError, Features, Function, ImportObject, + Instance, Module, Store, JIT, +}; +use wasmer_wasi::{WasiEnv, WasiState, WasiVersion}; + +mod context; +mod env; +mod host_calls; +mod thread_pinned; +mod wasm_ptr_ext; + +/// Features enabled for WASM plugins +const WASM_FEATURES: Features = Features { + threads: true, + reference_types: false, + simd: true, + bulk_memory: true, + multi_value: false, + tail_call: false, + module_linking: false, + multi_memory: false, + memory64: false, +}; + +/// Unique ID of a plugin. +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +pub struct PluginId(usize); + +impl PluginId { + fn new() -> Self { + static NEXT: AtomicUsize = AtomicUsize::new(0); + let x = NEXT.fetch_add(1, Ordering::SeqCst); + Self(x) + } +} + +/// Resource storing all enabled plugins plus the WebAssembly VM. +pub struct PluginManager { + _engine: wasmer::JITEngine, + store: wasmer::Store, + + plugins: AHashMap, +} + +impl Default for PluginManager { + fn default() -> Self { + Self::new() + } +} + +impl PluginManager { + pub fn new() -> Self { + let compiler_config = compiler_config(); + let engine_config = JIT::new(compiler_config).features(WASM_FEATURES); + let engine = engine_config.engine(); + let store = Store::new(&engine); + + Self { + _engine: engine, + store, + plugins: AHashMap::new(), + } + } + + /// Loads all plugins found within the given directory. + pub fn load_plugin_directory( + &mut self, + game: &mut Game, + dir: impl AsRef, + ) -> anyhow::Result<()> { + let dir = dir.as_ref(); + if !dir.exists() { + return Ok(()); + } + + for entry in std::fs::read_dir(dir)? { + let entry = entry?; + if !entry.file_type()?.is_file() { + continue; + } + if entry.path().extension() != Some("plugin".as_ref()) { + continue; + } + + log::info!("Loading plugin from {}", entry.path().display()); + let plugin = fs::read(entry.path())?; + self.load_plugin(game, &plugin)?; + } + + Ok(()) + } + + /// Loads a plugin from its plugin file data. + pub fn load_plugin(&mut self, game: &mut Game, plugin: &[u8]) -> anyhow::Result { + let plugin = Plugin::new(&self.store, plugin)?; + let id = PluginId::new(); + plugin.env.context().set_plugin_id(id); + + let setup_function = plugin.setup_function()?.clone(); + + self.plugins.insert(id, plugin); + + // Call the setup function + self.invoke_plugin(game, id, || { + setup_function.call(&[]).map_err(From::from).map(|_| ()) + })?; + + let plugin = self.plugin(id).unwrap(); + log::info!( + "Enabled plugin {} version {}", + plugin.metadata().name, + plugin.metadata().version + ); + + Ok(id) + } + + pub fn plugin(&self, id: PluginId) -> Option<&Plugin> { + self.plugins.get(&id) + } + + pub fn plugin_mut(&mut self, id: PluginId) -> Option<&mut Plugin> { + self.plugins.get_mut(&id) + } + + /// Invokes a plugin method using the given closure. + /// + /// This method ensures that the plugin's context is initialized + /// with the `Game`. + pub fn invoke_plugin( + &mut self, + game: &mut Game, + plugin_id: PluginId, + invoke: impl FnOnce() -> anyhow::Result<()>, + ) -> anyhow::Result<()> { + let plugin = self.plugin_mut(plugin_id).context("missing plugin")?; + plugin.env.context().set_game(game); + invoke()?; + plugin.env.context().bump_reset()?; + Ok(()) + } +} + +/// A loaded plugin. +pub struct Plugin { + _module: Module, + instance: Instance, + env: PluginEnv, + metadata: PluginMetadata, +} + +impl Plugin { + /// Loads a plugin from its binary WASM module. + pub fn new(store: &Store, plugin: &[u8]) -> anyhow::Result { + let plugin_file = PluginFile::decode(plugin)?; + + let module = Module::new(store, plugin_file.wasm_bytecode())?; + let env = PluginEnv::new(); + + let quill_imports = host_calls::create_import_object(store, env.clone()); + let wasi_imports = create_wasi_imports(store, &plugin_file.metadata().identifier)?; + let imports = quill_imports.chain_back(wasi_imports); + + let instance = Instance::new(&module, &imports)?; + + Ok(Self { + _module: module, + instance, + env, + metadata: plugin_file.metadata().clone(), + }) + } + + pub fn metadata(&self) -> &PluginMetadata { + &self.metadata + } + + pub fn setup_function(&self) -> Result<&Function, ExportError> { + self.instance.exports.get_function("quill_setup") + } +} + +#[cfg(all(feature = "cranelift", not(feature = "llvm")))] +fn compiler_config() -> impl CompilerConfig { + use wasmer::{Cranelift, CraneliftOptLevel}; + let mut cfg = Cranelift::new(); + cfg.opt_level(CraneliftOptLevel::Speed).enable_simd(true); + cfg +} + +#[cfg(feature = "llvm")] +fn compiler_config() -> impl CompilerConfig { + use wasmer::{LLVMOptLevel, LLVM}; + let mut cfg = LLVM::new(); + cfg.opt_level(LLVMOptLevel::Aggressive); + cfg +} + +fn create_wasi_imports(store: &Store, plugin_id: &str) -> anyhow::Result { + let state = WasiState::new(plugin_id).build()?; + let env = WasiEnv::new(state); + Ok(wasmer_wasi::generate_import_object_from_env( + store, + env, + WasiVersion::Latest, + )) +} diff --git a/crates/plugin-host/src/thread_pinned.rs b/crates/plugin-host/src/thread_pinned.rs new file mode 100644 index 000000000..dccc72c47 --- /dev/null +++ b/crates/plugin-host/src/thread_pinned.rs @@ -0,0 +1,45 @@ +use std::{ + cell::{Ref, RefCell, RefMut}, + thread::{self, ThreadId}, +}; + +/// Wraps a [`RefCell`] but implements `Send` and `Sync`. +/// +/// The value can only be borrowed on the thread it was created +/// on; this is enforced at runtime. In other words, access to +/// the value is pinned to the main thread. +pub struct ThreadPinned { + cell: RefCell, + pinned_to: ThreadId, +} + +impl ThreadPinned { + pub fn new(value: T) -> Self { + Self { + cell: RefCell::new(value), + pinned_to: thread::current().id(), + } + } + + #[allow(unused)] + pub fn borrow(&self) -> Ref { + self.assert_thread(); + self.cell.borrow() + } + + pub fn borrow_mut(&self) -> RefMut { + self.assert_thread(); + self.cell.borrow_mut() + } + + fn assert_thread(&self) { + assert_eq!( + thread::current().id(), + self.pinned_to, + "can only borrow value on the main thread" + ); + } +} + +unsafe impl Send for ThreadPinned {} +unsafe impl Sync for ThreadPinned {} diff --git a/crates/plugin-host/src/wasm_ptr_ext.rs b/crates/plugin-host/src/wasm_ptr_ext.rs new file mode 100644 index 000000000..db0184d1c --- /dev/null +++ b/crates/plugin-host/src/wasm_ptr_ext.rs @@ -0,0 +1,29 @@ +use wasmer::{Array, WasmPtr}; + +pub trait WasmPtrExt { + fn add(self, offset: usize) -> Self; +} + +impl WasmPtrExt for WasmPtr +where + T: Copy, +{ + fn add(self, offset: usize) -> Self { + WasmPtr::new(self.offset() + offset as u32) + } +} + +pub trait WasmPtrIntoArray { + fn array(self) -> WasmPtr + where + T: Copy; +} + +impl WasmPtrIntoArray for WasmPtr +where + T: Copy, +{ + fn array(self) -> WasmPtr { + WasmPtr::new(self.offset()) + } +} diff --git a/crates/protocol/Cargo.toml b/crates/protocol/Cargo.toml new file mode 100644 index 000000000..cb2c17c52 --- /dev/null +++ b/crates/protocol/Cargo.toml @@ -0,0 +1,25 @@ +[package] +name = "feather-protocol" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" + +[dependencies] +base = { path = "../base", package = "feather-base" } + +anyhow = "1" +thiserror = "1" + +flate2 = "1" +cfb8 = "0.5" +aes = "0.5" +bytes = "0.5" + +serde = "1" +byteorder = "1" +uuid = "0.8" +hematite-nbt = { git = "https://github.com/PistonDevelopers/hematite_nbt" } +bytemuck = "1" +num-traits = "0.2" + +parking_lot = "0.11" # Arc> compat diff --git a/crates/protocol/src/codec.rs b/crates/protocol/src/codec.rs new file mode 100644 index 000000000..04ec23293 --- /dev/null +++ b/crates/protocol/src/codec.rs @@ -0,0 +1,132 @@ +use crate::{io::VarInt, ProtocolVersion, Readable, Writeable}; +use aes::Aes128; +use bytes::BytesMut; +use cfb8::{ + stream_cipher::{NewStreamCipher, StreamCipher}, + Cfb8, +}; +use std::io::Cursor; + +type AesCfb8 = Cfb8; +pub type CompressionThreshold = usize; + +/// An encryption key for use with AES-CFB8. +pub type CryptKey = [u8; 16]; + +/// State to serialize and deserialize packets from a byte stream. +#[derive(Default)] +pub struct MinecraftCodec { + /// If encryption is enabled, then this is the cryptor state. + cryptor: Option, + crypt_key: Option, + /// If compression is enabled, then this is the compression threshold. + compression: Option, + + /// A buffer of received bytes. + received_buf: BytesMut, + /// Auxilary buffer for use with compression. + staging_buf: Vec, +} + +impl MinecraftCodec { + pub fn new() -> Self { + Self::default() + } + + /// Enables encryption with the provided key. + pub fn enable_encryption(&mut self, key: CryptKey) { + // yes, Mojang uses the same nonce for each packet. don't ask me why. + self.cryptor = Some(AesCfb8::new_var(&key, &key).expect("key size is invalid")); + self.crypt_key = Some(key); + } + + /// Enables compression with the provided compression threshold. + pub fn enable_compression(&mut self, threshold: CompressionThreshold) { + self.compression = Some(threshold); + } + + /// Gets another `MinecraftCodec` with the same compression and encryption + /// parameters. + pub fn clone_with_settings(&self) -> MinecraftCodec { + MinecraftCodec { + cryptor: self + .crypt_key + .map(|key| AesCfb8::new_var(&key, &key).expect("key size is invalid")), + crypt_key: self.crypt_key, + compression: self.compression, + received_buf: BytesMut::new(), + staging_buf: Vec::new(), + } + } + + /// Writes a packet into the provided writer. + pub fn encode(&mut self, packet: &impl Writeable, output: &mut Vec) { + packet.write(&mut self.staging_buf, ProtocolVersion::V1_16_2); + + if let Some(threshold) = self.compression { + self.encode_compressed(output, threshold); + } else { + self.encode_uncompressed(output); + } + + if let Some(cryptor) = &mut self.cryptor { + cryptor.encrypt(output); + } + + self.staging_buf.clear(); + } + + fn encode_compressed(&mut self, _output: &mut Vec, _threshold: CompressionThreshold) { + todo!() + } + + fn encode_uncompressed(&mut self, output: &mut Vec) { + // TODO: we should probably be able to determine the length without writing the packet, + // which could remove an unnecessary copy. + let length = self.staging_buf.len() as i32; + VarInt(length).write(output, ProtocolVersion::V1_16_2); + output.extend_from_slice(&self.staging_buf); + } + + /// Accepts newly received bytes. + pub fn accept(&mut self, bytes: &[u8]) { + let start_index = self.received_buf.len(); + self.received_buf.extend(bytes); + + if let Some(cryptor) = &mut self.cryptor { + // Decrypt the new data (but not the whole received buffer, + // since old data was already decrypted) + cryptor.decrypt(&mut self.received_buf[start_index..]); + } + } + + /// Gets the next packet that was received, if any. + pub fn next_packet(&mut self) -> anyhow::Result> + where + T: Readable, + { + let mut cursor = Cursor::new(&self.received_buf[..]); + let packet = if let Ok(length) = VarInt::read(&mut cursor, ProtocolVersion::V1_16_2) { + let length_field_length = cursor.position() as usize; + + if self.received_buf.len() - length_field_length >= length.0 as usize { + cursor = Cursor::new( + &self.received_buf + [length_field_length..length_field_length + length.0 as usize], + ); + let packet = T::read(&mut cursor, ProtocolVersion::V1_16_2)?; + + let bytes_read = cursor.position() as usize + length_field_length; + self.received_buf = self.received_buf.split_off(bytes_read); + + Some(packet) + } else { + None + } + } else { + None + }; + + Ok(packet) + } +} diff --git a/crates/protocol/src/io.rs b/crates/protocol/src/io.rs new file mode 100644 index 000000000..6fc1c10d5 --- /dev/null +++ b/crates/protocol/src/io.rs @@ -0,0 +1,809 @@ +//! Traits for reading/writing Minecraft-encoded values. + +use crate::{ProtocolVersion, Slot}; +use anyhow::{anyhow, bail, Context}; +use base::{ + anvil::entity::ItemNbt, metadata::MetaEntry, BlockId, BlockPosition, Direction, EntityMetadata, + Gamemode, Item, ItemStack, +}; +use byteorder::{BigEndian, ReadBytesExt, WriteBytesExt}; +use num_traits::{FromPrimitive, ToPrimitive}; +use serde::{de::DeserializeOwned, Serialize}; +use std::{ + borrow::Cow, + collections::BTreeMap, + convert::{TryFrom, TryInto}, + io::{Cursor, Read}, + iter, + num::TryFromIntError, +}; +use thiserror::Error; +use uuid::Uuid; + +/// Trait implemented for types which can be read +/// from a buffer. +pub trait Readable { + /// Reads this type from the given buffer. + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized; +} + +/// Trait implemented for types which can be written +/// to a buffer. +pub trait Writeable: Sized { + /// Writes this value to the given buffer. + fn write(&self, buffer: &mut Vec, version: ProtocolVersion); +} + +impl<'a, T> Writeable for &'a T +where + T: Writeable, +{ + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + T::write(*self, buffer, version); + } +} + +/// Error when reading a value. +#[derive(Debug, Error)] +pub enum Error { + #[error("unexpected end of input: failed to read value of type `{0}`")] + UnexpectedEof(&'static str), +} + +macro_rules! integer_impl { + ($($int:ty, $read_fn:tt, $write_fn:tt),* $(,)?) => { + $( + impl Readable for $int { + fn read(buffer: &mut Cursor<&[u8]>, _version: ProtocolVersion) -> anyhow::Result { + buffer.$read_fn::().map_err(anyhow::Error::from) + } + } + + impl Writeable for $int { + fn write(&self, buffer: &mut Vec, _version: ProtocolVersion) { + buffer.$write_fn::(*self).unwrap(); + } + } + )* + } +} + +integer_impl! { + u16, read_u16, write_u16, + u32, read_u32, write_u32, + u64, read_u64, write_u64, + + i16, read_i16, write_i16, + i32, read_i32, write_i32, + i64, read_i64, write_i64, + + f32, read_f32, write_f32, + f64, read_f64, write_f64, +} + +impl Readable for u8 { + fn read(buffer: &mut Cursor<&[u8]>, _version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + buffer.read_u8().map_err(anyhow::Error::from) + } +} + +impl Writeable for u8 { + fn write(&self, buffer: &mut Vec, _version: ProtocolVersion) { + buffer.write_u8(*self).unwrap(); + } +} + +impl Readable for i8 { + fn read(buffer: &mut Cursor<&[u8]>, _version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + buffer.read_i8().map_err(anyhow::Error::from) + } +} + +impl Writeable for i8 { + fn write(&self, buffer: &mut Vec, _version: ProtocolVersion) { + buffer.write_i8(*self).unwrap() + } +} + +impl Readable for Option +where + T: Readable, +{ + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + // Assume boolean prefix. + let present = bool::read(buffer, version)?; + + if present { + Ok(Some(T::read(buffer, version)?)) + } else { + Ok(None) + } + } +} + +impl Writeable for Option +where + T: Writeable, +{ + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + let present = self.is_some(); + present.write(buffer, version); + + if let Some(value) = self { + value.write(buffer, version); + } + } +} + +/// A variable-length integer as defined by the Minecraft protocol. +#[derive(Copy, Clone, Debug, PartialEq, Eq)] +pub struct VarInt(pub i32); + +impl Readable for VarInt { + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let mut num_read = 0; + let mut result = 0; + + loop { + let read = u8::read(buffer, version)?; + let value = i32::from(read & 0b0111_1111); + result |= value.overflowing_shl(7 * num_read).0; + + num_read += 1; + + if num_read > 5 { + bail!( + "VarInt too long (max length: 5, value read so far: {})", + result + ); + } + if read & 0b1000_0000 == 0 { + break; + } + } + Ok(VarInt(result)) + } +} + +impl TryFrom for usize { + type Error = TryFromIntError; + fn try_from(value: VarInt) -> Result { + value.0.try_into() + } +} + +impl From for VarInt { + fn from(x: usize) -> Self { + VarInt(x as i32) + } +} + +impl From for i32 { + fn from(x: VarInt) -> Self { + x.0 + } +} + +impl From for VarInt { + fn from(x: i32) -> Self { + VarInt(x) + } +} + +impl Writeable for VarInt { + fn write(&self, buffer: &mut Vec, _version: ProtocolVersion) { + let mut x = self.0 as u32; + loop { + let mut temp = (x & 0b0111_1111) as u8; + x >>= 7; + if x != 0 { + temp |= 0b1000_0000; + } + + buffer.write_u8(temp).unwrap(); + + if x == 0 { + break; + } + } + } +} + +impl Readable for String { + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + // Length is encoded as VarInt. + // Following `length` bytes are the UTF8-encoded + // string. + + let length = VarInt::read(buffer, version) + .context("failed to read string length")? + .0 as usize; + + // TODO: support custom length limits + // Current max length is max value of a signed 16-bit int. + let max_length = std::i16::MAX as usize; + if length > max_length { + bail!( + "string length {} exceeds maximum allowed length of {}", + length, + max_length + ); + } + + // Read string into buffer. + let mut temp = vec![0u8; length]; + buffer + .read_exact(&mut temp) + .map_err(|_| Error::UnexpectedEof("String"))?; + let s = std::str::from_utf8(&temp).context("string contained invalid UTF8")?; + + Ok(s.to_owned()) + } +} + +impl Writeable for String { + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + VarInt(self.len() as i32).write(buffer, version); + buffer.extend_from_slice(self.as_bytes()); + } +} + +impl Readable for bool { + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let x = u8::read(buffer, version)?; + + if x == 0 { + Ok(false) + } else if x == 1 { + Ok(true) + } else { + Err(anyhow::anyhow!("invalid boolean tag {}", x)) + } + } +} + +impl Writeable for bool { + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + let x = if *self { 1u8 } else { 0 }; + x.write(buffer, version); + } +} + +pub const MAX_LENGTH: usize = 1024 * 1024; // 2^20 elements + +/// Reads and writes an array of inner `Writeable`s. +/// The array is prefixed with a `VarInt` length. +/// +/// This will reject arrays of lengths larger than MAX_LENGTH. +pub struct LengthPrefixedVec<'a, T>(pub Cow<'a, [T]>) +where + [T]: ToOwned>; + +impl<'a, T> Readable for LengthPrefixedVec<'a, T> +where + T: Readable, + [T]: ToOwned>, +{ + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let length: usize = VarInt::read(buffer, version)?.0.try_into()?; + + if length > MAX_LENGTH { + bail!("array length too large ({} > {})", length, MAX_LENGTH); + } + + let vec = iter::repeat_with(|| T::read(buffer, version)) + .take(length) + .collect::>>()?; + Ok(LengthPrefixedVec(Cow::Owned(vec))) + } +} + +impl<'a, T> Writeable for LengthPrefixedVec<'a, T> +where + T: Writeable, + [T]: ToOwned>, +{ + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + VarInt::from(self.0.len()).write(buffer, version); + + for element in &*self.0 { + element.write(buffer, version); + } + } +} + +impl<'a, T> From> for Vec +where + [T]: ToOwned>, +{ + fn from(x: LengthPrefixedVec<'a, T>) -> Self { + x.0.into_owned() + } +} + +impl<'a, T> From<&'a [T]> for LengthPrefixedVec<'a, T> +where + [T]: ToOwned>, +{ + fn from(slice: &'a [T]) -> Self { + LengthPrefixedVec(Cow::Borrowed(slice)) + } +} + +impl<'a, T> From> for LengthPrefixedVec<'a, T> +where + [T]: ToOwned>, +{ + fn from(vec: Vec) -> Self { + LengthPrefixedVec(Cow::Owned(vec)) + } +} + +/// A vector of bytes which consumes all remaining bytes in this packet. +/// This is used by the plugin messaging packets, for one. +pub struct LengthInferredVecU8<'a>(pub Cow<'a, [u8]>); + +impl<'a> Readable for LengthInferredVecU8<'a> { + fn read(buffer: &mut Cursor<&[u8]>, _version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let mut vec = Vec::new(); + buffer.read_to_end(&mut vec)?; + Ok(LengthInferredVecU8(Cow::Owned(vec))) + } +} + +impl<'a> Writeable for LengthInferredVecU8<'a> { + fn write(&self, buffer: &mut Vec, _version: ProtocolVersion) { + buffer.extend_from_slice(&*self.0); + } +} + +impl<'a> From<&'a [u8]> for LengthInferredVecU8<'a> { + fn from(slice: &'a [u8]) -> Self { + LengthInferredVecU8(Cow::Borrowed(slice)) + } +} + +impl<'a> From> for Vec { + fn from(x: LengthInferredVecU8<'a>) -> Self { + x.0.into_owned() + } +} + +pub struct ShortPrefixedVec<'a, T: ToOwned>(pub Cow<'a, [T]>) +where + [T]: ToOwned; + +impl<'a, T> Readable for ShortPrefixedVec<'a, T> +where + T: Readable + Clone, + [T]: ToOwned>, +{ + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let length = u16::read(buffer, version)? as usize; + let mut vec = Vec::with_capacity(length); + + for _ in 0..length { + vec.push(T::read(buffer, version)?); + } + + Ok(Self(Cow::Owned(vec))) + } +} + +impl<'a, T> Writeable for ShortPrefixedVec<'a, T> +where + T: Writeable + Clone, + [T]: ToOwned>, +{ + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + (self.0.len() as u16).write(buffer, version); + self.0.iter().for_each(|item| item.write(buffer, version)); + } +} + +impl<'a, T> From> for Vec +where + [T]: ToOwned>, + T: Clone, +{ + fn from(x: ShortPrefixedVec<'a, T>) -> Self { + x.0.into_owned() + } +} + +impl<'a, T> From<&'a [T]> for ShortPrefixedVec<'a, T> +where + [T]: ToOwned>, + T: Clone, +{ + fn from(slice: &'a [T]) -> Self { + ShortPrefixedVec(Cow::Borrowed(slice)) + } +} + +impl<'a, T> From> for ShortPrefixedVec<'a, T> +where + [T]: ToOwned>, + T: Clone, +{ + fn from(vec: Vec) -> Self { + ShortPrefixedVec(Cow::Owned(vec)) + } +} + +/// Wrapper over an arbitrary type that implements `Deserialize` and `Serialize`. +/// +/// The value will be written to a packet as NBT data. +#[derive(Debug, Clone)] +pub struct Nbt(pub T); + +impl Readable for Nbt +where + T: DeserializeOwned, +{ + fn read(buffer: &mut Cursor<&[u8]>, _version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + nbt::from_reader(buffer) + .map_err(anyhow::Error::from) + .map(Nbt) + } +} + +impl Writeable for Nbt +where + T: Serialize, +{ + fn write(&self, buffer: &mut Vec, _version: ProtocolVersion) { + nbt::to_writer(buffer, &self.0, None).unwrap_or_else(|e| { + panic!( + "could not serialize struct of type '{}' to NBT: {}", + std::any::type_name::(), + e + ) + }); + } +} + +impl From for Nbt { + fn from(t: T) -> Self { + Nbt(t) + } +} + +impl Readable for Slot { + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let present = bool::read(buffer, version)?; + + if present { + let item_id = VarInt::read(buffer, version)?.0; + let count = u8::read(buffer, version)? as u32; + + // Read NBT, but make sure to reset the buffer position if it's missing. + let position = buffer.position(); + let tags: Option = Nbt::read(buffer, version).ok().map(|nbt| nbt.0); + if tags.is_none() { + buffer.set_position(position + 1); // account for TAG_End, which is 1 byte + } + + let item = Item::from_id(item_id.try_into()?) + .ok_or_else(|| anyhow!("unknown item ID {}", item_id))?; + + Ok(Some(ItemStack { + item, + count, + damage: tags.map(|t| t.damage).flatten().map(|d| d as u32), + })) + } else { + Ok(None) + } + } +} + +impl Writeable for Slot { + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + self.is_some().write(buffer, version); + + if let Some(stack) = self { + VarInt(stack.item.id() as i32).write(buffer, version); + (stack.count as u8).write(buffer, version); + + let tags: ItemNbt = stack.into(); + if tags != ItemNbt::default() { + dbg!(); + Nbt(tags).write(buffer, version); + } else { + 0u8.write(buffer, version); // TAG_End + } + } + } +} + +impl Readable for EntityMetadata { + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let mut values = BTreeMap::new(); + + loop { + let index = u8::read(buffer, version)?; + + if index == 0xFF { + break; + } + + let entry = read_meta_entry(buffer, version)?; + values.insert(index, entry); + } + + Ok(EntityMetadata { values }) + } +} + +fn read_meta_entry( + buffer: &mut Cursor<&[u8]>, + version: ProtocolVersion, +) -> anyhow::Result { + let id = VarInt::read(buffer, version)?.0; + + Ok(match id { + 0 => MetaEntry::Byte(i8::read(buffer, version)?), + 1 => MetaEntry::VarInt(VarInt::read(buffer, version)?.0), + 2 => MetaEntry::Float(f32::read(buffer, version)?), + 3 => MetaEntry::String(String::read(buffer, version)?), + 4 => MetaEntry::Chat(String::read(buffer, version)?), + 5 => MetaEntry::OptChat(if bool::read(buffer, version)? { + Some(String::read(buffer, version)?) + } else { + None + }), + 6 => MetaEntry::Slot(Slot::read(buffer, version)?), + 7 => MetaEntry::Boolean(bool::read(buffer, version)?), + 8 => MetaEntry::Rotation( + f32::read(buffer, version)?, + f32::read(buffer, version)?, + f32::read(buffer, version)?, + ), + 9 => MetaEntry::Position(BlockPosition::read(buffer, version)?), + 10 => MetaEntry::OptPosition(if bool::read(buffer, version)? { + Some(BlockPosition::read(buffer, version)?) + } else { + None + }), + 11 => MetaEntry::Direction( + Direction::from_i32(VarInt::read(buffer, version)?.0) + .ok_or_else(|| anyhow!("invalid direction ID"))?, + ), + 12 => MetaEntry::OptUuid(if bool::read(buffer, version)? { + Some(Uuid::read(buffer, version)?) + } else { + None + }), + 13 => MetaEntry::OptBlockId(if bool::read(buffer, version)? { + Some(VarInt::read(buffer, version)?.0) + } else { + None + }), + 14 => MetaEntry::Nbt(Nbt::read(buffer, version)?.0), + x => bail!("invalid entity metadata entry ID {}", x), + }) +} + +impl Writeable for EntityMetadata { + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + for (index, entry) in self.iter() { + index.write(buffer, version); + VarInt(entry.id()).write(buffer, version); + write_meta_entry(entry, buffer, version); + } + + // End of metadata + buffer.push(0xFF); + } +} + +fn write_meta_entry(entry: &MetaEntry, buffer: &mut Vec, version: ProtocolVersion) { + match entry { + MetaEntry::Byte(x) => x.write(buffer, version), + MetaEntry::VarInt(x) => { + VarInt(*x).write(buffer, version); + } + MetaEntry::Float(x) => x.write(buffer, version), + MetaEntry::String(x) => x.write(buffer, version), + MetaEntry::Chat(x) => x.write(buffer, version), + MetaEntry::OptChat(ox) => { + if let Some(x) = ox { + true.write(buffer, version); + x.write(buffer, version); + } else { + false.write(buffer, version); + } + } + MetaEntry::Slot(slot) => slot.write(buffer, version), + MetaEntry::Boolean(x) => x.write(buffer, version), + MetaEntry::Rotation(x, y, z) => { + x.write(buffer, version); + y.write(buffer, version); + z.write(buffer, version); + } + MetaEntry::Position(x) => x.write(buffer, version), + MetaEntry::OptPosition(ox) => { + if let Some(x) = ox { + true.write(buffer, version); + x.write(buffer, version); + } else { + false.write(buffer, version); + } + } + MetaEntry::Direction(x) => VarInt(x.to_i32().unwrap()).write(buffer, version), + MetaEntry::OptUuid(ox) => { + if let Some(x) = ox { + true.write(buffer, version); + x.write(buffer, version); + } else { + false.write(buffer, version); + } + } + MetaEntry::OptBlockId(ox) => { + if let Some(x) = ox { + VarInt(*x).write(buffer, version); + } else { + VarInt(0).write(buffer, version); // No value implies air + } + } + MetaEntry::Nbt(val) => Nbt(val).write(buffer, version), + MetaEntry::Particle => unimplemented!("entity metadata with particles"), + } +} + +impl Readable for Uuid { + fn read(buffer: &mut Cursor<&[u8]>, _version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let mut bytes = uuid::Bytes::default(); + buffer.read_exact(&mut bytes)?; + + Ok(Uuid::from_bytes(bytes)) + } +} + +impl Writeable for Uuid { + fn write(&self, buffer: &mut Vec, _version: ProtocolVersion) { + buffer.extend_from_slice(self.as_bytes()); + } +} + +impl Readable for BlockPosition { + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let val = i64::read(buffer, version)?; + + let x = (val >> 38) as i32; + let y = (val & 0xFFF) as i32; + let z = (val << 26 >> 38) as i32; + + Ok(BlockPosition { x, y, z }) + } +} + +impl Writeable for BlockPosition { + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + let val = ((self.x as u64 & 0x3FFFFFF) << 38) + | ((self.z as u64 & 0x3FFFFFF) << 12) + | (self.y as u64 & 0xFFF); + val.write(buffer, version); + } +} + +/// An angle written in stops, where each stop +/// is 1/256th of a full turn. +/// +/// This type converts degrees to stops. +#[derive(Copy, Clone, Debug)] +pub struct Angle(pub f32); + +impl From for f32 { + fn from(angle: Angle) -> Self { + angle.0 + } +} + +impl Readable for Angle { + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let val = u8::read(buffer, version)?; + Ok(Angle((val as f32 / 256.0) * 360.0)) + } +} + +impl Writeable for Angle { + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + let val = (self.0 / 360.0 * 256.0).round() as u8; + val.write(buffer, version); + } +} + +impl Readable for BlockId { + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let id = VarInt::read(buffer, version)?.0; + + let block = BlockId::from_vanilla_id(id.try_into()?); + Ok(block) + } +} + +impl Writeable for BlockId { + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + VarInt(self.vanilla_id().into()).write(buffer, version); + } +} + +impl Readable for Gamemode { + fn read(buffer: &mut Cursor<&[u8]>, version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + let id = u8::read(buffer, version)?; + Ok(match id { + 0 => Gamemode::Survival, + 1 => Gamemode::Creative, + 2 => Gamemode::Adventure, + 3 => Gamemode::Spectator, + id => bail!("invalid gamemode ID {}", id), + }) + } +} + +impl Writeable for Gamemode { + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + let id = match self { + Gamemode::Survival => 0, + Gamemode::Creative => 1, + Gamemode::Adventure => 2, + Gamemode::Spectator => 3, + }; + (id as u8).write(buffer, version); + } +} diff --git a/crates/protocol/src/lib.rs b/crates/protocol/src/lib.rs new file mode 100644 index 000000000..0c5bd2688 --- /dev/null +++ b/crates/protocol/src/lib.rs @@ -0,0 +1,210 @@ +use anyhow::anyhow; +use base::ItemStack; + +pub mod codec; +mod io; +pub mod packets; + +#[doc(inline)] +pub use codec::MinecraftCodec; +pub use io::Nbt; +pub use io::{Readable, Writeable}; +#[doc(inline)] +pub use packets::{ + client::{ClientHandshakePacket, ClientLoginPacket, ClientPlayPacket, ClientStatusPacket}, + server::{ServerLoginPacket, ServerPlayPacket, ServerStatusPacket}, + VariantOf, +}; + +pub type Slot = Option; + +/// A protocol version. +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)] +pub enum ProtocolVersion { + V1_16_2, +} + +/// A protocol state. +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +pub enum ProtocolState { + Handshake, + Status, + Login, + Play, +} + +/// Reads an arbitrary packet sent by a client based on a dynamically-updated +/// protocol state. As opposed to `MinecraftCodec`, this struct does not type-encode +/// the current protocol state using generics. +/// +/// This is a wrapper around a `MinecraftCodec` but more useful in certain sitations +/// (e.g. when writing a proxy.) +pub struct ClientPacketCodec { + state: ProtocolState, + codec: MinecraftCodec, +} + +impl Default for ClientPacketCodec { + fn default() -> Self { + Self::new() + } +} + +impl ClientPacketCodec { + pub fn new() -> Self { + Self { + state: ProtocolState::Handshake, + codec: MinecraftCodec::new(), + } + } + + pub fn set_state(&mut self, state: ProtocolState) { + self.state = state + } + + /// Decodes a `ClientPacket` using the provided data. + pub fn decode(&mut self, data: &[u8]) -> anyhow::Result> { + self.codec.accept(data); + match self.state { + ProtocolState::Handshake => self + .codec + .next_packet::() + .map(|opt| opt.map(ClientPacket::from)), + ProtocolState::Status => self + .codec + .next_packet::() + .map(|opt| opt.map(ClientPacket::from)), + ProtocolState::Login => self + .codec + .next_packet::() + .map(|opt| opt.map(ClientPacket::from)), + ProtocolState::Play => self + .codec + .next_packet::() + .map(|opt| opt.map(ClientPacket::from)), + } + } + + /// Encodes a `ClientPacket` into a buffer. + pub fn encode(&mut self, packet: &ClientPacket, buffer: &mut Vec) { + match packet { + ClientPacket::Handshake(packet) => self.codec.encode(packet, buffer), + ClientPacket::Status(packet) => self.codec.encode(packet, buffer), + ClientPacket::Login(packet) => self.codec.encode(packet, buffer), + ClientPacket::Play(packet) => self.codec.encode(packet, buffer), + } + } +} + +/// Similar to `ClientPacketCodec` but for server-sent packets. +pub struct ServerPacketCodec { + state: ProtocolState, + codec: MinecraftCodec, +} + +impl Default for ServerPacketCodec { + fn default() -> Self { + Self::new() + } +} + +impl ServerPacketCodec { + pub fn new() -> Self { + Self { + state: ProtocolState::Handshake, + codec: MinecraftCodec::new(), + } + } + + pub fn set_state(&mut self, state: ProtocolState) { + self.state = state + } + + /// Decodes a `ServerPacket` using the provided data. + pub fn decode(&mut self, data: &[u8]) -> anyhow::Result> { + self.codec.accept(data); + match self.state { + ProtocolState::Handshake => Err(anyhow!("server sent data during handshake state")), + ProtocolState::Status => self + .codec + .next_packet::() + .map(|opt| opt.map(ServerPacket::from)), + ProtocolState::Login => self + .codec + .next_packet::() + .map(|opt| opt.map(ServerPacket::from)), + ProtocolState::Play => self + .codec + .next_packet::() + .map(|opt| opt.map(ServerPacket::from)), + } + } + + /// Encodes a `ServerPacket` into a buffer. + pub fn encode(&mut self, packet: &ServerPacket, buffer: &mut Vec) { + match packet { + ServerPacket::Status(packet) => self.codec.encode(packet, buffer), + ServerPacket::Login(packet) => self.codec.encode(packet, buffer), + ServerPacket::Play(packet) => self.codec.encode(packet, buffer), + } + } +} + +/// A packet sent by the client from any one of the packet stages. +#[derive(Debug, Clone)] +pub enum ClientPacket { + Handshake(ClientHandshakePacket), + Status(ClientStatusPacket), + Login(ClientLoginPacket), + Play(ClientPlayPacket), +} + +impl From for ClientPacket { + fn from(packet: ClientHandshakePacket) -> Self { + ClientPacket::Handshake(packet) + } +} + +impl From for ClientPacket { + fn from(packet: ClientStatusPacket) -> Self { + ClientPacket::Status(packet) + } +} + +impl From for ClientPacket { + fn from(packet: ClientLoginPacket) -> Self { + ClientPacket::Login(packet) + } +} + +impl From for ClientPacket { + fn from(packet: ClientPlayPacket) -> Self { + ClientPacket::Play(packet) + } +} + +/// A packet sent by the server from any one of the packet stages. +#[derive(Debug, Clone)] +pub enum ServerPacket { + Status(ServerStatusPacket), + Login(ServerLoginPacket), + Play(ServerPlayPacket), +} + +impl From for ServerPacket { + fn from(packet: ServerStatusPacket) -> Self { + ServerPacket::Status(packet) + } +} + +impl From for ServerPacket { + fn from(packet: ServerLoginPacket) -> Self { + ServerPacket::Login(packet) + } +} + +impl From for ServerPacket { + fn from(packet: ServerPlayPacket) -> Self { + ServerPacket::Play(packet) + } +} diff --git a/crates/protocol/src/packets.rs b/crates/protocol/src/packets.rs new file mode 100644 index 000000000..ce58b46c7 --- /dev/null +++ b/crates/protocol/src/packets.rs @@ -0,0 +1,291 @@ +macro_rules! user_type { + (VarInt) => { + i32 + }; + (LengthPrefixedVec <$inner:ident>) => { + Vec<$inner> + }; + (ShortPrefixedVec <$inner:ident>) => { + Vec<$inner> + }; + (LengthInferredVecU8) => { + Vec + }; + (Angle) => { + f32 + }; + ($typ:ty) => { + $typ + }; +} + +macro_rules! user_type_convert_to_writeable { + (VarInt, $e:expr) => { + VarInt(*$e as i32) + }; + (LengthPrefixedVec <$inner:ident>, $e:expr) => { + LengthPrefixedVec::from($e.as_slice()) + }; + (ShortPrefixedVec <$inner:ident>, $e:expr) => { + ShortPrefixedVec::from($e.as_slice()) + }; + (LengthInferredVecU8, $e:expr) => { + LengthInferredVecU8::from($e.as_slice()) + }; + (Angle, $e:expr) => { + Angle(*$e) + }; + ($typ:ty, $e:expr) => { + $e + }; +} + +macro_rules! packets { + ( + $( + $packet:ident { + $( + $field:ident $typ:ident $(<$generics:ident>)? + );* $(;)? + } $(,)? + )* + ) => { + $( + #[derive(Debug, Clone)] + pub struct $packet { + $( + pub $field: user_type!($typ $(<$generics>)?), + )* + } + + #[allow(unused_imports, unused_variables)] + impl crate::Readable for $packet { + fn read(buffer: &mut ::std::io::Cursor<&[u8]>, version: crate::ProtocolVersion) -> anyhow::Result + where + Self: Sized + { + use anyhow::Context as _; + $( + let $field = <$typ $(<$generics>)?>::read(buffer, version) + .context(concat!("failed to read field `", stringify!($field), "` of packet `", stringify!($packet), "`"))? + .into(); + )* + + Ok(Self { + $( + $field, + )* + }) + } + } + + #[allow(unused_variables)] + impl crate::Writeable for $packet { + fn write(&self, buffer: &mut Vec, version: crate::ProtocolVersion) { + $( + user_type_convert_to_writeable!($typ $(<$generics>)?, &self.$field).write(buffer, version); + )* + } + } + )* + }; +} + +macro_rules! discriminant_to_literal { + (String, $discriminant:expr) => { + &*$discriminant + }; + ($discriminant_type:ident, $discriminant:expr) => { + $discriminant.into() + }; +} + +macro_rules! def_enum { + ( + $ident:ident ($discriminant_type:ident) { + $( + $discriminant:literal = $variant:ident + $( + { + $( + $field:ident $typ:ident $(<$generics:ident>)? + );* $(;)? + } + )? + ),* $(,)? + } + ) => { + #[derive(Debug, Clone)] + pub enum $ident { + $( + $variant + $( + { + $( + $field: user_type!($typ $(<$generics>)?), + )* + } + )?, + )* + } + + impl crate::Readable for $ident { + fn read(buffer: &mut ::std::io::Cursor<&[u8]>, version: crate::ProtocolVersion) -> anyhow::Result + where + Self: Sized + { + use anyhow::Context as _; + let discriminant = <$discriminant_type>::read(buffer, version) + .context(concat!("failed to read discriminant for enum type ", stringify!($ident)))?; + + match discriminant_to_literal!($discriminant_type, discriminant) { + $( + $discriminant => { + $( + $( + let $field = <$typ $(<$generics>)?>::read(buffer, version) + .context(concat!("failed to read field `", stringify!($field), + "` of enum `", stringify!($ident), "::", stringify!($variant), "`"))? + .into(); + )* + )? + + Ok($ident::$variant $( + { + $( + $field, + )* + } + )?) + }, + )* + _ => Err(anyhow::anyhow!( + concat!( + "no discriminant for enum `", stringify!($ident), "` matched value {:?}" + ), discriminant + )) + } + } + } + + impl crate::Writeable for $ident { + fn write(&self, buffer: &mut Vec, version: crate::ProtocolVersion) { + match self { + $( + $ident::$variant $( + { + $($field,)* + } + )? => { + let discriminant = <$discriminant_type>::from($discriminant); + discriminant.write(buffer, version); + + $( + $( + user_type_convert_to_writeable!($typ $(<$generics>)?, $field).write(buffer, version); + )* + )? + } + )* + } + } + } + }; +} + +macro_rules! packet_enum { + ( + $ident:ident { + $($id:literal = $packet:ident),* $(,)? + } + ) => { + #[derive(Debug, Clone)] + pub enum $ident { + $( + $packet($packet), + )* + } + + impl $ident { + /// Returns the packet ID of this packet. + pub fn id(&self) -> u32 { + match self { + $( + $ident::$packet(_) => $id, + )* + } + } + } + + impl crate::Readable for $ident { + fn read(buffer: &mut ::std::io::Cursor<&[u8]>, version: crate::ProtocolVersion) -> anyhow::Result + where + Self: Sized + { + let packet_id = VarInt::read(buffer, version)?.0; + match packet_id { + $( + id if id == $id => Ok($ident::$packet($packet::read(buffer, version)?)), + )* + _ => Err(anyhow::anyhow!("unknown packet ID {}", packet_id)), + } + } + } + + impl crate::Writeable for $ident { + fn write(&self, buffer: &mut Vec, version: crate::ProtocolVersion) { + VarInt(self.id() as i32).write(buffer, version); + match self { + $( + $ident::$packet(packet) => { + packet.write(buffer, version); + } + )* + } + } + } + + $( + impl VariantOf<$ident> for $packet { + fn discriminant_id() -> u32 { $id } + + #[allow(unreachable_patterns)] + fn destructure(e: $ident) -> Option { + match e { + $ident::$packet(p) => Some(p), + _ => None, + } + } + } + + impl From<$packet> for $ident { + fn from(packet: $packet) -> Self { + $ident::$packet(packet) + } + } + )* + } +} + +/// Trait implemented for packets which can be converted from a packet +/// enum. For example, `SpawnEntity` implements `VariantOf`. +pub trait VariantOf { + /// Returns the unique ID used to determine whether + /// an enum variant matches this variant. + fn discriminant_id() -> u32; + + /// Attempts to destructure the `Enum` into this type. + /// Returns `None` if `enum` is not the correct variant. + fn destructure(e: Enum) -> Option + where + Self: Sized; +} + +use crate::io::{Angle, LengthInferredVecU8, LengthPrefixedVec, Nbt, ShortPrefixedVec, VarInt}; +use crate::Slot; +use base::{BlockId, BlockPosition}; +use nbt::Blob; +use uuid::Uuid; + +pub mod client; +pub mod server; diff --git a/crates/protocol/src/packets/client.rs b/crates/protocol/src/packets/client.rs new file mode 100644 index 000000000..3708c12a4 --- /dev/null +++ b/crates/protocol/src/packets/client.rs @@ -0,0 +1,79 @@ +//! Packets sent from client to server. + +use super::*; + +mod handshake; +mod login; +mod play; +mod status; + +pub use handshake::*; +pub use login::*; +pub use play::*; +pub use status::*; + +packet_enum!(ClientHandshakePacket { + 0x00 = Handshake, +}); + +packet_enum!(ClientStatusPacket { + 0x00 = Request, + 0x01 = Ping, +}); + +packet_enum!(ClientLoginPacket { + 0x00 = LoginStart, + 0x01 = EncryptionResponse, + 0x02 = LoginPluginResponse, +}); + +packet_enum!(ClientPlayPacket { + 0x00 = TeleportConfirm, + 0x01 = QueryBlockNbt, + 0x02 = SetDifficulty, + 0x03 = ChatMessage, + 0x04 = ClientStatus, + 0x05 = ClientSettings, + 0x06 = TabComplete, + 0x07 = WindowConfirmation, + 0x08 = ClickWindowButton, + 0x09 = ClickWindow, + 0x0A = CloseWindow, + 0x0B = PluginMessage, + 0x0C = EditBook, + 0x0D = QueryEntityNbt, + 0x0E = InteractEntity, + 0x0F = GenerateStructure, + 0x10 = KeepAlive, + 0x11 = LockDifficulty, + 0x12 = PlayerPosition, + 0x13 = PlayerPositionAndRotation, + 0x14 = PlayerRotation, + 0x15 = PlayerMovement, + 0x16 = VehicleMove, + 0x17 = SteerBoat, + 0x18 = PickItem, + 0x19 = CraftRecipeRequest, + 0x1A = PlayerAbilities, + 0x1B = PlayerDigging, + 0x1C = EntityAction, + 0x1D = SteerVehicle, + 0x1E = SetDisplayedRecipe, + 0x1F = SetRecipeBookState, + 0x20 = NameItem, + 0x21 = ResourcePackStatus, + 0x22 = AdvancementTab, + 0x23 = SelectTrade, + 0x24 = SetBeaconEffect, + 0x25 = HeldItemChange, + 0x26 = UpdateCommandBlock, + 0x27 = UpdateCommandBlockMinecart, + 0x28 = CreativeInventoryAction, + 0x29 = UpdateJigsawBlock, + 0x2A = UpdateStructureBlock, + 0x2B = UpdateSign, + 0x2C = Animation, + 0x2D = Spectate, + 0x2E = PlayerBlockPlacement, + 0x2F = UseItem, +}); diff --git a/crates/protocol/src/packets/client/handshake.rs b/crates/protocol/src/packets/client/handshake.rs new file mode 100644 index 000000000..70fa2ec51 --- /dev/null +++ b/crates/protocol/src/packets/client/handshake.rs @@ -0,0 +1,17 @@ +use super::*; + +def_enum! { + HandshakeState (VarInt) { + 1 = Status, + 2 = Login, + } +} + +packets! { + Handshake { + protocol_version VarInt; + server_address String; + server_port u16; + next_state HandshakeState; + } +} diff --git a/crates/protocol/src/packets/client/login.rs b/crates/protocol/src/packets/client/login.rs new file mode 100644 index 000000000..dd4b905c2 --- /dev/null +++ b/crates/protocol/src/packets/client/login.rs @@ -0,0 +1,18 @@ +use super::*; + +packets! { + LoginStart { + name String; + } + + EncryptionResponse { + shared_secret LengthPrefixedVec; + verify_token LengthPrefixedVec; + } + + LoginPluginResponse { + message_id VarInt; + successful bool; + data LengthInferredVecU8; + } +} diff --git a/crates/protocol/src/packets/client/play.rs b/crates/protocol/src/packets/client/play.rs new file mode 100644 index 000000000..e9de7a179 --- /dev/null +++ b/crates/protocol/src/packets/client/play.rs @@ -0,0 +1,343 @@ +use super::*; +use crate::packets::server::Hand; + +packets! { + TeleportConfirm { + teleport_id VarInt; + } + + QueryBlockNbt { + transaction_id VarInt; + position BlockPosition; + } + + QueryEntityNbt { + transaction_id VarInt; + entity_id VarInt; + } + + SetDifficulty { + new_difficulty u8; + } + + ChatMessage { + message String; + } +} + +def_enum! { + ClientStatus (VarInt) { + 0 = PerformRespawn, + 1 = RequestStats, + } +} + +packets! { + ClientSettings { + locale String; + view_distance u8; + chat_mode ChatMode; + chat_colors bool; + displayed_skin_parts u8; + main_hand VarInt; + } +} + +def_enum! { + ChatMode (VarInt) { + 0 = Enabled, + 1 = CommandsOnly, + 2 = Hidden, + } +} + +packets! { + TabComplete { + transaction_id VarInt; + text String; + } + + WindowConfirmation { + window_id u8; + action_number u16; + accepted bool; + } + + ClickWindowButton { + window_id u8; + button_id u8; + } + + ClickWindow { + window_id u8; + slot i16; + button i8; + action_number u16; + mode VarInt; + clicked_item Slot; + } + + CloseWindow { + window_id u8; + } + + PluginMessage { + channel String; + data LengthInferredVecU8; + } + + EditBook { + new_book Slot; + is_signing bool; + hand VarInt; + } + + InteractEntity { + entity_id VarInt; + kind InteractEntityKind; + sneaking bool; + } +} + +def_enum! { + InteractEntityKind (VarInt) { + 0 = Interact, + 1 = Attack, + 2 = InteractAt { + target_x f64; + target_y f64; + target_z f64; + hand VarInt; + }, + } +} + +packets! { + GenerateStructure { + position BlockPosition; + levels VarInt; + keep_jigsaws bool; + } + + KeepAlive { + id u64; + } + + LockDifficulty { + locked bool; + } + + PlayerPosition { + x f64; + feet_y f64; + z f64; + on_ground bool; + } + + PlayerPositionAndRotation { + x f64; + feet_y f64; + z f64; + yaw f32; + pitch f32; + on_ground bool; + } + + PlayerRotation { + yaw f32; + pitch f32; + on_ground bool; + } + + PlayerMovement { + on_ground bool; + } + + VehicleMove { + x f64; + y f64; + z f64; + yaw f32; + pitch f32; + } + + SteerBoat { + left_paddle_turning bool; + right_paddle_turning bool; + } + + PickItem { + slot VarInt; + } + + CraftRecipeRequest { + window_id u8; + recipe String; + make_all bool; + } + + PlayerAbilities { + flags u8; + } + + SetDisplayedRecipe { + recipe_id String; + } + + SetRecipeBookState { + book_id VarInt; + book_open bool; + filter_active bool; + } + + PlayerDigging { + status PlayerDiggingStatus; + position BlockPosition; + face u8; + } +} + +def_enum! { + PlayerDiggingStatus (VarInt) { + 0 = StartDigging, + 1 = CancelDigging, + 2 = FinishDigging, + 3 = DropItemStack, + 4 = DropItem, + 5 = ShootArrow, + 6 = SwapItemInHand, + } +} + +packets! { + EntityAction { + entity_id VarInt; + action_id EntityActionKind; + jump_boost VarInt; + } +} + +def_enum! { + EntityActionKind (VarInt) { + 0 = StartSneaking, + 1 = StopSneaking, + 2 = LeaveBed, + 3 = StartSprinting, + 4 = StopSprinting, + 5 = StartHorseJump, + 6 = StopJorseJump, + 7 = OpenHorseInventory, + 8 = StartElytraFlight, + } +} + +packets! { + SteerVehicle { + sideways f32; + forward f32; + flags u8; + } +} + +packets! { + NameItem { + name String; + } + + ResourcePackStatus { + result VarInt; + } + + AdvancementTab { + tab_id Option; + } + + SelectTrade { + selected_slot VarInt; + } + + SetBeaconEffect { + primary_effect VarInt; + secondary_effect VarInt; + } + + HeldItemChange { + slot u16; + } + + UpdateCommandBlock { + position BlockPosition; + command String; + mode VarInt; + flags u8; + } + + UpdateCommandBlockMinecart { + entity_id VarInt; + command String; + track_output bool; + } + + CreativeInventoryAction { + slot i16; + clicked_item Slot; + } + + UpdateJigsawBlock { + position BlockPosition; + name String; + target String; + pool String; + final_state String; + joint_type String; + } + + UpdateStructureBlock { + position BlockPosition; + action VarInt; + mode VarInt; + name String; + offset_x i8; + offset_y i8; + offset_z i8; + size_x i8; + size_y i8; + size_z i8; + mirror VarInt; + rotation VarInt; + metadata String; + integrity f32; + seed u64; + flags u8; + } + + UpdateSign { + position BlockPosition; + line_1 String; + line_2 String; + line_3 String; + line_4 String; + } + + Animation { + hand Hand; + } + + Spectate { + target_player Uuid; + } + + PlayerBlockPlacement { + hand VarInt; + position BlockPosition; + face VarInt; + cursor_position_x f32; + cursor_position_y f32; + cursor_position_z f32; + inside_block bool; + } + + UseItem { + hand VarInt; + } +} diff --git a/crates/protocol/src/packets/client/status.rs b/crates/protocol/src/packets/client/status.rs new file mode 100644 index 000000000..ec9dd3b9b --- /dev/null +++ b/crates/protocol/src/packets/client/status.rs @@ -0,0 +1,7 @@ +packets! { + Request {} + + Ping { + payload i64; + } +} diff --git a/crates/protocol/src/packets/server.rs b/crates/protocol/src/packets/server.rs new file mode 100644 index 000000000..2c761925e --- /dev/null +++ b/crates/protocol/src/packets/server.rs @@ -0,0 +1,119 @@ +//! Packets sent from server to client; + +use super::*; + +mod login; +mod play; +mod status; + +pub use login::*; +pub use play::*; +pub use status::*; + +packet_enum!(ServerStatusPacket { + 0x00 = Response, + 0x01 = Pong, +}); + +packet_enum!(ServerLoginPacket { + 0x00 = DisconnectLogin, + 0x01 = EncryptionRequest, + 0x02 = LoginSuccess, + 0x03 = SetCompression, + 0x04 = LoginPluginRequest, +}); + +packet_enum!(ServerPlayPacket { + 0x00 = SpawnEntity, + 0x01 = SpawnExperienceOrb, + 0x02 = SpawnLivingEntity, + 0x03 = SpawnPainting, + 0x04 = SpawnPlayer, + 0x05 = EntityAnimation, + 0x06 = Statistics, + 0x07 = AcknowledgePlayerDigging, + 0x08 = BlockBreakAnimation, + 0x09 = BlockEntityData, + 0x0A = BlockAction, + 0x0B = BlockChange, + 0x0C = BossBar, + 0x0D = ServerDifficulty, + 0x0E = ChatMessage, + 0x0F = TabComplete, + 0x10 = DeclareCommands, + 0x11 = WindowConfirmation, + 0x12 = CloseWindow, + 0x13 = WindowItems, + 0x14 = WindowProperty, + 0x15 = SetSlot, + 0x16 = SetCooldown, + 0x17 = PluginMessage, + 0x18 = NamedSoundEffect, + 0x19 = Disconnect, + 0x1A = EntityStatus, + 0x1B = Explosion, + 0x1C = UnloadChunk, + 0x1D = ChangeGameState, + 0x1E = OpenHorseWindow, + 0x1F = KeepAlive, + 0x20 = ChunkData, + 0x21 = Effect, + 0x22 = Particle, + 0x23 = UpdateLight, + 0x24 = JoinGame, + 0x25 = MapData, + 0x26 = TradeList, + 0x27 = EntityPosition, + 0x28 = EntityPositionAndRotation, + 0x29 = EntityRotation, + 0x2A = EntityMovement, + 0x2B = VehicleMove, + 0x2C = OpenBook, + 0x2D = OpenWindow, + 0x2E = OpenSignEditor, + 0x2F = CraftRecipeResponse, + 0x30 = PlayerAbilities, + 0x31 = CombatEvent, + 0x32 = PlayerInfo, + 0x33 = FacePlayer, + 0x34 = PlayerPositionAndLook, + 0x35 = UnlockRecipes, + 0x36 = DestroyEntities, + 0x37 = RemoveEntityEffect, + 0x38 = ResourcePack, + 0x39 = Respawn, + 0x3A = EntityHeadLook, + 0x3B = MultiBlockChange, + 0x3C = SelectAdvancementTab, + 0x3D = WorldBorder, + 0x3E = Camera, + 0x3F = HeldItemChange, + 0x40 = UpdateViewPosition, + 0x41 = UpdateViewDistance, + 0x42 = SpawnPosition, + 0x43 = DisplayScoreboard, + 0x44 = SendEntityMetadata, + 0x45 = AttachEntity, + 0x46 = EntityVelocity, + 0x47 = EntityEquipment, + 0x48 = SetExperience, + 0x49 = UpdateHealth, + 0x4A = ScoreboardObjective, + 0x4B = SetPassengers, + 0x4C = Teams, + 0x4D = UpdateScore, + 0x4E = TimeUpdate, + 0x4F = Title, + 0x50 = EntitySoundEffect, + 0x51 = SoundEffect, + 0x52 = StopSound, + 0x53 = PlayerListHeaderAndFooter, + 0x54 = NbtQueryResponse, + 0x55 = CollectItem, + 0x56 = EntityTeleport, + 0x57 = Advancements, + 0x58 = EntityProperties, + 0x59 = EntityEffect, + 0x5A = DeclareRecipes, + 0x5B = AllTags, +}); diff --git a/crates/protocol/src/packets/server/login.rs b/crates/protocol/src/packets/server/login.rs new file mode 100644 index 000000000..c06e6f757 --- /dev/null +++ b/crates/protocol/src/packets/server/login.rs @@ -0,0 +1,28 @@ +use super::*; + +packets! { + DisconnectLogin { + reason String; + } + + EncryptionRequest { + server_id String; + public_key LengthPrefixedVec; + verify_token LengthPrefixedVec; + } + + LoginSuccess { + uuid Uuid; + username String; + } + + SetCompression { + threshold VarInt; + } + + LoginPluginRequest { + message_id VarInt; + successful bool; + data LengthInferredVecU8; + } +} diff --git a/crates/protocol/src/packets/server/play.rs b/crates/protocol/src/packets/server/play.rs new file mode 100644 index 000000000..fb1ef2e15 --- /dev/null +++ b/crates/protocol/src/packets/server/play.rs @@ -0,0 +1,1170 @@ +use anyhow::bail; +use base::{Gamemode, ProfileProperty}; + +use super::*; +use crate::{Readable, Writeable}; + +mod chunk_data; +pub use chunk_data::ChunkData; + +mod update_light; +pub use update_light::UpdateLight; + +packets! { + SpawnEntity { + entity_id VarInt; + uuid String; + kind VarInt; + x f64; + y f64; + z f64; + pitch Angle; + yaw Angle; + data i32; + velocity_x i16; + velocity_y i16; + velocity_z i16; + } + + SpawnExperienceOrb { + entity_id VarInt; + x f64; + y f64; + z f64; + count u16; + } + + SpawnLivingEntity { + entity_id VarInt; + entity_uuid Uuid; + kind VarInt; + x f64; + y f64; + z f64; + yaw Angle; + pitch Angle; + head_pitch Angle; + velocity_x i16; + velocity_y i16; + velocity_z i16; + } + + SpawnPainting { + entity_id VarInt; + entity_uuid Uuid; + motive VarInt; + location BlockPosition; + direction PaintingDirection; + } +} + +def_enum! { + PaintingDirection (i8) { + 0 = South, + 1 = West, + 2 = North, + 3 = East, + } +} + +packets! { + SpawnPlayer { + entity_id VarInt; + player_uuid Uuid; + x f64; + y f64; + z f64; + yaw Angle; + pitch Angle; + } + + EntityAnimation { + entity_id VarInt; + animation Animation; + } +} + +def_enum! { + Animation (u8) { + 0 = SwingMainArm, + 1 = TakeDamage, + 2 = LeaveBed, + 3 = SwingOffhand, + 4 = CriticalEffect, + 5 = MagicCriticalEffect, + } +} + +packets! { + Statistics { + statistics LengthPrefixedVec; + } + + Statistic { + category_id VarInt; + statistic_id VarInt; + value VarInt; + } + + AcknowledgePlayerDigging { + position BlockPosition; + block BlockId; + status PlayerDiggingStatus; + successful bool; + } +} + +def_enum! { + PlayerDiggingStatus (VarInt) { + 0 = Started, + 1 = Cancelled, + 2 = Finished, + } +} + +packets! { + BlockBreakAnimation { + entity_id VarInt; + position BlockPosition; + destroy_stage u8; + } + + BlockEntityData { + position BlockPosition; + action u8; + data Nbt; + } + + BlockAction { + position BlockPosition; + action_id u8; + action_param u8; + block_type VarInt; + } + + BlockChange { + position BlockPosition; + block BlockId; + } + + BossBar { + uuid Uuid; + action BossBarAction; + } +} + +def_enum! { + BossBarAction (VarInt) { + 0 = Add { + title String; + health f32; + color BossBarColor; + division BossBarDivision; + flags u8; + }, + 1 = Remove, + 2 = UpdateHealth { health f32 }, + 3 = UpdateTitle { title String }, + 4 = UpdateStyle { color BossBarColor; division BossBarDivision; }, + 5 = UpdateFlags { flags u8; } + } +} + +def_enum! { + BossBarColor (VarInt) { + 0 = Pink, + 1 = Blue, + 2 = Red, + 3 = Green, + 4 = Yellow, + 5 = Purple, + 6 = White, + } +} + +def_enum! { + BossBarDivision (VarInt) { + 0 = None, + 1 = Notch6, + 2 = Notch10, + 3 = Notch12, + 4 = Notch20, + } +} + +packets! { + ServerDifficulty { + difficulty u8; + locked bool; + } + + ChatMessage { + message String; + position ChatPosition; + sender Uuid; + } +} + +def_enum! { + ChatPosition (i8) { + 0 = Chat, + 1 = SystemMessage, + 2 = Hotbar, + } +} + +packets! { + MultiBlockChange { + chunk_section_coordinate u64; + dont_trust_edges bool; + records LengthPrefixedVec; + } + + TabComplete { + id VarInt; + start VarInt; + length VarInt; + matches LengthPrefixedVec; + } + + TabCompleteMatch { + value String; + has_tooltip bool; + tooltip Option; + } + + DeclareCommands { + // (not implemented) + __todo__ LengthInferredVecU8; + /* nodes LengthPrefixedVec; + root_index VarInt; */ + } + + CommandNode { + flags u8; + children LengthPrefixedVec; + redirect_node Option; + name Option; + parser Option; + // TODO: handle properties, which vary depending on the value of `parser`. + // This can be handled with an enum. + __todo__ LengthInferredVecU8; + } + + WindowConfirmation { + window_id u8; + action_number i16; + is_accepted bool; + } + + CloseWindow { + window_id u8; + } + + WindowItems { + window_id u8; + items ShortPrefixedVec; + } + + WindowProperty { + window_id u8; + property i16; + value i16; + } + + SetSlot { + window_id u8; + slot i16; + slot_data Slot; + } + + SetCooldown { + item_id VarInt; + cooldown_ticks VarInt; + } + + PluginMessage { + channel String; + data LengthInferredVecU8; + } + + NamedSoundEffect { + name String; + category VarInt; + position_x i32; + position_y i32; + position_z i32; + volume f32; + pitch f32; + } + + Disconnect { + reason String; + } + + EntityStatus { + entity_id i32; + status i8; + } + + Explosion { + x f32; + y f32; + z f32; + strength f32; + records LengthPrefixedVec; + player_motion_x f32; + player_motion_y f32; + player_motion_z f32; + } + + ExplosionRecord { + x_offset i8; + y_offset i8; + z_offset i8; + } + + UnloadChunk { + chunk_x i32; + chunk_z i32; + } + + ChangeGameState { + reason u8; + value f32; + } + + OpenHorseWindow { + window_id u8; + slot_count VarInt; + entity_id i32; + } + + KeepAlive { + id i64; + } + + Effect { + effect_id i32; + position BlockPosition; + data i32; + disable_relative_volume bool; + } + + Particle { + particle_id i32; + long_distance bool; + x f64; + y f64; + z f64; + offset_x f32; + offset_y f32; + offset_z f32; + particle_data f32; + particle_count i32; + // TODO: remaining data varies depending on the particle + __todo__ LengthInferredVecU8; + } +} + +packets! { + JoinGame { + entity_id i32; + is_hardcore bool; + gamemode Gamemode; + previous_gamemode u8; // can be 255 if "not set," otherwise corresponds to a gamemode ID + world_names LengthPrefixedVec; + + dimension_codec Nbt; + dimension Nbt; + + world_name String; + hashed_seed u64; + max_players VarInt; + view_distance VarInt; + reduced_debug_info bool; + enable_respawn_screen bool; + + is_debug bool; + is_flat bool; + } +} + +packets! { + MapData { + map_id VarInt; + scale i8; + show_tracking_position bool; + is_locked bool; + icons LengthPrefixedVec; + // TODO: a bunch of fields only if a Columns is set to 0 + __todo__ LengthInferredVecU8; + } + + Icon { + kind VarInt; + x i8; + z i8; + direction i8; + display_name Option; + } + + TradeList { + __todo__ LengthInferredVecU8; + } + + EntityPosition { + entity_id VarInt; + delta_x i16; + delta_y i16; + delta_z i16; + on_ground bool; + } + + EntityPositionAndRotation { + entity_id VarInt; + delta_x i16; + delta_y i16; + delta_z i16; + yaw Angle; + pitch Angle; + on_ground bool; + } + + EntityRotation { + entity_id VarInt; + yaw Angle; + pitch Angle; + on_ground bool; + } + + EntityMovement { + entity_id VarInt; + } + + VehicleMove { + x f64; + y f64; + z f64; + yaw f32; + pitch f32; + } + + OpenBook { + hand Hand; + } +} + +def_enum! { + Hand (VarInt) { + 0 = Main, + 1 = Off, + } +} + +packets! { + OpenWindow { + window_id VarInt; + window_kind VarInt; + window_title String; + } + + OpenSignEditor { + position BlockPosition; + } + + CraftRecipeResponse { + window_id i8; + recipe String; + } + + PlayerAbilities { + flags u8; + flying_speed f32; + fov_modifier f32; + } + + CombatEvent { + event CombatEventKind; + } +} + +def_enum! { + CombatEventKind (VarInt) { + 0 = EnterCombat, + 1 = EndCombat { + duration VarInt; + entity_id i32; + }, + 2 = EntityDead { + player_id VarInt; + entity_id i32; + message String; + } + } +} + +#[derive(Debug, Clone)] +pub struct AddPlayer { + pub uuid: Uuid, + pub name: String, + pub properties: Vec, + pub gamemode: Gamemode, + pub ping: i32, + pub display_name: Option, +} + +#[derive(Debug, Clone)] +pub enum PlayerInfo { + AddPlayers(Vec), + UpdateGamemodes(Vec<(Uuid, Gamemode)>), + UpdatePings(Vec<(Uuid, i32)>), + UpdateDisplayNames(Vec<(Uuid, Option)>), + RemovePlayers(Vec), +} + +impl Readable for PlayerInfo { + fn read( + buffer: &mut std::io::Cursor<&[u8]>, + version: crate::ProtocolVersion, + ) -> anyhow::Result + where + Self: Sized, + { + let action = VarInt::read(buffer, version)?.0; + let num_players = VarInt::read(buffer, version)?.0; + + match action { + 0 => { + let mut vec = Vec::new(); + for _ in 0..num_players { + let uuid = Uuid::read(buffer, version)?; + let name = String::read(buffer, version)?; + + let num_properties = VarInt::read(buffer, version)?; + let mut properties = Vec::new(); + for _ in 0..num_properties.0 { + let name = String::read(buffer, version)?; + let value = String::read(buffer, version)?; + let signature = if bool::read(buffer, version)? { + String::read(buffer, version)? + } else { + String::new() + }; + properties.push(ProfileProperty { + name, + value, + signature, + }); + } + + let gamemode = Gamemode::read(buffer, version)?; + let ping = VarInt::read(buffer, version)?.0; + let display_name = if bool::read(buffer, version)? { + Some(String::read(buffer, version)?) + } else { + None + }; + vec.push(AddPlayer { + uuid, + name, + properties, + gamemode, + ping, + display_name, + }) + } + Ok(PlayerInfo::AddPlayers(vec)) + } + 1 => { + let mut vec = Vec::new(); + for _ in 0..num_players { + let uuid = Uuid::read(buffer, version)?; + let gamemode = Gamemode::read(buffer, version)?; + vec.push((uuid, gamemode)); + } + Ok(PlayerInfo::UpdateGamemodes(vec)) + } + 2 => { + let mut vec = Vec::new(); + for _ in 0..num_players { + let uuid = Uuid::read(buffer, version)?; + let ping = VarInt::read(buffer, version)?.0; + vec.push((uuid, ping)); + } + Ok(PlayerInfo::UpdatePings(vec)) + } + 3 => { + let mut vec = Vec::new(); + for _ in 0..num_players { + let uuid = Uuid::read(buffer, version)?; + let display_name = if bool::read(buffer, version)? { + Some(String::read(buffer, version)?) + } else { + None + }; + vec.push((uuid, display_name)); + } + Ok(PlayerInfo::UpdateDisplayNames(vec)) + } + 4 => { + let mut vec = Vec::new(); + for _ in 0..num_players { + let uuid = Uuid::read(buffer, version)?; + vec.push(uuid); + } + Ok(PlayerInfo::RemovePlayers(vec)) + } + x => Err(anyhow::anyhow!("invalid player info action '{}'", x)), + } + } +} + +impl Writeable for PlayerInfo { + fn write(&self, buffer: &mut Vec, version: crate::ProtocolVersion) { + let (action_id, num_players) = match self { + PlayerInfo::AddPlayers(vec) => (0, vec.len()), + PlayerInfo::UpdateGamemodes(vec) => (1, vec.len()), + PlayerInfo::UpdatePings(vec) => (2, vec.len()), + PlayerInfo::UpdateDisplayNames(vec) => (3, vec.len()), + PlayerInfo::RemovePlayers(vec) => (4, vec.len()), + }; + VarInt(action_id).write(buffer, version); + VarInt(num_players as i32).write(buffer, version); + + match self { + PlayerInfo::AddPlayers(vec) => { + for action in vec { + action.uuid.write(buffer, version); + action.name.write(buffer, version); + + VarInt(action.properties.len() as i32).write(buffer, version); + for prop in &action.properties { + prop.name.write(buffer, version); + prop.value.write(buffer, version); + true.write(buffer, version); // signature is present + prop.signature.write(buffer, version); + } + + action.gamemode.write(buffer, version); + VarInt(action.ping).write(buffer, version); + + action.display_name.is_some().write(buffer, version); + if let Some(display_name) = &action.display_name { + display_name.write(buffer, version); + } + } + } + PlayerInfo::UpdateGamemodes(vec) => { + for (uuid, gamemode) in vec { + uuid.write(buffer, version); + gamemode.write(buffer, version); + } + } + PlayerInfo::UpdatePings(vec) => { + for (uuid, ping) in vec { + uuid.write(buffer, version); + VarInt(*ping).write(buffer, version); + } + } + PlayerInfo::UpdateDisplayNames(vec) => { + for (uuid, display_name) in vec { + uuid.write(buffer, version); + display_name.is_some().write(buffer, version); + if let Some(display_name) = &display_name { + display_name.write(buffer, version); + } + } + } + PlayerInfo::RemovePlayers(vec) => { + for uuid in vec { + uuid.write(buffer, version) + } + } + } + } +} + +packets! { + FacePlayer { + feet_or_eyes VarInt; + target_x f64; + target_y f64; + target_z f64; + entity Option; + } + + FacePlayerEntity { + entity_id VarInt; + feet_or_eyes VarInt; + } + + PlayerPositionAndLook { + x f64; + y f64; + z f64; + yaw f32; + pitch f32; + flags u8; + teleport_id VarInt; + } + + UnlockRecipes { + __todo__ LengthInferredVecU8; + } + + DestroyEntities { + entity_ids LengthPrefixedVec; + } + + RemoveEntityEffect { + entity_id VarInt; + effect_id u8; + } + + ResourcePack { + url String; + hash String; + } + + Respawn { + dimension Nbt; + world_name String; + hashed_seed u64; + gamemode Gamemode; + previous_gamemode Gamemode; + is_debug bool; + is_flat bool; + copy_metadata bool; + } + + EntityHeadLook { + entity_id VarInt; + head_yaw Angle; + } + + SelectAdvancementTab { + identifier Option; + } +} + +def_enum! { + WorldBorder (VarInt) { + 0 = SetSize { + diameter f64; + }, + 1 = LerpSize { + old_diameter f64; + new_diameter f64; + speed u64; + }, + 2 = SetCenter { + x f64; + z f64; + }, + 3 = Initialize { + x f64; + z f64; + old_diameter f64; + new_diameter f64; + speed u64; + portal_teeport_boundary VarInt; + warning_time VarInt; + warning_blocks VarInt; + }, + 4 = SetWarningTime { + warning_time VarInt; + }, + 5 = SetWarningBlocks { + warning_blocks VarInt; + }, + } +} + +packets! { + Camera { + camera_id VarInt; + } + + HeldItemChange { + slot u8; // 0-8 + } + + UpdateViewPosition { + chunk_x VarInt; + chunk_z VarInt; + } + + UpdateViewDistance { + view_distance VarInt; + } + + DisplayScoreboard { + position u8; + score_name String; + } + + SendEntityMetadata { + entity_id VarInt; + __todo__ LengthInferredVecU8; + } + + AttachEntity { + attached_entity_id i32; + holding_entity_id i32; + } + + EntityVelocity { + entity_id VarInt; + velocity_x i16; + velocity_y i16; + velocity_z i16; + } +} + +#[derive(Debug, Clone)] +pub struct EntityEquipment { + pub entity_id: i32, + pub entries: Vec, +} + +impl Readable for EntityEquipment { + fn read( + buffer: &mut std::io::Cursor<&[u8]>, + version: crate::ProtocolVersion, + ) -> anyhow::Result + where + Self: Sized, + { + let entity_id = VarInt::read(buffer, version)?.0; + + // entries are terminated when the equipment slot top bit + // is no longer set + let mut entries = Vec::new(); + loop { + let slot_byte = u8::read(buffer, version)?; + let slot = match slot_byte & 0b0111_1111 { + 0 => EquipmentSlot::MainHand, + 1 => EquipmentSlot::OffHand, + 2 => EquipmentSlot::Boots, + 3 => EquipmentSlot::Leggings, + 4 => EquipmentSlot::Chestplate, + 5 => EquipmentSlot::Helmet, + slot => bail!("invalid equipment slot Id {}", slot), + }; + + let item = Slot::read(buffer, version)?; + + entries.push(EquipmentEntry { slot, item }); + + if slot_byte & 0b1000_0000 == 0 { + break; + } + } + + Ok(EntityEquipment { entity_id, entries }) + } +} + +impl Writeable for EntityEquipment { + fn write(&self, buffer: &mut Vec, version: crate::ProtocolVersion) { + VarInt(self.entity_id).write(buffer, version); + + for (i, entry) in self.entries.iter().enumerate() { + let mut slot_byte = match entry.slot { + EquipmentSlot::MainHand => 0u8, + EquipmentSlot::OffHand => 1, + EquipmentSlot::Boots => 2, + EquipmentSlot::Leggings => 3, + EquipmentSlot::Chestplate => 4, + EquipmentSlot::Helmet => 5, + }; + if i != self.entries.len() - 1 { + slot_byte |= 0b1000_0000; + } + slot_byte.write(buffer, version); + entry.item.write(buffer, version); + } + } +} + +#[derive(Debug, Clone)] +pub struct EquipmentEntry { + pub slot: EquipmentSlot, + pub item: Slot, +} + +def_enum! { + EquipmentSlot (VarInt) { + 0 = MainHand, + 1 = OffHand, + 2 = Boots, + 3 = Leggings, + 4 = Chestplate, + 5 = Helmet, + } +} + +packets! { + SetExperience { + experience_bar f32; + level VarInt; + total_experience VarInt; + } + + UpdateHealth { + health f32; + food VarInt; + food_saturation f32; + } + + ScoreboardObjective { + objective_name String; + mode i8; + objective_value Option; + kind Option; + } + + SetPassengers { + entity_id VarInt; + passengers LengthPrefixedVec; + } + + Teams { + team_name String; + mode TeamsMode; + } +} + +def_enum! { + TeamsMode (i8) { + 0 = CreateTeam { + display_name String; + friendly_flags u8; + name_tag_visibility String; + collision_rule String; + team_color VarInt; + team_prefix String; + team_suffix String; + entities LengthPrefixedVec; // usernames or UUIDs + }, + 1 = RemoveTeam, + 2 = UpdateTeamInfo { + display_name String; + friendly_flags u8; + name_tag_visibility String; + collision_rule String; + team_color VarInt; + team_prefix String; + team_suffix String; + }, + 3 = AddEntitiesToTeam { + entities LengthPrefixedVec; + }, + 4 = RemoveEntitiesFromTeam { + entities LengthPrefixedVec; + }, + } +} + +packets! { + UpdateScore { + entity_name String; + action u8; + objective_name String; + value Option; + } + + SpawnPosition { + position BlockPosition; + } + + TimeUpdate { + world_age u64; + time_of_day u64; + } +} + +def_enum! { + Title (VarInt) { + 0 = SetTitle { + text String; + }, + 1 = SetSubtitle { + text String; + }, + 2 = SetActionBar { + text String; + }, + 3 = SetTimesAndDisplay { + fade_in i32; + stay i32; + fade_out i32; + }, + 4 = Hide, + 5 = Reset, + } +} + +packets! { + EntitySoundEffect { + sound_id VarInt; + sound_category VarInt; + entity_id VarInt; + volume f32; + pitch f32; + } + + SoundEffect { + sound_id VarInt; + sound_category VarInt; + position_x i32; + position_y i32; + position_z i32; + volume f32; + pitch f32; + } + + StopSound { + flags u8; + source Option; + sound Option; + } + + PlayerListHeaderAndFooter { + header String; + footer String; + } + + NbtQueryResponse { + transaction_id VarInt; + nbt Nbt; + } + + CollectItem { + collected_entity_id VarInt; + collector_entity_id VarInt; + item_count VarInt; + } + + EntityTeleport { + entity_id VarInt; + x f64; + y f64; + z f64; + yaw Angle; + pitch Angle; + on_ground bool; + } + + Advancements { + __todo__ LengthInferredVecU8; + } + + EntityProperties { + __todo__ LengthInferredVecU8; + } + + EntityEffect { + entity_id VarInt; + effect_id u8; + amplifier i8; + duration VarInt; + flags u8; + } + + DeclareRecipes { + // This packet isn't currently working. Fortunately, we don't really need it. + __todo__ LengthInferredVecU8; + } +} + +def_enum! { + Recipe (String) { + "minecraft:crafting_shapeless" = Shapeless { + id String; + group String; + ingredient VarInt; + ingredients LengthPrefixedVec; + result Slot; + }, + "minecraft:crafting_shaped" = Shaped { + id String; + width VarInt; + height VarInt; + group String; + ingredients LengthPrefixedVec; + result Slot; + }, + "minecraft:crafting_special_armordye" = ArmorDye { id String; }, + "minecraft:crafting_special_bookcloning" = BookCloning { id String; }, + "minecraft:crafting_special_mapcloning" = MapCloning { id String; }, + "minecraft:crafting_special_mapextending" = MapExtending { id String; }, + "minecraft:crafting_special_firework_rocket" = FireworkRocket { id String; }, + "minecraft:crafting_special_firework_star" = FireworkStar { id String; }, + "minecraft:crafting_special_firework_star_fade" = FireworkStarFade { id String; }, + "minecraft:crafting_special_repairitem" = RepairItem { id String; }, + "minecraft:crafting_special_tippedarrow" = TippedArrow { id String; }, + "minecraft:crafting_special_bannderduplicate" = BannerDuplicate { id String; }, + "minecraft:crafting_special_banneraddpattern" = BannerAddPattern { id String; }, + "minecraft:crafting_special_shielddecoration" = ShieldDecoration { id String; }, + "minecraft:crafting_special_shulkerboxcoloring" = ShulkerBoxColoring { id String; }, + "minecraft:crafting_special_suspiciousstew" = SuspiciousStew { id String; }, + "minecraft:smelting" = Smelting { + id String; + group String; + ingredient Ingredient; + result Slot; + experience f32; + cooking_time VarInt; + }, + "minecraft:blasting" = Blasting { + id String; + group String; + ingredient Ingredient; + result Slot; + experience f32; + cooking_time VarInt; + }, + "minecraft:smoking" = Smoking { + id String; + group String; + ingredient Ingredient; + result Slot; + experience f32; + cooking_time VarInt; + }, + "minecraft:campfire_cooking" = CampfireCooking { + id String; + group String; + ingredient Ingredient; + result Slot; + experience f32; + cooking_time VarInt; + }, + "minecraft:stonecutting" = Stonecutting { + id String; + group String; + ingredient Ingredient; + result Slot; + } + } +} + +packets! { + Ingredient { + allowed_items LengthPrefixedVec; + } + + AllTags { + block_tags LengthPrefixedVec; + item_tags LengthPrefixedVec; + fluid_tags LengthPrefixedVec; + entity_tags LengthPrefixedVec; + } + + Tag { + name String; + entries LengthPrefixedVec; + } +} diff --git a/crates/protocol/src/packets/server/play/chunk_data.rs b/crates/protocol/src/packets/server/play/chunk_data.rs new file mode 100644 index 000000000..664e75e48 --- /dev/null +++ b/crates/protocol/src/packets/server/play/chunk_data.rs @@ -0,0 +1,105 @@ +use std::fmt::{self, Debug}; +use std::sync::Arc; + +use base::{Chunk, ChunkSection}; +use parking_lot::RwLock; +use serde::Serialize; + +use crate::{io::VarInt, Nbt, ProtocolVersion, Readable, Writeable}; + +#[derive(Serialize)] +struct Heightmaps { + #[serde(rename = "MOTION_BLOCKING")] + #[serde(serialize_with = "nbt::i64_array")] + motion_blocking: [i64; 37], +} + +/// Packet to load a chunk on the client. +#[derive(Clone)] +pub struct ChunkData { + /// The chunk to send. + pub chunk: Arc>, +} + +impl Debug for ChunkData { + fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { + let mut debug_struct = f.debug_struct("ChunkData"); + debug_struct.field("position", &self.chunk.read().position()); + debug_struct.finish() + } +} + +impl Writeable for ChunkData { + fn write(&self, buffer: &mut Vec, version: ProtocolVersion) { + let chunk = self.chunk.read(); + + chunk.position().x.write(buffer, version); + chunk.position().z.write(buffer, version); + + // full chunk (always true for us) + true.write(buffer, version); + + // Compute primary bit mask + let mut bitmask = 0; + for (y, section) in chunk.sections().iter().enumerate().skip(1).take(16) { + if section.is_some() { + bitmask |= 1 << (y - 1) as i32; + } + } + VarInt(bitmask).write(buffer, version); + + let heightmaps = build_heightmaps(&chunk); + Nbt(heightmaps).write(buffer, version); + + VarInt(1024).write(buffer, version); // length of biomes + for &biome in chunk.biomes().as_slice() { + VarInt(biome.id() as i32).write(buffer, version); + } + + // Sections + let mut data = Vec::new(); + for section in chunk.sections().iter().skip(1).take(16) { + if let Some(section) = section { + encode_section(section, &mut data, version); + } + } + VarInt(data.len() as i32).write(buffer, version); + buffer.extend_from_slice(&data); + + VarInt(0).write(buffer, version); // number of block entities - always 0 for Feather + } +} + +fn build_heightmaps(chunk: &Chunk) -> Heightmaps { + let mut motion_blocking = [0; 37]; + let chunk_motion_blocking = chunk.heightmaps().motion_blocking.as_u64_slice(); + motion_blocking.copy_from_slice(bytemuck::cast_slice::<_, i64>(chunk_motion_blocking)); + Heightmaps { motion_blocking } +} + +fn encode_section(section: &ChunkSection, buffer: &mut Vec, version: ProtocolVersion) { + (section.non_air_blocks() as u16).write(buffer, version); + (section.blocks().data().bits_per_value() as u8).write(buffer, version); + + if let Some(palette) = section.blocks().palette() { + VarInt(palette.len() as i32).write(buffer, version); + for &block in palette.as_slice() { + VarInt(block.vanilla_id() as i32).write(buffer, version); + } + } + + let data = section.blocks().data().as_u64_slice(); + VarInt(data.len() as i32).write(buffer, version); + for &x in data { + x.write(buffer, version); + } +} + +impl Readable for ChunkData { + fn read(_buffer: &mut std::io::Cursor<&[u8]>, _version: ProtocolVersion) -> anyhow::Result + where + Self: Sized, + { + todo!() + } +} diff --git a/crates/protocol/src/packets/server/play/update_light.rs b/crates/protocol/src/packets/server/play/update_light.rs new file mode 100644 index 000000000..2c2fd8288 --- /dev/null +++ b/crates/protocol/src/packets/server/play/update_light.rs @@ -0,0 +1,72 @@ +use std::{fmt::Debug, sync::Arc}; + +use base::{chunk::PackedArray, Chunk}; +use parking_lot::RwLock; + +use crate::{io::VarInt, ProtocolVersion, Readable, Writeable}; + +#[derive(Clone)] +pub struct UpdateLight { + pub chunk: Arc>, +} + +impl Debug for UpdateLight { + fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { + let mut debug_struct = f.debug_struct("UpdateLight"); + debug_struct.field("position", &self.chunk.read().position()); + debug_struct.finish() + } +} + +impl Writeable for UpdateLight { + fn write(&self, buffer: &mut Vec, version: crate::ProtocolVersion) { + let chunk = self.chunk.read(); + VarInt(chunk.position().x).write(buffer, version); + VarInt(chunk.position().z).write(buffer, version); + + true.write(buffer, version); // trust edges? + + let mut mask = 0; + for (y, section) in chunk.sections().iter().enumerate() { + if section.is_some() { + mask |= 1 << y; + } + } + + VarInt(mask).write(buffer, version); // sky light mask + VarInt(mask).write(buffer, version); // block light mask + + VarInt(!mask).write(buffer, version); // empty sky light mask + VarInt(!mask).write(buffer, version); // empty block light mask + + for section in chunk.sections() { + if let Some(section) = section { + encode_light(section.light().sky_light(), buffer, version); + } + } + for section in chunk.sections() { + if let Some(section) = section { + encode_light(section.light().block_light(), buffer, version); + } + } + } +} + +fn encode_light(light: &PackedArray, buffer: &mut Vec, version: ProtocolVersion) { + VarInt(2048).write(buffer, version); + let light_data: &[u8] = bytemuck::cast_slice(light.as_u64_slice()); + assert_eq!(light_data.len(), 2048); + buffer.extend_from_slice(light_data); +} + +impl Readable for UpdateLight { + fn read( + _buffer: &mut std::io::Cursor<&[u8]>, + _version: crate::ProtocolVersion, + ) -> anyhow::Result + where + Self: Sized, + { + todo!() + } +} diff --git a/crates/protocol/src/packets/server/status.rs b/crates/protocol/src/packets/server/status.rs new file mode 100644 index 000000000..6cff7b1fb --- /dev/null +++ b/crates/protocol/src/packets/server/status.rs @@ -0,0 +1,9 @@ +packets! { + Response { + response String; + } + + Pong { + payload i64; + } +} diff --git a/crates/server/Cargo.toml b/crates/server/Cargo.toml new file mode 100644 index 000000000..7e39c674a --- /dev/null +++ b/crates/server/Cargo.toml @@ -0,0 +1,59 @@ +[package] +name = "feather-server" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" +default-run = "feather-server" + +[[bin]] +path = "src/main.rs" +name = "feather-server" + +[lib] +path = "src/lib.rs" + +[dependencies] +common = { path = "../common", package = "feather-common" } +base = { path = "../base", package = "feather-base" } +ecs = { path = "../ecs", package = "feather-ecs" } +protocol = { path = "../protocol", package = "feather-protocol" } +utils = { path = "../utils", package = "feather-utils" } +plugin-host = { path = "../plugin-host", package = "feather-plugin-host" } + +ahash = "0.7" +anyhow = "1" +tokio = { version = "1", features = ["full"] } +flume = "0.10" +futures-lite = "1" +base64 = "0.13" +log = "0.4" +fern = "0.6" +colored = "2" +chrono = "0.4" +ureq = { version = "2", features = ["json"] } +rsa = "0.3" +rsa-der = "0.2" +once_cell = "1" +sha-1 = "0.9" +md-5 = "0.9" +rand = "0.7" +num-bigint = "0.3" +serde = { version = "1", features = ["derive"] } +serde_json = "1" +toml = "0.5" +uuid = "0.8" +vec-arena = "1" +hematite-nbt = { git = "https://github.com/PistonDevelopers/hematite_nbt" } +parking_lot = "0.11" +quill-common = { git = "https://github.com/feather-rs/quill" } + +[features] +default = ["plugin-cranelift"] + +# Use Cranelift to JIT-compile plugins. Pure Rust +# but produces slower code than LLVM. +plugin-cranelift = ["plugin-host/cranelift"] +# Use LLVM to JIT-compile plugins. Produces +# very fast code, but requires LLVM to be installed +# on the build system. May impact startup times. +plugin-llvm = ["plugin-host/llvm"] diff --git a/server/config/feather.toml b/crates/server/config.toml similarity index 60% rename from server/config/feather.toml rename to crates/server/config.toml index 07f8c100e..aa75785ab 100644 --- a/server/config/feather.toml +++ b/crates/server/config.toml @@ -1,9 +1,8 @@ # Configuration for the Feather server. -# Many of the options here are unimplemented and have no effect. -# Those that are unimplemented have been labeled so. - -[io] +[network] +address = "0.0.0.0" +port = 25565 # Packets with a size more than or equal to this value will be sent compressed. # Compressing packets reduces bandwidth usage but increases CPU activity. compression_threshold = 256 @@ -13,25 +12,14 @@ online_mode = true motd = "A Feather server" max_players = 16 default_gamemode = "creative" -difficulty = "none" # Unimplemented -view_distance = 6 -address = "0.0.0.0" -port = 25565 - -[gameplay] -monster_spawning = true # Unimplemented -animal_spawning = true # Unimplemented -pvp = true # Unimplemented -nerf_spawner_mobs = false # Unimplemented -# Either "classic" for 1.8 PvP or "new" for 1.9 -pvp_style = "classic" # Unimplemented +view_distance = 12 [log] # If you prefer less verbose logs, switch this to "info." -# If you want to hurt your eyes while looking at the -# server console, set it to "trace." +# For development, it might be useful to set this to "trace." level = "debug" +# Unimplemented [resource_pack] # Server resource pack which is sent to players # upon joining. Set this to an empty string to disable. @@ -39,6 +27,7 @@ url = "" # Optional SHA1 hash of the resource pack file. hash = "" +# Unimplemented [world] # The name of the directory containing the world. name = "world" @@ -50,13 +39,12 @@ generator = "default" # If this value is not a valid integer (i64), the string # will be converted using a hash function. seed = "" -# Interval at which to save modified chunks. -save_interval = "1min" +# Unimplemented [proxy] # Select the IP forwarding mode that is used by proxies like BungeeCord or Velocity. # Valid values are -# - "None" - for usage without a proxy -# - "BungeeCord" - for BungeeCord/Waterfall/Travertine -# - "Velocity" - for Velocity style proxies (unimplemented) -proxy_mode = "None" +# - "none" - for usage without a proxy +# - "bungee" - for BungeeCord/Waterfall/Travertine +# - "velocity" - for Velocity style proxies (unimplemented) +proxy_mode = "none" diff --git a/crates/server/src/chunk_subscriptions.rs b/crates/server/src/chunk_subscriptions.rs new file mode 100644 index 000000000..ccec7a780 --- /dev/null +++ b/crates/server/src/chunk_subscriptions.rs @@ -0,0 +1,73 @@ +use ahash::AHashMap; +use base::ChunkPosition; +use common::{ + events::{EntityRemoveEvent, ViewUpdateEvent}, + view::View, + Game, +}; +use ecs::{SysResult, SystemExecutor}; +use utils::vec_remove_item; + +use crate::{ClientId, Server}; + +/// Data structure to query which clients should +/// receive updates from a given chunk, fast. +#[derive(Default)] +pub struct ChunkSubscriptions { + chunks: AHashMap>, +} + +impl ChunkSubscriptions { + pub fn subscriptions_for(&self, chunk: ChunkPosition) -> &[ClientId] { + self.chunks + .get(&chunk) + .map(Vec::as_slice) + .unwrap_or_default() + } +} + +pub fn register(systems: &mut SystemExecutor) { + systems + .group::() + .add_system(update_chunk_subscriptions); +} + +fn update_chunk_subscriptions(game: &mut Game, server: &mut Server) -> SysResult { + // Update players whose views have changed + for (_, (event, &client_id)) in game.ecs.query::<(&ViewUpdateEvent, &ClientId)>().iter() { + for new_chunk in event.new_view.difference(event.old_view) { + server + .chunk_subscriptions + .chunks + .entry(new_chunk) + .or_default() + .push(client_id); + } + for old_chunk in event.old_view.difference(event.new_view) { + remove_subscription(server, old_chunk, client_id); + } + } + + // Update players that have left + for (_, (_event, &client_id, &view)) in game + .ecs + .query::<(&EntityRemoveEvent, &ClientId, &View)>() + .iter() + { + for chunk in view.iter() { + remove_subscription(server, chunk, client_id); + } + } + + Ok(()) +} + +fn remove_subscription(server: &mut Server, chunk: ChunkPosition, client_id: ClientId) { + if let Some(vec) = server.chunk_subscriptions.chunks.get_mut(&chunk) { + vec_remove_item(vec, &client_id); + + if vec.is_empty() { + server.chunk_subscriptions.chunks.remove(&chunk); + } + } +} diff --git a/crates/server/src/client.rs b/crates/server/src/client.rs new file mode 100644 index 000000000..c575c5c71 --- /dev/null +++ b/crates/server/src/client.rs @@ -0,0 +1,450 @@ +use std::{ + cell::{Cell, RefCell}, + collections::VecDeque, + io::Cursor, + sync::Arc, +}; + +use ahash::AHashSet; +use base::{Chunk, ChunkPosition, EntityKind, Gamemode, ItemStack, Position, ProfileProperty}; +use common::{ + chat::{ChatKind, ChatMessage}, + Window, +}; +use flume::{Receiver, Sender}; +use packets::server::{SetSlot, SpawnLivingEntity, UpdateLight, WindowConfirmation}; +use parking_lot::RwLock; +use protocol::{ + packets::{ + self, + server::{ + AddPlayer, Animation, ChatPosition, ChunkData, DestroyEntities, EntityAnimation, + EntityHeadLook, EntityTeleport, JoinGame, KeepAlive, PlayerInfo, PlayerPositionAndLook, + PluginMessage, SpawnPlayer, UnloadChunk, UpdateViewPosition, WindowItems, + }, + }, + ClientPlayPacket, Nbt, ProtocolVersion, ServerPlayPacket, Writeable, +}; +use quill_common::components::OnGround; +use uuid::Uuid; +use vec_arena::Arena; + +use crate::{initial_handler::NewPlayer, network_id_registry::NetworkId, Options}; + +/// Max number of chunks to send to a client per tick. +const MAX_CHUNKS_PER_TICK: usize = 10; + +/// ID of a client. Can be reused. +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +pub struct ClientId(usize); + +/// Stores all `Client`s. +#[derive(Default)] +pub struct Clients { + arena: Arena, +} + +impl Clients { + pub fn new() -> Self { + Self::default() + } + + pub fn insert(&mut self, client: Client) -> ClientId { + ClientId(self.arena.insert(client)) + } + + pub fn remove(&mut self, id: ClientId) -> Option { + self.arena.remove(id.0) + } + + pub fn get(&self, id: ClientId) -> Option<&Client> { + self.arena.get(id.0) + } + + pub fn iter(&self) -> impl Iterator + '_ { + self.arena.iter().map(|(_i, client)| client) + } +} + +/// A client connected to a server. +/// +/// This struct provides methods to send packets +/// to the client. +pub struct Client { + packets_to_send: Sender, + received_packets: Receiver, + options: Arc, + username: String, + profile: Vec, + uuid: Uuid, + + teleport_id_counter: Cell, + + network_id: NetworkId, + sent_entities: RefCell>, + + knows_position: Cell, + known_chunks: RefCell>, + + chunk_send_queue: RefCell>, + + /// The previous own position sent by the client. + /// Used to detect when we need to teleport the client. + client_known_position: Cell>, +} + +impl Client { + pub fn new(player: NewPlayer, options: Arc, network_id: NetworkId) -> Self { + Self { + packets_to_send: player.packets_to_send, + received_packets: player.received_packets, + options, + username: player.username, + teleport_id_counter: Cell::new(0), + network_id, + profile: player.profile, + uuid: player.uuid, + sent_entities: RefCell::new(AHashSet::new()), + knows_position: Cell::new(false), + known_chunks: RefCell::new(AHashSet::new()), + chunk_send_queue: RefCell::new(VecDeque::new()), + client_known_position: Cell::new(None), + } + } + + pub fn set_client_known_position(&self, pos: Position) { + self.client_known_position.set(Some(pos)); + } + + pub fn client_known_position(&self) -> Option { + self.client_known_position.get() + } + + pub fn profile(&self) -> &[ProfileProperty] { + &self.profile + } + + pub fn network_id(&self) -> NetworkId { + self.network_id + } + + pub fn uuid(&self) -> Uuid { + self.uuid + } + + pub fn username(&self) -> &str { + &self.username + } + + pub fn received_packets(&self) -> impl Iterator + '_ { + self.received_packets.try_iter() + } + + pub fn is_disconnected(&self) -> bool { + self.received_packets.is_disconnected() + } + + pub fn known_chunks(&self) -> usize { + self.known_chunks.borrow().len() + } + + pub fn knows_own_position(&self) -> bool { + self.knows_position.get() + } + + pub fn tick(&self) { + let num_to_send = MAX_CHUNKS_PER_TICK.min(self.chunk_send_queue.borrow().len()); + for packet in self.chunk_send_queue.borrow_mut().drain(0..num_to_send) { + log::trace!( + "Sending chunk at {:?} to {}", + packet.chunk.read().position(), + self.username + ); + let chunk = Arc::clone(&packet.chunk); + self.send_packet(UpdateLight { chunk }); + self.send_packet(packet); + } + } + + /// Returns whether the entity with the given ID + /// is currently loaded on the client. + pub fn is_entity_loaded(&self, network_id: NetworkId) -> bool { + self.sent_entities.borrow().contains(&network_id) + } + + pub fn send_join_game(&self, gamemode: Gamemode) { + log::trace!("Sending Join Game to {}", self.username); + // Use the dimension codec sent by the default vanilla server. (Data acquired via tools/proxy) + let dimension_codec = nbt::Blob::from_reader(&mut Cursor::new(include_bytes!( + "../../../assets/dimension_codec.nbt" + ))) + .expect("dimension codec asset is malformed"); + let dimension = nbt::Blob::from_reader(&mut Cursor::new(include_bytes!( + "../../../assets/dimension.nbt" + ))) + .expect("dimension asset is malformed"); + + self.send_packet(JoinGame { + entity_id: self.network_id.0, + is_hardcore: false, + gamemode, + previous_gamemode: 0, + world_names: vec!["world".to_owned()], + dimension_codec: Nbt(dimension_codec), + dimension: Nbt(dimension), + world_name: "world".to_owned(), + hashed_seed: 0, + max_players: 0, + view_distance: self.options.view_distance as i32, + reduced_debug_info: false, + enable_respawn_screen: true, + is_debug: false, + is_flat: false, + }); + } + + pub fn send_brand(&self) { + let mut data = Vec::new(); + "Feather" + .to_owned() + .write(&mut data, ProtocolVersion::V1_16_2); + self.send_plugin_message("minecraft:brand", data) + } + + pub fn send_plugin_message(&self, channel: impl Into, data: impl Into>) { + let channel = channel.into(); + log::trace!("Sending plugin message {} to {}", channel, self.username); + self.send_packet(PluginMessage { + channel, + data: data.into(), + }) + } + + pub fn update_own_position(&self, new_position: Position) { + log::trace!( + "Updating position of {} to {:?}", + self.username, + new_position + ); + self.send_packet(PlayerPositionAndLook { + x: new_position.x, + y: new_position.y, + z: new_position.z, + yaw: new_position.yaw, + pitch: new_position.pitch, + flags: 0, + teleport_id: self.teleport_id_counter.get(), + }); + self.teleport_id_counter + .set(self.teleport_id_counter.get() + 1); + self.knows_position.set(true); + self.client_known_position.set(Some(new_position)); + } + + pub fn update_own_chunk(&self, pos: ChunkPosition) { + log::trace!("Updating chunk position of {} to {:?}", self.username, pos); + self.send_packet(UpdateViewPosition { + chunk_x: pos.x, + chunk_z: pos.z, + }); + } + + pub fn send_chunk(&self, chunk: &Arc>) { + self.chunk_send_queue.borrow_mut().push_back(ChunkData { + chunk: Arc::clone(chunk), + }); + self.known_chunks + .borrow_mut() + .insert(chunk.read().position()); + } + + pub fn unload_chunk(&self, pos: ChunkPosition) { + log::trace!("Unloading chunk at {:?} on {}", pos, self.username); + self.send_packet(UnloadChunk { + chunk_x: pos.x, + chunk_z: pos.z, + }); + self.known_chunks.borrow_mut().remove(&pos); + } + + pub fn add_tablist_player( + &self, + uuid: Uuid, + name: String, + profile: &[ProfileProperty], + gamemode: Gamemode, + ) { + log::trace!("Sending AddPlayer({}) to {}", name, self.username); + let action = AddPlayer { + uuid, + name, + properties: profile.to_vec(), + gamemode, + ping: 0, + display_name: None, + }; + self.send_packet(PlayerInfo::AddPlayers(vec![action])); + } + + pub fn remove_tablist_player(&self, uuid: Uuid) { + log::trace!("Sending RemovePlayer({}) to {}", uuid, self.username); + self.send_packet(PlayerInfo::RemovePlayers(vec![uuid])); + } + + pub fn unload_entity(&self, id: NetworkId) { + log::trace!("Unloading {:?} on {}", id, self.username); + self.sent_entities.borrow_mut().remove(&id); + self.send_packet(DestroyEntities { + entity_ids: vec![id.0.into()], + }); + } + + pub fn send_player(&self, network_id: NetworkId, uuid: Uuid, pos: Position) { + log::trace!("Sending {:?} to {}", uuid, self.username); + assert!(!self.sent_entities.borrow().contains(&network_id)); + self.send_packet(SpawnPlayer { + entity_id: network_id.0, + player_uuid: uuid, + x: pos.x, + y: pos.y, + z: pos.z, + yaw: pos.yaw, + pitch: pos.pitch, + }); + self.register_entity(network_id); + } + + pub fn send_living_entity( + &self, + network_id: NetworkId, + uuid: Uuid, + pos: Position, + kind: EntityKind, + ) { + log::trace!( + "Spawning a {:?} on {} (entity type ID: {})", + kind, + self.username, + kind.id() + ); + self.send_packet(SpawnLivingEntity { + entity_id: network_id.0, + entity_uuid: uuid, + kind: kind.id() as i32, + x: pos.x, + y: pos.y, + z: pos.z, + yaw: pos.yaw, + pitch: pos.pitch, + head_pitch: pos.pitch, + velocity_x: 0, + velocity_y: 0, + velocity_z: 0, + }); + } + + pub fn update_entity_position( + &self, + network_id: NetworkId, + position: Position, + on_ground: OnGround, + ) { + if network_id == self.network_id { + // This entity is the client. Only update + // the position if it has changed from the client's + // known position. + if Some(position) != self.client_known_position.get() { + self.update_own_position(position); + } + return; + } + // Consider using the relative movement packets in the future. + // (Entity Teleport works fine, but the relative movement packets + // save bandwidth.) + self.send_packet(EntityTeleport { + entity_id: network_id.0, + x: position.x, + y: position.y, + z: position.z, + yaw: position.yaw, + pitch: position.pitch, + on_ground: on_ground.0, + }); + // Needed for head orientation + self.send_packet(EntityHeadLook { + entity_id: network_id.0, + head_yaw: position.yaw, + }); + } + + pub fn send_keepalive(&self) { + log::trace!("Sending keepalive to {}", self.username); + self.send_packet(KeepAlive { id: 0 }); + } + + pub fn send_entity_animation(&self, network_id: NetworkId, animation: Animation) { + if network_id == self.network_id { + return; + } + self.send_packet(EntityAnimation { + entity_id: network_id.0, + animation, + }) + } + + pub fn send_chat_message(&self, message: ChatMessage) { + let packet = chat_packet(message); + self.send_packet(packet); + } + + pub fn confirm_window_action(&self, window_id: u8, action_number: i16, is_accepted: bool) { + self.send_packet(WindowConfirmation { + window_id, + action_number, + is_accepted, + }); + } + + pub fn send_window_items(&self, window: &Window) { + log::trace!("Updating window for {}", self.username); + let packet = WindowItems { + window_id: 0, + items: window.inner().to_vec(), + }; + self.send_packet(packet); + } + + pub fn set_slot(&self, slot: i16, item: Option) { + log::trace!("Setting slot {} of {} to {:?}", slot, self.username, item); + self.send_packet(SetSlot { + window_id: 0, + slot, + slot_data: item, + }); + } + + pub fn set_cursor_slot(&self, item: Option) { + log::trace!("Setting cursor slot of {} to {:?}", self.username, item); + self.set_slot(-1, item); + } + + fn register_entity(&self, network_id: NetworkId) { + self.sent_entities.borrow_mut().insert(network_id); + } + + fn send_packet(&self, packet: impl Into) { + let _ = self.packets_to_send.try_send(packet.into()); + } +} + +fn chat_packet(message: ChatMessage) -> packets::server::ChatMessage { + packets::server::ChatMessage { + message: message.text().to_string(), + position: match message.kind() { + ChatKind::PlayerChat => ChatPosition::Chat, + ChatKind::System => ChatPosition::SystemMessage, + ChatKind::AboveHotbar => ChatPosition::Hotbar, + }, + sender: Uuid::default(), + } +} diff --git a/crates/server/src/config.rs b/crates/server/src/config.rs new file mode 100644 index 000000000..6d89fe6f2 --- /dev/null +++ b/crates/server/src/config.rs @@ -0,0 +1,115 @@ +//! Loads an `Options` from a TOML config. + +use std::{fs, net::Ipv4Addr, path::Path, str::FromStr}; + +use anyhow::Context; +use base::Gamemode; +use serde::{Deserialize, Deserializer}; + +use crate::{favicon::Favicon, Options}; + +const DEFAULT_CONFIG: &str = include_str!("../config.toml"); + +/// Loads the config, creating a default config if needed. +pub fn load(path: &str) -> anyhow::Result { + let path = Path::new(path); + let default_config = DEFAULT_CONFIG; + + if !path.exists() { + println!("Creating default config"); + fs::write(path, default_config)?; + } + + let config_string = fs::read_to_string(path)?; + let config: Config = toml::from_str(&config_string).context("invalid config.toml file")?; + + Ok(config) +} + +#[derive(Debug, Deserialize)] +pub struct Config { + pub network: Network, + pub server: ServerConfig, + pub log: Log, + pub world: World, + pub proxy: Proxy, +} + +impl Config { + pub fn to_options(&self) -> Options { + Options { + port: self.network.port, + bind_address: self.network.address.to_string(), + favicon: Favicon::load_default(), + motd: self.server.motd.clone(), + online_mode: self.server.online_mode, + view_distance: self.server.view_distance, + max_players: self.server.max_players, + default_gamemode: self.server.default_gamemode, + } + } +} + +#[derive(Debug, Deserialize)] +pub struct Network { + pub address: Ipv4Addr, + pub port: u16, + pub compression_threshold: u32, +} + +#[derive(Debug, Deserialize)] +pub struct ServerConfig { + pub online_mode: bool, + pub motd: String, + pub max_players: u32, + pub default_gamemode: Gamemode, + pub view_distance: u32, +} + +#[derive(Debug, Deserialize)] +pub struct Log { + #[serde(deserialize_with = "deserialize_log_level")] + pub level: log::LevelFilter, +} + +#[derive(Debug, Deserialize)] +pub struct World { + pub name: String, + pub generator: String, + pub seed: String, +} + +#[derive(Debug, Deserialize)] +pub struct Proxy { + pub proxy_mode: ProxyMode, +} + +#[derive(Debug, Deserialize)] +#[serde(rename_all = "snake_case")] +pub enum ProxyMode { + None, + Bungee, + Velocity, +} + +fn deserialize_log_level<'de, D: Deserializer<'de>>( + deserializer: D, +) -> Result { + let string: String = String::deserialize(deserializer)?; + let level = log::LevelFilter::from_str(&string).map_err(|_| { + serde::de::Error::custom( + "invalid log level: valid options are trace, debug, info, warn, error", + ) + })?; + Ok(level) +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn default_config_is_valid() { + let _config: Config = toml::from_str(DEFAULT_CONFIG).unwrap(); + } +} diff --git a/crates/server/src/connection_worker.rs b/crates/server/src/connection_worker.rs new file mode 100644 index 000000000..825f9cd86 --- /dev/null +++ b/crates/server/src/connection_worker.rs @@ -0,0 +1,210 @@ +use std::{fmt::Debug, io, net::SocketAddr, sync::Arc, time::Duration}; + +use flume::{Receiver, Sender}; +use futures_lite::FutureExt; +use io::ErrorKind; +use protocol::{ + codec::CryptKey, ClientPlayPacket, MinecraftCodec, Readable, ServerPlayPacket, Writeable, +}; +use tokio::{ + io::{AsyncReadExt, AsyncWriteExt}, + net::{ + tcp::{OwnedReadHalf, OwnedWriteHalf}, + TcpStream, + }, + time::timeout, +}; + +use crate::{ + initial_handler::{InitialHandling, NewPlayer}, + options::Options, +}; + +/// Tokio task which handles a connection and processes +/// packets. +/// +/// # Lifecycle +/// * A connection is made, and the `Listener` spawns a `Worker`. +/// * Connection goes through initial handling, i.e., the handshake process. +/// * If the connection was not a status ping, then the main server thread +/// is notified of the new connection via a channel. +pub struct Worker { + reader: Reader, + writer: Writer, + options: Arc, + packets_to_send_tx: Sender, + received_packets_rx: Receiver, + new_players: Sender, +} + +impl Worker { + pub fn new( + stream: TcpStream, + _addr: SocketAddr, + options: Arc, + new_players: Sender, + ) -> Self { + let (reader, writer) = stream.into_split(); + + let (received_packets_tx, received_packets_rx) = flume::bounded(32); + let (packets_to_send_tx, packets_to_send_rx) = flume::unbounded(); + let reader = Reader::new(reader, received_packets_tx); + let writer = Writer::new(writer, packets_to_send_rx); + + Self { + reader, + writer, + options, + packets_to_send_tx, + received_packets_rx, + new_players, + } + } + + pub fn start(self) { + tokio::task::spawn(async move { + self.run().await; + }); + } + + async fn run(mut self) { + let result = crate::initial_handler::handle(&mut self).await; + match result { + Ok(result) => self.proceed(result).await, + Err(e) => log::debug!("Initial handling failed: {:?}", e), + } + } + + async fn proceed(self, result: InitialHandling) { + match result { + InitialHandling::Disconnect => (), + InitialHandling::Join(new_player) => { + let _ = self.new_players.send_async(new_player).await; + self.split(); + } + } + } + + pub fn options(&self) -> &Options { + &self.options + } + + #[allow(unused)] + pub fn enable_compression(&mut self, threshold: usize) { + self.reader.codec.enable_compression(threshold); + self.writer.codec.enable_compression(threshold); + } + + pub fn enable_encryption(&mut self, key: CryptKey) { + self.reader.codec.enable_encryption(key); + self.writer.codec.enable_encryption(key); + } + + pub async fn read(&mut self) -> anyhow::Result

{ + self.reader.read().await + } + + pub async fn write(&mut self, packet: impl Writeable + Debug) -> anyhow::Result<()> { + self.writer.write(packet).await + } + + pub fn split(self) { + let Self { reader, writer, .. } = self; + let reader = tokio::task::spawn(async move { reader.run().await }); + let writer = tokio::task::spawn(async move { writer.run().await }); + + tokio::task::spawn(async move { + let result = reader.race(writer).await.expect("task panicked"); + if let Err(e) = result { + log::error!("Connection lost: {:?}", e); + } + }); + } + + pub fn packets_to_send(&self) -> Sender { + self.packets_to_send_tx.clone() + } + + pub fn received_packets(&self) -> Receiver { + self.received_packets_rx.clone() + } +} + +struct Reader { + stream: OwnedReadHalf, + codec: MinecraftCodec, + buffer: [u8; 512], + received_packets: Sender, +} + +impl Reader { + pub fn new(stream: OwnedReadHalf, received_packets: Sender) -> Self { + Self { + stream, + codec: MinecraftCodec::new(), + buffer: [0; 512], + received_packets, + } + } + + pub async fn run(mut self) -> anyhow::Result<()> { + loop { + let packet = self.read::().await?; + let result = self.received_packets.send_async(packet).await; + if result.is_err() { + // server dropped connection + return Ok(()); + } + } + } + + pub async fn read(&mut self) -> anyhow::Result

{ + // Keep reading bytes and trying to get the packet. + loop { + if let Some(packet) = self.codec.next_packet::

()? { + return Ok(packet); + } + + let duration = Duration::from_secs(10); + let read_bytes = timeout(duration, self.stream.read(&mut self.buffer)).await??; + if read_bytes == 0 { + return Err(io::Error::new(ErrorKind::UnexpectedEof, "read 0 bytes").into()); + } + + let bytes = &self.buffer[..read_bytes]; + self.codec.accept(bytes); + } + } +} + +struct Writer { + stream: OwnedWriteHalf, + codec: MinecraftCodec, + packets_to_send: Receiver, + buffer: Vec, +} + +impl Writer { + pub fn new(stream: OwnedWriteHalf, packets_to_send: Receiver) -> Self { + Self { + stream, + codec: MinecraftCodec::new(), + packets_to_send, + buffer: Vec::new(), + } + } + + pub async fn run(mut self) -> anyhow::Result<()> { + while let Ok(packet) = self.packets_to_send.recv_async().await { + self.write(packet).await?; + } + Ok(()) + } + + pub async fn write(&mut self, packet: impl Writeable + Debug) -> anyhow::Result<()> { + self.codec.encode(&packet, &mut self.buffer); + self.stream.write_all(&self.buffer).await?; + self.buffer.clear(); + Ok(()) + } +} diff --git a/crates/server/src/entities.rs b/crates/server/src/entities.rs new file mode 100644 index 000000000..25564d149 --- /dev/null +++ b/crates/server/src/entities.rs @@ -0,0 +1,59 @@ +use base::{EntityKind, Position}; +use ecs::{EntityBuilder, EntityRef, SysResult}; +use quill_common::entity_init::EntityInit; +use uuid::Uuid; + +use crate::{Client, NetworkId}; + +/// Component that sends the spawn packet for an entity +/// using its components. +pub struct SpawnPacketSender(fn(&EntityRef, &Client) -> SysResult); + +impl SpawnPacketSender { + pub fn send(&self, entity: &EntityRef, client: &Client) -> SysResult { + (self.0)(entity, client) + } +} + +/// Stores the position of an entity on +/// the previous tick. Used to determine +/// when to send movement updates. +#[derive(Copy, Clone, Debug)] +pub struct PreviousPosition(pub Position); + +pub fn add_entity_components(builder: &mut EntityBuilder, init: &EntityInit) { + if !builder.has::() { + builder.add(NetworkId::new()); + } + builder.add(PreviousPosition(*builder.get::().unwrap())); + add_spawn_packet(builder, init); +} + +fn add_spawn_packet(builder: &mut EntityBuilder, init: &EntityInit) { + // TODO: object entities spawned with Spawn Entity + // (minecarts, items, ...) + let spawn_packet = match init { + EntityInit::Player => spawn_player, + _ => spawn_living_entity, + }; + builder.add(SpawnPacketSender(spawn_packet)); +} + +fn spawn_player(entity: &EntityRef, client: &Client) -> SysResult { + let network_id = *entity.get::()?; + let uuid = *entity.get::()?; + let pos = *entity.get::()?; + + client.send_player(network_id, uuid, pos); + Ok(()) +} + +fn spawn_living_entity(entity: &EntityRef, client: &Client) -> SysResult { + let network_id = *entity.get::()?; + let uuid = *entity.get::()?; + let pos = *entity.get::()?; + let kind = *entity.get::()?; + + client.send_living_entity(network_id, uuid, pos, kind); + Ok(()) +} diff --git a/crates/server/src/favicon.rs b/crates/server/src/favicon.rs new file mode 100644 index 000000000..2bb0a214a --- /dev/null +++ b/crates/server/src/favicon.rs @@ -0,0 +1,35 @@ +use std::fs; + +/// The favicon that appears in the server list on the client. +#[derive(Debug, Clone)] +pub struct Favicon { + base64_encoded: String, +} + +impl Favicon { + /// Creates a favicon from PNG image data. + /// + /// The data is not validated, but malformed + /// PNGs may cause the client to display an error. + pub fn from_png(png_bytes: &[u8]) -> Self { + // See: https://wiki.vg/Server_List_Ping#Response + let base64 = base64::encode(png_bytes); + let prefix = "data:image/png;base64,"; + let base64_encoded = format!("{}{}", prefix, base64); + Self { base64_encoded } + } + + /// Loads the favicon from its default path + /// in the current working directory, `server-icon.png`. + pub fn load_default() -> Option { + let path = "server-icon.png"; + let file_contents = fs::read(path).ok()?; + let favicon = Self::from_png(&file_contents); + Some(favicon) + } + + /// Gets base64-encoded PNG data for the `Response` packet. + pub fn base64_encoded(&self) -> &str { + &self.base64_encoded + } +} diff --git a/crates/server/src/initial_handler.rs b/crates/server/src/initial_handler.rs new file mode 100644 index 000000000..e12eb2d52 --- /dev/null +++ b/crates/server/src/initial_handler.rs @@ -0,0 +1,273 @@ +//! Initial handling of a connection. + +use crate::{connection_worker::Worker, favicon::Favicon}; +use anyhow::bail; +use base::{ProfileProperty, Text}; +use flume::{Receiver, Sender}; +use md5::Digest; +use num_bigint::BigInt; +use once_cell::sync::Lazy; +use protocol::{ + codec::CryptKey, + packets::{ + client::{HandshakeState, Ping}, + server::{EncryptionRequest, LoginSuccess, Pong, Response}, + }, + ClientHandshakePacket, ClientLoginPacket, ClientPlayPacket, ClientStatusPacket, + ServerLoginPacket, ServerPlayPacket, ServerStatusPacket, +}; +use rand::rngs::OsRng; +use rsa::{PaddingScheme, PublicKeyParts, RSAPrivateKey}; +use serde::{Deserialize, Serialize}; +use sha1::Sha1; +use std::convert::TryInto; +use uuid::Uuid; + +const SERVER_NAME: &str = "Feather 1.16.5"; +const PROTOCOL_VERSION: i32 = 754; + +/// Information for a newly connected player. +#[derive(Debug)] +pub struct NewPlayer { + pub uuid: Uuid, + pub username: String, + pub profile: Vec, + + pub received_packets: Receiver, + pub packets_to_send: Sender, +} + +/// Result of initial handling. +pub enum InitialHandling { + /// The client should be disconnected (sent when + /// the connection was just a "status" ping.) + Disconnect, + /// We should create a new player. + Join(NewPlayer), +} + +/// Handles a connection until the protocol state is switched to Play; +/// that is, until we send Login Success. Returns the client's information. +pub async fn handle(worker: &mut Worker) -> anyhow::Result { + // Get the handshake packet. + let handshake = worker.read::().await?; + + let ClientHandshakePacket::Handshake(handshake) = handshake; + + match handshake.next_state { + HandshakeState::Status => handle_status(worker).await, + HandshakeState::Login => handle_login(worker).await, + } +} + +#[derive(Debug, Serialize)] +struct StatusResponse<'a> { + version: Version, + players: Players, + description: Text, + #[serde(skip_serializing_if = "Option::is_none")] + favicon: Option<&'a str>, +} + +#[derive(Debug, Serialize)] +struct Version { + name: &'static str, + protocol: i32, +} + +#[derive(Debug, Serialize)] +struct Players { + max: u32, + online: usize, +} + +async fn handle_status(worker: &mut Worker) -> anyhow::Result { + let _request = worker.read::().await?; + + let payload = StatusResponse { + version: Version { + name: SERVER_NAME, + protocol: PROTOCOL_VERSION, + }, + players: Players { + max: worker.options().max_players, + online: 0, // TODO (1.16): player count + }, + description: Text::from(worker.options().motd.clone()), + favicon: worker + .options() + .favicon + .as_ref() + .map(Favicon::base64_encoded), + }; + let response = Response { + response: serde_json::to_string(&payload)?, + }; + worker + .write(&ServerStatusPacket::Response(response)) + .await?; + + match worker.read::().await { + Ok(ping) => { + let pong = Pong { + payload: ping.payload, + }; + worker.write(&ServerStatusPacket::Pong(pong)).await?; + } + Err(e) => { + log::debug!("Didn't receive ping packet from status call: {}", e); + } + } + + Ok(InitialHandling::Disconnect) +} + +async fn handle_login(worker: &mut Worker) -> anyhow::Result { + let login_start = match worker.read::().await? { + ClientLoginPacket::LoginStart(l) => l, + _ => bail!("expected login start"), + }; + log::debug!("{} is logging in", login_start.name); + + if worker.options().online_mode { + enable_encryption(worker, login_start.name).await + } else { + let profile = offline_mode_profile(login_start.name); + finish_login(worker, profile).await + } +} + +fn offline_mode_profile(username: String) -> AuthResponse { + // TODO: correct offline mode handling + AuthResponse { + id: offline_mode_uuid(&username), + name: username, + properties: Vec::new(), + } +} + +fn offline_mode_uuid(username: &str) -> Uuid { + // See: https://gist.github.com/games647/2b6a00a8fc21fd3b88375f03c9e2e603 + let mut hasher = md5::Md5::default(); + hasher.update(format!("OfflinePlayer:{}", username).as_bytes()); + let hash = hasher.finalize(); + + let mut builder = uuid::Builder::from_bytes(hash.try_into().unwrap()); + + builder + .set_variant(uuid::Variant::RFC4122) + .set_version(uuid::Version::Md5); + + builder.build() +} + +const RSA_BITS: usize = 1024; + +/// Cached RSA key used by this server instance. +static RSA_KEY: Lazy = + Lazy::new(|| RSAPrivateKey::new(&mut OsRng, RSA_BITS).expect("failed to create RSA key")); +static RSA_KEY_ENCODED: Lazy> = Lazy::new(|| { + rsa_der::public_key_to_der(&RSA_KEY.n().to_bytes_be(), &RSA_KEY.e().to_bytes_be()) +}); + +async fn enable_encryption( + worker: &mut Worker, + username: String, +) -> anyhow::Result { + log::debug!("Authenticating {}", username); + let shared_secret = do_encryption_handshake(worker).await?; + worker.enable_encryption(shared_secret); + + let response = authenticate(shared_secret, username).await?; + + finish_login(worker, response).await +} + +async fn do_encryption_handshake(worker: &mut Worker) -> anyhow::Result { + let verify_token: [u8; 16] = rand::random(); + let request = EncryptionRequest { + server_id: String::new(), // always empty + public_key: RSA_KEY_ENCODED.clone(), + verify_token: verify_token.to_vec(), + }; + worker + .write(&ServerLoginPacket::EncryptionRequest(request)) + .await?; + + let response = match worker.read::().await? { + ClientLoginPacket::EncryptionResponse(r) => r, + _ => bail!("expected encryption response"), + }; + + // Decrypt shared secret and verify token. + let shared_secret = RSA_KEY.decrypt(PaddingScheme::PKCS1v15Encrypt, &response.shared_secret)?; + let received_verify_token = + RSA_KEY.decrypt(PaddingScheme::PKCS1v15Encrypt, &response.verify_token)?; + + if received_verify_token != verify_token { + bail!("verify tokens do not match"); + } + + Ok((&shared_secret[..]).try_into()?) +} + +#[derive(Debug, Deserialize)] +struct AuthResponse { + id: Uuid, + name: String, + properties: Vec, +} + +async fn authenticate(shared_secret: CryptKey, username: String) -> anyhow::Result { + let server_hash = compute_server_hash(shared_secret); + + let response: AuthResponse = tokio::task::spawn_blocking(move || { + let url = format!( + "https://sessionserver.mojang.com/session/minecraft/hasJoined?username={}&serverId={}", + username, server_hash + ); + let response = ureq::get(&url).call()?; + + Result::::Ok(response.into_json()?) + }) + .await??; + + Ok(response) +} + +fn compute_server_hash(shared_secret: CryptKey) -> String { + let mut hasher = Sha1::new(); + hasher.update(b""); // server ID - always empty + hasher.update(&shared_secret); + hasher.update(&*RSA_KEY_ENCODED); + hexdigest(&hasher.finalize().as_slice()) +} + +// Non-standard hex digest used by Minecraft. +fn hexdigest(bytes: &[u8]) -> String { + let bigint = BigInt::from_signed_bytes_be(bytes); + format!("{:x}", bigint) +} + +async fn finish_login( + worker: &mut Worker, + response: AuthResponse, +) -> anyhow::Result { + let success = LoginSuccess { + uuid: response.id, + username: response.name.clone(), + }; + worker + .write(&ServerLoginPacket::LoginSuccess(success)) + .await?; + + let new_player = NewPlayer { + username: response.name, + uuid: response.id, + profile: response.properties, + received_packets: worker.received_packets(), + packets_to_send: worker.packets_to_send(), + }; + log::debug!("Completed initial handling for {}", new_player.username); + Ok(InitialHandling::Join(new_player)) +} diff --git a/crates/server/src/lib.rs b/crates/server/src/lib.rs new file mode 100644 index 000000000..0a75adc5c --- /dev/null +++ b/crates/server/src/lib.rs @@ -0,0 +1,139 @@ +#![allow(clippy::unnecessary_wraps)] // systems are required to return Results + +use std::{sync::Arc, time::Instant}; + +use base::Position; +use chunk_subscriptions::ChunkSubscriptions; +use common::Game; +use ecs::SystemExecutor; +use flume::Receiver; +use initial_handler::NewPlayer; +use listener::Listener; + +mod chunk_subscriptions; +pub mod client; +pub mod config; +mod connection_worker; +mod entities; +pub mod favicon; +mod initial_handler; +mod listener; +mod network_id_registry; +mod options; +mod packet_handlers; +mod systems; + +pub use client::{Client, ClientId, Clients}; +pub use network_id_registry::NetworkId; +pub use options::Options; +use systems::view::WaitingChunks; + +/// A Minecraft server. +/// +/// Call [`register`] to register the server +/// with a [`Game`](common::Game). This will +/// cause the server to serve the game to players. +/// +/// Uses asynchronous IO with Tokio. +pub struct Server { + options: Arc, + clients: Clients, + new_players: Receiver, + + waiting_chunks: WaitingChunks, + chunk_subscriptions: ChunkSubscriptions, + + last_keepalive_time: Instant, +} + +impl Server { + /// Starts a server with the given `Options`. + /// + /// Must be called within the context of a Tokio runtime. + pub async fn bind(options: Options) -> anyhow::Result { + let options = Arc::new(options); + + let (new_players_tx, new_players) = flume::bounded(4); + Listener::start(Arc::clone(&options), new_players_tx).await?; + + log::info!( + "Server is listening on {}:{}", + options.bind_address, + options.port + ); + + Ok(Self { + options, + clients: Clients::new(), + new_players, + waiting_chunks: WaitingChunks::default(), + chunk_subscriptions: ChunkSubscriptions::default(), + last_keepalive_time: Instant::now(), + }) + } + + /// Links this server with a `Game` so that players connecting + /// to the server become part of this `Game`. + pub fn link_with_game(self, game: &mut Game, systems: &mut SystemExecutor) { + systems::register(self, game, systems); + game.add_entity_spawn_callback(entities::add_entity_components); + } +} + +/// Low-level functions, mostly used internally. +/// You may find these useful for some custom functionality. +impl Server { + /// Polls for newly connected players. Returns the IDs of the new clients. + pub fn accept_new_players(&mut self) -> Vec { + let mut clients = Vec::new(); + for player in self.new_players.clone().try_iter() { + let id = self.create_client(player); + clients.push(id); + } + clients + } + + /// Removes a client. + pub fn remove_client(&mut self, id: ClientId) { + let client = self.clients.remove(id); + if let Some(client) = client { + log::debug!("Removed client for {}", client.username()); + } + } + + /// Allocates a `NetworkId` for an entity. + pub fn create_network_id(&mut self) -> NetworkId { + NetworkId::new() + } + + fn create_client(&mut self, player: NewPlayer) -> ClientId { + log::debug!("Creating client for {}", player.username); + let network_id = self.create_network_id(); + let client = Client::new(player, Arc::clone(&self.options), network_id); + self.clients.insert(client) + } + + /// Invokes a callback on all clients. + pub fn broadcast_with(&self, mut callback: impl FnMut(&Client)) { + for client in self.clients.iter() { + callback(client); + } + } + + /// Sends a packet to all clients currently subscribed + /// to the given position. This function should be + /// used for entity updates, block updates, etc— + /// any packets that need to be sent only to nearby players. + pub fn broadcast_nearby_with(&self, position: Position, mut callback: impl FnMut(&Client)) { + for &client_id in self.chunk_subscriptions.subscriptions_for(position.chunk()) { + if let Some(client) = self.clients.get(client_id) { + callback(client); + } + } + } + + pub fn broadcast_keepalive(&mut self) { + self.broadcast_with(|client| client.send_keepalive()); + self.last_keepalive_time = Instant::now(); + } +} diff --git a/crates/server/src/listener.rs b/crates/server/src/listener.rs new file mode 100644 index 000000000..71243642c --- /dev/null +++ b/crates/server/src/listener.rs @@ -0,0 +1,54 @@ +use std::{net::SocketAddr, sync::Arc}; + +use anyhow::Context; +use flume::Sender; +use tokio::net::{TcpListener, TcpStream}; + +use crate::{connection_worker::Worker, initial_handler::NewPlayer, options::Options}; + +/// Listens for and accepts incoming connections. +pub struct Listener { + listener: TcpListener, + options: Arc, + new_players: Sender, +} + +impl Listener { + pub async fn start( + options: Arc, + new_players: Sender, + ) -> anyhow::Result<()> { + let listener = TcpListener::bind(format!("{}:{}", options.bind_address, options.port)) + .await + .context("failed to bind to port - maybe a server is already running?")?; + + let listener = Listener { + listener, + options, + new_players, + }; + tokio::task::spawn(async move { + listener.run().await; + }); + + Ok(()) + } + + async fn run(mut self) { + loop { + if let Ok((stream, addr)) = self.listener.accept().await { + self.accept(stream, addr).await; + } + } + } + + async fn accept(&mut self, stream: TcpStream, addr: SocketAddr) { + let worker = Worker::new( + stream, + addr, + Arc::clone(&self.options), + self.new_players.clone(), + ); + worker.start(); + } +} diff --git a/crates/server/src/logging.rs b/crates/server/src/logging.rs new file mode 100644 index 000000000..ecae08af2 --- /dev/null +++ b/crates/server/src/logging.rs @@ -0,0 +1,33 @@ +use colored::Colorize; +use log::{Level, LevelFilter}; + +pub fn init(level: LevelFilter) { + fern::Dispatch::new() + .format(|out, message, record| { + let level_string = match record.level() { + Level::Error => record.level().to_string().red(), + Level::Warn => record.level().to_string().yellow(), + Level::Info => record.level().to_string().cyan(), + Level::Debug => record.level().to_string().purple(), + Level::Trace => record.level().to_string().normal(), + }; + let target = if !record.target().is_empty() { + record.target() + } else { + record.module_path().unwrap_or_default() + }; + out.finish(format_args!( + "{} {:<5} [{}] {}", + chrono::Local::now().format("%Y-%m-%d %H:%M:%S,%3f"), + level_string, + target, + message, + )); + }) + .level(level) + // cranelift_codegen spams debug-level logs + .level_for("cranelift_codegen", LevelFilter::Info) + .chain(std::io::stdout()) + .apply() + .unwrap(); +} diff --git a/crates/server/src/main.rs b/crates/server/src/main.rs new file mode 100644 index 000000000..ebf8dff26 --- /dev/null +++ b/crates/server/src/main.rs @@ -0,0 +1,95 @@ +use std::{cell::RefCell, rc::Rc}; + +use anyhow::Context; +use common::{ + world_source::{flat::FlatWorldSource, region::RegionWorldSource, WorldSource}, + Game, TickLoop, World, +}; +use ecs::SystemExecutor; +use feather_server::Server; +use plugin_host::PluginManager; + +mod logging; + +const PLUGINS_DIRECTORY: &str = "plugins"; +const WORLD_DIRECTORY: &str = "world"; +const CONFIG_PATH: &str = "config.toml"; + +#[tokio::main] +async fn main() -> anyhow::Result<()> { + println!("Loading configuration"); + let config = + feather_server::config::load(CONFIG_PATH).context("failed to load configuration file")?; + logging::init(config.log.level); + + log::info!("Creating server"); + let options = config.to_options(); + let server = Server::bind(options).await?; + + let game = init_game(server)?; + + run(game); + + Ok(()) +} + +fn init_game(server: Server) -> anyhow::Result { + let mut game = Game::new(); + init_systems(&mut game, server); + init_world_source(&mut game); + init_plugin_manager(&mut game)?; + Ok(game) +} + +fn init_systems(game: &mut Game, server: Server) { + let mut systems = SystemExecutor::new(); + + // Register common before server code, so + // that packet broadcasting happens after + // gameplay actions. + common::register(game, &mut systems); + server.link_with_game(game, &mut systems); + + print_systems(&systems); + + game.system_executor = Rc::new(RefCell::new(systems)); +} + +fn init_world_source(game: &mut Game) { + // Load chunks from the world save first, + // and fall back to generating a superflat + // world otherwise. This is a placeholder: + // we don't have proper world generation yet. + let world_source = + RegionWorldSource::new(WORLD_DIRECTORY).with_fallback(FlatWorldSource::new()); + game.world = World::with_source(world_source); +} + +fn init_plugin_manager(game: &mut Game) -> anyhow::Result<()> { + let mut plugin_manager = PluginManager::new(); + plugin_manager.load_plugin_directory(game, PLUGINS_DIRECTORY)?; + + let plugin_manager_rc = Rc::new(RefCell::new(plugin_manager)); + game.insert_resource(plugin_manager_rc); + Ok(()) +} + +fn print_systems(systems: &SystemExecutor) { + let systems: Vec<&str> = systems.system_names().collect(); + log::debug!("---SYSTEMS---\n{:#?}\n", systems); +} + +fn run(game: Game) { + let tick_loop = create_tick_loop(game); + log::debug!("Launching the game loop"); + tick_loop.run(); +} + +fn create_tick_loop(mut game: Game) -> TickLoop { + TickLoop::new(move || { + let systems = Rc::clone(&game.system_executor); + systems.borrow_mut().run(&mut game); + + false + }) +} diff --git a/crates/server/src/network_id_registry.rs b/crates/server/src/network_id_registry.rs new file mode 100644 index 000000000..117c293a0 --- /dev/null +++ b/crates/server/src/network_id_registry.rs @@ -0,0 +1,17 @@ +use std::sync::atomic::{AtomicI32, Ordering}; + +/// An entity's ID used by the protocol +/// in `entity_id` fields. +#[derive(Copy, Clone, Debug, PartialEq, Eq, Hash)] +pub struct NetworkId(pub i32); + +impl NetworkId { + /// Creates a new, unique network ID. + pub(crate) fn new() -> Self { + static NEXT: AtomicI32 = AtomicI32::new(0); + // In theory, this can overflow if the server + // creates 4 billion entities. The hope is that + // old entities will have died out at that point. + Self(NEXT.fetch_add(1, Ordering::SeqCst)) + } +} diff --git a/crates/server/src/options.rs b/crates/server/src/options.rs new file mode 100644 index 000000000..c67e2a679 --- /dev/null +++ b/crates/server/src/options.rs @@ -0,0 +1,30 @@ +use base::Gamemode; + +use crate::favicon::Favicon; + +/// Options for building a [`Server`](crate::Server). +#[derive(Debug, Clone)] +pub struct Options { + /// Port to listen on. + pub port: u16, + /// Addresses to bind to. + pub bind_address: String, + + /// The server favicon. + pub favicon: Option, + /// The server MOTD. + pub motd: String, + + /// Whether the server should authenticate players. + pub online_mode: bool, + + /// The maximum view distance, which determines + /// how far players can see. + pub view_distance: u32, + + /// Maximum number of players to allow on the server. + pub max_players: u32, + + /// The default gamemode for new players. + pub default_gamemode: Gamemode, +} diff --git a/crates/server/src/packet_handlers.rs b/crates/server/src/packet_handlers.rs new file mode 100644 index 000000000..9d0947ba5 --- /dev/null +++ b/crates/server/src/packet_handlers.rs @@ -0,0 +1,121 @@ +use base::{Position, Text}; +use common::{chat::ChatKind, Game}; +use digging::handle_player_digging; +use ecs::{Entity, EntityRef, SysResult}; +use protocol::{ + packets::{ + client, + server::{Animation, Hand}, + }, + ClientPlayPacket, +}; +use quill_common::components::Name; + +use crate::{NetworkId, Server}; + +mod digging; +pub mod inventory; +mod movement; + +/// Handles a packet received from a client. +pub fn handle_packet( + game: &mut Game, + server: &mut Server, + player_id: Entity, + packet: ClientPlayPacket, +) -> SysResult { + let player = game.ecs.entity(player_id)?; + match packet { + ClientPlayPacket::PlayerPosition(packet) => { + movement::handle_player_position(server, player, packet) + } + ClientPlayPacket::PlayerPositionAndRotation(packet) => { + movement::handle_player_position_and_rotation(server, player, packet) + } + ClientPlayPacket::PlayerRotation(packet) => { + movement::handle_player_rotation(server, player, packet) + } + ClientPlayPacket::PlayerMovement(packet) => { + movement::handle_player_movement(player, packet) + } + + ClientPlayPacket::Animation(packet) => handle_animation(server, player, packet), + + ClientPlayPacket::ChatMessage(packet) => handle_chat_message(game, player, packet), + + ClientPlayPacket::PlayerDigging(packet) => handle_player_digging(game, packet, player_id), + + ClientPlayPacket::CreativeInventoryAction(packet) => { + inventory::handle_creative_inventory_action(player, packet) + } + ClientPlayPacket::ClickWindow(packet) => { + inventory::handle_click_window(server, player, packet) + } + + ClientPlayPacket::TeleportConfirm(_) + | ClientPlayPacket::QueryBlockNbt(_) + | ClientPlayPacket::SetDifficulty(_) + | ClientPlayPacket::ClientStatus(_) + | ClientPlayPacket::ClientSettings(_) + | ClientPlayPacket::TabComplete(_) + | ClientPlayPacket::WindowConfirmation(_) + | ClientPlayPacket::ClickWindowButton(_) + | ClientPlayPacket::CloseWindow(_) + | ClientPlayPacket::PluginMessage(_) + | ClientPlayPacket::EditBook(_) + | ClientPlayPacket::QueryEntityNbt(_) + | ClientPlayPacket::InteractEntity(_) + | ClientPlayPacket::GenerateStructure(_) + | ClientPlayPacket::KeepAlive(_) + | ClientPlayPacket::LockDifficulty(_) + | ClientPlayPacket::VehicleMove(_) + | ClientPlayPacket::SteerBoat(_) + | ClientPlayPacket::PickItem(_) + | ClientPlayPacket::CraftRecipeRequest(_) + | ClientPlayPacket::PlayerAbilities(_) + | ClientPlayPacket::EntityAction(_) + | ClientPlayPacket::SteerVehicle(_) + | ClientPlayPacket::SetDisplayedRecipe(_) + | ClientPlayPacket::SetRecipeBookState(_) + | ClientPlayPacket::NameItem(_) + | ClientPlayPacket::ResourcePackStatus(_) + | ClientPlayPacket::AdvancementTab(_) + | ClientPlayPacket::SelectTrade(_) + | ClientPlayPacket::SetBeaconEffect(_) + | ClientPlayPacket::HeldItemChange(_) + | ClientPlayPacket::UpdateCommandBlock(_) + | ClientPlayPacket::UpdateCommandBlockMinecart(_) + | ClientPlayPacket::UpdateJigsawBlock(_) + | ClientPlayPacket::UpdateStructureBlock(_) + | ClientPlayPacket::UpdateSign(_) + | ClientPlayPacket::Spectate(_) + | ClientPlayPacket::PlayerBlockPlacement(_) + | ClientPlayPacket::UseItem(_) => Ok(()), + } +} + +fn handle_animation( + server: &mut Server, + player: EntityRef, + packet: client::Animation, +) -> SysResult { + let pos = *player.get::()?; + let network_id = *player.get::()?; + + let animation = match packet.hand { + Hand::Main => Animation::SwingMainArm, + Hand::Off => Animation::SwingOffhand, + }; + + server.broadcast_nearby_with(pos, |client| { + client.send_entity_animation(network_id, animation.clone()) + }); + Ok(()) +} + +fn handle_chat_message(game: &Game, player: EntityRef, packet: client::ChatMessage) -> SysResult { + let name = player.get::()?; + let message = Text::translate_with("chat.type.text", vec![name.to_string(), packet.message]); + game.broadcast_chat(ChatKind::PlayerChat, message); + Ok(()) +} diff --git a/crates/server/src/packet_handlers/digging.rs b/crates/server/src/packet_handlers/digging.rs new file mode 100644 index 000000000..edc0dead1 --- /dev/null +++ b/crates/server/src/packet_handlers/digging.rs @@ -0,0 +1,21 @@ +use common::Game; +use ecs::{Entity, SysResult}; +use protocol::packets::client::{PlayerDigging, PlayerDiggingStatus}; + +/// Handles the Player Digging packet sent for the following +/// actions: +/// * Breaking blocks. +/// * Dropping items. +/// * Shooting arrows. +/// * Eating. +/// * Swapping items between the main and off hand. +pub fn handle_player_digging(game: &mut Game, packet: PlayerDigging, _player: Entity) -> SysResult { + log::trace!("Got player digging with status {:?}", packet.status); + match packet.status { + PlayerDiggingStatus::StartDigging | PlayerDiggingStatus::CancelDigging => { + game.break_block_at(packet.position); + Ok(()) + } + _ => Ok(()), + } +} diff --git a/crates/server/src/packet_handlers/inventory.rs b/crates/server/src/packet_handlers/inventory.rs new file mode 100644 index 000000000..c0e060244 --- /dev/null +++ b/crates/server/src/packet_handlers/inventory.rs @@ -0,0 +1,162 @@ +use anyhow::bail; +use base::Gamemode; +use common::{window::BackingWindow, Window}; +use ecs::{EntityRef, SysResult}; +use protocol::packets::client::{ClickWindow, CreativeInventoryAction}; + +use crate::{ClientId, Server}; + +pub fn handle_creative_inventory_action( + player: EntityRef, + packet: CreativeInventoryAction, +) -> SysResult { + if *player.get::()? != Gamemode::Creative { + bail!("cannot use Creative Inventory Action outside of creative mode"); + } + + if packet.slot != -1 { + let window = player.get::()?; + if !matches!(window.inner(), BackingWindow::Player { .. }) { + bail!("cannot use Creative Inventory Action in external inventories"); + } + + window + .inner() + .set_item(packet.slot as usize, packet.clicked_item)?; + } + + Ok(()) +} + +pub fn handle_click_window( + server: &mut Server, + player: EntityRef, + packet: ClickWindow, +) -> SysResult { + let result = _handle_click_window(&player, &packet); + + let client = server.clients.get(*player.get::()?).unwrap(); + client.confirm_window_action( + packet.window_id, + packet.action_number as i16, + result.is_ok(), + ); + + let window = player.get::()?; + + if packet.slot >= 0 { + client.set_slot(packet.slot, window.item(packet.slot as usize)?.clone()); + } + client.set_cursor_slot(window.cursor_item()); + + client.send_window_items(&*window); + + result +} + +fn _handle_click_window(player: &EntityRef, packet: &ClickWindow) -> SysResult { + let mut window = player.get_mut::()?; + match packet.mode { + 0 => match packet.button { + 0 => window.left_click(packet.slot as usize)?, + 1 => window.right_click(packet.slot as usize)?, + _ => bail!("unrecgonized click"), + }, + 1 => window.shift_click(packet.slot as usize)?, + 5 => match packet.button { + 0 => window.begin_left_mouse_paint(), + 4 => window.begin_right_mouse_paint(), + 1 | 5 => window.add_paint_slot(packet.slot as usize)?, + 2 | 6 => window.end_paint()?, + _ => bail!("unrecognized paint operation"), + }, + _ => bail!("unsupported window click mode"), + }; + + Ok(()) +} + +#[cfg(test)] +mod tests { + use base::{Inventory, Item, ItemStack}; + use common::Game; + + use super::*; + + #[test] + fn creative_inventory_action_survival_mode() { + let mut game = Game::new(); + let entity = game.ecs.spawn((Gamemode::Survival, player_window())); + let player = game.ecs.entity(entity).unwrap(); + + let packet = CreativeInventoryAction { + slot: 10, + clicked_item: Some(ItemStack::new(Item::Diamond, 64)), + }; + handle_creative_inventory_action(player, packet).unwrap_err(); + + assert!(game + .ecs + .get::(entity) + .unwrap() + .item(10) + .unwrap() + .is_none()); + } + + #[test] + fn creative_inventory_action_non_player_window() { + let mut game = Game::new(); + let entity = game.ecs.spawn(( + Window::new(BackingWindow::Generic9x3 { + player: Inventory::player(), + block: Inventory::chest(), + }), + Gamemode::Creative, + )); + let player = game.ecs.entity(entity).unwrap(); + + let packet = CreativeInventoryAction { + slot: 5, + clicked_item: Some(ItemStack::new(Item::Diamond, 64)), + }; + handle_creative_inventory_action(player, packet).unwrap_err(); + + assert!(game + .ecs + .get::(entity) + .unwrap() + .item(5) + .unwrap() + .is_none()); + } + + #[test] + fn creative_inventory_action() { + let mut game = Game::new(); + let entity = game.ecs.spawn((Gamemode::Creative, player_window())); + let player = game.ecs.entity(entity).unwrap(); + + let packet = CreativeInventoryAction { + slot: 5, + clicked_item: Some(ItemStack::new(Item::Diamond, 64)), + }; + handle_creative_inventory_action(player, packet).unwrap(); + + assert_eq!( + game.ecs + .get::(entity) + .unwrap() + .item(5) + .unwrap() + .clone(), + Some(ItemStack::new(Item::Diamond, 64)) + ); + } + + fn player_window() -> Window { + Window::new(BackingWindow::Player { + player: Inventory::player(), + }) + } +} diff --git a/crates/server/src/packet_handlers/movement.rs b/crates/server/src/packet_handlers/movement.rs new file mode 100644 index 000000000..5d31ad8d2 --- /dev/null +++ b/crates/server/src/packet_handlers/movement.rs @@ -0,0 +1,91 @@ +use base::Position; +use ecs::{EntityRef, SysResult}; +use protocol::packets::client::{ + PlayerMovement, PlayerPosition, PlayerPositionAndRotation, PlayerRotation, +}; +use quill_common::components::OnGround; + +use crate::{ClientId, Server}; + +/// If a player has been teleported by the server, +/// we don't want to override their position if +/// we receive a movement packet before the client +/// is aware of the position update. +fn should_skip_movement(server: &Server, player: &EntityRef) -> SysResult { + if let Some(client) = server.clients.get(*player.get::()?) { + let server_position = *player.get::()?; + let client_position = client.client_known_position(); + if let Some(client_position) = client_position { + if client_position != server_position { + // Player has been teleported by the server. + // Don't override. + return Ok(true); + } + } + } + Ok(false) +} + +pub fn handle_player_movement(player: EntityRef, packet: PlayerMovement) -> SysResult { + player.get_mut::()?.0 = packet.on_ground; + Ok(()) +} + +pub fn handle_player_position( + server: &Server, + player: EntityRef, + packet: PlayerPosition, +) -> SysResult { + if should_skip_movement(server, &player)? { + return Ok(()); + } + let mut pos = player.get_mut::()?; + pos.x = packet.x; + pos.y = packet.feet_y; + pos.z = packet.z; + player.get_mut::()?.0 = packet.on_ground; + update_client_position(server, player, *pos)?; + Ok(()) +} + +pub fn handle_player_position_and_rotation( + server: &Server, + player: EntityRef, + packet: PlayerPositionAndRotation, +) -> SysResult { + if should_skip_movement(server, &player)? { + return Ok(()); + } + let mut pos = player.get_mut::()?; + pos.x = packet.x; + pos.y = packet.feet_y; + pos.z = packet.z; + pos.yaw = packet.yaw; + pos.pitch = packet.pitch; + player.get_mut::()?.0 = packet.on_ground; + update_client_position(server, player, *pos)?; + Ok(()) +} + +pub fn handle_player_rotation( + server: &Server, + player: EntityRef, + packet: PlayerRotation, +) -> SysResult { + if should_skip_movement(server, &player)? { + return Ok(()); + } + let mut pos = player.get_mut::()?; + pos.yaw = packet.yaw; + pos.pitch = packet.pitch; + player.get_mut::()?.0 = packet.on_ground; + update_client_position(server, player, *pos)?; + Ok(()) +} + +fn update_client_position(server: &Server, player: EntityRef, pos: Position) -> SysResult { + if let Some(client) = server.clients.get(*player.get::()?) { + client.set_client_known_position(pos); + } + Ok(()) +} diff --git a/crates/server/src/systems.rs b/crates/server/src/systems.rs new file mode 100644 index 000000000..746486949 --- /dev/null +++ b/crates/server/src/systems.rs @@ -0,0 +1,77 @@ +//! Systems linking a `Server` and a `Game`. + +mod chat; +mod entity; +mod player_join; +mod player_leave; +mod tablist; +pub mod view; + +use std::time::{Duration, Instant}; + +use common::Game; +use ecs::{SysResult, SystemExecutor}; +use quill_common::components::Name; + +use crate::{client::ClientId, Server}; + +/// Registers systems for a `Server` with a `Game`. +pub fn register(server: Server, game: &mut Game, systems: &mut SystemExecutor) { + game.insert_resource(server); + + player_join::register(systems); + systems + .group::() + .add_system(handle_packets) + .add_system(send_keepalives); + view::register(game, systems); + crate::chunk_subscriptions::register(systems); + player_leave::register(systems); + tablist::register(systems); + entity::register(game, systems); + chat::register(game, systems); + systems.group::().add_system(tick_clients); +} + +/// Polls for packets received from clients +/// and handles them. +fn handle_packets(game: &mut Game, server: &mut Server) -> SysResult { + let mut packets = Vec::new(); + + for (player, &client_id) in game.ecs.query::<&ClientId>().iter() { + if let Some(client) = server.clients.get(client_id) { + for packet in client.received_packets() { + packets.push((player, packet)); + } + } + } + + for (player, packet) in packets { + if let Err(e) = crate::packet_handlers::handle_packet(game, server, player, packet) { + log::warn!( + "Failed to handle packet from '{}': {:?}", + &**game.ecs.get::(player)?, + e + ); + } + } + + Ok(()) +} + +/// Sends out keepalive packets at an interval. +fn send_keepalives(_game: &mut Game, server: &mut Server) -> SysResult { + let interval = Duration::from_secs(5); + if server.last_keepalive_time + interval < Instant::now() { + server.broadcast_keepalive(); + } + Ok(()) +} + +/// Ticks `Client`s. +fn tick_clients(_game: &mut Game, server: &mut Server) -> SysResult { + for client in server.clients.iter() { + client.tick(); + } + Ok(()) +} diff --git a/crates/server/src/systems/chat.rs b/crates/server/src/systems/chat.rs new file mode 100644 index 000000000..ec9751895 --- /dev/null +++ b/crates/server/src/systems/chat.rs @@ -0,0 +1,45 @@ +use common::{chat::ChatPreference, ChatBox, Game}; +use ecs::{EntityBuilder, SysResult, SystemExecutor}; + +use crate::{ClientId, Server}; + +/// Marker component for the console entity. +struct Console; + +pub fn register(game: &mut Game, systems: &mut SystemExecutor) { + // Create the console entity so the console can receive messages + let mut console = EntityBuilder::new(); + console.add(Console).add(ChatBox::new(ChatPreference::All)); + + // We can use the raw spawn method because + // the console isn't a "normal" entity. + game.ecs.spawn(console.build()); + + systems.add_system(flush_console_chat_box); + systems.group::().add_system(flush_chat_boxes); +} + +/// Flushes players' chat mailboxes and sends the needed packets. +fn flush_chat_boxes(game: &mut Game, server: &mut Server) -> SysResult { + for (_, (&client_id, mailbox)) in game.ecs.query::<(&ClientId, &mut ChatBox)>().iter() { + if let Some(client) = server.clients.get(client_id) { + for message in mailbox.drain() { + client.send_chat_message(message); + } + } + } + + Ok(()) +} + +/// Prints chat messages to the console. +fn flush_console_chat_box(game: &mut Game) -> SysResult { + for (_, (_console, mailbox)) in game.ecs.query::<(&Console, &mut ChatBox)>().iter() { + for message in mailbox.drain() { + // TODO: properly display chat message + log::info!("{:?}", message.text()); + } + } + + Ok(()) +} diff --git a/crates/server/src/systems/entity.rs b/crates/server/src/systems/entity.rs new file mode 100644 index 000000000..80a2b3bf4 --- /dev/null +++ b/crates/server/src/systems/entity.rs @@ -0,0 +1,33 @@ +//! Sends entity-related packets to clients. +//! Spawn packets, position updates, equipment, animations, etc. + +use base::Position; +use common::Game; +use ecs::{SysResult, SystemExecutor}; +use quill_common::components::OnGround; + +use crate::{entities::PreviousPosition, NetworkId, Server}; + +mod spawn_packet; + +pub fn register(game: &mut Game, systems: &mut SystemExecutor) { + spawn_packet::register(game, systems); + systems.group::().add_system(send_entity_movement); +} + +/// Sends entity movement packets. +fn send_entity_movement(game: &mut Game, server: &mut Server) -> SysResult { + for (_, (&position, prev_position, &on_ground, &network_id)) in game + .ecs + .query::<(&Position, &mut PreviousPosition, &OnGround, &NetworkId)>() + .iter() + { + if position != prev_position.0 { + server.broadcast_nearby_with(position, |client| { + client.update_entity_position(network_id, position, on_ground); + }); + prev_position.0 = position; + } + } + Ok(()) +} diff --git a/crates/server/src/systems/entity/spawn_packet.rs b/crates/server/src/systems/entity/spawn_packet.rs new file mode 100644 index 000000000..fcb4ea03a --- /dev/null +++ b/crates/server/src/systems/entity/spawn_packet.rs @@ -0,0 +1,125 @@ +use ahash::AHashSet; +use anyhow::Context; +use base::Position; +use common::{ + events::{ChunkCrossEvent, EntityCreateEvent, EntityRemoveEvent, ViewUpdateEvent}, + Game, +}; +use ecs::{SysResult, SystemExecutor}; + +use crate::{entities::SpawnPacketSender, ClientId, NetworkId, Server}; + +pub fn register(_game: &mut Game, systems: &mut SystemExecutor) { + systems + .group::() + .add_system(update_visible_entities) + .add_system(send_entities_when_created) + .add_system(unload_entities_when_removed) + .add_system(update_entities_on_chunk_cross); +} + +/// System to spawn entities on clients when they become visible, +/// and despawn entities when they become invisible, based on the client's view. +pub fn update_visible_entities(game: &mut Game, server: &mut Server) -> SysResult { + for (player, (event, &client_id)) in game.ecs.query::<(&ViewUpdateEvent, &ClientId)>().iter() { + let client = match server.clients.get(client_id) { + Some(client) => client, + None => continue, + }; + + // Send newly visible entities + for &new_chunk in &event.new_chunks { + for &entity_id in game.chunk_entities.entities_in_chunk(new_chunk) { + if entity_id != player { + let entity_ref = game.ecs.entity(entity_id)?; + if let Ok(spawn_packet) = entity_ref.get::() { + spawn_packet + .send(&entity_ref, client) + .context("failed to send spawn packet")?; + } + } + } + } + + // Unload entities no longer visible + for &old_chunk in &event.old_chunks { + for &entity_id in game.chunk_entities.entities_in_chunk(old_chunk) { + if entity_id != player { + if let Ok(network_id) = game.ecs.get::(entity_id) { + client.unload_entity(*network_id); + } + } + } + } + } + + Ok(()) +} + +/// System to send an entity to clients when it is created. +fn send_entities_when_created(game: &mut Game, server: &mut Server) -> SysResult { + for (entity, (_event, &position, spawn_packet)) in game + .ecs + .query::<(&EntityCreateEvent, &Position, &SpawnPacketSender)>() + .iter() + { + let entity_ref = game.ecs.entity(entity)?; + server.broadcast_nearby_with(position, |client| { + spawn_packet + .send(&entity_ref, client) + .expect("failed to create spawn packet") + }); + } + + Ok(()) +} + +/// System to unload an entity on clients when it is removed. +fn unload_entities_when_removed(game: &mut Game, server: &mut Server) -> SysResult { + for (_, (_event, &position, &network_id)) in game + .ecs + .query::<(&EntityRemoveEvent, &Position, &NetworkId)>() + .iter() + { + server.broadcast_nearby_with(position, |client| client.unload_entity(network_id)); + } + + Ok(()) +} + +/// System to send/unsend entities on clients when the entity changes chunks. +fn update_entities_on_chunk_cross(game: &mut Game, server: &mut Server) -> SysResult { + for (entity, (event, spawn_packet, &network_id)) in game + .ecs + .query::<(&ChunkCrossEvent, &SpawnPacketSender, &NetworkId)>() + .iter() + { + let old_clients: AHashSet<_> = server + .chunk_subscriptions + .subscriptions_for(event.old_chunk) + .iter() + .copied() + .collect(); + let new_clients: AHashSet<_> = server + .chunk_subscriptions + .subscriptions_for(event.new_chunk) + .iter() + .copied() + .collect(); + + for left_client in old_clients.difference(&new_clients) { + if let Some(client) = server.clients.get(*left_client) { + client.unload_entity(network_id); + } + } + + let entity_ref = game.ecs.entity(entity)?; + for send_client in new_clients.difference(&old_clients) { + if let Some(client) = server.clients.get(*send_client) { + spawn_packet.send(&entity_ref, client)?; + } + } + } + + Ok(()) +} diff --git a/crates/server/src/systems/player_join.rs b/crates/server/src/systems/player_join.rs new file mode 100644 index 000000000..28144cc89 --- /dev/null +++ b/crates/server/src/systems/player_join.rs @@ -0,0 +1,65 @@ +use base::{Inventory, Position, Text}; +use common::{ + chat::{ChatKind, ChatPreference}, + view::View, + window::BackingWindow, + ChatBox, Game, Window, +}; +use ecs::{SysResult, SystemExecutor}; +use quill_common::{components::Name, entity_init::EntityInit}; + +use crate::{ClientId, Server}; + +pub fn register(systems: &mut SystemExecutor) { + systems.group::().add_system(poll_new_players); +} + +/// Polls for new clients and sends them the necessary packets +/// to join the game. +fn poll_new_players(game: &mut Game, server: &mut Server) -> SysResult { + for client_id in server.accept_new_players() { + accept_new_player(game, server, client_id)?; + } + Ok(()) +} + +fn accept_new_player(game: &mut Game, server: &mut Server, client_id: ClientId) -> SysResult { + let client = server.clients.get(client_id).unwrap(); + client.send_join_game(server.options.default_gamemode); + client.send_brand(); + + let mut builder = game.create_entity_builder(Position::default(), EntityInit::Player); + + let inventory = Inventory::player(); + let window = Window::new(BackingWindow::Player { + player: inventory.new_handle(), + }); + + client.send_window_items(&window); + + builder + .add(client.network_id()) + .add(client_id) + .add(View::new( + Position::default().chunk(), + server.options.view_distance, + )) + .add(server.options.default_gamemode) + .add(Name::new(client.username())) + .add(client.uuid()) + .add(client.profile().to_vec()) + .add(ChatBox::new(ChatPreference::All)) + .add(inventory) + .add(window); + + game.spawn_entity(builder); + + broadcast_player_join(game, client.username()); + + Ok(()) +} + +fn broadcast_player_join(game: &mut Game, username: &str) { + let message = Text::translate_with("multiplayer.player.joined", vec![username.to_owned()]); + game.broadcast_chat(ChatKind::System, message); +} diff --git a/crates/server/src/systems/player_leave.rs b/crates/server/src/systems/player_leave.rs new file mode 100644 index 000000000..f7f582115 --- /dev/null +++ b/crates/server/src/systems/player_leave.rs @@ -0,0 +1,35 @@ +use base::Text; +use common::{chat::ChatKind, Game}; +use ecs::{SysResult, SystemExecutor}; +use quill_common::components::Name; + +use crate::{ClientId, Server}; + +pub fn register(systems: &mut SystemExecutor) { + systems + .group::() + .add_system(remove_disconnected_clients); +} + +fn remove_disconnected_clients(game: &mut Game, server: &mut Server) -> SysResult { + let mut entities_to_remove = Vec::new(); + for (player, (&client_id, name)) in game.ecs.query::<(&ClientId, &Name)>().iter() { + let client = server.clients.get(client_id).unwrap(); + if client.is_disconnected() { + server.remove_client(client_id); + entities_to_remove.push(player); + broadcast_player_leave(game, name); + } + } + + for player in entities_to_remove { + game.remove_entity(player)?; + } + + Ok(()) +} + +fn broadcast_player_leave(game: &Game, username: &Name) { + let message = Text::translate_with("multiplayer.player.left", vec![username.to_string()]); + game.broadcast_chat(ChatKind::System, message); +} diff --git a/crates/server/src/systems/tablist.rs b/crates/server/src/systems/tablist.rs new file mode 100644 index 000000000..2f38b6aa9 --- /dev/null +++ b/crates/server/src/systems/tablist.rs @@ -0,0 +1,64 @@ +//! Sends tablist info to clients via the Player Info packet. + +use base::{Gamemode, ProfileProperty}; +use common::{ + events::{EntityRemoveEvent, PlayerJoinEvent}, + Game, +}; +use ecs::{SysResult, SystemExecutor}; +use quill_common::{components::Name, entities::Player}; +use uuid::Uuid; + +use crate::{ClientId, Server}; + +pub fn register(systems: &mut SystemExecutor) { + systems + .group::() + .add_system(remove_tablist_players) + .add_system(add_tablist_players); +} + +fn remove_tablist_players(game: &mut Game, server: &mut Server) -> SysResult { + for (_, (_event, _player, &uuid)) in game + .ecs + .query::<(&EntityRemoveEvent, &Player, &Uuid)>() + .iter() + { + server.broadcast_with(|client| client.remove_tablist_player(uuid)); + } + Ok(()) +} + +fn add_tablist_players(game: &mut Game, server: &mut Server) -> SysResult { + for (player, (_, &client_id, &uuid, name, &gamemode, profile)) in game + .ecs + .query::<( + &PlayerJoinEvent, + &ClientId, + &Uuid, + &Name, + &Gamemode, + &Vec, + )>() + .iter() + { + // Add this player to other players' tablists + server.broadcast_with(|client| { + client.add_tablist_player(uuid, name.to_string(), profile, gamemode) + }); + + // Add other players to this player's tablist + for (other_player, (&uuid, name, &gamemode, profile)) in game + .ecs + .query::<(&Uuid, &Name, &Gamemode, &Vec)>() + .iter() + { + if let Some(client) = server.clients.get(client_id) { + if other_player != player { + client.add_tablist_player(uuid, name.to_string(), profile, gamemode); + } + } + } + } + Ok(()) +} diff --git a/crates/server/src/systems/view.rs b/crates/server/src/systems/view.rs new file mode 100644 index 000000000..7667caa14 --- /dev/null +++ b/crates/server/src/systems/view.rs @@ -0,0 +1,108 @@ +//! Sends and unloads entities and chunks for a client. +//! +//! The entities and chunks visible to each client are +//! determined based on the player's [`View`]. + +use ahash::AHashMap; +use base::{ChunkPosition, Position}; +use common::{ + events::{ChunkLoadEvent, ViewUpdateEvent}, + Game, +}; +use ecs::{Entity, SysResult, SystemExecutor}; + +use crate::{Client, ClientId, Server}; + +pub fn register(_game: &mut Game, systems: &mut SystemExecutor) { + systems + .group::() + .add_system(send_new_chunks) + .add_system(send_loaded_chunks); +} + +/// Stores the players waiting on chunks that are currently being loaded. +#[derive(Default)] +pub struct WaitingChunks(AHashMap>); + +impl WaitingChunks { + pub fn drain_players_waiting_for(&mut self, chunk: ChunkPosition) -> Vec { + self.0.remove(&chunk).unwrap_or_default() + } + + pub fn insert(&mut self, player: Entity, chunk: ChunkPosition) { + self.0.entry(chunk).or_default().push(player); + } +} + +fn send_new_chunks(game: &mut Game, server: &mut Server) -> SysResult { + for (player, (&client_id, event, &position)) in game + .ecs + .query::<(&ClientId, &ViewUpdateEvent, &Position)>() + .iter() + { + let client = server.clients.get(client_id).unwrap(); + client.update_own_chunk(event.new_view.center()); + update_chunks( + game, + player, + client, + event, + position, + &mut server.waiting_chunks, + )?; + } + Ok(()) +} + +fn update_chunks( + game: &Game, + player: Entity, + client: &Client, + event: &ViewUpdateEvent, + position: Position, + waiting_chunks: &mut WaitingChunks, +) -> SysResult { + // Send chunks that are in the new view but not the old view. + for &pos in &event.new_chunks { + if let Some(chunk) = game.world.chunk_map().chunk_handle_at(pos) { + client.send_chunk(&chunk); + } else { + waiting_chunks.insert(player, pos); + } + } + + // Unsend the chunks that are in the old view but not the new view. + for &pos in &event.old_chunks { + client.unload_chunk(pos); + } + + spawn_client_if_needed(client, position); + + Ok(()) +} + +/// Sends newly loaded chunks to players currently +/// waiting for those chunks to load. +fn send_loaded_chunks(game: &mut Game, server: &mut Server) -> SysResult { + for (_, event) in game.ecs.query::<&ChunkLoadEvent>().iter() { + for player in server + .waiting_chunks + .drain_players_waiting_for(event.position) + { + if let Ok(client_id) = game.ecs.get::(player) { + if let Some(client) = server.clients.get(*client_id) { + client.send_chunk(&event.chunk); + spawn_client_if_needed(client, *game.ecs.get::(player)?); + } + } + } + } + Ok(()) +} + +fn spawn_client_if_needed(client: &Client, pos: Position) { + if !client.knows_own_position() && client.known_chunks() >= 9 * 9 { + log::debug!("Sent all chunks to {}; now spawning", client.username()); + client.update_own_position(pos); + } +} diff --git a/crates/utils/Cargo.toml b/crates/utils/Cargo.toml new file mode 100644 index 000000000..11f23bd67 --- /dev/null +++ b/crates/utils/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "feather-utils" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" + +[dependencies] + +[dev-dependencies] +simple_logger = "1" diff --git a/crates/utils/src/lib.rs b/crates/utils/src/lib.rs new file mode 100644 index 000000000..ead41e358 --- /dev/null +++ b/crates/utils/src/lib.rs @@ -0,0 +1,9 @@ +//! Assorted utilities not directly related to Minecraft/Feather. + +/// Swap-removes an item from a vector by equality. +pub fn vec_remove_item(vec: &mut Vec, item: &T) { + let index = vec.iter().position(|x| x == item); + if let Some(index) = index { + vec.swap_remove(index); + } +} diff --git a/server/worldgen/Cargo.toml b/crates/worldgen/Cargo.toml similarity index 71% rename from server/worldgen/Cargo.toml rename to crates/worldgen/Cargo.toml index edf6249ff..520de3fb5 100644 --- a/server/worldgen/Cargo.toml +++ b/crates/worldgen/Cargo.toml @@ -1,21 +1,21 @@ [package] -name = "feather-server-worldgen" +name = "feather-worldgen" version = "0.6.0" authors = ["caelunshun "] edition = "2018" [dependencies] -feather-core = { path = "../../core" } +base = { path = "../base", package = "feather-base" } -bitvec = "0.17" -smallvec = "1.4" +bitvec = "0.21" +smallvec = "1" rand = "0.7" rand_xorshift = "0.2" num-traits = "0.2" simdnoise = { git = "https://github.com/jackmott/rust-simd-noise", rev = "6349670" } # needed for https://github.com/jackmott/rust-simd-noise/pull/31 log = "0.4" -once_cell = "1.3" -strum = "0.18" +once_cell = "1" +strum = "0.19" [dev-dependencies] approx = "0.3" diff --git a/server/worldgen/src/biomes/distorted_voronoi.rs b/crates/worldgen/src/biomes/distorted_voronoi.rs similarity index 92% rename from server/worldgen/src/biomes/distorted_voronoi.rs rename to crates/worldgen/src/biomes/distorted_voronoi.rs index c44f31881..c8a5c15a8 100644 --- a/server/worldgen/src/biomes/distorted_voronoi.rs +++ b/crates/worldgen/src/biomes/distorted_voronoi.rs @@ -1,11 +1,8 @@ use crate::voronoi::VoronoiGrid; use crate::{BiomeGenerator, ChunkBiomes}; -use feather_core::biomes::Biome; -use feather_core::util::ChunkPosition; -use num_traits::FromPrimitive; +use base::{Biome, ChunkPosition}; use rand::{Rng, SeedableRng}; use rand_xorshift::XorShiftRng; -use strum::EnumCount; /// Biome grid generator based on a distorted Voronoi /// noise. @@ -51,9 +48,9 @@ impl BiomeGenerator for DistortedVoronoiBiomeGenerator { let mut rng = XorShiftRng::seed_from_u64(combined as u64); loop { - let shifted: u64 = rng.gen(); + let shifted: u32 = rng.gen(); - let biome = Biome::from_u64(shifted % Biome::count() as u64).unwrap(); + let biome = Biome::from_id(shifted % 60).unwrap(); if is_biome_allowed(biome) { biomes.set_biome_at(x, z, biome); break; @@ -72,7 +69,10 @@ fn is_biome_allowed(biome: Biome) -> bool { biome, Biome::TheEnd | Biome::TheVoid - | Biome::Nether + | Biome::NetherWastes + | Biome::CrimsonForest + | Biome::WarpedForest + | Biome::BasaltDeltas | Biome::SmallEndIslands | Biome::EndBarrens | Biome::EndHighlands diff --git a/server/worldgen/src/biomes/mod.rs b/crates/worldgen/src/biomes/mod.rs similarity index 100% rename from server/worldgen/src/biomes/mod.rs rename to crates/worldgen/src/biomes/mod.rs diff --git a/server/worldgen/src/biomes/two_level.rs b/crates/worldgen/src/biomes/two_level.rs similarity index 97% rename from server/worldgen/src/biomes/two_level.rs rename to crates/worldgen/src/biomes/two_level.rs index 19994e6ca..6458e0664 100644 --- a/server/worldgen/src/biomes/two_level.rs +++ b/crates/worldgen/src/biomes/two_level.rs @@ -1,7 +1,6 @@ use crate::voronoi::VoronoiGrid; use crate::{voronoi, BiomeGenerator, ChunkBiomes}; -use feather_core::biomes::Biome; -use feather_core::util::ChunkPosition; +use base::{Biome, ChunkPosition}; use once_cell::sync::Lazy; /// Array of biome groups, each containing biomes diff --git a/server/worldgen/src/composition.rs b/crates/worldgen/src/composition.rs similarity index 90% rename from server/worldgen/src/composition.rs rename to crates/worldgen/src/composition.rs index 1002c0bde..fad0d235d 100644 --- a/server/worldgen/src/composition.rs +++ b/crates/worldgen/src/composition.rs @@ -2,12 +2,9 @@ //! based on the density and biome values. use crate::{block_index, util, ChunkBiomes, CompositionGenerator, SEA_LEVEL}; -use bitvec::order::Local; +use base::{Biome, BlockId, Chunk, ChunkPosition}; +use bitvec::order::LocalBits; use bitvec::slice::BitSlice; -use feather_core::biomes::Biome; -use feather_core::blocks::BlockId; -use feather_core::chunk::Chunk; -use feather_core::util::ChunkPosition; use rand::{Rng, SeedableRng}; use rand_xorshift::XorShiftRng; use std::cmp::min; @@ -23,7 +20,7 @@ impl CompositionGenerator for BasicCompositionGenerator { chunk: &mut Chunk, _pos: ChunkPosition, biomes: &ChunkBiomes, - density: &BitSlice, + density: &BitSlice, seed: u64, ) { // For each column in the chunk, go from top to @@ -42,7 +39,7 @@ fn basic_composition_for_column( x: usize, z: usize, chunk: &mut Chunk, - density: &BitSlice, + density: &BitSlice, seed: u64, biome: Biome, ) { @@ -53,7 +50,7 @@ fn basic_composition_for_solid_biome( x: usize, z: usize, chunk: &mut Chunk, - density: &BitSlice, + density: &BitSlice, seed: u64, biome: Biome, ) { @@ -182,21 +179,21 @@ mod tests { basic_composition_for_column(x, z, &mut chunk, &density[..], 435, Biome::Plains); for y in 4..=28 { - assert_eq!(chunk.block_at(x, y, z), BlockId::stone()); + assert_eq!(chunk.block_at(x, y, z).unwrap(), BlockId::stone()); } for y in 29..=31 { - assert_eq!(chunk.block_at(x, y, z), BlockId::dirt()); + assert_eq!(chunk.block_at(x, y, z).unwrap(), BlockId::dirt()); } for y in 33..40 { - assert_eq!(chunk.block_at(x, y, z), BlockId::air()); + assert_eq!(chunk.block_at(x, y, z).unwrap(), BlockId::air()); } for y in 40..=60 { - assert_eq!(chunk.block_at(x, y, z), BlockId::stone()); + assert_eq!(chunk.block_at(x, y, z).unwrap(), BlockId::stone()); } - assert_eq!(chunk.block_at(x, 64, z), BlockId::grass_block()); + assert_eq!(chunk.block_at(x, 64, z).unwrap(), BlockId::grass_block()); } } diff --git a/server/worldgen/src/density_map/density.rs b/crates/worldgen/src/density_map/density.rs similarity index 98% rename from server/worldgen/src/density_map/density.rs rename to crates/worldgen/src/density_map/density.rs index 450791403..925cd9889 100644 --- a/server/worldgen/src/density_map/density.rs +++ b/crates/worldgen/src/density_map/density.rs @@ -4,10 +4,9 @@ //! is more interesting; overhangs and the like will be able to generate. use crate::{block_index, noise, DensityMapGenerator, NearbyBiomes, NoiseLerper}; -use bitvec::order::Local; +use base::{Biome, ChunkPosition}; +use bitvec::order::LocalBits; use bitvec::vec::BitVec; -use feather_core::biomes::Biome; -use feather_core::util::ChunkPosition; use once_cell::sync::Lazy; use simdnoise::NoiseBuilder; @@ -32,7 +31,7 @@ impl DensityMapGenerator for DensityMapGeneratorImpl { chunk: ChunkPosition, biomes: &NearbyBiomes, seed: u64, - ) -> BitVec { + ) -> BitVec { let mut density = BitVec::from_vec(vec![0u8; 16 * 256 * 16 / 8]); let uninterpolated_densities = generate_density(chunk, &biomes, seed); diff --git a/server/worldgen/src/density_map/height.rs b/crates/worldgen/src/density_map/height.rs similarity index 93% rename from server/worldgen/src/density_map/height.rs rename to crates/worldgen/src/density_map/height.rs index 594f29503..cf84fc485 100644 --- a/server/worldgen/src/density_map/height.rs +++ b/crates/worldgen/src/density_map/height.rs @@ -2,10 +2,9 @@ //! A superior generator would use 3D noise to allow for overhangs. use crate::{block_index, DensityMapGenerator, NearbyBiomes, OCEAN_DEPTH, SKY_LIMIT}; -use bitvec::order::Local; +use base::{Biome, ChunkPosition}; +use bitvec::order::LocalBits; use bitvec::vec::BitVec; -use feather_core::biomes::Biome; -use feather_core::util::ChunkPosition; use simdnoise::NoiseBuilder; use std::cmp::min; @@ -20,7 +19,7 @@ impl DensityMapGenerator for HeightMapGenerator { chunk: ChunkPosition, biomes: &NearbyBiomes, seed: u64, - ) -> BitVec { + ) -> BitVec { let x_offset = (chunk.x * 16) as f32; let y_offset = (chunk.z * 16) as f32; diff --git a/server/worldgen/src/density_map/mod.rs b/crates/worldgen/src/density_map/mod.rs similarity index 100% rename from server/worldgen/src/density_map/mod.rs rename to crates/worldgen/src/density_map/mod.rs diff --git a/server/worldgen/src/finishers/clumped.rs b/crates/worldgen/src/finishers/clumped.rs similarity index 93% rename from server/worldgen/src/finishers/clumped.rs rename to crates/worldgen/src/finishers/clumped.rs index 32ce9ae60..a4da7066e 100644 --- a/server/worldgen/src/finishers/clumped.rs +++ b/crates/worldgen/src/finishers/clumped.rs @@ -1,8 +1,6 @@ use crate::util::shuffle_seed_for_chunk; use crate::{ChunkBiomes, FinishingGenerator, TopBlocks}; -use feather_core::biomes::Biome; -use feather_core::blocks::BlockId; -use feather_core::chunk::Chunk; +use base::{Biome, BlockId, Chunk}; use rand::{Rng, SeedableRng}; use rand_xorshift::XorShiftRng; use std::{cmp, iter}; @@ -43,7 +41,7 @@ impl FinishingGenerator for ClumpedFoliageFinisher { let pos_x = cmp::max(0, cmp::min(x as i32 + offset_x, 15)) as usize; let pos_z = cmp::max(0, cmp::min(z as i32 + offset_z, 15)) as usize; - if chunk.biome_at(pos_x, pos_z) != biome { + if chunk.biomes().get(pos_x, 0, pos_z) != biome { return; // Don't generate block outside this biome } diff --git a/server/worldgen/src/finishers/mod.rs b/crates/worldgen/src/finishers/mod.rs similarity index 100% rename from server/worldgen/src/finishers/mod.rs rename to crates/worldgen/src/finishers/mod.rs diff --git a/server/worldgen/src/finishers/single.rs b/crates/worldgen/src/finishers/single.rs similarity index 92% rename from server/worldgen/src/finishers/single.rs rename to crates/worldgen/src/finishers/single.rs index 659e24444..f65714975 100644 --- a/server/worldgen/src/finishers/single.rs +++ b/crates/worldgen/src/finishers/single.rs @@ -1,8 +1,6 @@ use crate::util::shuffle_seed_for_chunk; use crate::{ChunkBiomes, FinishingGenerator, TopBlocks}; -use feather_core::biomes::Biome; -use feather_core::blocks::BlockId; -use feather_core::chunk::Chunk; +use base::{Biome, BlockId, Chunk}; use rand::{Rng, SeedableRng}; use rand_xorshift::XorShiftRng; @@ -24,7 +22,8 @@ impl FinishingGenerator for SingleFoliageFinisher { let biome = biomes.biome_at(x, z); if let Some(foliage) = biome_foliage(biome) { - if chunk.block_at(x, top_blocks.top_block_at(x, z), z) == foliage.required + if chunk.block_at(x, top_blocks.top_block_at(x, z), z).unwrap() + == foliage.required && rng.gen_range(0, 192) == 0 { chunk.set_block_at(x, top_blocks.top_block_at(x, z) + 1, z, foliage.block); diff --git a/server/worldgen/src/finishers/snow.rs b/crates/worldgen/src/finishers/snow.rs similarity index 80% rename from server/worldgen/src/finishers/snow.rs rename to crates/worldgen/src/finishers/snow.rs index b81c8ba5f..8b1f12ac0 100644 --- a/server/worldgen/src/finishers/snow.rs +++ b/crates/worldgen/src/finishers/snow.rs @@ -1,7 +1,5 @@ use crate::{ChunkBiomes, FinishingGenerator, TopBlocks}; -use feather_core::biomes::Biome; -use feather_core::blocks::BlockId; -use feather_core::chunk::Chunk; +use base::{Biome, BlockId, Chunk}; /// Finisher for generating snow on top of snow biomes. #[derive(Default)] @@ -21,7 +19,9 @@ impl FinishingGenerator for SnowFinisher { continue; } - chunk.set_block_at(x, top_blocks.top_block_at(x, z) + 1, z, BlockId::snow()) + chunk + .set_block_at(x, top_blocks.top_block_at(x, z) + 1, z, BlockId::snow()) + .unwrap(); } } } diff --git a/server/worldgen/src/lib.rs b/crates/worldgen/src/lib.rs similarity index 93% rename from server/worldgen/src/lib.rs rename to crates/worldgen/src/lib.rs index 92e3d8e62..11023941c 100644 --- a/server/worldgen/src/lib.rs +++ b/crates/worldgen/src/lib.rs @@ -14,16 +14,12 @@ mod superflat; mod util; pub mod voronoi; +use base::{Biome, BlockId, Chunk, ChunkPosition}; pub use biomes::{DistortedVoronoiBiomeGenerator, TwoLevelBiomeGenerator}; -use bitvec::order::Local; -use bitvec::slice::BitSlice; use bitvec::vec::BitVec; +use bitvec::{order::LocalBits, slice::BitSlice}; pub use composition::BasicCompositionGenerator; pub use density_map::{DensityMapGeneratorImpl, HeightMapGenerator}; -use feather_core::biomes::Biome; -use feather_core::blocks::BlockId; -use feather_core::chunk::Chunk; -use feather_core::util::ChunkPosition; use finishers::{ClumpedFoliageFinisher, SingleFoliageFinisher, SnowFinisher}; pub use noise::NoiseLerper; use num_traits::ToPrimitive; @@ -147,7 +143,7 @@ impl WorldGenerator for ComposableGenerator { for x in 0..16 { for z in 0..16 { - chunk.set_biome_at(x, z, biomes.biome_at(x, z)); + chunk.biomes_mut().set(x, 0, z, biomes.biome_at(x, z)); } } @@ -165,7 +161,7 @@ impl WorldGenerator for ComposableGenerator { for x in 0..16 { for z in 0..16 { for y in (0..256).rev() { - if chunk.block_at(x, y, z) != BlockId::air() { + if chunk.block_at(x, y, z).unwrap() != BlockId::air() { top_blocks.set_top_block_at(x, z, y); break; } @@ -173,7 +169,7 @@ impl WorldGenerator for ComposableGenerator { } } - chunk.recalculate_heightmap(); + chunk.recalculate_heightmaps(); // Finishers. for finisher in &self.finishers { @@ -185,21 +181,6 @@ impl WorldGenerator for ComposableGenerator { ); } - // TODO: correct lighting. - // Fill chunk with 15 light levels. - chunk - .sections_mut() - .into_iter() - .filter(|section| section.is_some()) - .map(|section| section.unwrap()) - .for_each(|section| { - let sky_light = section.sky_light_mut(); - - (0..4096).for_each(|index| { - sky_light.set(index, 15); - }) - }); - chunk } } @@ -223,7 +204,7 @@ pub trait DensityMapGenerator: Send + Sync { chunk: ChunkPosition, biomes: &NearbyBiomes, seed: u64, - ) -> BitVec; + ) -> BitVec; } /// A generator which populates the given chunk using blocks @@ -236,7 +217,7 @@ pub trait CompositionGenerator: Send + Sync { chunk: &mut Chunk, pos: ChunkPosition, biomes: &ChunkBiomes, - density: &BitSlice, + density: &BitSlice, seed: u64, ); } @@ -407,6 +388,7 @@ mod tests { use super::*; #[test] + #[ignore] // TODO (1.16): account for new 3D biomes fn test_reproducability() { let seeds: [u64; 4] = [std::u64::MAX, 3243, 0, 100]; @@ -431,7 +413,7 @@ mod tests { fn test_chunks_eq(a: &Chunk, b: &Chunk) { for x in 0..16 { for z in 0..16 { - assert_eq!(a.biome_at(x, z), b.biome_at(x, z)); + assert_eq!(a.biomes().get(x, 0, z), b.biomes().get(x, 0, z)); for y in 0..256 { assert_eq!(a.block_at(x, y, z), b.block_at(x, y, z)); } diff --git a/server/worldgen/src/noise.rs b/crates/worldgen/src/noise.rs similarity index 100% rename from server/worldgen/src/noise.rs rename to crates/worldgen/src/noise.rs diff --git a/server/worldgen/src/superflat.rs b/crates/worldgen/src/superflat.rs similarity index 76% rename from server/worldgen/src/superflat.rs rename to crates/worldgen/src/superflat.rs index 0e6b113dc..54e935826 100644 --- a/server/worldgen/src/superflat.rs +++ b/crates/worldgen/src/superflat.rs @@ -1,9 +1,6 @@ +use base::{anvil::level::SuperflatGeneratorOptions, Biome, BlockId, Chunk, ChunkPosition}; + use crate::WorldGenerator; -use feather_core::anvil::level::SuperflatGeneratorOptions; -use feather_core::biomes::Biome; -use feather_core::blocks::BlockId; -use feather_core::chunk::Chunk; -use feather_core::util::ChunkPosition; pub struct SuperflatWorldGenerator { pub options: SuperflatGeneratorOptions, @@ -11,7 +8,7 @@ pub struct SuperflatWorldGenerator { impl WorldGenerator for SuperflatWorldGenerator { fn generate_chunk(&self, position: ChunkPosition) -> Chunk { - let biome = Biome::from_identifier(self.options.biome.as_str()).unwrap_or(Biome::Plains); + let biome = Biome::from_name(self.options.biome.as_str()).unwrap_or(Biome::Plains); let mut chunk = Chunk::new_with_default_biome(position, biome); let mut y_counter = 0; @@ -36,7 +33,7 @@ impl WorldGenerator for SuperflatWorldGenerator { y_counter += layer.height; } - chunk.recalculate_heightmap(); + chunk.recalculate_heightmaps(); chunk } @@ -47,10 +44,12 @@ mod tests { use super::*; #[test] + #[ignore] // TODO (1.16): account for new 3D biomes pub fn test_worldgen_flat() { - let mut options = SuperflatGeneratorOptions::default(); - dbg!(&options); - options.biome = Biome::Mountains.identifier().to_string(); + let options = SuperflatGeneratorOptions { + biome: Biome::Mountains.name().to_owned(), + ..Default::default() + }; let chunk_pos = ChunkPosition { x: 1, z: 2 }; let generator = SuperflatWorldGenerator { options }; @@ -65,15 +64,15 @@ mod tests { (2usize, BlockId::dirt()), (3usize, BlockId::grass_block()), ] { - assert_eq!(chunk.block_at(x, *y, z), *block); + assert_eq!(chunk.block_at(x, *y, z).unwrap(), *block); } for y in 4..256 { assert_eq!( - chunk.block_at(x as usize, y as usize, z as usize), + chunk.block_at(x as usize, y as usize, z as usize).unwrap(), BlockId::air() ); } - assert_eq!(chunk.biome_at(x, z), Biome::Mountains); + assert_eq!(chunk.biomes().get(x, 0, z), Biome::Mountains); } } } diff --git a/server/worldgen/src/util.rs b/crates/worldgen/src/util.rs similarity index 94% rename from server/worldgen/src/util.rs rename to crates/worldgen/src/util.rs index 0c2d89bf4..5ba8edccd 100644 --- a/server/worldgen/src/util.rs +++ b/crates/worldgen/src/util.rs @@ -1,6 +1,6 @@ //! Utilities for world generation. -use feather_core::util::ChunkPosition; +use base::ChunkPosition; /// Deterministically a seed for the given chunk. This allows /// different seeds to be used for different chunk. diff --git a/server/worldgen/src/voronoi.rs b/crates/worldgen/src/voronoi.rs similarity index 100% rename from server/worldgen/src/voronoi.rs rename to crates/worldgen/src/voronoi.rs diff --git a/old/README.md b/old/README.md new file mode 100644 index 000000000..1c2ade967 --- /dev/null +++ b/old/README.md @@ -0,0 +1,5 @@ +### Code archive + +This directory contains code from before the [1.16 refactor/rewrite](https://github.com/feather-rs/feather/pull/307). + +It may be useful to salvage some of this code to reimplement features that were lost in the rewrite. diff --git a/core/Cargo.toml b/old/core/Cargo.toml similarity index 94% rename from core/Cargo.toml rename to old/core/Cargo.toml index 8461a8dec..bcae39ae5 100644 --- a/core/Cargo.toml +++ b/old/core/Cargo.toml @@ -17,6 +17,6 @@ feather-item-block = { path = "./item_block" } feather-items = { path = "./items" } feather-loot = { path = "./loot" } feather-misc = { path = "./misc" } -feather-network = { path = "./network" } +feather-protocol = { path = "./protocol" } feather-text = { path = "./text" } feather-util = { path = "./util" } diff --git a/core/biomes/Cargo.toml b/old/core/biomes/Cargo.toml similarity index 100% rename from core/biomes/Cargo.toml rename to old/core/biomes/Cargo.toml diff --git a/core/biomes/src/lib.rs b/old/core/biomes/src/lib.rs similarity index 100% rename from core/biomes/src/lib.rs rename to old/core/biomes/src/lib.rs diff --git a/core/game_rules/Cargo.toml b/old/core/game_rules/Cargo.toml similarity index 100% rename from core/game_rules/Cargo.toml rename to old/core/game_rules/Cargo.toml diff --git a/core/game_rules/src/lib.rs b/old/core/game_rules/src/lib.rs similarity index 100% rename from core/game_rules/src/lib.rs rename to old/core/game_rules/src/lib.rs diff --git a/core/inventory/Cargo.toml b/old/core/inventory/Cargo.toml similarity index 100% rename from core/inventory/Cargo.toml rename to old/core/inventory/Cargo.toml diff --git a/core/inventory/src/lib.rs b/old/core/inventory/src/lib.rs similarity index 100% rename from core/inventory/src/lib.rs rename to old/core/inventory/src/lib.rs diff --git a/core/inventory/src/window.rs b/old/core/inventory/src/window.rs similarity index 89% rename from core/inventory/src/window.rs rename to old/core/inventory/src/window.rs index 1a09f5643..beda44d5c 100644 --- a/core/inventory/src/window.rs +++ b/old/core/inventory/src/window.rs @@ -11,38 +11,7 @@ use smallvec::{smallvec, SmallVec}; use thiserror::Error; pub mod constants { - // Constants representing various standard inventory slot indices - // for the `Player` window - // Deprecated; mainly for interop with world saves. - - pub const SLOT_CRAFTING_OUTPUT: usize = 0; - pub const SLOT_CRAFTING_INPUT_X0_Y0: usize = 1; - pub const SLOT_CRAFTING_INPUT_X1_Y0: usize = 2; - pub const SLOT_CRAFTING_INPUT_X0_Y1: usize = 3; - pub const SLOT_CRAFTING_INPUT_X1_Y1: usize = 4; - - pub const SLOT_ARMOR_MIN: usize = 5; - pub const SLOT_ARMOR_MAX: usize = 8; - - pub const SLOT_ARMOR_HEAD: usize = 5; - pub const SLOT_ARMOR_CHEST: usize = 6; - pub const SLOT_ARMOR_LEGS: usize = 7; - pub const SLOT_ARMOR_FEET: usize = 8; - - pub const SLOT_OFFHAND: usize = 45; - - pub const SLOT_INVENTORY_OFFSET: usize = 9; - pub const SLOT_HOTBAR_OFFSET: usize = 36; - - pub const HOTBAR_SIZE: usize = 9; - pub const INVENTORY_SIZE: usize = 27; - - pub const SLOT_ENTITY_EQUIPMENT_MAIN_HAND: usize = 0; - pub const SLOT_ENTITY_EQUIPMENT_OFF_HAND: usize = 1; - pub const SLOT_ENTITY_EQUIPMENT_BOOTS: usize = 2; - pub const SLOT_ENTITY_EQUIPMENT_LEGGINGS: usize = 3; - pub const SLOT_ENTITY_EQUIPMENT_CHESTPLATE: usize = 4; - pub const SLOT_ENTITY_EQUIPMENT_HELMET: usize = 5; + } /// Converted from of a protocol index, used diff --git a/core/item_block/Cargo.toml b/old/core/item_block/Cargo.toml similarity index 100% rename from core/item_block/Cargo.toml rename to old/core/item_block/Cargo.toml diff --git a/core/item_block/src/lib.rs b/old/core/item_block/src/lib.rs similarity index 100% rename from core/item_block/src/lib.rs rename to old/core/item_block/src/lib.rs diff --git a/core/item_block/src/mappings.rs b/old/core/item_block/src/mappings.rs similarity index 100% rename from core/item_block/src/mappings.rs rename to old/core/item_block/src/mappings.rs diff --git a/core/items/Cargo.toml b/old/core/items/Cargo.toml similarity index 100% rename from core/items/Cargo.toml rename to old/core/items/Cargo.toml diff --git a/core/items/data/1.13.2.dat b/old/core/items/data/1.13.2.dat similarity index 100% rename from core/items/data/1.13.2.dat rename to old/core/items/data/1.13.2.dat diff --git a/core/items/src/lib.rs b/old/core/items/src/lib.rs similarity index 100% rename from core/items/src/lib.rs rename to old/core/items/src/lib.rs diff --git a/core/loot/Cargo.toml b/old/core/loot/Cargo.toml similarity index 100% rename from core/loot/Cargo.toml rename to old/core/loot/Cargo.toml diff --git a/core/loot/build.rs b/old/core/loot/build.rs similarity index 100% rename from core/loot/build.rs rename to old/core/loot/build.rs diff --git a/core/loot/model/Cargo.toml b/old/core/loot/model/Cargo.toml similarity index 100% rename from core/loot/model/Cargo.toml rename to old/core/loot/model/Cargo.toml diff --git a/core/loot/model/src/lib.rs b/old/core/loot/model/src/lib.rs similarity index 100% rename from core/loot/model/src/lib.rs rename to old/core/loot/model/src/lib.rs diff --git a/core/loot/src/lib.rs b/old/core/loot/src/lib.rs similarity index 100% rename from core/loot/src/lib.rs rename to old/core/loot/src/lib.rs diff --git a/core/misc/Cargo.toml b/old/core/misc/Cargo.toml similarity index 100% rename from core/misc/Cargo.toml rename to old/core/misc/Cargo.toml diff --git a/core/misc/src/lib.rs b/old/core/misc/src/lib.rs similarity index 100% rename from core/misc/src/lib.rs rename to old/core/misc/src/lib.rs diff --git a/core/network/src/mctypes.rs b/old/core/network/src/mctypes.rs similarity index 100% rename from core/network/src/mctypes.rs rename to old/core/network/src/mctypes.rs diff --git a/core/network/src/packet.rs b/old/core/network/src/packet.rs similarity index 100% rename from core/network/src/packet.rs rename to old/core/network/src/packet.rs diff --git a/core/network/src/packets.rs b/old/core/network/src/packets.rs similarity index 100% rename from core/network/src/packets.rs rename to old/core/network/src/packets.rs diff --git a/core/src/lib.rs b/old/core/src/lib.rs similarity index 93% rename from core/src/lib.rs rename to old/core/src/lib.rs index 437cd7e42..b057f03f6 100644 --- a/core/src/lib.rs +++ b/old/core/src/lib.rs @@ -10,7 +10,6 @@ pub extern crate feather_item_block as item_block; pub extern crate feather_items as items; pub extern crate feather_loot as loot; pub extern crate feather_misc as misc; -pub extern crate feather_network as network; pub extern crate feather_text as text; pub extern crate feather_util as util; diff --git a/core/util/Cargo.toml b/old/core/util/Cargo.toml similarity index 100% rename from core/util/Cargo.toml rename to old/core/util/Cargo.toml diff --git a/core/util/src/lib.rs b/old/core/util/src/lib.rs similarity index 100% rename from core/util/src/lib.rs rename to old/core/util/src/lib.rs diff --git a/core/util/src/math_types.rs b/old/core/util/src/math_types.rs similarity index 100% rename from core/util/src/math_types.rs rename to old/core/util/src/math_types.rs diff --git a/core/util/src/positions.rs b/old/core/util/src/positions.rs similarity index 100% rename from core/util/src/positions.rs rename to old/core/util/src/positions.rs diff --git a/data/Cargo.toml b/old/data/Cargo.toml similarity index 100% rename from data/Cargo.toml rename to old/data/Cargo.toml diff --git a/data/build.rs b/old/data/build.rs similarity index 100% rename from data/build.rs rename to old/data/build.rs diff --git a/data/lock b/old/data/lock similarity index 100% rename from data/lock rename to old/data/lock diff --git a/data/macro/Cargo.toml b/old/data/macro/Cargo.toml similarity index 100% rename from data/macro/Cargo.toml rename to old/data/macro/Cargo.toml diff --git a/data/macro/src/lib.rs b/old/data/macro/src/lib.rs similarity index 100% rename from data/macro/src/lib.rs rename to old/data/macro/src/lib.rs diff --git a/data/src/lib.rs b/old/data/src/lib.rs similarity index 100% rename from data/src/lib.rs rename to old/data/src/lib.rs diff --git a/definitions/Cargo.toml b/old/definitions/Cargo.toml similarity index 100% rename from definitions/Cargo.toml rename to old/definitions/Cargo.toml diff --git a/definitions/README.md b/old/definitions/README.md similarity index 100% rename from definitions/README.md rename to old/definitions/README.md diff --git a/definitions/data/generated/block.ron b/old/definitions/data/generated/block.ron similarity index 100% rename from definitions/data/generated/block.ron rename to old/definitions/data/generated/block.ron diff --git a/definitions/data/generated/item.ron b/old/definitions/data/generated/item.ron similarity index 100% rename from definitions/data/generated/item.ron rename to old/definitions/data/generated/item.ron diff --git a/definitions/data/tool.ron b/old/definitions/data/tool.ron similarity index 100% rename from definitions/data/tool.ron rename to old/definitions/data/tool.ron diff --git a/definitions/generator/Cargo.toml b/old/definitions/generator/Cargo.toml similarity index 100% rename from definitions/generator/Cargo.toml rename to old/definitions/generator/Cargo.toml diff --git a/definitions/generator/src/backend.rs b/old/definitions/generator/src/backend.rs similarity index 100% rename from definitions/generator/src/backend.rs rename to old/definitions/generator/src/backend.rs diff --git a/definitions/generator/src/frontend.rs b/old/definitions/generator/src/frontend.rs similarity index 100% rename from definitions/generator/src/frontend.rs rename to old/definitions/generator/src/frontend.rs diff --git a/definitions/generator/src/generated.rs b/old/definitions/generator/src/generated.rs similarity index 100% rename from definitions/generator/src/generated.rs rename to old/definitions/generator/src/generated.rs diff --git a/definitions/generator/src/main.rs b/old/definitions/generator/src/main.rs similarity index 100% rename from definitions/generator/src/main.rs rename to old/definitions/generator/src/main.rs diff --git a/definitions/generator/src/model.rs b/old/definitions/generator/src/model.rs similarity index 100% rename from definitions/generator/src/model.rs rename to old/definitions/generator/src/model.rs diff --git a/definitions/rebuild.sh b/old/definitions/rebuild.sh similarity index 100% rename from definitions/rebuild.sh rename to old/definitions/rebuild.sh diff --git a/definitions/src/generated/block.rs b/old/definitions/src/generated/block.rs similarity index 100% rename from definitions/src/generated/block.rs rename to old/definitions/src/generated/block.rs diff --git a/definitions/src/generated/item.rs b/old/definitions/src/generated/item.rs similarity index 100% rename from definitions/src/generated/item.rs rename to old/definitions/src/generated/item.rs diff --git a/definitions/src/generated/mod.rs b/old/definitions/src/generated/mod.rs similarity index 100% rename from definitions/src/generated/mod.rs rename to old/definitions/src/generated/mod.rs diff --git a/definitions/src/generated/tool.rs b/old/definitions/src/generated/tool.rs similarity index 100% rename from definitions/src/generated/tool.rs rename to old/definitions/src/generated/tool.rs diff --git a/definitions/src/lib.rs b/old/definitions/src/lib.rs similarity index 100% rename from definitions/src/lib.rs rename to old/definitions/src/lib.rs diff --git a/server/Cargo.toml b/old/server/Cargo.toml similarity index 100% rename from server/Cargo.toml rename to old/server/Cargo.toml diff --git a/server/README.md b/old/server/README.md similarity index 100% rename from server/README.md rename to old/server/README.md diff --git a/server/block/Cargo.toml b/old/server/block/Cargo.toml similarity index 100% rename from server/block/Cargo.toml rename to old/server/block/Cargo.toml diff --git a/server/block/src/chest.rs b/old/server/block/src/chest.rs similarity index 100% rename from server/block/src/chest.rs rename to old/server/block/src/chest.rs diff --git a/server/block/src/init.rs b/old/server/block/src/init.rs similarity index 100% rename from server/block/src/init.rs rename to old/server/block/src/init.rs diff --git a/server/block/src/lib.rs b/old/server/block/src/lib.rs similarity index 100% rename from server/block/src/lib.rs rename to old/server/block/src/lib.rs diff --git a/server/chat/Cargo.toml b/old/server/chat/Cargo.toml similarity index 100% rename from server/chat/Cargo.toml rename to old/server/chat/Cargo.toml diff --git a/server/chat/src/lib.rs b/old/server/chat/src/lib.rs similarity index 100% rename from server/chat/src/lib.rs rename to old/server/chat/src/lib.rs diff --git a/server/chunk/Cargo.toml b/old/server/chunk/Cargo.toml similarity index 100% rename from server/chunk/Cargo.toml rename to old/server/chunk/Cargo.toml diff --git a/server/chunk/src/chunk_manager.rs b/old/server/chunk/src/chunk_manager.rs similarity index 100% rename from server/chunk/src/chunk_manager.rs rename to old/server/chunk/src/chunk_manager.rs diff --git a/old/server/chunk/src/chunk_worker.rs b/old/server/chunk/src/chunk_worker.rs new file mode 100644 index 000000000..e2f678996 --- /dev/null +++ b/old/server/chunk/src/chunk_worker.rs @@ -0,0 +1,25 @@ +//! This module handles the asynchronous loading and saving +//! of chunks. It receives load and save requests from the server +//! (over a channel) and executes them. +//! +//! If a chunk cannot be loaded, it is generated on the Rayon thread pool +//! instead. +use ahash::AHashMap; +use crossbeam::channel::{Receiver, Sender}; +use feather_core::anvil::entity::EntityData; +use feather_core::anvil::region; +use feather_core::anvil::{ + block_entity::BlockEntityData, + region::{RegionHandle, RegionPosition}, +}; +use feather_core::chunk::Chunk; +use feather_core::util::ChunkPosition; +use feather_server_util::EntityLoader; +use feather_server_worldgen::WorldGenerator; +use fecs::EntityBuilder; +use parking_lot::RwLock; +use smallvec::SmallVec; +use std::path::{Path, PathBuf}; +use std::sync::Arc; +use std::time::{SystemTime, UNIX_EPOCH}; + diff --git a/server/chunk/src/lib.rs b/old/server/chunk/src/lib.rs similarity index 100% rename from server/chunk/src/lib.rs rename to old/server/chunk/src/lib.rs diff --git a/server/chunk/src/save.rs b/old/server/chunk/src/save.rs similarity index 100% rename from server/chunk/src/save.rs rename to old/server/chunk/src/save.rs diff --git a/server/commands/Cargo.toml b/old/server/commands/Cargo.toml similarity index 100% rename from server/commands/Cargo.toml rename to old/server/commands/Cargo.toml diff --git a/server/commands/src/arguments.rs b/old/server/commands/src/arguments.rs similarity index 100% rename from server/commands/src/arguments.rs rename to old/server/commands/src/arguments.rs diff --git a/server/commands/src/impls.rs b/old/server/commands/src/impls.rs similarity index 100% rename from server/commands/src/impls.rs rename to old/server/commands/src/impls.rs diff --git a/server/commands/src/lib.rs b/old/server/commands/src/lib.rs similarity index 100% rename from server/commands/src/lib.rs rename to old/server/commands/src/lib.rs diff --git a/server/config/Cargo.toml b/old/server/config/Cargo.toml similarity index 100% rename from server/config/Cargo.toml rename to old/server/config/Cargo.toml diff --git a/server/config/src/lib.rs b/old/server/config/src/lib.rs similarity index 100% rename from server/config/src/lib.rs rename to old/server/config/src/lib.rs diff --git a/server/entity/Cargo.toml b/old/server/entity/Cargo.toml similarity index 100% rename from server/entity/Cargo.toml rename to old/server/entity/Cargo.toml diff --git a/server/entity/src/broadcasters.rs b/old/server/entity/src/broadcasters.rs similarity index 100% rename from server/entity/src/broadcasters.rs rename to old/server/entity/src/broadcasters.rs diff --git a/server/entity/src/broadcasters/entity_creation.rs b/old/server/entity/src/broadcasters/entity_creation.rs similarity index 100% rename from server/entity/src/broadcasters/entity_creation.rs rename to old/server/entity/src/broadcasters/entity_creation.rs diff --git a/server/entity/src/broadcasters/entity_deletion.rs b/old/server/entity/src/broadcasters/entity_deletion.rs similarity index 100% rename from server/entity/src/broadcasters/entity_deletion.rs rename to old/server/entity/src/broadcasters/entity_deletion.rs diff --git a/server/entity/src/broadcasters/inventory.rs b/old/server/entity/src/broadcasters/inventory.rs similarity index 100% rename from server/entity/src/broadcasters/inventory.rs rename to old/server/entity/src/broadcasters/inventory.rs diff --git a/server/entity/src/broadcasters/item_collect.rs b/old/server/entity/src/broadcasters/item_collect.rs similarity index 100% rename from server/entity/src/broadcasters/item_collect.rs rename to old/server/entity/src/broadcasters/item_collect.rs diff --git a/server/entity/src/broadcasters/metadata.rs b/old/server/entity/src/broadcasters/metadata.rs similarity index 100% rename from server/entity/src/broadcasters/metadata.rs rename to old/server/entity/src/broadcasters/metadata.rs diff --git a/server/entity/src/broadcasters/movement.rs b/old/server/entity/src/broadcasters/movement.rs similarity index 100% rename from server/entity/src/broadcasters/movement.rs rename to old/server/entity/src/broadcasters/movement.rs diff --git a/server/entity/src/drops.rs b/old/server/entity/src/drops.rs similarity index 100% rename from server/entity/src/drops.rs rename to old/server/entity/src/drops.rs diff --git a/server/entity/src/fall_damage.rs b/old/server/entity/src/fall_damage.rs similarity index 100% rename from server/entity/src/fall_damage.rs rename to old/server/entity/src/fall_damage.rs diff --git a/server/entity/src/inventory.rs b/old/server/entity/src/inventory.rs similarity index 100% rename from server/entity/src/inventory.rs rename to old/server/entity/src/inventory.rs diff --git a/server/entity/src/lib.rs b/old/server/entity/src/lib.rs similarity index 100% rename from server/entity/src/lib.rs rename to old/server/entity/src/lib.rs diff --git a/server/entity/src/mob.rs b/old/server/entity/src/mob.rs similarity index 100% rename from server/entity/src/mob.rs rename to old/server/entity/src/mob.rs diff --git a/server/entity/src/mob/boss.rs b/old/server/entity/src/mob/boss.rs similarity index 100% rename from server/entity/src/mob/boss.rs rename to old/server/entity/src/mob/boss.rs diff --git a/server/entity/src/mob/boss/ender_dragon.rs b/old/server/entity/src/mob/boss/ender_dragon.rs similarity index 100% rename from server/entity/src/mob/boss/ender_dragon.rs rename to old/server/entity/src/mob/boss/ender_dragon.rs diff --git a/server/entity/src/mob/boss/wither.rs b/old/server/entity/src/mob/boss/wither.rs similarity index 100% rename from server/entity/src/mob/boss/wither.rs rename to old/server/entity/src/mob/boss/wither.rs diff --git a/server/entity/src/mob/defensive.rs b/old/server/entity/src/mob/defensive.rs similarity index 100% rename from server/entity/src/mob/defensive.rs rename to old/server/entity/src/mob/defensive.rs diff --git a/server/entity/src/mob/defensive/pufferfish.rs b/old/server/entity/src/mob/defensive/pufferfish.rs similarity index 100% rename from server/entity/src/mob/defensive/pufferfish.rs rename to old/server/entity/src/mob/defensive/pufferfish.rs diff --git a/server/entity/src/mob/hostile.rs b/old/server/entity/src/mob/hostile.rs similarity index 100% rename from server/entity/src/mob/hostile.rs rename to old/server/entity/src/mob/hostile.rs diff --git a/server/entity/src/mob/hostile/blaze.rs b/old/server/entity/src/mob/hostile/blaze.rs similarity index 100% rename from server/entity/src/mob/hostile/blaze.rs rename to old/server/entity/src/mob/hostile/blaze.rs diff --git a/server/entity/src/mob/hostile/creeper.rs b/old/server/entity/src/mob/hostile/creeper.rs similarity index 100% rename from server/entity/src/mob/hostile/creeper.rs rename to old/server/entity/src/mob/hostile/creeper.rs diff --git a/server/entity/src/mob/hostile/drowned.rs b/old/server/entity/src/mob/hostile/drowned.rs similarity index 100% rename from server/entity/src/mob/hostile/drowned.rs rename to old/server/entity/src/mob/hostile/drowned.rs diff --git a/server/entity/src/mob/hostile/elder_guardian.rs b/old/server/entity/src/mob/hostile/elder_guardian.rs similarity index 100% rename from server/entity/src/mob/hostile/elder_guardian.rs rename to old/server/entity/src/mob/hostile/elder_guardian.rs diff --git a/server/entity/src/mob/hostile/endermite.rs b/old/server/entity/src/mob/hostile/endermite.rs similarity index 100% rename from server/entity/src/mob/hostile/endermite.rs rename to old/server/entity/src/mob/hostile/endermite.rs diff --git a/server/entity/src/mob/hostile/evoker.rs b/old/server/entity/src/mob/hostile/evoker.rs similarity index 100% rename from server/entity/src/mob/hostile/evoker.rs rename to old/server/entity/src/mob/hostile/evoker.rs diff --git a/server/entity/src/mob/hostile/ghast.rs b/old/server/entity/src/mob/hostile/ghast.rs similarity index 100% rename from server/entity/src/mob/hostile/ghast.rs rename to old/server/entity/src/mob/hostile/ghast.rs diff --git a/server/entity/src/mob/hostile/guardian.rs b/old/server/entity/src/mob/hostile/guardian.rs similarity index 100% rename from server/entity/src/mob/hostile/guardian.rs rename to old/server/entity/src/mob/hostile/guardian.rs diff --git a/server/entity/src/mob/hostile/husk.rs b/old/server/entity/src/mob/hostile/husk.rs similarity index 100% rename from server/entity/src/mob/hostile/husk.rs rename to old/server/entity/src/mob/hostile/husk.rs diff --git a/server/entity/src/mob/hostile/magma_cube.rs b/old/server/entity/src/mob/hostile/magma_cube.rs similarity index 100% rename from server/entity/src/mob/hostile/magma_cube.rs rename to old/server/entity/src/mob/hostile/magma_cube.rs diff --git a/server/entity/src/mob/hostile/phantom.rs b/old/server/entity/src/mob/hostile/phantom.rs similarity index 100% rename from server/entity/src/mob/hostile/phantom.rs rename to old/server/entity/src/mob/hostile/phantom.rs diff --git a/server/entity/src/mob/hostile/shulker.rs b/old/server/entity/src/mob/hostile/shulker.rs similarity index 100% rename from server/entity/src/mob/hostile/shulker.rs rename to old/server/entity/src/mob/hostile/shulker.rs diff --git a/server/entity/src/mob/hostile/silverfish.rs b/old/server/entity/src/mob/hostile/silverfish.rs similarity index 100% rename from server/entity/src/mob/hostile/silverfish.rs rename to old/server/entity/src/mob/hostile/silverfish.rs diff --git a/server/entity/src/mob/hostile/skeleton.rs b/old/server/entity/src/mob/hostile/skeleton.rs similarity index 100% rename from server/entity/src/mob/hostile/skeleton.rs rename to old/server/entity/src/mob/hostile/skeleton.rs diff --git a/server/entity/src/mob/hostile/slime.rs b/old/server/entity/src/mob/hostile/slime.rs similarity index 100% rename from server/entity/src/mob/hostile/slime.rs rename to old/server/entity/src/mob/hostile/slime.rs diff --git a/server/entity/src/mob/hostile/stray.rs b/old/server/entity/src/mob/hostile/stray.rs similarity index 100% rename from server/entity/src/mob/hostile/stray.rs rename to old/server/entity/src/mob/hostile/stray.rs diff --git a/server/entity/src/mob/hostile/vex.rs b/old/server/entity/src/mob/hostile/vex.rs similarity index 100% rename from server/entity/src/mob/hostile/vex.rs rename to old/server/entity/src/mob/hostile/vex.rs diff --git a/server/entity/src/mob/hostile/vindicator.rs b/old/server/entity/src/mob/hostile/vindicator.rs similarity index 100% rename from server/entity/src/mob/hostile/vindicator.rs rename to old/server/entity/src/mob/hostile/vindicator.rs diff --git a/server/entity/src/mob/hostile/witch.rs b/old/server/entity/src/mob/hostile/witch.rs similarity index 100% rename from server/entity/src/mob/hostile/witch.rs rename to old/server/entity/src/mob/hostile/witch.rs diff --git a/server/entity/src/mob/hostile/wither_skeleton.rs b/old/server/entity/src/mob/hostile/wither_skeleton.rs similarity index 100% rename from server/entity/src/mob/hostile/wither_skeleton.rs rename to old/server/entity/src/mob/hostile/wither_skeleton.rs diff --git a/server/entity/src/mob/hostile/zombie.rs b/old/server/entity/src/mob/hostile/zombie.rs similarity index 100% rename from server/entity/src/mob/hostile/zombie.rs rename to old/server/entity/src/mob/hostile/zombie.rs diff --git a/server/entity/src/mob/hostile/zombie_villager.rs b/old/server/entity/src/mob/hostile/zombie_villager.rs similarity index 100% rename from server/entity/src/mob/hostile/zombie_villager.rs rename to old/server/entity/src/mob/hostile/zombie_villager.rs diff --git a/server/entity/src/mob/neutral.rs b/old/server/entity/src/mob/neutral.rs similarity index 100% rename from server/entity/src/mob/neutral.rs rename to old/server/entity/src/mob/neutral.rs diff --git a/server/entity/src/mob/neutral/cave_spider.rs b/old/server/entity/src/mob/neutral/cave_spider.rs similarity index 100% rename from server/entity/src/mob/neutral/cave_spider.rs rename to old/server/entity/src/mob/neutral/cave_spider.rs diff --git a/server/entity/src/mob/neutral/dolphin.rs b/old/server/entity/src/mob/neutral/dolphin.rs similarity index 100% rename from server/entity/src/mob/neutral/dolphin.rs rename to old/server/entity/src/mob/neutral/dolphin.rs diff --git a/server/entity/src/mob/neutral/enderman.rs b/old/server/entity/src/mob/neutral/enderman.rs similarity index 100% rename from server/entity/src/mob/neutral/enderman.rs rename to old/server/entity/src/mob/neutral/enderman.rs diff --git a/server/entity/src/mob/neutral/iron_golem.rs b/old/server/entity/src/mob/neutral/iron_golem.rs similarity index 100% rename from server/entity/src/mob/neutral/iron_golem.rs rename to old/server/entity/src/mob/neutral/iron_golem.rs diff --git a/server/entity/src/mob/neutral/llama.rs b/old/server/entity/src/mob/neutral/llama.rs similarity index 100% rename from server/entity/src/mob/neutral/llama.rs rename to old/server/entity/src/mob/neutral/llama.rs diff --git a/server/entity/src/mob/neutral/polar_bear.rs b/old/server/entity/src/mob/neutral/polar_bear.rs similarity index 100% rename from server/entity/src/mob/neutral/polar_bear.rs rename to old/server/entity/src/mob/neutral/polar_bear.rs diff --git a/server/entity/src/mob/neutral/spider.rs b/old/server/entity/src/mob/neutral/spider.rs similarity index 100% rename from server/entity/src/mob/neutral/spider.rs rename to old/server/entity/src/mob/neutral/spider.rs diff --git a/server/entity/src/mob/neutral/wolf.rs b/old/server/entity/src/mob/neutral/wolf.rs similarity index 100% rename from server/entity/src/mob/neutral/wolf.rs rename to old/server/entity/src/mob/neutral/wolf.rs diff --git a/server/entity/src/mob/neutral/zombie_pigman.rs b/old/server/entity/src/mob/neutral/zombie_pigman.rs similarity index 100% rename from server/entity/src/mob/neutral/zombie_pigman.rs rename to old/server/entity/src/mob/neutral/zombie_pigman.rs diff --git a/server/entity/src/mob/passive.rs b/old/server/entity/src/mob/passive.rs similarity index 100% rename from server/entity/src/mob/passive.rs rename to old/server/entity/src/mob/passive.rs diff --git a/server/entity/src/mob/passive/bat.rs b/old/server/entity/src/mob/passive/bat.rs similarity index 100% rename from server/entity/src/mob/passive/bat.rs rename to old/server/entity/src/mob/passive/bat.rs diff --git a/server/entity/src/mob/passive/cat.rs b/old/server/entity/src/mob/passive/cat.rs similarity index 100% rename from server/entity/src/mob/passive/cat.rs rename to old/server/entity/src/mob/passive/cat.rs diff --git a/server/entity/src/mob/passive/chicken.rs b/old/server/entity/src/mob/passive/chicken.rs similarity index 100% rename from server/entity/src/mob/passive/chicken.rs rename to old/server/entity/src/mob/passive/chicken.rs diff --git a/server/entity/src/mob/passive/cod.rs b/old/server/entity/src/mob/passive/cod.rs similarity index 100% rename from server/entity/src/mob/passive/cod.rs rename to old/server/entity/src/mob/passive/cod.rs diff --git a/server/entity/src/mob/passive/cow.rs b/old/server/entity/src/mob/passive/cow.rs similarity index 100% rename from server/entity/src/mob/passive/cow.rs rename to old/server/entity/src/mob/passive/cow.rs diff --git a/server/entity/src/mob/passive/donkey.rs b/old/server/entity/src/mob/passive/donkey.rs similarity index 100% rename from server/entity/src/mob/passive/donkey.rs rename to old/server/entity/src/mob/passive/donkey.rs diff --git a/server/entity/src/mob/passive/horse.rs b/old/server/entity/src/mob/passive/horse.rs similarity index 100% rename from server/entity/src/mob/passive/horse.rs rename to old/server/entity/src/mob/passive/horse.rs diff --git a/server/entity/src/mob/passive/mooshroom.rs b/old/server/entity/src/mob/passive/mooshroom.rs similarity index 100% rename from server/entity/src/mob/passive/mooshroom.rs rename to old/server/entity/src/mob/passive/mooshroom.rs diff --git a/server/entity/src/mob/passive/mule.rs b/old/server/entity/src/mob/passive/mule.rs similarity index 100% rename from server/entity/src/mob/passive/mule.rs rename to old/server/entity/src/mob/passive/mule.rs diff --git a/server/entity/src/mob/passive/ocelot.rs b/old/server/entity/src/mob/passive/ocelot.rs similarity index 100% rename from server/entity/src/mob/passive/ocelot.rs rename to old/server/entity/src/mob/passive/ocelot.rs diff --git a/server/entity/src/mob/passive/parrot.rs b/old/server/entity/src/mob/passive/parrot.rs similarity index 100% rename from server/entity/src/mob/passive/parrot.rs rename to old/server/entity/src/mob/passive/parrot.rs diff --git a/server/entity/src/mob/passive/pig.rs b/old/server/entity/src/mob/passive/pig.rs similarity index 100% rename from server/entity/src/mob/passive/pig.rs rename to old/server/entity/src/mob/passive/pig.rs diff --git a/server/entity/src/mob/passive/rabbit.rs b/old/server/entity/src/mob/passive/rabbit.rs similarity index 100% rename from server/entity/src/mob/passive/rabbit.rs rename to old/server/entity/src/mob/passive/rabbit.rs diff --git a/server/entity/src/mob/passive/salmon.rs b/old/server/entity/src/mob/passive/salmon.rs similarity index 100% rename from server/entity/src/mob/passive/salmon.rs rename to old/server/entity/src/mob/passive/salmon.rs diff --git a/server/entity/src/mob/passive/sheep.rs b/old/server/entity/src/mob/passive/sheep.rs similarity index 100% rename from server/entity/src/mob/passive/sheep.rs rename to old/server/entity/src/mob/passive/sheep.rs diff --git a/server/entity/src/mob/passive/skeleton_horse.rs b/old/server/entity/src/mob/passive/skeleton_horse.rs similarity index 100% rename from server/entity/src/mob/passive/skeleton_horse.rs rename to old/server/entity/src/mob/passive/skeleton_horse.rs diff --git a/server/entity/src/mob/passive/snow_golem.rs b/old/server/entity/src/mob/passive/snow_golem.rs similarity index 100% rename from server/entity/src/mob/passive/snow_golem.rs rename to old/server/entity/src/mob/passive/snow_golem.rs diff --git a/server/entity/src/mob/passive/squid.rs b/old/server/entity/src/mob/passive/squid.rs similarity index 100% rename from server/entity/src/mob/passive/squid.rs rename to old/server/entity/src/mob/passive/squid.rs diff --git a/server/entity/src/mob/passive/tropical_fish.rs b/old/server/entity/src/mob/passive/tropical_fish.rs similarity index 100% rename from server/entity/src/mob/passive/tropical_fish.rs rename to old/server/entity/src/mob/passive/tropical_fish.rs diff --git a/server/entity/src/mob/passive/turtle.rs b/old/server/entity/src/mob/passive/turtle.rs similarity index 100% rename from server/entity/src/mob/passive/turtle.rs rename to old/server/entity/src/mob/passive/turtle.rs diff --git a/server/entity/src/mob/passive/villager.rs b/old/server/entity/src/mob/passive/villager.rs similarity index 100% rename from server/entity/src/mob/passive/villager.rs rename to old/server/entity/src/mob/passive/villager.rs diff --git a/server/entity/src/object.rs b/old/server/entity/src/object.rs similarity index 100% rename from server/entity/src/object.rs rename to old/server/entity/src/object.rs diff --git a/server/entity/src/object/arrow.rs b/old/server/entity/src/object/arrow.rs similarity index 100% rename from server/entity/src/object/arrow.rs rename to old/server/entity/src/object/arrow.rs diff --git a/server/entity/src/object/falling_block.rs b/old/server/entity/src/object/falling_block.rs similarity index 100% rename from server/entity/src/object/falling_block.rs rename to old/server/entity/src/object/falling_block.rs diff --git a/server/entity/src/object/item.rs b/old/server/entity/src/object/item.rs similarity index 100% rename from server/entity/src/object/item.rs rename to old/server/entity/src/object/item.rs diff --git a/server/entity/src/object/supported_blocks.rs b/old/server/entity/src/object/supported_blocks.rs similarity index 100% rename from server/entity/src/object/supported_blocks.rs rename to old/server/entity/src/object/supported_blocks.rs diff --git a/server/entity/src/particle.rs b/old/server/entity/src/particle.rs similarity index 100% rename from server/entity/src/particle.rs rename to old/server/entity/src/particle.rs diff --git a/server/lighting/Cargo.toml b/old/server/lighting/Cargo.toml similarity index 100% rename from server/lighting/Cargo.toml rename to old/server/lighting/Cargo.toml diff --git a/server/lighting/src/lib.rs b/old/server/lighting/src/lib.rs similarity index 100% rename from server/lighting/src/lib.rs rename to old/server/lighting/src/lib.rs diff --git a/server/network/Cargo.toml b/old/server/network/Cargo.toml similarity index 100% rename from server/network/Cargo.toml rename to old/server/network/Cargo.toml diff --git a/server/network/src/initial_handler.rs b/old/server/network/src/initial_handler.rs similarity index 100% rename from server/network/src/initial_handler.rs rename to old/server/network/src/initial_handler.rs diff --git a/server/network/src/lib.rs b/old/server/network/src/lib.rs similarity index 100% rename from server/network/src/lib.rs rename to old/server/network/src/lib.rs diff --git a/server/network/src/listener.rs b/old/server/network/src/listener.rs similarity index 100% rename from server/network/src/listener.rs rename to old/server/network/src/listener.rs diff --git a/server/network/src/worker.rs b/old/server/network/src/worker.rs similarity index 100% rename from server/network/src/worker.rs rename to old/server/network/src/worker.rs diff --git a/server/packet_buffer/Cargo.toml b/old/server/packet_buffer/Cargo.toml similarity index 100% rename from server/packet_buffer/Cargo.toml rename to old/server/packet_buffer/Cargo.toml diff --git a/server/packet_buffer/src/lib.rs b/old/server/packet_buffer/src/lib.rs similarity index 100% rename from server/packet_buffer/src/lib.rs rename to old/server/packet_buffer/src/lib.rs diff --git a/server/physics/Cargo.toml b/old/server/physics/Cargo.toml similarity index 100% rename from server/physics/Cargo.toml rename to old/server/physics/Cargo.toml diff --git a/server/physics/src/block_bboxes.rs b/old/server/physics/src/block_bboxes.rs similarity index 100% rename from server/physics/src/block_bboxes.rs rename to old/server/physics/src/block_bboxes.rs diff --git a/server/physics/src/entity.rs b/old/server/physics/src/entity.rs similarity index 100% rename from server/physics/src/entity.rs rename to old/server/physics/src/entity.rs diff --git a/server/physics/src/lib.rs b/old/server/physics/src/lib.rs similarity index 100% rename from server/physics/src/lib.rs rename to old/server/physics/src/lib.rs diff --git a/server/physics/src/math.rs b/old/server/physics/src/math.rs similarity index 100% rename from server/physics/src/math.rs rename to old/server/physics/src/math.rs diff --git a/server/player/Cargo.toml b/old/server/player/Cargo.toml similarity index 100% rename from server/player/Cargo.toml rename to old/server/player/Cargo.toml diff --git a/server/player/src/broadcasters.rs b/old/server/player/src/broadcasters.rs similarity index 100% rename from server/player/src/broadcasters.rs rename to old/server/player/src/broadcasters.rs diff --git a/server/player/src/broadcasters/animation.rs b/old/server/player/src/broadcasters/animation.rs similarity index 100% rename from server/player/src/broadcasters/animation.rs rename to old/server/player/src/broadcasters/animation.rs diff --git a/server/player/src/broadcasters/block.rs b/old/server/player/src/broadcasters/block.rs similarity index 100% rename from server/player/src/broadcasters/block.rs rename to old/server/player/src/broadcasters/block.rs diff --git a/server/player/src/broadcasters/chat.rs b/old/server/player/src/broadcasters/chat.rs similarity index 100% rename from server/player/src/broadcasters/chat.rs rename to old/server/player/src/broadcasters/chat.rs diff --git a/server/player/src/broadcasters/gamemode.rs b/old/server/player/src/broadcasters/gamemode.rs similarity index 100% rename from server/player/src/broadcasters/gamemode.rs rename to old/server/player/src/broadcasters/gamemode.rs diff --git a/server/player/src/broadcasters/health.rs b/old/server/player/src/broadcasters/health.rs similarity index 100% rename from server/player/src/broadcasters/health.rs rename to old/server/player/src/broadcasters/health.rs diff --git a/server/player/src/broadcasters/keepalive.rs b/old/server/player/src/broadcasters/keepalive.rs similarity index 100% rename from server/player/src/broadcasters/keepalive.rs rename to old/server/player/src/broadcasters/keepalive.rs diff --git a/server/player/src/broadcasters/teleport.rs b/old/server/player/src/broadcasters/teleport.rs similarity index 100% rename from server/player/src/broadcasters/teleport.rs rename to old/server/player/src/broadcasters/teleport.rs diff --git a/server/player/src/chat.rs b/old/server/player/src/chat.rs similarity index 100% rename from server/player/src/chat.rs rename to old/server/player/src/chat.rs diff --git a/server/player/src/death.rs b/old/server/player/src/death.rs similarity index 100% rename from server/player/src/death.rs rename to old/server/player/src/death.rs diff --git a/server/player/src/join.rs b/old/server/player/src/join.rs similarity index 100% rename from server/player/src/join.rs rename to old/server/player/src/join.rs diff --git a/server/player/src/lib.rs b/old/server/player/src/lib.rs similarity index 100% rename from server/player/src/lib.rs rename to old/server/player/src/lib.rs diff --git a/server/player/src/packet_handlers.rs b/old/server/player/src/packet_handlers.rs similarity index 100% rename from server/player/src/packet_handlers.rs rename to old/server/player/src/packet_handlers.rs diff --git a/server/player/src/packet_handlers/animation.rs b/old/server/player/src/packet_handlers/animation.rs similarity index 100% rename from server/player/src/packet_handlers/animation.rs rename to old/server/player/src/packet_handlers/animation.rs diff --git a/server/player/src/packet_handlers/chat.rs b/old/server/player/src/packet_handlers/chat.rs similarity index 100% rename from server/player/src/packet_handlers/chat.rs rename to old/server/player/src/packet_handlers/chat.rs diff --git a/server/player/src/packet_handlers/client_status.rs b/old/server/player/src/packet_handlers/client_status.rs similarity index 100% rename from server/player/src/packet_handlers/client_status.rs rename to old/server/player/src/packet_handlers/client_status.rs diff --git a/server/player/src/packet_handlers/digging.rs b/old/server/player/src/packet_handlers/digging.rs similarity index 96% rename from server/player/src/packet_handlers/digging.rs rename to old/server/player/src/packet_handlers/digging.rs index ed50460d4..93051f075 100644 --- a/server/player/src/packet_handlers/digging.rs +++ b/old/server/player/src/packet_handlers/digging.rs @@ -415,17 +415,41 @@ fn handle_consume_item(game: &mut Game, world: &mut World, player: Entity, packe } fn handle_shoot_bow(game: &mut Game, world: &mut World, player: Entity) { +<<<<<<< HEAD + let inventory = world.get::(player); + let arrow_to_consume: Option<(SlotIndex, ItemStack)> = find_arrow(&inventory); + + if player.gamemode == Gamemode::Survival || player.gamemode == Gamemode::Adventure { + // If no arrow was found, don't shoot + let arrow_to_consume = arrow_to_consume.clone(); + if arrow_to_consume.is_none() { + return; + } +======= let gamemode = *world.get::(player); +>>>>>>> develop { let inventory = world.get::(player); let arrow_to_consume: Option<(SlotIndex, ItemStack)> = find_arrow(&inventory); +<<<<<<< HEAD + inventory.set_item_at(arrow_slot, arrow_stack); + game.handle( + world, + InventoryUpdateEvent { + slots: smallvec![arrow_slot], + entity: player, + }, + ); + } +======= if gamemode == Gamemode::Survival || gamemode == Gamemode::Adventure { // If no arrow was found, don't shoot if arrow_to_consume.is_none() { return; } +>>>>>>> develop // Consume arrow let (arrow_slot, arrow_stack) = arrow_to_consume.unwrap(); diff --git a/server/player/src/packet_handlers/inventory.rs b/old/server/player/src/packet_handlers/inventory.rs similarity index 100% rename from server/player/src/packet_handlers/inventory.rs rename to old/server/player/src/packet_handlers/inventory.rs diff --git a/server/player/src/packet_handlers/movement.rs b/old/server/player/src/packet_handlers/movement.rs similarity index 100% rename from server/player/src/packet_handlers/movement.rs rename to old/server/player/src/packet_handlers/movement.rs diff --git a/server/player/src/packet_handlers/placement.rs b/old/server/player/src/packet_handlers/placement.rs similarity index 100% rename from server/player/src/packet_handlers/placement.rs rename to old/server/player/src/packet_handlers/placement.rs diff --git a/server/player/src/packet_handlers/use_item.rs b/old/server/player/src/packet_handlers/use_item.rs similarity index 100% rename from server/player/src/packet_handlers/use_item.rs rename to old/server/player/src/packet_handlers/use_item.rs diff --git a/server/player/src/packet_handlers/window.rs b/old/server/player/src/packet_handlers/window.rs similarity index 100% rename from server/player/src/packet_handlers/window.rs rename to old/server/player/src/packet_handlers/window.rs diff --git a/server/player/src/view.rs b/old/server/player/src/view.rs similarity index 100% rename from server/player/src/view.rs rename to old/server/player/src/view.rs diff --git a/server/src/event_handlers.rs b/old/server/src/event_handlers.rs similarity index 100% rename from server/src/event_handlers.rs rename to old/server/src/event_handlers.rs diff --git a/server/src/init.rs b/old/server/src/init.rs similarity index 100% rename from server/src/init.rs rename to old/server/src/init.rs diff --git a/server/src/lib.rs b/old/server/src/lib.rs similarity index 100% rename from server/src/lib.rs rename to old/server/src/lib.rs diff --git a/server/src/main.rs b/old/server/src/main.rs similarity index 100% rename from server/src/main.rs rename to old/server/src/main.rs diff --git a/server/src/shutdown.rs b/old/server/src/shutdown.rs similarity index 100% rename from server/src/shutdown.rs rename to old/server/src/shutdown.rs diff --git a/server/src/systems.rs b/old/server/src/systems.rs similarity index 100% rename from server/src/systems.rs rename to old/server/src/systems.rs diff --git a/server/template/Cargo.toml b/old/server/template/Cargo.toml similarity index 100% rename from server/template/Cargo.toml rename to old/server/template/Cargo.toml diff --git a/server/template/src/lib.rs b/old/server/template/src/lib.rs similarity index 100% rename from server/template/src/lib.rs rename to old/server/template/src/lib.rs diff --git a/server/test/Cargo.toml b/old/server/test/Cargo.toml similarity index 100% rename from server/test/Cargo.toml rename to old/server/test/Cargo.toml diff --git a/server/test/src/lib.rs b/old/server/test/src/lib.rs similarity index 100% rename from server/test/src/lib.rs rename to old/server/test/src/lib.rs diff --git a/server/test/src/unit.rs b/old/server/test/src/unit.rs similarity index 100% rename from server/test/src/unit.rs rename to old/server/test/src/unit.rs diff --git a/server/types/Cargo.toml b/old/server/types/Cargo.toml similarity index 100% rename from server/types/Cargo.toml rename to old/server/types/Cargo.toml diff --git a/server/types/src/components.rs b/old/server/types/src/components.rs similarity index 100% rename from server/types/src/components.rs rename to old/server/types/src/components.rs diff --git a/server/types/src/components/marker.rs b/old/server/types/src/components/marker.rs similarity index 100% rename from server/types/src/components/marker.rs rename to old/server/types/src/components/marker.rs diff --git a/server/types/src/components/network.rs b/old/server/types/src/components/network.rs similarity index 100% rename from server/types/src/components/network.rs rename to old/server/types/src/components/network.rs diff --git a/server/types/src/components/physics.rs b/old/server/types/src/components/physics.rs similarity index 100% rename from server/types/src/components/physics.rs rename to old/server/types/src/components/physics.rs diff --git a/server/types/src/components/serialize.rs b/old/server/types/src/components/serialize.rs similarity index 100% rename from server/types/src/components/serialize.rs rename to old/server/types/src/components/serialize.rs diff --git a/server/types/src/events.rs b/old/server/types/src/events.rs similarity index 100% rename from server/types/src/events.rs rename to old/server/types/src/events.rs diff --git a/server/types/src/game.rs b/old/server/types/src/game.rs similarity index 100% rename from server/types/src/game.rs rename to old/server/types/src/game.rs diff --git a/server/types/src/lib.rs b/old/server/types/src/lib.rs similarity index 100% rename from server/types/src/lib.rs rename to old/server/types/src/lib.rs diff --git a/server/types/src/misc.rs b/old/server/types/src/misc.rs similarity index 100% rename from server/types/src/misc.rs rename to old/server/types/src/misc.rs diff --git a/server/types/src/resources.rs b/old/server/types/src/resources.rs similarity index 100% rename from server/types/src/resources.rs rename to old/server/types/src/resources.rs diff --git a/server/types/src/task.rs b/old/server/types/src/task.rs similarity index 100% rename from server/types/src/task.rs rename to old/server/types/src/task.rs diff --git a/server/util/Cargo.toml b/old/server/util/Cargo.toml similarity index 100% rename from server/util/Cargo.toml rename to old/server/util/Cargo.toml diff --git a/server/util/src/block.rs b/old/server/util/src/block.rs similarity index 100% rename from server/util/src/block.rs rename to old/server/util/src/block.rs diff --git a/server/util/src/chunk_entities.rs b/old/server/util/src/chunk_entities.rs similarity index 100% rename from server/util/src/chunk_entities.rs rename to old/server/util/src/chunk_entities.rs diff --git a/server/util/src/lib.rs b/old/server/util/src/lib.rs similarity index 100% rename from server/util/src/lib.rs rename to old/server/util/src/lib.rs diff --git a/server/util/src/load.rs b/old/server/util/src/load.rs similarity index 100% rename from server/util/src/load.rs rename to old/server/util/src/load.rs diff --git a/server/util/src/time.rs b/old/server/util/src/time.rs similarity index 100% rename from server/util/src/time.rs rename to old/server/util/src/time.rs diff --git a/server/weather/Cargo.toml b/old/server/weather/Cargo.toml similarity index 100% rename from server/weather/Cargo.toml rename to old/server/weather/Cargo.toml diff --git a/server/weather/src/lib.rs b/old/server/weather/src/lib.rs similarity index 100% rename from server/weather/src/lib.rs rename to old/server/weather/src/lib.rs diff --git a/server/chunk/src/chunk_worker.rs b/server/chunk/src/chunk_worker.rs deleted file mode 100644 index bfbb0f146..000000000 --- a/server/chunk/src/chunk_worker.rs +++ /dev/null @@ -1,286 +0,0 @@ -//! This module handles the asynchronous loading and saving -//! of chunks. It receives load and save requests from the server -//! (over a channel) and executes them. -//! -//! If a chunk cannot be loaded, it is generated on the Rayon thread pool -//! instead. -use ahash::AHashMap; -use crossbeam::channel::{Receiver, Sender}; -use feather_core::anvil::entity::EntityData; -use feather_core::anvil::region; -use feather_core::anvil::{ - block_entity::BlockEntityData, - region::{RegionHandle, RegionPosition}, -}; -use feather_core::chunk::Chunk; -use feather_core::util::ChunkPosition; -use feather_server_util::EntityLoader; -use feather_server_worldgen::WorldGenerator; -use fecs::EntityBuilder; -use parking_lot::RwLock; -use smallvec::SmallVec; -use std::path::{Path, PathBuf}; -use std::sync::Arc; -use std::time::{SystemTime, UNIX_EPOCH}; - -/// Stores a chunk and associated data (entities, block entities, tile ticks, ...) -/// for saving to the world save. -#[derive(Clone)] -pub struct ChunkSave { - pub chunk: Arc>, - /// Entities within this chunk. - pub entities: SmallVec<[EntityData; 4]>, - /// Block entities within this chunk. - pub block_entities: SmallVec<[BlockEntityData; 4]>, -} - -/// Stores a chunk and associated data loaded -/// from the world save. -pub struct ChunkLoad { - pub chunk: Chunk, - /// Entities within this chunk, pre-built with their components. - /// Includes block entities as well. - pub entities: SmallVec<[EntityBuilder; 4]>, -} - -#[allow(clippy::large_enum_variant)] -pub enum Reply { - LoadedChunk(ChunkPosition, anyhow::Result), - SavedChunk(ChunkPosition, anyhow::Result<()>), -} - -#[derive(Clone)] -#[allow(clippy::large_enum_variant)] -pub enum Request { - LoadChunk(ChunkPosition), - SaveChunk(ChunkSave), - ShutDown, -} - -/// An open region file -struct RegionFile { - /// The handle for the file - handle: RegionHandle, - /// The timestamp of the last time - /// this region file was used. This - /// value is used to close - /// the file after it isn't used for - /// some period of time. - /// - /// TODO actually implement this - _last_used: u64, -} - -struct ChunkWorker { - /// The directory in which the world - /// resides - dir: PathBuf, - - /// Channel used to send chunks and errors - /// back to the server thread - sender: Sender, - /// Channel used to receive chunk load requests - /// from the server thread - receiver: Receiver, - - /// A map of currently open region files - open_regions: AHashMap, - - /// World generator for new chunks. - world_generator: Arc, - - /// State for loading entities. - entity_loader: EntityLoader, -} - -/// Starts a chunk worker on a new thread. -/// The returned channels can be used -/// to communicate with the worker. -pub fn start( - world_dir: &Path, - world_gen: Arc, -) -> (Sender, Receiver) { - let (request_tx, request_rx) = crossbeam::channel::unbounded(); - let (reply_tx, reply_rx) = crossbeam::channel::unbounded(); - - let worker = ChunkWorker { - dir: world_dir.to_path_buf(), - sender: reply_tx, - receiver: request_rx, - open_regions: AHashMap::new(), - world_generator: world_gen, - entity_loader: EntityLoader::new(), - }; - - log::info!("Starting chunk worker"); - - // Without changing the stack size, - // a stack overflow occurs here. - // This seeks to solve that. - std::thread::Builder::new() - .stack_size(1024 * 1024 * 5) - .name("Chunk Worker Thread".to_string()) - .spawn(move || run(worker)) - .expect("Unable to start chunk worker thread"); - - (request_tx, reply_rx) -} - -/// Runs the chunk worker on the current thread, -/// blocking indefinitely. -fn run(mut worker: ChunkWorker) { - while let Ok(request) = worker.receiver.recv() { - match request { - Request::ShutDown => break, - Request::SaveChunk(save) => { - save_chunk(&mut worker, save); - } - Request::LoadChunk(pos) => { - if let Some(reply) = load_chunk(&mut worker, pos) { - worker.sender.send(reply).unwrap(); - } - } - } - } - - log::info!("Chunk worker terminating"); -} - -/// Attempts to load the chunk at the specified position. -fn load_chunk(worker: &mut ChunkWorker, pos: ChunkPosition) -> Option { - let rpos = RegionPosition::from_chunk(pos); - - let file = worker_region(&mut worker.open_regions, &worker.dir, rpos); - // Load from region file - load_chunk_from_handle( - pos, - &mut file.handle, - &Arc::from(worker.sender.clone()), - &worker.world_generator, - &worker.entity_loader, - ) -} - -fn load_chunk_from_handle( - pos: ChunkPosition, - handle: &mut RegionHandle, - sender: &Arc>, - generator: &Arc, - entity_loader: &EntityLoader, -) -> Option { - let result = handle.load_chunk(pos); - - match result { - Ok((chunk, entities, block_entities)) => { - let entities = entities - .into_iter() - .filter_map(|entity| entity_loader.load(entity)) - .chain( - block_entities - .into_iter() - .filter_map(|block_entity| entity_loader.load_block(block_entity)), - ) - .collect::, anyhow::Error>>(); - - Some(Reply::LoadedChunk( - pos, - match entities { - Ok(entities) => Ok(ChunkLoad { chunk, entities }), - Err(e) => Err(e), - }, - )) - } - Err(e) => match e { - region::Error::ChunkNotExist => { - schedule_generate_new_chunk(sender, pos, generator); - None - } - err => Some(Reply::LoadedChunk(pos, Err(err.into()))), - }, - } -} - -/// Generates a new chunk asynchronously, -/// sending the result to the provided Sender. -fn schedule_generate_new_chunk( - sender: &Arc>, - pos: ChunkPosition, - generator: &Arc, -) { - let sender = sender.clone(); - let generator = Arc::clone(generator); - rayon::spawn(move || { - sender.send(generate_new_chunk(pos, &generator)).unwrap(); - }); -} - -/// Generates a new chunk synchronously, -/// returning a Reply to send to a Sender. -fn generate_new_chunk(pos: ChunkPosition, generator: &Arc) -> Reply { - Reply::LoadedChunk( - pos, - Ok(ChunkLoad { - chunk: generator.generate_chunk(pos), - entities: SmallVec::new(), - }), - ) -} - -/// Saves the chunk at the specified position. -fn save_chunk(worker: &mut ChunkWorker, save: ChunkSave) { - let chunk = save.chunk.read(); - let rpos = RegionPosition::from_chunk(chunk.position()); - - let file = worker_region(&mut worker.open_regions, &worker.dir, rpos); - - let result = file - .handle - .save_chunk(&*chunk, &save.entities, &save.block_entities); - - worker - .sender - .send(Reply::SavedChunk( - chunk.position(), - result.map_err(|err| err.into()), - )) - .unwrap(); -} - -/// Returns whether the given chunk's region -/// is already loaded. -fn is_region_loaded( - open_regions: &AHashMap, - rpos: RegionPosition, -) -> bool { - open_regions.contains_key(&rpos) -} - -fn worker_region<'a>( - open_regions: &'a mut AHashMap, - dir: &PathBuf, - rpos: RegionPosition, -) -> &'a mut RegionFile { - if !is_region_loaded(open_regions, rpos) { - // Need to load region into memory - let mut handle = region::load_region(&dir, rpos); - if handle.is_err() { - // Create a new region file - handle = region::create_region(&dir, rpos); - } - - let handle = handle.unwrap(); - - let last_used = SystemTime::now() - .duration_since(UNIX_EPOCH) - .unwrap() - .as_secs(); - - let file = RegionFile { - handle, - _last_used: last_used, - }; - - open_regions.insert(rpos, file); - } - open_regions.get_mut(&rpos).unwrap() -} diff --git a/tools/proxy/Cargo.toml b/tools/proxy/Cargo.toml new file mode 100644 index 000000000..fbaa0f9d5 --- /dev/null +++ b/tools/proxy/Cargo.toml @@ -0,0 +1,16 @@ +[package] +name = "minecraft-proxy" +version = "0.1.0" +authors = ["caelunshun "] +edition = "2018" + +[dependencies] +feather-protocol = { path = "../../crates/protocol" } +async-executor = "1" +async-io = "1" +futures-lite = "1" +argh = "0.1" +anyhow = "1" +log = "0.4" +simple_logger = "1" +either = "1" diff --git a/tools/proxy/README.md b/tools/proxy/README.md new file mode 100644 index 000000000..e8572e0a4 --- /dev/null +++ b/tools/proxy/README.md @@ -0,0 +1,19 @@ +### minecraft-proxy + +A simple proxy for use during development. It proxies a connection between +client and server and prints out packets going over the network. + +This tool is useful when figuring out how Minecraft implements features +over the protocol. + +#### Usage + +To set up the proxy with a vanilla server and client: + +* Start the vanilla 1.16.3 server. Make sure to set `network-compression-threshold=-1` and `online-mode=false` +or the proxy will not work for the time being. +* Run the proxy with `cargo run --bin minecraft-proxy -- --port 25566 --server-port 25565` +* Connect your client to `localhost:25566` + +The proxy supports multiple client connections, in case you need +to debug protocol semantics with multiple players. diff --git a/tools/proxy/src/main.rs b/tools/proxy/src/main.rs new file mode 100644 index 000000000..9eec5d2b4 --- /dev/null +++ b/tools/proxy/src/main.rs @@ -0,0 +1,218 @@ +use std::net::{SocketAddr, TcpListener, TcpStream}; + +use anyhow::{bail, Context}; +use argh::FromArgs; +use async_executor::Executor; +use async_io::{block_on, Async}; +use either::Either; +use feather_protocol::{ + packets::client::HandshakeState, ClientHandshakePacket, ClientPacket, ClientPacketCodec, + ProtocolState, ServerLoginPacket, ServerPacket, ServerPacketCodec, +}; +use futures_lite::FutureExt; +use futures_lite::{AsyncReadExt, AsyncWriteExt}; +use simple_logger::SimpleLogger; + +/// A proxy for debugging and inspecting the Minecraft protocol. +#[derive(Debug, FromArgs)] +struct Args { + /// the port to listen on. Must be different from + /// the vanilla server's port. + #[argh(option, short = 'p')] + port: u16, + /// the port of the server to proxy to. + #[argh(option, short = 's')] + server_port: u16, +} + +fn main() -> anyhow::Result<()> { + SimpleLogger::new() + .with_level(log::LevelFilter::Debug) + .init() + .unwrap(); + let args: Args = argh::from_env(); + + let addr = format!("127.0.0.1:{}", args.port); + let listener = TcpListener::bind(&addr) + .with_context(|| format!("failed to bind to port {}", args.port))?; + let mut listener = Async::new(listener)?; + + log::info!("Listening on {}", addr); + + let executor = Executor::new(); + block_on(executor.run(async { + accept_connections(&executor, &mut listener, args.server_port).await; + })); + + Ok(()) +} + +async fn accept_connections( + executor: &Executor<'static>, + listener: &mut Async, + server_port: u16, +) { + loop { + let (stream, addr) = match listener.accept().await { + Ok(con) => con, + Err(e) => { + log::error!("Failed to accept connection: {}", e); + continue; + } + }; + log::info!("Accepting connection from {}", addr); + + executor + .spawn(async move { + if let Err(e) = handle_connection(stream, server_port).await { + log::error!("Connection dropped: {:?}", e); + } + }) + .detach(); + } +} + +struct Connection { + /// The client's username. + username: String, + + client_buffer: [u8; 256], + client_codec: ClientPacketCodec, + client: Async, + + server_buffer: [u8; 256], + server_codec: ServerPacketCodec, + server: Async, +} + +impl Connection { + fn set_state(&mut self, state: ProtocolState) { + log::info!("{}: switching to state {:?}", self.username, state); + self.client_codec.set_state(state); + self.server_codec.set_state(state); + } +} + +const MAX_PACKET_DISPLAY: usize = 4000; + +async fn handle_connection(client: Async, server_port: u16) -> anyhow::Result<()> { + let server = + Async::::connect(format!("127.0.0.1:{}", server_port).parse::()?) + .await + .with_context(|| format!("failed to connect to server at localhost:{}", server_port))?; + + let mut connection = Connection { + username: String::from(""), + + client_buffer: [0; 256], + client_codec: ClientPacketCodec::new(), + client, + + server_buffer: [0; 256], + server_codec: ServerPacketCodec::new(), + server, + }; + + let mut buffer = Vec::new(); + + loop { + let client = &mut connection.client; + let client_buffer = &mut connection.client_buffer; + let server = &mut connection.server; + let server_buffer = &mut connection.server_buffer; + + // Attempt to read data from either the server or the client. + let recv_client = async { Either::Left(client.read(client_buffer).await) }; + let recv_server = async { Either::Right(server.read(server_buffer).await) }; + match recv_client.race(recv_server).await { + Either::Left(client) => { + let mut bytes_read = client?; + if bytes_read == 0 { + bail!("disconnected from client"); + } + + while let Some(packet) = connection + .client_codec + .decode(&connection.client_buffer[..bytes_read]) + .context("failed to decode client packet")? + { + bytes_read = 0; + let mut packet_str = format!("{:?}", packet); + if packet_str.len() > MAX_PACKET_DISPLAY { + packet_str = format!("{} ", &packet_str[..MAX_PACKET_DISPLAY]); + } + log::info!("client @ {}: {}", connection.username, packet_str); + + // Attempt to detect state switches. + if let ClientPacket::Handshake(packet) = &packet { + let state = match packet { + ClientHandshakePacket::Handshake(packet) => match packet.next_state { + HandshakeState::Login => ProtocolState::Login, + HandshakeState::Status => ProtocolState::Status, + }, + }; + connection.set_state(state) + } + + // Forward the packet to the server. + connection.client_codec.encode(&packet, &mut buffer); + connection.server.write_all(&buffer).await?; + buffer.clear(); + } + } + Either::Right(server) => { + let mut bytes_read = server?; + if bytes_read == 9 { + bail!("disconnected from server"); + } + + while let Some(packet) = connection + .server_codec + .decode(&connection.server_buffer[..bytes_read]) + .context("failed to decode server packet")? + { + bytes_read = 0; + let mut packet_str = format!("{:?}", packet); + if packet_str.len() > MAX_PACKET_DISPLAY { + packet_str = format!("{} ", &packet_str[..MAX_PACKET_DISPLAY]); + } + log::info!("server @ {}: {}", connection.username, packet_str); + + // Attempt to detect state switches. + if let ServerPacket::Login(ServerLoginPacket::LoginSuccess(packet)) = &packet { + connection.username = packet.username.clone(); + connection.set_state(ProtocolState::Play); + } + + // Forward the packet to the client. + connection.server_codec.encode(&packet, &mut buffer); + connection.client.write_all(&buffer).await?; + buffer.clear(); + } + } + } + } +} + +#[cfg(test)] +mod tests { + use super::*; + + #[test] + fn parse_cli_args() { + let args = Args::from_args(&["minecraft-proxy"], &["-p", "25565", "-s", "25566"]).unwrap(); + assert_eq!(args.port, 25565); + assert_eq!(args.server_port, 25566); + } + + #[test] + fn parse_cli_args_long_port() { + let args = Args::from_args( + &["minecraft-proxy"], + &["--port", "25565", "--server-port", "25566"], + ) + .unwrap(); + assert_eq!(args.port, 25565); + assert_eq!(args.server_port, 25566); + } +}