mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
fix: water swimming bug
This commit is contained in:
212
Cargo.lock
generated
212
Cargo.lock
generated
@@ -651,27 +651,27 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-assembler-x64"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f248321c6a7d4de5dcf2939368e96a397ad3f53b6a076e38d0104d1da326d37"
|
||||
checksum = "046d4b584c3bb9b5eb500c8f29549bec36be11000f1ba2a927cef3d1a9875691"
|
||||
dependencies = [
|
||||
"cranelift-assembler-x64-meta",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-assembler-x64-meta"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ab6d78ff1f7d9bf8b7e1afbedbf78ba49e38e9da479d4c8a2db094e22f64e2bc"
|
||||
checksum = "b9b194a7870becb1490366fc0ae392ccd188065ff35f8391e77ac659db6fb977"
|
||||
dependencies = [
|
||||
"cranelift-srcgen",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-bforest"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6b6005ba640213a5b95382aeaf6b82bf028309581c8d7349778d66f27dc1180b"
|
||||
checksum = "bb6a4ab44c6b371e661846b97dab687387a60ac4e2f864e2d4257284aad9e889"
|
||||
dependencies = [
|
||||
"cranelift-entity",
|
||||
"wasmtime-internal-core",
|
||||
@@ -679,9 +679,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-bitset"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "81fb5b134a12b559ff0c0f5af0fcd755ad380723b5016c4e0d36f74d39485340"
|
||||
checksum = "b8b7a44150c2f471a94023482bda1902710746e4bed9f9973d60c5a94319b06d"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
@@ -690,9 +690,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-codegen"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "85837de8be7f17a4034a6b08816f05a3144345d2091937b39d415990daca28f4"
|
||||
checksum = "01b06598133b1dd76758b8b95f8d6747c124124aade50cea96a3d88b962da9fa"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"cranelift-assembler-x64",
|
||||
@@ -718,9 +718,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-codegen-meta"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e433faa87d38e5b8ff469e44a26fea4f93e58abd7a7c10bad9810056139700c9"
|
||||
checksum = "6190e2e7bcf0a678da2f715363d34ed530fedf7a2f0ab75edaefef72a70465ff"
|
||||
dependencies = [
|
||||
"cranelift-assembler-x64-meta",
|
||||
"cranelift-codegen-shared",
|
||||
@@ -731,24 +731,24 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-codegen-shared"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5397ba61976e13944ca71230775db13ee1cb62849701ed35b753f4761ed0a9b7"
|
||||
checksum = "f583cf203d1aa8b79560e3b01f929bdacf9070b015eec4ea9c46e22a3f83e4a0"
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-control"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cc81c88765580720eb30f4fc2c1bfdb75fcbf3094f87b3cd69cecca79d77a245"
|
||||
checksum = "803159df35cc398ae54473c150b16d6c77e92ab2948be638488de126a3328fbc"
|
||||
dependencies = [
|
||||
"arbitrary",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-entity"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "463feed5d46cf8763f3ba3045284cf706dd161496e20ec9c14afbb4ba09b9e66"
|
||||
checksum = "3109e417257082d88087f5bcce677525bdaa8322b88dd7f175ed1a1fd41d546c"
|
||||
dependencies = [
|
||||
"cranelift-bitset",
|
||||
"serde",
|
||||
@@ -758,9 +758,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-frontend"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a4c5eca7696c1c04ab4c7ed8d18eadbb47d6cc9f14ec86fe0881bf1d7e97e261"
|
||||
checksum = "14db6b0e0e4994c581092df78d837be2072578f7cb2528f96a6cf895e56dee63"
|
||||
dependencies = [
|
||||
"cranelift-codegen",
|
||||
"log",
|
||||
@@ -770,15 +770,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-isle"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f1153844610cc9c6da8cf10ce205e45da1a585b7688ed558aa808bbe2e4e6d77"
|
||||
checksum = "ec66ea5025c7317383699778282ac98741d68444f956e3b1d7b62f12b7216e67"
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-native"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a97b583fe9a60f06b0464cee6be5a17f623fd91b217aaac99b51b339d19911af"
|
||||
checksum = "373ade56438e6232619d85678477d0a88a31b3581936e0503e61e96b546b0800"
|
||||
dependencies = [
|
||||
"cranelift-codegen",
|
||||
"libc",
|
||||
@@ -787,9 +787,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "cranelift-srcgen"
|
||||
version = "0.130.0"
|
||||
version = "0.130.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8594dc6bb4860fa8292f1814c76459dbfb933e1978d8222de6380efce45c7cee"
|
||||
checksum = "ef53619d3cd5c78fd998c6d9420547af26b72e6456f94c2a8a2334cb76b42baa"
|
||||
|
||||
[[package]]
|
||||
name = "crc-fast"
|
||||
@@ -1212,9 +1212,9 @@ checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59"
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.4.0"
|
||||
version = "2.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a043dc74da1e37d6afe657061213aa6f425f855399a11d3463c6ecccc4dfda1f"
|
||||
checksum = "9f1f227452a390804cdb637b74a86990f2a7d7ba4b7d5693aac9b4dd6defd8d6"
|
||||
|
||||
[[package]]
|
||||
name = "fd-lock"
|
||||
@@ -1535,6 +1535,12 @@ dependencies = [
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "hashbrown"
|
||||
version = "0.17.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
|
||||
|
||||
[[package]]
|
||||
name = "hdrhistogram"
|
||||
version = "7.5.4"
|
||||
@@ -1556,7 +1562,7 @@ checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f"
|
||||
dependencies = [
|
||||
"atomic-polyfill",
|
||||
"hash32",
|
||||
"rustc_version 0.4.1",
|
||||
"rustc_version",
|
||||
"serde",
|
||||
"spin 0.9.8",
|
||||
"stable_deref_trait",
|
||||
@@ -1874,12 +1880,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "indexmap"
|
||||
version = "2.13.1"
|
||||
version = "2.14.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "45a8a2b9cb3e0b0c1803dbb0758ffac5de2f425b23c28f518faabd9d805342ff"
|
||||
checksum = "d466e9454f08e4a911e14806c24e16fba1b4c121d1ea474396f396069cf949d9"
|
||||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.16.1",
|
||||
"hashbrown 0.17.0",
|
||||
"serde",
|
||||
"serde_core",
|
||||
]
|
||||
@@ -2713,9 +2719,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pulley-interpreter"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7975f0975fa2c047bf47d617bdf716689e42ee82b159bd000ead7330d7697a1b"
|
||||
checksum = "010dec3755eb61b2f1051ecb3611b718460b7a74c131e474de2af20a845938af"
|
||||
dependencies = [
|
||||
"cranelift-bitset",
|
||||
"log",
|
||||
@@ -2725,9 +2731,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "pulley-macros"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a210c0386ef0ddedb337ec99b91e560ae9c341415ef75958cb39ddb537bb0c84"
|
||||
checksum = "ad360c32e85ca4b083ac0e2b6856e8f11c3d5060dafa7d5dc57b370857fa3018"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -3182,32 +3188,23 @@ version = "2.1.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe"
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.2.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a"
|
||||
dependencies = [
|
||||
"semver 0.9.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version"
|
||||
version = "0.4.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92"
|
||||
dependencies = [
|
||||
"semver 1.0.28",
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version_runtime"
|
||||
version = "0.1.5"
|
||||
version = "0.3.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6de8ecd7fad7731f306f69b6e10ec5a3178c61e464dcc06979427aa4cc891145"
|
||||
checksum = "2dd18cd2bae1820af0b6ad5e54f4a51d0f3fcc53b05f845675074efcc7af071d"
|
||||
dependencies = [
|
||||
"rustc_version 0.2.3",
|
||||
"semver 0.9.0",
|
||||
"rustc_version",
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3352,15 +3349,6 @@ dependencies = [
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
dependencies = [
|
||||
"semver-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.28"
|
||||
@@ -3371,12 +3359,6 @@ dependencies = [
|
||||
"serde_core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver-parser"
|
||||
version = "0.7.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.228"
|
||||
@@ -3852,9 +3834,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "tokio"
|
||||
version = "1.51.0"
|
||||
version = "1.51.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bd1c4c0fc4a7ab90fc15ef6daaa3ec3b893f004f915f2392557ed23237820cd"
|
||||
checksum = "f66bf9585cda4b724d3e78ab34b73fb2bbaba9011b9bfdf69dc836382ea13b8c"
|
||||
dependencies = [
|
||||
"bytes",
|
||||
"libc",
|
||||
@@ -4441,7 +4423,7 @@ dependencies = [
|
||||
"bitflags",
|
||||
"hashbrown 0.15.5",
|
||||
"indexmap",
|
||||
"semver 1.0.28",
|
||||
"semver",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4453,7 +4435,7 @@ dependencies = [
|
||||
"bitflags",
|
||||
"hashbrown 0.16.1",
|
||||
"indexmap",
|
||||
"semver 1.0.28",
|
||||
"semver",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -4466,7 +4448,7 @@ dependencies = [
|
||||
"bitflags",
|
||||
"hashbrown 0.16.1",
|
||||
"indexmap",
|
||||
"semver 1.0.28",
|
||||
"semver",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -4483,9 +4465,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "54fa9f298901a64ed3eae16b130f0b30c80dbb74a9e7f129a791f4e74649b917"
|
||||
checksum = "ce205cd643d661b5ba5ba4717e13730262e8cdbc8f2eacbc7b906d45c1a74026"
|
||||
dependencies = [
|
||||
"addr2line",
|
||||
"async-trait",
|
||||
@@ -4508,7 +4490,7 @@ dependencies = [
|
||||
"pulley-interpreter",
|
||||
"rayon",
|
||||
"rustix 1.1.4",
|
||||
"semver 1.0.28",
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -4536,9 +4518,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-environ"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "75a3aaaa3a522f443af67a7ed8d4efa20b0c3784e1031980537fbfcb497f70a7"
|
||||
checksum = "0b8b78abf3677d4a0a5db82e5015b4d085ff3a1b8b472cbb8c70d4b769f019ce"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"cpp_demangle",
|
||||
@@ -4552,7 +4534,7 @@ dependencies = [
|
||||
"object",
|
||||
"postcard",
|
||||
"rustc-demangle",
|
||||
"semver 1.0.28",
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"sha2 0.10.9",
|
||||
@@ -4567,9 +4549,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-cache"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "0454f53d6c91d9a3b30be6d5dbd27e8ff595fddaafe69665df908fc385bbd836"
|
||||
checksum = "8e4fd4103ba413c0da2e636f73490c6c8e446d708cbde7573703941bc3d6a448"
|
||||
dependencies = [
|
||||
"base64 0.22.1",
|
||||
"directories-next",
|
||||
@@ -4587,9 +4569,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-component-macro"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3e0d00d29ed90a63d2445072860a8a42d7151390157236a69bc3ae056786e9c9"
|
||||
checksum = "0d3d6914f34be2f9d78d8ee9f422e834dfc204e71ccce697205fae95fed87892"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"proc-macro2",
|
||||
@@ -4602,15 +4584,15 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-component-util"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "7acfd639ca7ab9e1cc37f053edd95bed6a7bed16370a8b2643dc7d9ef3047935"
|
||||
checksum = "3751b0616b914fdd87fe1bf804694a078f321b000338e6476bc48a4d6e454f21"
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-core"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e671917bb6856ae360cb59d7aaf26f1cfd042c7b924319dd06fd380739fc0b2e"
|
||||
checksum = "22632b187e1b0716f1b9ac57ad29013bed33175fcb19e10bb6896126f82fac67"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"hashbrown 0.16.1",
|
||||
@@ -4620,9 +4602,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-cranelift"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f2dfd752e1dcf79eeeadc6f2681e2fb4a9f0b5534d18c5b9b93faccd0de2c80c"
|
||||
checksum = "8b3ca07b3e0bb3429674b173b5800577719d600774dd81bff58f775c0aaa64ee"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cranelift-codegen",
|
||||
@@ -4647,9 +4629,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-fiber"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d1e9171af643316c11d6ebe52f31f6e2a5d6d1d270de9167a7b7b6f0e3f72982"
|
||||
checksum = "20c8b2c9704eb1f33ead025ec16038277ccb63d0a14c31e99d5b765d7c36da55"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"cfg-if",
|
||||
@@ -4662,9 +4644,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-jit-debug"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1fe23134536b9883ffc2afcffae23f7ffbcb1791e2d9fac6d6464a37ea4c8fdd"
|
||||
checksum = "d950310d07391d34369f62c48336ebb14eacbd4d6f772bb5f349c24e838e0664"
|
||||
dependencies = [
|
||||
"cc",
|
||||
"object",
|
||||
@@ -4674,9 +4656,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-jit-icache-coherence"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9b3112806515fac8495883885eb8dbdde849988ae91fe6beb544c0d7c0f4c9aa"
|
||||
checksum = "3606662c156962d096be3127b8b8ae8ee2f8be3f896dad29259ff01ddb64abfd"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"libc",
|
||||
@@ -4686,9 +4668,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-unwinder"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dafc29c6e538273fda8409335137654751bdf24beab65702b7866b0a85ee108a"
|
||||
checksum = "75eef0747e52dc545b075f64fd0e0cc237ae738e641266b1970e07e2d744bc32"
|
||||
dependencies = [
|
||||
"cfg-if",
|
||||
"cranelift-codegen",
|
||||
@@ -4699,9 +4681,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-versioned-export-macros"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "772f2b105b7fdd3dfb2cdf70c297baaeb96fe76a95cdc6fa516f713f04090c73"
|
||||
checksum = "d8b0a5dab02a8fb527f547855ecc0e05f9fdc3d5bd57b8b080349408f9a6cece"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -4710,9 +4692,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-winch"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d556c3b176aba3cce565b2bafcdc049e7410ac1d86bf1ef663a035d9ded0dddc"
|
||||
checksum = "8007342bd12ff400293a817973f7ecd6f1d9a8549a53369a9c1af357166f1f1e"
|
||||
dependencies = [
|
||||
"cranelift-codegen",
|
||||
"gimli",
|
||||
@@ -4727,9 +4709,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-internal-wit-bindgen"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c47507f09e68462a0ed9f351ef410584a52e01d7ec92bc588bf7fa597ce528ef"
|
||||
checksum = "7900c3e3c1d6e475bc225d73b02d6d5484815f260022e6964dca9558e50dd01a"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags",
|
||||
@@ -4740,9 +4722,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-wasi"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "cf7fc1eb83dd0d5a368c78d2bad2660f69c03e3c07ce2dd6d1e50fc2b9ff14db"
|
||||
checksum = "ed3e3ddcfad69e9eb025bd19bff70dad45bafe1d6eacd134c0ffdfc4c161d045"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bitflags",
|
||||
@@ -4770,9 +4752,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasmtime-wasi-io"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "315fd7192148233c2c61753b5e8e2456e0ff96dd649f079148977554139ea4dc"
|
||||
checksum = "3ca5dd3b9f04a851c422d05f333366722742da46bff9369ae0191f32cf83565a"
|
||||
dependencies = [
|
||||
"async-trait",
|
||||
"bytes",
|
||||
@@ -4823,9 +4805,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wiggle"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c4e79079e7f5a8c034307bb5e61b2e63bc668e17d139705a7dea5afceab02510"
|
||||
checksum = "cc1b1135efc8e5a008971897bea8d41ca56d8d501d4efb807842ae0a1c78f639"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"thiserror 2.0.18",
|
||||
@@ -4837,9 +4819,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wiggle-generate"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "9165e5b08a6463d247b5c1292aaab16b103d0d8f5941b60d7bc0c38125eb9ffe"
|
||||
checksum = "a7bc2b0d50ec8773b44fbfe1da6cb5cc44a92deaf8483233dcf0831e6db33172"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"proc-macro2",
|
||||
@@ -4851,9 +4833,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wiggle-macro"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "5fb0a5b9476150428eead9ce1a5c83e8fd6aac29806f48c6dbf77d50a067473a"
|
||||
checksum = "2d6c7d44ea552e1fbfdcd7a2cd83f5c2d1e803d5b1a11e3462c06888b77f455f"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
@@ -4894,9 +4876,9 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||
|
||||
[[package]]
|
||||
name = "winch-codegen"
|
||||
version = "43.0.0"
|
||||
version = "43.0.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ca3d76763e4ddc48ede73792d067396ba5ee74c3c581db90e6638fe6b46bf52"
|
||||
checksum = "eb9f45f7172a2628c8317766e427babc0a400f9d10b1c0f0b0617c5ed5b79de6"
|
||||
dependencies = [
|
||||
"cranelift-assembler-x64",
|
||||
"cranelift-codegen",
|
||||
@@ -5286,7 +5268,7 @@ dependencies = [
|
||||
"id-arena",
|
||||
"indexmap",
|
||||
"log",
|
||||
"semver 1.0.28",
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -5305,7 +5287,7 @@ dependencies = [
|
||||
"id-arena",
|
||||
"indexmap",
|
||||
"log",
|
||||
"semver 1.0.28",
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -5324,7 +5306,7 @@ dependencies = [
|
||||
"id-arena",
|
||||
"indexmap",
|
||||
"log",
|
||||
"semver 1.0.28",
|
||||
"semver",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
|
||||
@@ -129,7 +129,7 @@ enum_dispatch = "0.3.13"
|
||||
flate2 = "1.1.9"
|
||||
heck = "0.5"
|
||||
hmac = "=0.13.0"
|
||||
indexmap = "2.13"
|
||||
indexmap = "2.14"
|
||||
itertools = "0.14.0"
|
||||
libloading = "0.9"
|
||||
lru = "0.16.3"
|
||||
|
||||
@@ -492,6 +492,9 @@ impl PistonBehavior {
|
||||
impl BlockState {
|
||||
/// Bit flag indicating this state is an air block.
|
||||
const IS_AIR: u16 = 1 << 0;
|
||||
|
||||
const IS_LIQUID: u16 = 1 << 5;
|
||||
|
||||
/// Bit flag indicating this state receives random tick events.
|
||||
const HAS_RANDOM_TICKS: u16 = 1 << 9;
|
||||
|
||||
@@ -505,6 +508,10 @@ impl BlockState {
|
||||
self.state_flags & Self::IS_AIR != 0
|
||||
}
|
||||
|
||||
pub const fn is_liquid(&self) -> bool {
|
||||
self.state_flags & Self::IS_LIQUID != 0
|
||||
}
|
||||
|
||||
/// Emits the `BlockState { … }` struct literal token stream for code generation.
|
||||
fn to_tokens(&self) -> TokenStream {
|
||||
let mut tokens = TokenStream::new();
|
||||
@@ -763,6 +770,7 @@ pub fn build() -> TokenStream {
|
||||
|
||||
let mut random_tick_states = Vec::new();
|
||||
let mut air_states = Vec::new();
|
||||
let mut liquid_states = Vec::new();
|
||||
|
||||
let mut constants_list = Vec::new();
|
||||
let mut block_from_name_entries = Vec::new();
|
||||
@@ -858,6 +866,10 @@ pub fn build() -> TokenStream {
|
||||
let state_id = LitInt::new(&state.id.to_string(), Span::call_site());
|
||||
air_states.push(state_id);
|
||||
}
|
||||
if state.is_liquid() {
|
||||
let state_id = LitInt::new(&state.id.to_string(), Span::call_site());
|
||||
liquid_states.push(state_id);
|
||||
}
|
||||
|
||||
let mut matched_be_id = 1;
|
||||
|
||||
@@ -961,6 +973,7 @@ pub fn build() -> TokenStream {
|
||||
let shapes = blocks_assets.shapes.iter().map(ToTokens::to_token_stream);
|
||||
|
||||
let air_state_ids = quote! { #(#air_states)|* };
|
||||
let liquid_state_ids = quote! { #(#liquid_states)|* };
|
||||
|
||||
let block_props = block_properties.iter().map(ToTokens::to_token_stream);
|
||||
let properties = property_enums.values().map(ToTokens::to_token_stream);
|
||||
@@ -1060,6 +1073,11 @@ pub fn build() -> TokenStream {
|
||||
matches!(state_id, #air_state_ids)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn is_liquid(state_id: u16) -> bool {
|
||||
matches!(state_id, #liquid_state_ids)
|
||||
}
|
||||
|
||||
#[inline(always)]
|
||||
pub fn has_random_ticks(state_id: u16) -> bool {
|
||||
#mod_ident::#contains_ident(state_id)
|
||||
|
||||
@@ -582,7 +582,7 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// All TODO/empty features
|
||||
"minecraft:fossil" => {
|
||||
quote! { ConfiguredFeature::Fossil(crate::generation::feature::features::fossil::FossilFeature {}) }
|
||||
|
||||
@@ -114,7 +114,7 @@ pub fn build() -> TokenStream {
|
||||
|
||||
quote! {
|
||||
use crate::tag::{RegistryKey, Tag, Taggable};
|
||||
|
||||
|
||||
#[derive(Clone, Copy, Debug, PartialEq)]
|
||||
pub struct DamageType {
|
||||
pub death_message_type: DeathMessageType,
|
||||
|
||||
@@ -292,9 +292,7 @@ pub enum LootConditionStruct {
|
||||
AllOf,
|
||||
/// Passes with the given probability.
|
||||
#[serde(rename = "minecraft:random_chance")]
|
||||
RandomChance {
|
||||
chance: f32,
|
||||
},
|
||||
RandomChance { chance: f32 },
|
||||
/// Passes with probability scaled by an enchantment level.
|
||||
#[serde(rename = "minecraft:random_chance_with_enchanted_bonus")]
|
||||
RandomChanceWithEnchantedBonus,
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -2,6 +2,7 @@ use crate::WritingError;
|
||||
use crate::codec::bit_set::BitSet;
|
||||
use crate::{ClientPacket, VarInt, ser::NetworkWriteExt};
|
||||
use pumpkin_data::block_state_remap::remap_block_state_for_version;
|
||||
use pumpkin_data::packet::CURRENT_MC_VERSION;
|
||||
use pumpkin_data::packet::clientbound::PLAY_LEVEL_CHUNK_WITH_LIGHT;
|
||||
use pumpkin_macros::java_packet;
|
||||
use pumpkin_nbt::END_ID;
|
||||
@@ -62,35 +63,40 @@ impl ClientPacket for CChunkData<'_> {
|
||||
let non_empty_block_count = block_palette.non_air_block_count() as i16;
|
||||
blocks_and_biomes_buf.write_i16_be(non_empty_block_count)?;
|
||||
if version >= &MinecraftVersion::V_26_1 {
|
||||
// TODO: New in 26.1, fluid count
|
||||
blocks_and_biomes_buf.write_i16_be(0)?;
|
||||
// New in 26.1, fluid count
|
||||
let liquid_count = block_palette.liquid_block_count() as i16;
|
||||
blocks_and_biomes_buf.write_i16_be(liquid_count)?;
|
||||
}
|
||||
|
||||
let mut block_network = block_palette.convert_network();
|
||||
match &mut block_network.palette {
|
||||
NetworkPalette::Single(registry_id) => {
|
||||
*registry_id = remap_block_state_for_version(*registry_id, *version);
|
||||
}
|
||||
NetworkPalette::Indirect(palette) => {
|
||||
for registry_id in palette.iter_mut() {
|
||||
if version < &CURRENT_MC_VERSION {
|
||||
match &mut block_network.palette {
|
||||
NetworkPalette::Single(registry_id) => {
|
||||
*registry_id = remap_block_state_for_version(*registry_id, *version);
|
||||
}
|
||||
}
|
||||
NetworkPalette::Direct => {
|
||||
let bits_per_entry = usize::from(block_network.bits_per_entry);
|
||||
let values_per_i64 = 64 / bits_per_entry;
|
||||
let id_mask = (1u64 << bits_per_entry) - 1;
|
||||
NetworkPalette::Indirect(palette) => {
|
||||
for registry_id in palette.iter_mut() {
|
||||
*registry_id =
|
||||
remap_block_state_for_version(*registry_id, *version);
|
||||
}
|
||||
}
|
||||
NetworkPalette::Direct => {
|
||||
let bits_per_entry = usize::from(block_network.bits_per_entry);
|
||||
let values_per_i64 = 64 / bits_per_entry;
|
||||
let id_mask = (1u64 << bits_per_entry) - 1;
|
||||
|
||||
for packed_word in &mut block_network.packed_data {
|
||||
let mut remapped_word = 0u64;
|
||||
let packed_word_u64 = *packed_word as u64;
|
||||
for index in 0..values_per_i64 {
|
||||
let shift = index * bits_per_entry;
|
||||
let state_id = ((packed_word_u64 >> shift) & id_mask) as u16;
|
||||
let remapped_id = remap_block_state_for_version(state_id, *version);
|
||||
remapped_word |= u64::from(remapped_id) << shift;
|
||||
for packed_word in &mut block_network.packed_data {
|
||||
let mut remapped_word = 0u64;
|
||||
let packed_word_u64 = *packed_word as u64;
|
||||
for index in 0..values_per_i64 {
|
||||
let shift = index * bits_per_entry;
|
||||
let state_id = ((packed_word_u64 >> shift) & id_mask) as u16;
|
||||
let remapped_id =
|
||||
remap_block_state_for_version(state_id, *version);
|
||||
remapped_word |= u64::from(remapped_id) << shift;
|
||||
}
|
||||
*packed_word = remapped_word as i64;
|
||||
}
|
||||
*packed_word = remapped_word as i64;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,8 +20,9 @@ pub struct BellBlockEntity {
|
||||
|
||||
impl BellBlockEntity {
|
||||
pub const ID: &'static str = "minecraft:bell";
|
||||
pub fn new(position: BlockPos) -> Self {
|
||||
BellBlockEntity {
|
||||
#[must_use]
|
||||
pub const fn new(position: BlockPos) -> Self {
|
||||
Self {
|
||||
position,
|
||||
last_side_hit: AtomicCell::new(None),
|
||||
ring_ticks: AtomicCell::new(0),
|
||||
@@ -38,7 +39,7 @@ impl BellBlockEntity {
|
||||
self.ringing.store(true);
|
||||
}
|
||||
}
|
||||
pub fn raiders_hear_bell(&self) -> bool {
|
||||
pub const fn raiders_hear_bell(&self) -> bool {
|
||||
//TODO
|
||||
|
||||
false
|
||||
|
||||
@@ -74,7 +74,7 @@ impl BrewingStandBlockEntity {
|
||||
}
|
||||
|
||||
// Check item recipes first (potion -> splash potion, splash -> lingering)
|
||||
for recipe in ITEM_RECIPES.iter() {
|
||||
for recipe in &ITEM_RECIPES {
|
||||
if slot.get_item().id == recipe.from().id
|
||||
&& recipe.ingredient().iter().any(|i| i.id == ingredient_id)
|
||||
{
|
||||
@@ -87,7 +87,7 @@ impl BrewingStandBlockEntity {
|
||||
slot.get_data_component::<pumpkin_data::data_component_impl::PotionContentsImpl>()
|
||||
&& let Some(potion_id) = pc.potion_id
|
||||
{
|
||||
for recipe in POTION_RECIPES.iter() {
|
||||
for recipe in &POTION_RECIPES {
|
||||
if recipe.from().id as i32 == potion_id
|
||||
&& recipe.ingredient().iter().any(|i| i.id == ingredient_id)
|
||||
{
|
||||
@@ -114,7 +114,7 @@ impl BrewingStandBlockEntity {
|
||||
let mut new_stack_opt: Option<ItemStack> = None;
|
||||
|
||||
// Try item recipes first (potion -> splash/lingering)
|
||||
for recipe in ITEM_RECIPES.iter() {
|
||||
for recipe in &ITEM_RECIPES {
|
||||
if slot.get_item().id == recipe.from().id
|
||||
&& recipe.ingredient().iter().any(|i| i.id == ingredient_id)
|
||||
{
|
||||
@@ -143,7 +143,7 @@ impl BrewingStandBlockEntity {
|
||||
.get_data_component::<pumpkin_data::data_component_impl::PotionContentsImpl>()
|
||||
&& let Some(potion_id) = pc.potion_id
|
||||
{
|
||||
for recipe in POTION_RECIPES.iter() {
|
||||
for recipe in &POTION_RECIPES {
|
||||
if recipe.from().id as i32 == potion_id
|
||||
&& recipe.ingredient().iter().any(|i| i.id == ingredient_id)
|
||||
{
|
||||
|
||||
@@ -119,19 +119,16 @@ impl LinearFileHeader {
|
||||
}
|
||||
}
|
||||
|
||||
fn to_bytes(&self) -> Box<[u8]> {
|
||||
let mut bytes: Vec<u8> = Vec::with_capacity(Self::FILE_HEADER_SIZE);
|
||||
|
||||
bytes.put_u8(self.version as u8);
|
||||
bytes.put_u64(self.newest_timestamp);
|
||||
bytes.put_u8(self.compression_level);
|
||||
bytes.put_u16(self.chunks_count);
|
||||
bytes.put_u32(self.chunks_bytes as u32);
|
||||
bytes.put_u64(self.region_hash);
|
||||
|
||||
// This should be a clear code error if the size of the header is not the expected
|
||||
// so we can unwrap the conversion safely or panic the entire program if not
|
||||
bytes.into_boxed_slice()
|
||||
fn to_bytes(&self) -> [u8; Self::FILE_HEADER_SIZE] {
|
||||
let mut bytes = [0u8; Self::FILE_HEADER_SIZE];
|
||||
let mut buf = bytes.as_mut_slice();
|
||||
buf.put_u8(self.version as u8);
|
||||
buf.put_u64(self.newest_timestamp);
|
||||
buf.put_u8(self.compression_level);
|
||||
buf.put_u16(self.chunks_count);
|
||||
buf.put_u32(self.chunks_bytes as u32);
|
||||
buf.put_u64(self.region_hash);
|
||||
bytes
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@ use std::{collections::HashMap, hash::Hash, iter::repeat_n};
|
||||
|
||||
use pumpkin_data::{
|
||||
Block, BlockState,
|
||||
block_properties::{has_random_ticks, is_air},
|
||||
block_properties::{has_random_ticks, is_air, is_liquid},
|
||||
chunk::Biome,
|
||||
fluid::Fluid,
|
||||
};
|
||||
@@ -540,6 +540,25 @@ impl BlockPalette {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn liquid_block_count(&self) -> u16 {
|
||||
match self {
|
||||
Self::Homogeneous(registry_id) => {
|
||||
if is_liquid(*registry_id) {
|
||||
0
|
||||
} else {
|
||||
Self::VOLUME as u16
|
||||
}
|
||||
}
|
||||
Self::Heterogeneous(data) => data
|
||||
.palette
|
||||
.iter()
|
||||
.zip(data.counts.iter())
|
||||
.filter_map(|(registry_id, count)| (!is_liquid(*registry_id)).then_some(*count))
|
||||
.sum(),
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn from_disk_nbt(nbt: ChunkSectionBlockStates) -> Self {
|
||||
let palette = nbt
|
||||
|
||||
@@ -4,7 +4,7 @@ use slotmap::Key;
|
||||
|
||||
pub struct ChunkHolder {
|
||||
pub target_stage: StagedChunkEnum,
|
||||
/// Minimum stage required by generation dependencies (e.g. StructureReferences neighbors).
|
||||
/// Minimum stage required by generation dependencies (e.g. `StructureReferences` neighbors).
|
||||
/// May exceed `target_stage` when this chunk is needed by a neighbor's generation task
|
||||
/// but isn't in the player's view radius. Tasks up to this stage are scheduled but the
|
||||
/// chunk is not made public and is unloaded once the dependency is satisfied.
|
||||
|
||||
@@ -363,7 +363,7 @@ impl Cache {
|
||||
&dimension,
|
||||
noise_router,
|
||||
global_structure_cache,
|
||||
)
|
||||
);
|
||||
}
|
||||
StagedChunkEnum::StructureReferences => self.chunks[mid]
|
||||
.get_proto_chunk_mut()
|
||||
|
||||
@@ -59,7 +59,7 @@ pub struct GenerationSchedule {
|
||||
chunk_map: HashMap<ChunkPos, ChunkHolder>,
|
||||
unload_chunks: HashSetType<ChunkPos>,
|
||||
|
||||
/// Tasks that are graph-ready (in_degree == 0) but cannot yet run because
|
||||
/// Tasks that are graph-ready (`in_degree` == 0) but cannot yet run because
|
||||
/// one or more of their required neighbor chunks haven't been delivered yet.
|
||||
/// Parked here and re-queued by `check_waiting_tasks()` as chunk data arrives.
|
||||
waiting_for_chunks: HashSetType<NodeKey>,
|
||||
|
||||
@@ -128,7 +128,7 @@ pub struct PillarBlockStateProvider {
|
||||
}
|
||||
|
||||
impl PillarBlockStateProvider {
|
||||
pub fn get(&self, _pos: BlockPos) -> &'static BlockState {
|
||||
pub const fn get(&self, _pos: BlockPos) -> &'static BlockState {
|
||||
// TODO: random axis
|
||||
self.state
|
||||
}
|
||||
@@ -191,7 +191,7 @@ pub struct SimpleStateProvider {
|
||||
}
|
||||
|
||||
impl SimpleStateProvider {
|
||||
pub fn get(&self, _pos: BlockPos) -> &'static BlockState {
|
||||
pub const fn get(&self, _pos: BlockPos) -> &'static BlockState {
|
||||
self.state
|
||||
}
|
||||
}
|
||||
|
||||
@@ -47,7 +47,7 @@ impl EndSpikeFeature {
|
||||
let mut spikes = self.spikes.clone();
|
||||
if spikes.is_empty() {
|
||||
let mut sizes: Vec<i32> = (0..10).collect();
|
||||
for i in (1..10_usize).rev() {
|
||||
for i in (1..10usize).rev() {
|
||||
let j = random.next_bounded_i32(i as i32 + 1) as usize;
|
||||
sizes.swap(i, j);
|
||||
}
|
||||
@@ -129,9 +129,9 @@ impl EndSpikeFeature {
|
||||
|
||||
// Iron-bar cage for guarded spikes: 5x5 walls + open top frame at dy=3.
|
||||
if spike.guarded {
|
||||
for dy in 0_i32..=3 {
|
||||
for dx in -2_i32..=2 {
|
||||
for dz in -2_i32..=2 {
|
||||
for dy in 0i32..=3 {
|
||||
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;
|
||||
|
||||
@@ -41,7 +41,7 @@ impl ForestRockFeature {
|
||||
let xr = random.next_bounded_i32(2);
|
||||
let yr = random.next_bounded_i32(2);
|
||||
let zr = random.next_bounded_i32(2);
|
||||
let threshold = (xr + yr + zr) as f32 * 0.333_f32 + 0.5_f32;
|
||||
let threshold = (xr + yr + zr) as f32 * 0.333f32 + 0.5f32;
|
||||
let threshold_sq = threshold * threshold;
|
||||
|
||||
let start = BlockPos::new(pos.0.x - xr, pos.0.y - yr, pos.0.z - zr);
|
||||
|
||||
@@ -62,7 +62,7 @@ impl UnderwaterMagmaFeature {
|
||||
}
|
||||
|
||||
// No open horizontal faces
|
||||
for dir in BlockDirection::horizontal().iter() {
|
||||
for dir in &BlockDirection::horizontal() {
|
||||
let neighbour = target.offset(dir.to_offset());
|
||||
let n_id = GenerationCache::get_block_state(chunk, &neighbour.0).to_block_id();
|
||||
if n_id == Block::WATER || n_id == Block::AIR {
|
||||
|
||||
@@ -25,7 +25,7 @@ pub struct VegetationPatchFeature {
|
||||
|
||||
impl VegetationPatchFeature {
|
||||
/// Returns the block direction that points "into" the surface (down for floor, up for ceiling).
|
||||
pub(crate) fn surface_direction(&self) -> pumpkin_data::BlockDirection {
|
||||
pub(crate) const fn surface_direction(&self) -> pumpkin_data::BlockDirection {
|
||||
match self.surface {
|
||||
VerticalSurfaceType::Floor => pumpkin_data::BlockDirection::Down,
|
||||
VerticalSurfaceType::Ceiling => pumpkin_data::BlockDirection::Up,
|
||||
|
||||
@@ -17,6 +17,7 @@ pub struct FindTopSurface {
|
||||
}
|
||||
|
||||
impl FindTopSurface {
|
||||
#[must_use]
|
||||
pub const fn new(
|
||||
density_index: usize,
|
||||
upper_bound_index: usize,
|
||||
|
||||
@@ -8,7 +8,7 @@ pub struct BlockStateMatchRuleTest {
|
||||
|
||||
impl BlockStateMatchRuleTest {
|
||||
#[must_use]
|
||||
pub fn test(&self, state: RawBlockState) -> bool {
|
||||
pub const fn test(&self, state: RawBlockState) -> bool {
|
||||
state.0 == self.block_state.id
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ use crate::generation::noise::router::multi_noise_sampler::MultiNoiseSampler;
|
||||
/// This prevents chunk generation deadlocks by allowing chunks to query a pre-calculated
|
||||
/// mathematical layout in `O(1)` time instead of triggering cascading chunk loads.
|
||||
pub struct GlobalStructureCache {
|
||||
/// A cached list of mathematically predicted (chunk_x, chunk_z) coordinates.
|
||||
/// A cached list of mathematically predicted (`chunk_x`, `chunk_z`) coordinates.
|
||||
stronghold_chunks: OnceLock<Vec<(i32, i32)>>,
|
||||
}
|
||||
impl GlobalStructureCache {
|
||||
@@ -35,8 +35,7 @@ impl GlobalStructureCache {
|
||||
pub fn get_stronghold_chunks(&self) -> &[(i32, i32)] {
|
||||
self.stronghold_chunks
|
||||
.get()
|
||||
.map(|v| v.as_slice())
|
||||
.unwrap_or(&[])
|
||||
.map_or(&[], std::vec::Vec::as_slice)
|
||||
}
|
||||
|
||||
/// Retrieves the list of chunk coordinates for Concentric Ring structures.
|
||||
|
||||
@@ -72,7 +72,7 @@ impl StructurePieceBase for CorridorBalconyPiece {
|
||||
|
||||
// In Java: `i` is 1 for EAST/SOUTH facing, 5 for WEST/NORTH.
|
||||
let i = match self.piece.piece.facing {
|
||||
Some(BlockDirection::West) | Some(BlockDirection::North) => 5,
|
||||
Some(BlockDirection::West | BlockDirection::North) => 5,
|
||||
_ => 1,
|
||||
};
|
||||
|
||||
|
||||
@@ -117,6 +117,7 @@ impl PieceWeight {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn can_generate(&self) -> bool {
|
||||
self.limit == 0 || self.generated_count < self.limit
|
||||
}
|
||||
@@ -141,6 +142,7 @@ pub enum NetherFortressPieceType {
|
||||
CorridorNetherWartsRoom,
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn get_bridge_piece_weights() -> Vec<PieceWeight> {
|
||||
vec![
|
||||
PieceWeight::new(NetherFortressPieceType::Bridge, 30, 0, true),
|
||||
@@ -152,6 +154,7 @@ pub fn get_bridge_piece_weights() -> Vec<PieceWeight> {
|
||||
]
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn get_corridor_piece_weights() -> Vec<PieceWeight> {
|
||||
vec![
|
||||
PieceWeight::new(NetherFortressPieceType::SmallCorridor, 25, 0, true),
|
||||
@@ -187,6 +190,7 @@ impl NetherFortressPiece {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn is_in_bounds(bb: &BlockBox) -> bool {
|
||||
bb.min.y > 10
|
||||
}
|
||||
@@ -595,7 +599,7 @@ impl NetherFortressPiece {
|
||||
orientation,
|
||||
self.piece.chain_length,
|
||||
) {
|
||||
collector.add_piece(p)
|
||||
collector.add_piece(p);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ impl BadLandsMaterialRule {
|
||||
pub struct BlockMaterialRule;
|
||||
|
||||
impl BlockMaterialRule {
|
||||
pub fn try_apply(state: &'static BlockState) -> &'static BlockState {
|
||||
pub const fn try_apply(state: &'static BlockState) -> &'static BlockState {
|
||||
state
|
||||
}
|
||||
}
|
||||
|
||||
@@ -88,7 +88,7 @@ tokio-util = { workspace = true, features = ["rt"] }
|
||||
|
||||
# System details & Rustc version
|
||||
sysinfo = "0.38"
|
||||
rustc_version_runtime = "0.1.*"
|
||||
rustc_version_runtime = "0.3"
|
||||
|
||||
flate2.workspace = true
|
||||
console-subscriber = { workspace = true, optional = true }
|
||||
|
||||
Reference in New Issue
Block a user