diff --git a/Cargo.lock b/Cargo.lock index 132117db3..af446dfcd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -81,9 +81,9 @@ checksum = "940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000" [[package]] name = "anyhow" -version = "1.0.102" +version = "1.0.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c" +checksum = "2a4385e2e34eb35d6b3efe798b9eb88096925d87726c0798709bf56d9ed84af3" [[package]] name = "arbitrary" @@ -93,9 +93,9 @@ checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1" [[package]] name = "arc-swap" -version = "1.9.1" +version = "1.9.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207" +checksum = "c049c0be4daef0b145cb3555416b3b8ef5b7888a38aea1a3a155801fe7b0810b" dependencies = [ "rustversion", ] @@ -631,27 +631,27 @@ dependencies = [ [[package]] name = "cranelift-assembler-x64" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "715783c05f20985a5dfe6bfdccbfcb146cb44bfd8f6ff1d09526c3bf442fdac5" +checksum = "e06aeba2c965fc446d13c56a6ccb2631b78445d7544543dd9a25289977630914" dependencies = [ "cranelift-assembler-x64-meta", ] [[package]] name = "cranelift-assembler-x64-meta" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c3da5a783f2b72af39ab98c1bf3157e081511e1febeafe550d71a4d0ba75f66" +checksum = "ee2d2dde4ec1352715595b5cfa6fe2e5b8ebb9da3457b3ee8db0aa2808c069aa" dependencies = [ "cranelift-srcgen", ] [[package]] name = "cranelift-bforest" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e2e9b7adf77fa02204d4d523ae4f171b6591c2632b030865336335c7d7b420e" +checksum = "03b4982ef9fa54ec9eee841e891e7ddc5434be1250e88de31572e000c888f30b" dependencies = [ "cranelift-entity", "wasmtime-internal-core", @@ -659,9 +659,9 @@ dependencies = [ [[package]] name = "cranelift-bitset" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90f09d9f397eae612ac15becf0e0b2165d2232003f4f2a1549572a724d1c48c5" +checksum = "529143118c4eeb58c39ecb02319557d512be6c61348486422974ab8e3906b8a8" dependencies = [ "serde", "serde_derive", @@ -670,9 +670,9 @@ dependencies = [ [[package]] name = "cranelift-codegen" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5e004cf1270abc82f7b9fb32d1a9d73a1cc0d5a0215b97db8c32658748e78b01" +checksum = "b7780677247ad3577e3a6a3ebf43f39b325a11d6393db72b2c9968a910d4d13d" dependencies = [ "bumpalo", "cranelift-assembler-x64", @@ -701,9 +701,9 @@ dependencies = [ [[package]] name = "cranelift-codegen-meta" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04f32034641f96b123e4fdb5666e726d9f252e222638fc8fdd905b4ff18c3c4e" +checksum = "ac9645250416cbf92454fe61160e17e026e0ce405906a54500b114f923ddffc9" dependencies = [ "cranelift-assembler-x64-meta", "cranelift-codegen-shared", @@ -714,24 +714,24 @@ dependencies = [ [[package]] name = "cranelift-codegen-shared" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "746566ae868b0e87a89206b3856350886a4fc2e078ce6485bec2ea6727c31685" +checksum = "20ee8d222ff0fd3681791979afbf88586ac9f49010d3db96b3cbe4c96759aee3" [[package]] name = "cranelift-control" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "def01ab5cd08a1be551d4bc96adc6af91f89138c4f81d0a60fdf3b9f82272703" +checksum = "591abe6f5312bd2c4220f1b3bead56c2ad00257c52668015ba013b85dcf2a17a" dependencies = [ "arbitrary", ] [[package]] name = "cranelift-entity" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "341d5e1e071320505ebbc8194a8eb61fa94394b1ed93ba3cbec3be5fa1c3c1ce" +checksum = "a5300c49cf940526fe771517b3b3eabd5d0ff164ee61698579cf403fe8d3af3c" dependencies = [ "cranelift-bitset", "serde", @@ -741,9 +741,9 @@ dependencies = [ [[package]] name = "cranelift-frontend" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97c6f3e2419ecb54a5503994d35421554c5e487d0493bc86ea96907bab51fd29" +checksum = "da4adbf760207fdbbe130f1191cce01cdef66831a9f648b1f39ff2800d126d45" dependencies = [ "cranelift-codegen", "hashbrown 0.17.1", @@ -754,15 +754,15 @@ dependencies = [ [[package]] name = "cranelift-isle" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21aa47a5e0b1e9fb2c9348459088d5dbb872ebe17781ada1270d8364c7e73257" +checksum = "8315b21ff018226a42a60a4702c2dd75f6447cac26e9bca622e14c22088c2ff5" [[package]] name = "cranelift-native" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3054a03ac285b170662ec9530602b01cd394a7428cd753b48d9cae51f05249a" +checksum = "d506ef23a60715bde451b06620b14402166ded3b648454fccbf04f3e46a4aa70" dependencies = [ "cranelift-codegen", "libc", @@ -771,9 +771,9 @@ dependencies = [ [[package]] name = "cranelift-srcgen" -version = "0.133.0" +version = "0.133.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd2498406acfcfd39c69078af187154ac8dcd31d3082888b258deb2a4fd0ecf4" +checksum = "48ed47e602652e3410f9387fc0db70fefadcee4d78a78881421aabcab4e26b89" [[package]] name = "crc-fast" @@ -892,9 +892,9 @@ checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" [[package]] name = "crossfire" -version = "3.1.16" +version = "3.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4d8c4de3db833e7ef74050bae09d5f3fa8f9d1507d3c2689c6e8c50b71208b18" +checksum = "df981decccf9b846c396ae513b3d2c6a1770d9593c8e47853d8fdb336c7bcb46" dependencies = [ "crossbeam-utils", "embed-collections", @@ -1578,15 +1578,15 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "humantime" -version = "2.3.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "135b12329e5e3ce057a9f972339ea52bc954fe1e9358ef27f95e89716fbc5424" +checksum = "15cdd26707701c53297e2fa6afb323d55fbc1d0810c3aec078ae3ef0424c3c15" [[package]] name = "hybrid-array" -version = "0.4.12" +version = "0.4.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9155a582abd142abc056962c29e3ce5ff2ad5469f4246b537ed42c5deba857da" +checksum = "818356c5132c1fede50f837ca96afbe78ff42413047f4abb886217845e1b6c8c" dependencies = [ "typenum", ] @@ -1817,9 +1817,9 @@ dependencies = [ [[package]] name = "inotify-sys" -version = "0.1.5" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05c02b5e89bff3b946cedeca278abc628fe811e604f027c45a8aa3cf793d0eb" +checksum = "9ea94e891b3606826e9c998be69ddca42247dad8ad50b1649a5cb7e1c9ae06fd" dependencies = [ "libc", ] @@ -1900,9 +1900,9 @@ dependencies = [ [[package]] name = "js-sys" -version = "0.3.102" +version = "0.3.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03d04c30968dffe80775bd4d7fb676131cd04a1fb46d2686dbffbaec2d9dfd31" +checksum = "53b44bfcdb3f8d5837a46dae1ca9660a837176eee74a28b229bc626816589102" dependencies = [ "cfg-if", "futures-util", @@ -1965,9 +1965,9 @@ checksum = "b6d2cec3eae94f9f509c767b45932f1ada8350c4bdb85af2fcab4a3c14807981" [[package]] name = "libredox" -version = "0.1.17" +version = "0.1.18" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f02ab6bace2054fb888a3c16f990117b579d14a3088e472d63c6011fa185c9d3" +checksum = "c943259e342f1e06ff2da7a83eabdfe7f92ce10262688dbf1895ff0b3e6e4652" dependencies = [ "libc", ] @@ -2192,9 +2192,9 @@ dependencies = [ [[package]] name = "num-bigint" -version = "0.4.6" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" +checksum = "7032fbb7ef662c18e806aa75b311f68ddf5c94e8fc62832c0039d79095ab6abf" dependencies = [ "num-integer", "num-traits", @@ -2627,9 +2627,9 @@ dependencies = [ [[package]] name = "pulley-interpreter" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "047bda68096e5f290619ce037b7c3fa352d11f08edf0fce3030c351adc0f8ec0" +checksum = "38b92604caae1a1899b6a5b54967289dd538177c626004c91accf9d0ec7e4a12" dependencies = [ "cranelift-bitset", "log", @@ -2639,9 +2639,9 @@ dependencies = [ [[package]] name = "pulley-macros" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83258a9bcc97d3fb15bf4e1c43bc2cc85c718e3563a697f145f245e651f2828f" +checksum = "5a7ac85c0bb3fb351f10d531230aaa5e366b46d7c4e5328e5f02801d6dac1165" dependencies = [ "proc-macro2", "quote", @@ -2919,9 +2919,9 @@ checksum = "f8dcc9c7d52a811697d2151c701e0d08956f92b0e24136cf4cf27b57a6a0d9bf" [[package]] name = "rand" -version = "0.10.1" +version = "0.10.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2e8e8bcc7961af1fdac401278c6a831614941f6164ee3bf4ce61b7edb162207" +checksum = "c7f5fa3a058cd35567ef9bfa5e75732bee0f9e4c55fa90477bef2dfcdbc4be80" dependencies = [ "chacha20", "getrandom 0.4.3", @@ -3077,9 +3077,9 @@ checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d" [[package]] name = "rustc-hash" -version = "2.1.2" +version = "2.1.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" +checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d" [[package]] name = "rustc_version" @@ -3140,9 +3140,9 @@ dependencies = [ [[package]] name = "rustls-pki-types" -version = "1.14.1" +version = "1.15.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30a7197ae7eb376e574fe940d068c30fe0462554a3ddbe4eca7838e049c937a9" +checksum = "764899a24af3980067ee14bc143654f297b22eaebfe3c7b6b211920a5a59b046" dependencies = [ "zeroize", ] @@ -3166,9 +3166,9 @@ checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d" [[package]] name = "rustyline" -version = "18.0.0" +version = "18.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4a990b25f351b25139ddc7f21ee3f6f56f86d6846b74ac8fad3a719a287cd4a0" +checksum = "53f6a737db68eb1a8ccff86b584b2fc13eca6a7bb6f78ebc7c529547e3ab9684" dependencies = [ "bitflags", "cfg-if", @@ -3615,9 +3615,9 @@ dependencies = [ [[package]] name = "time" -version = "0.3.51" +version = "0.3.53" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c17d80feb7334b40c484e45ed1a5273dfd8bfda537c3be2e74a06a6686f327" +checksum = "18dfaaeddcb932337b5e7866ee7d0ce9b76d2fd092997146f187ec09b4558a50" dependencies = [ "deranged", "libc", @@ -3637,9 +3637,9 @@ checksum = "9e1c906769ad99c88eaa54e728060edef082f8e358ff32030cb7c7d315e81109" [[package]] name = "time-macros" -version = "0.2.30" +version = "0.2.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcef1a61bdb119096e153208ec5cbec23944ce8bca13be5c7f60c634f7403935" +checksum = "c431b87111666e491a90baa837f914fb45cd5dc3c268591b0220ff5057f2085f" dependencies = [ "num-conv", "time-core", @@ -4043,9 +4043,9 @@ checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" [[package]] name = "uuid" -version = "1.23.3" +version = "1.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "144d6b123cef80b301b8f72a9e2ca4370ddec21950d0a103dd22c437006d2db7" +checksum = "bf80a72845275afea99e7f2b434723d3bc7e38470fcd1c7ed39a599c73319a53" dependencies = [ "getrandom 0.4.3", "js-sys", @@ -4102,9 +4102,9 @@ dependencies = [ [[package]] name = "wasm-bindgen" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ddb3f79143bced6de84270411622a2699cee572fc0875aeaf1e7867cf9fca1a" +checksum = "4b067c0c11094aef6b7a801c1e34a26affafdf3d051dba08456b868789aaf9a4" dependencies = [ "cfg-if", "once_cell", @@ -4115,9 +4115,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e21a184b13fb19e157296e2c46056aec9092264fab83e4ba59e68c61b323c3d" +checksum = "167ce5e579f6bcf889c4f7175a8a5a585de84e8ff93976ce393efa5f2837aab1" dependencies = [ "quote", "wasm-bindgen-macro-support", @@ -4125,9 +4125,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-macro-support" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fecefd9c35bd935a20fc3fc344b5f29138961e4f47fb03297d88f2587afb5ebd" +checksum = "f3997c7839262f4ef12cf90b818d6340c18e80f263f1a94bf157d0ec4420380e" dependencies = [ "bumpalo", "proc-macro2", @@ -4138,9 +4138,9 @@ dependencies = [ [[package]] name = "wasm-bindgen-shared" -version = "0.2.125" +version = "0.2.126" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23939e44bb9a5d7576fa2b563dc2e136628f1224e88a8deed09e04858b77871f" +checksum = "dc1b4cb0cc549fcf58d7dfc081778139b3d283a081644e833e84682ad71cea24" dependencies = [ "unicode-ident", ] @@ -4193,9 +4193,9 @@ dependencies = [ [[package]] name = "wasmtime" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08dd5caf09eda1d523261a0dd421a54e3bb165cf6f5b02c82327e712d49e3cf4" +checksum = "c4213d2f019a5e44aa8a61d8826dd33a505bff79f749b14a8bafd67321cb9351" dependencies = [ "addr2line", "async-trait", @@ -4236,9 +4236,9 @@ dependencies = [ [[package]] name = "wasmtime-environ" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f3aa689689cf295568aa4d24ab636579fb3b36dfa7cea35020d87064fc88ec" +checksum = "d45863de41977ec6453e859cf843d456fa3fcb45a659b66d16e794f90ec4f5b7" dependencies = [ "anyhow", "cpp_demangle", @@ -4267,9 +4267,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-cache" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd6c27fbabb7df6c88a592a28773a92aa8cfba5ee656963d7ad9b32a8f57a3d8" +checksum = "438bc7dc45fb75297d75f79a9a0ce852345d13ebc6a6863f6f688f013836a9dd" dependencies = [ "base64 0.22.1", "directories-next", @@ -4287,9 +4287,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-component-macro" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de4451ab437d7b2d41e637a4379e87ff76aeeb051236064dcc75c1855714ee58" +checksum = "f1e48f8d4966d62a10b6d70722bc432c1e163890be2801d3b5784589ad36ffc3" dependencies = [ "anyhow", "proc-macro2", @@ -4302,15 +4302,15 @@ dependencies = [ [[package]] name = "wasmtime-internal-component-util" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53b5e357002645964342b99a6fe8405cda7dd031f498927992c9d99d5012daa7" +checksum = "819ad5abd5822a22dbf4014475cdfd1fe790707761cd732d74aaa3ba4d5ba489" [[package]] name = "wasmtime-internal-core" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4f6ce74d60a8ed870548e7efa9710c54f982bbfcf80e5ee5eee8498318616483" +checksum = "3fc28372e36eaf8cf70faa83b5779137f7e99c8d18569a125d1580e735cc9e4d" dependencies = [ "hashbrown 0.17.1", "libm", @@ -4319,9 +4319,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-cranelift" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e24204583d847b7ce3d770f7a3456739d5d43f65c884cb47111dbe27b26ebbe6" +checksum = "a433efc6e35112a5457e1dc8bc4d8d39820ac7722267e89bc04e5df641f32124" dependencies = [ "cfg-if", "cranelift-codegen", @@ -4346,9 +4346,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-fiber" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ecaeb13bf3eb94a02e32ea3842c8fda3ea6897c299745100c1230b65769d2d91" +checksum = "18a1d3a39d0d210f6b8574ee96a4315e0a14c67f3a1fc3cd5372cb10d2fb4422" dependencies = [ "cc", "cfg-if", @@ -4361,9 +4361,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-jit-debug" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5090e9a302bb5729a84766e4af07b6b10efe733e437bc266dd954a957114df63" +checksum = "9f667288cb4dfa68a4639ffac4d5628535dda64ebdc2b990526efb12b30ba803" dependencies = [ "cc", "wasmtime-internal-versioned-export-macros", @@ -4371,9 +4371,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-jit-icache-coherence" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bba33d9d951a9a974a866e80c864a9a46b28086e369582e0caa78e14a9f29e4" +checksum = "eba651d44ab0faad4c58106b3adb45068189fb65ef50f0c404b6d9e3bf81a357" dependencies = [ "cfg-if", "libc", @@ -4383,9 +4383,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-unwinder" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "695063a19bac17895f95c0c0f2f9544e85a277763cd77b5778f0cce6a971073e" +checksum = "2ecc52563b0558af2a7487eb710de07cc4532564b55528876129238e83118cb1" dependencies = [ "cfg-if", "cranelift-codegen", @@ -4396,9 +4396,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-versioned-export-macros" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc77f7513209b76e8f4772af640819f47fca3a5425b4417ef9c20b888334063c" +checksum = "e747f4a074699ba1b4e4d841fb263f9b7df5bd1555181c4752bf5990d21ba676" dependencies = [ "proc-macro2", "quote", @@ -4407,9 +4407,9 @@ dependencies = [ [[package]] name = "wasmtime-internal-wit-bindgen" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e859103d8336304b8beebbf89a620c2f53a118fd5fbce41bc572cf4bacc8111d" +checksum = "80009f46991622814196d96fac6fc0a938f46b5cba737a8f4e21e24e5a03856f" dependencies = [ "anyhow", "bitflags", @@ -4420,9 +4420,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "093c67243785465fdab0cb8bfada4a1171a543dfc22b392201c77d8086367b58" +checksum = "e9f65ef30a2c5478873cdb619085a7a649d3ce41cc3eaf298a7ce3dee96a8e11" dependencies = [ "async-trait", "bitflags", @@ -4448,9 +4448,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi-http" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "357b734a727b95c9117d78b3ad17abea5e6208e2af545160dfc462b0c342fa94" +checksum = "cb65eeb8116615c2a22f51b19672c0d5b652ca7b051086da5c7c0a9eb39f4af7" dependencies = [ "async-trait", "bytes", @@ -4471,9 +4471,9 @@ dependencies = [ [[package]] name = "wasmtime-wasi-io" -version = "46.0.0" +version = "46.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95db6ca70bd5b7aab6b0297419ccbdb88682e12cc37764c757f58e917da650b9" +checksum = "cee57d5fef4976b1ab542615f4cef2c43278eb549d8078939668ea0f13d5c696" dependencies = [ "async-trait", "bytes", @@ -4931,9 +4931,9 @@ checksum = "1ffae5123b2d3fc086436f8834ae3ab053a283cfac8fe0a0b8eaae044768a4c4" [[package]] name = "xxhash-rust" -version = "0.8.15" +version = "0.8.16" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd20c5420375476fbd4394763288da7eb0cc0b8c11deed431a91562af7335d3" +checksum = "4d93c89cdc2d3a63c3ec48ffe926931bdc069eafa8e4402fe6d8f790c9d1e576" [[package]] name = "yoke" diff --git a/Cargo.toml b/Cargo.toml index b05862aff..ce28487af 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -56,6 +56,7 @@ cargo_common_metadata = "allow" cast_precision_loss = "allow" multiple_crate_versions = "allow" single_call_fn = "allow" +similar_names = "allow" unreadable_literal = "allow" many_single_char_names = "allow" suboptimal_flops = "allow" @@ -127,7 +128,7 @@ console-subscriber = { version = "0.5.0", default-features = false } crc-fast = { version = "1.10.0", default-features = false, features = ["std"] } criterion = { version = "0.8", default-features = false } crossbeam-utils = { version = "0.8.21", default-features = false, features = ["std"] } -crossfire = { version = "3.1.16", default-features = false, features = ["compat"] } +crossfire = { version = "3.1.18", default-features = false, features = ["compat"] } crypto-bigint = { version = "0.7.5", default-features = false } dashmap = { version = "6.2", default-features = false } ecdsa = { version = "0.16.9", default-features = false, features = ["std"] } @@ -142,7 +143,7 @@ libloading = { version = "0.9", default-features = false, features = ["std"] } lru = { version = "0.18.0", default-features = false } lz4-java-wrc = { version = "0.2.0", default-features = false, features = ["lz4_flex"] } md5 = { version = "0.8", default-features = false } -num-bigint = { version = "0.4", default-features = false, features = ["std"] } +num-bigint = { version = "0.5", default-features = false, features = ["std"] } num-derive = { version = "0.4", default-features = false } num-traits = { version = "0.2", default-features = false, features = ["std"] } p384 = { version = "0.13.1", default-features = false, features = ["std", "arithmetic", "pkcs8"] } @@ -158,11 +159,11 @@ pumpkin-protocol = { path = "pumpkin-protocol", default-features = false } pumpkin-util = { path = "pumpkin-util", default-features = false } pumpkin-world = { path = "pumpkin-world", default-features = false } quote = { version = "1.0", default-features = false, features = ["proc-macro"] } -rand = { version = "0.10.1", default-features = false, features = ["std", "std_rng", "thread_rng"] } +rand = { version = "0.10.2", default-features = false, features = ["std", "std_rng", "thread_rng"] } rsa = { version = "=0.10.0-rc.18", default-features = false, features = ["std", "encoding"] } cipher = { version = "0.5.2", default-features = false } -rustc-hash = { version = "2.1.2", default-features = false, features = ["std"] } -rustyline = { version = "18.0.0", default-features = false, features = ["with-file-history"] } +rustc-hash = { version = "2.1.3", default-features = false, features = ["std"] } +rustyline = { version = "18.0.1", default-features = false, features = ["with-file-history"] } ruzstd = { version = "0.8.3", default-features = false, features = ["std"] } sha1 = { version = "=0.11.0", default-features = false, features = ["oid"] } sha2 = { version = "=0.11.0", default-features = false, features = ["oid"] } diff --git a/pumpkin-codegen/src/block.rs b/pumpkin-codegen/src/block.rs index 578f70c9f..879f2953e 100644 --- a/pumpkin-codegen/src/block.rs +++ b/pumpkin-codegen/src/block.rs @@ -396,7 +396,7 @@ impl ToTokens for BlockPropertyStruct { if !Self::handles_block_id(block.id) { panic!("{} is not a valid block for {}", block.name, #struct_name); } - block.states[self.to_index() as usize].id + block.states[self.to_index() as usize].id } fn from_state_id(id: BlockStateId, block: &Block) -> Self { diff --git a/pumpkin-codegen/src/configured_feature.rs b/pumpkin-codegen/src/configured_feature.rs index 259db286b..e273abcee 100644 --- a/pumpkin-codegen/src/configured_feature.rs +++ b/pumpkin-codegen/src/configured_feature.rs @@ -82,7 +82,7 @@ pub fn build() -> TokenStream { .collect(); quote! { - #[allow(clippy::all, unused_imports, dead_code)] + #[allow(clippy::all, unused_imports, dead_code, clippy::large_stack_frames, clippy::too_many_lines)] fn build_configured_features() -> std::collections::HashMap { use crate::generation::block_predicate::{ AllOfBlockPredicate, AnyOfBlockPredicate, BlockPredicate, @@ -462,10 +462,10 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream { let r3 = config["chance_of_spread_radius3"].as_f64().unwrap_or(0.5) as f32; quote! { ConfiguredFeature::PointedDripstone(SmallDripstoneFeature { - chance_of_taller_dripstone: #taller, - chance_of_directional_spread: #dir_spread, - chance_of_spread_radius2: #r2, - chance_of_spread_radius3: #r3, + taller_dripstone: #taller, + directional_spread: #dir_spread, + spread_radius2: #r2, + spread_radius3: #r3, }) } } @@ -1302,10 +1302,10 @@ fn value_to_trunk_placer(v: &Value) -> TokenStream { value_to_int_provider(&v["branch_end_offset_from_top"]); quote! { TrunkType::Cherry(CherryTrunkPlacer { - branch_count: #branch_count, - branch_horizontal_length: #branch_horizontal_length, - branch_start_offset_from_top: UniformIntProvider { min_inclusive: #min, max_inclusive: #max }, - branch_end_offset_from_top: #branch_end_offset_from_top, + count: #branch_count, + horizontal_length: #branch_horizontal_length, + start_offset_from_top: UniformIntProvider { min_inclusive: #min, max_inclusive: #max }, + end_offset_from_top: #branch_end_offset_from_top, }) } } @@ -1684,7 +1684,7 @@ fn value_to_placement_modifier_cf(v: &Value) -> TokenStream { let r = v["noise_to_count_ratio"].as_i64().unwrap_or(0) as i32; let f = v["noise_factor"].as_f64().unwrap_or(1.0); let o = v["noise_offset"].as_f64().unwrap_or(0.0); - quote! { PlacementModifier::NoiseBasedCount(NoiseBasedCountPlacementModifier { noise_to_count_ratio: #r, noise_factor: #f, noise_offset: #o }) } + quote! { PlacementModifier::NoiseBasedCount(NoiseBasedCountPlacementModifier { to_count_ratio: #r, factor: #f, offset: #o }) } } "minecraft:noise_threshold_count" => { let l = v["noise_level"].as_f64().unwrap_or(0.0); diff --git a/pumpkin-codegen/src/placed_feature.rs b/pumpkin-codegen/src/placed_feature.rs index dbae68355..4696dbb1d 100644 --- a/pumpkin-codegen/src/placed_feature.rs +++ b/pumpkin-codegen/src/placed_feature.rs @@ -77,7 +77,7 @@ pub fn build() -> TokenStream { .collect(); quote! { - #[allow(clippy::all, unused_imports, dead_code)] + #[allow(clippy::all, unused_imports, dead_code, clippy::too_many_lines)] fn build_placed_features() -> std::collections::HashMap { use crate::generation::block_predicate::{ AllOfBlockPredicate, AnyOfBlockPredicate, BlockPredicate, @@ -255,9 +255,9 @@ fn value_to_placement_modifier(v: &Value) -> TokenStream { let offset = v["noise_offset"].as_f64().unwrap_or(0.0); quote! { PlacementModifier::NoiseBasedCount(NoiseBasedCountPlacementModifier { - noise_to_count_ratio: #ratio, - noise_factor: #factor, - noise_offset: #offset, + to_count_ratio: #ratio, + factor: #factor, + offset: #offset, }) } } diff --git a/pumpkin-data/src/generated/configured_features_generated.rs b/pumpkin-data/src/generated/configured_features_generated.rs index f9e0b408d..bb6f91395 100644 --- a/pumpkin-data/src/generated/configured_features_generated.rs +++ b/pumpkin-data/src/generated/configured_features_generated.rs @@ -1,5 +1,11 @@ /* This file is generated. Do not edit manually. */ -#[allow(clippy::all, unused_imports, dead_code)] +#[allow( + clippy::all, + unused_imports, + dead_code, + clippy::large_stack_frames, + clippy::too_many_lines +)] fn build_configured_features() -> std::collections::HashMap { @@ -748,8 +754,8 @@ fn build_configured_features() prioritize_tip: true, }), ); - map . insert (pumpkin_data :: configured_feature :: ConfiguredFeature :: Cherry , ConfiguredFeature :: Tree (Box :: new (TreeFeature { trunk_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("axis" . to_string () , "y" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: CHERRY_LOG , properties : Some (props) , } . get_state () } }) , trunk_placer : TrunkPlacer { base_height : 7u8 , height_rand_a : 1u8 , height_rand_b : 0u8 , r#type : TrunkType :: Cherry (CherryTrunkPlacer { branch_count : IntProvider :: Object (NormalIntProvider :: WeightedList (WeightedListIntProvider { distribution : vec ! [WeightedEntry { data : IntProvider :: Constant (1i32) , weight : 1i32 } , WeightedEntry { data : IntProvider :: Constant (2i32) , weight : 1i32 } , WeightedEntry { data : IntProvider :: Constant (3i32) , weight : 1i32 }] })) , branch_horizontal_length : IntProvider :: Object (NormalIntProvider :: Uniform (UniformIntProvider { min_inclusive : 2i32 , max_inclusive : 4i32 })) , branch_start_offset_from_top : UniformIntProvider { min_inclusive : - 4i32 , max_inclusive : - 3i32 } , branch_end_offset_from_top : IntProvider :: Object (NormalIntProvider :: Uniform (UniformIntProvider { min_inclusive : - 1i32 , max_inclusive : 0i32 })) , }) , } , foliage_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("waterlogged" . to_string () , "false" . to_string ()) ; props . insert ("persistent" . to_string () , "false" . to_string ()) ; props . insert ("distance" . to_string () , "7" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: CHERRY_LEAVES , properties : Some (props) , } . get_state () } }) , foliage_placer : FoliagePlacer { radius : IntProvider :: Constant (4i32) , offset : IntProvider :: Constant (0i32) , r#type : FoliageType :: Cherry (CherryFoliagePlacer { height : IntProvider :: Constant (5i32) , wide_bottom_layer_hole_chance : 0.25f32 , corner_hole_chance : 0.25f32 , hanging_leaves_chance : 0.16666667f32 , hanging_leaves_extension_chance : 0.33333334f32 , }) } , minimum_size : FeatureSize { min_clipped_height : None , r#type : FeatureSizeType :: TwoLayersFeatureSize (TwoLayersFeatureSize { limit : 1u8 , lower_size : 0u8 , upper_size : 2u8 , }) } , ignore_vines : true , below_trunk_provider : BlockStateProvider :: Rule (RuleBasedBlockStateProvider { fallback : None , rules : vec ! [BlockStateRule { if_true : BlockPredicate :: Not (NotBlockPredicate { predicate : Box :: new (BlockPredicate :: MatchingBlockTag (MatchingBlockTagPredicate { offset : OffsetBlocksBlockPredicate { offset : None } , tag : pumpkin_data :: tag :: Block :: MINECRAFT_CANNOT_REPLACE_BELOW_TREE_TRUNK , })) , }) , then : BlockStateProvider :: Simple (SimpleStateProvider { state : pumpkin_data :: Block :: DIRT . default_state }) }] , }) , decorators : vec ! [] , root_placer : None , }))) ; - map . insert (pumpkin_data :: configured_feature :: ConfiguredFeature :: CherryBees005 , ConfiguredFeature :: Tree (Box :: new (TreeFeature { trunk_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("axis" . to_string () , "y" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: CHERRY_LOG , properties : Some (props) , } . get_state () } }) , trunk_placer : TrunkPlacer { base_height : 7u8 , height_rand_a : 1u8 , height_rand_b : 0u8 , r#type : TrunkType :: Cherry (CherryTrunkPlacer { branch_count : IntProvider :: Object (NormalIntProvider :: WeightedList (WeightedListIntProvider { distribution : vec ! [WeightedEntry { data : IntProvider :: Constant (1i32) , weight : 1i32 } , WeightedEntry { data : IntProvider :: Constant (2i32) , weight : 1i32 } , WeightedEntry { data : IntProvider :: Constant (3i32) , weight : 1i32 }] })) , branch_horizontal_length : IntProvider :: Object (NormalIntProvider :: Uniform (UniformIntProvider { min_inclusive : 2i32 , max_inclusive : 4i32 })) , branch_start_offset_from_top : UniformIntProvider { min_inclusive : - 4i32 , max_inclusive : - 3i32 } , branch_end_offset_from_top : IntProvider :: Object (NormalIntProvider :: Uniform (UniformIntProvider { min_inclusive : - 1i32 , max_inclusive : 0i32 })) , }) , } , foliage_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("waterlogged" . to_string () , "false" . to_string ()) ; props . insert ("persistent" . to_string () , "false" . to_string ()) ; props . insert ("distance" . to_string () , "7" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: CHERRY_LEAVES , properties : Some (props) , } . get_state () } }) , foliage_placer : FoliagePlacer { radius : IntProvider :: Constant (4i32) , offset : IntProvider :: Constant (0i32) , r#type : FoliageType :: Cherry (CherryFoliagePlacer { height : IntProvider :: Constant (5i32) , wide_bottom_layer_hole_chance : 0.25f32 , corner_hole_chance : 0.25f32 , hanging_leaves_chance : 0.16666667f32 , hanging_leaves_extension_chance : 0.33333334f32 , }) } , minimum_size : FeatureSize { min_clipped_height : None , r#type : FeatureSizeType :: TwoLayersFeatureSize (TwoLayersFeatureSize { limit : 1u8 , lower_size : 0u8 , upper_size : 2u8 , }) } , ignore_vines : true , below_trunk_provider : BlockStateProvider :: Rule (RuleBasedBlockStateProvider { fallback : None , rules : vec ! [BlockStateRule { if_true : BlockPredicate :: Not (NotBlockPredicate { predicate : Box :: new (BlockPredicate :: MatchingBlockTag (MatchingBlockTagPredicate { offset : OffsetBlocksBlockPredicate { offset : None } , tag : pumpkin_data :: tag :: Block :: MINECRAFT_CANNOT_REPLACE_BELOW_TREE_TRUNK , })) , }) , then : BlockStateProvider :: Simple (SimpleStateProvider { state : pumpkin_data :: Block :: DIRT . default_state }) }] , }) , decorators : vec ! [TreeDecorator :: Beehive (BeehiveTreeDecorator { probability : 0.05f32 })] , root_placer : None , }))) ; + map . insert (pumpkin_data :: configured_feature :: ConfiguredFeature :: Cherry , ConfiguredFeature :: Tree (Box :: new (TreeFeature { trunk_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("axis" . to_string () , "y" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: CHERRY_LOG , properties : Some (props) , } . get_state () } }) , trunk_placer : TrunkPlacer { base_height : 7u8 , height_rand_a : 1u8 , height_rand_b : 0u8 , r#type : TrunkType :: Cherry (CherryTrunkPlacer { count : IntProvider :: Object (NormalIntProvider :: WeightedList (WeightedListIntProvider { distribution : vec ! [WeightedEntry { data : IntProvider :: Constant (1i32) , weight : 1i32 } , WeightedEntry { data : IntProvider :: Constant (2i32) , weight : 1i32 } , WeightedEntry { data : IntProvider :: Constant (3i32) , weight : 1i32 }] })) , horizontal_length : IntProvider :: Object (NormalIntProvider :: Uniform (UniformIntProvider { min_inclusive : 2i32 , max_inclusive : 4i32 })) , start_offset_from_top : UniformIntProvider { min_inclusive : - 4i32 , max_inclusive : - 3i32 } , end_offset_from_top : IntProvider :: Object (NormalIntProvider :: Uniform (UniformIntProvider { min_inclusive : - 1i32 , max_inclusive : 0i32 })) , }) , } , foliage_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("waterlogged" . to_string () , "false" . to_string ()) ; props . insert ("persistent" . to_string () , "false" . to_string ()) ; props . insert ("distance" . to_string () , "7" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: CHERRY_LEAVES , properties : Some (props) , } . get_state () } }) , foliage_placer : FoliagePlacer { radius : IntProvider :: Constant (4i32) , offset : IntProvider :: Constant (0i32) , r#type : FoliageType :: Cherry (CherryFoliagePlacer { height : IntProvider :: Constant (5i32) , wide_bottom_layer_hole_chance : 0.25f32 , corner_hole_chance : 0.25f32 , hanging_leaves_chance : 0.16666667f32 , hanging_leaves_extension_chance : 0.33333334f32 , }) } , minimum_size : FeatureSize { min_clipped_height : None , r#type : FeatureSizeType :: TwoLayersFeatureSize (TwoLayersFeatureSize { limit : 1u8 , lower_size : 0u8 , upper_size : 2u8 , }) } , ignore_vines : true , below_trunk_provider : BlockStateProvider :: Rule (RuleBasedBlockStateProvider { fallback : None , rules : vec ! [BlockStateRule { if_true : BlockPredicate :: Not (NotBlockPredicate { predicate : Box :: new (BlockPredicate :: MatchingBlockTag (MatchingBlockTagPredicate { offset : OffsetBlocksBlockPredicate { offset : None } , tag : pumpkin_data :: tag :: Block :: MINECRAFT_CANNOT_REPLACE_BELOW_TREE_TRUNK , })) , }) , then : BlockStateProvider :: Simple (SimpleStateProvider { state : pumpkin_data :: Block :: DIRT . default_state }) }] , }) , decorators : vec ! [] , root_placer : None , }))) ; + map . insert (pumpkin_data :: configured_feature :: ConfiguredFeature :: CherryBees005 , ConfiguredFeature :: Tree (Box :: new (TreeFeature { trunk_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("axis" . to_string () , "y" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: CHERRY_LOG , properties : Some (props) , } . get_state () } }) , trunk_placer : TrunkPlacer { base_height : 7u8 , height_rand_a : 1u8 , height_rand_b : 0u8 , r#type : TrunkType :: Cherry (CherryTrunkPlacer { count : IntProvider :: Object (NormalIntProvider :: WeightedList (WeightedListIntProvider { distribution : vec ! [WeightedEntry { data : IntProvider :: Constant (1i32) , weight : 1i32 } , WeightedEntry { data : IntProvider :: Constant (2i32) , weight : 1i32 } , WeightedEntry { data : IntProvider :: Constant (3i32) , weight : 1i32 }] })) , horizontal_length : IntProvider :: Object (NormalIntProvider :: Uniform (UniformIntProvider { min_inclusive : 2i32 , max_inclusive : 4i32 })) , start_offset_from_top : UniformIntProvider { min_inclusive : - 4i32 , max_inclusive : - 3i32 } , end_offset_from_top : IntProvider :: Object (NormalIntProvider :: Uniform (UniformIntProvider { min_inclusive : - 1i32 , max_inclusive : 0i32 })) , }) , } , foliage_provider : BlockStateProvider :: Simple (SimpleStateProvider { state : { let mut props = std :: collections :: HashMap :: new () ; props . insert ("waterlogged" . to_string () , "false" . to_string ()) ; props . insert ("persistent" . to_string () , "false" . to_string ()) ; props . insert ("distance" . to_string () , "7" . to_string ()) ; BlockStateCodec { name : & pumpkin_data :: Block :: CHERRY_LEAVES , properties : Some (props) , } . get_state () } }) , foliage_placer : FoliagePlacer { radius : IntProvider :: Constant (4i32) , offset : IntProvider :: Constant (0i32) , r#type : FoliageType :: Cherry (CherryFoliagePlacer { height : IntProvider :: Constant (5i32) , wide_bottom_layer_hole_chance : 0.25f32 , corner_hole_chance : 0.25f32 , hanging_leaves_chance : 0.16666667f32 , hanging_leaves_extension_chance : 0.33333334f32 , }) } , minimum_size : FeatureSize { min_clipped_height : None , r#type : FeatureSizeType :: TwoLayersFeatureSize (TwoLayersFeatureSize { limit : 1u8 , lower_size : 0u8 , upper_size : 2u8 , }) } , ignore_vines : true , below_trunk_provider : BlockStateProvider :: Rule (RuleBasedBlockStateProvider { fallback : None , rules : vec ! [BlockStateRule { if_true : BlockPredicate :: Not (NotBlockPredicate { predicate : Box :: new (BlockPredicate :: MatchingBlockTag (MatchingBlockTagPredicate { offset : OffsetBlocksBlockPredicate { offset : None } , tag : pumpkin_data :: tag :: Block :: MINECRAFT_CANNOT_REPLACE_BELOW_TREE_TRUNK , })) , }) , then : BlockStateProvider :: Simple (SimpleStateProvider { state : pumpkin_data :: Block :: DIRT . default_state }) }] , }) , decorators : vec ! [TreeDecorator :: Beehive (BeehiveTreeDecorator { probability : 0.05f32 })] , root_placer : None , }))) ; map.insert( pumpkin_data::configured_feature::ConfiguredFeature::ChorusPlant, ConfiguredFeature::ChorusPlant( @@ -3629,10 +3635,10 @@ fn build_configured_features() PlacedFeature { feature: Feature::Inlined(Box::new(ConfiguredFeature::PointedDripstone( SmallDripstoneFeature { - chance_of_taller_dripstone: 0.2f32, - chance_of_directional_spread: 0.7f32, - chance_of_spread_radius2: 0.5f32, - chance_of_spread_radius3: 0.5f32, + taller_dripstone: 0.2f32, + directional_spread: 0.7f32, + spread_radius2: 0.5f32, + spread_radius3: 0.5f32, }, ))), placement: vec![ @@ -3672,10 +3678,10 @@ fn build_configured_features() PlacedFeature { feature: Feature::Inlined(Box::new(ConfiguredFeature::PointedDripstone( SmallDripstoneFeature { - chance_of_taller_dripstone: 0.2f32, - chance_of_directional_spread: 0.7f32, - chance_of_spread_radius2: 0.5f32, - chance_of_spread_radius3: 0.5f32, + taller_dripstone: 0.2f32, + directional_spread: 0.7f32, + spread_radius2: 0.5f32, + spread_radius3: 0.5f32, }, ))), placement: vec![ @@ -4102,10 +4108,10 @@ fn build_configured_features() PlacedFeature { feature: Feature::Inlined(Box::new(ConfiguredFeature::PointedDripstone( SmallDripstoneFeature { - chance_of_taller_dripstone: 0.2f32, - chance_of_directional_spread: 0.7f32, - chance_of_spread_radius2: 0.5f32, - chance_of_spread_radius3: 0.5f32, + taller_dripstone: 0.2f32, + directional_spread: 0.7f32, + spread_radius2: 0.5f32, + spread_radius3: 0.5f32, }, ))), placement: vec![ @@ -4145,10 +4151,10 @@ fn build_configured_features() PlacedFeature { feature: Feature::Inlined(Box::new(ConfiguredFeature::PointedDripstone( SmallDripstoneFeature { - chance_of_taller_dripstone: 0.2f32, - chance_of_directional_spread: 0.7f32, - chance_of_spread_radius2: 0.5f32, - chance_of_spread_radius3: 0.5f32, + taller_dripstone: 0.2f32, + directional_spread: 0.7f32, + spread_radius2: 0.5f32, + spread_radius3: 0.5f32, }, ))), placement: vec![ diff --git a/pumpkin-data/src/generated/item.rs b/pumpkin-data/src/generated/item.rs index aede7476f..9bce024d3 100644 --- a/pumpkin-data/src/generated/item.rs +++ b/pumpkin-data/src/generated/item.rs @@ -37898,7 +37898,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const APPLE : Self = Self { id : 285 , registry_key : "minecraft:apple" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Eminecraft:food\x03\tnutrition\x08\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x99>\n\x11using_converts_to\0\0\t\titem_tags\x08\x02\x11minecraft:is_food\n\x16minecraft:display_name\x08\x05value\x0Fitem.apple.name\0\n\x17minecraft:use_modifiers\x05\x11movement_modifier33\xB3>\x01\x0Femit_vibrations\x01\x05\x0Cuse_duration\xCD\xCC\xCC?\x08\x0Bstart_using\x06always\0\n\x0Fitem_properties\x03\x11creative_category\x04\x08\x10enchantable_slot\x04none\x01\x04foil\0\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x05apple\0\0\x03\x06damage\0\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x01\x0Eshould_despawn\x01\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\x05\x0Cmining_speed\0\0\x80?\x03\x0Cuse_duration@\x03\ruse_animation\x02\x03\x0Emax_stack_size\x80\x01\x03\x11enchantable_value\0\x03\x0Bframe_count\x02\0\n\x17minecraft:use_animation\x08\x05value\x03eat\0\n\x0Eminecraft:tags\t\x04tags\x08\x02\x11minecraft:is_food\0\0" } ; + pub const APPLE : Self = Self { id : 285 , registry_key : "minecraft:apple" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x99>\x03\tnutrition\x08\n\x11using_converts_to\0\0\n\x16minecraft:display_name\x08\x05value\x0Fitem.apple.name\0\n\x17minecraft:use_animation\x08\x05value\x03eat\0\n\x17minecraft:use_modifiers\x01\x0Femit_vibrations\x01\x08\x0Bstart_using\x06always\x05\x11movement_modifier33\xB3>\x05\x0Cuse_duration\xCD\xCC\xCC?\0\t\titem_tags\x08\x02\x11minecraft:is_food\n\x0Fitem_properties\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x05apple\0\0\x03\x0Emax_stack_size\x80\x01\x03\x06damage\0\x01\rhand_equipped\0\x01\x0Eliquid_clipped\0\x03\ruse_animation\x02\x08\x0Ecreative_group\0\x01\x0Eshould_despawn\x01\x03\x11creative_category\x04\x05\x0Cmining_speed\0\0\x80?\x03\x0Cuse_duration@\x03\x0Bframe_count\x02\x01\x0Eallow_off_hand\0\x01\x17can_destroy_in_creative\x01\x03\x11enchantable_value\0\x01\x0Fstacked_by_data\0\x08\x10enchantable_slot\x04none\x01\x12hidden_in_commands\x02\0\n\x0Eminecraft:tags\t\x04tags\x08\x02\x11minecraft:is_food\0\0" } ; pub const ARCHER_POTTERY_SHERD: Self = Self { id: 700, registry_key: "minecraft:archer_pottery_sherd", @@ -37983,7 +37983,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const BAKED_POTATO : Self = Self { id : 310 , registry_key : "minecraft:baked_potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x19?\x08\x11using_converts_to\0\x03\ron_use_action\x01\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\n\0\0" } ; + pub const BAKED_POTATO : Self = Self { id : 310 , registry_key : "minecraft:baked_potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x19?\x08\rcooldown_type\0\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x03\tnutrition\n\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_duration@\0" } ; pub const BALLOON: Self = Self { id: 641, registry_key: "minecraft:balloon", @@ -38236,7 +38236,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const BEEF : Self = Self { id : 302 , registry_key : "minecraft:beef" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\ron_use_action\x01\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99>\x08\x11using_converts_to\0\x03\tnutrition\x06\0\0" } ; + pub const BEEF : Self = Self { id : 302 , registry_key : "minecraft:beef" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\ron_use_action\x01\x08\x11using_converts_to\0\x03\tnutrition\x06\x08\rcooldown_type\0\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\0\0\0" } ; pub const BEEHIVE: Self = Self { id: -219, registry_key: "minecraft:beehive", @@ -38244,9 +38244,9 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const BEETROOT : Self = Self { id : 314 , registry_key : "minecraft:beetroot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\tnutrition\x02\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x03\rcooldown_time\0\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x19?\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_duration@\0" } ; - pub const BEETROOT_SEEDS : Self = Self { id : 324 , registry_key : "minecraft:beetroot_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\x0Bcrop_result\x12minecraft:beetroot\x08\rplant_at_face\x02up\0\0" } ; - pub const BEETROOT_SOUP : Self = Self { id : 315 , registry_key : "minecraft:beetroot_soup" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x18minecraft:max_stack_size\x02\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x03\tnutrition\x0C\x03\ron_use_action\x01\x08\x11using_converts_to\x04bowl\x05\x13saturation_modifier\x9A\x99\x19?\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\0" } ; + pub const BEETROOT : Self = Self { id : 314 , registry_key : "minecraft:beetroot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\tnutrition\x02\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x19?\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\ron_use_action\x01\0\0" } ; + pub const BEETROOT_SEEDS : Self = Self { id : 324 , registry_key : "minecraft:beetroot_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\rplant_at_face\x02up\x08\x0Bcrop_result\x12minecraft:beetroot\x01\x1Aplant_at_any_solid_surface\0\0\0" } ; + pub const BEETROOT_SOUP : Self = Self { id : 315 , registry_key : "minecraft:beetroot_soup" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x18minecraft:max_stack_size\x02\n\x0Eminecraft:food\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\x04bowl\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x19?\x08\rcooldown_type\0\x03\tnutrition\x0C\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_duration@\0" } ; pub const BELL: Self = Self { id: -206, registry_key: "minecraft:bell", @@ -38408,7 +38408,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const BLACK_BUNDLE : Self = Self { id : 264 , registry_key : "minecraft:black_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x01\x04foil\0\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x04none\x01\x17can_destroy_in_creative\x01\x01\rhand_equipped\0\x01\x12hidden_in_commands\x02\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x17bundle_black_open_front\x08\x07default\x0Cbundle_black\x08\x10bundle_open_back\x16bundle_black_open_back\0\0\x03\x0Cuse_duration\0\x05\x0Cmining_speed\0\0\x80?\x03\x11enchantable_value\0\x01\x0Eshould_despawn\x01\x03\x11creative_category\x06\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x02\x03\x06damage\0\x03\ruse_animation\0\x08\x0Ecreative_group\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0" } ; + pub const BLACK_BUNDLE : Self = Self { id : 264 , registry_key : "minecraft:black_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x01\x04foil\0\x03\x0Bframe_count\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Cbundle_black\x08\x11bundle_open_front\x17bundle_black_open_front\x08\x10bundle_open_back\x16bundle_black_open_back\0\0\x03\x0Cuse_duration\0\x03\x11enchantable_value\0\x03\x06damage\0\x03\x0Emax_stack_size\x02\x08\x10enchantable_slot\x04none\x01\x0Eallow_off_hand\0\x01\x0Eliquid_clipped\0\x01\x12hidden_in_commands\x02\x03\x11creative_category\x06\x08\x0Ecreative_group\0\x01\rhand_equipped\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\t\titem_tags\0\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0" } ; pub const BLACK_CANDLE: Self = Self { id: -428, registry_key: "minecraft:black_candle", @@ -38577,7 +38577,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const BLUE_BUNDLE : Self = Self { id : 265 , registry_key : "minecraft:blue_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x08\x0Ecreative_group\0\x03\x11creative_category\x06\x08\x10enchantable_slot\x04none\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bbundle_blue\x08\x11bundle_open_front\x16bundle_blue_open_front\x08\x10bundle_open_back\x15bundle_blue_open_back\0\0\x01\rhand_equipped\0\x03\x11enchantable_value\0\x01\x0Eliquid_clipped\0\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x01\x0Eallow_off_hand\0\x03\x0Emax_stack_size\x02\x03\x0Cuse_duration\0\x05\x0Cmining_speed\0\0\x80?\x03\x0Bframe_count\x02\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\x01\x0Eshould_despawn\x01\x03\x06damage\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0" } ; + pub const BLUE_BUNDLE : Self = Self { id : 265 , registry_key : "minecraft:blue_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x03\x11creative_category\x06\x03\x0Cuse_duration\0\x08\x10enchantable_slot\x04none\x01\x04foil\0\x01\rhand_equipped\0\x01\x12hidden_in_commands\x02\x01\x0Eliquid_clipped\0\x03\x11enchantable_value\0\x03\x0Emax_stack_size\x02\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x08\x0Ecreative_group\0\x03\x06damage\0\x03\x0Bframe_count\x02\x05\x0Cmining_speed\0\0\x80?\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x15bundle_blue_open_back\x08\x11bundle_open_front\x16bundle_blue_open_front\x08\x07default\x0Bbundle_blue\0\0\x01\x17can_destroy_in_creative\x01\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\t\titem_tags\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\0" } ; pub const BLUE_CANDLE: Self = Self { id: -424, registry_key: "minecraft:blue_candle", @@ -38809,8 +38809,8 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const BREAD : Self = Self { id : 290 , registry_key : "minecraft:bread" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\tnutrition\n\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x19?\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0" } ; - pub const BREEZE_ROD : Self = Self { id : 281 , registry_key : "minecraft:breeze_rod" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Fitem_properties\x03\x0Cuse_duration\0\x01\x0Eshould_despawn\x01\x01\rhand_equipped\x01\x03\x11creative_category\x08\x01\x17can_destroy_in_creative\x01\x01\x0Eliquid_clipped\0\x03\ruse_animation\0\x01\x0Eallow_off_hand\0\x03\x0Bframe_count\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\nbreeze_rod\0\0\x05\x0Cmining_speed\0\0\x80?\x08\x0Ecreative_group\0\x03\x11enchantable_value\0\x01\x04foil\0\x01\x12hidden_in_commands\x02\x03\x0Emax_stack_size\x80\x01\x03\x06damage\0\x01\x0Fstacked_by_data\0\x08\x10enchantable_slot\x04none\0\n\x16minecraft:display_name\x08\x05value\x14item.breeze_rod.name\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\t\titem_tags\0\0\0" } ; + pub const BREAD : Self = Self { id : 290 , registry_key : "minecraft:bread" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\rcooldown_time\0\x03\ron_use_action\x01\x03\tnutrition\n\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x19?\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\0\x03\x16minecraft:use_duration@\0" } ; + pub const BREEZE_ROD : Self = Self { id : 281 , registry_key : "minecraft:breeze_rod" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x16minecraft:display_name\x08\x05value\x14item.breeze_rod.name\0\n\x0Fitem_properties\x03\ruse_animation\0\x01\x04foil\0\x08\x10enchantable_slot\x04none\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\nbreeze_rod\0\0\x08\x0Ecreative_group\0\x03\x11enchantable_value\0\x03\x0Bframe_count\x02\x03\x06damage\0\x01\rhand_equipped\x01\x01\x12hidden_in_commands\x02\x03\x0Emax_stack_size\x80\x01\x03\x11creative_category\x08\x01\x0Eallow_off_hand\0\x01\x17can_destroy_in_creative\x01\x01\x0Eliquid_clipped\0\0\t\titem_tags\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\0" } ; pub const BREEZE_SPAWN_EGG: Self = Self { id: 535, registry_key: "minecraft:breeze_spawn_egg", @@ -38874,7 +38874,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const BROWN_BUNDLE : Self = Self { id : 266 , registry_key : "minecraft:brown_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x01\x0Eshould_despawn\x01\x03\x0Bframe_count\x02\x01\x17can_destroy_in_creative\x01\x01\x0Eliquid_clipped\0\x03\x11creative_category\x06\x01\rhand_equipped\0\x03\ruse_animation\0\x01\x12hidden_in_commands\x02\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x08\x10enchantable_slot\x04none\x03\x0Cuse_duration\0\x03\x11enchantable_value\0\x01\x04foil\0\x03\x0Emax_stack_size\x02\x03\x06damage\0\x08\x0Ecreative_group\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x16bundle_brown_open_back\x08\x11bundle_open_front\x17bundle_brown_open_front\x08\x07default\x0Cbundle_brown\0\0\x01\x0Eallow_off_hand\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0" } ; + pub const BROWN_BUNDLE : Self = Self { id : 266 , registry_key : "minecraft:brown_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x01\x0Eallow_off_hand\0\x01\x0Eshould_despawn\x01\x05\x0Cmining_speed\0\0\x80?\x03\x11creative_category\x06\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x03\x11enchantable_value\0\x01\rhand_equipped\0\x03\x0Cuse_duration\0\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x03\x0Bframe_count\x02\x03\x06damage\0\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Cbundle_brown\x08\x10bundle_open_back\x16bundle_brown_open_back\x08\x11bundle_open_front\x17bundle_brown_open_front\0\0\x01\x12hidden_in_commands\x02\x03\x0Emax_stack_size\x02\x01\x17can_destroy_in_creative\x01\0\t\titem_tags\0\0\0" } ; pub const BROWN_CANDLE: Self = Self { id: -425, registry_key: "minecraft:brown_candle", @@ -39043,7 +39043,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const BUNDLE : Self = Self { id : 267 , registry_key : "minecraft:bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x0Fitem_properties\x01\rhand_equipped\0\x08\x0Ecreative_group\0\x03\x0Emax_stack_size\x02\x01\x04foil\0\x03\x11enchantable_value\0\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x06bundle\x08\x10bundle_open_back\x10bundle_open_back\x08\x11bundle_open_front\x11bundle_open_front\0\0\x01\x17can_destroy_in_creative\x01\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x04none\x05\x0Cmining_speed\0\0\x80?\x03\x11creative_category\x06\x01\x0Fstacked_by_data\0\x03\x0Bframe_count\x02\x01\x0Eliquid_clipped\0\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\x03\x06damage\0\x03\x0Cuse_duration\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\t\titem_tags\0\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0" } ; + pub const BUNDLE : Self = Self { id : 267 , registry_key : "minecraft:bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\x01\x12hidden_in_commands\x02\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x11bundle_open_front\x08\x10bundle_open_back\x10bundle_open_back\x08\x07default\x06bundle\0\0\x05\x0Cmining_speed\0\0\x80?\x03\x11enchantable_value\0\x01\x0Eallow_off_hand\0\x03\ruse_animation\0\x03\x06damage\0\x08\x10enchantable_slot\x04none\x01\x04foil\0\x03\x0Cuse_duration\0\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x01\x17can_destroy_in_creative\x01\x01\rhand_equipped\0\x03\x11creative_category\x06\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0" } ; pub const BURN_POTTERY_SHERD: Self = Self { id: 704, registry_key: "minecraft:burn_pottery_sherd", @@ -39107,7 +39107,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const CAMERA : Self = Self { id : 636 , registry_key : "minecraft:camera" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x10minecraft:camera\x05\x10shutter_duration\xCD\xCCL>\x05\x13black_bars_duration\xCD\xCCL>\x05\x10picture_duration\0\0\x80?\x05\x17black_bars_screen_ratio\n\xD7\xA3=\x05\x14shutter_screen_ratio\0\0\0?\x05\x13slide_away_duration\xCD\xCCL>\0\x03\x16minecraft:use_duration\xC0\x9A\x0C\x08\x0Fminecraft:block\x10minecraft:camera\0" } ; + pub const CAMERA : Self = Self { id : 636 , registry_key : "minecraft:camera" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x08\x0Fminecraft:block\x10minecraft:camera\x03\x16minecraft:use_duration\xC0\x9A\x0C\n\x10minecraft:camera\x05\x10shutter_duration\xCD\xCCL>\x05\x14shutter_screen_ratio\0\0\0?\x05\x13slide_away_duration\xCD\xCCL>\x05\x17black_bars_screen_ratio\n\xD7\xA3=\x05\x10picture_duration\0\0\x80?\x05\x13black_bars_duration\xCD\xCCL>\0\0" } ; pub const CAMPFIRE: Self = Self { id: 630, registry_key: "minecraft:campfire", @@ -39136,7 +39136,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const CARROT : Self = Self { id : 308 , registry_key : "minecraft:carrot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\x12minecraft:farmland\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x11minecraft:carrots\x08\rplant_at_face\x02up\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x03\rcooldown_time\0\x03\tnutrition\x06\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x19?\0\0" } ; + pub const CARROT : Self = Self { id : 308 , registry_key : "minecraft:carrot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\x08\rcooldown_type\0\x03\rcooldown_time\0\x03\tnutrition\x06\x08\x11using_converts_to\0\x05\x13saturation_modifier\x9A\x99\x19?\x01\x0Ecan_always_eat\0\0\n\x0Eminecraft:seed\x08\x0Bcrop_result\x11minecraft:carrots\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\x12minecraft:farmland\x01\x1Aplant_at_any_solid_surface\0\0\0" } ; pub const CARROT_ON_A_STICK: Self = Self { id: 556, registry_key: "minecraft:carrot_on_a_stick", @@ -39438,7 +39438,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const CHICKEN : Self = Self { id : 304 , registry_key : "minecraft:chicken" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\tnutrition\x04\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99>\t\x07effects\n\x02\x03\tamplifier\0\x08\x04name\x06hunger\x05\x06chance\x9A\x99\x99>\x03\x02id\"\x08\rdescriptionId\rpotion.hunger\x03\x08duration<\0\x03\ron_use_action\x01\x08\x11using_converts_to\0\0\x03\x16minecraft:use_duration@\0" } ; + pub const CHICKEN : Self = Self { id : 304 , registry_key : "minecraft:chicken" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x07effects\n\x02\x03\tamplifier\0\x08\rdescriptionId\rpotion.hunger\x03\x08duration<\x03\x02id\"\x08\x04name\x06hunger\x05\x06chance\x9A\x99\x99>\0\x03\tnutrition\x04\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\x03\rcooldown_time\0\x08\rcooldown_type\0\x08\x11using_converts_to\0\0\0" } ; pub const CHICKEN_SPAWN_EGG: Self = Self { id: 468, registry_key: "minecraft:chicken_spawn_egg", @@ -39558,7 +39558,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const CHORUS_FRUIT : Self = Self { id : 597 , registry_key : "minecraft:chorus_fruit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\rcooldown_time(\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\x0Bchorusfruit\x03\ron_use_action\0\x05\x13saturation_modifier\x9A\x99\x99>\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\x01\x03\tnutrition\x08\0\0" } ; + pub const CHORUS_FRUIT : Self = Self { id : 597 , registry_key : "minecraft:chorus_fruit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\x01\x08\rcooldown_type\x0Bchorusfruit\x03\rcooldown_time(\x03\ron_use_action\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\tnutrition\x08\0\x03\x16minecraft:use_duration@\0" } ; pub const CHORUS_PLANT: Self = Self { id: 240, registry_key: "minecraft:chorus_plant", @@ -39783,7 +39783,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const COD : Self = Self { id : 293 , registry_key : "minecraft:cod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\ron_use_action\x01\x03\tnutrition\x04\x03\rcooldown_time\0\x05\x13saturation_modifier\xCD\xCC\xCC=\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\x08\rcooldown_type\0\0\0" } ; + pub const COD : Self = Self { id : 293 , registry_key : "minecraft:cod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x08\rcooldown_type\0\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\tnutrition\x04\x03\rcooldown_time\0\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0" } ; pub const COD_BUCKET: Self = Self { id: 396, registry_key: "minecraft:cod_bucket", @@ -39910,14 +39910,14 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const COOKED_BEEF : Self = Self { id : 303 , registry_key : "minecraft:cooked_beef" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\x11using_converts_to\0\x03\rcooldown_time\0\x03\ron_use_action\x01\x05\x13saturation_modifier\xCD\xCCL?\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x10\0\x03\x16minecraft:use_duration@\0" } ; - pub const COOKED_CHICKEN : Self = Self { id : 305 , registry_key : "minecraft:cooked_chicken" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\x11using_converts_to\0\x08\rcooldown_type\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x03\tnutrition\x0C\x05\x13saturation_modifier\x9A\x99\x19?\0\x03\x16minecraft:use_duration@\0" } ; - pub const COOKED_COD : Self = Self { id : 297 , registry_key : "minecraft:cooked_cod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x03\tnutrition\n\x05\x13saturation_modifier\x9A\x99\x19?\x08\rcooldown_type\0\0\x03\x16minecraft:use_duration@\x01\x19minecraft:stacked_by_data\x01\0" } ; - pub const COOKED_MUTTON : Self = Self { id : 590 , registry_key : "minecraft:cooked_mutton" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\rcooldown_time\0\x08\x11using_converts_to\0\x03\tnutrition\x0C\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x05\x13saturation_modifier\xCD\xCCL?\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\0" } ; - pub const COOKED_PORKCHOP : Self = Self { id : 292 , registry_key : "minecraft:cooked_porkchop" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\ron_use_action\x01\x05\x13saturation_modifier\xCD\xCCL?\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x10\x08\x11using_converts_to\0\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\0\0" } ; - pub const COOKED_RABBIT : Self = Self { id : 318 , registry_key : "minecraft:cooked_rabbit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\x03\rcooldown_time\0\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x19?\x03\ron_use_action\x01\x03\tnutrition\n\0\x03\x16minecraft:use_duration@\0" } ; - pub const COOKED_SALMON : Self = Self { id : 298 , registry_key : "minecraft:cooked_salmon" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\tnutrition\x0C\x05\x13saturation_modifier\xCD\xCCL?\x08\rcooldown_type\0\x08\x11using_converts_to\0\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x01\x19minecraft:stacked_by_data\x01\0" } ; - pub const COOKIE : Self = Self { id : 300 , registry_key : "minecraft:cookie" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x03\tnutrition\x04\x08\x11using_converts_to\0\x08\rcooldown_type\0\0\0" } ; + pub const COOKED_BEEF : Self = Self { id : 303 , registry_key : "minecraft:cooked_beef" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\tnutrition\x10\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\x03\ron_use_action\x01\x05\x13saturation_modifier\xCD\xCCL?\x03\rcooldown_time\0\0\x03\x16minecraft:use_duration@\0" } ; + pub const COOKED_CHICKEN : Self = Self { id : 305 , registry_key : "minecraft:cooked_chicken" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\rcooldown_time\0\x08\rcooldown_type\0\x03\tnutrition\x0C\x08\x11using_converts_to\0\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x19?\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_duration@\0" } ; + pub const COOKED_COD : Self = Self { id : 297 , registry_key : "minecraft:cooked_cod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x08\x11using_converts_to\0\x05\x13saturation_modifier\x9A\x99\x19?\x03\tnutrition\n\x03\ron_use_action\x01\x03\rcooldown_time\0\0\x03\x16minecraft:use_duration@\x01\x19minecraft:stacked_by_data\x01\0" } ; + pub const COOKED_MUTTON : Self = Self { id : 590 , registry_key : "minecraft:cooked_mutton" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\ron_use_action\x01\x03\rcooldown_time\0\x03\tnutrition\x0C\x05\x13saturation_modifier\xCD\xCCL?\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\0\x03\x16minecraft:use_duration@\0" } ; + pub const COOKED_PORKCHOP : Self = Self { id : 292 , registry_key : "minecraft:cooked_porkchop" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x05\x13saturation_modifier\xCD\xCCL?\x03\rcooldown_time\0\x03\tnutrition\x10\x08\x11using_converts_to\0\0\0" } ; + pub const COOKED_RABBIT : Self = Self { id : 318 , registry_key : "minecraft:cooked_rabbit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\rcooldown_time\0\x03\tnutrition\n\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x19?\x08\x11using_converts_to\0\0\x03\x16minecraft:use_duration@\0" } ; + pub const COOKED_SALMON : Self = Self { id : 298 , registry_key : "minecraft:cooked_salmon" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x03\tnutrition\x0C\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x05\x13saturation_modifier\xCD\xCCL?\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\0\0" } ; + pub const COOKIE : Self = Self { id : 300 , registry_key : "minecraft:cookie" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\rcooldown_time\0\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\tnutrition\x04\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\0\x03\x16minecraft:use_duration@\0" } ; pub const COPPER_AXE: Self = Self { id: 776, registry_key: "minecraft:copper_axe", @@ -40079,7 +40079,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const COPPER_SPEAR : Self = Self { id : 257 , registry_key : "minecraft:copper_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x16minecraft:display_name\x08\x05value\x16item.copper_spear.name\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x05\x11damage_multiplier\x85\xEBQ?\n\x13dismount_conditions\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_durationP\0\x05\tmin_speed\0\0@A\0\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\x02\x0Cmax_duration\xA5\0\0\x05\rhitbox_margin\0\0\x80>\x05\x0Fdamage_modifier\0\0\0\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x02\x0Cmax_duration\xFA\0\x05\tmin_speed\0\0\0\0\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x02\x05delay\r\0\0\0\n\x14minecraft:durability\x03\x0Emax_durability\xFC\x02\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\0\n\x18minecraft:swing_duration\x05\x05value\x9A\x99Y?\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:copper_tier\x12minecraft:is_spear\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x16minecraft:copper_spear\0\n\rrepair_amount\x08\nexpression)context.other->query.remaining_durability\x02\x07version\r\0\0\0\t\x05items\n\x02\x08\x04name\x16minecraft:copper_ingot\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression\x1Bquery.max_durability * 0.25\0\0\0\t\titem_tags\x08\x04\x15minecraft:copper_tier\x12minecraft:is_spear\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x05\rhitbox_margin\0\0\x80>\0\n\x10minecraft:damage\x02\x05value\x02\0\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08duration\x9A\x99Y?\x08\x04type\x06attack\0\n\x17minecraft:use_modifiers\x01\x0Femit_vibrations\0\x08\x0Bstart_using\x06always\x05\x11movement_modifier\0\0\x80?\x05\x0Cuse_duration\0\xA0\x8CG\x08\x0Bstart_sound\x15item.copper_spear.use\0\n\x0Fitem_properties\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\x08\x0Ecreative_group\0\x08\x10enchantable_slot\x0Bmelee_spear\x03\x11creative_category\x06\x01\rhand_equipped\x01\x03\x0Emax_stack_size\x02\x01\x04foil\0\x01\x17can_destroy_in_creative\x01\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x01\x0Fstacked_by_data\0\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Ccopper_spear\0\0\x03\x11enchantable_value\x1A\x03\x06damage\x04\x05\x0Cmining_speed\0\0\x80?\x03\x0Bframe_count\x02\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Citem.copper_spear.attack_hit\x08\x0Battack_miss\x1Ditem.copper_spear.attack_miss\0\n\x15minecraft:enchantable\x01\x05value\r\x08\x04slot\x0Bmelee_spear\0\0" } ; + pub const COPPER_SPEAR : Self = Self { id : 257 , registry_key : "minecraft:copper_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\n\rrepair_amount\x02\x07version\r\0\x08\nexpression)context.other->query.remaining_durability\0\t\x05items\n\x02\x08\x04name\x16minecraft:copper_spear\0\0\t\x05items\n\x02\x08\x04name\x16minecraft:copper_ingot\0\n\rrepair_amount\x08\nexpression\x1Bquery.max_durability * 0.25\x02\x07version\r\0\0\0\0\n\x18minecraft:swing_duration\x05\x05value\x9A\x99Y?\0\t\titem_tags\x08\x04\x15minecraft:copper_tier\x12minecraft:is_spear\n\x16minecraft:swing_sounds\x08\x0Battack_miss\x1Ditem.copper_spear.attack_miss\x08\nattack_hit\x1Citem.copper_spear.attack_hit\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08duration\x9A\x99Y?\x08\x04type\x06attack\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:copper_tier\x12minecraft:is_spear\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\r\0\n\x16minecraft:display_name\x08\x05value\x16item.copper_spear.name\0\n\x0Fitem_properties\x01\x0Eshould_despawn\x01\x01\x0Eliquid_clipped\0\x03\x11creative_category\x06\x08\x0Ecreative_group\0\x08\x10enchantable_slot\x0Bmelee_spear\x03\ruse_animation\0\x01\x0Eallow_off_hand\0\x01\x12hidden_in_commands\x02\x03\x0Cuse_duration\x80\xE4\xAF\x01\x03\x11enchantable_value\x1A\x05\x0Cmining_speed\0\0\x80?\x03\x06damage\x04\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Ccopper_spear\0\0\x03\x0Emax_stack_size\x02\x01\x0Fstacked_by_data\0\x01\x17can_destroy_in_creative\x01\x01\rhand_equipped\x01\x03\x0Bframe_count\x02\x01\x04foil\0\0\n\x10minecraft:damage\x02\x05value\x02\0\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x11damage_conditions\x02\x0Cmax_duration\xFA\0\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\0\x02\x05delay\r\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x13dismount_conditions\x02\x0Cmax_durationP\0\x05\tmin_speed\0\0@A\x05\x12min_relative_speed\0\0\0\0\0\n\x14knockback_conditions\x02\x0Cmax_duration\xA5\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x05\x0Fdamage_modifier\0\0\0\0\x05\x11damage_multiplier\x85\xEBQ?\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x17minecraft:use_modifiers\x05\x0Cuse_duration\0\xA0\x8CG\x08\x0Bstart_sound\x15item.copper_spear.use\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\x01\x0Femit_vibrations\0\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durability\xFC\x02\0\0" } ; pub const COPPER_SWORD: Self = Self { id: 773, registry_key: "minecraft:copper_sword", @@ -40444,7 +40444,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const CYAN_BUNDLE : Self = Self { id : 268 , registry_key : "minecraft:cyan_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\0\t\titem_tags\0\0\n\x0Fitem_properties\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x16bundle_cyan_open_front\x08\x07default\x0Bbundle_cyan\x08\x10bundle_open_back\x15bundle_cyan_open_back\0\0\x01\x0Fstacked_by_data\0\x03\x0Bframe_count\x02\x01\rhand_equipped\0\x08\x0Ecreative_group\0\x08\x10enchantable_slot\x04none\x01\x04foil\0\x03\x06damage\0\x03\x0Cuse_duration\0\x01\x12hidden_in_commands\x02\x03\x11enchantable_value\0\x01\x17can_destroy_in_creative\x01\x03\x11creative_category\x06\x01\x0Eliquid_clipped\0\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\x01\x0Eallow_off_hand\0\x03\x0Emax_stack_size\x02\x05\x0Cmining_speed\0\0\x80?\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0" } ; + pub const CYAN_BUNDLE : Self = Self { id : 268 , registry_key : "minecraft:cyan_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\t\titem_tags\0\0\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x03\x11enchantable_value\0\x01\x17can_destroy_in_creative\x01\x03\x0Emax_stack_size\x02\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x16bundle_cyan_open_front\x08\x10bundle_open_back\x15bundle_cyan_open_back\x08\x07default\x0Bbundle_cyan\0\0\x03\ruse_animation\0\x01\x04foil\0\x03\x0Cuse_duration\0\x03\x06damage\0\x01\x0Eallow_off_hand\0\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x01\rhand_equipped\0\x05\x0Cmining_speed\0\0\x80?\x03\x0Bframe_count\x02\x01\x0Eliquid_clipped\0\x01\x0Fstacked_by_data\0\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\0" } ; pub const CYAN_CANDLE: Self = Self { id: -422, registry_key: "minecraft:cyan_candle", @@ -41159,7 +41159,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const DIAMOND_SPEAR : Self = Self { id : 258 , registry_key : "minecraft:diamond_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x15minecraft:enchantable\x01\x05value\n\x08\x04slot\x0Bmelee_spear\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\n\x11damage_conditions\x02\x0Cmax_duration\xC8\0\x05\tmin_speed\0\0\0\0\x05\x12min_relative_speed33\x93@\0\n\x14knockback_conditions\x02\x0Cmax_duration\x82\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\0\x05\x0Fdamage_modifier\0\0\0\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\x11damage_multiplier\x9A\x99\x89?\x02\x05delay\n\0\n\x13dismount_conditions\x02\x0Cmax_duration<\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0 A\0\0\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\n\x18minecraft:swing_duration\x05\x05valueff\x86?\0\n\x10minecraft:damage\x02\x05value\x04\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x17minecraft:diamond_spear\0\n\rrepair_amount\x08\nexpression)context.other->query.remaining_durability\x02\x07version\r\0\0\0\t\x05items\n\x02\x08\x04name\x11minecraft:diamond\0\n\rrepair_amount\x08\nexpression\x1Bquery.max_durability * 0.25\x02\x07version\r\0\0\0\0\n\x14minecraft:durability\x03\x0Emax_durability\xB0\x18\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\0\n\x0Eminecraft:tags\t\x04tags\x08\x06\x16minecraft:diamond_tier\x1Dminecraft:transformable_items\x12minecraft:is_spear\0\n\x12minecraft:cooldown\x05\x08durationff\x86?\x08\x08category\x05spear\x08\x04type\x06attack\0\n\x0Fitem_properties\x03\ruse_animation\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x0Eallow_off_hand\0\x03\x0Emax_stack_size\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\rdiamond_spear\0\0\x03\x11creative_category\x06\x03\x06damage\x08\x08\x10enchantable_slot\x0Bmelee_spear\x01\x0Fstacked_by_data\0\x03\x11enchantable_value\x14\x01\rhand_equipped\x01\x03\x0Bframe_count\x02\x01\x04foil\0\x08\x0Ecreative_group\0\x05\x0Cmining_speed\0\0\x80?\x01\x12hidden_in_commands\x02\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\x01\x0Eshould_despawn\x01\0\t\titem_tags\x08\x06\x16minecraft:diamond_tier\x1Dminecraft:transformable_items\x12minecraft:is_spear\n\x17minecraft:use_modifiers\x05\x0Cuse_duration\0\xA0\x8CG\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_sound\x16item.diamond_spear.use\x08\x0Bstart_using\x06always\x01\x0Femit_vibrations\0\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Ditem.diamond_spear.attack_hit\x08\x0Battack_miss\x1Eitem.diamond_spear.attack_miss\0\n\x16minecraft:display_name\x08\x05value\x17item.diamond_spear.name\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0" } ; + pub const DIAMOND_SPEAR : Self = Self { id : 258 , registry_key : "minecraft:diamond_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x10minecraft:damage\x02\x05value\x04\0\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08durationff\x86?\x08\x04type\x06attack\0\n\x17minecraft:use_modifiers\x08\x0Bstart_using\x06always\x01\x0Femit_vibrations\0\x08\x0Bstart_sound\x16item.diamond_spear.use\x05\x11movement_modifier\0\0\x80?\x05\x0Cuse_duration\0\xA0\x8CG\0\n\x0Fitem_properties\x03\x06damage\x08\x01\x0Fstacked_by_data\0\x01\rhand_equipped\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\rdiamond_spear\0\0\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x0Bmelee_spear\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x03\x0Emax_stack_size\x02\x03\x11enchantable_value\x14\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x01\x17can_destroy_in_creative\x01\x03\x0Bframe_count\x02\x01\x0Eshould_despawn\x01\x03\x11creative_category\x06\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x0Eliquid_clipped\0\x03\ruse_animation\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:display_name\x08\x05value\x17item.diamond_spear.name\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x02\x05delay\n\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x02\x0Cmax_duration\xC8\0\x05\tmin_speed\0\0\0\0\0\n\x13dismount_conditions\x05\tmin_speed\0\0 A\x02\x0Cmax_duration<\0\x05\x12min_relative_speed\0\0\0\0\0\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\x02\x0Cmax_duration\x82\0\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x05\x0Fdamage_modifier\0\0\0\0\x05\rhitbox_margin\0\0\x80>\x05\x11damage_multiplier\x9A\x99\x89?\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\0\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\n\x18minecraft:swing_duration\x05\x05valueff\x86?\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x16minecraft:swing_sounds\x08\x0Battack_miss\x1Eitem.diamond_spear.attack_miss\x08\nattack_hit\x1Ditem.diamond_spear.attack_hit\0\t\titem_tags\x08\x06\x16minecraft:diamond_tier\x1Dminecraft:transformable_items\x12minecraft:is_spear\n\x0Eminecraft:tags\t\x04tags\x08\x06\x16minecraft:diamond_tier\x1Dminecraft:transformable_items\x12minecraft:is_spear\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\n\rrepair_amount\x02\x07version\r\0\x08\nexpression)context.other->query.remaining_durability\0\t\x05items\n\x02\x08\x04name\x17minecraft:diamond_spear\0\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression\x1Bquery.max_durability * 0.25\0\t\x05items\n\x02\x08\x04name\x11minecraft:diamond\0\0\0\n\x15minecraft:enchantable\x01\x05value\n\x08\x04slot\x0Bmelee_spear\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durability\xB0\x18\0\0" } ; pub const DIAMOND_SWORD: Self = Self { id: 347, registry_key: "minecraft:diamond_sword", @@ -41314,7 +41314,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const DRIED_KELP : Self = Self { id : 299 , registry_key : "minecraft:dried_kelp" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\x11using_converts_to\0\x03\tnutrition\x02\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\x03\rcooldown_time\0\x05\x13saturation_modifier\xCD\xCC\xCC=\x01\x0Ecan_always_eat\0\0\x03\x16minecraft:use_duration \0" } ; + pub const DRIED_KELP : Self = Self { id : 299 , registry_key : "minecraft:dried_kelp" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\rcooldown_type\0\x08\x11using_converts_to\0\x05\x13saturation_modifier\xCD\xCC\xCC=\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x02\x03\rcooldown_time\0\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\0\x03\x16minecraft:use_duration \0" } ; pub const DRIED_KELP_BLOCK: Self = Self { id: -139, registry_key: "minecraft:dried_kelp_block", @@ -42260,7 +42260,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const ENCHANTED_GOLDEN_APPLE : Self = Self { id : 288 , registry_key : "minecraft:enchanted_golden_apple" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\rcooldown_type\0\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\x01\x03\tnutrition\x08\x05\x13saturation_modifier\x9A\x99\x99?\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\t\x07effects\n\x08\x03\x08duration<\x03\tamplifier\x02\x08\x04name\x0Cregeneration\x03\x02id\x14\x08\rdescriptionId\x13potion.regeneration\x05\x06chance\0\0\x80?\0\x03\x02id,\x08\rdescriptionId\x11potion.absorption\x03\x08duration\xF0\x01\x05\x06chance\0\0\x80?\x03\tamplifier\x06\x08\x04name\nabsorption\0\x08\x04name\nresistance\x05\x06chance\0\0\x80?\x08\rdescriptionId\x11potion.resistance\x03\x08duration\xD8\x04\x03\tamplifier\0\x03\x02id\x16\0\x03\x02id\x18\x05\x06chance\0\0\x80?\x03\x08duration\xD8\x04\x08\rdescriptionId\x15potion.fireResistance\x03\tamplifier\0\x08\x04name\x0Ffire_resistance\0\0\x01\x0Eminecraft:foil\x01\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0" } ; + pub const ENCHANTED_GOLDEN_APPLE : Self = Self { id : 288 , registry_key : "minecraft:enchanted_golden_apple" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x01\x19minecraft:stacked_by_data\x01\n\x0Eminecraft:food\x08\x11using_converts_to\0\x03\rcooldown_time\0\x08\rcooldown_type\0\x01\x0Ecan_always_eat\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x99?\t\x07effects\n\x08\x08\x04name\x0Cregeneration\x05\x06chance\0\0\x80?\x08\rdescriptionId\x13potion.regeneration\x03\x02id\x14\x03\x08duration<\x03\tamplifier\x02\0\x03\tamplifier\x06\x05\x06chance\0\0\x80?\x03\x02id,\x08\rdescriptionId\x11potion.absorption\x08\x04name\nabsorption\x03\x08duration\xF0\x01\0\x03\x02id\x16\x08\x04name\nresistance\x08\rdescriptionId\x11potion.resistance\x03\tamplifier\0\x03\x08duration\xD8\x04\x05\x06chance\0\0\x80?\0\x05\x06chance\0\0\x80?\x03\x08duration\xD8\x04\x03\x02id\x18\x08\x04name\x0Ffire_resistance\x03\tamplifier\0\x08\rdescriptionId\x15potion.fireResistance\0\x03\tnutrition\x08\0\x03\x16minecraft:use_duration@\x01\x0Eminecraft:foil\x01\0" } ; pub const ENCHANTING_TABLE: Self = Self { id: 116, registry_key: "minecraft:enchanting_table", @@ -42835,7 +42835,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const GLOW_BERRIES : Self = Self { id : 845 , registry_key : "minecraft:glow_berries" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x99>\x03\ron_use_action\x01\x08\rcooldown_type\0\x03\tnutrition\x04\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\0\n\x0Eminecraft:seed\x08\x0Bcrop_result\x14minecraft:cave_vines\x01\x1Aplant_at_any_solid_surface\x01\x08\rplant_at_face\x04down\t\x08plant_at\x08\x04\ncave_vines\x1Ccave_vines_head_with_berries\0\0" } ; + pub const GLOW_BERRIES : Self = Self { id : 845 , registry_key : "minecraft:glow_berries" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\rcooldown_type\0\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\rcooldown_time\0\x03\tnutrition\x04\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\x01\x08\x0Bcrop_result\x14minecraft:cave_vines\t\x08plant_at\x08\x04\ncave_vines\x1Ccave_vines_head_with_berries\x08\rplant_at_face\x04down\0\0" } ; pub const GLOW_FRAME: Self = Self { id: 665, registry_key: "minecraft:glow_frame", @@ -42934,7 +42934,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const GOLDEN_APPLE : Self = Self { id : 287 , registry_key : "minecraft:golden_apple" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\tnutrition\x08\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\ron_use_action\x01\t\x07effects\n\x04\x03\x02id\x14\x08\x04name\x0Cregeneration\x05\x06chance\0\0\x80?\x08\rdescriptionId\x13potion.regeneration\x03\tamplifier\x02\x03\x08duration\n\0\x03\tamplifier\0\x08\rdescriptionId\x11potion.absorption\x03\x02id,\x05\x06chance\0\0\x80?\x08\x04name\nabsorption\x03\x08duration\xF0\x01\0\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x99?\x01\x0Ecan_always_eat\x01\x08\rcooldown_type\0\0\x01\x19minecraft:stacked_by_data\x01\0" } ; + pub const GOLDEN_APPLE : Self = Self { id : 287 , registry_key : "minecraft:golden_apple" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\x11using_converts_to\0\x08\rcooldown_type\0\t\x07effects\n\x04\x03\x08duration\n\x03\tamplifier\x02\x03\x02id\x14\x08\x04name\x0Cregeneration\x05\x06chance\0\0\x80?\x08\rdescriptionId\x13potion.regeneration\0\x03\tamplifier\0\x05\x06chance\0\0\x80?\x08\rdescriptionId\x11potion.absorption\x03\x08duration\xF0\x01\x03\x02id,\x08\x04name\nabsorption\0\x03\tnutrition\x08\x03\ron_use_action\x01\x01\x0Ecan_always_eat\x01\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99?\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0" } ; pub const GOLDEN_AXE: Self = Self { id: 357, registry_key: "minecraft:golden_axe", @@ -42949,7 +42949,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const GOLDEN_CARROT : Self = Self { id : 312 , registry_key : "minecraft:golden_carrot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x99?\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x08\rcooldown_type\0\x03\tnutrition\x0C\0\x03\x16minecraft:use_duration@\0" } ; + pub const GOLDEN_CARROT : Self = Self { id : 312 , registry_key : "minecraft:golden_carrot" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\tnutrition\x0C\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x03\rcooldown_time\0\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99?\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\0" } ; pub const GOLDEN_CHESTPLATE: Self = Self { id: 384, registry_key: "minecraft:golden_chestplate", @@ -43020,7 +43020,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const GOLDEN_SPEAR : Self = Self { id : 259 , registry_key : "minecraft:golden_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x10minecraft:damage\x02\x05value\x01\0\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x16\0\n\x16minecraft:display_name\x08\x05value\x16item.golden_spear.name\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Citem.golden_spear.attack_hit\x08\x0Battack_miss\x1Ditem.golden_spear.attack_miss\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\n\rrepair_amount\x08\nexpression)context.other->query.remaining_durability\x02\x07version\r\0\0\t\x05items\n\x02\x08\x04name\x16minecraft:golden_spear\0\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression\x1Bquery.max_durability * 0.25\0\t\x05items\n\x02\x08\x04name\x14minecraft:gold_ingot\0\0\0\n\x0Fitem_properties\x01\rhand_equipped\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\ngold_spear\0\0\x01\x0Eallow_off_hand\0\x08\x0Ecreative_group\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x17can_destroy_in_creative\x01\x03\x0Emax_stack_size\x02\x03\ruse_animation\0\x03\x0Bframe_count\x02\x03\x11creative_category\x06\x03\x11enchantable_value,\x08\x10enchantable_slot\x0Bmelee_spear\x01\x12hidden_in_commands\x02\x05\x0Cmining_speed\0\0\x80?\x03\x06damage\x02\x01\x0Eshould_despawn\x01\x01\x0Fstacked_by_data\0\x01\x04foil\0\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\n\x13dismount_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0PA\x02\x0Cmax_durationF\0\0\x05\x0Fdamage_modifier\0\0\0\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\x02\x0Cmax_duration\x13\x01\0\n\x14knockback_conditions\x02\x0Cmax_duration\xAA\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\0\x05\x11damage_multiplier333?\x02\x05delay\x0E\0\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x19minecraft:piercing_weapon\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\0\t\titem_tags\x08\x04\x15minecraft:golden_tier\x12minecraft:is_spear\n\x12minecraft:cooldown\x08\x08category\x05spear\x08\x04type\x06attack\x05\x08duration33s?\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durability<\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x17minecraft:use_modifiers\x01\x0Femit_vibrations\0\x05\x0Cuse_duration\0\xA0\x8CG\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\x08\x0Bstart_sound\x15item.golden_spear.use\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:golden_tier\x12minecraft:is_spear\0\n\x18minecraft:swing_duration\x05\x05value33s?\0\0" } ; + pub const GOLDEN_SPEAR : Self = Self { id : 259 , registry_key : "minecraft:golden_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\t\titem_tags\x08\x04\x15minecraft:golden_tier\x12minecraft:is_spear\n\x15minecraft:enchantable\x01\x05value\x16\x08\x04slot\x0Bmelee_spear\0\n\x16minecraft:display_name\x08\x05value\x16item.golden_spear.name\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x11damage_conditions\x05\tmin_speed\0\0\0\0\x02\x0Cmax_duration\x13\x01\x05\x12min_relative_speed33\x93@\0\x05\x0Fdamage_modifier\0\0\0\0\x05\rhitbox_margin\0\0\x80>\x02\x05delay\x0E\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\n\x13dismount_conditions\x02\x0Cmax_durationF\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0PA\0\x05\x11damage_multiplier333?\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_duration\xAA\0\x05\tmin_speed33\xA3@\0\0\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durability<\0\n\x0Fitem_properties\x01\x12hidden_in_commands\x02\x08\x10enchantable_slot\x0Bmelee_spear\x03\x11enchantable_value,\x03\x0Bframe_count\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\ngold_spear\0\0\x01\x0Eshould_despawn\x01\x05\x0Cmining_speed\0\0\x80?\x08\x0Ecreative_group\0\x03\ruse_animation\0\x01\x0Eallow_off_hand\0\x03\x0Emax_stack_size\x02\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x0Eliquid_clipped\0\x03\x06damage\x02\x01\rhand_equipped\x01\x01\x0Fstacked_by_data\0\x01\x04foil\0\x01\x17can_destroy_in_creative\x01\x03\x11creative_category\x06\0\n\x10minecraft:damage\x02\x05value\x01\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x12minecraft:cooldown\x08\x04type\x06attack\x08\x08category\x05spear\x05\x08duration33s?\0\n\x18minecraft:swing_duration\x05\x05value33s?\0\n\x17minecraft:use_modifiers\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\x05\x0Cuse_duration\0\xA0\x8CG\x08\x0Bstart_sound\x15item.golden_spear.use\x01\x0Femit_vibrations\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Citem.golden_spear.attack_hit\x08\x0Battack_miss\x1Ditem.golden_spear.attack_miss\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:golden_tier\x12minecraft:is_spear\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\n\rrepair_amount\x08\nexpression)context.other->query.remaining_durability\x02\x07version\r\0\0\t\x05items\n\x02\x08\x04name\x16minecraft:golden_spear\0\0\t\x05items\n\x02\x08\x04name\x14minecraft:gold_ingot\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression\x1Bquery.max_durability * 0.25\0\0\0\0" } ; pub const GOLDEN_SWORD: Self = Self { id: 354, registry_key: "minecraft:golden_sword", @@ -43084,7 +43084,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const GRAY_BUNDLE : Self = Self { id : 269 , registry_key : "minecraft:gray_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x02\x03\x11creative_category\x06\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x01\x04foil\0\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x03\x11enchantable_value\0\x01\x0Eshould_despawn\x01\x08\x10enchantable_slot\x04none\x01\x17can_destroy_in_creative\x01\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x16bundle_gray_open_front\x08\x07default\x0Bbundle_gray\x08\x10bundle_open_back\x15bundle_gray_open_back\0\0\x01\x0Eallow_off_hand\0\x03\x0Cuse_duration\0\x03\x06damage\0\x01\rhand_equipped\0\0\0" } ; + pub const GRAY_BUNDLE : Self = Self { id : 269 , registry_key : "minecraft:gray_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\t\titem_tags\0\0\n\x0Fitem_properties\x03\x11enchantable_value\0\x01\x12hidden_in_commands\x02\x03\x0Emax_stack_size\x02\x03\x06damage\0\x01\x04foil\0\x01\rhand_equipped\0\x01\x0Eshould_despawn\x01\x03\x0Bframe_count\x02\x03\x0Cuse_duration\0\x01\x0Fstacked_by_data\0\x03\x11creative_category\x06\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x15bundle_gray_open_back\x08\x07default\x0Bbundle_gray\x08\x11bundle_open_front\x16bundle_gray_open_front\0\0\x03\ruse_animation\0\x08\x10enchantable_slot\x04none\x01\x17can_destroy_in_creative\x01\x01\x0Eliquid_clipped\0\x01\x0Eallow_off_hand\0\x08\x0Ecreative_group\0\x05\x0Cmining_speed\0\0\x80?\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0" } ; pub const GRAY_CANDLE: Self = Self { id: -420, registry_key: "minecraft:gray_candle", @@ -43176,7 +43176,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const GREEN_BUNDLE : Self = Self { id : 270 , registry_key : "minecraft:green_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n\x0Fitem_properties\x01\rhand_equipped\0\x03\x11creative_category\x06\x03\x06damage\0\x03\x11enchantable_value\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x17bundle_green_open_front\x08\x07default\x0Cbundle_green\x08\x10bundle_open_back\x16bundle_green_open_back\0\0\x01\x04foil\0\x03\x0Cuse_duration\0\x03\x0Emax_stack_size\x02\x01\x17can_destroy_in_creative\x01\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\x03\ruse_animation\0\x03\x0Bframe_count\x02\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x01\x0Eliquid_clipped\0\x08\x10enchantable_slot\x04none\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0" } ; + pub const GREEN_BUNDLE : Self = Self { id : 270 , registry_key : "minecraft:green_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Fitem_properties\x03\x0Bframe_count\x02\x03\x11enchantable_value\0\x01\rhand_equipped\0\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x03\x11creative_category\x06\x08\x10enchantable_slot\x04none\x01\x04foil\0\x01\x0Eshould_despawn\x01\x03\x0Emax_stack_size\x02\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x01\x0Eallow_off_hand\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Cbundle_green\x08\x10bundle_open_back\x16bundle_green_open_back\x08\x11bundle_open_front\x17bundle_green_open_front\0\0\x03\x06damage\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\0\x01\x17can_destroy_in_creative\x01\x05\x0Cmining_speed\0\0\x80?\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\t\titem_tags\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\0" } ; pub const GREEN_CANDLE: Self = Self { id: -426, registry_key: "minecraft:green_candle", @@ -43632,7 +43632,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const HONEY_BOTTLE : Self = Self { id : 633 , registry_key : "minecraft:honey_bottle" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\x11using_converts_to\x0Cglass_bottle\x08\rcooldown_type\0\t\x0Eremove_effects\x03\x02&\x01\x0Ecan_always_eat\x01\x03\tnutrition\x0C\x05\x13saturation_modifier\xCD\xCC\xCC=\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\ron_use_action\x01\0\x03\x18minecraft:max_stack_size \x03\x16minecraft:use_durationP\0" } ; + pub const HONEY_BOTTLE : Self = Self { id : 633 , registry_key : "minecraft:honey_bottle" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x18minecraft:max_stack_size \x03\x16minecraft:use_durationP\n\x0Eminecraft:food\x03\ron_use_action\x01\x05\x13saturation_modifier\xCD\xCC\xCC=\x08\x11using_converts_to\x0Cglass_bottle\x01\x0Ecan_always_eat\x01\x08\rcooldown_type\0\t\x0Eremove_effects\x03\x02&\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x0C\0\0" } ; pub const HONEYCOMB: Self = Self { id: 632, registry_key: "minecraft:honeycomb", @@ -43934,7 +43934,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const IRON_SPEAR : Self = Self { id : 260 , registry_key : "minecraft:iron_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Fitem_properties\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\niron_spear\0\0\x01\x0Eallow_off_hand\0\x01\x0Eliquid_clipped\0\x03\x11creative_category\x06\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x0Fstacked_by_data\0\x01\x12hidden_in_commands\x02\x08\x10enchantable_slot\x0Bmelee_spear\x03\x11enchantable_value\x1C\x03\x0Emax_stack_size\x02\x03\x06damage\x06\x01\x17can_destroy_in_creative\x01\x08\x0Ecreative_group\0\x01\x04foil\0\x03\x0Bframe_count\x02\x01\rhand_equipped\x01\x05\x0Cmining_speed\0\0\x80?\0\n\x14minecraft:durability\x03\x0Emax_durability\xF4\x03\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Aitem.iron_spear.attack_hit\x08\x0Battack_miss\x1Bitem.iron_spear.attack_miss\0\t\titem_tags\x08\x04\x13minecraft:iron_tier\x12minecraft:is_spear\n\x10minecraft:damage\x02\x05value\x03\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x17minecraft:use_modifiers\x05\x0Cuse_duration\0\xA0\x8CG\x08\x0Bstart_using\x06always\x05\x11movement_modifier\0\0\x80?\x01\x0Femit_vibrations\0\x08\x0Bstart_sound\x13item.iron_spear.use\0\n\x15minecraft:enchantable\x01\x05value\x0E\x08\x04slot\x0Bmelee_spear\0\n\x18minecraft:swing_duration\x05\x05value33s?\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x16minecraft:display_name\x08\x05value\x14item.iron_spear.name\0\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x14minecraft:iron_spear\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression)context.other->query.remaining_durability\0\0\t\x05items\n\x02\x08\x04name\x14minecraft:iron_ingot\0\n\rrepair_amount\x08\nexpression\x1Bquery.max_durability * 0.25\x02\x07version\r\0\0\0\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x13minecraft:iron_tier\x12minecraft:is_spear\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_duration\x87\0\x05\tmin_speed33\xA3@\0\x05\x11damage_multiplier33s?\x05\rhitbox_margin\0\0\x80>\x02\x05delay\x0C\0\x05\x0Fdamage_modifier\0\0\0\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\n\x13dismount_conditions\x02\x0Cmax_duration2\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\x000A\0\n\x11damage_conditions\x02\x0Cmax_duration\xE1\0\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\0\n\x12minecraft:cooldown\x08\x08category\x05spear\x05\x08duration33s?\x08\x04type\x06attack\0\0" } ; + pub const IRON_SPEAR : Self = Self { id : 260 , registry_key : "minecraft:iron_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x0E\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\n\rrepair_amount\x08\nexpression)context.other->query.remaining_durability\x02\x07version\r\0\0\t\x05items\n\x02\x08\x04name\x14minecraft:iron_spear\0\0\t\x05items\n\x02\x08\x04name\x14minecraft:iron_ingot\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression\x1Bquery.max_durability * 0.25\0\0\0\n\x12minecraft:cooldown\x08\x04type\x06attack\x08\x08category\x05spear\x05\x08duration33s?\0\n\x17minecraft:use_modifiers\x05\x0Cuse_duration\0\xA0\x8CG\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_sound\x13item.iron_spear.use\x08\x0Bstart_using\x06always\x01\x0Femit_vibrations\0\0\n\x10minecraft:damage\x02\x05value\x03\0\0\n\x18minecraft:swing_duration\x05\x05value33s?\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durability\xF4\x03\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x13minecraft:iron_tier\x12minecraft:is_spear\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Aitem.iron_spear.attack_hit\x08\x0Battack_miss\x1Bitem.iron_spear.attack_miss\0\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x0Bmelee_spear\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x03\x0Bframe_count\x02\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\x08\x0Ecreative_group\0\x03\x11enchantable_value\x1C\x03\x0Emax_stack_size\x02\x01\x12hidden_in_commands\x02\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x03\x06damage\x06\x01\rhand_equipped\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\niron_spear\0\0\0\t\titem_tags\x08\x04\x13minecraft:iron_tier\x12minecraft:is_spear\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x05\rhitbox_margin\0\0\x80>\0\n\x16minecraft:display_name\x08\x05value\x14item.iron_spear.name\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x13dismount_conditions\x05\tmin_speed\0\x000A\x02\x0Cmax_duration2\0\x05\x12min_relative_speed\0\0\0\0\0\x05\x0Fdamage_modifier\0\0\0\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x02\x0Cmax_duration\xE1\0\x05\tmin_speed\0\0\0\0\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\n\x14knockback_conditions\x02\x0Cmax_duration\x87\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\0\x05\x11damage_multiplier33s?\x02\x05delay\x0C\0\0\0\0" } ; pub const IRON_SWORD: Self = Self { id: 338, registry_key: "minecraft:iron_sword", @@ -44509,7 +44509,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const LIGHT_BLUE_BUNDLE : Self = Self { id : 271 , registry_key : "minecraft:light_blue_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Fitem_properties\x01\x12hidden_in_commands\x02\x01\x0Eliquid_clipped\0\x03\x11enchantable_value\0\x05\x0Cmining_speed\0\0\x80?\x03\x11creative_category\x06\x01\x04foil\0\x01\x0Eshould_despawn\x01\x03\x06damage\0\x03\x0Bframe_count\x02\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x08\x0Ecreative_group\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x11bundle_light_blue\x08\x10bundle_open_back\x1Bbundle_light_blue_open_back\x08\x11bundle_open_front\x1Cbundle_light_blue_open_front\0\0\x01\x0Fstacked_by_data\0\x01\x17can_destroy_in_creative\x01\x08\x10enchantable_slot\x04none\x03\x0Emax_stack_size\x02\x03\ruse_animation\0\x03\x0Cuse_duration\0\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0" } ; + pub const LIGHT_BLUE_BUNDLE : Self = Self { id : 271 , registry_key : "minecraft:light_blue_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\t\titem_tags\0\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x01\x04foil\0\x01\x17can_destroy_in_creative\x01\x03\ruse_animation\0\x03\x11creative_category\x06\x01\x0Fstacked_by_data\0\x03\x0Cuse_duration\0\x01\x12hidden_in_commands\x02\x01\rhand_equipped\0\x03\x06damage\0\x08\x10enchantable_slot\x04none\x03\x0Emax_stack_size\x02\x03\x0Bframe_count\x02\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x1Cbundle_light_blue_open_front\x08\x07default\x11bundle_light_blue\x08\x10bundle_open_back\x1Bbundle_light_blue_open_back\0\0\x01\x0Eallow_off_hand\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\0\x08\x0Ecreative_group\0\0\0" } ; pub const LIGHT_BLUE_CANDLE: Self = Self { id: -416, registry_key: "minecraft:light_blue_candle", @@ -44601,7 +44601,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const LIGHT_GRAY_BUNDLE : Self = Self { id : 272 , registry_key : "minecraft:light_gray_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Fitem_properties\x01\x0Eallow_off_hand\0\x03\x06damage\0\x03\x0Emax_stack_size\x02\x03\x0Cuse_duration\0\x03\x11enchantable_value\0\x01\x12hidden_in_commands\x02\x03\ruse_animation\0\x01\x0Eshould_despawn\x01\x08\x10enchantable_slot\x04none\x01\rhand_equipped\0\x03\x0Bframe_count\x02\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x1Bbundle_light_gray_open_back\x08\x11bundle_open_front\x1Cbundle_light_gray_open_front\x08\x07default\x11bundle_light_gray\0\0\x01\x17can_destroy_in_creative\x01\x03\x11creative_category\x06\x08\x0Ecreative_group\0\x01\x04foil\0\x01\x0Eliquid_clipped\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0" } ; + pub const LIGHT_GRAY_BUNDLE : Self = Self { id : 272 , registry_key : "minecraft:light_gray_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Fitem_properties\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\x03\x06damage\0\x03\x0Cuse_duration\0\x01\x0Fstacked_by_data\0\x05\x0Cmining_speed\0\0\x80?\x01\x17can_destroy_in_creative\x01\x01\x0Eshould_despawn\x01\x08\x10enchantable_slot\x04none\x01\rhand_equipped\0\x03\x0Bframe_count\x02\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x1Cbundle_light_gray_open_front\x08\x07default\x11bundle_light_gray\x08\x10bundle_open_back\x1Bbundle_light_gray_open_back\0\0\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x01\x0Eallow_off_hand\0\x01\x04foil\0\x03\ruse_animation\0\x03\x11enchantable_value\0\x03\x11creative_category\x06\0\t\titem_tags\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0" } ; pub const LIGHT_GRAY_CANDLE: Self = Self { id: -421, registry_key: "minecraft:light_gray_candle", @@ -44714,7 +44714,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const LIME_BUNDLE : Self = Self { id : 273 , registry_key : "minecraft:lime_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x0Fitem_properties\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x15bundle_lime_open_back\x08\x11bundle_open_front\x16bundle_lime_open_front\x08\x07default\x0Bbundle_lime\0\0\x03\x11creative_category\x06\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x04none\x03\x11enchantable_value\0\x01\x17can_destroy_in_creative\x01\x03\x0Bframe_count\x02\x01\x12hidden_in_commands\x02\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\0\x08\x0Ecreative_group\0\x03\x06damage\0\x03\ruse_animation\0\x01\x0Eshould_despawn\x01\x01\x04foil\0\x01\rhand_equipped\0\x03\x0Emax_stack_size\x02\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\t\titem_tags\0\0\0" } ; + pub const LIME_BUNDLE : Self = Self { id : 273 , registry_key : "minecraft:lime_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x16minecraft:storage_item\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\x03\x0Emax_stack_size\x02\x01\x12hidden_in_commands\x02\x03\x11creative_category\x06\x03\x06damage\0\x01\x17can_destroy_in_creative\x01\x03\x11enchantable_value\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x15bundle_lime_open_back\x08\x11bundle_open_front\x16bundle_lime_open_front\x08\x07default\x0Bbundle_lime\0\0\x03\x0Bframe_count\x02\x01\x0Eliquid_clipped\0\x08\x10enchantable_slot\x04none\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x01\x0Eallow_off_hand\0\x01\x04foil\0\x01\rhand_equipped\0\x03\ruse_animation\0\0\0" } ; pub const LIME_CANDLE: Self = Self { id: -418, registry_key: "minecraft:lime_candle", @@ -44911,7 +44911,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const MAGENTA_BUNDLE : Self = Self { id : 274 , registry_key : "minecraft:magenta_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\t\titem_tags\0\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x08\x0Ecreative_group\0\x01\x0Eallow_off_hand\0\x01\rhand_equipped\0\x05\x0Cmining_speed\0\0\x80?\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Ebundle_magenta\x08\x11bundle_open_front\x19bundle_magenta_open_front\x08\x10bundle_open_back\x18bundle_magenta_open_back\0\0\x01\x12hidden_in_commands\x02\x03\x0Cuse_duration\0\x03\x06damage\0\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\x08\x10enchantable_slot\x04none\x03\ruse_animation\0\x01\x0Fstacked_by_data\0\x01\x04foil\0\x01\x17can_destroy_in_creative\x01\x03\x0Bframe_count\x02\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\0\x03\x11creative_category\x06\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\0" } ; + pub const MAGENTA_BUNDLE : Self = Self { id : 274 , registry_key : "minecraft:magenta_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\x05\x0Cmining_speed\0\0\x80?\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x03\x11enchantable_value\0\x01\x0Eallow_off_hand\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x18bundle_magenta_open_back\x08\x11bundle_open_front\x19bundle_magenta_open_front\x08\x07default\x0Ebundle_magenta\0\0\x01\x0Fstacked_by_data\0\x01\rhand_equipped\0\x03\x0Cuse_duration\0\x03\x11creative_category\x06\x01\x0Eliquid_clipped\0\x03\x06damage\0\x03\ruse_animation\0\x03\x0Emax_stack_size\x02\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\x08\x10enchantable_slot\x04none\x01\x0Eshould_despawn\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\t\titem_tags\0\0\0" } ; pub const MAGENTA_CANDLE: Self = Self { id: -415, registry_key: "minecraft:magenta_candle", @@ -45206,8 +45206,8 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const MELON_SEEDS : Self = Self { id : 322 , registry_key : "minecraft:melon_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x08\rplant_at_face\x02up\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x14minecraft:melon_stem\t\x08plant_at\x08\x02\x12minecraft:farmland\0\0" } ; - pub const MELON_SLICE : Self = Self { id : 301 , registry_key : "minecraft:melon_slice" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\rcooldown_time\0\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x04\x08\x11using_converts_to\0\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x99>\0\0" } ; + pub const MELON_SEEDS : Self = Self { id : 322 , registry_key : "minecraft:melon_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x08\x0Bcrop_result\x14minecraft:melon_stem\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\rplant_at_face\x02up\x01\x1Aplant_at_any_solid_surface\0\0\0" } ; + pub const MELON_SLICE : Self = Self { id : 301 , registry_key : "minecraft:melon_slice" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\ron_use_action\x01\x08\x11using_converts_to\0\x03\tnutrition\x04\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\0\0\0" } ; pub const MELON_STEM: Self = Self { id: 105, registry_key: "minecraft:melon_stem", @@ -45425,7 +45425,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const MUSHROOM_STEW : Self = Self { id : 289 , registry_key : "minecraft:mushroom_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x0C\x03\rcooldown_time\0\x08\x11using_converts_to\x04bowl\x05\x13saturation_modifier\x9A\x99\x19?\x01\x0Ecan_always_eat\0\0\x03\x18minecraft:max_stack_size\x02\0" } ; + pub const MUSHROOM_STEW : Self = Self { id : 289 , registry_key : "minecraft:mushroom_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x05\x13saturation_modifier\x9A\x99\x19?\x08\rcooldown_type\0\x03\ron_use_action\x01\x03\tnutrition\x0C\x08\x11using_converts_to\x04bowl\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x18minecraft:max_stack_size\x02\0" } ; pub const MUSIC_DISC_11: Self = Self { id: 583, registry_key: "minecraft:music_disc_11", @@ -45580,7 +45580,7 @@ impl BedrockItem { component_based: true, definition_components: b"\n\0\0", }; - pub const MUTTON : Self = Self { id : 589 , registry_key : "minecraft:mutton" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\rcooldown_time\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\x08\x11using_converts_to\0\x03\tnutrition\x04\0\x03\x16minecraft:use_duration@\0" } ; + pub const MUTTON : Self = Self { id : 589 , registry_key : "minecraft:mutton" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x03\rcooldown_time\0\x03\ron_use_action\x01\x03\tnutrition\x04\x08\x11using_converts_to\0\0\x03\x16minecraft:use_duration@\0" } ; pub const MYCELIUM: Self = Self { id: 110, registry_key: "minecraft:mycelium", @@ -45672,7 +45672,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const NETHER_WART : Self = Self { id : 323 , registry_key : "minecraft:nether_wart" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x15minecraft:nether_wart\t\x08plant_at\x08\x02\tsoul_sand\x08\rplant_at_face\x02up\0\0" } ; + pub const NETHER_WART : Self = Self { id : 323 , registry_key : "minecraft:nether_wart" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\tsoul_sand\x08\x0Bcrop_result\x15minecraft:nether_wart\x08\rplant_at_face\x02up\x01\x1Aplant_at_any_solid_surface\0\0\0" } ; pub const NETHER_WART_BLOCK: Self = Self { id: 214, registry_key: "minecraft:nether_wart_block", @@ -45778,7 +45778,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const NETHERITE_SPEAR : Self = Self { id : 261 , registry_key : "minecraft:netherite_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x0F\0\n\x16minecraft:display_name\x08\x05value\x19item.netherite_spear.name\0\n\x18minecraft:fire_resistant\x01\x05value\x01\0\n\x19minecraft:piercing_weapon\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\t\titem_tags\x08\x04\x18minecraft:netherite_tier\x12minecraft:is_spear\n\x18minecraft:swing_duration\x05\x05value33\x93?\0\n\x17minecraft:use_modifiers\x08\x0Bstart_sound\x18item.netherite_spear.use\x05\x0Cuse_duration\0\xA0\x8CG\x01\x0Femit_vibrations\0\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x19minecraft:netherite_spear\0\n\rrepair_amount\x08\nexpression)context.other->query.remaining_durability\x02\x07version\r\0\0\0\t\x05items\n\x02\x08\x04name\x19minecraft:netherite_ingot\0\n\rrepair_amount\x08\nexpression\x1Bquery.max_durability * 0.25\x02\x07version\r\0\0\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x08\x0Ecreative_group\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\x03\x0Bframe_count\x02\x01\x0Fstacked_by_data\0\x03\x11enchantable_value\x1E\x01\x12hidden_in_commands\x02\x03\x06damage\n\x01\x0Eallow_off_hand\0\x01\x04foil\0\x03\x11creative_category\x06\x01\x0Eliquid_clipped\0\x05\x0Cmining_speed\0\0\x80?\x03\ruse_animation\0\x01\rhand_equipped\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Fnetherite_spear\0\0\x03\x0Emax_stack_size\x02\x01\x0Eshould_despawn\x01\x08\x10enchantable_slot\x0Bmelee_spear\x01\x17can_destroy_in_creative\x01\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x05\rhitbox_margin\0\0\x80>\x02\x05delay\x08\0\n\x11damage_conditions\x05\tmin_speed\0\0\0\0\x05\x12min_relative_speed33\x93@\x02\x0Cmax_duration\xAF\0\0\x05\x0Fdamage_modifier\0\0\0\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x05\x11damage_multiplier\x9A\x99\x99?\n\x13dismount_conditions\x05\tmin_speed\0\0\x10A\x02\x0Cmax_duration2\0\x05\x12min_relative_speed\0\0\0\0\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\n\x14knockback_conditions\x05\tmin_speed33\xA3@\x02\x0Cmax_durationn\0\x05\x12min_relative_speed\0\0\0\0\0\0\0\n\x10minecraft:damage\x02\x05value\x05\0\0\n\x14minecraft:durability\x03\x0Emax_durability\xDC\x1F\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\0\n\x12minecraft:cooldown\x08\x04type\x06attack\x05\x08duration33\x93?\x08\x08category\x05spear\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x18minecraft:netherite_tier\x12minecraft:is_spear\0\n\x16minecraft:swing_sounds\x08\x0Battack_miss item.netherite_spear.attack_miss\x08\nattack_hit\x1Fitem.netherite_spear.attack_hit\0\0" } ; + pub const NETHERITE_SPEAR : Self = Self { id : 261 , registry_key : "minecraft:netherite_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x17minecraft:use_modifiers\x05\x0Cuse_duration\0\xA0\x8CG\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\x01\x0Femit_vibrations\0\x08\x0Bstart_sound\x18item.netherite_spear.use\0\n\x0Fitem_properties\x03\x11creative_category\x06\x03\ruse_animation\0\x03\x0Emax_stack_size\x02\x03\x0Bframe_count\x02\x01\x0Fstacked_by_data\0\x03\x06damage\n\x01\x17can_destroy_in_creative\x01\x03\x11enchantable_value\x1E\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Fnetherite_spear\0\0\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x03\x0Cuse_duration\x80\xE4\xAF\x01\x01\x04foil\0\x01\rhand_equipped\x01\x08\x10enchantable_slot\x0Bmelee_spear\x05\x0Cmining_speed\0\0\x80?\x01\x0Eliquid_clipped\0\0\n\x18minecraft:swing_duration\x05\x05value33\x93?\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x19minecraft:netherite_spear\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression)context.other->query.remaining_durability\0\0\t\x05items\n\x02\x08\x04name\x19minecraft:netherite_ingot\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression\x1Bquery.max_durability * 0.25\0\0\0\n\x14minecraft:durability\x03\x0Emax_durability\xDC\x1F\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\0\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x05\rhitbox_margin\0\0\x80>\0\n\x15minecraft:enchantable\x01\x05value\x0F\x08\x04slot\x0Bmelee_spear\0\n\x10minecraft:damage\x02\x05value\x05\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x18minecraft:fire_resistant\x01\x05value\x01\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Fitem.netherite_spear.attack_hit\x08\x0Battack_miss item.netherite_spear.attack_miss\0\n\x16minecraft:display_name\x08\x05value\x19item.netherite_spear.name\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x18minecraft:netherite_tier\x12minecraft:is_spear\0\t\titem_tags\x08\x04\x18minecraft:netherite_tier\x12minecraft:is_spear\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x14knockback_conditions\x02\x0Cmax_durationn\0\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\0\n\x13dismount_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0\x10A\x02\x0Cmax_duration2\0\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x02\x05delay\x08\0\n\x11damage_conditions\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\x02\x0Cmax_duration\xAF\0\0\x05\x11damage_multiplier\x9A\x99\x99?\x05\x0Fdamage_modifier\0\0\0\0\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\x05\rhitbox_margin\0\0\x80>\0\0\n\x12minecraft:cooldown\x05\x08duration33\x93?\x08\x08category\x05spear\x08\x04type\x06attack\0\0" } ; pub const NETHERITE_SWORD: Self = Self { id: 646, registry_key: "minecraft:netherite_sword", @@ -45975,7 +45975,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const OMINOUS_TRIAL_KEY : Self = Self { id : 282 , registry_key : "minecraft:ominous_trial_key" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x16minecraft:display_name\x08\x05value\x1Bitem.ominous_trial_key.name\0\n\x0Fitem_properties\x01\x0Eshould_despawn\x01\x03\x06damage\0\x03\ruse_animation\0\x01\rhand_equipped\0\x03\x11enchantable_value\0\x01\x0Eallow_off_hand\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\0\x03\x11creative_category\x08\x01\x17can_destroy_in_creative\x01\x08\x10enchantable_slot\x04none\x03\x0Emax_stack_size\x80\x01\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x01\x04foil\0\x03\x0Bframe_count\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x11ominous_trial_key\0\0\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\0\t\titem_tags\0\0\0" } ; + pub const OMINOUS_TRIAL_KEY : Self = Self { id : 282 , registry_key : "minecraft:ominous_trial_key" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Fitem_properties\x03\x11creative_category\x08\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x03\x0Emax_stack_size\x80\x01\x01\x04foil\0\x01\x0Eliquid_clipped\0\x01\x0Eshould_despawn\x01\x03\x06damage\0\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x03\x11enchantable_value\0\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x11ominous_trial_key\0\0\x03\x0Cuse_duration\0\x01\x17can_destroy_in_creative\x01\x08\x10enchantable_slot\x04none\x05\x0Cmining_speed\0\0\x80?\0\t\titem_tags\0\0\n\x16minecraft:display_name\x08\x05value\x1Bitem.ominous_trial_key.name\0\0" } ; pub const OPEN_EYEBLOSSOM: Self = Self { id: -1018, registry_key: "minecraft:open_eyeblossom", @@ -45983,7 +45983,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const ORANGE_BUNDLE : Self = Self { id : 275 , registry_key : "minecraft:orange_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\t\titem_tags\0\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x03\x11creative_category\x06\x03\ruse_animation\0\x01\x12hidden_in_commands\x02\x01\rhand_equipped\0\x01\x0Eshould_despawn\x01\x03\x06damage\0\x03\x0Bframe_count\x02\x01\x0Eallow_off_hand\0\x03\x0Emax_stack_size\x02\x03\x11enchantable_value\0\x01\x17can_destroy_in_creative\x01\x08\x0Ecreative_group\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\0\x08\x10enchantable_slot\x04none\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x17bundle_orange_open_back\x08\x11bundle_open_front\x18bundle_orange_open_front\x08\x07default\rbundle_orange\0\0\0\0" } ; + pub const ORANGE_BUNDLE : Self = Self { id : 275 , registry_key : "minecraft:orange_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x0Fitem_properties\x01\x0Eallow_off_hand\0\x01\x12hidden_in_commands\x02\x03\x0Emax_stack_size\x02\x03\x11creative_category\x06\x08\x10enchantable_slot\x04none\x03\ruse_animation\0\x01\x17can_destroy_in_creative\x01\x01\x0Eliquid_clipped\0\x01\x04foil\0\x03\x0Bframe_count\x02\x08\x0Ecreative_group\0\x03\x11enchantable_value\0\x01\rhand_equipped\0\x03\x06damage\0\x01\x0Fstacked_by_data\0\x03\x0Cuse_duration\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\rbundle_orange\x08\x10bundle_open_back\x17bundle_orange_open_back\x08\x11bundle_open_front\x18bundle_orange_open_front\0\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\0\0" } ; pub const ORANGE_CANDLE: Self = Self { id: -414, registry_key: "minecraft:orange_candle", @@ -46502,7 +46502,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const PINK_BUNDLE : Self = Self { id : 276 , registry_key : "minecraft:pink_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x03\x0Emax_stack_size\x02\x03\x06damage\0\x01\x0Eshould_despawn\x01\x01\x04foil\0\x01\x0Eallow_off_hand\0\x03\x0Bframe_count\x02\x08\x0Ecreative_group\0\x03\x11enchantable_value\0\x01\x17can_destroy_in_creative\x01\x08\x10enchantable_slot\x04none\x01\rhand_equipped\0\x01\x12hidden_in_commands\x02\x01\x0Eliquid_clipped\0\x03\ruse_animation\0\x01\x0Fstacked_by_data\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x15bundle_pink_open_back\x08\x07default\x0Bbundle_pink\x08\x11bundle_open_front\x16bundle_pink_open_front\0\0\x05\x0Cmining_speed\0\0\x80?\x03\x11creative_category\x06\x03\x0Cuse_duration\0\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0" } ; + pub const PINK_BUNDLE : Self = Self { id : 276 , registry_key : "minecraft:pink_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x03\ruse_animation\0\x01\x0Fstacked_by_data\0\x01\x17can_destroy_in_creative\x01\x03\x0Bframe_count\x02\x03\x11enchantable_value\0\x03\x0Emax_stack_size\x02\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x16bundle_pink_open_front\x08\x07default\x0Bbundle_pink\x08\x10bundle_open_back\x15bundle_pink_open_back\0\0\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\x01\rhand_equipped\0\x01\x12hidden_in_commands\x02\x03\x0Cuse_duration\0\x03\x11creative_category\x06\x01\x0Eliquid_clipped\0\x08\x0Ecreative_group\0\x03\x06damage\0\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\t\titem_tags\0\0\0" } ; pub const PINK_CANDLE: Self = Self { id: -419, registry_key: "minecraft:pink_candle", @@ -46636,7 +46636,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const PITCHER_POD : Self = Self { id : 326 , registry_key : "minecraft:pitcher_pod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\x0Bcrop_result\x16minecraft:pitcher_crop\x01\x1Aplant_at_any_solid_surface\0\x08\rplant_at_face\x02up\0\0" } ; + pub const PITCHER_POD : Self = Self { id : 326 , registry_key : "minecraft:pitcher_pod" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\rplant_at_face\x02up\x08\x0Bcrop_result\x16minecraft:pitcher_crop\x01\x1Aplant_at_any_solid_surface\0\0\0" } ; pub const PLANKS: Self = Self { id: 817, registry_key: "minecraft:planks", @@ -46672,7 +46672,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const POISONOUS_POTATO : Self = Self { id : 311 , registry_key : "minecraft:poisonous_potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x99>\t\x07effects\n\x02\x05\x06chance\x9A\x99\x19?\x03\x08duration\n\x08\x04name\x06poison\x03\x02id&\x03\tamplifier\0\x08\rdescriptionId\rpotion.poison\0\x08\x11using_converts_to\0\x03\rcooldown_time\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x04\x08\rcooldown_type\0\0\x03\x16minecraft:use_duration@\0" } ; + pub const POISONOUS_POTATO : Self = Self { id : 311 , registry_key : "minecraft:poisonous_potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\t\x07effects\n\x02\x05\x06chance\x9A\x99\x19?\x03\x08duration\n\x03\x02id&\x08\x04name\x06poison\x03\tamplifier\0\x08\rdescriptionId\rpotion.poison\0\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99>\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\ron_use_action\x01\x03\tnutrition\x04\0\0" } ; pub const POLAR_BEAR_SPAWN_EGG: Self = Self { id: 506, registry_key: "minecraft:polar_bear_spawn_egg", @@ -47009,7 +47009,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const PORKCHOP : Self = Self { id : 291 , registry_key : "minecraft:porkchop" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x06\x05\x13saturation_modifier\x9A\x99\x99>\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\x03\rcooldown_time\0\0\0" } ; + pub const PORKCHOP : Self = Self { id : 291 , registry_key : "minecraft:porkchop" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\ron_use_action\x01\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\x03\tnutrition\x06\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x08\x11using_converts_to\0\0\0" } ; pub const PORTAL: Self = Self { id: 90, registry_key: "minecraft:portal", @@ -47017,7 +47017,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const POTATO : Self = Self { id : 309 , registry_key : "minecraft:potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\tnutrition\x02\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\0\x03\ron_use_action\x01\x08\rcooldown_type\0\0\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\x0Bcrop_result\x12minecraft:potatoes\x08\rplant_at_face\x02up\0\x03\x16minecraft:use_duration@\0" } ; + pub const POTATO : Self = Self { id : 309 , registry_key : "minecraft:potato" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\x05\x13saturation_modifier\x9A\x99\x99>\x03\tnutrition\x02\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x08\x11using_converts_to\0\x08\rcooldown_type\0\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x12minecraft:potatoes\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\x12minecraft:farmland\0\0" } ; pub const POTATOES: Self = Self { id: 142, registry_key: "minecraft:potatoes", @@ -47151,7 +47151,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const PUFFERFISH : Self = Self { id : 296 , registry_key : "minecraft:pufferfish" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\x11using_converts_to\0\x05\x13saturation_modifier\xCD\xCC\xCC=\t\x07effects\n\x06\x05\x06chance\0\0\x80?\x03\tamplifier\x02\x03\x08durationx\x03\x02id&\x08\rdescriptionId\rpotion.poison\x08\x04name\x06poison\0\x03\x08duration\x1E\x03\x02id\x12\x08\rdescriptionId\x10potion.confusion\x03\tamplifier\0\x05\x06chance\0\0\x80?\x08\x04name\x06nausea\0\x08\x04name\x06hunger\x03\tamplifier\x04\x03\x02id\"\x05\x06chance\0\0\x80?\x08\rdescriptionId\rpotion.hunger\x03\x08duration\x1E\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\ron_use_action\x01\x03\rcooldown_time\0\x03\tnutrition\x02\0\x01\x19minecraft:stacked_by_data\x01\x03\x16minecraft:use_duration@\0" } ; + pub const PUFFERFISH : Self = Self { id : 296 , registry_key : "minecraft:pufferfish" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x03\ron_use_action\x01\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\tnutrition\x02\x08\x11using_converts_to\0\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\t\x07effects\n\x06\x08\rdescriptionId\rpotion.poison\x03\x08durationx\x03\x02id&\x08\x04name\x06poison\x03\tamplifier\x02\x05\x06chance\0\0\x80?\0\x03\x08duration\x1E\x03\tamplifier\0\x05\x06chance\0\0\x80?\x03\x02id\x12\x08\x04name\x06nausea\x08\rdescriptionId\x10potion.confusion\0\x08\x04name\x06hunger\x05\x06chance\0\0\x80?\x03\tamplifier\x04\x03\x02id\"\x03\x08duration\x1E\x08\rdescriptionId\rpotion.hunger\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x01\x19minecraft:stacked_by_data\x01\0" } ; pub const PUFFERFISH_BUCKET: Self = Self { id: 399, registry_key: "minecraft:pufferfish_bucket", @@ -47173,8 +47173,8 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const PUMPKIN_PIE : Self = Self { id : 313 , registry_key : "minecraft:pumpkin_pie" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\tnutrition\x10\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x08\rcooldown_type\0\0\x03\x16minecraft:use_duration@\0" } ; - pub const PUMPKIN_SEEDS : Self = Self { id : 321 , registry_key : "minecraft:pumpkin_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x08\rplant_at_face\x02up\x08\x0Bcrop_result\x16minecraft:pumpkin_stem\t\x08plant_at\x08\x02\x12minecraft:farmland\x01\x1Aplant_at_any_solid_surface\0\0\0" } ; + pub const PUMPKIN_PIE : Self = Self { id : 313 , registry_key : "minecraft:pumpkin_pie" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x03\ron_use_action\x01\x08\rcooldown_type\0\x03\rcooldown_time\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x99>\x08\x11using_converts_to\0\x03\tnutrition\x10\x01\x0Ecan_always_eat\0\0\0" } ; + pub const PUMPKIN_SEEDS : Self = Self { id : 321 , registry_key : "minecraft:pumpkin_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\x08\x0Bcrop_result\x16minecraft:pumpkin_stem\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\x12minecraft:farmland\0\0" } ; pub const PUMPKIN_STEM: Self = Self { id: 104, registry_key: "minecraft:pumpkin_stem", @@ -47182,7 +47182,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const PURPLE_BUNDLE : Self = Self { id : 277 , registry_key : "minecraft:purple_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\t\titem_tags\0\0\n\x0Fitem_properties\x03\x06damage\0\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\x08\x10enchantable_slot\x04none\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x17bundle_purple_open_back\x08\x11bundle_open_front\x18bundle_purple_open_front\x08\x07default\rbundle_purple\0\0\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x03\x11enchantable_value\0\x03\x0Emax_stack_size\x02\x01\rhand_equipped\0\x03\ruse_animation\0\x01\x0Fstacked_by_data\0\x03\x0Cuse_duration\0\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x01\x04foil\0\x01\x0Eallow_off_hand\0\x05\x0Cmining_speed\0\0\x80?\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0" } ; + pub const PURPLE_BUNDLE : Self = Self { id : 277 , registry_key : "minecraft:purple_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x03\x11creative_category\x06\x01\x04foil\0\x01\x12hidden_in_commands\x02\x03\x0Cuse_duration\0\x03\x11enchantable_value\0\x03\x0Emax_stack_size\x02\x08\x10enchantable_slot\x04none\x01\x0Eliquid_clipped\0\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x03\x0Bframe_count\x02\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x01\x17can_destroy_in_creative\x01\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\rbundle_purple\x08\x10bundle_open_back\x17bundle_purple_open_back\x08\x11bundle_open_front\x18bundle_purple_open_front\0\0\x03\x06damage\0\x03\ruse_animation\0\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\0" } ; pub const PURPLE_CANDLE: Self = Self { id: -423, registry_key: "minecraft:purple_candle", @@ -47365,7 +47365,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const RABBIT : Self = Self { id : 317 , registry_key : "minecraft:rabbit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x05\x13saturation_modifier\x9A\x99\x99>\x03\rcooldown_time\0\x08\x11using_converts_to\0\x03\tnutrition\x06\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\0\0" } ; + pub const RABBIT : Self = Self { id : 317 , registry_key : "minecraft:rabbit" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x99>\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\x08\rcooldown_type\0\x03\rcooldown_time\0\x03\tnutrition\x06\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\0" } ; pub const RABBIT_FOOT: Self = Self { id: 567, registry_key: "minecraft:rabbit_foot", @@ -47387,7 +47387,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const RABBIT_STEW : Self = Self { id : 319 , registry_key : "minecraft:rabbit_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\x11using_converts_to\x04bowl\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x19?\x08\rcooldown_type\0\x03\tnutrition\x14\x03\ron_use_action\x01\0\x03\x18minecraft:max_stack_size\x02\x03\x16minecraft:use_duration@\0" } ; + pub const RABBIT_STEW : Self = Self { id : 319 , registry_key : "minecraft:rabbit_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\tnutrition\x14\x03\rcooldown_time\0\x08\x11using_converts_to\x04bowl\x05\x13saturation_modifier\x9A\x99\x19?\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\0\x03\x18minecraft:max_stack_size\x02\x03\x16minecraft:use_duration@\0" } ; pub const RAIL: Self = Self { id: 66, registry_key: "minecraft:rail", @@ -47465,7 +47465,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const RED_BUNDLE : Self = Self { id : 278 , registry_key : "minecraft:red_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\n\x0Fitem_properties\x01\x0Eallow_off_hand\0\x01\x12hidden_in_commands\x02\x01\x04foil\0\x01\x17can_destroy_in_creative\x01\x03\ruse_animation\0\x01\x0Fstacked_by_data\0\x03\x11creative_category\x06\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x14bundle_red_open_back\x08\x07default\nbundle_red\x08\x11bundle_open_front\x15bundle_red_open_front\0\0\x03\x11enchantable_value\0\x01\rhand_equipped\0\x01\x0Eliquid_clipped\0\x01\x0Eshould_despawn\x01\x03\x06damage\0\x03\x0Cuse_duration\0\x08\x0Ecreative_group\0\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x02\x08\x10enchantable_slot\x04none\x05\x0Cmining_speed\0\0\x80?\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\t\titem_tags\0\0\0" } ; + pub const RED_BUNDLE : Self = Self { id : 278 , registry_key : "minecraft:red_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\0\n\x0Fitem_properties\x01\x0Fstacked_by_data\0\x01\x0Eshould_despawn\x01\x01\x04foil\0\x01\x0Eallow_off_hand\0\x01\x12hidden_in_commands\x02\x03\x06damage\0\x05\x0Cmining_speed\0\0\x80?\x01\rhand_equipped\0\x03\x11enchantable_value\0\x08\x0Ecreative_group\0\x03\x0Cuse_duration\0\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x14bundle_red_open_back\x08\x07default\nbundle_red\x08\x11bundle_open_front\x15bundle_red_open_front\0\0\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x02\x08\x10enchantable_slot\x04none\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\x03\ruse_animation\0\x03\x11creative_category\x06\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\0" } ; pub const RED_CANDLE: Self = Self { id: -427, registry_key: "minecraft:red_candle", @@ -47809,7 +47809,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const ROTTEN_FLESH : Self = Self { id : 306 , registry_key : "minecraft:rotten_flesh" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\rcooldown_time\0\x03\ron_use_action\x01\x03\tnutrition\x08\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\x11using_converts_to\0\t\x07effects\n\x02\x08\x04name\x06hunger\x08\rdescriptionId\rpotion.hunger\x05\x06chance\xCD\xCCL?\x03\tamplifier\0\x03\x08duration<\x03\x02id\"\0\0\x03\x16minecraft:use_duration@\0" } ; + pub const ROTTEN_FLESH : Self = Self { id : 306 , registry_key : "minecraft:rotten_flesh" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x08\x11using_converts_to\0\x03\tnutrition\x08\t\x07effects\n\x02\x03\tamplifier\0\x05\x06chance\xCD\xCCL?\x08\rdescriptionId\rpotion.hunger\x03\x02id\"\x03\x08duration<\x08\x04name\x06hunger\0\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\rcooldown_time\0\0\0" } ; pub const SADDLE: Self = Self { id: 403, registry_key: "minecraft:saddle", @@ -47817,7 +47817,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const SALMON : Self = Self { id : 294 , registry_key : "minecraft:salmon" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\x11using_converts_to\0\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\tnutrition\x04\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x08\rcooldown_type\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\0\x03\x16minecraft:use_duration@\x01\x19minecraft:stacked_by_data\x01\0" } ; + pub const SALMON : Self = Self { id : 294 , registry_key : "minecraft:salmon" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x08\rcooldown_type\0\x03\ron_use_action\x01\x08\x11using_converts_to\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\tnutrition\x04\0\x03\x16minecraft:use_duration@\x01\x19minecraft:stacked_by_data\x01\0" } ; pub const SALMON_BUCKET: Self = Self { id: 397, registry_key: "minecraft:salmon_bucket", @@ -48378,7 +48378,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const SPIDER_EYE : Self = Self { id : 307 , registry_key : "minecraft:spider_eye" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x01\x0Ecan_always_eat\0\x08\x11using_converts_to\0\t\x07effects\n\x02\x03\tamplifier\0\x05\x06chance\0\0\x80?\x03\x02id&\x08\x04name\x06poison\x08\rdescriptionId\rpotion.poison\x03\x08duration\n\0\x03\tnutrition\x04\x05\x13saturation_modifier\xCD\xCCL?\x03\ron_use_action\x01\x08\rcooldown_type\0\0\x03\x16minecraft:use_duration@\0" } ; + pub const SPIDER_EYE : Self = Self { id : 307 , registry_key : "minecraft:spider_eye" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x05\x13saturation_modifier\xCD\xCCL?\x08\x11using_converts_to\0\x03\tnutrition\x04\t\x07effects\n\x02\x03\tamplifier\0\x08\rdescriptionId\rpotion.poison\x03\x08duration\n\x03\x02id&\x08\x04name\x06poison\x05\x06chance\0\0\x80?\0\x03\ron_use_action\x01\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\0\x03\x16minecraft:use_duration@\0" } ; pub const SPIDER_SPAWN_EGG: Self = Self { id: 479, registry_key: "minecraft:spider_spawn_egg", @@ -48743,7 +48743,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const STONE_SPEAR : Self = Self { id : 262 , registry_key : "minecraft:stone_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x12minecraft:cooldown\x05\x08duration\0\0@?\x08\x08category\x05spear\x08\x04type\x06attack\0\n\x17minecraft:use_modifiers\x08\x0Bstart_sound\x14item.stone_spear.use\x05\x11movement_modifier\0\0\x80?\x01\x0Femit_vibrations\0\x05\x0Cuse_duration\0\xA0\x8CG\x08\x0Bstart_using\x06always\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x14minecraft:stone_tier\x12minecraft:is_spear\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durability\x84\x02\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x11damage_conditions\x02\x0Cmax_duration\x13\x01\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\0\n\x13dismount_conditions\x05\tmin_speed\0\0PA\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_durationZ\0\0\x05\x0Fdamage_modifier\0\0\0\0\x02\x05delay\x0E\0\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\x02\x0Cmax_duration\xB4\0\0\x05\x11damage_multiplier\x85\xEBQ?\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\0\0\n\x19minecraft:piercing_weapon\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\x05\rhitbox_margin\0\0\x80>\0\n\x10minecraft:damage\x02\x05value\x02\0\0\n\x16minecraft:display_name\x08\x05value\x15item.stone_spear.name\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x05\0\n\x18minecraft:swing_duration\x05\x05value\0\0@?\0\n\x16minecraft:swing_sounds\x08\x0Battack_miss\x1Citem.stone_spear.attack_miss\x08\nattack_hit\x1Bitem.stone_spear.attack_hit\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x15minecraft:stone_spear\0\n\rrepair_amount\x08\nexpression)context.other->query.remaining_durability\x02\x07version\r\0\0\0\n\rrepair_amount\x08\nexpression\x1Bquery.max_durability * 0.25\x02\x07version\r\0\0\t\x05items\n\x02\x08\x04tags,q.all_tags('minecraft:stone_tool_materials')\0\0\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x0Fitem_properties\x01\x04foil\0\x01\x0Fstacked_by_data\0\x01\x0Eshould_despawn\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bstone_spear\0\0\x01\x0Eliquid_clipped\0\x03\x0Cuse_duration\x80\xE4\xAF\x01\x08\x10enchantable_slot\x0Bmelee_spear\x08\x0Ecreative_group\0\x03\x11enchantable_value\n\x01\x12hidden_in_commands\x02\x03\ruse_animation\0\x01\rhand_equipped\x01\x03\x06damage\x04\x03\x11creative_category\x06\x01\x17can_destroy_in_creative\x01\x03\x0Emax_stack_size\x02\x01\x0Eallow_off_hand\0\x05\x0Cmining_speed\0\0\x80?\x03\x0Bframe_count\x02\0\t\titem_tags\x08\x04\x14minecraft:stone_tier\x12minecraft:is_spear\0" } ; + pub const STONE_SPEAR : Self = Self { id : 262 , registry_key : "minecraft:stone_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x19minecraft:piercing_weapon\x05\rhitbox_margin\0\0\x80>\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\n\x17minecraft:use_modifiers\x08\x0Bstart_using\x06always\x08\x0Bstart_sound\x14item.stone_spear.use\x01\x0Femit_vibrations\0\x05\x0Cuse_duration\0\xA0\x8CG\x05\x11movement_modifier\0\0\x80?\0\n\x12minecraft:cooldown\x05\x08duration\0\0@?\x08\x04type\x06attack\x08\x08category\x05spear\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x14minecraft:stone_tier\x12minecraft:is_spear\0\n\x18minecraft:swing_duration\x05\x05value\0\0@?\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x05\rhitbox_margin\0\0\x80>\n\x14knockback_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed33\xA3@\x02\x0Cmax_duration\xB4\0\0\n\x13dismount_conditions\x05\tmin_speed\0\0PA\x05\x12min_relative_speed\0\0\0\0\x02\x0Cmax_durationZ\0\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\n\x11damage_conditions\x02\x0Cmax_duration\x13\x01\x05\x12min_relative_speed33\x93@\x05\tmin_speed\0\0\0\0\0\x05\x0Fdamage_modifier\0\0\0\0\x02\x05delay\x0E\0\x05\x11damage_multiplier\x85\xEBQ?\0\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durability\x84\x02\0\t\titem_tags\x08\x04\x14minecraft:stone_tier\x12minecraft:is_spear\n\x16minecraft:display_name\x08\x05value\x15item.stone_spear.name\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\n\rrepair_amount\x02\x07version\r\0\x08\nexpression)context.other->query.remaining_durability\0\t\x05items\n\x02\x08\x04name\x15minecraft:stone_spear\0\0\t\x05items\n\x02\x08\x04tags,q.all_tags('minecraft:stone_tool_materials')\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression\x1Bquery.max_durability * 0.25\0\0\0\n\x10minecraft:damage\x02\x05value\x02\0\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Bitem.stone_spear.attack_hit\x08\x0Battack_miss\x1Citem.stone_spear.attack_miss\0\n\x0Fitem_properties\x08\x0Ecreative_group\0\x01\x17can_destroy_in_creative\x01\x01\x04foil\0\x01\x0Eliquid_clipped\0\x03\x11enchantable_value\n\x03\x0Emax_stack_size\x02\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x03\x0Bframe_count\x02\x01\x12hidden_in_commands\x02\x01\x0Eallow_off_hand\0\x01\x0Eshould_despawn\x01\x08\x10enchantable_slot\x0Bmelee_spear\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bstone_spear\0\0\x03\x11creative_category\x06\x03\ruse_animation\0\x01\rhand_equipped\x01\x03\x06damage\x04\x03\x0Cuse_duration\x80\xE4\xAF\x01\0\n\x15minecraft:enchantable\x01\x05value\x05\x08\x04slot\x0Bmelee_spear\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\0" } ; pub const STONE_STAIRS: Self = Self { id: 67, registry_key: "minecraft:stone_stairs", @@ -49101,8 +49101,8 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const SUSPICIOUS_STEW : Self = Self { id : 631 , registry_key : "minecraft:suspicious_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\rcooldown_type\0\x01\x0Ecan_always_eat\x01\x03\ron_use_action\x02\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\x9A\x99\x19?\x03\rcooldown_time\0\x03\tnutrition\x0C\x08\x11using_converts_to\x04bowl\0\x03\x18minecraft:max_stack_size\x02\x03\x16minecraft:use_duration@\0" } ; - pub const SWEET_BERRIES : Self = Self { id : 316 , registry_key : "minecraft:sweet_berries" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\x11using_converts_to\0\x08\rcooldown_type\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\tnutrition\x04\x01\x0Ecan_always_eat\0\x05\x13saturation_modifier\x9A\x99\x99>\x03\ron_use_action\x01\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:seed\t\x08plant_at\x08\x14\x08farmland\x05grass\x04dirt\x0Bcoarse_dirt\x06podzol\nmoss_block\x08mycelium\x03mud\x14muddy_mangrove_roots\x0Fdirt_with_roots\x08\x0Bcrop_result\x1Aminecraft:sweet_berry_bush\x08\rplant_at_face\x02up\x01\x1Aplant_at_any_solid_surface\0\0\0" } ; + pub const SUSPICIOUS_STEW : Self = Self { id : 631 , registry_key : "minecraft:suspicious_stew" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x08\rcooldown_type\0\x01\x0Ecan_always_eat\x01\x08\x11using_converts_to\x04bowl\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\rcooldown_time\0\x03\ron_use_action\x02\x05\x13saturation_modifier\x9A\x99\x19?\x03\tnutrition\x0C\0\x03\x18minecraft:max_stack_size\x02\x03\x16minecraft:use_duration@\0" } ; + pub const SWEET_BERRIES : Self = Self { id : 316 , registry_key : "minecraft:sweet_berries" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\ron_use_action\x01\x03\tnutrition\x04\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x08\rcooldown_type\0\x05\x13saturation_modifier\x9A\x99\x99>\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\x08\x11using_converts_to\0\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:seed\x08\x0Bcrop_result\x1Aminecraft:sweet_berry_bush\t\x08plant_at\x08\x14\x08farmland\x05grass\x04dirt\x0Bcoarse_dirt\x06podzol\nmoss_block\x08mycelium\x03mud\x14muddy_mangrove_roots\x0Fdirt_with_roots\x08\rplant_at_face\x02up\x01\x1Aplant_at_any_solid_surface\0\0\0" } ; pub const SWEET_BERRY_BUSH: Self = Self { id: -207, registry_key: "minecraft:sweet_berry_bush", @@ -49201,7 +49201,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const TORCHFLOWER_SEEDS : Self = Self { id : 325 , registry_key : "minecraft:torchflower_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x08\x0Bcrop_result\x1Aminecraft:torchflower_crop\x01\x1Aplant_at_any_solid_surface\0\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\x12minecraft:farmland\0\0" } ; + pub const TORCHFLOWER_SEEDS : Self = Self { id : 325 , registry_key : "minecraft:torchflower_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\x0Bcrop_result\x1Aminecraft:torchflower_crop\x08\rplant_at_face\x02up\0\0" } ; pub const TOTEM_OF_UNDYING: Self = Self { id: 607, registry_key: "minecraft:totem_of_undying", @@ -49230,7 +49230,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const TRIAL_KEY : Self = Self { id : 283 , registry_key : "minecraft:trial_key" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x16minecraft:display_name\x08\x05value\x13item.trial_key.name\0\t\titem_tags\0\0\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x01\rhand_equipped\0\x03\x11creative_category\x08\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\0\x03\ruse_animation\0\x08\x0Ecreative_group\0\x03\x06damage\0\x03\x0Bframe_count\x02\x03\x0Emax_stack_size\x80\x01\x01\x0Fstacked_by_data\0\x01\x04foil\0\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\ttrial_key\0\0\x01\x0Eallow_off_hand\0\x03\x11enchantable_value\0\x08\x10enchantable_slot\x04none\x05\x0Cmining_speed\0\0\x80?\x01\x12hidden_in_commands\x02\0\0" } ; + pub const TRIAL_KEY : Self = Self { id : 283 , registry_key : "minecraft:trial_key" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x16minecraft:display_name\x08\x05value\x13item.trial_key.name\0\t\titem_tags\0\0\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x03\x06damage\0\x03\x11creative_category\x08\x03\x11enchantable_value\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x03\x0Emax_stack_size\x80\x01\x03\x0Cuse_duration\0\x01\x12hidden_in_commands\x02\x01\rhand_equipped\0\x08\x10enchantable_slot\x04none\x03\x0Bframe_count\x02\x03\ruse_animation\0\x01\x04foil\0\x01\x0Eliquid_clipped\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\ttrial_key\0\0\0\0" } ; pub const TRIAL_SPAWNER: Self = Self { id: -315, registry_key: "minecraft:trial_spawner", @@ -49259,7 +49259,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const TROPICAL_FISH : Self = Self { id : 295 , registry_key : "minecraft:tropical_fish" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:food\x03\ron_use_action\x01\x08\rcooldown_type\0\x03\tnutrition\x02\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x05\x13saturation_modifier\xCD\xCC\xCC=\x08\x11using_converts_to\0\x01\x0Ecan_always_eat\0\x03\rcooldown_time\0\0\x03\x16minecraft:use_duration@\x01\x19minecraft:stacked_by_data\x01\0" } ; + pub const TROPICAL_FISH : Self = Self { id : 295 , registry_key : "minecraft:tropical_fish" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\x03\x16minecraft:use_duration@\n\x0Eminecraft:food\x08\rcooldown_type\0\x03\rcooldown_time\0\x08\x11using_converts_to\0\x05\x13saturation_modifier\xCD\xCC\xCC=\x03\ron_use_action\x01\x01\x0Ecan_always_eat\0\t\x0Con_use_range\x05\x06\0\0\0A\0\0\0A\0\0\0A\x03\tnutrition\x02\0\x01\x19minecraft:stacked_by_data\x01\0" } ; pub const TROPICAL_FISH_BUCKET: Self = Self { id: 398, registry_key: "minecraft:tropical_fish_bucket", @@ -50310,8 +50310,8 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const WHEAT_SEEDS : Self = Self { id : 320 , registry_key : "minecraft:wheat_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x08\rplant_at_face\x02up\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\x0Bcrop_result\x0Fminecraft:wheat\x01\x1Aplant_at_any_solid_surface\0\0\0" } ; - pub const WHITE_BUNDLE : Self = Self { id : 279 , registry_key : "minecraft:white_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x0Fitem_properties\x03\x11enchantable_value\0\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x17bundle_white_open_front\x08\x10bundle_open_back\x16bundle_white_open_back\x08\x07default\x0Cbundle_white\0\0\x01\rhand_equipped\0\x01\x0Eallow_off_hand\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Eliquid_clipped\0\x03\x0Bframe_count\x02\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x03\ruse_animation\0\x01\x04foil\0\x03\x0Cuse_duration\0\x03\x06damage\0\x01\x0Fstacked_by_data\0\x03\x0Emax_stack_size\x02\x08\x10enchantable_slot\x04none\x08\x0Ecreative_group\0\x01\x17can_destroy_in_creative\x01\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\x01\x1Aallow_nested_storage_items\x01\t\rallowed_items\0\0\0\0" } ; + pub const WHEAT_SEEDS : Self = Self { id : 320 , registry_key : "minecraft:wheat_seeds" , version : BedrockItemVersion :: Legacy , component_based : false , definition_components : b"\n\0\n\x0Eminecraft:seed\x01\x1Aplant_at_any_solid_surface\0\t\x08plant_at\x08\x02\x12minecraft:farmland\x08\rplant_at_face\x02up\x08\x0Bcrop_result\x0Fminecraft:wheat\0\0" } ; + pub const WHITE_BUNDLE : Self = Self { id : 279 , registry_key : "minecraft:white_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\n\x0Fitem_properties\x03\ruse_animation\0\x03\x11enchantable_value\0\x08\x10enchantable_slot\x04none\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x01\x0Eallow_off_hand\0\x01\x0Eliquid_clipped\0\x03\x0Bframe_count\x02\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x01\x17can_destroy_in_creative\x01\x01\x12hidden_in_commands\x02\n\x0Eminecraft:icon\n\x08textures\x08\x10bundle_open_back\x16bundle_white_open_back\x08\x07default\x0Cbundle_white\x08\x11bundle_open_front\x17bundle_white_open_front\0\0\x01\x0Fstacked_by_data\0\x01\rhand_equipped\0\x08\x0Ecreative_group\0\x03\x0Emax_stack_size\x02\x03\x06damage\0\x03\x0Cuse_duration\0\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\0\t\titem_tags\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\0" } ; pub const WHITE_CANDLE: Self = Self { id: -413, registry_key: "minecraft:white_candle", @@ -50424,7 +50424,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const WIND_CHARGE : Self = Self { id : 284 , registry_key : "minecraft:wind_charge" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x13minecraft:throwable\x01\x12do_swing_animation\x01\x05\x11max_draw_duration\0\0\0\0\x05\x10max_launch_power\0\0\xC0?\x05\x11min_draw_duration\0\0\0\0\x05\x12launch_power_scale\0\0\xC0?\x01\x1Cscale_power_by_draw_duration\0\0\n\x16minecraft:display_name\x08\x05value\x15item.wind_charge.name\0\t\titem_tags\0\0\n\x12minecraft:cooldown\x05\x08duration\0\0\0?\x08\x08category\x0Bwind_charge\x08\x04type\x03use\0\n\x0Fitem_properties\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bwind_charge\0\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Eallow_off_hand\0\x08\x0Ecreative_group\0\x01\x12hidden_in_commands\x02\x03\x0Cuse_duration\0\x01\x0Eshould_despawn\x01\x03\x06damage\0\x08\x10enchantable_slot\x04none\x03\x11enchantable_value\0\x01\rhand_equipped\0\x01\x0Fstacked_by_data\0\x01\x17can_destroy_in_creative\x01\x03\x0Emax_stack_size\x80\x01\x01\x0Eliquid_clipped\0\x03\x0Bframe_count\x02\x03\ruse_animation\0\x01\x04foil\0\x03\x11creative_category\x06\0\n\x14minecraft:projectile\x05\x16minimum_critical_power\0\0\0\0\x08\x11projectile_entity\"minecraft:wind_charge_projectile<>\0\0" } ; + pub const WIND_CHARGE : Self = Self { id : 284 , registry_key : "minecraft:wind_charge" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\t\titem_tags\0\0\n\x0Fitem_properties\x05\x0Cmining_speed\0\0\x80?\x03\x06damage\0\x01\x0Eshould_despawn\x01\x01\x17can_destroy_in_creative\x01\x03\x11enchantable_value\0\x01\x0Eallow_off_hand\0\x08\x10enchantable_slot\x04none\x03\x0Bframe_count\x02\x01\rhand_equipped\0\x01\x12hidden_in_commands\x02\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x80\x01\x01\x0Fstacked_by_data\0\x08\x0Ecreative_group\0\x01\x04foil\0\x03\x11creative_category\x06\n\x0Eminecraft:icon\n\x08textures\x08\x07default\x0Bwind_charge\0\0\x03\ruse_animation\0\x03\x0Cuse_duration\0\0\n\x12minecraft:cooldown\x08\x08category\x0Bwind_charge\x08\x04type\x03use\x05\x08duration\0\0\0?\0\n\x16minecraft:display_name\x08\x05value\x15item.wind_charge.name\0\n\x14minecraft:projectile\x05\x16minimum_critical_power\0\0\0\0\x08\x11projectile_entity\"minecraft:wind_charge_projectile<>\0\n\x13minecraft:throwable\x05\x11max_draw_duration\0\0\0\0\x01\x12do_swing_animation\x01\x05\x12launch_power_scale\0\0\xC0?\x05\x10max_launch_power\0\0\xC0?\x01\x1Cscale_power_by_draw_duration\0\x05\x11min_draw_duration\0\0\0\0\0\0" } ; pub const WITCH_SPAWN_EGG: Self = Self { id: 485, registry_key: "minecraft:witch_spawn_egg", @@ -50537,7 +50537,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const WOODEN_SPEAR : Self = Self { id : 263 , registry_key : "minecraft:wooden_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x16minecraft:display_name\x08\x05value\x16item.wooden_spear.name\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03min\0\x03\x03max\xC8\x01\0\x03\x0Emax_durabilityx\0\n\x0Eminecraft:fuel\x05\x08duration\0\0 A\0\n\x10minecraft:damage\x02\x05value\x01\0\0\n\x18minecraft:swing_duration\x05\x05valueff&?\0\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x0F\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\n\x11damage_conditions\x02\x0Cmax_duration,\x01\x05\tmin_speed\0\0\0\0\x05\x12min_relative_speed33\x93@\0\n\x13dismount_conditions\x05\x12min_relative_speed\0\0\0\0\x05\tmin_speed\0\0`A\x02\x0Cmax_durationd\0\0\n\x14knockback_conditions\x02\x0Cmax_duration\xC8\0\x05\tmin_speed33\xA3@\x05\x12min_relative_speed\0\0\0\0\0\x05\rhitbox_margin\0\0\x80>\x05\x11damage_multiplier333?\x02\x05delay\x0F\0\x05\x0Fdamage_modifier\0\0\0\0\n\x0Ecreative_reach\x05\x03min\0\0\0@\x05\x03max\0\0\xF0@\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\0\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:wooden_tier\x12minecraft:is_spear\0\n\x17minecraft:use_modifiers\x08\x0Bstart_using\x06always\x05\x0Cuse_duration\0\xA0\x8CG\x08\x0Bstart_sound\x15item.wooden_spear.use\x05\x11movement_modifier\0\0\x80?\x01\x0Femit_vibrations\0\0\n\x19minecraft:piercing_weapon\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03max\0\0\x90@\x05\x03min\0\0\0@\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\n\x12minecraft:cooldown\x05\x08durationff&?\x08\x04type\x06attack\x08\x08category\x05spear\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x16minecraft:swing_sounds\x08\x0Battack_miss\x1Ditem.wooden_spear.attack_miss\x08\nattack_hit\x1Citem.wooden_spear.attack_hit\0\t\titem_tags\x08\x04\x15minecraft:wooden_tier\x12minecraft:is_spear\n\x0Fitem_properties\x01\x17can_destroy_in_creative\x01\x08\x10enchantable_slot\x0Bmelee_spear\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\x80\xE4\xAF\x01\n\x0Eminecraft:icon\n\x08textures\x08\x07default\nwood_spear\0\0\x03\x06damage\x02\x01\rhand_equipped\x01\x03\x0Bframe_count\x02\x08\x0Ecreative_group\0\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\x01\x04foil\0\x01\x12hidden_in_commands\x02\x01\x0Eallow_off_hand\0\x01\x0Fstacked_by_data\0\x03\ruse_animation\0\x03\x11creative_category\x06\x05\x0Cmining_speed\0\0\x80?\x03\x11enchantable_value\x1E\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\n\rrepair_amount\x08\nexpression)context.other->query.remaining_durability\x02\x07version\r\0\0\t\x05items\n\x02\x08\x04name\x16minecraft:wooden_spear\0\0\t\x05items\n\x02\x08\x04tags\x1Eq.all_tags('minecraft:planks')\0\n\rrepair_amount\x08\nexpression\x1Bquery.max_durability * 0.25\x02\x07version\r\0\0\0\0\0" } ; + pub const WOODEN_SPEAR : Self = Self { id : 263 , registry_key : "minecraft:wooden_spear" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x18minecraft:swing_duration\x05\x05valueff&?\0\n\x16minecraft:swing_sounds\x08\nattack_hit\x1Citem.wooden_spear.attack_hit\x08\x0Battack_miss\x1Ditem.wooden_spear.attack_miss\0\n\x17minecraft:hand_equipped\x01\x05value\x01\0\n\x18minecraft:kinetic_weapon\n\x18minecraft:kinetic_weapon\x05\rhitbox_margin\0\0\x80>\n\x13dismount_conditions\x05\tmin_speed\0\0`A\x02\x0Cmax_durationd\0\x05\x12min_relative_speed\0\0\0\0\0\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\n\x11damage_conditions\x02\x0Cmax_duration,\x01\x05\tmin_speed\0\0\0\0\x05\x12min_relative_speed33\x93@\0\n\x14knockback_conditions\x02\x0Cmax_duration\xC8\0\x05\tmin_speed33\xA3@\x05\x12min_relative_speed\0\0\0\0\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\x02\x05delay\x0F\0\x05\x0Fdamage_modifier\0\0\0\0\x05\x11damage_multiplier333?\0\0\t\titem_tags\x08\x04\x15minecraft:wooden_tier\x12minecraft:is_spear\n\x15minecraft:enchantable\x08\x04slot\x0Bmelee_spear\x01\x05value\x0F\0\n\x0Eminecraft:tags\t\x04tags\x08\x04\x15minecraft:wooden_tier\x12minecraft:is_spear\0\n\x12minecraft:cooldown\x05\x08durationff&?\x08\x04type\x06attack\x08\x08category\x05spear\0\n\x0Eminecraft:fuel\x05\x08duration\0\0 A\0\n\x10minecraft:damage\x02\x05value\x01\0\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x19minecraft:piercing_weapon\x05\rhitbox_margin\0\0\x80>\n\x05reach\x05\x03min\0\0\0@\x05\x03max\0\0\x90@\0\n\x0Ecreative_reach\x05\x03max\0\0\xF0@\x05\x03min\0\0\0@\0\0\n\x0Fitem_properties\x01\x12hidden_in_commands\x02\x08\x0Ecreative_group\0\x03\x11creative_category\x06\x01\x0Eallow_off_hand\0\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Eshould_despawn\x01\x03\x0Emax_stack_size\x02\n\x0Eminecraft:icon\n\x08textures\x08\x07default\nwood_spear\0\0\x03\ruse_animation\0\x01\x0Eliquid_clipped\0\x01\x17can_destroy_in_creative\x01\x03\x11enchantable_value\x1E\x03\x06damage\x02\x03\x0Bframe_count\x02\x08\x10enchantable_slot\x0Bmelee_spear\x01\x0Fstacked_by_data\0\x01\rhand_equipped\x01\x03\x0Cuse_duration\x80\xE4\xAF\x01\0\n\x14minecraft:durability\n\rdamage_chance\x03\x03max\xC8\x01\x03\x03min\0\0\x03\x0Emax_durabilityx\0\n\x16minecraft:display_name\x08\x05value\x16item.wooden_spear.name\0\n\x14minecraft:repairable\t\x0Crepair_items\n\x04\t\x05items\n\x02\x08\x04name\x16minecraft:wooden_spear\0\n\rrepair_amount\x08\nexpression)context.other->query.remaining_durability\x02\x07version\r\0\0\0\n\rrepair_amount\x02\x07version\r\0\x08\nexpression\x1Bquery.max_durability * 0.25\0\t\x05items\n\x02\x08\x04tags\x1Eq.all_tags('minecraft:planks')\0\0\0\n\x17minecraft:use_modifiers\x05\x11movement_modifier\0\0\x80?\x08\x0Bstart_using\x06always\x08\x0Bstart_sound\x15item.wooden_spear.use\x05\x0Cuse_duration\0\xA0\x8CG\x01\x0Femit_vibrations\0\0\0" } ; pub const WOODEN_SWORD: Self = Self { id: 339, registry_key: "minecraft:wooden_sword", @@ -50566,7 +50566,7 @@ impl BedrockItem { component_based: false, definition_components: b"\n\0\0", }; - pub const YELLOW_BUNDLE : Self = Self { id : 280 , registry_key : "minecraft:yellow_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n\x0Fitem_properties\x03\x11creative_category\x06\x01\x17can_destroy_in_creative\x01\x08\x0Ecreative_group\0\x08\x10enchantable_slot\x04none\x01\x0Eshould_despawn\x01\x03\x0Cuse_duration\0\x01\x0Eallow_off_hand\0\x01\x0Fstacked_by_data\0\x01\x12hidden_in_commands\x02\x01\rhand_equipped\0\x03\ruse_animation\0\x03\x0Bframe_count\x02\x03\x06damage\0\x03\x11enchantable_value\0\x01\x0Eliquid_clipped\0\x03\x0Emax_stack_size\x02\x01\x04foil\0\n\x0Eminecraft:icon\n\x08textures\x08\x07default\rbundle_yellow\x08\x11bundle_open_front\x18bundle_yellow_open_front\x08\x10bundle_open_back\x17bundle_yellow_open_back\0\0\x05\x0Cmining_speed\0\0\x80?\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\t\titem_tags\0\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x16minecraft:storage_item\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\x03\tmax_slots\x80\x01\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\0\0" } ; + pub const YELLOW_BUNDLE : Self = Self { id : 280 , registry_key : "minecraft:yellow_bundle" , version : BedrockItemVersion :: DataDriven , component_based : true , definition_components : b"\n\0\n!minecraft:storage_weight_modifier\x03\x16weight_in_storage_item\x08\0\t\titem_tags\0\0\n\x1Eminecraft:storage_weight_limit\x03\x10max_weight_limit\x80\x01\0\n\x0Fitem_properties\x08\x10enchantable_slot\x04none\x03\ruse_animation\0\x03\x11creative_category\x06\x01\x0Eshould_despawn\x01\x03\x0Bframe_count\x02\x03\x0Cuse_duration\0\x01\x0Eallow_off_hand\0\n\x0Eminecraft:icon\n\x08textures\x08\x11bundle_open_front\x18bundle_yellow_open_front\x08\x10bundle_open_back\x17bundle_yellow_open_back\x08\x07default\rbundle_yellow\0\0\x03\x11enchantable_value\0\x01\rhand_equipped\0\x01\x04foil\0\x05\x0Cmining_speed\0\0\x80?\x01\x0Fstacked_by_data\0\x01\x0Eliquid_clipped\0\x03\x06damage\0\x01\x17can_destroy_in_creative\x01\x08\x0Ecreative_group\0\x03\x0Emax_stack_size\x02\x01\x12hidden_in_commands\x02\0\n\x18minecraft:max_stack_size\x01\x05value\x01\0\n\x1Cminecraft:bundle_interaction\x03\x12num_viewable_slots\x18\0\n\x16minecraft:storage_item\t\rallowed_items\0\0\x01\x1Aallow_nested_storage_items\x01\x03\tmax_slots\x80\x01\t\x0Cbanned_items\n\x04\x08\x04name\x15minecraft:shulker_box\0\x08\x04name\x1Cminecraft:undyed_shulker_box\0\0\0" } ; pub const YELLOW_CANDLE: Self = Self { id: -417, registry_key: "minecraft:yellow_candle", diff --git a/pumpkin-data/src/generated/placed_features_generated.rs b/pumpkin-data/src/generated/placed_features_generated.rs index a62140471..ddc832543 100644 --- a/pumpkin-data/src/generated/placed_features_generated.rs +++ b/pumpkin-data/src/generated/placed_features_generated.rs @@ -1,5 +1,5 @@ /* This file is generated. Do not edit manually. */ -#[allow(clippy::all, unused_imports, dead_code)] +#[allow(clippy::all, unused_imports, dead_code, clippy::too_many_lines)] fn build_placed_features() -> std::collections::HashMap { use crate::block::BlockStateCodec; @@ -93,9 +93,9 @@ fn build_placed_features() ), placement: vec![ PlacementModifier::NoiseBasedCount(NoiseBasedCountPlacementModifier { - noise_to_count_ratio: 160i32, - noise_factor: 80f64, - noise_offset: 0.3f64, + to_count_ratio: 160i32, + factor: 80f64, + offset: 0.3f64, }), PlacementModifier::InSquare(SquarePlacementModifier), PlacementModifier::Heightmap(HeightmapPlacementModifier { @@ -1943,9 +1943,9 @@ fn build_placed_features() feature: Feature::Named(pumpkin_data::configured_feature::ConfiguredFeature::Kelp), placement: vec![ PlacementModifier::NoiseBasedCount(NoiseBasedCountPlacementModifier { - noise_to_count_ratio: 120i32, - noise_factor: 80f64, - noise_offset: 0f64, + to_count_ratio: 120i32, + factor: 80f64, + offset: 0f64, }), PlacementModifier::InSquare(SquarePlacementModifier), PlacementModifier::Heightmap(HeightmapPlacementModifier { @@ -1961,9 +1961,9 @@ fn build_placed_features() feature: Feature::Named(pumpkin_data::configured_feature::ConfiguredFeature::Kelp), placement: vec![ PlacementModifier::NoiseBasedCount(NoiseBasedCountPlacementModifier { - noise_to_count_ratio: 80i32, - noise_factor: 80f64, - noise_offset: 0f64, + to_count_ratio: 80i32, + factor: 80f64, + offset: 0f64, }), PlacementModifier::InSquare(SquarePlacementModifier), PlacementModifier::Heightmap(HeightmapPlacementModifier { @@ -7587,9 +7587,9 @@ fn build_placed_features() ), placement: vec![ PlacementModifier::NoiseBasedCount(NoiseBasedCountPlacementModifier { - noise_to_count_ratio: 20i32, - noise_factor: 400f64, - noise_offset: 0f64, + to_count_ratio: 20i32, + factor: 400f64, + offset: 0f64, }), PlacementModifier::InSquare(SquarePlacementModifier), PlacementModifier::Heightmap(HeightmapPlacementModifier { diff --git a/pumpkin-world/Cargo.toml b/pumpkin-world/Cargo.toml index eb309f626..f0115e552 100644 --- a/pumpkin-world/Cargo.toml +++ b/pumpkin-world/Cargo.toml @@ -85,8 +85,8 @@ name = "noise_router" harness = false -# [lints] -# workspace = true +[lints] +workspace = true [package.metadata.cargo-machete] ignored = ["serde_json"] diff --git a/pumpkin-world/benches/chunk_gen_concurrent.rs b/pumpkin-world/benches/chunk_gen_concurrent.rs index 02aa3c753..473b4ce9a 100644 --- a/pumpkin-world/benches/chunk_gen_concurrent.rs +++ b/pumpkin-world/benches/chunk_gen_concurrent.rs @@ -54,8 +54,8 @@ impl WorldPortalExt for BlockRegistry { } } -/// Benchmarks the full pipeline for a GRID_SIZE^2 chunks grid running in parallel -/// across THREAD_COUNT rayon threads. +/// Benchmarks the full pipeline for a `GRID_SIZE^2` chunks grid running in parallel +/// across `THREAD_COUNT` rayon threads. fn bench_concurrent_chunk_generation(c: &mut Criterion) { let pool = rayon::ThreadPoolBuilder::new() .num_threads(THREAD_COUNT) diff --git a/pumpkin-world/build.rs b/pumpkin-world/build.rs index 0b4ac8bde..1f48e1588 100644 --- a/pumpkin-world/build.rs +++ b/pumpkin-world/build.rs @@ -1,4 +1,5 @@ use std::env; +use std::fmt::Write; use std::fs; use std::path::Path; @@ -7,16 +8,32 @@ fn main() { let dest_path = Path::new(&out_dir).join("template_embeddings.rs"); let mut code = String::from( - "pub fn get_template_bytes(path: &str) -> Option<&'static [u8]> {\n match path {\n", + " + #[allow(clippy::too_many_lines)] + #[allow(clippy::match_same_arms)] + #[must_use] + pub fn get_template_bytes(path: &str) -> Option<&'static [u8]> {\n match path {\n", ); let mut pool_code = String::from( - "pub fn get_pool_elements(pool_id: &str) -> Option<&'static [&'static str]> {\n match pool_id {\n", + " + #[allow(clippy::too_many_lines)] + #[allow(clippy::match_same_arms)] + #[must_use] + pub fn get_pool_elements(pool_id: &str) -> Option<&'static [&'static str]> {\n match pool_id {\n", ); let mut template_pool_json_code = String::from( - "pub fn get_template_pool_json(path: &str) -> Option<&'static str> {\n match path {\n", + " + #[allow(clippy::too_many_lines)] + #[allow(clippy::match_same_arms)] + #[must_use] + pub fn get_template_pool_json(path: &str) -> Option<&'static str> {\n match path {\n", ); let mut processor_list_json_code = String::from( - "pub fn get_processor_list_json(path: &str) -> Option<&'static str> {\n match path {\n", + " + #[allow(clippy::too_many_lines)] + #[allow(clippy::match_same_arms)] + #[must_use] + pub fn get_processor_list_json(path: &str) -> Option<&'static str> {\n match path {\n", ); let manifest_dir = env::var("CARGO_MANIFEST_DIR").unwrap(); @@ -26,11 +43,12 @@ fn main() { process_dir(&assets_dir, "", &mut code, &mut pools); for (pool_id, elements) in pools { - pool_code.push_str(&format!( - " \"minecraft:{pool_id}\" | \"{pool_id}\" => Some(&[\n" - )); + let _ = writeln!( + pool_code, + " \"minecraft:{pool_id}\" | \"{pool_id}\" => Some(&[" + ); for element in elements { - pool_code.push_str(&format!(" \"{element}\",\n")); + let _ = writeln!(pool_code, " \"{element}\","); } pool_code.push_str(" ]),\n"); } @@ -85,14 +103,24 @@ fn process_dir( format!("{prefix}/{name}") }; process_dir(&path, &new_prefix, code, pools); - } else if name.ends_with(".nbt") { - let template_name = format!("{}/{}", prefix, name.strip_suffix(".nbt").unwrap()); + } else if path + .extension() + .and_then(|s| s.to_str()) + .is_some_and(|ext| ext.eq_ignore_ascii_case("nbt")) + { + let stem = path.file_stem().unwrap().to_string_lossy(); + let template_name = if prefix.is_empty() { + stem.to_string() + } else { + format!("{prefix}/{stem}") + }; let abs_path = path.canonicalize().unwrap(); - code.push_str(&format!( - " \"{}\" => Some(include_bytes!(r#\"{}\"#)),\n", - template_name, - abs_path.display() - )); + let _ = writeln!( + code, + " \"{template_name}\" => Some(include_bytes!(r#\"{abs}\"#)),", + template_name = template_name, + abs = abs_path.display() + ); if !prefix.is_empty() { pools @@ -132,10 +160,12 @@ fn process_json_dir(dir: &Path, prefix: &str, code: &mut String) { format!("{prefix}/{stem}") }; let abs_path = path.canonicalize().unwrap(); - code.push_str(&format!( - " \"minecraft:{id}\" | \"{id}\" => Some(include_str!(r#\"{}\"#)),\n", - abs_path.display() - )); + let _ = writeln!( + code, + " \"minecraft:{id}\" | \"{id}\" => Some(include_str!(r#\"{abs}\"#)),", + id = id, + abs = abs_path.display() + ); } } } diff --git a/pumpkin-world/src/biome/mod.rs b/pumpkin-world/src/biome/mod.rs index 50336eb4f..26683c9fe 100644 --- a/pumpkin-world/src/biome/mod.rs +++ b/pumpkin-world/src/biome/mod.rs @@ -79,10 +79,12 @@ mod test { #[test] fn wide_area_surface() { + use crate::generation::generator::{GeneratorInit, VanillaGenerator}; use crate::generation::noise::router::multi_noise_sampler::{ MultiNoiseSampler, MultiNoiseSamplerBuilderOptions, }; use crate::generation::{biome_coords, positions::chunk_pos}; + use pumpkin_util::world_seed::Seed; #[derive(Deserialize)] struct BiomeData { x: i32, @@ -94,8 +96,6 @@ mod test { read_data_from_file!("../../assets/biome_no_blend_no_beard_0.json"); let seed = 0; - use crate::generation::generator::{GeneratorInit, VanillaGenerator}; - use pumpkin_util::world_seed::Seed; let generator = VanillaGenerator::new(Seed(seed as u64), Dimension::OVERWORLD); for data in expected_data { diff --git a/pumpkin-world/src/block/mod.rs b/pumpkin-world/src/block/mod.rs index 1c373e408..320718cff 100644 --- a/pumpkin-world/src/block/mod.rs +++ b/pumpkin-world/src/block/mod.rs @@ -50,9 +50,8 @@ impl BlockStateCodec { pub fn get_state_id(&self) -> BlockStateId { let block = self.name; - let properties_map = match &self.properties { - Some(map) => map, - None => return block.default_state.id, + let Some(properties_map) = &self.properties else { + return block.default_state.id; }; let props_iter = properties_map diff --git a/pumpkin-world/src/chunk/format/anvil.rs b/pumpkin-world/src/chunk/format/anvil.rs index 1bc5f8793..282e27b8e 100644 --- a/pumpkin-world/src/chunk/format/anvil.rs +++ b/pumpkin-world/src/chunk/format/anvil.rs @@ -124,7 +124,7 @@ impl Compression { const LZ4_ID: u8 = 4; const CUSTOM_ID: u8 = 127; - fn decompress_data(&self, compressed_data: &[u8]) -> Result, CompressionError> { + fn decompress_data(self, compressed_data: &[u8]) -> Result, CompressionError> { fn decode(mut reader: R, capacity: usize) -> std::io::Result> { let mut buf = Vec::with_capacity(capacity); reader.read_to_end(&mut buf)?; @@ -149,7 +149,7 @@ impl Compression { const LZ4_COMPRESSION_LEVEL_BASE: u32 = 10; fn compress_data( - &self, + self, uncompressed_data: &[u8], compression_level: u32, ) -> Result, CompressionError> { @@ -491,6 +491,7 @@ impl AnvilChunkFile { } } +#[expect(clippy::large_stack_arrays)] impl Default for AnvilChunkFile { fn default() -> Self { Self { @@ -498,7 +499,7 @@ impl Default for AnvilChunkFile { write_action: Mutex::new(WriteAction::Pass), // Two sectors for offset + timestamp end_sector: 2, - _dummy: Default::default(), + _dummy: PhantomData, } } } @@ -606,6 +607,7 @@ impl ChunkSerializer for AnvilChunkFile { Ok(chunk_file) } + #[expect(clippy::too_many_lines)] async fn update_chunk( &mut self, chunk: &Self::Data, diff --git a/pumpkin-world/src/chunk/format/linear.rs b/pumpkin-world/src/chunk/format/linear.rs index 8cc17c63a..0b190a115 100644 --- a/pumpkin-world/src/chunk/format/linear.rs +++ b/pumpkin-world/src/chunk/format/linear.rs @@ -309,6 +309,7 @@ pub struct LinearV2File { _dummy: PhantomData, } +#[expect(clippy::large_stack_arrays)] impl Default for LinearV2File { fn default() -> Self { Self { @@ -448,6 +449,7 @@ impl ChunkSerializer for LinearV2File { Ok(()) } + #[expect(clippy::large_stack_arrays)] fn read(raw_file: Bytes) -> Result { let mut buf = raw_file; @@ -471,7 +473,7 @@ impl ChunkSerializer for LinearV2File { // the per-chunk size field inside each bucket. let mut bitmap_raw = [0u8; ChunkBitmap::SIZE]; bitmap_raw.copy_from_slice(&buf.split_to(ChunkBitmap::SIZE)); - let _bitmap = ChunkBitmap(bitmap_raw); + //let _bitmap = ChunkBitmap(bitmap_raw); let _features = NbtFeatures::from_bytes(&mut buf)?; @@ -581,13 +583,13 @@ impl ChunkSerializer for LinearV2File { for chunk in chunks { let index = Self::get_chunk_index(chunk.x, chunk.y); - let result = match &self.chunks_data[index] { - Some(data) => match S::from_bytes(data, chunk) { + let result = self.chunks_data[index].as_ref().map_or_else( + || LoadedData::Missing(chunk), + |data| match S::from_bytes(data, chunk) { Ok(c) => LoadedData::Loaded(c), Err(err) => LoadedData::Error((chunk, err)), }, - None => LoadedData::Missing(chunk), - }; + ); if stream.send(result).await.is_err() { // Receiver dropped — stop early to avoid unnecessary work. diff --git a/pumpkin-world/src/chunk/format/mod.rs b/pumpkin-world/src/chunk/format/mod.rs index 61c2e2c58..04b79195f 100644 --- a/pumpkin-world/src/chunk/format/mod.rs +++ b/pumpkin-world/src/chunk/format/mod.rs @@ -45,7 +45,7 @@ impl SingleChunkDataSerializer for ChunkData { fn to_bytes( &self, ) -> Pin> + Send + '_>> { - Box::pin(async move { self.internal_to_bytes().await }) + Box::pin(async move { self.internal_to_bytes() }) } #[inline] @@ -173,7 +173,14 @@ impl ChunkData { }) } - async fn internal_to_bytes(&self) -> Result { + fn internal_to_bytes(&self) -> Result { + fn extract_light_ref(light: Option<&LightContainer>) -> Option<&[u8]> { + match light { + Some(LightContainer::Full(data)) => Some(data.as_ref()), + _ => None, + } + } + let is_light_correct = self .light_populated .load(std::sync::atomic::Ordering::Relaxed); @@ -183,13 +190,6 @@ impl ChunkData { entities_guard.values().cloned().collect::>() }; - fn extract_light_ref(light: Option<&LightContainer>) -> Option<&[u8]> { - match light { - Some(LightContainer::Full(data)) => Some(data.as_ref()), - _ => None, - } - } - let light_lock = self.light_engine.lock().unwrap(); let heightmap_lock = self.heightmap.lock().unwrap(); let block_lock = self.section.block_sections.read().unwrap(); diff --git a/pumpkin-world/src/chunk/format/pump.rs b/pumpkin-world/src/chunk/format/pump.rs index f2b590181..2110357d7 100644 --- a/pumpkin-world/src/chunk/format/pump.rs +++ b/pumpkin-world/src/chunk/format/pump.rs @@ -183,7 +183,7 @@ mod tests { Box::pin(async move { Ok(bytes) }) } fn from_bytes(bytes: &Bytes, pos: Vector2) -> Result { - let mut mock: MockChunk = pumpkin_nbt::from_bytes_unnamed(std::io::Cursor::new(bytes)) + let mut mock: Self = pumpkin_nbt::from_bytes_unnamed(std::io::Cursor::new(bytes)) .map_err(|e| { ChunkReadingError::ParsingError( crate::chunk::ChunkParsingError::ErrorDeserializingChunk(e.to_string()), @@ -199,7 +199,7 @@ mod tests { } #[tokio::test] - async fn test_pump_file_roundtrip() { + async fn pump_file_roundtrip() { let temp_dir = TempDir::new().unwrap(); let file_path = temp_dir.child("r.0.0.pump"); diff --git a/pumpkin-world/src/chunk/io/file_manager.rs b/pumpkin-world/src/chunk/io/file_manager.rs index 6e120c52a..02867cd01 100644 --- a/pumpkin-world/src/chunk/io/file_manager.rs +++ b/pumpkin-world/src/chunk/io/file_manager.rs @@ -79,12 +79,10 @@ impl> ChunkSerializerLazyLoader { if Arc::strong_count(loader) > 1 { return false; } - match loader.internal.get() { - // The loader holds 1 strong count; anything above that means - // a read/write guard is still live somewhere. - Some(arc) => Arc::strong_count(arc) == 1, - None => true, - } + loader + .internal + .get() + .is_none_or(|arc| Arc::strong_count(arc) == 1) } /// Returns the serializer, initialising it from disk on the first call. diff --git a/pumpkin-world/src/chunk/mod.rs b/pumpkin-world/src/chunk/mod.rs index 867cb2fd4..837aed36c 100644 --- a/pumpkin-world/src/chunk/mod.rs +++ b/pumpkin-world/src/chunk/mod.rs @@ -129,7 +129,7 @@ impl ChunkSections { .read() .unwrap() .iter() - .flat_map(|section| section.iter().copied()) + .flat_map(|section| section.iter()) .collect() } @@ -140,7 +140,7 @@ impl ChunkSections { .read() .unwrap() .iter() - .flat_map(|section| section.iter().copied()) + .flat_map(|section| section.iter()) .collect() } } @@ -815,7 +815,7 @@ mod tests { assert_eq!(cache[0].random_ticking_block_count, 1); assert_eq!(cache[0].random_ticking_fluid_count, 0); assert!(cache[0].is_randomly_ticking()); - } + }; sections.set_block_absolute_y(0, min_y, 0, Block::STONE.default_state.id); { @@ -824,7 +824,7 @@ mod tests { assert_eq!(cache[0].random_ticking_block_count, 0); assert_eq!(cache[0].random_ticking_fluid_count, 0); assert!(!cache[0].is_randomly_ticking()); - } + }; sections.set_block_absolute_y(0, min_y, 0, Block::LAVA.default_state.id); { @@ -836,7 +836,7 @@ mod tests { } #[test] - fn test_heightmap_is_opaque() { + fn heightmap_is_opaque() { use crate::chunk::ChunkHeightmapType; let air = Block::AIR.default_state; diff --git a/pumpkin-world/src/chunk/palette.rs b/pumpkin-world/src/chunk/palette.rs index df32cae98..c4d86bc82 100644 --- a/pumpkin-world/src/chunk/palette.rs +++ b/pumpkin-world/src/chunk/palette.rs @@ -1,4 +1,4 @@ -use std::{collections::HashMap, hash::Hash, iter::repeat_n}; +use std::{collections::HashMap, hash::Hash}; use pumpkin_data::{ BlockState, BlockStateId, @@ -380,17 +380,21 @@ impl PalettedContainer } } - pub fn iter(&self) -> Box + '_> { + pub fn iter(&self) -> Box + '_> { match self { - Self::Homogeneous(registry_id) => Box::new(repeat_n(registry_id, Self::VOLUME)), + Self::Homogeneous(registry_id) => { + Box::new(std::iter::repeat_n(*registry_id, Self::VOLUME)) + } Self::Heterogeneous(data) => match &data.storage { - PaletteStorage::Dense(cube) => Box::new(cube.as_flattened().as_flattened().iter()), + PaletteStorage::Dense(cube) => { + Box::new(cube.as_flattened().as_flattened().iter().copied()) + } PaletteStorage::Indexed(indices) => Box::new( indices .as_flattened() .as_flattened() .iter() - .map(|&idx| &data.palette[idx as usize]), + .map(|&idx| data.palette[idx as usize]), ), }, } @@ -404,6 +408,34 @@ impl PalettedContainer } } +impl<'a, V: Hash + Eq + Copy + Default, const DIM: usize> IntoIterator + for &'a PalettedContainer +{ + type Item = V; + type IntoIter = Box + 'a>; + + fn into_iter(self) -> Self::IntoIter { + match self { + PalettedContainer::Homogeneous(registry_id) => Box::new(std::iter::repeat_n( + *registry_id, + PalettedContainer::::VOLUME, + )), + PalettedContainer::Heterogeneous(data) => match &data.storage { + PaletteStorage::Dense(cube) => { + Box::new(cube.as_flattened().as_flattened().iter().copied()) + } + PaletteStorage::Indexed(indices) => Box::new( + indices + .as_flattened() + .as_flattened() + .iter() + .map(|&idx| data.palette[idx as usize]), + ), + }, + } + } +} + impl Default for PalettedContainer { fn default() -> Self { Self::Homogeneous(V::default()) diff --git a/pumpkin-world/src/chunk_system/chunk_loading.rs b/pumpkin-world/src/chunk_system/chunk_loading.rs index e4da1cbac..42e547040 100644 --- a/pumpkin-world/src/chunk_system/chunk_loading.rs +++ b/pumpkin-world/src/chunk_system/chunk_loading.rs @@ -4,6 +4,7 @@ use itertools::Itertools; use std::cmp::{Ordering, PartialEq, min}; use std::collections::BinaryHeap; use std::collections::hash_map::Entry; +use std::fmt::Write; use std::mem::swap; use std::sync::Arc; use tracing::debug; @@ -38,6 +39,7 @@ impl From for (ChunkPos, i8) { struct LevelCache(i32, i32, usize, [(i8, i8); 256 * 256]); +#[expect(clippy::large_stack_arrays)] impl LevelCache { const fn new() -> Self { Self(0, 0, 0, [(0, 0); 256 * 256]) @@ -176,22 +178,21 @@ impl ChunkLoading { let mut header = "X/Y".to_string(); for y in sy..=ty { - header.push_str(&format!("{y:4}")); + let _ = write!(header, "{y:4}"); } let grid: String = (sx..=tx) .map(|x| { let mut row = format!("{x:3}"); - row.push_str( - &(sy..=ty) - .map(|y| { - format!( - "{:4}", - map.get(&ChunkPos::new(x, y)).unwrap_or(&Self::MAX_LEVEL) - ) - }) - .collect::(), - ); + let mut cols = String::new(); + for y in sy..=ty { + let _ = write!( + cols, + "{:4}", + map.get(&ChunkPos::new(x, y)).unwrap_or(&Self::MAX_LEVEL) + ); + } + row.push_str(&cols); row }) .collect::>() @@ -393,6 +394,7 @@ impl ChunkLoading { } #[test] +#[expect(clippy::print_stdout)] fn test() { let mut a = ChunkLoading::new(Arc::new(LevelChannel::new())); @@ -426,24 +428,20 @@ fn test() { { let mut header = "X/Y".to_string(); for y in sy..=ty { - header.push_str(&format!("{y:4}")); + let _ = write!(header, "{y:4}"); } let grid: String = (sx..=tx) .map(|x| { let mut row = format!("{x:3}"); - row.push_str( - &(sy..=ty) - .map(|y| { - format!( - "{:4}", - a.pos_level - .get(&ChunkPos::new(x, y)) - .unwrap_or(&ChunkLoading::MAX_LEVEL) - ) - }) - .collect::(), - ); + for y in sy..=ty { + let level = a + .pos_level + .get(&ChunkPos::new(x, y)) + .unwrap_or(&ChunkLoading::MAX_LEVEL); + + let _ = write!(row, "{level:4}"); + } row }) .collect::>() diff --git a/pumpkin-world/src/chunk_system/chunk_state.rs b/pumpkin-world/src/chunk_system/chunk_state.rs index 5f4c70b21..e19aab86b 100644 --- a/pumpkin-world/src/chunk_system/chunk_state.rs +++ b/pumpkin-world/src/chunk_system/chunk_state.rs @@ -1,5 +1,6 @@ use crate::chunk::{ChunkData, ChunkLight, ChunkSections}; use crate::generation::biome_coords; +use crate::tick::scheduler::ChunkTickScheduler; use pumpkin_config::lighting::LightingEngineConfig; use pumpkin_data::dimension::Dimension; use rustc_hash::FxHashMap; @@ -38,6 +39,7 @@ pub enum StagedChunkEnum { Full, } +#[expect(clippy::fallible_impl_from)] impl From for StagedChunkEnum { fn from(v: u8) -> Self { match v { @@ -68,14 +70,14 @@ impl From for StagedChunkEnum { ChunkStatus::Surface => Self::Surface, ChunkStatus::Carvers => Self::Carvers, ChunkStatus::Features => Self::Features, - ChunkStatus::InitializeLight => Self::Lighting, - ChunkStatus::Light => Self::Lighting, + ChunkStatus::InitializeLight | ChunkStatus::Light => Self::Lighting, ChunkStatus::Spawn => Self::Spawn, ChunkStatus::Full => Self::Full, } } } +#[expect(clippy::fallible_impl_from)] impl From for ChunkStatus { fn from(status: StagedChunkEnum) -> Self { match status { @@ -90,7 +92,7 @@ impl From for ChunkStatus { StagedChunkEnum::Lighting => Self::Light, StagedChunkEnum::Spawn => Self::Spawn, StagedChunkEnum::Full => Self::Full, - _ => panic!(), + StagedChunkEnum::None => panic!(), } } } @@ -130,36 +132,16 @@ impl StagedChunkEnum { pub const fn get_direct_radius(self) -> i32 { // self exclude match self { - Self::Empty => 0, - Self::StructureStart => 0, - Self::StructureReferences => 0, - Self::Biomes => 0, - Self::Noise => 0, - Self::Surface => 0, - Self::Carvers => 0, - Self::Features => 1, - Self::Lighting => 1, - Self::Spawn => 1, - Self::Full => 1, - _ => panic!(), + Self::Features | Self::Lighting | Self::Spawn | Self::Full => 1, + _ => 0, } } #[must_use] pub const fn get_write_radius(self) -> i32 { // self exclude match self { - Self::Empty => 0, - Self::StructureStart => 0, - Self::StructureReferences => 0, - Self::Biomes => 0, - Self::Noise => 0, - Self::Surface => 0, - Self::Carvers => 0, - Self::Features => 1, - Self::Lighting => 1, - Self::Spawn => 1, - Self::Full => 0, - _ => panic!(), + Self::Features | Self::Lighting | Self::Spawn => 1, + _ => 0, } } #[must_use] @@ -229,12 +211,12 @@ impl Chunk { self, Self::Level(Arc::new(ChunkData { section: ChunkSections::new(0, 0), - heightmap: Default::default(), + heightmap: Mutex::default(), x: 0, z: 0, - block_ticks: Default::default(), - fluid_ticks: Default::default(), - pending_block_entities: Default::default(), + block_ticks: ChunkTickScheduler::default(), + fluid_ticks: ChunkTickScheduler::default(), + pending_block_entities: Mutex::default(), light_engine: Mutex::new(ChunkLight::default()), light_populated: AtomicBool::new(false), status: ChunkStatus::Empty, @@ -322,12 +304,12 @@ impl Chunk { light_engine: Mutex::new(light_data), light_populated: AtomicBool::new(is_lit), section: sections, - heightmap: Default::default(), + heightmap: Mutex::default(), x: proto_chunk.x, z: proto_chunk.z, dirty: AtomicBool::new(true), - block_ticks: Default::default(), - fluid_ticks: Default::default(), + block_ticks: ChunkTickScheduler::default(), + fluid_ticks: ChunkTickScheduler::default(), pending_block_entities: Mutex::new(pending_block_entities), status: proto_chunk.stage.into(), blending_data: proto_chunk.blending_data, diff --git a/pumpkin-world/src/chunk_system/generation_cache.rs b/pumpkin-world/src/chunk_system/generation_cache.rs index 5686d07e7..eb6919422 100644 --- a/pumpkin-world/src/chunk_system/generation_cache.rs +++ b/pumpkin-world/src/chunk_system/generation_cache.rs @@ -28,7 +28,7 @@ impl HeightLimitView for Cache { let mid = ((self.size * self.size) >> 1) as usize; match &self.chunks[mid] { Chunk::Proto(chunk) => chunk.height(), - _ => panic!(), + Chunk::Level(_) => panic!(), } } @@ -36,7 +36,7 @@ impl HeightLimitView for Cache { let mid = ((self.size * self.size) >> 1) as usize; match &self.chunks[mid] { Chunk::Proto(chunk) => chunk.bottom_y(), - _ => panic!(), + Chunk::Level(_) => panic!(), } } } @@ -211,10 +211,12 @@ impl GenerationCache for Cache { fn get_top_y(&self, heightmap: &HeightMap, x: i32, z: i32) -> i32 { match heightmap { - HeightMap::WorldSurfaceWg => self.top_block_height_exclusive(x, z), - HeightMap::WorldSurface => self.top_block_height_exclusive(x, z), - HeightMap::OceanFloorWg => self.ocean_floor_height_exclusive(x, z), - HeightMap::OceanFloor => self.ocean_floor_height_exclusive(x, z), + HeightMap::WorldSurfaceWg | HeightMap::WorldSurface => { + self.top_block_height_exclusive(x, z) + } + HeightMap::OceanFloorWg | HeightMap::OceanFloor => { + self.ocean_floor_height_exclusive(x, z) + } HeightMap::MotionBlocking => self.top_motion_blocking_block_height_exclusive(x, z), HeightMap::MotionBlockingNoLeaves => { self.top_motion_blocking_block_no_leaves_height_exclusive(x, z) diff --git a/pumpkin-world/src/chunk_system/schedule.rs b/pumpkin-world/src/chunk_system/schedule.rs index 2d078dab6..e4b255fab 100644 --- a/pumpkin-world/src/chunk_system/schedule.rs +++ b/pumpkin-world/src/chunk_system/schedule.rs @@ -32,7 +32,7 @@ impl PartialEq for TaskHeapNode { } impl TaskHeapNode { #[cfg(test)] - pub(crate) fn node_key(&self) -> NodeKey { + pub(crate) const fn node_key(&self) -> NodeKey { self.1 } } @@ -129,7 +129,7 @@ impl GenerationSchedule { let handle = thread::Builder::new() .name(format!("Gen-{i}")) .spawn(move || { - generation_work(recv_gen, send_chunk, level_clone); + generation_work(&recv_gen, &send_chunk, &level_clone); }) .expect("Failed to spawn Generation Thread"); @@ -168,11 +168,11 @@ impl GenerationSchedule { send_chunk, gen_pool, listener, - chunk_map: Default::default(), + chunk_map: HashMap::default(), lighting_config, last_unload: std::time::Instant::now(), }; - scheduler.work(level_sched); + scheduler.work(&level_sched); }) .expect("Failed to spawn Scheduler Thread"); @@ -201,7 +201,7 @@ impl GenerationSchedule { } chunk.dirty.store(true, Relaxed); } - _ => {} + LightingEngineConfig::Default => {} } } @@ -412,6 +412,7 @@ impl GenerationSchedule { } } + #[expect(clippy::too_many_lines)] fn resort_work(&mut self, new_data: (Option, Option>)) -> bool { if new_data.0.is_none() && new_data.1.is_none() { return false; @@ -719,6 +720,7 @@ impl GenerationSchedule { } } + #[expect(clippy::too_many_lines)] fn receive_chunk(&mut self, pos: ChunkPos, data: RecvChunk) { match data { RecvChunk::IO(chunk) => { @@ -800,10 +802,9 @@ impl GenerationSchedule { holder.current_stage = StagedChunkEnum::Full; let was_public = holder.public; - + self.apply_lighting_override(&chunk); + let public_chunk = chunk.clone(); if was_public { - self.apply_lighting_override(&chunk); - let public_chunk = chunk.clone(); self.public_chunk_map.insert(new_pos, public_chunk); info!( "Notifying players: regenerated chunk at {:?} (was already public)", @@ -812,8 +813,6 @@ impl GenerationSchedule { self.listener.process_new_chunk(new_pos, &chunk); holder.chunk = Some(Chunk::Level(chunk)); } else { - self.apply_lighting_override(&chunk); - let public_chunk = chunk.clone(); holder.chunk = Some(Chunk::Level(chunk)); let result = self.public_chunk_map.insert(new_pos, public_chunk); @@ -985,7 +984,8 @@ impl GenerationSchedule { self.running_task_count -= 1; } - fn work(mut self, level: Arc) { + #[expect(clippy::too_many_lines)] + fn work(mut self, level: &Arc) { debug!( "schedule thread start id: {:?} name: {}", thread::current().id(), @@ -1175,12 +1175,11 @@ impl GenerationSchedule { let holder = self.chunk_map.get_mut(&new_pos).unwrap(); let mut tmp = None; swap(&mut tmp, &mut holder.chunk); - let tmp = match tmp { - Some(v) => v, - None => panic!( + let Some(tmp) = tmp else { + panic!( "Missing chunk for position {:?} while processing generation task for {:?} stage {:?}", new_pos, node.pos, node.stage - ), + ) }; match tmp { Chunk::Level(chunk) => { @@ -1268,19 +1267,15 @@ impl GenerationSchedule { } Err(crossfire::compat::RecvTimeoutError::Disconnected) => break, } - if self.queue_dirty { - self.sort_queue(); - self.queue_dirty = false; - } } else { // No tasks in flight, wait indefinitely for LevelChannel changes debug_assert!(self.debug_check()); debug_assert_eq!(self.running_task_count, 0); - self.resort_work(self.send_level.wait_and_get(&level)); - if self.queue_dirty { - self.sort_queue(); - self.queue_dirty = false; - } + self.resort_work(self.send_level.wait_and_get(level)); + } + if self.queue_dirty { + self.sort_queue(); + self.queue_dirty = false; } } } diff --git a/pumpkin-world/src/chunk_system/tests.rs b/pumpkin-world/src/chunk_system/tests.rs index ab1ab08a0..1c4c76d97 100644 --- a/pumpkin-world/src/chunk_system/tests.rs +++ b/pumpkin-world/src/chunk_system/tests.rs @@ -42,7 +42,7 @@ fn ensure_dependency_chain_builds_multistage_chain() { // Ensure tasks were created, present in the DAG, and correctly chained for idx in start..=end { let key = holder.tasks[idx]; - assert!(!key.is_null(), "task {} was not created", idx); + assert!(!key.is_null(), "task {idx} was not created"); let node = graph.nodes.get(key).expect("graph missing node"); @@ -51,8 +51,7 @@ fn ensure_dependency_chain_builds_multistage_chain() { } else { assert_eq!( node.in_degree, 1, - "Intermediate task {} should have in_degree of 1", - idx + "Intermediate task {idx} should have in_degree of 1" ); } } @@ -141,7 +140,7 @@ fn ensure_dependency_chain_does_nothing_if_already_met() { ); // Ensure the function returned early without creating any tasks or queueing anything - for task in holder.tasks.iter() { + for task in &holder.tasks { assert!( task.is_null(), "No tasks should be created if the stage requirement is already met" @@ -292,7 +291,7 @@ fn completed_proto_stage_drops_all_satisfied_tasks() { } #[test] -fn test_cancellation_path_decrements_in_degree() { +fn cancellation_path_decrements_in_degree() { let mut graph = DAG::default(); // Create a task that is waiting (in_degree = 1) diff --git a/pumpkin-world/src/chunk_system/worker_logic.rs b/pumpkin-world/src/chunk_system/worker_logic.rs index afb0fadbb..a7060cc10 100644 --- a/pumpkin-world/src/chunk_system/worker_logic.rs +++ b/pumpkin-world/src/chunk_system/worker_logic.rs @@ -28,8 +28,8 @@ pub enum RecvChunk { /// Checks if a chunk needs relighting based on the current lighting configuration /// Returns true if the chunk has uniform lighting (from full/dark mode) but the server /// is now running in default mode (which needs proper lighting calculation) -fn needs_relighting(chunk: &crate::chunk::ChunkData, config: &LightingEngineConfig) -> bool { - if *config != LightingEngineConfig::Default { +fn needs_relighting(chunk: &crate::chunk::ChunkData, config: LightingEngineConfig) -> bool { + if config != LightingEngineConfig::Default { return false; } @@ -87,9 +87,8 @@ pub async fn io_read_work( }); for _ in 0..batch_len { - let data = match t_recv.recv().await { - Some(res) => res, - None => break, + let Some(data) = t_recv.recv().await else { + break; }; match data { @@ -97,7 +96,7 @@ pub async fn io_read_work( let pos = ChunkPos::new(chunk.x, chunk.z); if chunk.status == ChunkStatus::Full { // Relighting check - let needs_relight = needs_relighting(&chunk, &level.lighting_config); + let needs_relight = needs_relighting(&chunk, level.lighting_config); if needs_relight { debug!( @@ -169,10 +168,7 @@ pub async fn io_read_work( pub async fn io_write_work(recv: AsyncRx>, level: Arc, lock: IOLock) { loop { // Don't check cancel_token here (keep saving chunks) - let data = match recv.recv().await { - Ok(d) => d, - Err(_) => break, - }; + let Ok(data) = recv.recv().await else { break }; // debug!("io write thread receive chunks size {}", data.len()); let mut vec = Vec::with_capacity(data.len()); let mut positions = Vec::with_capacity(data.len()); @@ -262,21 +258,19 @@ pub fn run_generation( } pub fn generation_work( - recv: crossfire::compat::MRx<(ChunkPos, Cache, StagedChunkEnum)>, - send: crossfire::compat::MTx<(ChunkPos, RecvChunk)>, - level: Arc, + recv: &crossfire::compat::MRx<(ChunkPos, Cache, StagedChunkEnum)>, + send: &crossfire::compat::MTx<(ChunkPos, RecvChunk)>, + level: &Arc, ) { let settings = GenerationSettings::from_dimension(&level.world_gen.dimension); loop { - let (pos, cache, stage) = if let Ok(data) = recv.recv() { - data - } else { + let Ok((pos, cache, stage)) = recv.recv() else { debug!("generation channel closed, exiting"); break; }; - let result = run_generation(pos, cache, stage, &level, settings); + let result = run_generation(pos, cache, stage, level, settings); if send.send((pos, result)).is_err() { break; } diff --git a/pumpkin-world/src/generation/blender/mod.rs b/pumpkin-world/src/generation/blender/mod.rs index 5a91eb174..fb5a9a744 100644 --- a/pumpkin-world/src/generation/blender/mod.rs +++ b/pumpkin-world/src/generation/blender/mod.rs @@ -220,8 +220,8 @@ impl Blender { { let chunk_x = biome_coords::to_chunk(cell_x); let chunk_z = biome_coords::to_chunk(cell_z); - let min_x = (cell_x & 3) == 0; - let min_z = (cell_z & 3) == 0; + let min_x = cell_x.trailing_zeros() >= 2; + let min_z = cell_z.trailing_zeros() >= 2; let mut value = self.get_data_value(&getter, chunk_x, chunk_z, cell_x, cell_y, cell_z); if value == f64::MAX { @@ -259,16 +259,16 @@ impl Blender { F: Fn(&BlendingData, i32, i32, i32) -> f64, { let packed = (chunk_x as u32 as u64) | ((chunk_z as u32 as u64) << 32); - if let Some(data) = self.height_and_biome_blending_data.get(&packed) { - getter( - data, - cell_x - biome_coords::from_chunk(chunk_x), - cell_y, - cell_z - biome_coords::from_chunk(chunk_z), - ) - } else { - f64::MAX - } + self.height_and_biome_blending_data + .get(&packed) + .map_or(f64::MAX, |data| { + getter( + data, + cell_x - biome_coords::from_chunk(chunk_x), + cell_y, + cell_z - biome_coords::from_chunk(chunk_z), + ) + }) } #[must_use] @@ -323,11 +323,9 @@ pub struct BlenderBiomeSupplier<'a> { impl BiomeSupplier for BlenderBiomeSupplier<'_> { fn biome(&self, x: i32, y: i32, z: i32, sampler: &mut MultiNoiseSampler<'_>) -> &'static Biome { - if let Some(blended) = self.blender.blend_biome(x, y, z, &self.shift_noise) { - blended - } else { - self.base.biome(x, y, z, sampler) - } + self.blender + .blend_biome(x, y, z, &self.shift_noise) + .map_or_else(|| self.base.biome(x, y, z, sampler), |blended| blended) } } diff --git a/pumpkin-world/src/generation/block_state_provider.rs b/pumpkin-world/src/generation/block_state_provider.rs index 0bc87d4e6..076e8ba42 100644 --- a/pumpkin-world/src/generation/block_state_provider.rs +++ b/pumpkin-world/src/generation/block_state_provider.rs @@ -27,7 +27,13 @@ pub enum BlockStateProvider { } impl BlockStateProvider { - pub fn get(&self, random: &mut RandomGenerator, pos: BlockPos) -> &'static BlockState { + pub fn get( + &self, + random: &mut RandomGenerator, + pos: BlockPos, + chunk: &T, + block_registry: &dyn WorldPortalExt, + ) -> &'static BlockState { match self { Self::NoiseThreshold(provider) => provider.get(random, pos), Self::NoiseProvider(provider) => provider.get(pos), @@ -35,9 +41,8 @@ impl BlockStateProvider { Self::Weighted(provider) => provider.get(random), Self::DualNoise(provider) => provider.get(pos), Self::Pillar(provider) => provider.get(pos), - Self::RandomizedInt(provider) => provider.get(random, pos), - // Without chunk context, fall through to fallback (rules cannot be evaluated) - Self::Rule(_provider) => todo!(), //provider.get(random, pos), + Self::RandomizedInt(provider) => provider.get(random, pos, chunk, block_registry), + Self::Rule(provider) => provider.get(block_registry, chunk, random, pos), } } @@ -50,7 +55,7 @@ impl BlockStateProvider { ) -> &'static BlockState { match self { Self::Rule(provider) => provider.get(block_registry, chunk, random, pos), - _ => self.get(random, pos), + _ => self.get(random, pos, chunk, block_registry), } } @@ -63,7 +68,7 @@ impl BlockStateProvider { ) -> Option<&'static BlockState> { match self { Self::Rule(provider) => provider.get_optional(block_registry, chunk, random, pos), - _ => Some(self.get(random, pos)), + _ => Some(self.get(random, pos, chunk, block_registry)), } } } @@ -101,7 +106,9 @@ impl RuleBasedBlockStateProvider { ); } } - self.fallback.as_ref().map(|f| f.get(random, pos)) + self.fallback + .as_ref() + .map(|f| f.get(random, pos, chunk, block_registry)) } } @@ -117,9 +124,15 @@ pub struct RandomizedIntBlockStateProvider { } impl RandomizedIntBlockStateProvider { - pub fn get(&self, random: &mut RandomGenerator, pos: BlockPos) -> &'static BlockState { + pub fn get( + &self, + random: &mut RandomGenerator, + pos: BlockPos, + chunk: &T, + block_registry: &dyn WorldPortalExt, + ) -> &'static BlockState { // TODO - self.source.get(random, pos) + self.source.get(random, pos, chunk, block_registry) } } @@ -162,10 +175,13 @@ impl DualNoiseBlockStateProvider { let mut list = Vec::with_capacity(mapped as usize); for i in 0..mapped { let value = self.get_slow_noise(i as f64 * 54545.0, 0.0, i as f64 * 34234.0, &sampler); - list.push(self.base.get_state_by_value(&self.base.states, value)); + list.push(NoiseBlockStateProvider::get_state_by_value( + &self.base.states, + value, + )); } let value = self.base.base.get_noise(pos); - self.base.get_state_by_value(&list, value) + NoiseBlockStateProvider::get_state_by_value(&list, value) } fn get_slow_noise(&self, x: f64, y: f64, z: f64, sampler: &DoublePerlinNoiseSampler) -> f64 { @@ -228,14 +244,10 @@ pub struct NoiseBlockStateProvider { impl NoiseBlockStateProvider { pub fn get(&self, pos: BlockPos) -> &'static BlockState { let value = self.base.get_noise(pos); - self.get_state_by_value(&self.states, value) + Self::get_state_by_value(&self.states, value) } - fn get_state_by_value( - &self, - states: &[&'static BlockState], - value: f64, - ) -> &'static BlockState { + fn get_state_by_value(states: &[&'static BlockState], value: f64) -> &'static BlockState { let val = f64::midpoint(1.0, value).clamp(0.0, 0.9999); states[(val * states.len() as f64) as usize] } diff --git a/pumpkin-world/src/generation/carver/canyon.rs b/pumpkin-world/src/generation/carver/canyon.rs index 7df91e402..ba9221e0c 100644 --- a/pumpkin-world/src/generation/carver/canyon.rs +++ b/pumpkin-world/src/generation/carver/canyon.rs @@ -40,7 +40,7 @@ impl Carver for CanyonCarver { let distance = (max_distance as f32 * canyon_config.shape.distance_factor.get(random)) as i32; - self.do_carve( + Self::do_carve( config, chunk, random.next_i64(), @@ -61,7 +61,6 @@ impl Carver for CanyonCarver { impl CanyonCarver { #[allow(clippy::too_many_arguments)] fn do_carve( - &self, config: &CarverConfig, chunk: &mut ProtoChunk, tunnel_seed: i64, @@ -86,7 +85,7 @@ impl CanyonCarver { )) }; let width_factor_per_height = - self.init_width_factors(chunk.height() as usize, config, &mut random); + Self::init_width_factors(chunk.height() as usize, config, &mut random); let mut y_rota = 0.0f32; let mut x_rota = 0.0f32; @@ -102,7 +101,7 @@ impl CanyonCarver { .shape .horizontal_radius_factor .get(&mut random) as f64; - vertical_radius = self.update_vertical_radius( + vertical_radius = Self::update_vertical_radius( config, &mut random, vertical_radius, @@ -125,11 +124,11 @@ impl CanyonCarver { y_rota += (random.next_f32() - random.next_f32()) * random.next_f32() * 4.0; if random.next_bounded_i32(4) != 0 { - if !self.can_reach(chunk.x, chunk.z, x, z, current_step, distance, thickness) { + if !Self::can_reach(chunk.x, chunk.z, x, z, current_step, distance, thickness) { return; } - self.carve_ellipsoid( + Self::carve_ellipsoid( chunk, config, x, @@ -144,7 +143,6 @@ impl CanyonCarver { } fn init_width_factors( - &self, depth: usize, config: &CarverConfig, random: &mut RandomGenerator, @@ -165,7 +163,6 @@ impl CanyonCarver { } fn update_vertical_radius( - &self, config: &CarverConfig, random: &mut RandomGenerator, vertical_radius: f64, @@ -183,7 +180,6 @@ impl CanyonCarver { #[allow(clippy::too_many_arguments)] fn can_reach( - &self, chunk_x: i32, chunk_z: i32, x: f64, @@ -203,7 +199,6 @@ impl CanyonCarver { #[allow(clippy::too_many_arguments)] fn carve_ellipsoid( - &self, chunk: &mut ProtoChunk, config: &CarverConfig, x: f64, @@ -224,22 +219,22 @@ impl CanyonCarver { let chunk_min_x = chunk.x << 4; let chunk_min_z = chunk.z << 4; - let min_x_index = ((x - horizontal_radius).floor() as i32 - chunk_min_x - 1).max(0); - let max_x_index = ((x + horizontal_radius).floor() as i32 - chunk_min_x).min(15); + let x_index_min = ((x - horizontal_radius).floor() as i32 - chunk_min_x - 1).max(0); + let x_index_max = ((x + horizontal_radius).floor() as i32 - chunk_min_x).min(15); let min_y = ((y - vertical_radius).floor() as i32 - 1).max(chunk.bottom_y() as i32 + 1); let protected_blocks_on_top = 7; let max_y = ((y + vertical_radius).floor() as i32 + 1) .min(chunk.bottom_y() as i32 + chunk.height() as i32 - 1 - protected_blocks_on_top); - let min_z_index = ((z - horizontal_radius).floor() as i32 - chunk_min_z - 1).max(0); - let max_z_index = ((z + horizontal_radius).floor() as i32 - chunk_min_z).min(15); + let z_index_min = ((z - horizontal_radius).floor() as i32 - chunk_min_z - 1).max(0); + let z_index_max = ((z + horizontal_radius).floor() as i32 - chunk_min_z).min(15); - for x_index in min_x_index..=max_x_index { + for x_index in x_index_min..=x_index_max { let world_x = chunk_min_x + x_index; let xd = (world_x as f64 + 0.5 - x) / horizontal_radius; - for z_index in min_z_index..=max_z_index { + for z_index in z_index_min..=z_index_max { let world_z = chunk_min_z + z_index; let zd = (world_z as f64 + 0.5 - z) / horizontal_radius; @@ -247,7 +242,7 @@ impl CanyonCarver { for world_y in (min_y + 1..=max_y).rev() { let yd = (world_y as f64 - 0.5 - y) / vertical_radius; - if !self.should_skip( + if !Self::should_skip( width_factor_per_height, xd, yd, @@ -266,7 +261,6 @@ impl CanyonCarver { } fn should_skip( - &self, width_factor_per_height: &[f32], xd: f64, yd: f64, diff --git a/pumpkin-world/src/generation/carver/cave.rs b/pumpkin-world/src/generation/carver/cave.rs index 31f7de670..8281f2209 100644 --- a/pumpkin-world/src/generation/carver/cave.rs +++ b/pumpkin-world/src/generation/carver/cave.rs @@ -289,22 +289,22 @@ impl CaveCarver { let chunk_min_x = chunk.x << 4; let chunk_min_z = chunk.z << 4; - let min_x_idx = ((x - horizontal_radius).floor() as i32 - chunk_min_x - 1).max(0); - let max_x_idx = ((x + horizontal_radius).floor() as i32 - chunk_min_x).min(15); + let x_index_min = ((x - horizontal_radius).floor() as i32 - chunk_min_x - 1).max(0); + let x_index_max = ((x + horizontal_radius).floor() as i32 - chunk_min_x).min(15); let min_y = ((y - vertical_radius).floor() as i32 - 1).max(chunk.bottom_y() as i32 + 1); let protected_blocks_on_top = 7; let max_y = ((y + vertical_radius).floor() as i32 + 1) .min(chunk.bottom_y() as i32 + chunk.height() as i32 - 1 - protected_blocks_on_top); - let min_z_idx = ((z - horizontal_radius).floor() as i32 - chunk_min_z - 1).max(0); - let max_z_idx = ((z + horizontal_radius).floor() as i32 - chunk_min_z).min(15); + let z_index_min = ((z - horizontal_radius).floor() as i32 - chunk_min_z - 1).max(0); + let z_index_max = ((z + horizontal_radius).floor() as i32 - chunk_min_z).min(15); - for x_index in min_x_idx..=max_x_idx { + for x_index in x_index_min..=x_index_max { let world_x = chunk_min_x + x_index; let xd = (world_x as f64 + 0.5 - x) / horizontal_radius; - for z_index in min_z_idx..=max_z_idx { + for z_index in z_index_min..=z_index_max { let world_z = chunk_min_z + z_index; let zd = (world_z as f64 + 0.5 - z) / horizontal_radius; diff --git a/pumpkin-world/src/generation/carver/mod.rs b/pumpkin-world/src/generation/carver/mod.rs index 3e93012ea..4074a47d7 100644 --- a/pumpkin-world/src/generation/carver/mod.rs +++ b/pumpkin-world/src/generation/carver/mod.rs @@ -39,7 +39,7 @@ pub fn carve(chunk: &mut ProtoChunk, generator: &VanillaGenerator) { &[] }; - let _cave_carver = cave::CaveCarver; + //let _cave_carver = cave::CaveCarver; let canyon_carver = canyon::CanyonCarver; for dx in -radius..=radius { diff --git a/pumpkin-world/src/generation/feature/configured_features.rs b/pumpkin-world/src/generation/feature/configured_features.rs index 201a1534f..b503bcdcc 100644 --- a/pumpkin-world/src/generation/feature/configured_features.rs +++ b/pumpkin-world/src/generation/feature/configured_features.rs @@ -145,6 +145,7 @@ pub enum ConfiguredFeature { impl ConfiguredFeature { #[expect(clippy::too_many_arguments)] + #[expect(clippy::too_many_lines)] pub fn generate( &self, chunk: &mut T, @@ -193,7 +194,7 @@ impl ConfiguredFeature { pos, ), Self::PointedDripstone(feature) => feature.generate(chunk, random, pos), - Self::CoralMushroom(feature) => feature.generate( + Self::CoralMushroom(_feature) => CoralMushroomFeature::generate( chunk, block_registry, min_y, @@ -202,7 +203,7 @@ impl ConfiguredFeature { random, pos, ), - Self::CoralTree(feature) => feature.generate( + Self::CoralTree(_feature) => CoralTreeFeature::generate( chunk, block_registry, min_y, @@ -211,7 +212,7 @@ impl ConfiguredFeature { random, pos, ), - Self::CoralClaw(feature) => feature.generate( + Self::CoralClaw(_feature) => CoralClawFeature::generate( chunk, block_registry, min_y, @@ -220,7 +221,7 @@ impl ConfiguredFeature { random, pos, ), - Self::EndPlatform(feature) => feature.generate( + Self::EndPlatform(_feature) => EndPlatformFeature::generate( chunk, block_registry, min_y, @@ -240,7 +241,9 @@ impl ConfiguredFeature { ), Self::SpringFeature(feature) => feature.generate(block_registry, chunk, random, pos), Self::SimpleBlock(feature) => feature.generate(block_registry, chunk, random, pos), - Self::Flower(feature) => feature.generate( + Self::RandomPatch(feature) + | Self::Flower(feature) + | Self::NoBonemealFlower(feature) => feature.generate( chunk, block_registry, min_y, @@ -249,17 +252,8 @@ impl ConfiguredFeature { random, pos, ), - Self::NoBonemealFlower(feature) => feature.generate( - chunk, - block_registry, - min_y, - height, - feature_name, - random, - pos, - ), - Self::DesertWell(feature) => { - feature.generate(chunk, min_y, height, feature_name, random, pos) + Self::DesertWell(_feature) => { + DesertWellFeature::generate(chunk, min_y, height, feature_name, random, pos) } Self::Fossil(feature) => feature.generate(chunk, min_y, height, random, pos), Self::Bamboo(feature) => feature.generate( @@ -280,15 +274,6 @@ impl ConfiguredFeature { random, pos, ), - Self::RandomPatch(feature) => feature.generate( - chunk, - block_registry, - min_y, - height, - feature_name, - random, - pos, - ), Self::RandomBooleanSelector(feature) => feature.generate( chunk, block_registry, @@ -325,7 +310,7 @@ impl ConfiguredFeature { random, pos, ), - Self::Vines(feature) => feature.generate( + Self::Vines(_feature) => VinesFeature::generate( chunk, block_registry, min_y, @@ -355,8 +340,8 @@ impl ConfiguredFeature { random, pos, ), - Self::Kelp(feature) => { - feature.generate(chunk, min_y, height, feature_name, random, pos) + Self::Kelp(_feature) => { + KelpFeature::generate(chunk, min_y, height, feature_name, random, pos) } Self::Ore(feature) => feature.generate( chunk, @@ -376,12 +361,12 @@ impl ConfiguredFeature { random, pos, ), - Self::MonsterRoom(feature) => { - feature.generate(chunk, min_y, height, feature_name, random, pos) + Self::MonsterRoom(_feature) => { + DungeonFeature::generate(chunk, min_y, height, feature_name, random, pos) } - Self::BlueIce(feature) => feature.generate(chunk, random, pos), - Self::GlowstoneBlob(feature) => { - feature.generate(chunk, min_y, height, feature_name, random, pos) + Self::BlueIce(_feature) => BlueIceFeature::generate(chunk, random, pos), + Self::GlowstoneBlob(_feature) => { + GlowstoneBlobFeature::generate(chunk, min_y, height, feature_name, random, pos) } Self::Disk(feature) => feature.generate( chunk, @@ -402,22 +387,22 @@ impl ConfiguredFeature { random, pos, ), - Self::BasaltPillar(feature) => feature.generate(chunk, random, pos), + Self::BasaltPillar(_feature) => BasaltPillarFeature::generate(chunk, random, pos), Self::ForestRock(feature) => feature.generate(chunk, random, pos), - Self::FreezeTopLayer(feature) => { - feature.generate(chunk, min_y, height, feature_name, random, pos) + Self::FreezeTopLayer(_feature) => { + FreezeTopLayerFeature::generate(chunk, min_y, height, feature_name, random, pos) } - Self::IceSpike(feature) => { - feature.generate(chunk, min_y, height, feature_name, random, pos) + Self::IceSpike(_feature) => { + IceSpikeFeature::generate(chunk, min_y, height, feature_name, random, pos) } Self::Iceberg(feature) => { feature.generate(chunk, min_y, height, feature_name, random, pos) } - Self::ChorusPlant(feature) => { - feature.generate(chunk, min_y, height, feature_name, random, pos) + Self::ChorusPlant(_feature) => { + ChorusPlantFeature::generate(chunk, min_y, height, feature_name, random, pos) } - Self::EndIsland(feature) => { - feature.generate(chunk, min_y, height, feature_name, random, pos) + Self::EndIsland(_feature) => { + EndIslandFeature::generate(chunk, min_y, height, feature_name, random, pos) } Self::SculkPatch(feature) => feature.generate(block_registry, chunk, random, pos), Self::RootSystem(feature) => feature.generate( diff --git a/pumpkin-world/src/generation/feature/features/basalt_columns.rs b/pumpkin-world/src/generation/feature/features/basalt_columns.rs index a56484fab..ff17efefe 100644 --- a/pumpkin-world/src/generation/feature/features/basalt_columns.rs +++ b/pumpkin-world/src/generation/feature/features/basalt_columns.rs @@ -146,7 +146,7 @@ fn is_air_or_lava_ocean(chunk: &T, pos: BlockPos) -> bool { is_air(state) || (state.to_block_id() == Block::LAVA.id && pos.0.y <= LAVA_SEA_LEVEL) } -fn is_cannot_place_on(id: BlockId) -> bool { +const fn is_cannot_place_on(id: BlockId) -> bool { matches!( id, BlockId::LAVA diff --git a/pumpkin-world/src/generation/feature/features/basalt_pillar.rs b/pumpkin-world/src/generation/feature/features/basalt_pillar.rs index ee6e15d35..f6012829f 100644 --- a/pumpkin-world/src/generation/feature/features/basalt_pillar.rs +++ b/pumpkin-world/src/generation/feature/features/basalt_pillar.rs @@ -6,11 +6,10 @@ use pumpkin_util::{ use crate::generation::proto_chunk::GenerationCache; -pub struct BasaltPillarFeature {} +pub struct BasaltPillarFeature; impl BasaltPillarFeature { pub fn generate( - &self, chunk: &mut T, random: &mut RandomGenerator, pos: BlockPos, diff --git a/pumpkin-world/src/generation/feature/features/block_column.rs b/pumpkin-world/src/generation/feature/features/block_column.rs index 543932b06..f7f3f6c97 100644 --- a/pumpkin-world/src/generation/feature/features/block_column.rs +++ b/pumpkin-world/src/generation/feature/features/block_column.rs @@ -69,7 +69,7 @@ impl BlockColumnFeature { } let layer = &self.layers[l]; for _n in 0..*m { - let state = layer.provider.get(random, mutable); + let state = layer.provider.get(random, mutable, chunk, block_registry); chunk.set_block_state(&mutable.0, state); mutable = mutable.offset(self.direction.to_offset()); } diff --git a/pumpkin-world/src/generation/feature/features/block_pile.rs b/pumpkin-world/src/generation/feature/features/block_pile.rs index e34f0e530..399de19e3 100644 --- a/pumpkin-world/src/generation/feature/features/block_pile.rs +++ b/pumpkin-world/src/generation/feature/features/block_pile.rs @@ -1,3 +1 @@ -pub struct BlockPileFeature { - // TODO -} +pub struct BlockPileFeature; diff --git a/pumpkin-world/src/generation/feature/features/blue_ice.rs b/pumpkin-world/src/generation/feature/features/blue_ice.rs index a9b50e9dc..d18a42d40 100644 --- a/pumpkin-world/src/generation/feature/features/blue_ice.rs +++ b/pumpkin-world/src/generation/feature/features/blue_ice.rs @@ -8,11 +8,10 @@ use crate::generation::proto_chunk::GenerationCache; const SEA_LEVEL: i32 = 63; // TODO: use getSeaLevel() instead of hardcoding -pub struct BlueIceFeature {} +pub struct BlueIceFeature; impl BlueIceFeature { pub fn generate( - &self, chunk: &mut T, random: &mut RandomGenerator, pos: BlockPos, diff --git a/pumpkin-world/src/generation/feature/features/bonus_chest.rs b/pumpkin-world/src/generation/feature/features/bonus_chest.rs index ba7afa26b..35d4b8517 100644 --- a/pumpkin-world/src/generation/feature/features/bonus_chest.rs +++ b/pumpkin-world/src/generation/feature/features/bonus_chest.rs @@ -1,3 +1 @@ -pub struct BonusChestFeature { - // TODO -} +pub struct BonusChestFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/chorus_plant.rs b/pumpkin-world/src/generation/feature/features/chorus_plant.rs index 53c972ba6..32ab4d684 100644 --- a/pumpkin-world/src/generation/feature/features/chorus_plant.rs +++ b/pumpkin-world/src/generation/feature/features/chorus_plant.rs @@ -13,11 +13,10 @@ use pumpkin_util::{ use crate::generation::proto_chunk::GenerationCache; -pub struct ChorusPlantFeature {} +pub struct ChorusPlantFeature; impl ChorusPlantFeature { pub fn generate( - &self, chunk: &mut T, _min_y: i8, _height: u16, diff --git a/pumpkin-world/src/generation/feature/features/coral/coral_claw.rs b/pumpkin-world/src/generation/feature/features/coral/coral_claw.rs index ab397fb63..d7bf81f44 100644 --- a/pumpkin-world/src/generation/feature/features/coral/coral_claw.rs +++ b/pumpkin-world/src/generation/feature/features/coral/coral_claw.rs @@ -12,7 +12,6 @@ pub struct CoralClawFeature; impl CoralClawFeature { #[allow(clippy::too_many_arguments)] pub fn generate( - &self, chunk: &mut T, block_registry: &dyn WorldPortalExt, _min_y: i8, @@ -36,27 +35,26 @@ impl CoralClawFeature { let j = random.next_bounded_i32(2) + 1; pos = pos.offset(direction2.to_offset()); - let direction3; - let k; + let branch_direction; - if direction2 == direction { - direction3 = direction; - k = random.next_bounded_i32(3) + 2; + let k = if direction2 == direction { + branch_direction = direction; + random.next_bounded_i32(3) + 2 } else { pos = pos.up(); //let _directions = [direction2, BlockDirection::Up]; - direction3 = direction2; // TODO: make this random - k = random.next_bounded_i32(3) + 5; - } + branch_direction = direction2; // TODO: make this random + random.next_bounded_i32(3) + 5 + }; for _ in 0..j { if !CoralFeature::generate_coral_piece(chunk, block_registry, random, block, pos) { break; } - pos = pos.offset(direction3.to_offset()); + pos = pos.offset(branch_direction.to_offset()); } - pos = pos.offset(direction3.to_offset()); + pos = pos.offset(branch_direction.to_offset()); pos = pos.up(); for _l in 0..k { diff --git a/pumpkin-world/src/generation/feature/features/coral/coral_mushroom.rs b/pumpkin-world/src/generation/feature/features/coral/coral_mushroom.rs index 5d14ab793..6aba4bcde 100644 --- a/pumpkin-world/src/generation/feature/features/coral/coral_mushroom.rs +++ b/pumpkin-world/src/generation/feature/features/coral/coral_mushroom.rs @@ -12,7 +12,6 @@ pub struct CoralMushroomFeature; impl CoralMushroomFeature { #[allow(clippy::too_many_arguments)] pub fn generate( - &self, chunk: &mut T, block_registry: &dyn WorldPortalExt, _min_y: i8, @@ -51,9 +50,7 @@ impl CoralMushroomFeature { block, pos, )) - { - continue; - } + {} } } } diff --git a/pumpkin-world/src/generation/feature/features/coral/coral_tree.rs b/pumpkin-world/src/generation/feature/features/coral/coral_tree.rs index f1cd33f15..4602b332d 100644 --- a/pumpkin-world/src/generation/feature/features/coral/coral_tree.rs +++ b/pumpkin-world/src/generation/feature/features/coral/coral_tree.rs @@ -12,7 +12,6 @@ pub struct CoralTreeFeature; impl CoralTreeFeature { #[allow(clippy::too_many_arguments)] pub fn generate( - &self, chunk: &mut T, block_registry: &dyn WorldPortalExt, _min_y: i8, diff --git a/pumpkin-world/src/generation/feature/features/delta_feature.rs b/pumpkin-world/src/generation/feature/features/delta_feature.rs index 37b33426a..2b13228ea 100644 --- a/pumpkin-world/src/generation/feature/features/delta_feature.rs +++ b/pumpkin-world/src/generation/feature/features/delta_feature.rs @@ -1,3 +1 @@ -pub struct DeltaFeatureFeature { - // TODO -} +pub struct DeltaFeatureFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/desert_well.rs b/pumpkin-world/src/generation/feature/features/desert_well.rs index b4ca3cdaf..0115d6eb7 100644 --- a/pumpkin-world/src/generation/feature/features/desert_well.rs +++ b/pumpkin-world/src/generation/feature/features/desert_well.rs @@ -14,8 +14,8 @@ impl DesertWellFeature { const SLAB: Block = Block::SANDSTONE_SLAB; const WALL: Block = Block::SANDSTONE; + #[expect(clippy::too_many_lines)] pub fn generate( - &self, chunk: &mut T, _min_y: i8, _height: u16, @@ -23,12 +23,13 @@ impl DesertWellFeature { _random: &mut RandomGenerator, pos: BlockPos, ) -> bool { + const CAN_GENERATE: Block = Block::SAND; + let mut block_pos = pos.up(); while chunk.is_air(&block_pos.0) && block_pos.0.y > chunk.bottom_y() as i32 + 2 { block_pos = block_pos.down(); } let block = GenerationCache::get_block_state(chunk, &pos.0).to_block_id(); - const CAN_GENERATE: Block = Block::SAND; if CAN_GENERATE.id != block { return false; } diff --git a/pumpkin-world/src/generation/feature/features/drip_stone/cluster.rs b/pumpkin-world/src/generation/feature/features/drip_stone/cluster.rs index 53c2a2e0e..97ecacc17 100644 --- a/pumpkin-world/src/generation/feature/features/drip_stone/cluster.rs +++ b/pumpkin-world/src/generation/feature/features/drip_stone/cluster.rs @@ -1,3 +1 @@ -pub struct DripstoneClusterFeature { - // TODO -} +pub struct DripstoneClusterFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/drip_stone/large.rs b/pumpkin-world/src/generation/feature/features/drip_stone/large.rs index 4d9b726d4..4117f0e70 100644 --- a/pumpkin-world/src/generation/feature/features/drip_stone/large.rs +++ b/pumpkin-world/src/generation/feature/features/drip_stone/large.rs @@ -1,3 +1 @@ -pub struct LargeDripstoneFeature { - // TODO -} +pub struct LargeDripstoneFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/drip_stone/small.rs b/pumpkin-world/src/generation/feature/features/drip_stone/small.rs index 512b57f82..80d2a91e3 100644 --- a/pumpkin-world/src/generation/feature/features/drip_stone/small.rs +++ b/pumpkin-world/src/generation/feature/features/drip_stone/small.rs @@ -6,10 +6,10 @@ use pumpkin_util::{ }; pub struct SmallDripstoneFeature { - pub chance_of_taller_dripstone: f32, - pub chance_of_directional_spread: f32, - pub chance_of_spread_radius2: f32, - pub chance_of_spread_radius3: f32, + pub taller_dripstone: f32, + pub directional_spread: f32, + pub spread_radius2: f32, + pub spread_radius3: f32, } impl SmallDripstoneFeature { @@ -62,17 +62,17 @@ impl SmallDripstoneFeature { ) { super::gen_dripstone(chunk, pos); for dir in BlockDirection::horizontal() { - if random.next_f32() > self.chance_of_directional_spread { + if random.next_f32() > self.directional_spread { continue; } let pos = pos.offset(dir.to_offset()); super::gen_dripstone(chunk, pos); - if random.next_f32() > self.chance_of_spread_radius2 { + if random.next_f32() > self.spread_radius2 { continue; } let pos = pos.offset(BlockDirection::random(random).to_offset()); super::gen_dripstone(chunk, pos); - if random.next_f32() > self.chance_of_spread_radius3 { + if random.next_f32() > self.spread_radius3 { continue; } let pos = pos.offset(BlockDirection::random(random).to_offset()); diff --git a/pumpkin-world/src/generation/feature/features/end_gateway.rs b/pumpkin-world/src/generation/feature/features/end_gateway.rs index a6741c6ff..fd3199e4d 100644 --- a/pumpkin-world/src/generation/feature/features/end_gateway.rs +++ b/pumpkin-world/src/generation/feature/features/end_gateway.rs @@ -1,3 +1 @@ -pub struct EndGatewayFeature { - // TODO -} +pub struct EndGatewayFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/end_island.rs b/pumpkin-world/src/generation/feature/features/end_island.rs index f7e826c35..e48c77cbe 100644 --- a/pumpkin-world/src/generation/feature/features/end_island.rs +++ b/pumpkin-world/src/generation/feature/features/end_island.rs @@ -6,11 +6,10 @@ use pumpkin_util::{ use crate::generation::proto_chunk::GenerationCache; -pub struct EndIslandFeature {} +pub struct EndIslandFeature; impl EndIslandFeature { pub fn generate( - &self, chunk: &mut T, _min_y: i8, _height: u16, diff --git a/pumpkin-world/src/generation/feature/features/end_platform.rs b/pumpkin-world/src/generation/feature/features/end_platform.rs index 452ab67b0..d48c8ac3e 100644 --- a/pumpkin-world/src/generation/feature/features/end_platform.rs +++ b/pumpkin-world/src/generation/feature/features/end_platform.rs @@ -10,9 +10,7 @@ use crate::world::WorldPortalExt; pub struct EndPlatformFeature; impl EndPlatformFeature { - #[expect(clippy::too_many_arguments)] pub fn generate( - &self, chunk: &mut T, _block_registry: &dyn WorldPortalExt, _min_y: i8, diff --git a/pumpkin-world/src/generation/feature/features/end_spike.rs b/pumpkin-world/src/generation/feature/features/end_spike.rs index 5f2671519..5e1275371 100644 --- a/pumpkin-world/src/generation/feature/features/end_spike.rs +++ b/pumpkin-world/src/generation/feature/features/end_spike.rs @@ -133,16 +133,16 @@ impl EndSpikeFeature { for dx in -2i32..=2 { for dz in -2i32..=2 { // Only place on perimeter walls and the top frame - let on_x_wall = dx.abs() == 2; - let on_z_wall = dz.abs() == 2; + let x_wall_present = dx.abs() == 2; + let z_wall_present = dz.abs() == 2; let on_top = dy == 3; - if !on_x_wall && !on_z_wall && !on_top { + if !x_wall_present && !z_wall_present && !on_top { continue; } // Connectivity rules - let x_edge = on_x_wall || on_top; - let z_edge = on_z_wall || on_top; + let x_edge = x_wall_present || on_top; + let z_edge = z_wall_present || on_top; let mut props = OakFenceLikeProperties::default(&Block::IRON_BARS); props.north = x_edge && dz != 2; diff --git a/pumpkin-world/src/generation/feature/features/fallen_tree.rs b/pumpkin-world/src/generation/feature/features/fallen_tree.rs index b43c155ae..f31783a43 100644 --- a/pumpkin-world/src/generation/feature/features/fallen_tree.rs +++ b/pumpkin-world/src/generation/feature/features/fallen_tree.rs @@ -8,7 +8,6 @@ pub struct FallenTreeFeature { impl FallenTreeFeature { pub const fn generate( - &self, _chunk: &mut ProtoChunk, _min_y: i8, _height: u16, @@ -19,12 +18,12 @@ impl FallenTreeFeature { false } - fn gen_stump(&self, chunk: &mut ProtoChunk, random: &mut RandomGenerator, pos: BlockPos) { - chunk.set_block_state( - pos.0.x, - pos.0.y, - pos.0.z, - self.trunk_provider.get(random, pos), - ); - } + // fn gen_stump(&self, chunk: &mut ProtoChunk, random: &mut RandomGenerator, pos: BlockPos) { + // // chunk.set_block_state( + // // pos.0.x, + // // pos.0.y, + // // pos.0.z, + // // self.trunk_provider.get(random, pos, chunk), + // // ); + // } } diff --git a/pumpkin-world/src/generation/feature/features/fill_layer.rs b/pumpkin-world/src/generation/feature/features/fill_layer.rs index f64d91cf7..96531f3e1 100644 --- a/pumpkin-world/src/generation/feature/features/fill_layer.rs +++ b/pumpkin-world/src/generation/feature/features/fill_layer.rs @@ -1,3 +1 @@ -pub struct FillLayerFeature { - // TODO -} +pub struct FillLayerFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/fossil.rs b/pumpkin-world/src/generation/feature/features/fossil.rs index 47504371c..226ee1833 100644 --- a/pumpkin-world/src/generation/feature/features/fossil.rs +++ b/pumpkin-world/src/generation/feature/features/fossil.rs @@ -1,4 +1,4 @@ -use pumpkin_data::{Block, BlockState, Rotation, tag}; +use pumpkin_data::{Block, BlockState, Mirror, Rotation, tag}; use pumpkin_util::{ HeightMap, math::{block_box::BlockBox, position::BlockPos, vector3::Vector3}, @@ -190,8 +190,7 @@ fn place_fossil_template( continue; } - if let Some(state) = - BlockStateResolver::resolve(palette_entry, rotation, Default::default()) + if let Some(state) = BlockStateResolver::resolve(palette_entry, rotation, Mirror::default()) { chunk.set_block_state(&world_pos, processor.process(state)); } diff --git a/pumpkin-world/src/generation/feature/features/freeze_top_layer.rs b/pumpkin-world/src/generation/feature/features/freeze_top_layer.rs index a2f31e2c3..37357ea91 100644 --- a/pumpkin-world/src/generation/feature/features/freeze_top_layer.rs +++ b/pumpkin-world/src/generation/feature/features/freeze_top_layer.rs @@ -6,11 +6,10 @@ use pumpkin_util::random::RandomGenerator; const SEA_LEVEL: i32 = 63; // TODO: getSeaLevel() from the worldgen context instead of hardcoding -pub struct FreezeTopLayerFeature {} +pub struct FreezeTopLayerFeature; impl FreezeTopLayerFeature { pub fn generate( - &self, chunk: &mut T, _min_y: i8, _height: u16, diff --git a/pumpkin-world/src/generation/feature/features/geode.rs b/pumpkin-world/src/generation/feature/features/geode.rs index c4a850fec..92a4931cc 100644 --- a/pumpkin-world/src/generation/feature/features/geode.rs +++ b/pumpkin-world/src/generation/feature/features/geode.rs @@ -74,7 +74,6 @@ pub struct GeodeFeature { impl GeodeFeature { fn safe_set_block( - &self, chunk: &mut T, pos: BlockPos, state: &'static BlockState, @@ -90,18 +89,17 @@ impl GeodeFeature { let state = codec.get_state(); // Obtain the block corresponding to this state id let block = Block::from_state_id(state.id); - if let Some(props) = block.properties(state.id) { - props.to_props().iter().any(|(k, _)| *k == property) - } else { - false - } + block + .properties(state.id) + .is_some_and(|props| props.to_props().iter().any(|(k, _)| *k == property)) } #[allow(clippy::too_many_arguments)] + #[allow(clippy::too_many_lines)] pub fn generate( &self, chunk: &mut T, - _block_registry: &dyn WorldPortalExt, + block_registry: &dyn WorldPortalExt, _min_y: i8, _height: u16, _feature_name: pumpkin_data::placed_feature::PlacedFeature, @@ -263,25 +261,35 @@ impl GeodeFeature { && dist_sum_shell < inner_air { // Carve crack - self.safe_set_block( + Self::safe_set_block( chunk, point_inside, BlockStateId::AIR.to_state(), &can_replace_pred, ); } else if dist_sum_shell >= inner_air { - let state = self.filling_provider.get(random, point_inside); - self.safe_set_block(chunk, point_inside, state, &can_replace_pred); + let state = + self.filling_provider + .get(random, point_inside, chunk, block_registry); + Self::safe_set_block(chunk, point_inside, state, &can_replace_pred); } else if dist_sum_shell >= innermost_block_layer { let use_alternate = random.next_f32() < self.use_alternate_layer0_chance as f32; if use_alternate { - let state = self - .alternate_inner_layer_provider - .get(random, point_inside); - self.safe_set_block(chunk, point_inside, state, &can_replace_pred); + let state = self.alternate_inner_layer_provider.get( + random, + point_inside, + chunk, + block_registry, + ); + Self::safe_set_block(chunk, point_inside, state, &can_replace_pred); } else { - let state = self.inner_layer_provider.get(random, point_inside); - self.safe_set_block(chunk, point_inside, state, &can_replace_pred); + let state = self.inner_layer_provider.get( + random, + point_inside, + chunk, + block_registry, + ); + Self::safe_set_block(chunk, point_inside, state, &can_replace_pred); } if (!self.placements_require_layer0_alternate || use_alternate) && random.next_f32() < self.use_potential_placements_chance as f32 @@ -289,11 +297,15 @@ impl GeodeFeature { potential_crystal_placements.push(point_inside); } } else if dist_sum_shell >= inner_crust { - let state = self.middle_layer_provider.get(random, point_inside); - self.safe_set_block(chunk, point_inside, state, &can_replace_pred); + let state = + self.middle_layer_provider + .get(random, point_inside, chunk, block_registry); + Self::safe_set_block(chunk, point_inside, state, &can_replace_pred); } else if dist_sum_shell >= outer_crust { - let state = self.outer_layer_provider.get(random, point_inside); - self.safe_set_block(chunk, point_inside, state, &can_replace_pred); + let state = + self.outer_layer_provider + .get(random, point_inside, chunk, block_registry); + Self::safe_set_block(chunk, point_inside, state, &can_replace_pred); } } } @@ -344,7 +356,7 @@ impl GeodeFeature { } let final_state = final_codec.get_state(); - self.safe_set_block(chunk, place_pos, final_state, &can_replace_pred); + Self::safe_set_block(chunk, place_pos, final_state, &can_replace_pred); // Only place one crystal per budding block per geode gen break; diff --git a/pumpkin-world/src/generation/feature/features/glowstone_blob.rs b/pumpkin-world/src/generation/feature/features/glowstone_blob.rs index 961e48790..276cb54bf 100644 --- a/pumpkin-world/src/generation/feature/features/glowstone_blob.rs +++ b/pumpkin-world/src/generation/feature/features/glowstone_blob.rs @@ -6,11 +6,10 @@ use pumpkin_util::{ use crate::generation::proto_chunk::GenerationCache; -pub struct GlowstoneBlobFeature {} +pub struct GlowstoneBlobFeature; impl GlowstoneBlobFeature { pub fn generate( - &self, chunk: &mut T, _min_y: i8, _height: u16, diff --git a/pumpkin-world/src/generation/feature/features/huge_brown_mushroom.rs b/pumpkin-world/src/generation/feature/features/huge_brown_mushroom.rs index 7152731b9..37711cfe3 100644 --- a/pumpkin-world/src/generation/feature/features/huge_brown_mushroom.rs +++ b/pumpkin-world/src/generation/feature/features/huge_brown_mushroom.rs @@ -1,3 +1 @@ -pub struct HugeBrownMushroomFeature { - // TODO -} +pub struct HugeBrownMushroomFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/huge_fungus.rs b/pumpkin-world/src/generation/feature/features/huge_fungus.rs index 1b6c8c82e..5a517ab1d 100644 --- a/pumpkin-world/src/generation/feature/features/huge_fungus.rs +++ b/pumpkin-world/src/generation/feature/features/huge_fungus.rs @@ -1,3 +1 @@ -pub struct HugeFungusFeature { - // TODO -} +pub struct HugeFungusFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/huge_red_mushroom.rs b/pumpkin-world/src/generation/feature/features/huge_red_mushroom.rs index 93e66ec2c..b7983527c 100644 --- a/pumpkin-world/src/generation/feature/features/huge_red_mushroom.rs +++ b/pumpkin-world/src/generation/feature/features/huge_red_mushroom.rs @@ -1,3 +1 @@ -pub struct HugeRedMushroomFeature { - // TODO -} +pub struct HugeRedMushroomFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/ice_spike.rs b/pumpkin-world/src/generation/feature/features/ice_spike.rs index 224c720c3..1d9cf9366 100644 --- a/pumpkin-world/src/generation/feature/features/ice_spike.rs +++ b/pumpkin-world/src/generation/feature/features/ice_spike.rs @@ -6,11 +6,10 @@ use pumpkin_util::{ use crate::generation::proto_chunk::GenerationCache; -pub struct IceSpikeFeature {} +pub struct IceSpikeFeature; impl IceSpikeFeature { pub fn generate( - &self, chunk: &mut T, _min_y: i8, _height: u16, diff --git a/pumpkin-world/src/generation/feature/features/iceberg.rs b/pumpkin-world/src/generation/feature/features/iceberg.rs index 9dda98bb4..5ccd5486e 100644 --- a/pumpkin-world/src/generation/feature/features/iceberg.rs +++ b/pumpkin-world/src/generation/feature/features/iceberg.rs @@ -15,6 +15,7 @@ pub struct IcebergFeature { } impl IcebergFeature { + #[expect(clippy::too_many_lines)] pub fn generate( &self, chunk: &mut T, @@ -52,12 +53,12 @@ impl IcebergFeature { for zo in -a..a { for y_off in 0..over_water_height { let radius = if is_ellipse { - self.height_dependent_radius_ellipse(y_off, over_water_height, width) + Self::height_dependent_radius_ellipse(y_off, over_water_height, width) } else { - self.height_dependent_radius_round(random, y_off, over_water_height, width) + Self::height_dependent_radius_round(random, y_off, over_water_height, width) }; if is_ellipse || xo < radius { - self.generate_iceberg_block( + Self::generate_iceberg_block( chunk, random, &origin, @@ -78,7 +79,7 @@ impl IcebergFeature { } } - self.smooth( + Self::smooth( chunk, &origin, width, @@ -99,14 +100,14 @@ impl IcebergFeature { } else { a }; - let radius = self.height_dependent_radius_steep( + let radius = Self::height_dependent_radius_steep( random, -y_off, under_water_height, width, ); if xo < radius { - self.generate_iceberg_block( + Self::generate_iceberg_block( chunk, random, &origin, @@ -133,7 +134,7 @@ impl IcebergFeature { random.next_f64() > 0.7 }; if do_cut_out { - self.generate_cut_out( + Self::generate_cut_out( chunk, random, width, @@ -149,9 +150,8 @@ impl IcebergFeature { true } - #[expect(clippy::too_many_arguments)] + #[expect(clippy::too_many_arguments, clippy::useless_let_if_seq)] fn generate_cut_out( - &self, chunk: &mut T, random: &mut RandomGenerator, width: i32, @@ -165,16 +165,17 @@ impl IcebergFeature { let random_sign_x: i32 = if random.next_bool() { -1 } else { 1 }; let random_sign_z: i32 = if random.next_bool() { -1 } else { 1 }; - let mut x_off = random.next_bounded_i32((width / 2 - 2).max(1)); - if random.next_bool() { - x_off = width / 2 + 1 - random.next_bounded_i32((width - width / 2 - 1).max(1)); - } - - let mut z_off = random.next_bounded_i32((width / 2 - 2).max(1)); - if random.next_bool() { - z_off = width / 2 + 1 - random.next_bounded_i32((width - width / 2 - 1).max(1)); - } + let mut x_off = if random.next_bool() { + width / 2 + 1 - random.next_bounded_i32((width - width / 2 - 1).max(1)) + } else { + random.next_bounded_i32((width / 2 - 2).max(1)) + }; + let mut z_off = if random.next_bool() { + width / 2 + 1 - random.next_bounded_i32((width - width / 2 - 1).max(1)) + } else { + random.next_bounded_i32((width / 2 - 2).max(1)) + }; if is_ellipse { let v = random.next_bounded_i32((shape_ellipse_a - 5).max(1)); x_off = v; @@ -190,8 +191,8 @@ impl IcebergFeature { // Above-water carve for y_off in 0..(height - 3) { - let radius = self.height_dependent_radius_round(random, y_off, height, width); - self.carve( + let radius = Self::height_dependent_radius_round(random, y_off, height, width); + Self::carve( chunk, radius, y_off, @@ -207,8 +208,8 @@ impl IcebergFeature { // Below-water carve let mut y_off = -1i32; while y_off > -height + random.next_bounded_i32(5) { - let radius = self.height_dependent_radius_steep(random, -y_off, height, width); - self.carve( + let radius = Self::height_dependent_radius_steep(random, -y_off, height, width); + Self::carve( chunk, radius, y_off, @@ -225,7 +226,6 @@ impl IcebergFeature { #[expect(clippy::too_many_arguments)] fn carve( - &self, chunk: &mut T, radius: i32, y_off: i32, @@ -241,7 +241,7 @@ impl IcebergFeature { for xo in -a..a { for zo in -a..a { - let signed_dist = self.signed_distance_ellipse( + let signed_dist = Self::signed_distance_ellipse( xo, zo, local_origin.x, @@ -259,7 +259,7 @@ impl IcebergFeature { chunk.set_block_state(&pos, Block::WATER.default_state); } else { chunk.set_block_state(&pos, Block::AIR.default_state); - self.remove_floating_snow_layer(chunk, &pos); + Self::remove_floating_snow_layer(chunk, &pos); } } } @@ -267,7 +267,7 @@ impl IcebergFeature { } } - fn remove_floating_snow_layer(&self, chunk: &mut T, pos: &Vector3) { + fn remove_floating_snow_layer(chunk: &mut T, pos: &Vector3) { let above = pos.add(&Vector3::new(0, 1, 0)); let raw = GenerationCache::get_block_state(chunk, &above); if raw.to_block_id() == Block::SNOW.id { @@ -277,7 +277,6 @@ impl IcebergFeature { #[expect(clippy::too_many_arguments)] fn generate_iceberg_block( - &self, chunk: &mut T, random: &mut RandomGenerator, origin: &Vector3, @@ -294,17 +293,17 @@ impl IcebergFeature { main_block: &'static BlockState, ) { let signed_dist = if is_ellipse { - self.signed_distance_ellipse( + Self::signed_distance_ellipse( xo, zo, 0, 0, a, - self.get_ellipse_c(y_off, height, shape_ellipse_c), + Self::get_ellipse_c(y_off, height, shape_ellipse_c), shape_angle, ) } else { - self.signed_distance_circle(xo, zo, 0, 0, radius, random) + Self::signed_distance_circle(xo, zo, 0, 0, radius, random) }; if signed_dist < 0.0 { @@ -317,7 +316,7 @@ impl IcebergFeature { if signed_dist > compare_val && random.next_f64() > 0.9 { return; } - self.set_iceberg_block( + Self::set_iceberg_block( chunk, random, &pos, @@ -332,7 +331,6 @@ impl IcebergFeature { #[expect(clippy::too_many_arguments)] fn set_iceberg_block( - &self, chunk: &mut T, random: &mut RandomGenerator, pos: &Vector3, @@ -362,7 +360,6 @@ impl IcebergFeature { } fn smooth( - &self, chunk: &mut T, origin: &Vector3, width: i32, @@ -413,16 +410,14 @@ impl IcebergFeature { } } - const fn get_ellipse_c(&self, y_off: i32, height: i32, shape_ellipse_c: i32) -> i32 { - let mut c = shape_ellipse_c; + const fn get_ellipse_c(y_off: i32, height: i32, shape_ellipse_c: i32) -> i32 { if y_off > 0 && height - y_off <= 3 { - c = shape_ellipse_c - (4 - (height - y_off)); + return shape_ellipse_c - (4 - (height - y_off)); } - c + shape_ellipse_c } fn signed_distance_circle( - &self, xo: i32, zo: i32, ox: i32, @@ -435,9 +430,7 @@ impl IcebergFeature { - (radius as f64).powi(2) } - #[expect(clippy::too_many_arguments)] fn signed_distance_ellipse( - &self, xo: i32, zo: i32, ox: i32, @@ -455,7 +448,6 @@ impl IcebergFeature { } fn height_dependent_radius_round( - &self, random: &mut RandomGenerator, y_off: i32, height: i32, @@ -463,26 +455,27 @@ impl IcebergFeature { ) -> i32 { let k = 3.5f32 - random.next_f32(); let y_off_sq = (y_off as f64).powi(2) as f32; - let mut scale = (1.0f32 - y_off_sq / (height as f32 * k)) * width as f32; - if height > 15 + random.next_bounded_i32(5) { + let scale = if height > 15 + random.next_bounded_i32(5) { let temp_y_off = if y_off < 3 + random.next_bounded_i32(6) { y_off / 2 } else { y_off }; - scale = (1.0f32 - temp_y_off as f32 / (height as f32 * k * 0.4f32)) * width as f32; - } + (1.0f32 - temp_y_off as f32 / (height as f32 * k * 0.4f32)) * width as f32 + } else { + (1.0f32 - y_off_sq / (height as f32 * k)) * width as f32 + }; + (scale / 2.0f32).ceil() as i32 } - fn height_dependent_radius_ellipse(&self, y_off: i32, height: i32, width: i32) -> i32 { + fn height_dependent_radius_ellipse(y_off: i32, height: i32, width: i32) -> i32 { let y_off_sq = (y_off as f64).powi(2) as f32; let scale = (1.0f32 - y_off_sq / height as f32) * width as f32; (scale / 2.0f32).ceil() as i32 } fn height_dependent_radius_steep( - &self, random: &mut RandomGenerator, y_off: i32, height: i32, @@ -493,7 +486,7 @@ impl IcebergFeature { (scale / 2.0f32).ceil() as i32 } - fn is_iceberg_state(id: BlockId) -> bool { + const fn is_iceberg_state(id: BlockId) -> bool { matches!( id, BlockId::PACKED_ICE | BlockId::SNOW_BLOCK | BlockId::BLUE_ICE diff --git a/pumpkin-world/src/generation/feature/features/kelp.rs b/pumpkin-world/src/generation/feature/features/kelp.rs index ef84401bd..b53677b84 100644 --- a/pumpkin-world/src/generation/feature/features/kelp.rs +++ b/pumpkin-world/src/generation/feature/features/kelp.rs @@ -5,14 +5,11 @@ use pumpkin_util::{ random::{RandomGenerator, RandomImpl}, }; -pub struct KelpFeature { - // No extra parameters -} +pub struct KelpFeature; impl KelpFeature { #[allow(clippy::too_many_arguments)] pub fn generate( - &self, chunk: &mut T, _min_y: i8, _height: u16, diff --git a/pumpkin-world/src/generation/feature/features/lake.rs b/pumpkin-world/src/generation/feature/features/lake.rs index 653984bfb..7adbc4cf9 100644 --- a/pumpkin-world/src/generation/feature/features/lake.rs +++ b/pumpkin-world/src/generation/feature/features/lake.rs @@ -13,6 +13,7 @@ pub struct LakeFeature { } impl LakeFeature { + #[expect(clippy::too_many_lines)] pub fn generate( &self, block_registry: &dyn WorldPortalExt, @@ -92,7 +93,7 @@ impl LakeFeature { let place_pos = origin.add(xx as i32, yyx as i32, zz as i32); let current_state = GenerationCache::get_block_state(chunk, &place_pos.0).to_state(); - if self.can_replace_block(current_state) { + if Self::can_replace_block(current_state) { let place_air = yyx >= 4; chunk.set_block_state( &place_pos.0, @@ -156,7 +157,7 @@ impl LakeFeature { { let current_state = GenerationCache::get_block_state(chunk, &freeze_pos.0).to_state(); - if self.can_replace_block(current_state) { + if Self::can_replace_block(current_state) { chunk.set_block_state(&freeze_pos.0, Block::ICE.default_state); } } @@ -167,7 +168,7 @@ impl LakeFeature { true } - fn can_replace_block(&self, state: &BlockState) -> bool { + fn can_replace_block(state: &BlockState) -> bool { !state .id .to_block_id() diff --git a/pumpkin-world/src/generation/feature/features/monster_room.rs b/pumpkin-world/src/generation/feature/features/monster_room.rs index bbc09349b..58506748b 100644 --- a/pumpkin-world/src/generation/feature/features/monster_room.rs +++ b/pumpkin-world/src/generation/feature/features/monster_room.rs @@ -17,12 +17,12 @@ const DUNGEON_MOBS: [&str; 4] = [ "minecraft:spider", ]; -pub struct DungeonFeature {} +pub struct DungeonFeature; impl DungeonFeature { /// Generate a monster room (dungeon) at `pos`. + #[expect(clippy::too_many_lines)] pub fn generate( - &self, chunk: &mut T, _min_y: i8, _height: u16, @@ -143,7 +143,7 @@ impl DungeonFeature { .copied(); // Build the chest state: face away from the wall. - let chest_state = if let Some(dir) = facing_dir { + let chest_state = facing_dir.map_or(Block::CHEST.default_state, |dir| { use pumpkin_data::block_properties::{ BlockProperties, ChestLikeProperties, }; @@ -151,9 +151,7 @@ impl DungeonFeature { props.facing = dir.opposite(); let state_id = props.to_state_id(&Block::CHEST); pumpkin_data::BlockState::from_id(state_id) - } else { - Block::CHEST.default_state - }; + }); chunk.set_block_state(&chest_pos, chest_state); diff --git a/pumpkin-world/src/generation/feature/features/multiface_growth.rs b/pumpkin-world/src/generation/feature/features/multiface_growth.rs index ef1b8de98..37ae43d75 100644 --- a/pumpkin-world/src/generation/feature/features/multiface_growth.rs +++ b/pumpkin-world/src/generation/feature/features/multiface_growth.rs @@ -1,3 +1 @@ -pub struct MultifaceGrowthFeature { - // TODO -} +pub struct MultifaceGrowthFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/nether_forest_vegetation.rs b/pumpkin-world/src/generation/feature/features/nether_forest_vegetation.rs index 8ec6323aa..10618e85b 100644 --- a/pumpkin-world/src/generation/feature/features/nether_forest_vegetation.rs +++ b/pumpkin-world/src/generation/feature/features/nether_forest_vegetation.rs @@ -52,7 +52,7 @@ impl NetherForestVegetationFeature { - random.next_bounded_i32(self.spread_width), ); - let nether_state = self.state_provider.get(random, pos); + let nether_state = self.state_provider.get(random, pos, chunk, block_registry); let nether_block = Block::from_state_id(nether_state.id); // Only place if the spot is air, above the bottom, and the block can survive here. diff --git a/pumpkin-world/src/generation/feature/features/ore.rs b/pumpkin-world/src/generation/feature/features/ore.rs index 3d30a0efd..c6bdc8733 100644 --- a/pumpkin-world/src/generation/feature/features/ore.rs +++ b/pumpkin-world/src/generation/feature/features/ore.rs @@ -41,7 +41,6 @@ impl OreFeature { let h = pos.0.z as f64 + f.cos() as f64 * g as f64; // Use f.cos() for Math.cos(f) let j = pos.0.z as f64 - f.cos() as f64 * g as f64; - let _k = 2; // This variable 'k' from Java seems unused let l = pos.0.y as f64 + random.next_bounded_i32(3) as f64 - 2.0; let m = pos.0.y as f64 + random.next_bounded_i32(3) as f64 - 2.0; @@ -63,6 +62,7 @@ impl OreFeature { } #[expect(clippy::too_many_arguments)] + #[expect(clippy::too_many_lines)] fn generate_vein_part( &self, chunk: &mut T, diff --git a/pumpkin-world/src/generation/feature/features/replace_single_block.rs b/pumpkin-world/src/generation/feature/features/replace_single_block.rs index 4a1783f3f..641ba4438 100644 --- a/pumpkin-world/src/generation/feature/features/replace_single_block.rs +++ b/pumpkin-world/src/generation/feature/features/replace_single_block.rs @@ -1,3 +1 @@ -pub struct ReplaceSingleBlockFeature { - // TODO -} +pub struct ReplaceSingleBlockFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/sculk_patch.rs b/pumpkin-world/src/generation/feature/features/sculk_patch.rs index 686ce7a97..30c1775a1 100644 --- a/pumpkin-world/src/generation/feature/features/sculk_patch.rs +++ b/pumpkin-world/src/generation/feature/features/sculk_patch.rs @@ -32,7 +32,7 @@ impl SculkPatchFeature { random: &mut RandomGenerator, pos: BlockPos, ) -> bool { - if !self.can_spread_from(chunk, pos) { + if !Self::can_spread_from(chunk, pos) { return false; } @@ -132,7 +132,7 @@ impl SculkPatchFeature { true } - fn can_spread_from(&self, chunk: &T, pos: BlockPos) -> bool { + fn can_spread_from(chunk: &T, pos: BlockPos) -> bool { let state = GenerationCache::get_block_state(chunk, &pos.0); let block_id = state.to_block_id(); if is_sculk_behaviour(block_id) { diff --git a/pumpkin-world/src/generation/feature/features/simple_block.rs b/pumpkin-world/src/generation/feature/features/simple_block.rs index 47b5c7b59..90f4b2dff 100644 --- a/pumpkin-world/src/generation/feature/features/simple_block.rs +++ b/pumpkin-world/src/generation/feature/features/simple_block.rs @@ -20,7 +20,7 @@ impl SimpleBlockFeature { random: &mut RandomGenerator, pos: BlockPos, ) -> bool { - let state = self.to_place.get(random, pos); + let state = self.to_place.get(random, pos, chunk, block_registry); let block = Block::from_state_id(state.id); let block_accessor: &dyn BlockAccessor = chunk; if !block_registry.can_place_at(block, state, block_accessor, &pos) { diff --git a/pumpkin-world/src/generation/feature/features/tree/decorator/alter_ground.rs b/pumpkin-world/src/generation/feature/features/tree/decorator/alter_ground.rs index 0156c8ae7..fec63f07b 100644 --- a/pumpkin-world/src/generation/feature/features/tree/decorator/alter_ground.rs +++ b/pumpkin-world/src/generation/feature/features/tree/decorator/alter_ground.rs @@ -1 +1 @@ -pub struct AlterGroundTreeDecorator {} +pub struct AlterGroundTreeDecorator; diff --git a/pumpkin-world/src/generation/feature/features/tree/decorator/attached_to_leaves.rs b/pumpkin-world/src/generation/feature/features/tree/decorator/attached_to_leaves.rs index 9db92aefe..9364c67d7 100644 --- a/pumpkin-world/src/generation/feature/features/tree/decorator/attached_to_leaves.rs +++ b/pumpkin-world/src/generation/feature/features/tree/decorator/attached_to_leaves.rs @@ -1 +1 @@ -pub struct AttachedToLeavesTreeDecorator {} +pub struct AttachedToLeavesTreeDecorator; diff --git a/pumpkin-world/src/generation/feature/features/tree/decorator/attached_to_logs.rs b/pumpkin-world/src/generation/feature/features/tree/decorator/attached_to_logs.rs index f41812dc9..035de5614 100644 --- a/pumpkin-world/src/generation/feature/features/tree/decorator/attached_to_logs.rs +++ b/pumpkin-world/src/generation/feature/features/tree/decorator/attached_to_logs.rs @@ -4,8 +4,8 @@ use pumpkin_util::{ random::{RandomGenerator, RandomImpl}, }; -use crate::generation::block_state_provider::BlockStateProvider; use crate::generation::proto_chunk::GenerationCache; +use crate::{generation::block_state_provider::BlockStateProvider, world::WorldPortalExt}; pub struct AttachedToLogsTreeDecorator { pub probability: f32, @@ -17,6 +17,7 @@ impl AttachedToLogsTreeDecorator { pub fn generate( &self, chunk: &mut T, + block_registry: &dyn WorldPortalExt, random: &mut RandomGenerator, log_positions: &[BlockPos], ) { @@ -31,7 +32,10 @@ impl AttachedToLogsTreeDecorator { { continue; } - chunk.set_block_state(&pos.0, self.block_provider.get(random, pos)); + chunk.set_block_state( + &pos.0, + self.block_provider.get(random, pos, chunk, block_registry), + ); } } } diff --git a/pumpkin-world/src/generation/feature/features/tree/decorator/cocoa.rs b/pumpkin-world/src/generation/feature/features/tree/decorator/cocoa.rs index 56e862c3f..8a2f03fb5 100644 --- a/pumpkin-world/src/generation/feature/features/tree/decorator/cocoa.rs +++ b/pumpkin-world/src/generation/feature/features/tree/decorator/cocoa.rs @@ -1 +1 @@ -pub struct CocoaTreeDecorator {} +pub struct CocoaTreeDecorator; diff --git a/pumpkin-world/src/generation/feature/features/tree/decorator/creaking_heart.rs b/pumpkin-world/src/generation/feature/features/tree/decorator/creaking_heart.rs index 6e34177fa..81b17f909 100644 --- a/pumpkin-world/src/generation/feature/features/tree/decorator/creaking_heart.rs +++ b/pumpkin-world/src/generation/feature/features/tree/decorator/creaking_heart.rs @@ -1 +1 @@ -pub struct CreakingHeartTreeDecorator {} +pub struct CreakingHeartTreeDecorator; diff --git a/pumpkin-world/src/generation/feature/features/tree/decorator/mod.rs b/pumpkin-world/src/generation/feature/features/tree/decorator/mod.rs index 925b5c857..1507378a8 100644 --- a/pumpkin-world/src/generation/feature/features/tree/decorator/mod.rs +++ b/pumpkin-world/src/generation/feature/features/tree/decorator/mod.rs @@ -1,6 +1,6 @@ use std::borrow::Cow; -use crate::generation::proto_chunk::GenerationCache; +use crate::{generation::proto_chunk::GenerationCache, world::WorldPortalExt}; use alter_ground::AlterGroundTreeDecorator; use attached_to_leaves::AttachedToLeavesTreeDecorator; use attached_to_logs::AttachedToLogsTreeDecorator; @@ -42,13 +42,16 @@ impl TreeDecorator { pub fn generate( &self, chunk: &mut T, + block_registry: &dyn WorldPortalExt, random: &mut RandomGenerator, root_positions: &[BlockPos], log_positions: &[BlockPos], foliage_positions: &[BlockPos], ) { match self { - Self::TrunkVine(decorator) => decorator.generate(chunk, random, log_positions), + Self::TrunkVine(_decorator) => { + TrunkVineTreeDecorator::generate(chunk, random, log_positions); + } Self::LeaveVine(decorator) => decorator.generate(chunk, random, foliage_positions), Self::PaleMoss(_decorator) => {} Self::CreakingHeart(_decorator) => {} @@ -56,11 +59,11 @@ impl TreeDecorator { Self::Beehive(_decorator) => {} Self::AlterGround(_decorator) => {} Self::PlaceOnGround(decorator) => { - decorator.generate(chunk, random, root_positions, log_positions); + decorator.generate(chunk, block_registry, random, root_positions, log_positions); } Self::AttachedToLeaves(_decorator) => {} Self::AttachedToLogs(decorator) => { - decorator.generate(chunk, random, log_positions); + decorator.generate(chunk, block_registry, random, log_positions); } } } diff --git a/pumpkin-world/src/generation/feature/features/tree/decorator/pale_moss.rs b/pumpkin-world/src/generation/feature/features/tree/decorator/pale_moss.rs index 97bf2ccf2..1e05ac1be 100644 --- a/pumpkin-world/src/generation/feature/features/tree/decorator/pale_moss.rs +++ b/pumpkin-world/src/generation/feature/features/tree/decorator/pale_moss.rs @@ -1 +1 @@ -pub struct PaleMossTreeDecorator {} +pub struct PaleMossTreeDecorator; diff --git a/pumpkin-world/src/generation/feature/features/tree/decorator/place_on_ground.rs b/pumpkin-world/src/generation/feature/features/tree/decorator/place_on_ground.rs index 027a8bbd7..fc2d1b7dd 100644 --- a/pumpkin-world/src/generation/feature/features/tree/decorator/place_on_ground.rs +++ b/pumpkin-world/src/generation/feature/features/tree/decorator/place_on_ground.rs @@ -1,6 +1,6 @@ use super::TreeDecorator; -use crate::generation::block_state_provider::BlockStateProvider; use crate::generation::proto_chunk::GenerationCache; +use crate::{generation::block_state_provider::BlockStateProvider, world::WorldPortalExt}; use pumpkin_data::{Block, tag::Block::MINECRAFT_LEAVES}; use pumpkin_util::{ math::{block_box::BlockBox, position::BlockPos}, @@ -18,6 +18,7 @@ impl PlaceOnGroundTreeDecorator { pub fn generate( &self, chunk: &mut T, + block_registry: &dyn WorldPortalExt, random: &mut RandomGenerator, root_positions: &[BlockPos], log_positions: &[BlockPos], @@ -53,13 +54,14 @@ impl PlaceOnGroundTreeDecorator { random.next_inbetween_i32(block_box.min.y, block_box.max.y), random.next_inbetween_i32(block_box.min.z, block_box.max.z), ); - self.generate_decoration(chunk, pos, random); + self.generate_decoration(chunk, block_registry, pos, random); } } fn generate_decoration( &self, chunk: &mut T, + block_registry: &dyn WorldPortalExt, pos: BlockPos, random: &mut RandomGenerator, ) { @@ -72,7 +74,11 @@ impl PlaceOnGroundTreeDecorator { && !state.to_block_id().has_tag(MINECRAFT_LEAVES) // TODO: using heightmap seems not to work { - chunk.set_block_state(&up_pos.0, self.block_state_provider.get(random, up_pos)); + chunk.set_block_state( + &up_pos.0, + self.block_state_provider + .get(random, up_pos, chunk, block_registry), + ); } } } diff --git a/pumpkin-world/src/generation/feature/features/tree/decorator/trunk_vine.rs b/pumpkin-world/src/generation/feature/features/tree/decorator/trunk_vine.rs index c98211226..07bdced3b 100644 --- a/pumpkin-world/src/generation/feature/features/tree/decorator/trunk_vine.rs +++ b/pumpkin-world/src/generation/feature/features/tree/decorator/trunk_vine.rs @@ -12,7 +12,6 @@ pub struct TrunkVineTreeDecorator; impl TrunkVineTreeDecorator { pub fn generate( - &self, chunk: &mut T, random: &mut RandomGenerator, log_positions: &[BlockPos], diff --git a/pumpkin-world/src/generation/feature/features/tree/foliage/acacia.rs b/pumpkin-world/src/generation/feature/features/tree/foliage/acacia.rs index 40e47247e..5cc712fad 100644 --- a/pumpkin-world/src/generation/feature/features/tree/foliage/acacia.rs +++ b/pumpkin-world/src/generation/feature/features/tree/foliage/acacia.rs @@ -56,7 +56,7 @@ impl AcaciaFoliagePlacer { foliage_positions } - pub const fn get_random_height(&self, _random: &mut RandomGenerator) -> i32 { + pub const fn get_random_height(_random: &mut RandomGenerator) -> i32 { 0 } } diff --git a/pumpkin-world/src/generation/feature/features/tree/foliage/dark_oak.rs b/pumpkin-world/src/generation/feature/features/tree/foliage/dark_oak.rs index 9225d0bc4..d6ebef9d4 100644 --- a/pumpkin-world/src/generation/feature/features/tree/foliage/dark_oak.rs +++ b/pumpkin-world/src/generation/feature/features/tree/foliage/dark_oak.rs @@ -25,18 +25,18 @@ impl DarkOakFoliagePlacer { let mut foliage_positions = Vec::new(); let pos = node.center.up_height(offset); let is_giant = node.giant_trunk; + FoliagePlacer::generate_square( + &mut foliage_positions, + self, + chunk, + random, + pos, + radius + 2, + -1, + node.giant_trunk, + foliage_provider, + ); if is_giant { - FoliagePlacer::generate_square( - &mut foliage_positions, - self, - chunk, - random, - pos, - radius + 2, - -1, - node.giant_trunk, - foliage_provider, - ); FoliagePlacer::generate_square( &mut foliage_positions, self, @@ -73,17 +73,6 @@ impl DarkOakFoliagePlacer { ); } } else { - FoliagePlacer::generate_square( - &mut foliage_positions, - self, - chunk, - random, - pos, - radius + 2, - -1, - node.giant_trunk, - foliage_provider, - ); FoliagePlacer::generate_square( &mut foliage_positions, self, @@ -99,7 +88,7 @@ impl DarkOakFoliagePlacer { foliage_positions } - pub const fn get_random_height(&self, _random: &mut RandomGenerator) -> i32 { + pub const fn get_random_height(_random: &mut RandomGenerator) -> i32 { 4 } } diff --git a/pumpkin-world/src/generation/feature/features/tree/foliage/mod.rs b/pumpkin-world/src/generation/feature/features/tree/foliage/mod.rs index 85f866e1b..89b61a095 100644 --- a/pumpkin-world/src/generation/feature/features/tree/foliage/mod.rs +++ b/pumpkin-world/src/generation/feature/features/tree/foliage/mod.rs @@ -264,6 +264,7 @@ pub enum FoliageType { impl FoliageType { #[expect(clippy::too_many_arguments)] + #[expect(clippy::too_many_lines)] pub fn generate( &self, chunk: &mut T, @@ -382,12 +383,12 @@ impl FoliageType { Self::Blob(blob) => blob.get_random_height(random), Self::Spruce(spruce) => spruce.get_random_height(random, trunk_height), Self::Pine(pine) => pine.get_random_height(random, trunk_height), - Self::Acacia(acacia) => acacia.get_random_height(random), + Self::Acacia(_acacia) => AcaciaFoliagePlacer::get_random_height(random), Self::Bush(bush) => bush.get_random_height(random), Self::Fancy(fancy) => fancy.get_random_height(random), Self::Jungle(jungle) => jungle.get_random_height(random, trunk_height), Self::MegaPine(mega_pine) => mega_pine.get_random_height(random, trunk_height), - Self::DarkOak(dark_oak) => dark_oak.get_random_height(random), + Self::DarkOak(_dark_oak) => DarkOakFoliagePlacer::get_random_height(random), Self::RandomSpread(random_spread) => { random_spread.get_random_height(random, trunk_height) } diff --git a/pumpkin-world/src/generation/feature/features/tree/mod.rs b/pumpkin-world/src/generation/feature/features/tree/mod.rs index fd6e54cd4..d148a8961 100644 --- a/pumpkin-world/src/generation/feature/features/tree/mod.rs +++ b/pumpkin-world/src/generation/feature/features/tree/mod.rs @@ -59,6 +59,7 @@ impl TreeFeature { for decorator in &self.decorators { decorator.generate( chunk, + block_registry, random, &root_positions, &log_positions, @@ -105,7 +106,7 @@ impl TreeFeature { } let root_positions = if let Some(placer) = &self.root_placer { - match placer.generate(chunk, random, pos, trunk_start) { + match placer.generate(chunk, block_registry, random, pos, trunk_start) { Some(positions) => positions, None => return (vec![], vec![], vec![]), } @@ -113,7 +114,7 @@ impl TreeFeature { Vec::new() }; - let trunk_state = self.trunk_provider.get(random, pos); + let trunk_state = self.trunk_provider.get(random, pos, chunk, block_registry); let (nodes, logs) = self.trunk_placer.generate( block_registry, @@ -131,7 +132,9 @@ impl TreeFeature { .get_random_height(random, height as i32); let base_height = height as i32 - foliage_height; let foliage_radius = self.foliage_placer.get_random_radius(random, base_height); - let foliage_state = self.foliage_provider.get(random, pos); + let foliage_state = self + .foliage_provider + .get(random, pos, chunk, block_registry); let mut foliage_positions = Vec::new(); for node in nodes { foliage_positions.extend(self.foliage_placer.generate( diff --git a/pumpkin-world/src/generation/feature/features/tree/root/mangrove.rs b/pumpkin-world/src/generation/feature/features/tree/root/mangrove.rs index c067d17c1..ec3e06a0d 100644 --- a/pumpkin-world/src/generation/feature/features/tree/root/mangrove.rs +++ b/pumpkin-world/src/generation/feature/features/tree/root/mangrove.rs @@ -4,9 +4,9 @@ use pumpkin_util::{ random::{RandomGenerator, RandomImpl}, }; -use crate::generation::block_state_provider::BlockStateProvider; use crate::generation::feature::features::tree::TreeFeature; use crate::generation::proto_chunk::GenerationCache; +use crate::{generation::block_state_provider::BlockStateProvider, world::WorldPortalExt}; pub struct AboveRootPlacement { pub above_root_provider: BlockStateProvider, @@ -37,6 +37,7 @@ impl MangroveRootPlacer { pub fn generate( &self, chunk: &mut T, + block_registry: &dyn WorldPortalExt, random: &mut RandomGenerator, pos: BlockPos, trunk_pos: BlockPos, @@ -65,7 +66,7 @@ impl MangroveRootPlacer { let mut placed: Vec = Vec::new(); for root_pos in roots { - if self.place_roots(chunk, random, root_pos) { + if self.place_roots(chunk, block_registry, random, root_pos) { placed.push(root_pos); } } @@ -147,6 +148,7 @@ impl MangroveRootPlacer { fn place_roots( &self, chunk: &mut T, + block_registry: &dyn WorldPortalExt, random: &mut RandomGenerator, pos: BlockPos, ) -> bool { @@ -156,10 +158,12 @@ impl MangroveRootPlacer { .muddy_roots_in .contains(&existing_id.as_u16()) { - let state = self - .mangrove_root_placement - .muddy_roots_provider - .get(random, pos); + let state = self.mangrove_root_placement.muddy_roots_provider.get( + random, + pos, + chunk, + block_registry, + ); let state = Self::apply_waterlogging(chunk, pos, state); chunk.set_block_state(&pos.0, state); return true; @@ -167,13 +171,16 @@ impl MangroveRootPlacer { if !self.can_grow_through(chunk, pos) { return false; } - let state = self.root_provider.get(random, pos); + let state = self.root_provider.get(random, pos, chunk, block_registry); let state = Self::apply_waterlogging(chunk, pos, state); chunk.set_block_state(&pos.0, state); if let Some(above) = &self.above_root_placement { let above_pos = pos.up(); if random.next_f32() < above.above_root_placement_chance && chunk.is_air(&above_pos.0) { - let above_state = above.above_root_provider.get(random, above_pos); + let above_state = + above + .above_root_provider + .get(random, above_pos, chunk, block_registry); let above_state = Self::apply_waterlogging(chunk, above_pos, above_state); chunk.set_block_state(&above_pos.0, above_state); } diff --git a/pumpkin-world/src/generation/feature/features/tree/root/mod.rs b/pumpkin-world/src/generation/feature/features/tree/root/mod.rs index ab98f1b88..53da91ddc 100644 --- a/pumpkin-world/src/generation/feature/features/tree/root/mod.rs +++ b/pumpkin-world/src/generation/feature/features/tree/root/mod.rs @@ -1,7 +1,7 @@ use mangrove::MangroveRootPlacer; use pumpkin_util::{math::position::BlockPos, random::RandomGenerator}; -use crate::generation::proto_chunk::GenerationCache; +use crate::{generation::proto_chunk::GenerationCache, world::WorldPortalExt}; pub mod mangrove; @@ -19,12 +19,13 @@ impl RootPlacer { pub fn generate( &self, chunk: &mut T, + block_registry: &dyn WorldPortalExt, random: &mut RandomGenerator, pos: BlockPos, trunk_pos: BlockPos, ) -> Option> { match self { - Self::Mangrove(p) => p.generate(chunk, random, pos, trunk_pos), + Self::Mangrove(p) => p.generate(chunk, block_registry, random, pos, trunk_pos), } } } diff --git a/pumpkin-world/src/generation/feature/features/tree/trunk/bending.rs b/pumpkin-world/src/generation/feature/features/tree/trunk/bending.rs index b01461b23..109cfe048 100644 --- a/pumpkin-world/src/generation/feature/features/tree/trunk/bending.rs +++ b/pumpkin-world/src/generation/feature/features/tree/trunk/bending.rs @@ -23,7 +23,7 @@ impl BendingTrunkPlacer { pub fn generate( &self, block_registry: &dyn WorldPortalExt, - placer: &TrunkPlacer, + _placer: &TrunkPlacer, height: u32, start_pos: BlockPos, chunk: &mut T, @@ -36,7 +36,7 @@ impl BendingTrunkPlacer { let log_height = height as i32 - 1; let mut pos = start_pos; - placer.set_dirt( + TrunkPlacer::set_dirt( block_registry, chunk, random, @@ -52,7 +52,7 @@ impl BendingTrunkPlacer { pos = pos.offset(direction.to_offset()); } - if placer.place(chunk, &pos, trunk_block) { + if TrunkPlacer::place(chunk, &pos, trunk_block) { trunk_poses.push(pos); } @@ -70,7 +70,7 @@ impl BendingTrunkPlacer { let dir_length = self.bend_length.get(random); for _ in 0..=dir_length { - if placer.place(chunk, &pos, trunk_block) { + if TrunkPlacer::place(chunk, &pos, trunk_block) { trunk_poses.push(pos); } diff --git a/pumpkin-world/src/generation/feature/features/tree/trunk/cherry.rs b/pumpkin-world/src/generation/feature/features/tree/trunk/cherry.rs index b4cffe33c..2845d878e 100644 --- a/pumpkin-world/src/generation/feature/features/tree/trunk/cherry.rs +++ b/pumpkin-world/src/generation/feature/features/tree/trunk/cherry.rs @@ -11,10 +11,10 @@ use crate::world::WorldPortalExt; use pumpkin_data::block_properties::Axis; pub struct CherryTrunkPlacer { - pub branch_count: IntProvider, - pub branch_horizontal_length: IntProvider, - pub branch_start_offset_from_top: UniformIntProvider, - pub branch_end_offset_from_top: IntProvider, + pub count: IntProvider, + pub horizontal_length: IntProvider, + pub start_offset_from_top: UniformIntProvider, + pub end_offset_from_top: IntProvider, } impl CherryTrunkPlacer { @@ -30,7 +30,7 @@ impl CherryTrunkPlacer { below_trunk_provider: &BlockStateProvider, trunk_state: &BlockState, ) -> (Vec, Vec) { - placer.set_dirt( + TrunkPlacer::set_dirt( block_registry, chunk, random, @@ -41,10 +41,10 @@ impl CherryTrunkPlacer { let mut logs = Vec::new(); let first_branch_offset = - (height as i32 - 1 + self.branch_start_offset_from_top.get(random)).max(0); + (height as i32 - 1 + self.start_offset_from_top.get(random)).max(0); let second_branch_start_offset_from_top = UniformIntProvider::new( - self.branch_start_offset_from_top.min_inclusive, - self.branch_start_offset_from_top.max_inclusive - 1, + self.start_offset_from_top.min_inclusive, + self.start_offset_from_top.max_inclusive - 1, ); let mut second_branch_offset = (height as i32 - 1 + second_branch_start_offset_from_top.get(random)).max(0); @@ -53,7 +53,7 @@ impl CherryTrunkPlacer { second_branch_offset += 1; } - let branch_count = self.branch_count.get(random); + let branch_count = self.count.get(random); let has_middle_branch = branch_count == 3; let has_both_side_branches = branch_count >= 2; @@ -67,7 +67,7 @@ impl CherryTrunkPlacer { for y in 0..trunk_height { let pos = start_pos.up_height(y as i32); - if placer.place(chunk, &pos, trunk_state) { + if TrunkPlacer::place(chunk, &pos, trunk_state) { logs.push(pos); } } @@ -126,7 +126,7 @@ impl CherryTrunkPlacer { #[expect(clippy::too_many_arguments)] fn generate_branch( &self, - placer: &TrunkPlacer, + _placer: &TrunkPlacer, tree_height: u32, origin: BlockPos, chunk: &mut T, @@ -139,12 +139,11 @@ impl CherryTrunkPlacer { let mut logs = Vec::new(); let mut log_pos = origin.up_height(offset_from_origin); - let branch_end_pos_offset = - tree_height as i32 - 1 + self.branch_end_offset_from_top.get(random); + let branch_end_pos_offset = tree_height as i32 - 1 + self.end_offset_from_top.get(random); let extend_branch_away_from_trunk = middle_continues_upwards || branch_end_pos_offset < offset_from_origin; let distance_to_trunk = - self.branch_horizontal_length.get(random) + i32::from(extend_branch_away_from_trunk); + self.horizontal_length.get(random) + i32::from(extend_branch_away_from_trunk); let branch_end_pos = origin .add( @@ -161,11 +160,11 @@ impl CherryTrunkPlacer { } else { Axis::Z }; - let sideways_state = self.get_sideways_state(trunk_state, axis); + let sideways_state = Self::get_sideways_state(trunk_state, axis); for _ in 0..steps_horizontally { log_pos = log_pos.add(branch_direction.0.x, 0, branch_direction.0.z); - if placer.place(chunk, &log_pos, sideways_state) { + if TrunkPlacer::place(chunk, &log_pos, sideways_state) { logs.push(log_pos); } } @@ -196,19 +195,19 @@ impl CherryTrunkPlacer { if grow_vertically { log_pos = log_pos.up_height(vertical_direction); - if placer.place(chunk, &log_pos, trunk_state) { + if TrunkPlacer::place(chunk, &log_pos, trunk_state) { logs.push(log_pos); } } else { log_pos = log_pos.add(branch_direction.0.x, 0, branch_direction.0.z); - if placer.place(chunk, &log_pos, sideways_state) { + if TrunkPlacer::place(chunk, &log_pos, sideways_state) { logs.push(log_pos); } } } } - fn get_sideways_state(&self, trunk_state: &BlockState, axis: Axis) -> &'static BlockState { + fn get_sideways_state(trunk_state: &BlockState, axis: Axis) -> &'static BlockState { let block = Block::from_state_id(trunk_state.id); if let Some(props_source) = block.properties(trunk_state.id) { let mut props = props_source.to_props(); diff --git a/pumpkin-world/src/generation/feature/features/tree/trunk/dark_oak.rs b/pumpkin-world/src/generation/feature/features/tree/trunk/dark_oak.rs index 83ffb7bfa..aa22c3a12 100644 --- a/pumpkin-world/src/generation/feature/features/tree/trunk/dark_oak.rs +++ b/pumpkin-world/src/generation/feature/features/tree/trunk/dark_oak.rs @@ -19,7 +19,7 @@ impl DarkOakTrunkPlacer { #[expect(clippy::too_many_arguments)] pub fn generate( block_registry: &dyn WorldPortalExt, - placer: &TrunkPlacer, + _placer: &TrunkPlacer, height: u32, start_pos: BlockPos, chunk: &mut T, @@ -28,22 +28,22 @@ impl DarkOakTrunkPlacer { trunk_block: &BlockState, ) -> (Vec, Vec) { let below = start_pos.down(); - placer.set_dirt(block_registry, chunk, random, &below, below_trunk_provider); - placer.set_dirt( + TrunkPlacer::set_dirt(block_registry, chunk, random, &below, below_trunk_provider); + TrunkPlacer::set_dirt( block_registry, chunk, random, &below.east(), below_trunk_provider, ); - placer.set_dirt( + TrunkPlacer::set_dirt( block_registry, chunk, random, &below.south(), below_trunk_provider, ); - placer.set_dirt( + TrunkPlacer::set_dirt( block_registry, chunk, random, @@ -75,16 +75,16 @@ impl DarkOakTrunkPlacer { // Check if air or leaves at the main 2x2 position let state = GenerationCache::get_block_state(chunk, &pos.0); if TreeFeature::is_air_or_leaves(state.to_state(), state.to_block_id()) { - if placer.try_place(chunk, &pos, trunk_block) { + if TrunkPlacer::try_place(chunk, &pos, trunk_block) { trunk_poses.push(pos); } - if placer.try_place(chunk, &pos.east(), trunk_block) { + if TrunkPlacer::try_place(chunk, &pos.east(), trunk_block) { trunk_poses.push(pos.east()); } - if placer.try_place(chunk, &pos.south(), trunk_block) { + if TrunkPlacer::try_place(chunk, &pos.south(), trunk_block) { trunk_poses.push(pos.south()); } - if placer.try_place(chunk, &pos.east().south(), trunk_block) { + if TrunkPlacer::try_place(chunk, &pos.east().south(), trunk_block) { trunk_poses.push(pos.east().south()); } } @@ -110,7 +110,7 @@ impl DarkOakTrunkPlacer { ey - branch_y - 1, start_pos.0.z + oz, ); - if placer.try_place(chunk, &pos, trunk_block) { + if TrunkPlacer::try_place(chunk, &pos, trunk_block) { trunk_poses.push(pos); } } diff --git a/pumpkin-world/src/generation/feature/features/tree/trunk/fancy.rs b/pumpkin-world/src/generation/feature/features/tree/trunk/fancy.rs index 8c409ff8a..3903c9a11 100644 --- a/pumpkin-world/src/generation/feature/features/tree/trunk/fancy.rs +++ b/pumpkin-world/src/generation/feature/features/tree/trunk/fancy.rs @@ -25,7 +25,7 @@ impl FancyTrunkPlacer { #[expect(clippy::too_many_arguments)] pub fn generate( block_registry: &dyn WorldPortalExt, - placer: &TrunkPlacer, + _placer: &TrunkPlacer, height: u32, start_pos: BlockPos, chunk: &mut T, @@ -36,7 +36,7 @@ impl FancyTrunkPlacer { let j = height as i32 + 2; let k = ((j as f64) * 0.618).floor() as i32; - placer.set_dirt( + TrunkPlacer::set_dirt( block_registry, chunk, random, diff --git a/pumpkin-world/src/generation/feature/features/tree/trunk/forking.rs b/pumpkin-world/src/generation/feature/features/tree/trunk/forking.rs index c1dbdc681..65f188363 100644 --- a/pumpkin-world/src/generation/feature/features/tree/trunk/forking.rs +++ b/pumpkin-world/src/generation/feature/features/tree/trunk/forking.rs @@ -15,7 +15,7 @@ impl ForkingTrunkPlacer { #[expect(clippy::too_many_arguments)] pub fn generate( block_registry: &dyn WorldPortalExt, - placer: &TrunkPlacer, + _placer: &TrunkPlacer, height: u32, start_pos: BlockPos, chunk: &mut T, @@ -23,7 +23,7 @@ impl ForkingTrunkPlacer { below_trunk_provider: &BlockStateProvider, trunk_state: &BlockState, ) -> (Vec, Vec) { - placer.set_dirt( + TrunkPlacer::set_dirt( block_registry, chunk, random, @@ -53,7 +53,7 @@ impl ForkingTrunkPlacer { } let pos = BlockPos::new(current_tx, yy, current_tz); - if placer.place(chunk, &pos, trunk_state) { + if TrunkPlacer::place(chunk, &pos, trunk_state) { logs.push(pos); last_y = Some(yy + 1); } @@ -84,7 +84,7 @@ impl ForkingTrunkPlacer { branch_tx += offset.x; branch_tz += offset.z; let pos = BlockPos::new(branch_tx, yyx, branch_tz); - if placer.place(chunk, &pos, trunk_state) { + if TrunkPlacer::place(chunk, &pos, trunk_state) { logs.push(pos); branch_last_y = Some(yyx + 1); } diff --git a/pumpkin-world/src/generation/feature/features/tree/trunk/giant.rs b/pumpkin-world/src/generation/feature/features/tree/trunk/giant.rs index 3ef9eafa2..91c8d0494 100644 --- a/pumpkin-world/src/generation/feature/features/tree/trunk/giant.rs +++ b/pumpkin-world/src/generation/feature/features/tree/trunk/giant.rs @@ -16,7 +16,7 @@ impl GiantTrunkPlacer { #[expect(clippy::too_many_arguments)] pub fn generate( block_registry: &dyn WorldPortalExt, - placer: &TrunkPlacer, + _placer: &TrunkPlacer, height: u32, start_pos: BlockPos, chunk: &mut T, @@ -25,22 +25,22 @@ impl GiantTrunkPlacer { trunk_block: &BlockState, ) -> (Vec, Vec) { let pos = start_pos.down(); - placer.set_dirt(block_registry, chunk, random, &pos, below_trunk_provider); - placer.set_dirt( + TrunkPlacer::set_dirt(block_registry, chunk, random, &pos, below_trunk_provider); + TrunkPlacer::set_dirt( block_registry, chunk, random, &pos.east(), below_trunk_provider, ); - placer.set_dirt( + TrunkPlacer::set_dirt( block_registry, chunk, random, &pos.south(), below_trunk_provider, ); - placer.set_dirt( + TrunkPlacer::set_dirt( block_registry, chunk, random, @@ -50,20 +50,20 @@ impl GiantTrunkPlacer { let mut trunk_poses = Vec::new(); for y in 0..height { - if placer.try_place(chunk, &pos.up_height(y as i32), trunk_block) { + if TrunkPlacer::try_place(chunk, &pos.up_height(y as i32), trunk_block) { trunk_poses.push(pos.up_height(y as i32)); } if y >= height - 1 { continue; } - if placer.try_place(chunk, &pos.east().up_height(y as i32), trunk_block) { + if TrunkPlacer::try_place(chunk, &pos.east().up_height(y as i32), trunk_block) { trunk_poses.push(pos.east().up_height(y as i32)); } - if placer.try_place(chunk, &pos.east().south().up_height(y as i32), trunk_block) { + if TrunkPlacer::try_place(chunk, &pos.east().south().up_height(y as i32), trunk_block) { trunk_poses.push(pos.east().south().up_height(y as i32)); } - if placer.try_place(chunk, &pos.south().up_height(y as i32), trunk_block) { + if TrunkPlacer::try_place(chunk, &pos.south().up_height(y as i32), trunk_block) { trunk_poses.push(pos.south().up_height(y as i32)); } } diff --git a/pumpkin-world/src/generation/feature/features/tree/trunk/mega_jungle.rs b/pumpkin-world/src/generation/feature/features/tree/trunk/mega_jungle.rs index ba37230b0..835aa0b9c 100644 --- a/pumpkin-world/src/generation/feature/features/tree/trunk/mega_jungle.rs +++ b/pumpkin-world/src/generation/feature/features/tree/trunk/mega_jungle.rs @@ -56,7 +56,7 @@ impl MegaJungleTrunkPlacer { let block_pos = start_pos.add(j_val, i - 3 + l / 2, k_val); - if placer.try_place(chunk, &block_pos, trunk_block) { + if TrunkPlacer::try_place(chunk, &block_pos, trunk_block) { trunk_poses.push(block_pos); } } diff --git a/pumpkin-world/src/generation/feature/features/tree/trunk/mod.rs b/pumpkin-world/src/generation/feature/features/tree/trunk/mod.rs index fdd39c8c1..39be8f2eb 100644 --- a/pumpkin-world/src/generation/feature/features/tree/trunk/mod.rs +++ b/pumpkin-world/src/generation/feature/features/tree/trunk/mod.rs @@ -42,7 +42,6 @@ impl TrunkPlacer { } pub fn set_dirt( - &self, block_registry: &dyn WorldPortalExt, chunk: &mut T, random: &mut RandomGenerator, @@ -56,7 +55,6 @@ impl TrunkPlacer { } pub fn place( - &self, chunk: &mut T, pos: &BlockPos, trunk_block: &BlockState, @@ -70,14 +68,13 @@ impl TrunkPlacer { } pub fn try_place( - &self, chunk: &mut T, pos: &BlockPos, trunk_block: &BlockState, ) -> bool { let block = GenerationCache::get_block_state(chunk, &pos.0); if TreeFeature::can_replace_or_log(block.to_state(), block.to_block_id()) { - return self.place(chunk, pos, trunk_block); + return Self::place(chunk, pos, trunk_block); } false } diff --git a/pumpkin-world/src/generation/feature/features/tree/trunk/straight.rs b/pumpkin-world/src/generation/feature/features/tree/trunk/straight.rs index c4e719741..5c61a1006 100644 --- a/pumpkin-world/src/generation/feature/features/tree/trunk/straight.rs +++ b/pumpkin-world/src/generation/feature/features/tree/trunk/straight.rs @@ -14,7 +14,7 @@ impl StraightTrunkPlacer { #[expect(clippy::too_many_arguments)] pub fn generate( block_registry: &dyn WorldPortalExt, - placer: &TrunkPlacer, + _placer: &TrunkPlacer, height: u32, start_pos: BlockPos, chunk: &mut T, @@ -22,7 +22,7 @@ impl StraightTrunkPlacer { below_trunk_provider: &BlockStateProvider, trunk_state: &BlockState, ) -> (Vec, Vec) { - placer.set_dirt( + TrunkPlacer::set_dirt( block_registry, chunk, random, @@ -32,7 +32,7 @@ impl StraightTrunkPlacer { let mut logs = Vec::new(); for i in 0..height { let pos = start_pos.up_height(i as i32); - if placer.place(chunk, &pos, trunk_state) { + if TrunkPlacer::place(chunk, &pos, trunk_state) { logs.push(pos); } } diff --git a/pumpkin-world/src/generation/feature/features/twisting_vines.rs b/pumpkin-world/src/generation/feature/features/twisting_vines.rs index f315092ab..82782cfae 100644 --- a/pumpkin-world/src/generation/feature/features/twisting_vines.rs +++ b/pumpkin-world/src/generation/feature/features/twisting_vines.rs @@ -22,7 +22,7 @@ impl TwistingVinesFeature { random: &mut RandomGenerator, pos: BlockPos, ) -> bool { - if self.is_invalid_location(chunk, &pos) { + if Self::is_invalid_location(chunk, &pos) { return false; } @@ -39,7 +39,7 @@ impl TwistingVinesFeature { let mut mutable_pos = pos.add(offset_x, offset_y, offset_z); if self.find_target_y(chunk, &mut mutable_pos) - && !self.is_invalid_location(chunk, &mutable_pos) + && !Self::is_invalid_location(chunk, &mutable_pos) { let mut height = random.next_bounded_i32(self.max_height) + 1; if random.next_bounded_i32(6) == 0 { @@ -49,7 +49,7 @@ impl TwistingVinesFeature { height = 1; } - self.generate_column(chunk, random, &mutable_pos, height); + Self::generate_column(chunk, random, &mutable_pos, height); placed = true; } } @@ -58,7 +58,6 @@ impl TwistingVinesFeature { } fn generate_column( - &self, chunk: &mut T, random: &mut RandomGenerator, pos: &BlockPos, @@ -91,7 +90,7 @@ impl TwistingVinesFeature { } } - fn is_invalid_location(&self, chunk: &T, pos: &BlockPos) -> bool { + fn is_invalid_location(chunk: &T, pos: &BlockPos) -> bool { if !GenerationCache::get_block_state(chunk, &pos.0) .to_state() .is_air() diff --git a/pumpkin-world/src/generation/feature/features/underwater_magma.rs b/pumpkin-world/src/generation/feature/features/underwater_magma.rs index 3eaa0d059..9a9bdf28e 100644 --- a/pumpkin-world/src/generation/feature/features/underwater_magma.rs +++ b/pumpkin-world/src/generation/feature/features/underwater_magma.rs @@ -47,7 +47,7 @@ impl UnderwaterMagmaFeature { } /// Check if a block can host magma - fn is_valid_placement(&self, chunk: &T, target: &BlockPos) -> bool { + fn is_valid_placement(chunk: &T, target: &BlockPos) -> bool { // Reject water/air or unsupported blocks let target_id = GenerationCache::get_block_state(chunk, &target.0).to_block_id(); if target_id == Block::WATER || target_id == Block::AIR { @@ -84,9 +84,8 @@ impl UnderwaterMagmaFeature { pos: BlockPos, ) -> bool { // Locate floor; abort if none - let floor_y = match self.get_floor_y(chunk, pos) { - Some(y) => y, - None => return false, + let Some(floor_y) = self.get_floor_y(chunk, pos) else { + return false; }; let floor_pos = BlockPos::new(pos.0.x, floor_y, pos.0.z); @@ -105,7 +104,7 @@ impl UnderwaterMagmaFeature { let target_pos = BlockPos::new(floor_pos.0.x + dx, floor_pos.0.y + dy, floor_pos.0.z + dz); - if !self.is_valid_placement(chunk, &target_pos) { + if !Self::is_valid_placement(chunk, &target_pos) { continue; } diff --git a/pumpkin-world/src/generation/feature/features/vegetation_patch.rs b/pumpkin-world/src/generation/feature/features/vegetation_patch.rs index 23915ef9d..00aed5d35 100644 --- a/pumpkin-world/src/generation/feature/features/vegetation_patch.rs +++ b/pumpkin-world/src/generation/feature/features/vegetation_patch.rs @@ -173,7 +173,9 @@ impl VegetationPatchFeature { depth: i32, ) -> bool { for i in 0..depth { - let state_to_place = self.ground_state.get(random, below_pos); + let state_to_place = self + .ground_state + .get(random, below_pos, chunk, block_registry); let below_state_raw = GenerationCache::get_block_state(chunk, &below_pos.0); let state_block_id = pumpkin_data::Block::from_state_id(state_to_place.id).id; diff --git a/pumpkin-world/src/generation/feature/features/vines.rs b/pumpkin-world/src/generation/feature/features/vines.rs index 4b173e5b2..3cd79c3fe 100644 --- a/pumpkin-world/src/generation/feature/features/vines.rs +++ b/pumpkin-world/src/generation/feature/features/vines.rs @@ -7,9 +7,7 @@ use crate::world::WorldPortalExt; pub struct VinesFeature; impl VinesFeature { - #[expect(clippy::too_many_arguments)] pub fn generate( - &self, chunk: &mut T, _block_registry: &dyn WorldPortalExt, _min_y: i8, diff --git a/pumpkin-world/src/generation/feature/features/void_start_platform.rs b/pumpkin-world/src/generation/feature/features/void_start_platform.rs index 1b17d98ff..ecd8e5552 100644 --- a/pumpkin-world/src/generation/feature/features/void_start_platform.rs +++ b/pumpkin-world/src/generation/feature/features/void_start_platform.rs @@ -1,3 +1 @@ -pub struct VoidStartPlatformFeature { - // TODO -} +pub struct VoidStartPlatformFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/features/weeping_vines.rs b/pumpkin-world/src/generation/feature/features/weeping_vines.rs index 18d88a414..fea808719 100644 --- a/pumpkin-world/src/generation/feature/features/weeping_vines.rs +++ b/pumpkin-world/src/generation/feature/features/weeping_vines.rs @@ -1,3 +1 @@ -pub struct WeepingVinesFeature { - // TODO -} +pub struct WeepingVinesFeature; // TODO diff --git a/pumpkin-world/src/generation/feature/placed_features.rs b/pumpkin-world/src/generation/feature/placed_features.rs index 28fb03bef..1e1a74801 100644 --- a/pumpkin-world/src/generation/feature/placed_features.rs +++ b/pumpkin-world/src/generation/feature/placed_features.rs @@ -61,14 +61,11 @@ impl PlacedFeature { .expect("Name: {name:?} not found"), Feature::Inlined(feature) => feature, }; - match feature { - ConfiguredFeature::SculkPatch(feature) => { - feature.generate_in_proto_chunk(chunk, random, pos) - } - _ => { - tracing::warn!("Placed feature {feature_name:?} is not supported in a jigsaw pool"); - false - } + if let ConfiguredFeature::SculkPatch(feature) = feature { + feature.generate_in_proto_chunk(chunk, random, pos) + } else { + tracing::warn!("Placed feature {feature_name:?} is not supported in a jigsaw pool"); + false } } @@ -189,21 +186,19 @@ impl PlacementModifier { } pub struct NoiseBasedCountPlacementModifier { - pub noise_to_count_ratio: i32, - pub noise_factor: f64, - pub noise_offset: f64, + pub to_count_ratio: i32, + pub factor: f64, + pub offset: f64, } impl CountPlacementModifierBase for NoiseBasedCountPlacementModifier { fn get_count(&self, _random: &mut RandomGenerator, pos: BlockPos) -> i32 { - let noise = FOLIAGE_NOISE - .sample( - pos.0.x as f64 / self.noise_factor, - pos.0.z as f64 / self.noise_factor, - false, - ) - .max(0.0); // TODO: max is wrong - ((noise + self.noise_offset) * self.noise_to_count_ratio as f64).ceil() as i32 + let noise = FOLIAGE_NOISE.sample( + pos.0.x as f64 / self.factor, + pos.0.z as f64 / self.factor, + false, + ); + ((noise + self.offset) * self.to_count_ratio as f64).ceil() as i32 } } diff --git a/pumpkin-world/src/generation/noise/aquifer_sampler.rs b/pumpkin-world/src/generation/noise/aquifer_sampler.rs index 399e516c1..c2cc83cac 100644 --- a/pumpkin-world/src/generation/noise/aquifer_sampler.rs +++ b/pumpkin-world/src/generation/noise/aquifer_sampler.rs @@ -442,6 +442,7 @@ impl WorldAquiferSampler { default_level.block } + #[expect(clippy::too_many_lines)] fn apply_internal( &mut self, router: &mut ChunkNoiseRouter, @@ -703,6 +704,7 @@ mod random_positions_and_hypot { ProtoNoiseRouters::generate(router_ast, &RANDOM_CONFIG) }); + #[expect(clippy::unreachable)] fn create_aquifer( base_router: &'_ ProtoNoiseRouters, ) -> ( @@ -711,6 +713,8 @@ mod random_positions_and_hypot { SurfaceHeightEstimateSampler<'_>, ChunkNoiseFunctionSampleOptions, ) { + const CHUNK_WIDTH: usize = 16; + let surface_config = GenerationSettings::from_dimension(&Dimension::OVERWORLD); let shape = &surface_config.shape; let chunk_x = 7; @@ -720,7 +724,6 @@ mod random_positions_and_hypot { FluidLevel::new(63, &WATER_BLOCK), FluidLevel::new(-54, &LAVA_BLOCK), ); - const CHUNK_WIDTH: usize = 16; let noise = ChunkNoiseGenerator::new( &base_router.noise, &RANDOM_CONFIG, @@ -771,6 +774,7 @@ mod random_positions_and_hypot { } #[test] + #[expect(clippy::too_many_lines, clippy::large_stack_arrays)] fn get_fluid_block_state() { let (_, mut router, _, options) = create_aquifer(&PROTO_ROUTER); let level = FluidLevel::new(0, &WATER_BLOCK); @@ -920,6 +924,7 @@ mod random_positions_and_hypot { } #[test] + #[expect(clippy::too_many_lines)] fn get_noise_based_fluid_level() { let (_, mut router, _, options) = create_aquifer(&PROTO_ROUTER); @@ -1067,6 +1072,7 @@ mod random_positions_and_hypot { } #[test] + #[expect(clippy::too_many_lines)] fn get_fluid_block_y() { let (_, mut router, _, env) = create_aquifer(&PROTO_ROUTER); let level = FluidLevel::new(0, &WATER_BLOCK); @@ -1360,6 +1366,7 @@ mod random_positions_and_hypot { } #[test] + #[expect(clippy::too_many_lines, clippy::large_stack_arrays)] fn get_fluid_level() { let (aquifer, mut router, mut height_estimator, env) = create_aquifer(&PROTO_ROUTER); let values = [ @@ -1501,12 +1508,13 @@ mod random_positions_and_hypot { &mut height_estimator, &env, ); - assert_eq!(level.max_y, y1, "Failed at x={}, y={}, z={}", x, y, z); + assert_eq!(level.max_y, y1, "Failed at x={x}, y={y}, z={z}"); assert_eq!(level.block, &state); } } #[test] + #[expect(clippy::too_many_lines)] fn calculate_density() { let (_, mut router, _, env) = create_aquifer(&PROTO_ROUTER); @@ -1659,7 +1667,7 @@ mod random_positions_and_hypot { } #[test] - #[expect(clippy::large_stack_arrays)] + #[expect(clippy::too_many_lines, clippy::large_stack_arrays)] fn apply() { let (mut aquifer, mut router, mut height_estimator, env) = create_aquifer(&PROTO_ROUTER); let values = [ @@ -2413,7 +2421,7 @@ mod random_positions_and_hypot { let pos = Vector3::new(x, y, z); assert_eq!( aquifer.apply_internal(&mut router, &pos, &env, &mut height_estimator, sample), - result.map(|r| r.to_state()) + result.map(pumpkin_data::BlockStateId::to_state) ); } } diff --git a/pumpkin-world/src/generation/noise/router/chunk_noise_router.rs b/pumpkin-world/src/generation/noise/router/chunk_noise_router.rs index 3907dc975..6b9d74b88 100644 --- a/pumpkin-world/src/generation/noise/router/chunk_noise_router.rs +++ b/pumpkin-world/src/generation/noise/router/chunk_noise_router.rs @@ -329,6 +329,7 @@ impl ChunkNoiseRouter<'_> { impl<'a> ChunkNoiseRouter<'a> { #[must_use] + #[expect(clippy::too_many_lines)] pub fn generate( base: &'a ProtoNoiseRouter, build_options: &ChunkNoiseFunctionBuilderOptions, diff --git a/pumpkin-world/src/generation/noise/router/density_function/beardifier.rs b/pumpkin-world/src/generation/noise/router/density_function/beardifier.rs index 9256a1fd8..62ba571dc 100644 --- a/pumpkin-world/src/generation/noise/router/density_function/beardifier.rs +++ b/pumpkin-world/src/generation/noise/router/density_function/beardifier.rs @@ -12,6 +12,7 @@ const BEARD_KERNEL_SIZE: i32 = 24; static BEARD_KERNEL: OnceLock<[f64; 13824]> = OnceLock::new(); +#[expect(clippy::large_stack_arrays)] fn get_beard_kernel() -> &'static [f64; 13824] { BEARD_KERNEL.get_or_init(|| { let mut kernel = [0.0; 13824]; @@ -129,9 +130,8 @@ impl Beardifier { impl StaticIndependentChunkNoiseFunctionComponentImpl for Beardifier { fn sample(&self, pos: &Vector3) -> f64 { - let affected_box = match self.affected_box { - Some(b) => b, - None => return 0.0, + let Some(affected_box) = self.affected_box else { + return 0.0; }; let block_x = pos.x; diff --git a/pumpkin-world/src/generation/noise/router/density_function/math.rs b/pumpkin-world/src/generation/noise/router/density_function/math.rs index c220282f3..8d87852dc 100644 --- a/pumpkin-world/src/generation/noise/router/density_function/math.rs +++ b/pumpkin-world/src/generation/noise/router/density_function/math.rs @@ -392,8 +392,8 @@ impl StaticChunkNoiseFunctionComponentImpl for Clamp { mapper, sample_options, ); - array.iter_mut().for_each(|value| { + for value in array.iter_mut() { *value = self.data.apply_density(*value); - }); + } } } diff --git a/pumpkin-world/src/generation/noise/router/proto_noise_router.rs b/pumpkin-world/src/generation/noise/router/proto_noise_router.rs index 512c48565..2ca94ccb4 100644 --- a/pumpkin-world/src/generation/noise/router/proto_noise_router.rs +++ b/pumpkin-world/src/generation/noise/router/proto_noise_router.rs @@ -135,6 +135,8 @@ fn build_spline_recursive(spline_repr: &SplineRepr) -> SplineValue { impl ProtoNoiseRouters { #[must_use] + #[expect(clippy::too_many_lines)] + #[expect(clippy::unreachable)] pub fn generate_proto_stack( base_stack: &[BaseNoiseFunctionComponent], random_config: &GlobalRandomConfig, diff --git a/pumpkin-world/src/generation/proto_chunk.rs b/pumpkin-world/src/generation/proto_chunk.rs index 97396e737..3fdbedc76 100644 --- a/pumpkin-world/src/generation/proto_chunk.rs +++ b/pumpkin-world/src/generation/proto_chunk.rs @@ -226,7 +226,9 @@ impl ProtoChunk { let mut proto_chunk = Self::new(chunk_data.x, chunk_data.z, generator); proto_chunk.light = chunk_data.light_engine.lock().unwrap().clone(); - proto_chunk.blending_data = chunk_data.blending_data.clone(); + proto_chunk + .blending_data + .clone_from(&chunk_data.blending_data); let section_data = &chunk_data.section; let heightmap_data = chunk_data.heightmap.lock().unwrap(); @@ -349,10 +351,12 @@ impl ProtoChunk { #[must_use] pub const fn get_top_y(&self, heightmap: &HeightMap, x: i32, z: i32) -> i32 { match heightmap { - HeightMap::WorldSurfaceWg => self.top_block_height_exclusive(x, z), - HeightMap::WorldSurface => self.top_block_height_exclusive(x, z), - HeightMap::OceanFloorWg => self.ocean_floor_height_exclusive(x, z), - HeightMap::OceanFloor => self.ocean_floor_height_exclusive(x, z), + HeightMap::WorldSurfaceWg | HeightMap::WorldSurface => { + self.top_block_height_exclusive(x, z) + } + HeightMap::OceanFloorWg | HeightMap::OceanFloor => { + self.ocean_floor_height_exclusive(x, z) + } HeightMap::MotionBlocking => self.top_motion_blocking_block_height_exclusive(x, z), HeightMap::MotionBlockingNoLeaves => { self.top_motion_blocking_block_no_leaves_height_exclusive(x, z) @@ -498,6 +502,7 @@ impl ProtoChunk { self.stage = StagedChunkEnum::Biomes; } + #[expect(clippy::too_many_lines)] pub fn step_to_noise(&mut self, generator: &super::generator::VanillaGenerator) { debug_assert_eq!(self.stage, StagedChunkEnum::StructureReferences); @@ -573,13 +578,10 @@ impl ProtoChunk { // Java only adds to rigids if projection is RIGID if jigsaw_piece.projection == crate::generation::structure::structures::jigsaw::JigsawProjection::Rigid { ground_level_delta = jigsaw_piece.ground_level_delta; - any_piece_bounding_box = match any_piece_bounding_box { - Some(mut b) => { - b.encompass(&bounding_box); - Some(b) - } - None => Some(bounding_box), - }; + any_piece_bounding_box = any_piece_bounding_box.map_or(Some(bounding_box), |mut b| { + b.encompass(&bounding_box); + Some(b) + }); beardifier_structures.push( crate::generation::noise::router::density_function::beardifier::BeardifierStructure { @@ -606,24 +608,18 @@ impl ProtoChunk { z: j_z, } ); - let junction_box = BlockBox::from_pos(BlockPos::new(j_x, j.source_ground_y, j_z)); - any_piece_bounding_box = match any_piece_bounding_box { - Some(mut b) => { - b.encompass(&junction_box); - Some(b) - } - None => Some(junction_box), - }; + let _junction_box = BlockBox::from_pos(BlockPos::new(j_x, j.source_ground_y, j_z)); + any_piece_bounding_box = any_piece_bounding_box.map_or(Some(bounding_box), |mut b| { + b.encompass(&bounding_box); + Some(b) + }); } } } else { - any_piece_bounding_box = match any_piece_bounding_box { - Some(mut b) => { + any_piece_bounding_box = any_piece_bounding_box.map_or(Some(bounding_box), |mut b| { b.encompass(&bounding_box); - Some(b) - } - None => Some(bounding_box), - }; + Some(b) + }); beardifier_structures.push( crate::generation::noise::router::density_function::beardifier::BeardifierStructure { @@ -729,8 +725,7 @@ impl ProtoChunk { }; let base_supplier: &dyn BiomeSupplier = match &active_supplier { ActiveSupplier::End(s) => s, - ActiveSupplier::Nether(s) => s, - ActiveSupplier::Overworld(s) => s, + ActiveSupplier::Nether(s) | ActiveSupplier::Overworld(s) => s, }; let blender = Blender::empty(); let biome_supplier = blender.get_biome_supplier(base_supplier); @@ -873,6 +868,7 @@ impl ProtoChunk { Biome::from_id(self.get_terrain_gen_biome_id(x, y, z)).unwrap() } + #[expect(clippy::too_many_lines)] pub fn build_surface( &mut self, generator: &super::generator::VanillaGenerator, @@ -1291,6 +1287,7 @@ impl ProtoChunk { false } + #[expect(clippy::too_many_lines)] pub fn set_structure_references(&mut self, generator: &super::generator::VanillaGenerator) { debug_assert_eq!(self.stage, StagedChunkEnum::StructureStart); let random_config = &generator.random_config; @@ -1316,8 +1313,7 @@ impl ProtoChunk { let base_supplier: &dyn BiomeSupplier = match &active_supplier { ActiveSupplier::End(s) => s, - ActiveSupplier::Nether(s) => s, - ActiveSupplier::Overworld(s) => s, + ActiveSupplier::Nether(s) | ActiveSupplier::Overworld(s) => s, }; let blender = Blender::empty(); let biome_supplier = blender.get_biome_supplier(base_supplier); diff --git a/pumpkin-world/src/generation/rule/block_match.rs b/pumpkin-world/src/generation/rule/block_match.rs index 511063724..e484f6feb 100644 --- a/pumpkin-world/src/generation/rule/block_match.rs +++ b/pumpkin-world/src/generation/rule/block_match.rs @@ -6,7 +6,7 @@ pub struct BlockMatchRuleTest { impl BlockMatchRuleTest { #[must_use] - pub fn test(&self, state: BlockStateId) -> bool { + pub const fn test(&self, state: BlockStateId) -> bool { state.to_block_id().as_u16() == self.block.as_u16() } } diff --git a/pumpkin-world/src/generation/structure/structures/desert_pyramid.rs b/pumpkin-world/src/generation/structure/structures/desert_pyramid.rs index c137d1d5f..986b2092d 100644 --- a/pumpkin-world/src/generation/structure/structures/desert_pyramid.rs +++ b/pumpkin-world/src/generation/structure/structures/desert_pyramid.rs @@ -245,6 +245,7 @@ impl DesertPyramidPiece { self.piece.add_block(chunk, sand, x, y + 1, z + 4, bb); } + #[expect(clippy::too_many_lines)] fn add_cellar_room(&self, chunk: &mut ProtoChunk, bb: &BlockBox, random: &mut RandomGenerator) { let (x, y, z) = (16, -4, 13); let cut = Block::CUT_SANDSTONE.default_state; diff --git a/pumpkin-world/src/generation/structure/structures/jigsaw.rs b/pumpkin-world/src/generation/structure/structures/jigsaw.rs index 2ef1cd070..ebf777df3 100644 --- a/pumpkin-world/src/generation/structure/structures/jigsaw.rs +++ b/pumpkin-world/src/generation/structure/structures/jigsaw.rs @@ -39,7 +39,7 @@ pub enum PoolElementKind { template: String, processors: ProcessorListRef, }, - List(Vec), + List(Vec), Feature(pumpkin_data::placed_feature::PlacedFeature), } @@ -75,7 +75,7 @@ enum RawPoolElement { }, #[serde(rename = "minecraft:list_pool_element")] List { - elements: Vec, + elements: Vec, projection: RawProjection, }, #[serde(rename = "minecraft:feature_pool_element")] @@ -208,7 +208,7 @@ impl PoolElement { } #[must_use] - pub fn feature(&self) -> Option { + pub const fn feature(&self) -> Option { match self.kind { PoolElementKind::Feature(feature) => Some(feature), _ => None, @@ -381,7 +381,6 @@ impl JigsawBlock { let up_part = parts.next().unwrap_or("up"); let facing = match facing_part { - "north" => pumpkin_util::BlockDirection::North, "south" => pumpkin_util::BlockDirection::South, "east" => pumpkin_util::BlockDirection::East, "west" => pumpkin_util::BlockDirection::West, @@ -395,7 +394,6 @@ impl JigsawBlock { "south" => pumpkin_util::BlockDirection::South, "east" => pumpkin_util::BlockDirection::East, "west" => pumpkin_util::BlockDirection::West, - "up" => pumpkin_util::BlockDirection::Up, "down" => pumpkin_util::BlockDirection::Down, _ => pumpkin_util::BlockDirection::Up, }; @@ -575,7 +573,6 @@ impl StructureGenerator for JigsawGenerator { structure .and_then(|s| s.liquid_settings) .map_or(LiquidSettings::ApplyWaterlog, |ls| match ls { - "apply_waterlogging" => LiquidSettings::ApplyWaterlog, "ignore_waterlogging" => LiquidSettings::IgnoreWaterlogDone, _ => LiquidSettings::ApplyWaterlog, }); @@ -596,8 +593,8 @@ impl StructureGenerator for JigsawGenerator { start_pos, self.use_expansion_hack, project_start_to_heightmap, - MaxDistance::new(max_distance), - dimension_padding, + &MaxDistance::new(max_distance), + &dimension_padding, liquid_settings, &PoolAliasLookup, ) diff --git a/pumpkin-world/src/generation/structure/structures/jigsaw_placement.rs b/pumpkin-world/src/generation/structure/structures/jigsaw_placement.rs index 727c2537d..183cea3b6 100644 --- a/pumpkin-world/src/generation/structure/structures/jigsaw_placement.rs +++ b/pumpkin-world/src/generation/structure/structures/jigsaw_placement.rs @@ -65,6 +65,7 @@ impl PoolAliasLookup { impl JigsawPlacement { #[expect(clippy::too_many_arguments)] + #[expect(clippy::too_many_lines)] pub fn add_pieces( context: &mut StructureGeneratorContext, start_pool_id: &str, @@ -73,8 +74,8 @@ impl JigsawPlacement { position: BlockPos, do_expansion_hack: bool, project_start_to_heightmap: bool, - max_distance_from_center: MaxDistance, - dimension_padding: DimensionPadding, + max_distance_from_center: &MaxDistance, + dimension_padding: &DimensionPadding, liquid_settings: LiquidSettings, pool_alias_lookup: &PoolAliasLookup, ) -> Option { @@ -236,9 +237,8 @@ impl JigsawPlacement { } let target_pool_id = pool_alias_lookup.lookup(raw_pool_id); - let target_pool = match TemplatePool::discover(target_pool_id) { - Some(p) => p, - None => continue, + let Some(target_pool) = TemplatePool::discover(target_pool_id) else { + continue; }; let mut target_elements = Vec::new(); @@ -258,9 +258,8 @@ impl JigsawPlacement { break; } - let target_size = match get_element_size(&element) { - Some(size) => size, - None => continue, + let Some(target_size) = get_element_size(&element) else { + continue; }; let target_projection = element.projection; let target_rigid = target_projection == JigsawProjection::Rigid; @@ -387,13 +386,15 @@ impl JigsawPlacement { let child_pool_max_y = get_pool_max_y_size(child_pool_id); - let mut child_fallback_max_y = 0; - if let Some(cp) = TemplatePool::discover(child_pool_id) + let child_fallback_max_y = if let Some(cp) = + TemplatePool::discover(child_pool_id) { - child_fallback_max_y = get_pool_max_y_size( + get_pool_max_y_size( pool_alias_lookup.lookup(&cp.fallback), - ); - } + ) + } else { + 0 + }; expand_to = expand_to .max(child_pool_max_y) diff --git a/pumpkin-world/src/generation/structure/structures/jungle_temple.rs b/pumpkin-world/src/generation/structure/structures/jungle_temple.rs index 406cf32c1..d1f41c0db 100644 --- a/pumpkin-world/src/generation/structure/structures/jungle_temple.rs +++ b/pumpkin-world/src/generation/structure/structures/jungle_temple.rs @@ -112,32 +112,131 @@ impl StructurePieceBase for JungleTemplePiece { WIDTH - 1, 0, DEPTH - 1, - Self::SS.next(random), + MossStoneSelector::next(random), ); self.piece - .fill(chunk, bb, 2, 1, 2, 9, 2, 2, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 2, 1, 12, 9, 2, 12, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 2, 1, 3, 2, 2, 11, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 9, 1, 3, 9, 2, 11, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 1, 3, 1, 10, 6, 1, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 1, 3, 13, 10, 6, 13, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 1, 3, 2, 1, 6, 12, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 10, 3, 2, 10, 6, 12, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 2, 3, 2, 9, 3, 12, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 2, 6, 2, 9, 6, 12, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 3, 7, 3, 8, 7, 11, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 4, 8, 4, 7, 8, 10, Self::SS.next(random)); + .fill(chunk, bb, 2, 1, 2, 9, 2, 2, MossStoneSelector::next(random)); + self.piece.fill( + chunk, + bb, + 2, + 1, + 12, + 9, + 2, + 12, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 2, + 1, + 3, + 2, + 2, + 11, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 9, + 1, + 3, + 9, + 2, + 11, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 1, + 3, + 1, + 10, + 6, + 1, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 1, + 3, + 13, + 10, + 6, + 13, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 1, + 3, + 2, + 1, + 6, + 12, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 10, + 3, + 2, + 10, + 6, + 12, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 2, + 3, + 2, + 9, + 3, + 12, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 2, + 6, + 2, + 9, + 6, + 12, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 3, + 7, + 3, + 8, + 7, + 11, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 4, + 8, + 4, + 7, + 8, + 10, + MossStoneSelector::next(random), + ); let a = Block::AIR.default_state; self.piece.fill(chunk, bb, 3, 1, 3, 8, 2, 11, a); self.piece.fill(chunk, bb, 4, 3, 6, 7, 3, 9, a); @@ -154,47 +253,83 @@ impl StructurePieceBase for JungleTemplePiece { self.piece.add_block(chunk, a, 10, 5, 9, bb); for z in (0..=14).step_by(14) { self.piece - .fill(chunk, bb, 2, 4, z, 2, 5, z, Self::SS.next(random)); + .fill(chunk, bb, 2, 4, z, 2, 5, z, MossStoneSelector::next(random)); self.piece - .fill(chunk, bb, 4, 4, z, 4, 5, z, Self::SS.next(random)); + .fill(chunk, bb, 4, 4, z, 4, 5, z, MossStoneSelector::next(random)); self.piece - .fill(chunk, bb, 7, 4, z, 7, 5, z, Self::SS.next(random)); + .fill(chunk, bb, 7, 4, z, 7, 5, z, MossStoneSelector::next(random)); self.piece - .fill(chunk, bb, 9, 4, z, 9, 5, z, Self::SS.next(random)); + .fill(chunk, bb, 9, 4, z, 9, 5, z, MossStoneSelector::next(random)); } self.piece - .fill(chunk, bb, 5, 6, 0, 6, 6, 0, Self::SS.next(random)); + .fill(chunk, bb, 5, 6, 0, 6, 6, 0, MossStoneSelector::next(random)); for x in (0..=11).step_by(11) { for z in (2..=12).step_by(2) { self.piece - .fill(chunk, bb, x, 4, z, x, 5, z, Self::SS.next(random)); + .fill(chunk, bb, x, 4, z, x, 5, z, MossStoneSelector::next(random)); } self.piece - .fill(chunk, bb, x, 6, 5, x, 6, 5, Self::SS.next(random)); + .fill(chunk, bb, x, 6, 5, x, 6, 5, MossStoneSelector::next(random)); self.piece - .fill(chunk, bb, x, 6, 9, x, 6, 9, Self::SS.next(random)); + .fill(chunk, bb, x, 6, 9, x, 6, 9, MossStoneSelector::next(random)); } self.piece - .fill(chunk, bb, 2, 7, 2, 2, 9, 2, Self::SS.next(random)); + .fill(chunk, bb, 2, 7, 2, 2, 9, 2, MossStoneSelector::next(random)); self.piece - .fill(chunk, bb, 9, 7, 2, 9, 9, 2, Self::SS.next(random)); + .fill(chunk, bb, 9, 7, 2, 9, 9, 2, MossStoneSelector::next(random)); + self.piece.fill( + chunk, + bb, + 2, + 7, + 12, + 2, + 9, + 12, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 9, + 7, + 12, + 9, + 9, + 12, + MossStoneSelector::next(random), + ); self.piece - .fill(chunk, bb, 2, 7, 12, 2, 9, 12, Self::SS.next(random)); + .fill(chunk, bb, 4, 9, 4, 4, 9, 4, MossStoneSelector::next(random)); self.piece - .fill(chunk, bb, 9, 7, 12, 9, 9, 12, Self::SS.next(random)); + .fill(chunk, bb, 7, 9, 4, 7, 9, 4, MossStoneSelector::next(random)); + self.piece.fill( + chunk, + bb, + 4, + 9, + 10, + 4, + 9, + 10, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 7, + 9, + 10, + 7, + 9, + 10, + MossStoneSelector::next(random), + ); self.piece - .fill(chunk, bb, 4, 9, 4, 4, 9, 4, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 7, 9, 4, 7, 9, 4, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 4, 9, 10, 4, 9, 10, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 7, 9, 10, 7, 9, 10, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 5, 9, 7, 6, 9, 7, Self::SS.next(random)); + .fill(chunk, bb, 5, 9, 7, 6, 9, 7, MossStoneSelector::next(random)); let east_stairs = Self::cobblestone_stairs(HorizontalFacing::East); let west_stairs = Self::cobblestone_stairs(HorizontalFacing::West); let south_stairs = Self::cobblestone_stairs(HorizontalFacing::South); @@ -214,13 +349,22 @@ impl StructurePieceBase for JungleTemplePiece { self.piece.add_block(chunk, north_stairs, 7, 2, 9, bb); self.piece.add_block(chunk, north_stairs, 7, 3, 10, bb); self.piece - .fill(chunk, bb, 4, 1, 9, 4, 1, 9, Self::SS.next(random)); + .fill(chunk, bb, 4, 1, 9, 4, 1, 9, MossStoneSelector::next(random)); self.piece - .fill(chunk, bb, 7, 1, 9, 7, 1, 9, Self::SS.next(random)); + .fill(chunk, bb, 7, 1, 9, 7, 1, 9, MossStoneSelector::next(random)); + self.piece.fill( + chunk, + bb, + 4, + 1, + 10, + 7, + 2, + 10, + MossStoneSelector::next(random), + ); self.piece - .fill(chunk, bb, 4, 1, 10, 7, 2, 10, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 5, 4, 5, 6, 4, 5, Self::SS.next(random)); + .fill(chunk, bb, 5, 4, 5, 6, 4, 5, MossStoneSelector::next(random)); self.piece.add_block(chunk, east_stairs, 4, 4, 5, bb); self.piece.add_block(chunk, west_stairs, 7, 4, 5, bb); for i in 0..4 { @@ -236,22 +380,76 @@ impl StructurePieceBase for JungleTemplePiece { self.piece.fill(chunk, bb, 1, -3, 1, 3, -1, 13, a); self.piece.fill(chunk, bb, 1, -3, 1, 9, -1, 5, a); for z in (1..=13).step_by(2) { - self.piece - .fill(chunk, bb, 1, -3, z, 1, -2, z, Self::SS.next(random)); + self.piece.fill( + chunk, + bb, + 1, + -3, + z, + 1, + -2, + z, + MossStoneSelector::next(random), + ); } for z in (2..=12).step_by(2) { - self.piece - .fill(chunk, bb, 1, -1, z, 3, -1, z, Self::SS.next(random)); + self.piece.fill( + chunk, + bb, + 1, + -1, + z, + 3, + -1, + z, + MossStoneSelector::next(random), + ); } - self.piece - .fill(chunk, bb, 2, -2, 1, 5, -2, 1, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 7, -2, 1, 9, -2, 1, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 6, -3, 1, 6, -3, 1, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 6, -1, 1, 6, -1, 1, Self::SS.next(random)); + self.piece.fill( + chunk, + bb, + 2, + -2, + 1, + 5, + -2, + 1, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 7, + -2, + 1, + 9, + -2, + 1, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 6, + -3, + 1, + 6, + -3, + 1, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 6, + -1, + 1, + 6, + -1, + 1, + MossStoneSelector::next(random), + ); self.piece.add_block( chunk, Self::attached_tripwire_hook_facing(HorizontalFacing::East), @@ -434,8 +632,17 @@ impl StructurePieceBase for JungleTemplePiece { .add_block(chunk, Block::MOSSY_COBBLESTONE.default_state, 7, -1, 5, bb); self.piece .add_block(chunk, Block::MOSSY_COBBLESTONE.default_state, 8, -3, 5, bb); - self.piece - .fill(chunk, bb, 9, -1, 1, 9, -1, 5, Self::SS.next(random)); + self.piece.fill( + chunk, + bb, + 9, + -1, + 1, + 9, + -1, + 5, + MossStoneSelector::next(random), + ); self.piece.fill(chunk, bb, 8, -3, 8, 10, -1, 10, a); self.piece.add_block( chunk, @@ -470,10 +677,28 @@ impl StructurePieceBase for JungleTemplePiece { self.piece.add_block(chunk, lever, 8, -2, 12, bb); self.piece.add_block(chunk, lever, 9, -2, 12, bb); self.piece.add_block(chunk, lever, 10, -2, 12, bb); - self.piece - .fill(chunk, bb, 8, -3, 8, 8, -3, 10, Self::SS.next(random)); - self.piece - .fill(chunk, bb, 10, -3, 8, 10, -3, 10, Self::SS.next(random)); + self.piece.fill( + chunk, + bb, + 8, + -3, + 8, + 8, + -3, + 10, + MossStoneSelector::next(random), + ); + self.piece.fill( + chunk, + bb, + 10, + -3, + 8, + 10, + -3, + 10, + MossStoneSelector::next(random), + ); self.piece .add_block(chunk, Block::MOSSY_COBBLESTONE.default_state, 10, -2, 9, bb); self.piece.add_block(chunk, redstone_wire_ns, 8, -2, 9, bb); @@ -560,7 +785,7 @@ impl JungleTemplePiece { self.height_adjusted = true; true } - // This allows you to call Self::SS.next(random) SS is stoneselector + // This allows you to call MossStoneSelector::next(random) SS is stoneselector const SS: MossStoneSelector = MossStoneSelector; fn cobblestone_stairs(facing: HorizontalFacing) -> &'static BlockState { let mut props = OakStairsLikeProperties::default(&Block::COBBLESTONE_STAIRS); @@ -625,7 +850,7 @@ impl JungleTemplePiece { struct MossStoneSelector; impl MossStoneSelector { - fn next(&self, random: &mut RandomGenerator) -> &BlockState { + fn next(random: &mut RandomGenerator) -> &BlockState { if random.next_f32() < 0.4 { Block::COBBLESTONE.default_state } else { diff --git a/pumpkin-world/src/generation/structure/structures/mod.rs b/pumpkin-world/src/generation/structure/structures/mod.rs index 63417c35d..b9ce988cd 100644 --- a/pumpkin-world/src/generation/structure/structures/mod.rs +++ b/pumpkin-world/src/generation/structure/structures/mod.rs @@ -381,7 +381,7 @@ impl StructurePiece { } } - pub fn is_under_sea_level( + pub const fn is_under_sea_level( &self, chunk: &mut ProtoChunk, x: i32, diff --git a/pumpkin-world/src/generation/structure/structures/nether_fortress/corridor_exit.rs b/pumpkin-world/src/generation/structure/structures/nether_fortress/corridor_exit.rs index 8b35ceef8..b7713ba18 100644 --- a/pumpkin-world/src/generation/structure/structures/nether_fortress/corridor_exit.rs +++ b/pumpkin-world/src/generation/structure/structures/nether_fortress/corridor_exit.rs @@ -86,6 +86,7 @@ impl StructurePieceBase for CorridorExitPiece { ); } + #[allow(clippy::too_many_lines)] fn place( &mut self, chunk: &mut ProtoChunk, diff --git a/pumpkin-world/src/generation/structure/structures/nether_fortress/corridor_nether_warts_room.rs b/pumpkin-world/src/generation/structure/structures/nether_fortress/corridor_nether_warts_room.rs index c6ac1e852..4d1c9cd40 100644 --- a/pumpkin-world/src/generation/structure/structures/nether_fortress/corridor_nether_warts_room.rs +++ b/pumpkin-world/src/generation/structure/structures/nether_fortress/corridor_nether_warts_room.rs @@ -96,6 +96,7 @@ impl StructurePieceBase for CorridorNetherWartsRoomPiece { ); } + #[allow(clippy::too_many_lines)] fn place( &mut self, chunk: &mut ProtoChunk, diff --git a/pumpkin-world/src/generation/structure/structures/nether_fortress/mod.rs b/pumpkin-world/src/generation/structure/structures/nether_fortress/mod.rs index 8d3979641..761d6ddd2 100644 --- a/pumpkin-world/src/generation/structure/structures/nether_fortress/mod.rs +++ b/pumpkin-world/src/generation/structure/structures/nether_fortress/mod.rs @@ -279,6 +279,7 @@ impl NetherFortressPiece { } #[allow(clippy::too_many_arguments)] + #[allow(clippy::too_many_lines)] pub fn create_piece( piece_type: NetherFortressPieceType, collector: &mut StructurePiecesCollector, diff --git a/pumpkin-world/src/generation/structure/structures/nether_fossil.rs b/pumpkin-world/src/generation/structure/structures/nether_fossil.rs index 04d778ccb..9b80fe12f 100644 --- a/pumpkin-world/src/generation/structure/structures/nether_fossil.rs +++ b/pumpkin-world/src/generation/structure/structures/nether_fossil.rs @@ -162,10 +162,10 @@ impl StructurePieceBase for NetherFossilPiece { fn place( &mut self, chunk: &mut ProtoChunk, - _block_registry: &dyn WorldPortalExt, + block_registry: &dyn WorldPortalExt, _random: &mut RandomGenerator, seed: i64, - _chunk_box: &BlockBox, + chunk_box: &BlockBox, ) { // Vanilla column scan: find air above soul sand or solid block let Some(placement_y) = self.find_placement_y(chunk) else { @@ -190,12 +190,12 @@ impl StructurePieceBase for NetherFossilPiece { true, false, &[], - Some(_chunk_box), + Some(chunk_box), ); // Vanilla: 50% chance to place a dried ghast block at the fossil base. // Uses a deterministic random seeded from world seed + bounding box center. - self.try_place_dried_ghast(chunk, _block_registry, seed); + self.try_place_dried_ghast(chunk, block_registry, seed); } fn get_structure_piece(&self) -> &StructurePiece { diff --git a/pumpkin-world/src/generation/structure/structures/stronghold/five_way_crossing.rs b/pumpkin-world/src/generation/structure/structures/stronghold/five_way_crossing.rs index c3b631d9f..589ab4267 100644 --- a/pumpkin-world/src/generation/structure/structures/stronghold/five_way_crossing.rs +++ b/pumpkin-world/src/generation/structure/structures/stronghold/five_way_crossing.rs @@ -163,6 +163,7 @@ impl StructurePieceBase for FiveWayCrossingPiece { } } + #[allow(clippy::too_many_lines)] fn place( &mut self, chunk: &mut ProtoChunk, diff --git a/pumpkin-world/src/generation/structure/structures/stronghold/mod.rs b/pumpkin-world/src/generation/structure/structures/stronghold/mod.rs index c05792864..fe37597ba 100644 --- a/pumpkin-world/src/generation/structure/structures/stronghold/mod.rs +++ b/pumpkin-world/src/generation/structure/structures/stronghold/mod.rs @@ -267,6 +267,7 @@ impl StrongholdPiece { bb.min.y > 10 } + #[allow(clippy::too_many_lines)] fn generate_entrance( &self, chunk: &mut ProtoChunk, diff --git a/pumpkin-world/src/generation/structure/structures/stronghold/portal_room.rs b/pumpkin-world/src/generation/structure/structures/stronghold/portal_room.rs index d24f1412e..8691c6ac7 100644 --- a/pumpkin-world/src/generation/structure/structures/stronghold/portal_room.rs +++ b/pumpkin-world/src/generation/structure/structures/stronghold/portal_room.rs @@ -92,6 +92,7 @@ impl StructurePieceBase for PortalRoomPiece { *has_portal_room = true; } + #[allow(clippy::too_many_lines)] fn place( &mut self, chunk: &mut ProtoChunk, diff --git a/pumpkin-world/src/generation/structure/structures/swamp_hut.rs b/pumpkin-world/src/generation/structure/structures/swamp_hut.rs index 3400bf7fd..cf9001923 100644 --- a/pumpkin-world/src/generation/structure/structures/swamp_hut.rs +++ b/pumpkin-world/src/generation/structure/structures/swamp_hut.rs @@ -63,6 +63,7 @@ impl StructurePieceBase for SwampHutPiece { fn as_any(&self) -> &dyn std::any::Any { self } + #[allow(clippy::too_many_lines)] fn place( &mut self, chunk: &mut ProtoChunk, diff --git a/pumpkin-world/src/generation/structure/template/block_state_resolver.rs b/pumpkin-world/src/generation/structure/template/block_state_resolver.rs index fcd167643..dff6cf333 100644 --- a/pumpkin-world/src/generation/structure/template/block_state_resolver.rs +++ b/pumpkin-world/src/generation/structure/template/block_state_resolver.rs @@ -33,9 +33,7 @@ impl BlockStateResolver { // Find the block let block = Block::from_name(&entry.name).or_else(|| Block::from_registry_key(block_name)); - let block = if let Some(b) = block { - b - } else { + let Some(block) = block else { warn!("Unknown block in template: {}", entry.name); return None; }; @@ -93,16 +91,14 @@ impl BlockStateResolver { "axis" => rotation.rotate_axis(value).to_string(), // Block rotation (signs, banners - 0-15 value) - "rotation" => { - if let Ok(rot_value) = value.parse::() { + "rotation" => value.parse::().map_or_else( + |_| value.to_string(), + |rot_value| { let mirrored = mirror.mirror_block_rotation(rot_value); let rotated = rotation.rotate_block_rotation(mirrored); - // Use static strings for the 16 possible rotation values Self::rotation_to_str(rotated).to_string() - } else { - value.to_string() - } - } + }, + ), // Half properties don't need rotation (top/bottom stays the same) // Shape, mode, and most other properties don't need transformation either @@ -113,7 +109,6 @@ impl BlockStateResolver { /// Converts a rotation value (0-15) to a static string. const fn rotation_to_str(rotation: i32) -> &'static str { match rotation % 16 { - 0 => "0", 1 => "1", 2 => "2", 3 => "3", @@ -139,14 +134,14 @@ mod tests { use super::*; #[test] - fn test_resolve_simple_block() { + fn resolve_simple_block() { let entry = PaletteEntry::new("minecraft:stone".to_string()); let state = BlockStateResolver::resolve_simple(&entry); assert!(state.is_some()); } #[test] - fn test_resolve_with_properties() { + fn resolve_with_properties() { let entry = PaletteEntry::with_properties( "minecraft:oak_stairs".to_string(), vec![ @@ -161,7 +156,7 @@ mod tests { } #[test] - fn test_rotation_transforms_facing() { + fn rotation_transforms_facing() { let entry = PaletteEntry::with_properties( "minecraft:furnace".to_string(), vec![ @@ -180,7 +175,7 @@ mod tests { } #[test] - fn test_unknown_block_returns_none() { + fn unknown_block_returns_none() { let entry = PaletteEntry::new("minecraft:nonexistent_block".to_string()); let state = BlockStateResolver::resolve_simple(&entry); assert!(state.is_none()); diff --git a/pumpkin-world/src/generation/structure/template/mod.rs b/pumpkin-world/src/generation/structure/template/mod.rs index f6a9f4efa..614d5d874 100644 --- a/pumpkin-world/src/generation/structure/template/mod.rs +++ b/pumpkin-world/src/generation/structure/template/mod.rs @@ -30,6 +30,7 @@ pub mod processor; mod structure_template; mod template_piece; +use pumpkin_data::Mirror; use pumpkin_data::Rotation; use pumpkin_nbt::compound::NbtCompound; use pumpkin_util::math::vector3::Vector3; @@ -104,7 +105,7 @@ pub fn place_template( // Resolve block state with rotation applied to directional properties let Some(mut state) = - BlockStateResolver::resolve(&placed_entry, rotation, Default::default()) + BlockStateResolver::resolve(&placed_entry, rotation, Mirror::default()) else { continue; }; @@ -138,7 +139,7 @@ pub fn place_template( { *waterlogged = "true".to_string(); if let Some(waterlogged_state) = - BlockStateResolver::resolve(&placed_entry, rotation, Default::default()) + BlockStateResolver::resolve(&placed_entry, rotation, Mirror::default()) { state = waterlogged_state; } diff --git a/pumpkin-world/src/generation/structure/template/structure_template.rs b/pumpkin-world/src/generation/structure/template/structure_template.rs index 06edfc678..f0bd21b9e 100644 --- a/pumpkin-world/src/generation/structure/template/structure_template.rs +++ b/pumpkin-world/src/generation/structure/template/structure_template.rs @@ -76,23 +76,24 @@ impl PaletteEntry { /// Parses a block state string (e.g. "`minecraft:oak_log`[axis=x]") into a palette entry. #[must_use] pub fn from_string(s: &str) -> Self { - if let Some(bracket_pos) = s.find('[') { - let name = s[..bracket_pos].to_string(); - let end_bracket = s.rfind(']').unwrap_or(s.len()); - let props_str = &s[bracket_pos + 1..end_bracket]; - let properties = props_str - .split(',') - .filter_map(|p| { - let mut parts = p.split('='); - let key = parts.next()?.trim().to_string(); - let value = parts.next()?.trim().to_string(); - Some((key, value)) - }) - .collect(); - Self { name, properties } - } else { - Self::new(s.to_string()) - } + s.find('[').map_or_else( + || Self::new(s.to_string()), + |bracket_pos| { + let name = s[..bracket_pos].to_string(); + let end_bracket = s.rfind(']').unwrap_or(s.len()); + let props_str = &s[bracket_pos + 1..end_bracket]; + let properties = props_str + .split(',') + .filter_map(|p| { + let mut parts = p.split('='); + let key = parts.next()?.trim().to_string(); + let value = parts.next()?.trim().to_string(); + Some((key, value)) + }) + .collect(); + Self { name, properties } + }, + ) } } @@ -183,9 +184,8 @@ impl StructureTemplate { let mut palette = Vec::with_capacity(palette_list.len()); for tag in palette_list { - let entry_compound = match tag { - NbtTag::Compound(c) => c, - _ => return Err(TemplateError::InvalidFieldType("palette entry")), + let NbtTag::Compound(entry_compound) = tag else { + return Err(TemplateError::InvalidFieldType("palette entry")); }; let name = entry_compound @@ -193,22 +193,22 @@ impl StructureTemplate { .ok_or(TemplateError::MissingField("palette.Name"))? .to_string(); - let properties = if let Some(props_compound) = entry_compound.get_compound("Properties") - { - props_compound - .child_tags - .iter() - .filter_map(|(key, value)| { - if let NbtTag::String(v) = value { - Some((key.to_string(), v.to_string())) - } else { - None - } - }) - .collect() - } else { - Vec::new() - }; + let properties = + entry_compound + .get_compound("Properties") + .map_or_else(Vec::new, |props_compound| { + props_compound + .child_tags + .iter() + .filter_map(|(key, value)| { + if let NbtTag::String(v) = value { + Some((key.to_string(), v.to_string())) + } else { + None + } + }) + .collect() + }); palette.push(PaletteEntry { name, properties }); } @@ -227,9 +227,8 @@ impl StructureTemplate { let mut blocks = Vec::with_capacity(blocks_list.len()); for tag in blocks_list { - let block_compound = match tag { - NbtTag::Compound(c) => c, - _ => return Err(TemplateError::InvalidFieldType("blocks entry")), + let NbtTag::Compound(block_compound) = tag else { + return Err(TemplateError::InvalidFieldType("blocks entry")); }; // Parse position @@ -271,17 +270,15 @@ impl StructureTemplate { } fn parse_entities(compound: &NbtCompound) -> Result, TemplateError> { - let entities_list = match compound.get_list("entities") { - Some(list) => list, - None => return Ok(Vec::new()), + let Some(entities_list) = compound.get_list("entities") else { + return Ok(Vec::new()); }; let mut entities = Vec::with_capacity(entities_list.len()); for tag in entities_list { - let entity_compound = match tag { - NbtTag::Compound(c) => c, - _ => return Err(TemplateError::InvalidFieldType("entities entry")), + let NbtTag::Compound(entity_compound) = tag else { + return Err(TemplateError::InvalidFieldType("entities entry")); }; // Parse position (double coordinates) @@ -378,7 +375,7 @@ mod tests { use super::*; #[test] - fn test_palette_entry_creation() { + fn palette_entry_creation() { let entry = PaletteEntry::new("minecraft:stone".to_string()); assert_eq!(entry.name, "minecraft:stone"); assert!(entry.properties.is_empty()); diff --git a/pumpkin-world/src/generation/structure/template/template_piece.rs b/pumpkin-world/src/generation/structure/template/template_piece.rs index b28bf65c6..c05c2f4bb 100644 --- a/pumpkin-world/src/generation/structure/template/template_piece.rs +++ b/pumpkin-world/src/generation/structure/template/template_piece.rs @@ -132,11 +132,9 @@ impl TemplatePiece { } // Resolve the block state with rotation/mirror - let state = if let Some(s) = + let Some(state) = BlockStateResolver::resolve(palette_entry, self.rotation, self.mirror) - { - s - } else { + else { debug!("Failed to resolve block: {}", palette_entry.name); continue; }; diff --git a/pumpkin-world/src/lighting/engine.rs b/pumpkin-world/src/lighting/engine.rs index b43e52f1e..21b6b22e4 100644 --- a/pumpkin-world/src/lighting/engine.rs +++ b/pumpkin-world/src/lighting/engine.rs @@ -9,6 +9,7 @@ use pumpkin_util::HeightMap; use pumpkin_util::math::position::BlockPos; use pumpkin_util::math::vector3::Vector3; use std::collections::{HashMap, HashSet, VecDeque}; +use std::hash::RandomState; //use std::time::Instant; type FastHashSet = HashSet; @@ -23,15 +24,12 @@ pub trait LightProvider { pub struct BlockLightProvider; impl LightProvider for BlockLightProvider { - #[inline(always)] fn get_light(cache: &Cache, pos: BlockPos) -> u8 { get_block_light(cache, pos) } - #[inline(always)] fn set_light(cache: &mut Cache, pos: BlockPos, level: u8) { set_block_light(cache, pos, level); } - #[inline(always)] fn propagate_level(current_level: u8, opacity: u8, _dir: BlockDirection) -> u8 { current_level.saturating_sub(opacity.max(1)) } @@ -39,15 +37,12 @@ impl LightProvider for BlockLightProvider { pub struct SkyLightProvider; impl LightProvider for SkyLightProvider { - #[inline(always)] fn get_light(cache: &Cache, pos: BlockPos) -> u8 { get_sky_light(cache, pos) } - #[inline(always)] fn set_light(cache: &mut Cache, pos: BlockPos, level: u8) { set_sky_light(cache, pos, level); } - #[inline(always)] fn propagate_level(current_level: u8, opacity: u8, dir: BlockDirection) -> u8 { if current_level == 15 && dir == BlockDirection::Down && opacity == 0 { return 15; @@ -313,6 +308,7 @@ impl BlockLightPropagator { } impl SkyLightPropagator { + #[expect(clippy::too_many_lines)] pub fn convert_light(&mut self, cache: &mut Cache) { self.clear(); @@ -331,7 +327,7 @@ impl SkyLightPropagator { // Pre-allocate with exact size needed let capacity = ((end_x - start_x) * (end_z - start_z)) as usize; let mut surface_heights = - FastHashMap::with_capacity_and_hasher(capacity, Default::default()); + FastHashMap::with_capacity_and_hasher(capacity, RandomState::default()); // Process in Z-outer, X-inner order for better cache locality for z in start_z..end_z { diff --git a/pumpkin-world/src/lighting/storage.rs b/pumpkin-world/src/lighting/storage.rs index d178bcca5..f06834cb9 100644 --- a/pumpkin-world/src/lighting/storage.rs +++ b/pumpkin-world/src/lighting/storage.rs @@ -3,7 +3,6 @@ use crate::chunk_system::generation_cache::Cache; use crate::generation::height_limit::HeightLimitView; use pumpkin_util::math::position::BlockPos; -#[inline(always)] const fn get_chunk_index(cache: &Cache, chunk_x: i32, chunk_z: i32) -> Option { let rel_x = chunk_x - cache.x; let rel_z = chunk_z - cache.z; @@ -22,7 +21,6 @@ fn get_section_y(cache: &Cache, pos_y: i32) -> Option { Some(section) } -#[inline(always)] #[must_use] pub fn get_block_light(cache: &Cache, pos: BlockPos) -> u8 { let chunk_x = pos.0.x >> 4; diff --git a/pumpkin-world/src/world_info/anvil.rs b/pumpkin-world/src/world_info/anvil.rs index ba319912d..42af71742 100644 --- a/pumpkin-world/src/world_info/anvil.rs +++ b/pumpkin-world/src/world_info/anvil.rs @@ -135,16 +135,16 @@ pub struct LevelDat { #[cfg(test)] mod test { + use flate2::read::GzDecoder; + use pumpkin_data::game_rules::GameRuleRegistry; + use pumpkin_nbt::{deserializer::from_bytes, serializer::to_bytes}; + use pumpkin_util::{Difficulty, world_seed::Seed}; + use std::assert_matches; use std::{ fs, io::{Cursor, Read}, sync::LazyLock, }; - - use flate2::read::GzDecoder; - use pumpkin_data::game_rules::GameRuleRegistry; - use pumpkin_nbt::{deserializer::from_bytes, serializer::to_bytes}; - use pumpkin_util::{Difficulty, world_seed::Seed}; use temp_dir::TempDir; use crate::{ @@ -283,10 +283,6 @@ mod test { .unwrap(); let result = AnvilLevelInfo.read_world_info(temp_dir.path()); - match result { - Ok(_) => panic!("This should fail!"), - Err(WorldInfoError::UnsupportedDataVersion(_)) => {} - Err(_) => panic!("Wrong error!"), - } + assert_matches!(result, Err(WorldInfoError::UnsupportedDataVersion(_))); } } diff --git a/pumpkin/src/block/entities/jigsaw_block.rs b/pumpkin/src/block/entities/jigsaw_block.rs index e82c4d3d6..1c29e0a20 100644 --- a/pumpkin/src/block/entities/jigsaw_block.rs +++ b/pumpkin/src/block/entities/jigsaw_block.rs @@ -92,8 +92,8 @@ impl JigsawBlockEntity { position, false, false, - MaxDistance::new(80), - DimensionPadding::ZERO, + &MaxDistance::new(80), + &DimensionPadding::ZERO, LiquidSettings::ApplyWaterlog, &PoolAliasLookup, )