mirror of
https://github.com/Pumpkin-MC/Pumpkin.git
synced 2026-08-30 20:14:23 +00:00
chore: chunk gen just got a bit faster
This commit is contained in:
276
Cargo.lock
generated
276
Cargo.lock
generated
@@ -93,9 +93,9 @@ checksum = "c3d036a3c4ab069c7b410a2ce876bd74808d2d0888a82667669f8e783a898bf1"
|
||||
|
||||
[[package]]
|
||||
name = "arc-swap"
|
||||
version = "1.9.0"
|
||||
version = "1.9.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a07d1f37ff60921c83bdfc7407723bdefe89b44b98a9b772f225c8f9d67141a6"
|
||||
checksum = "6a3a1fd6f75306b68087b831f025c712524bcb19aad54e557b1129cfa0a2b207"
|
||||
dependencies = [
|
||||
"rustversion",
|
||||
]
|
||||
@@ -1212,9 +1212,9 @@ checksum = "dea2df4cf52843e0452895c455a1a2cfbb842a1e7329671acf418fdc53ed4c59"
|
||||
|
||||
[[package]]
|
||||
name = "fastrand"
|
||||
version = "2.3.0"
|
||||
version = "2.4.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
|
||||
checksum = "a043dc74da1e37d6afe657061213aa6f425f855399a11d3463c6ecccc4dfda1f"
|
||||
|
||||
[[package]]
|
||||
name = "fd-lock"
|
||||
@@ -1556,7 +1556,7 @@ checksum = "cdc6457c0eb62c71aac4bc17216026d8410337c4126773b9c5daba343f17964f"
|
||||
dependencies = [
|
||||
"atomic-polyfill",
|
||||
"hash32",
|
||||
"rustc_version",
|
||||
"rustc_version 0.4.1",
|
||||
"serde",
|
||||
"spin 0.9.8",
|
||||
"stable_deref_trait",
|
||||
@@ -2092,6 +2092,17 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "macro-string"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "59a9dbbfc75d2688ed057456ce8a3ee3f48d12eec09229f560f3643b9f275653"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "matchers"
|
||||
version = "0.2.0"
|
||||
@@ -2208,6 +2219,15 @@ dependencies = [
|
||||
"minimal-lexical",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "ntapi"
|
||||
version = "0.4.3"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "c3b335231dfd352ffb0f8017f3b6027a4917f7df785ea2143d8af2adc66980ae"
|
||||
dependencies = [
|
||||
"winapi",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "nu-ansi-term"
|
||||
version = "0.50.3"
|
||||
@@ -2281,6 +2301,25 @@ dependencies = [
|
||||
"libc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-core-foundation"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2a180dd8642fa45cdb7dd721cd4c11b1cadd4929ce112ebd8b9f5803cc79d536"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "objc2-io-kit"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "33fafba39597d6dc1fb709123dfa8289d39406734be322956a69f0931c73bb15"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"objc2-core-foundation",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "object"
|
||||
version = "0.38.1"
|
||||
@@ -2503,7 +2542,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "986d2e952779af96ea048f160fd9194e1751b4faea78bcf3ceb456efe008088e"
|
||||
dependencies = [
|
||||
"der 0.8.0",
|
||||
"spki 0.8.0-rc.4",
|
||||
"spki 0.8.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2523,7 +2562,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "12922b6296c06eb741b02d7b5161e3aaa22864af38dfa025a1a3ba3f68c84577"
|
||||
dependencies = [
|
||||
"der 0.8.0",
|
||||
"spki 0.8.0-rc.4",
|
||||
"spki 0.8.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -2724,11 +2763,13 @@ dependencies = [
|
||||
"rand 0.10.0",
|
||||
"rsa",
|
||||
"rustc-hash",
|
||||
"rustc_version_runtime",
|
||||
"rustyline",
|
||||
"serde",
|
||||
"serde_json",
|
||||
"sha1",
|
||||
"sha2 0.11.0",
|
||||
"sysinfo",
|
||||
"tempfile",
|
||||
"thiserror 2.0.18",
|
||||
"time",
|
||||
@@ -2739,7 +2780,7 @@ dependencies = [
|
||||
"tracing-subscriber",
|
||||
"ureq",
|
||||
"uuid",
|
||||
"wasmparser 0.246.1",
|
||||
"wasmparser 0.246.2",
|
||||
"wasmtime",
|
||||
"wasmtime-wasi",
|
||||
]
|
||||
@@ -2833,7 +2874,7 @@ dependencies = [
|
||||
"postcard",
|
||||
"tracing",
|
||||
"tracing-serde-structured",
|
||||
"wit-bindgen 0.54.0",
|
||||
"wit-bindgen 0.55.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3125,7 +3166,7 @@ dependencies = [
|
||||
"pkcs8 0.11.0-rc.11",
|
||||
"rand_core 0.10.0",
|
||||
"signature 3.0.0-rc.10",
|
||||
"spki 0.8.0-rc.4",
|
||||
"spki 0.8.0",
|
||||
"zeroize",
|
||||
]
|
||||
|
||||
@@ -3141,13 +3182,32 @@ 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",
|
||||
"semver 1.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rustc_version_runtime"
|
||||
version = "0.1.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6de8ecd7fad7731f306f69b6e10ec5a3178c61e464dcc06979427aa4cc891145"
|
||||
dependencies = [
|
||||
"rustc_version 0.2.3",
|
||||
"semver 0.9.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -3294,14 +3354,29 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.27"
|
||||
version = "0.9.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d767eb0aabc880b29956c35734170f26ed551a859dbd361d140cdbeca61ab1e2"
|
||||
checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403"
|
||||
dependencies = [
|
||||
"semver-parser",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "semver"
|
||||
version = "1.0.28"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8a7852d02fc848982e0c167ef163aaff9cd91dc640ba85e263cb1ce46fae51cd"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"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"
|
||||
@@ -3549,9 +3624,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "spki"
|
||||
version = "0.8.0-rc.4"
|
||||
version = "0.8.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "8baeff88f34ed0691978ec34440140e1572b68c7dd4a495fd14a3dc1944daa80"
|
||||
checksum = "1d9efca8738c78ee9484207732f728b1ef517bbb1833d6fc0879ca898a522f6f"
|
||||
dependencies = [
|
||||
"base64ct",
|
||||
"der 0.8.0",
|
||||
@@ -3603,6 +3678,20 @@ dependencies = [
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "sysinfo"
|
||||
version = "0.38.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f"
|
||||
dependencies = [
|
||||
"libc",
|
||||
"memchr",
|
||||
"ntapi",
|
||||
"objc2-core-foundation",
|
||||
"objc2-io-kit",
|
||||
"windows",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "system-interface"
|
||||
version = "0.27.3"
|
||||
@@ -4311,12 +4400,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-encoder"
|
||||
version = "0.246.1"
|
||||
version = "0.246.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1e1929aad146499e47362c876fcbcbb0363f730951d93438f511178626e999a8"
|
||||
checksum = "61fb705ce81adde29d2a8e99d87995e39a6e927358c91398f374474746070ef7"
|
||||
dependencies = [
|
||||
"leb128fmt",
|
||||
"wasmparser 0.246.1",
|
||||
"wasmparser 0.246.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4333,14 +4422,14 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wasm-metadata"
|
||||
version = "0.245.1"
|
||||
version = "0.246.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "da55e60097e8b37b475a0fa35c3420dd71d9eb7bd66109978ab55faf56a57efb"
|
||||
checksum = "e3e4c2aa916c425dcca61a6887d3e135acdee2c6d0ed51fd61c08d41ddaf62b1"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"indexmap",
|
||||
"wasm-encoder 0.245.1",
|
||||
"wasmparser 0.245.1",
|
||||
"wasm-encoder 0.246.2",
|
||||
"wasmparser 0.246.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4352,7 +4441,7 @@ dependencies = [
|
||||
"bitflags",
|
||||
"hashbrown 0.15.5",
|
||||
"indexmap",
|
||||
"semver",
|
||||
"semver 1.0.28",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4364,20 +4453,20 @@ dependencies = [
|
||||
"bitflags",
|
||||
"hashbrown 0.16.1",
|
||||
"indexmap",
|
||||
"semver",
|
||||
"semver 1.0.28",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wasmparser"
|
||||
version = "0.246.1"
|
||||
version = "0.246.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2d991c35d79bf8336dc1cd632ed4aacf0dc5fac4bc466c670625b037b972bb9c"
|
||||
checksum = "71cde4757396defafd25417cfb36aa3161027d06d865b0c24baaae229aac005d"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"hashbrown 0.16.1",
|
||||
"indexmap",
|
||||
"semver",
|
||||
"semver 1.0.28",
|
||||
"serde",
|
||||
]
|
||||
|
||||
@@ -4419,7 +4508,7 @@ dependencies = [
|
||||
"pulley-interpreter",
|
||||
"rayon",
|
||||
"rustix 1.1.4",
|
||||
"semver",
|
||||
"semver 1.0.28",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -4463,7 +4552,7 @@ dependencies = [
|
||||
"object",
|
||||
"postcard",
|
||||
"rustc-demangle",
|
||||
"semver",
|
||||
"semver 1.0.28",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"sha2 0.10.9",
|
||||
@@ -4703,24 +4792,24 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wast"
|
||||
version = "246.0.1"
|
||||
version = "246.0.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "96cf2d50bc7478dcca61d00df4dadf922ef46c5924db20a97e6daaf09fe1cb09"
|
||||
checksum = "fe3fe8e3bf88ad96d031b4181ddbd64634b17cb0d06dfc3de589ef43591a9a62"
|
||||
dependencies = [
|
||||
"bumpalo",
|
||||
"leb128fmt",
|
||||
"memchr",
|
||||
"unicode-width",
|
||||
"wasm-encoder 0.246.1",
|
||||
"wasm-encoder 0.246.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wat"
|
||||
version = "1.246.1"
|
||||
version = "1.246.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "723f2473b47f738c12fc11c8e0bb8b27ce7cf9c78cf1a29dadbc2d34a2513292"
|
||||
checksum = "4bd7fda1199b94fff395c2d19a153f05dbe7807630316fa9673367666fd2ad8c"
|
||||
dependencies = [
|
||||
"wast 246.0.1",
|
||||
"wast 246.0.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -4822,6 +4911,27 @@ dependencies = [
|
||||
"wasmtime-internal-cranelift",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows"
|
||||
version = "0.62.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580"
|
||||
dependencies = [
|
||||
"windows-collections",
|
||||
"windows-core",
|
||||
"windows-future",
|
||||
"windows-numerics",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-collections"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610"
|
||||
dependencies = [
|
||||
"windows-core",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-core"
|
||||
version = "0.62.2"
|
||||
@@ -4835,6 +4945,17 @@ dependencies = [
|
||||
"windows-strings",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-future"
|
||||
version = "0.3.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb"
|
||||
dependencies = [
|
||||
"windows-core",
|
||||
"windows-link",
|
||||
"windows-threading",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-implement"
|
||||
version = "0.60.2"
|
||||
@@ -4863,6 +4984,16 @@ version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
||||
|
||||
[[package]]
|
||||
name = "windows-numerics"
|
||||
version = "0.3.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26"
|
||||
dependencies = [
|
||||
"windows-core",
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-result"
|
||||
version = "0.4.1"
|
||||
@@ -4924,6 +5055,15 @@ dependencies = [
|
||||
"windows_x86_64_msvc",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows-threading"
|
||||
version = "0.2.1"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37"
|
||||
dependencies = [
|
||||
"windows-link",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "windows_aarch64_gnullvm"
|
||||
version = "0.52.6"
|
||||
@@ -5005,12 +5145,12 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen"
|
||||
version = "0.54.0"
|
||||
version = "0.55.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "2bb00254d5051d69730ee32580b7373592f10ad786757c372f0f2c7b61f86a2c"
|
||||
checksum = "6870386de1813a61406d88749d5897484e2f6fe90a39408a6a94e160d8c72378"
|
||||
dependencies = [
|
||||
"bitflags",
|
||||
"wit-bindgen-rust-macro 0.54.0",
|
||||
"wit-bindgen-rust-macro 0.55.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5026,13 +5166,13 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen-core"
|
||||
version = "0.54.0"
|
||||
version = "0.55.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "99cdef5ccf0b0e9bf30868d6f9c5ed116c84ae95f84ba29d2216d3e922de3963"
|
||||
checksum = "4779c97d3b9dda56600c3404355d404f8c6567fae0c4d8dfeb92f6e9b2c4c8c3"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"heck",
|
||||
"wit-parser 0.245.1",
|
||||
"wit-parser 0.246.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5053,18 +5193,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen-rust"
|
||||
version = "0.54.0"
|
||||
version = "0.55.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e76541e2f37ac1729db85765729daa0f3c2b5975d66699114d107525f6d6c8d5"
|
||||
checksum = "8a89a98e0efe034f47f5cf86fa8aeb5d6d7175bade32bbba476aeba29541fed9"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"heck",
|
||||
"indexmap",
|
||||
"prettyplease",
|
||||
"syn",
|
||||
"wasm-metadata 0.245.1",
|
||||
"wit-bindgen-core 0.54.0",
|
||||
"wit-component 0.245.1",
|
||||
"wasm-metadata 0.246.2",
|
||||
"wit-bindgen-core 0.55.0",
|
||||
"wit-component 0.246.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5084,17 +5224,18 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wit-bindgen-rust-macro"
|
||||
version = "0.54.0"
|
||||
version = "0.55.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "a284e17b2bc808c72ba008f6694626fa76bcac608b3d1ed0880f9add3f558f8e"
|
||||
checksum = "8b81978b3d68d12116ae8e5ef3d2125c4cb619ea30002ed20cb7549383f6fca9"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"macro-string",
|
||||
"prettyplease",
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
"wit-bindgen-core 0.54.0",
|
||||
"wit-bindgen-rust 0.54.0",
|
||||
"wit-bindgen-core 0.55.0",
|
||||
"wit-bindgen-rust 0.55.0",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5118,9 +5259,9 @@ dependencies = [
|
||||
|
||||
[[package]]
|
||||
name = "wit-component"
|
||||
version = "0.245.1"
|
||||
version = "0.246.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "4894f10d2d5cbc17c77e91f86a1e48e191a788da4425293b55c98b44ba3fcac9"
|
||||
checksum = "1936c26cb24b93dc36bf78fb5dc35c55cd37f66ecdc2d2663a717d9fb3ee951e"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"bitflags",
|
||||
@@ -5129,10 +5270,10 @@ dependencies = [
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"wasm-encoder 0.245.1",
|
||||
"wasm-metadata 0.245.1",
|
||||
"wasmparser 0.245.1",
|
||||
"wit-parser 0.245.1",
|
||||
"wasm-encoder 0.246.2",
|
||||
"wasm-metadata 0.246.2",
|
||||
"wasmparser 0.246.2",
|
||||
"wit-parser 0.246.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
@@ -5145,7 +5286,7 @@ dependencies = [
|
||||
"id-arena",
|
||||
"indexmap",
|
||||
"log",
|
||||
"semver",
|
||||
"semver 1.0.28",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -5164,7 +5305,7 @@ dependencies = [
|
||||
"id-arena",
|
||||
"indexmap",
|
||||
"log",
|
||||
"semver",
|
||||
"semver 1.0.28",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
@@ -5172,6 +5313,25 @@ dependencies = [
|
||||
"wasmparser 0.245.1",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "wit-parser"
|
||||
version = "0.246.2"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "fd979042b5ff288607ccf3b314145435453f20fc67173195f91062d2289b204d"
|
||||
dependencies = [
|
||||
"anyhow",
|
||||
"hashbrown 0.16.1",
|
||||
"id-arena",
|
||||
"indexmap",
|
||||
"log",
|
||||
"semver 1.0.28",
|
||||
"serde",
|
||||
"serde_derive",
|
||||
"serde_json",
|
||||
"unicode-xid",
|
||||
"wasmparser 0.246.2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "witx"
|
||||
version = "0.9.1"
|
||||
|
||||
@@ -180,7 +180,7 @@ ureq = "3.3.0"
|
||||
|
||||
wasmtime = "43.0"
|
||||
wasmtime-wasi = "43.0"
|
||||
wit-bindgen = "0.54"
|
||||
wit-bindgen = "0.55"
|
||||
wasmparser = "0.246"
|
||||
|
||||
postcard = { version = "1.1", features = ["alloc"] }
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"aquifer_barrier":{"firstOctave":-3,"amplitudes":[1.0]},"aquifer_fluid_level_floodedness":{"firstOctave":-7,"amplitudes":[1.0]},"aquifer_fluid_level_spread":{"firstOctave":-5,"amplitudes":[1.0]},"aquifer_lava":{"firstOctave":-1,"amplitudes":[1.0]},"badlands_pillar":{"firstOctave":-2,"amplitudes":[1.0,1.0,1.0,1.0]},"badlands_pillar_roof":{"firstOctave":-8,"amplitudes":[1.0]},"badlands_surface":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0]},"calcite":{"firstOctave":-9,"amplitudes":[1.0,1.0,1.0,1.0]},"cave_cheese":{"firstOctave":-8,"amplitudes":[0.5,1.0,2.0,1.0,2.0,1.0,0.0,2.0,0.0]},"cave_entrance":{"firstOctave":-7,"amplitudes":[0.4,0.5,1.0]},"cave_layer":{"firstOctave":-8,"amplitudes":[1.0]},"clay_bands_offset":{"firstOctave":-8,"amplitudes":[1.0]},"continentalness":{"firstOctave":-9,"amplitudes":[1.0,1.0,2.0,2.0,2.0,1.0,1.0,1.0,1.0]},"continentalness_large":{"firstOctave":-11,"amplitudes":[1.0,1.0,2.0,2.0,2.0,1.0,1.0,1.0,1.0]},"erosion":{"firstOctave":-9,"amplitudes":[1.0,1.0,0.0,1.0,1.0]},"erosion_large":{"firstOctave":-11,"amplitudes":[1.0,1.0,0.0,1.0,1.0]},"gravel":{"firstOctave":-8,"amplitudes":[1.0,1.0,1.0,1.0]},"gravel_layer":{"firstOctave":-8,"amplitudes":[1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.013333333333333334]},"ice":{"firstOctave":-4,"amplitudes":[1.0,1.0,1.0,1.0]},"iceberg_pillar":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0,1.0]},"iceberg_pillar_roof":{"firstOctave":-3,"amplitudes":[1.0]},"iceberg_surface":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0]},"jagged":{"firstOctave":-16,"amplitudes":[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]},"nether_temperature":{"firstOctave":-7,"amplitudes":[1.0,1.0]},"nether_vegetation":{"firstOctave":-7,"amplitudes":[1.0,1.0]},"nether_state_selector":{"firstOctave":-4,"amplitudes":[1.0]},"nether_wart":{"firstOctave":-3,"amplitudes":[1.0,0.0,0.0,0.9]},"netherrack":{"firstOctave":-3,"amplitudes":[1.0,0.0,0.0,0.35]},"noodle":{"firstOctave":-8,"amplitudes":[1.0]},"noodle_ridge_a":{"firstOctave":-7,"amplitudes":[1.0]},"noodle_ridge_b":{"firstOctave":-7,"amplitudes":[1.0]},"noodle_thickness":{"firstOctave":-8,"amplitudes":[1.0]},"offset":{"firstOctave":-3,"amplitudes":[1.0,1.0,1.0,0.0]},"ore_gap":{"firstOctave":-5,"amplitudes":[1.0]},"ore_vein_a":{"firstOctave":-7,"amplitudes":[1.0]},"ore_vein_b":{"firstOctave":-7,"amplitudes":[1.0]},"ore_veininess":{"firstOctave":-8,"amplitudes":[1.0]},"packed_ice":{"firstOctave":-7,"amplitudes":[1.0,1.0,1.0,1.0]},"patch":{"firstOctave":-5,"amplitudes":[1.0,0.0,0.0,0.0,0.0,0.013333333333333334]},"pillar":{"firstOctave":-7,"amplitudes":[1.0,1.0]},"pillar_rareness":{"firstOctave":-8,"amplitudes":[1.0]},"pillar_thickness":{"firstOctave":-8,"amplitudes":[1.0]},"powder_snow":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0,1.0]},"ridge":{"firstOctave":-7,"amplitudes":[1.0,2.0,1.0,0.0,0.0,0.0]},"soul_sand_layer":{"firstOctave":-8,"amplitudes":[1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.013333333333333334]},"spaghetti_2d":{"firstOctave":-7,"amplitudes":[1.0]},"spaghetti_2d_elevation":{"firstOctave":-8,"amplitudes":[1.0]},"spaghetti_2d_modulator":{"firstOctave":-11,"amplitudes":[1.0]},"spaghetti_2d_thickness":{"firstOctave":-11,"amplitudes":[1.0]},"spaghetti_3d_1":{"firstOctave":-7,"amplitudes":[1.0]},"spaghetti_3d_2":{"firstOctave":-7,"amplitudes":[1.0]},"spaghetti_3d_rarity":{"firstOctave":-11,"amplitudes":[1.0]},"spaghetti_3d_thickness":{"firstOctave":-8,"amplitudes":[1.0]},"spaghetti_roughness":{"firstOctave":-5,"amplitudes":[1.0]},"spaghetti_roughness_modulator":{"firstOctave":-8,"amplitudes":[1.0]},"surface":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0]},"surface_secondary":{"firstOctave":-6,"amplitudes":[1.0,1.0,0.0,1.0]},"surface_swamp":{"firstOctave":-2,"amplitudes":[1.0]},"temperature":{"firstOctave":-10,"amplitudes":[1.5,0.0,1.0,0.0,0.0,0.0]},"temperature_large":{"firstOctave":-12,"amplitudes":[1.5,0.0,1.0,0.0,0.0,0.0]},"vegetation":{"firstOctave":-8,"amplitudes":[1.0,1.0,0.0,0.0,0.0,0.0]},"vegetation_large":{"firstOctave":-10,"amplitudes":[1.0,1.0,0.0,0.0,0.0,0.0]}}
|
||||
{"minecraft:aquifer_barrier":{"firstOctave":-3,"amplitudes":[1.0]},"minecraft:aquifer_fluid_level_floodedness":{"firstOctave":-7,"amplitudes":[1.0]},"minecraft:aquifer_fluid_level_spread":{"firstOctave":-5,"amplitudes":[1.0]},"minecraft:aquifer_lava":{"firstOctave":-1,"amplitudes":[1.0]},"minecraft:badlands_pillar":{"firstOctave":-2,"amplitudes":[1.0,1.0,1.0,1.0]},"minecraft:badlands_pillar_roof":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:badlands_surface":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0]},"minecraft:calcite":{"firstOctave":-9,"amplitudes":[1.0,1.0,1.0,1.0]},"minecraft:cave_cheese":{"firstOctave":-8,"amplitudes":[0.5,1.0,2.0,1.0,2.0,1.0,0.0,2.0,0.0]},"minecraft:cave_entrance":{"firstOctave":-7,"amplitudes":[0.4,0.5,1.0]},"minecraft:cave_layer":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:clay_bands_offset":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:continentalness":{"firstOctave":-9,"amplitudes":[1.0,1.0,2.0,2.0,2.0,1.0,1.0,1.0,1.0]},"minecraft:continentalness_large":{"firstOctave":-11,"amplitudes":[1.0,1.0,2.0,2.0,2.0,1.0,1.0,1.0,1.0]},"minecraft:erosion":{"firstOctave":-9,"amplitudes":[1.0,1.0,0.0,1.0,1.0]},"minecraft:erosion_large":{"firstOctave":-11,"amplitudes":[1.0,1.0,0.0,1.0,1.0]},"minecraft:gravel":{"firstOctave":-8,"amplitudes":[1.0,1.0,1.0,1.0]},"minecraft:gravel_layer":{"firstOctave":-8,"amplitudes":[1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.013333333333333334]},"minecraft:ice":{"firstOctave":-4,"amplitudes":[1.0,1.0,1.0,1.0]},"minecraft:iceberg_pillar":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0,1.0]},"minecraft:iceberg_pillar_roof":{"firstOctave":-3,"amplitudes":[1.0]},"minecraft:iceberg_surface":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0]},"minecraft:jagged":{"firstOctave":-16,"amplitudes":[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0]},"minecraft:nether/temperature":{"firstOctave":-7,"amplitudes":[1.0,1.0]},"minecraft:nether/vegetation":{"firstOctave":-7,"amplitudes":[1.0,1.0]},"minecraft:nether_state_selector":{"firstOctave":-4,"amplitudes":[1.0]},"minecraft:nether_wart":{"firstOctave":-3,"amplitudes":[1.0,0.0,0.0,0.9]},"minecraft:netherrack":{"firstOctave":-3,"amplitudes":[1.0,0.0,0.0,0.35]},"minecraft:noodle":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:noodle_ridge_a":{"firstOctave":-7,"amplitudes":[1.0]},"minecraft:noodle_ridge_b":{"firstOctave":-7,"amplitudes":[1.0]},"minecraft:noodle_thickness":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:offset":{"firstOctave":-3,"amplitudes":[1.0,1.0,1.0,0.0]},"minecraft:ore_gap":{"firstOctave":-5,"amplitudes":[1.0]},"minecraft:ore_vein_a":{"firstOctave":-7,"amplitudes":[1.0]},"minecraft:ore_vein_b":{"firstOctave":-7,"amplitudes":[1.0]},"minecraft:ore_veininess":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:packed_ice":{"firstOctave":-7,"amplitudes":[1.0,1.0,1.0,1.0]},"minecraft:patch":{"firstOctave":-5,"amplitudes":[1.0,0.0,0.0,0.0,0.0,0.013333333333333334]},"minecraft:pillar":{"firstOctave":-7,"amplitudes":[1.0,1.0]},"minecraft:pillar_rareness":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:pillar_thickness":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:powder_snow":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0,1.0]},"minecraft:ridge":{"firstOctave":-7,"amplitudes":[1.0,2.0,1.0,0.0,0.0,0.0]},"minecraft:soul_sand_layer":{"firstOctave":-8,"amplitudes":[1.0,1.0,1.0,1.0,0.0,0.0,0.0,0.0,0.013333333333333334]},"minecraft:spaghetti_2d":{"firstOctave":-7,"amplitudes":[1.0]},"minecraft:spaghetti_2d_elevation":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:spaghetti_2d_modulator":{"firstOctave":-11,"amplitudes":[1.0]},"minecraft:spaghetti_2d_thickness":{"firstOctave":-11,"amplitudes":[1.0]},"minecraft:spaghetti_3d_1":{"firstOctave":-7,"amplitudes":[1.0]},"minecraft:spaghetti_3d_2":{"firstOctave":-7,"amplitudes":[1.0]},"minecraft:spaghetti_3d_rarity":{"firstOctave":-11,"amplitudes":[1.0]},"minecraft:spaghetti_3d_thickness":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:spaghetti_roughness":{"firstOctave":-5,"amplitudes":[1.0]},"minecraft:spaghetti_roughness_modulator":{"firstOctave":-8,"amplitudes":[1.0]},"minecraft:surface":{"firstOctave":-6,"amplitudes":[1.0,1.0,1.0]},"minecraft:surface_secondary":{"firstOctave":-6,"amplitudes":[1.0,1.0,0.0,1.0]},"minecraft:surface_swamp":{"firstOctave":-2,"amplitudes":[1.0]},"minecraft:temperature":{"firstOctave":-10,"amplitudes":[1.5,0.0,1.0,0.0,0.0,0.0]},"minecraft:temperature_large":{"firstOctave":-12,"amplitudes":[1.5,0.0,1.0,0.0,0.0,0.0]},"minecraft:vegetation":{"firstOctave":-8,"amplitudes":[1.0,1.0,0.0,0.0,0.0,0.0]},"minecraft:vegetation_large":{"firstOctave":-10,"amplitudes":[1.0,1.0,0.0,0.0,0.0,0.0]}}
|
||||
1
pumpkin-codegen/Cargo.lock
generated
1
pumpkin-codegen/Cargo.lock
generated
@@ -626,6 +626,7 @@ version = "0.1.0-dev+26.1"
|
||||
dependencies = [
|
||||
"heck",
|
||||
"indexmap",
|
||||
"md5",
|
||||
"proc-macro2",
|
||||
"pumpkin-nbt",
|
||||
"pumpkin-util",
|
||||
|
||||
@@ -8,6 +8,9 @@ rust-version = "1.89"
|
||||
indexmap = { version = "2.13", features = ["serde"] }
|
||||
heck = "0.5"
|
||||
|
||||
# For random pre calc
|
||||
md5 = "0.8"
|
||||
|
||||
serde = { version = "1.0", features = ["derive"] }
|
||||
serde_json = "1.0"
|
||||
serde_json5 = "0.2"
|
||||
|
||||
@@ -564,7 +564,7 @@ pub struct Block {
|
||||
/// Registry name without the `minecraft:` namespace prefix.
|
||||
pub name: String,
|
||||
/// Translation key for the block's display name.
|
||||
pub translation_key: String,
|
||||
// pub translation_key: String,
|
||||
/// Mining hardness; affects how long the block takes to break.
|
||||
pub hardness: f32,
|
||||
/// Blast resistance against explosions.
|
||||
|
||||
@@ -191,21 +191,13 @@ impl ToTokens for BlockStateCodecStruct {
|
||||
/// Emits a `BlockBlueprint` literal, stripping the `minecraft:` namespace prefix from the block name.
|
||||
fn to_tokens(&self, tokens: &mut TokenStream) {
|
||||
let name = &self.name.strip_prefix("minecraft:").unwrap_or(&self.name);
|
||||
|
||||
let props_gen = if let Some(props) = &self.properties {
|
||||
let keys = props.keys();
|
||||
let values = props.values();
|
||||
quote!(Some(&[#((#keys, #values)),*]))
|
||||
} else {
|
||||
quote!(None)
|
||||
};
|
||||
|
||||
tokens.extend(quote!(
|
||||
BlockBlueprint {
|
||||
name: #name,
|
||||
properties: #props_gen,
|
||||
}
|
||||
));
|
||||
let name_stripped = name.strip_prefix("minecraft:").unwrap_or(name);
|
||||
let block_ident =
|
||||
quote::format_ident!("{}", name_stripped.to_uppercase().replace([':', '-'], "_"));
|
||||
// TODO: use props
|
||||
tokens.extend(quote! {
|
||||
crate::Block::#block_ident.default_state
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -313,9 +305,14 @@ impl ToTokens for MaterialConditionStruct {
|
||||
true_at_and_below,
|
||||
false_at_and_above,
|
||||
} => {
|
||||
// Pre calc for speed :D
|
||||
let bytes = md5::compute(random_name.as_bytes());
|
||||
let lo = u64::from_be_bytes(bytes[0..8].try_into().expect("incorrect length"));
|
||||
let hi = u64::from_be_bytes(bytes[8..16].try_into().expect("incorrect length"));
|
||||
tokens.extend(quote!(
|
||||
MaterialCondition::VerticalGradient(VerticalGradientMaterialCondition {
|
||||
random_name: #random_name,
|
||||
random_lo: #lo,
|
||||
random_hi: #hi,
|
||||
true_at_and_below: #true_at_and_below,
|
||||
false_at_and_above: #false_at_and_above,
|
||||
})
|
||||
@@ -450,6 +447,7 @@ pub fn build() -> TokenStream {
|
||||
quote!(
|
||||
use crate::dimension::Dimension;
|
||||
use crate::chunk::DoublePerlinNoiseParameters;
|
||||
use crate::BlockState;
|
||||
|
||||
use std::{cell::RefCell, num::NonZeroUsize};
|
||||
use pumpkin_util::random::RandomDeriver;
|
||||
@@ -457,20 +455,15 @@ pub fn build() -> TokenStream {
|
||||
use crate::biome::Biome;
|
||||
use pumpkin_util::y_offset::Absolute;
|
||||
|
||||
pub struct BlockBlueprint {
|
||||
pub name: &'static str,
|
||||
pub properties: Option<&'static [(&'static str, &'static str)]>,
|
||||
}
|
||||
|
||||
pub struct GenerationSettings {
|
||||
pub aquifers_enabled: bool,
|
||||
pub ore_veins_enabled: bool,
|
||||
pub legacy_random_source: bool,
|
||||
pub sea_level: i32,
|
||||
pub default_fluid: BlockBlueprint,
|
||||
pub default_fluid: &'static BlockState,
|
||||
pub shape: GenerationShapeConfig,
|
||||
pub surface_rule: MaterialRule,
|
||||
pub default_block: BlockBlueprint,
|
||||
pub default_block: &'static BlockState,
|
||||
}
|
||||
|
||||
pub struct GenerationShapeConfig {
|
||||
@@ -522,7 +515,7 @@ pub fn build() -> TokenStream {
|
||||
}
|
||||
|
||||
pub struct BlockMaterialRule {
|
||||
pub result_state: BlockBlueprint,
|
||||
pub result_state: &'static BlockState,
|
||||
}
|
||||
|
||||
pub struct SequenceMaterialRule {
|
||||
@@ -555,7 +548,8 @@ pub fn build() -> TokenStream {
|
||||
}
|
||||
|
||||
pub struct VerticalGradientMaterialCondition {
|
||||
pub random_name: &'static str,
|
||||
pub random_lo: u64,
|
||||
pub random_hi: u64,
|
||||
pub true_at_and_below: YOffset,
|
||||
pub false_at_and_above: YOffset,
|
||||
}
|
||||
|
||||
@@ -566,9 +566,6 @@ pub fn value_to_configured_feature(v: &Value) -> TokenStream {
|
||||
"minecraft:fossil" => {
|
||||
quote! { ConfiguredFeature::Fossil(crate::generation::feature::features::fossil::FossilFeature {}) }
|
||||
}
|
||||
"minecraft:fossil" => {
|
||||
quote! { ConfiguredFeature::Fossil(crate::generation::feature::features::fossil::FossilFeature {}) }
|
||||
}
|
||||
"minecraft:lake" => {
|
||||
quote! { ConfiguredFeature::Lake(crate::generation::feature::features::lake::LakeFeature {}) }
|
||||
}
|
||||
@@ -885,7 +882,6 @@ fn value_to_rule_test(v: &Value) -> TokenStream {
|
||||
"minecraft:random_block_match" => {
|
||||
let block = v["block"].as_str().unwrap_or("minecraft:stone");
|
||||
let prob = v["probability"].as_f64().unwrap_or(0.5) as f32;
|
||||
let name_stripped = block.strip_prefix("minecraft:").unwrap_or(block);
|
||||
let block_ident =
|
||||
quote::format_ident!("{}", block.to_uppercase().replace([':', '-'], "_"));
|
||||
quote! { RuleTest::RandomBlockMatch(RandomBlockMatchRuleTest { block: pumpkin_data::Block::#block_ident, probability: #prob }) }
|
||||
|
||||
@@ -84,16 +84,23 @@ impl ToTokens for NamedEntityType<'_> {
|
||||
let entity = self.1;
|
||||
let id = LitInt::new(&entity.id.to_string(), proc_macro2::Span::call_site());
|
||||
|
||||
let attribute_tokens = entity.attributes.as_ref().map(|vec| {
|
||||
vec.iter().map(|map| {
|
||||
let (key, value) = map.iter().next().unwrap();
|
||||
let key = key.strip_prefix("minecraft:").unwrap_or(key);
|
||||
// Replace dots with underscores and uppercase for Enum naming (e.g. generic.max_health -> GENERIC_MAX_HEALTH)
|
||||
let enum_variant = format_ident!("{}", key.replace('.', "_").to_uppercase());
|
||||
let attribute_tokens = entity
|
||||
.attributes
|
||||
.as_ref()
|
||||
.map(|vec| {
|
||||
vec.iter()
|
||||
.map(|map| {
|
||||
let (key, value) = map.iter().next().unwrap();
|
||||
let key = key.strip_prefix("minecraft:").unwrap_or(key);
|
||||
// Replace dots with underscores and uppercase for Enum naming (e.g. generic.max_health -> GENERIC_MAX_HEALTH)
|
||||
let enum_variant =
|
||||
format_ident!("{}", key.replace('.', "_").to_uppercase());
|
||||
|
||||
quote! { (Attributes::#enum_variant, #value) }
|
||||
}).collect::<Vec<_>>()
|
||||
}).unwrap_or_default();
|
||||
quote! { (Attributes::#enum_variant, #value) }
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
})
|
||||
.unwrap_or_default();
|
||||
|
||||
let attributes_field = quote! { &[#(#attribute_tokens),*] };
|
||||
|
||||
|
||||
@@ -12,9 +12,12 @@ pub fn build() -> TokenStream {
|
||||
let mut variants = TokenStream::new();
|
||||
let mut match_variants = TokenStream::new();
|
||||
|
||||
for (name, parameter) in &json {
|
||||
let raw_name = format!("minecraft:{name}");
|
||||
let simple_id = name;
|
||||
for (raw_name, parameter) in &json {
|
||||
let name = raw_name
|
||||
.strip_prefix("minecraft:")
|
||||
.unwrap()
|
||||
.replace("/", "_");
|
||||
let simple_id = name.clone();
|
||||
let name = format_ident!("{}", name.to_uppercase());
|
||||
let first_octave = parameter.first_octave;
|
||||
let amplitudes = ¶meter.amplitudes;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -40,9 +40,9 @@ impl DoublePerlinNoiseParameters {
|
||||
"iceberg_pillar_roof" => &Self::ICEBERG_PILLAR_ROOF,
|
||||
"iceberg_surface" => &Self::ICEBERG_SURFACE,
|
||||
"jagged" => &Self::JAGGED,
|
||||
"nether_state_selector" => &Self::NETHER_STATE_SELECTOR,
|
||||
"nether_temperature" => &Self::NETHER_TEMPERATURE,
|
||||
"nether_vegetation" => &Self::NETHER_VEGETATION,
|
||||
"nether_state_selector" => &Self::NETHER_STATE_SELECTOR,
|
||||
"nether_wart" => &Self::NETHER_WART,
|
||||
"netherrack" => &Self::NETHERRACK,
|
||||
"noodle" => &Self::NOODLE,
|
||||
@@ -172,12 +172,12 @@ impl DoublePerlinNoiseParameters {
|
||||
],
|
||||
"minecraft:jagged",
|
||||
);
|
||||
pub const NETHER_TEMPERATURE: DoublePerlinNoiseParameters =
|
||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64], "minecraft:nether/temperature");
|
||||
pub const NETHER_VEGETATION: DoublePerlinNoiseParameters =
|
||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64], "minecraft:nether/vegetation");
|
||||
pub const NETHER_STATE_SELECTOR: DoublePerlinNoiseParameters =
|
||||
DoublePerlinNoiseParameters::new(-4i32, &[1f64], "minecraft:nether_state_selector");
|
||||
pub const NETHER_TEMPERATURE: DoublePerlinNoiseParameters =
|
||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64], "minecraft:nether_temperature");
|
||||
pub const NETHER_VEGETATION: DoublePerlinNoiseParameters =
|
||||
DoublePerlinNoiseParameters::new(-7i32, &[1f64, 1f64], "minecraft:nether_vegetation");
|
||||
pub const NETHER_WART: DoublePerlinNoiseParameters = DoublePerlinNoiseParameters::new(
|
||||
-3i32,
|
||||
&[1f64, 0f64, 0f64, 0.9f64],
|
||||
|
||||
@@ -234,6 +234,11 @@ impl XoroshiroSplitter {
|
||||
Xoroshiro::new(l ^ self.lo, m ^ self.hi)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub const fn from_lo_and_hi(&self, lo: u64, hi: u64) -> Xoroshiro {
|
||||
Xoroshiro::new(lo ^ self.lo, hi ^ self.hi)
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn split_pos(&self, x: i32, y: i32, z: i32) -> Xoroshiro {
|
||||
let l = hash_block_pos(x, y, z) as u64;
|
||||
|
||||
@@ -6,7 +6,7 @@ use pumpkin_data::{
|
||||
use pumpkin_world::{
|
||||
GlobalRandomConfig, ProtoNoiseRouters, bench_create_and_populate_biome,
|
||||
bench_create_and_populate_noise, bench_create_and_populate_noise_with_surface,
|
||||
block::to_state_from_blueprint, generation::proto_chunk::TerrainCache,
|
||||
generation::proto_chunk::TerrainCache,
|
||||
};
|
||||
|
||||
fn bench_terrain_gen(c: &mut Criterion) {
|
||||
@@ -15,7 +15,7 @@ fn bench_terrain_gen(c: &mut Criterion) {
|
||||
let base_router = ProtoNoiseRouters::generate(&OVERWORLD_BASE_NOISE_ROUTER, &random_config);
|
||||
let surface_config = GenerationSettings::from_dimension(&Dimension::OVERWORLD);
|
||||
let terrain_cache = TerrainCache::from_random(&random_config);
|
||||
let default_state = to_state_from_blueprint(&surface_config.default_block);
|
||||
let default_state = surface_config.default_block;
|
||||
|
||||
c.bench_function("overworld biome", |b| {
|
||||
b.iter(|| {
|
||||
|
||||
@@ -60,7 +60,6 @@ mod test {
|
||||
|
||||
use crate::{
|
||||
GlobalRandomConfig, ProtoChunk,
|
||||
block::to_state_from_blueprint,
|
||||
chunk::palette::BIOME_NETWORK_MAX_BITS,
|
||||
generation::noise::router::{
|
||||
multi_noise_sampler::{MultiNoiseSampler, MultiNoiseSamplerBuilderOptions},
|
||||
@@ -107,7 +106,7 @@ mod test {
|
||||
let surface_settings = GenerationSettings::from_dimension(&Dimension::OVERWORLD);
|
||||
|
||||
//let _terrain_cache = TerrainCache::from_random(&random_config);
|
||||
let default_block = to_state_from_blueprint(&surface_settings.default_block);
|
||||
let default_block = surface_settings.default_block;
|
||||
|
||||
for data in expected_data {
|
||||
let chunk_x = data.x;
|
||||
|
||||
@@ -41,7 +41,6 @@ mod test {
|
||||
use crate::{
|
||||
GlobalRandomConfig, ProtoChunk,
|
||||
biome::{BiomeSupplier, MultiNoiseBiomeSupplier},
|
||||
block::to_state_from_blueprint,
|
||||
generation::{
|
||||
noise::router::{
|
||||
multi_noise_sampler::{MultiNoiseSampler, MultiNoiseSamplerBuilderOptions},
|
||||
@@ -80,7 +79,7 @@ mod test {
|
||||
chunk_x,
|
||||
chunk_z,
|
||||
&Dimension::OVERWORLD,
|
||||
to_state_from_blueprint(&surface_config.default_block),
|
||||
surface_config.default_block,
|
||||
biome_mixer_seed,
|
||||
);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@ pub mod viewer;
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use pumpkin_data::{Block, BlockState, chunk_gen_settings::BlockBlueprint};
|
||||
use pumpkin_data::{Block, BlockState};
|
||||
use serde::{Deserialize, Deserializer, Serialize, Serializer};
|
||||
pub use state::RawBlockState;
|
||||
|
||||
@@ -69,23 +69,6 @@ impl BlockStateCodec {
|
||||
}
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
pub fn to_state_id_from_blueprint(print: &BlockBlueprint) -> BlockStateId {
|
||||
let block = Block::from_name(print.name)
|
||||
.unwrap_or_else(|| panic!("Invalid block name in blueprint: {}", print.name));
|
||||
|
||||
match print.properties {
|
||||
Some(props) => block.from_properties(props).to_state_id(block),
|
||||
None => block.default_state.id,
|
||||
}
|
||||
}
|
||||
|
||||
/// Helper to get the full `BlockState` reference from the blueprint
|
||||
#[must_use]
|
||||
pub fn to_state_from_blueprint(print: &BlockBlueprint) -> &'static BlockState {
|
||||
BlockState::from_id(to_state_id_from_blueprint(print))
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use pumpkin_data::Block;
|
||||
|
||||
@@ -6,7 +6,6 @@ use pumpkin_data::noise_router::{
|
||||
};
|
||||
|
||||
use super::noise::router::proto_noise_router::ProtoNoiseRouters;
|
||||
use crate::block::to_state_from_blueprint;
|
||||
use crate::generation::proto_chunk::TerrainCache;
|
||||
use crate::generation::{GlobalRandomConfig, Seed};
|
||||
|
||||
@@ -44,7 +43,7 @@ impl GeneratorInit for VanillaGenerator {
|
||||
let terrain_cache = TerrainCache::from_random(&random_config);
|
||||
let generation_settings = GenerationSettings::from_dimension(&dimension);
|
||||
|
||||
let default_block = to_state_from_blueprint(&generation_settings.default_block);
|
||||
let default_block = generation_settings.default_block;
|
||||
let base_router = ProtoNoiseRouters::generate(&base, &random_config);
|
||||
Self {
|
||||
random_config,
|
||||
|
||||
@@ -308,8 +308,7 @@ impl WorldAquiferSampler {
|
||||
sample_options,
|
||||
);
|
||||
|
||||
self.levels[index] = Some(sampled);
|
||||
self.levels[index].as_ref().unwrap()
|
||||
self.levels[index].insert(sampled)
|
||||
}
|
||||
|
||||
fn get_fluid_level(
|
||||
|
||||
@@ -199,18 +199,19 @@ impl StaticChunkNoiseFunctionComponentImpl for Binary {
|
||||
|
||||
match self.data.operation {
|
||||
BinaryOperation::Add => {
|
||||
array.iter_mut().enumerate().for_each(|(index, value)| {
|
||||
let pos = mapper.at(index, Some(sample_options));
|
||||
let density2 = ChunkNoiseFunctionComponent::sample_from_stack(
|
||||
&mut component_stack[..=self.input2_index],
|
||||
&pos,
|
||||
sample_options,
|
||||
);
|
||||
*value += density2;
|
||||
});
|
||||
let mut scratch = vec![0.0f64; array.len()];
|
||||
ChunkNoiseFunctionComponent::fill_from_stack(
|
||||
&mut component_stack[..=self.input2_index],
|
||||
&mut scratch,
|
||||
mapper,
|
||||
sample_options,
|
||||
);
|
||||
for (a, b) in array.iter_mut().zip(scratch.iter()) {
|
||||
*a += b;
|
||||
}
|
||||
}
|
||||
BinaryOperation::Mul => {
|
||||
array.iter_mut().enumerate().for_each(|(index, value)| {
|
||||
for (index, value) in array.iter_mut().enumerate() {
|
||||
if *value != 0.0 {
|
||||
let pos = mapper.at(index, Some(sample_options));
|
||||
let density2 = ChunkNoiseFunctionComponent::sample_from_stack(
|
||||
@@ -220,12 +221,13 @@ impl StaticChunkNoiseFunctionComponentImpl for Binary {
|
||||
);
|
||||
*value *= density2;
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
BinaryOperation::Min => {
|
||||
let input2_min = component_stack[self.input2_index].min();
|
||||
array.iter_mut().enumerate().for_each(|(index, value)| {
|
||||
if *value > input2_min {
|
||||
for (index, value) in array.iter_mut().enumerate() {
|
||||
if *value >= input2_min {
|
||||
// NOTE: vanilla is v < min ? v : min(v, compute)
|
||||
let pos = mapper.at(index, Some(sample_options));
|
||||
let density2 = ChunkNoiseFunctionComponent::sample_from_stack(
|
||||
&mut component_stack[..=self.input2_index],
|
||||
@@ -234,12 +236,13 @@ impl StaticChunkNoiseFunctionComponentImpl for Binary {
|
||||
);
|
||||
*value = value.min(density2);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
BinaryOperation::Max => {
|
||||
let input2_max = component_stack[self.input2_index].max();
|
||||
array.iter_mut().enumerate().for_each(|(index, value)| {
|
||||
if *value < input2_max {
|
||||
for (index, value) in array.iter_mut().enumerate() {
|
||||
if *value <= input2_max {
|
||||
// NOTE: vanilla is v > max ? v : max(v, compute)
|
||||
let pos = mapper.at(index, Some(sample_options));
|
||||
let density2 = ChunkNoiseFunctionComponent::sample_from_stack(
|
||||
&mut component_stack[..=self.input2_index],
|
||||
@@ -248,7 +251,7 @@ impl StaticChunkNoiseFunctionComponentImpl for Binary {
|
||||
);
|
||||
*value = value.max(density2);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -62,8 +62,6 @@ pub struct SurfaceHeightEstimateSampler<'a> {
|
||||
}
|
||||
|
||||
impl<'a> SurfaceHeightEstimateSampler<'a> {
|
||||
const NOTCHIAN_SAMPLE_CUTOFF: f64 = 0.390625;
|
||||
|
||||
pub fn estimate_height(&mut self, block_x: i32, block_z: i32) -> i32 {
|
||||
let biome_aligned_x = biome_coords::to_block(biome_coords::from_block(block_x));
|
||||
let biome_aligned_z = biome_coords::to_block(biome_coords::from_block(block_z));
|
||||
@@ -81,23 +79,13 @@ impl<'a> SurfaceHeightEstimateSampler<'a> {
|
||||
fn calculate_height_estimate(&mut self, aligned_x: i32, aligned_z: i32) -> i32 {
|
||||
let sample_options =
|
||||
ChunkNoiseFunctionSampleOptions::new(false, SampleAction::SkipCellCaches, 0, 0, 0);
|
||||
|
||||
// preliminarySurfaceLevel (FindTopSurface) returns the surface Y directly.
|
||||
// Sample at y=0 — FindTopSurface ignores the incoming Y and computes its own.
|
||||
let pos = Vector3::new(aligned_x, 0, aligned_z);
|
||||
let surface_y = ChunkNoiseFunctionComponent::sample_from_stack(
|
||||
&mut self.component_stack,
|
||||
&pos,
|
||||
&sample_options,
|
||||
);
|
||||
|
||||
// FindTopSurface returns lowerBound as f64 when no solid block found,
|
||||
// which is below minimum_y — treat that as "no surface"
|
||||
if surface_y <= self.minimum_y as f64 {
|
||||
i32::MAX
|
||||
} else {
|
||||
surface_y as i32
|
||||
}
|
||||
surface_y.floor() as i32
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
|
||||
@@ -583,7 +583,7 @@ impl ProtoChunk {
|
||||
let sampler = FluidLevelSampler::Chunk(StandardChunkFluidLevelSampler::new(
|
||||
FluidLevel::new(
|
||||
settings.sea_level,
|
||||
Block::from_registry_key(settings.default_fluid.name).unwrap(),
|
||||
Block::from_state_id(settings.default_fluid.id),
|
||||
),
|
||||
FluidLevel::new(-54, &Block::LAVA),
|
||||
));
|
||||
|
||||
@@ -360,11 +360,6 @@ pub fn test_vertical_gradient(
|
||||
.false_at_and_above
|
||||
.get_y(context.min_y as i16, context.height);
|
||||
|
||||
let splitter = context
|
||||
.random_deriver
|
||||
.split_string(condition.random_name)
|
||||
.next_splitter();
|
||||
|
||||
let block_y = context.block_pos_y;
|
||||
if block_y <= true_at {
|
||||
return true;
|
||||
@@ -372,6 +367,10 @@ pub fn test_vertical_gradient(
|
||||
if block_y >= false_at {
|
||||
return false;
|
||||
}
|
||||
let splitter = context
|
||||
.random_deriver
|
||||
.from_lo_and_hi(condition.random_lo, condition.random_hi)
|
||||
.next_splitter();
|
||||
let mapped = pumpkin_util::math::map(block_y as f32, true_at as f32, false_at as f32, 1.0, 0.0);
|
||||
let mut random = splitter.split_pos(context.block_pos_x, block_y, context.block_pos_z);
|
||||
random.next_f32() < mapped
|
||||
|
||||
@@ -1,14 +1,11 @@
|
||||
use pumpkin_data::{
|
||||
BlockState,
|
||||
chunk_gen_settings::{
|
||||
BlockBlueprint, ConditionMaterialRule, MaterialRule, SequenceMaterialRule,
|
||||
},
|
||||
chunk_gen_settings::{ConditionMaterialRule, MaterialRule, SequenceMaterialRule},
|
||||
};
|
||||
|
||||
use super::MaterialRuleContext;
|
||||
use crate::{
|
||||
ProtoChunk,
|
||||
block::to_state_from_blueprint,
|
||||
generation::{
|
||||
noise::router::surface_height_sampler::SurfaceHeightEstimateSampler,
|
||||
surface::test_condition,
|
||||
@@ -23,7 +20,7 @@ pub fn try_apply_material_rule(
|
||||
) -> Option<&'static BlockState> {
|
||||
match rule {
|
||||
MaterialRule::Badlands(_badlands) => Some(BadLandsMaterialRule::try_apply(context)),
|
||||
MaterialRule::Block(block) => Some(BlockMaterialRule::try_apply(&block.result_state)),
|
||||
MaterialRule::Block(block) => Some(BlockMaterialRule::try_apply(block.result_state)),
|
||||
MaterialRule::Sequence(sequence) => {
|
||||
try_apply_sequence(sequence, chunk, context, surface_height_estimate_sampler)
|
||||
}
|
||||
@@ -48,8 +45,8 @@ impl BadLandsMaterialRule {
|
||||
pub struct BlockMaterialRule;
|
||||
|
||||
impl BlockMaterialRule {
|
||||
pub fn try_apply(blueprint: &BlockBlueprint) -> &'static BlockState {
|
||||
to_state_from_blueprint(blueprint)
|
||||
pub fn try_apply(state: &'static BlockState) -> &'static BlockState {
|
||||
state
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -80,7 +80,7 @@ pub fn bench_create_and_populate_noise(
|
||||
let sampler = FluidLevelSampler::Chunk(StandardChunkFluidLevelSampler::new(
|
||||
FluidLevel::new(
|
||||
settings.sea_level,
|
||||
Block::from_registry_key(settings.default_fluid.name).unwrap(),
|
||||
Block::from_state_id(settings.default_fluid.id),
|
||||
),
|
||||
FluidLevel::new(-54, &pumpkin_data::Block::LAVA),
|
||||
));
|
||||
@@ -210,7 +210,7 @@ pub fn bench_create_and_populate_noise_with_surface(
|
||||
let sampler = FluidLevelSampler::Chunk(StandardChunkFluidLevelSampler::new(
|
||||
FluidLevel::new(
|
||||
settings.sea_level,
|
||||
Block::from_registry_key(settings.default_fluid.name).unwrap(),
|
||||
Block::from_state_id(settings.default_fluid.id),
|
||||
),
|
||||
FluidLevel::new(-54, &pumpkin_data::Block::LAVA),
|
||||
));
|
||||
|
||||
Reference in New Issue
Block a user