Compare commits
5 Commits
85e1f082a7
...
main
Author | SHA1 | Date | |
---|---|---|---|
2cf4265732
|
|||
ca8c9d4d1c
|
|||
64c96450a4
|
|||
505b1a26af
|
|||
f9495a36f2
|
286
Cargo.lock
generated
286
Cargo.lock
generated
@@ -166,9 +166,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anyhow"
|
name = "anyhow"
|
||||||
version = "1.0.97"
|
version = "1.0.98"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "dcfed56ad506cb2c684a14971b8861fdc3baaaae314b9e5f9bb532cbe3ba7a4f"
|
checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "anymap2"
|
name = "anymap2"
|
||||||
@@ -398,8 +398,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea"
|
name = "azalea"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-auth",
|
"azalea-auth",
|
||||||
"azalea-block",
|
"azalea-block",
|
||||||
@@ -436,8 +436,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-auth"
|
name = "azalea-auth"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
"azalea-crypto",
|
"azalea-crypto",
|
||||||
@@ -456,8 +456,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-block"
|
name = "azalea-block"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-block-macros",
|
"azalea-block-macros",
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
@@ -466,8 +466,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-block-macros"
|
name = "azalea-block-macros"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -476,8 +476,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-brigadier"
|
name = "azalea-brigadier"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
"azalea-chat",
|
"azalea-chat",
|
||||||
@@ -486,8 +486,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-buf"
|
name = "azalea-buf"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-buf-macros",
|
"azalea-buf-macros",
|
||||||
"byteorder",
|
"byteorder",
|
||||||
@@ -500,8 +500,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-buf-macros"
|
name = "azalea-buf-macros"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -510,8 +510,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-chat"
|
name = "azalea-chat"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
"azalea-language",
|
"azalea-language",
|
||||||
@@ -524,8 +524,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-client"
|
name = "azalea-client"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-auth",
|
"azalea-auth",
|
||||||
"azalea-block",
|
"azalea-block",
|
||||||
@@ -559,8 +559,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-core"
|
name = "azalea-core"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
"azalea-chat",
|
"azalea-chat",
|
||||||
@@ -576,8 +576,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-crypto"
|
name = "azalea-crypto"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"aes",
|
"aes",
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
@@ -593,8 +593,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-entity"
|
name = "azalea-entity"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-block",
|
"azalea-block",
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
@@ -617,8 +617,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-inventory"
|
name = "azalea-inventory"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
"azalea-chat",
|
"azalea-chat",
|
||||||
@@ -633,8 +633,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-inventory-macros"
|
name = "azalea-inventory-macros"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -643,8 +643,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-language"
|
name = "azalea-language"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"compact_str",
|
"compact_str",
|
||||||
"serde",
|
"serde",
|
||||||
@@ -653,8 +653,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-physics"
|
name = "azalea-physics"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-block",
|
"azalea-block",
|
||||||
"azalea-core",
|
"azalea-core",
|
||||||
@@ -670,8 +670,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-protocol"
|
name = "azalea-protocol"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"async-recursion",
|
"async-recursion",
|
||||||
"azalea-auth",
|
"azalea-auth",
|
||||||
@@ -705,8 +705,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-protocol-macros"
|
name = "azalea-protocol-macros"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"proc-macro2",
|
"proc-macro2",
|
||||||
"quote",
|
"quote",
|
||||||
@@ -715,8 +715,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-registry"
|
name = "azalea-registry"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
"azalea-registry-macros",
|
"azalea-registry-macros",
|
||||||
@@ -726,8 +726,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-registry-macros"
|
name = "azalea-registry-macros"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"quote",
|
"quote",
|
||||||
"syn",
|
"syn",
|
||||||
@@ -735,8 +735,8 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "azalea-world"
|
name = "azalea-world"
|
||||||
version = "0.11.0+mc1.21.5"
|
version = "0.12.0+mc1.21.5"
|
||||||
source = "git+https://github.com/azalea-rs/azalea#913d6ac8c52aa41305749e0a526f77079c84ecea"
|
source = "git+https://github.com/azalea-rs/azalea#6a83a6fa387170ae71fbe06791cf3afa20aac1df"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"azalea-block",
|
"azalea-block",
|
||||||
"azalea-buf",
|
"azalea-buf",
|
||||||
@@ -1265,9 +1265,9 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "compact_str"
|
name = "compact_str"
|
||||||
version = "0.8.1"
|
version = "0.9.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "3b79c4069c6cad78e2e0cdfcbd26275770669fb39fd308a752dc110e83b9af32"
|
checksum = "3fdb1325a1cece981e8a296ab8f0f9b63ae357bd0784a9faaf548cc7b480707a"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"castaway",
|
"castaway",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
@@ -1408,6 +1408,12 @@ dependencies = [
|
|||||||
"cfg-if",
|
"cfg-if",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "critical-section"
|
||||||
|
version = "1.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossbeam-channel"
|
name = "crossbeam-channel"
|
||||||
version = "0.5.15"
|
version = "0.5.15"
|
||||||
@@ -1417,6 +1423,15 @@ dependencies = [
|
|||||||
"crossbeam-utils",
|
"crossbeam-utils",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "crossbeam-epoch"
|
||||||
|
version = "0.9.18"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e"
|
||||||
|
dependencies = [
|
||||||
|
"crossbeam-utils",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "crossbeam-utils"
|
name = "crossbeam-utils"
|
||||||
version = "0.8.21"
|
version = "0.8.21"
|
||||||
@@ -2046,6 +2061,19 @@ dependencies = [
|
|||||||
"slab",
|
"slab",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "generator"
|
||||||
|
version = "0.8.4"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd"
|
||||||
|
dependencies = [
|
||||||
|
"cfg-if",
|
||||||
|
"libc",
|
||||||
|
"log",
|
||||||
|
"rustversion",
|
||||||
|
"windows",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "generic-array"
|
name = "generic-array"
|
||||||
version = "0.14.7"
|
version = "0.14.7"
|
||||||
@@ -2157,9 +2185,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "h2"
|
name = "h2"
|
||||||
version = "0.4.8"
|
version = "0.4.9"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5017294ff4bb30944501348f6f8e42e6ad28f42c8bbef7a74029aff064a4e3c2"
|
checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"atomic-waker",
|
"atomic-waker",
|
||||||
"bytes",
|
"bytes",
|
||||||
@@ -2236,12 +2264,14 @@ checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hickory-proto"
|
name = "hickory-proto"
|
||||||
version = "0.24.4"
|
version = "0.25.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "92652067c9ce6f66ce53cc38d1169daa36e6e7eb7dd3b63b5103bd9d97117248"
|
checksum = "6d844af74f7b799e41c78221be863bade11c430d46042c3b49ca8ae0c6d27287"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
|
"async-recursion",
|
||||||
"async-trait",
|
"async-trait",
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
|
"critical-section",
|
||||||
"data-encoding",
|
"data-encoding",
|
||||||
"enum-as-inner",
|
"enum-as-inner",
|
||||||
"futures-channel",
|
"futures-channel",
|
||||||
@@ -2250,8 +2280,9 @@ dependencies = [
|
|||||||
"idna",
|
"idna",
|
||||||
"ipnet",
|
"ipnet",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"rand 0.8.5",
|
"rand 0.9.0",
|
||||||
"thiserror 1.0.69",
|
"ring",
|
||||||
|
"thiserror 2.0.12",
|
||||||
"tinyvec",
|
"tinyvec",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
@@ -2260,19 +2291,19 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "hickory-resolver"
|
name = "hickory-resolver"
|
||||||
version = "0.24.4"
|
version = "0.25.1"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "cbb117a1ca520e111743ab2f6688eddee69db4e0ea242545a604dce8a66fd22e"
|
checksum = "a128410b38d6f931fcc6ca5c107a3b02cabd6c05967841269a4ad65d23c44331"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"cfg-if",
|
"cfg-if",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
"hickory-proto",
|
"hickory-proto",
|
||||||
"lru-cache",
|
"moka",
|
||||||
"once_cell",
|
"once_cell",
|
||||||
"parking_lot",
|
"parking_lot",
|
||||||
"rand 0.8.5",
|
"rand 0.9.0",
|
||||||
"smallvec",
|
"smallvec",
|
||||||
"thiserror 1.0.69",
|
"thiserror 2.0.12",
|
||||||
"tokio",
|
"tokio",
|
||||||
"tracing",
|
"tracing",
|
||||||
]
|
]
|
||||||
@@ -2447,7 +2478,7 @@ dependencies = [
|
|||||||
"js-sys",
|
"js-sys",
|
||||||
"log",
|
"log",
|
||||||
"wasm-bindgen",
|
"wasm-bindgen",
|
||||||
"windows-core",
|
"windows-core 0.61.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -2809,9 +2840,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libc"
|
name = "libc"
|
||||||
version = "0.2.171"
|
version = "0.2.172"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6"
|
checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "libgit2-sys"
|
name = "libgit2-sys"
|
||||||
@@ -2892,12 +2923,6 @@ dependencies = [
|
|||||||
"vcpkg",
|
"vcpkg",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "linked-hash-map"
|
|
||||||
version = "0.5.6"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "0717cef1bc8b636c6e1c1bbdefc09e6322da8a9321966e8928ef80d20f7f770f"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "linux-raw-sys"
|
name = "linux-raw-sys"
|
||||||
version = "0.9.4"
|
version = "0.9.4"
|
||||||
@@ -2927,12 +2952,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "lru-cache"
|
name = "loom"
|
||||||
version = "0.1.2"
|
version = "0.7.2"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "31e24f1ad8321ca0e8a1e0ac13f23cb668e6f5466c2c57319f6a5cf1cc8e3b1c"
|
checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"linked-hash-map",
|
"cfg-if",
|
||||||
|
"generator",
|
||||||
|
"scoped-tls",
|
||||||
|
"tracing",
|
||||||
|
"tracing-subscriber",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -3343,6 +3372,25 @@ dependencies = [
|
|||||||
"pkg-config",
|
"pkg-config",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "moka"
|
||||||
|
version = "0.12.10"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "a9321642ca94a4282428e6ea4af8cc2ca4eac48ac7a6a4ea8f33f76d0ce70926"
|
||||||
|
dependencies = [
|
||||||
|
"crossbeam-channel",
|
||||||
|
"crossbeam-epoch",
|
||||||
|
"crossbeam-utils",
|
||||||
|
"loom",
|
||||||
|
"parking_lot",
|
||||||
|
"portable-atomic",
|
||||||
|
"rustc_version",
|
||||||
|
"smallvec",
|
||||||
|
"tagptr",
|
||||||
|
"thiserror 1.0.69",
|
||||||
|
"uuid",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "native-tls"
|
name = "native-tls"
|
||||||
version = "0.2.14"
|
version = "0.2.14"
|
||||||
@@ -3573,6 +3621,10 @@ name = "once_cell"
|
|||||||
version = "1.21.3"
|
version = "1.21.3"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
||||||
|
dependencies = [
|
||||||
|
"critical-section",
|
||||||
|
"portable-atomic",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "opaque-debug"
|
name = "opaque-debug"
|
||||||
@@ -3806,6 +3858,12 @@ dependencies = [
|
|||||||
"universal-hash",
|
"universal-hash",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "portable-atomic"
|
||||||
|
version = "1.11.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "350e9b48cbc6b0e028b0473b114454c6316e57336ee184ceab6e53f72c178b3e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "powerfmt"
|
name = "powerfmt"
|
||||||
version = "0.2.0"
|
version = "0.2.0"
|
||||||
@@ -3863,9 +3921,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "proc-macro2"
|
name = "proc-macro2"
|
||||||
version = "1.0.94"
|
version = "1.0.95"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84"
|
checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"unicode-ident",
|
"unicode-ident",
|
||||||
]
|
]
|
||||||
@@ -4493,6 +4551,12 @@ dependencies = [
|
|||||||
"windows-sys 0.59.0",
|
"windows-sys 0.59.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "scoped-tls"
|
||||||
|
version = "1.0.1"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "scopeguard"
|
name = "scopeguard"
|
||||||
version = "1.2.0"
|
version = "1.2.0"
|
||||||
@@ -4869,6 +4933,12 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "tagptr"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "7b2093cf4c8eb1e67749a6762251bc9cd836b6fc171623bd0a9d324d37af2417"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "tempfile"
|
name = "tempfile"
|
||||||
version = "3.19.1"
|
version = "3.19.1"
|
||||||
@@ -5611,19 +5681,53 @@ version = "0.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows"
|
||||||
|
version = "0.58.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6"
|
||||||
|
dependencies = [
|
||||||
|
"windows-core 0.58.0",
|
||||||
|
"windows-targets 0.52.6",
|
||||||
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-core"
|
||||||
|
version = "0.58.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99"
|
||||||
|
dependencies = [
|
||||||
|
"windows-implement 0.58.0",
|
||||||
|
"windows-interface 0.58.0",
|
||||||
|
"windows-result 0.2.0",
|
||||||
|
"windows-strings 0.1.0",
|
||||||
|
"windows-targets 0.52.6",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-core"
|
name = "windows-core"
|
||||||
version = "0.61.0"
|
version = "0.61.0"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
|
checksum = "4763c1de310c86d75a878046489e2e5ba02c649d185f21c67d4cf8a56d098980"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-implement",
|
"windows-implement 0.60.0",
|
||||||
"windows-interface",
|
"windows-interface 0.59.1",
|
||||||
"windows-link",
|
"windows-link",
|
||||||
"windows-result",
|
"windows-result 0.3.2",
|
||||||
"windows-strings 0.4.0",
|
"windows-strings 0.4.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-implement"
|
||||||
|
version = "0.58.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-implement"
|
name = "windows-implement"
|
||||||
version = "0.60.0"
|
version = "0.60.0"
|
||||||
@@ -5635,6 +5739,17 @@ dependencies = [
|
|||||||
"syn",
|
"syn",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-interface"
|
||||||
|
version = "0.58.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515"
|
||||||
|
dependencies = [
|
||||||
|
"proc-macro2",
|
||||||
|
"quote",
|
||||||
|
"syn",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-interface"
|
name = "windows-interface"
|
||||||
version = "0.59.1"
|
version = "0.59.1"
|
||||||
@@ -5658,11 +5773,20 @@ version = "0.4.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3"
|
checksum = "4286ad90ddb45071efd1a66dfa43eb02dd0dfbae1545ad6cc3c51cf34d7e8ba3"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"windows-result",
|
"windows-result 0.3.2",
|
||||||
"windows-strings 0.3.1",
|
"windows-strings 0.3.1",
|
||||||
"windows-targets 0.53.0",
|
"windows-targets 0.53.0",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-result"
|
||||||
|
version = "0.2.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e"
|
||||||
|
dependencies = [
|
||||||
|
"windows-targets 0.52.6",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-result"
|
name = "windows-result"
|
||||||
version = "0.3.2"
|
version = "0.3.2"
|
||||||
@@ -5672,6 +5796,16 @@ dependencies = [
|
|||||||
"windows-link",
|
"windows-link",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "windows-strings"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10"
|
||||||
|
dependencies = [
|
||||||
|
"windows-result 0.2.0",
|
||||||
|
"windows-targets 0.52.6",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "windows-strings"
|
name = "windows-strings"
|
||||||
version = "0.3.1"
|
version = "0.3.1"
|
||||||
|
@@ -35,9 +35,6 @@ end
|
|||||||
function steal(item_name)
|
function steal(item_name)
|
||||||
for _, chest_pos in ipairs(client:find_blocks(client.position, get_block_states({ "chest" }))) do
|
for _, chest_pos in ipairs(client:find_blocks(client.position, get_block_states({ "chest" }))) do
|
||||||
client:go_to({ position = chest_pos, radius = 3 }, { type = RADIUS_GOAL })
|
client:go_to({ position = chest_pos, radius = 3 }, { type = RADIUS_GOAL })
|
||||||
while client.pathfinder.is_calculating or client.pathfinder.is_executing do
|
|
||||||
sleep(500)
|
|
||||||
end
|
|
||||||
client:look_at(chest_pos)
|
client:look_at(chest_pos)
|
||||||
|
|
||||||
local container = client:open_container_at(chest_pos)
|
local container = client:open_container_at(chest_pos)
|
||||||
|
@@ -93,9 +93,6 @@ function nether_travel(pos, go_to_opts)
|
|||||||
|
|
||||||
info(string.format("currently in nether, going to %.2f %.2f", nether_pos.x, nether_pos.z))
|
info(string.format("currently in nether, going to %.2f %.2f", nether_pos.x, nether_pos.z))
|
||||||
client:go_to(nether_pos, { type = XZ_GOAL })
|
client:go_to(nether_pos, { type = XZ_GOAL })
|
||||||
while client.pathfinder.is_calculating or client.pathfinder.is_executing do
|
|
||||||
sleep(1000)
|
|
||||||
end
|
|
||||||
|
|
||||||
info("arrived, looking for nearest portal")
|
info("arrived, looking for nearest portal")
|
||||||
local portals_nether = client:find_blocks(client.position, portal_block_states)
|
local portals_nether = client:find_blocks(client.position, portal_block_states)
|
||||||
@@ -144,10 +141,6 @@ function interact_bed()
|
|||||||
end
|
end
|
||||||
|
|
||||||
client:go_to({ position = bed, radius = 2 }, { type = RADIUS_GOAL, options = { without_mining = true } })
|
client:go_to({ position = bed, radius = 2 }, { type = RADIUS_GOAL, options = { without_mining = true } })
|
||||||
while client.pathfinder.is_calculating or client.pathfinder.is_executing do
|
|
||||||
sleep(500)
|
|
||||||
end
|
|
||||||
|
|
||||||
client:look_at(bed)
|
client:look_at(bed)
|
||||||
client:block_interact(bed)
|
client:block_interact(bed)
|
||||||
end
|
end
|
||||||
|
@@ -1,11 +1,15 @@
|
|||||||
use azalea::{brigadier::prelude::*, chat::ChatPacket, prelude::*};
|
use azalea::{brigadier::prelude::*, chat::ChatPacket, prelude::*};
|
||||||
use futures::lock::Mutex;
|
use futures::lock::Mutex;
|
||||||
use mlua::{Function, Table};
|
use mlua::{Error, Result, Table, UserDataRef};
|
||||||
use ncr::utils::prepend_header;
|
use ncr::{
|
||||||
|
encoding::{Base64Encoding, Base64rEncoding, NewBase64rEncoding},
|
||||||
|
encryption::{CaesarEncryption, Cfb8Encryption, EcbEncryption, Encryption, GcmEncryption},
|
||||||
|
utils::prepend_header,
|
||||||
|
};
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
State,
|
State, crypt,
|
||||||
lua::{eval, exec, reload},
|
lua::{eval, exec, nochatreports::key::AesKey, reload},
|
||||||
};
|
};
|
||||||
|
|
||||||
pub type Ctx = CommandContext<Mutex<CommandSource>>;
|
pub type Ctx = CommandContext<Mutex<CommandSource>>;
|
||||||
@@ -19,15 +23,20 @@ pub struct CommandSource {
|
|||||||
|
|
||||||
impl CommandSource {
|
impl CommandSource {
|
||||||
pub fn reply(&self, message: &str) {
|
pub fn reply(&self, message: &str) {
|
||||||
|
fn encrypt(options: &Table, plaintext: &str) -> Result<String> {
|
||||||
|
Ok(crypt!(encrypt, options, &prepend_header(plaintext)))
|
||||||
|
}
|
||||||
|
|
||||||
for mut chunk in message
|
for mut chunk in message
|
||||||
.chars()
|
.chars()
|
||||||
.collect::<Vec<char>>()
|
.collect::<Vec<char>>()
|
||||||
.chunks(if self.ncr_options.is_some() { 150 } else { 236 })
|
.chunks(if self.ncr_options.is_some() { 150 } else { 236 })
|
||||||
.map(|chars| chars.iter().collect::<String>())
|
.map(|chars| chars.iter().collect::<String>())
|
||||||
{
|
{
|
||||||
if let Some(options) = &self.ncr_options
|
if let Some(ciphertext) = self
|
||||||
&& let Ok(encrypt) = self.state.lua.globals().get::<Function>("ncr_encrypt")
|
.ncr_options
|
||||||
&& let Ok(ciphertext) = encrypt.call::<String>((options, prepend_header(&chunk)))
|
.as_ref()
|
||||||
|
.and_then(|options| encrypt(options, &chunk).ok())
|
||||||
{
|
{
|
||||||
chunk = ciphertext;
|
chunk = ciphertext;
|
||||||
}
|
}
|
||||||
|
@@ -23,7 +23,7 @@ use crate::{
|
|||||||
replay::recorder::Recorder,
|
replay::recorder::Recorder,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[allow(clippy::too_many_lines)]
|
#[allow(clippy::cognitive_complexity, clippy::too_many_lines)]
|
||||||
pub async fn handle_event(client: Client, event: Event, state: State) -> Result<()> {
|
pub async fn handle_event(client: Client, event: Event, state: State) -> Result<()> {
|
||||||
match event {
|
match event {
|
||||||
Event::AddPlayer(player_info) => {
|
Event::AddPlayer(player_info) => {
|
||||||
|
@@ -108,7 +108,7 @@ pub async fn open_container_at(
|
|||||||
.map(Container))
|
.map(Container))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn open_inventory(_lua: &Lua, client: &Client, _: ()) -> Result<Option<Container>> {
|
pub fn open_inventory(_lua: &Lua, client: &Client, (): ()) -> Result<Option<Container>> {
|
||||||
Ok(client.open_inventory().map(Container))
|
Ok(client.open_inventory().map(Container))
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -41,6 +41,7 @@ impl UserData for Client {
|
|||||||
f.add_field_method_get("dimension", world::dimension);
|
f.add_field_method_get("dimension", world::dimension);
|
||||||
f.add_field_method_get("direction", movement::direction);
|
f.add_field_method_get("direction", movement::direction);
|
||||||
f.add_field_method_get("eye_position", movement::eye_position);
|
f.add_field_method_get("eye_position", movement::eye_position);
|
||||||
|
f.add_field_method_get("go_to_reached", movement::go_to_reached);
|
||||||
f.add_field_method_get("has_attack_cooldown", interaction::has_attack_cooldown);
|
f.add_field_method_get("has_attack_cooldown", interaction::has_attack_cooldown);
|
||||||
f.add_field_method_get("health", state::health);
|
f.add_field_method_get("health", state::health);
|
||||||
f.add_field_method_get("held_item", container::held_item);
|
f.add_field_method_get("held_item", container::held_item);
|
||||||
@@ -63,9 +64,14 @@ impl UserData for Client {
|
|||||||
m.add_async_method("find_entities", world::find::entities);
|
m.add_async_method("find_entities", world::find::entities);
|
||||||
m.add_async_method("find_players", world::find::players);
|
m.add_async_method("find_players", world::find::players);
|
||||||
m.add_async_method("go_to", movement::go_to);
|
m.add_async_method("go_to", movement::go_to);
|
||||||
|
m.add_async_method(
|
||||||
|
"go_to_wait_until_reached",
|
||||||
|
movement::go_to_wait_until_reached,
|
||||||
|
);
|
||||||
m.add_async_method("mine", interaction::mine);
|
m.add_async_method("mine", interaction::mine);
|
||||||
m.add_async_method("open_container_at", container::open_container_at);
|
m.add_async_method("open_container_at", container::open_container_at);
|
||||||
m.add_async_method("set_client_information", state::set_client_information);
|
m.add_async_method("set_client_information", state::set_client_information);
|
||||||
|
m.add_async_method("start_go_to", movement::start_go_to);
|
||||||
m.add_method("attack", interaction::attack);
|
m.add_method("attack", interaction::attack);
|
||||||
m.add_method("best_tool_for_block", world::best_tool_for_block);
|
m.add_method("best_tool_for_block", world::best_tool_for_block);
|
||||||
m.add_method("block_interact", interaction::block_interact);
|
m.add_method("block_interact", interaction::block_interact);
|
||||||
@@ -98,7 +104,7 @@ fn chat(_lua: &Lua, client: &Client, message: String) -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
fn disconnect(_lua: &Lua, client: &Client, _: ()) -> Result<()> {
|
fn disconnect(_lua: &Lua, client: &Client, (): ()) -> Result<()> {
|
||||||
client.disconnect();
|
client.disconnect();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
@@ -14,6 +14,122 @@ use mlua::{FromLua, Lua, Result, Table, UserDataRef, Value};
|
|||||||
|
|
||||||
use super::{Client, Direction, Vec3};
|
use super::{Client, Direction, Vec3};
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
|
struct AnyGoal(Box<dyn Goal>);
|
||||||
|
|
||||||
|
impl Goal for AnyGoal {
|
||||||
|
fn success(&self, n: BlockPos) -> bool {
|
||||||
|
self.0.success(n)
|
||||||
|
}
|
||||||
|
|
||||||
|
fn heuristic(&self, n: BlockPos) -> f32 {
|
||||||
|
self.0.heuristic(n)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::cast_possible_truncation)]
|
||||||
|
fn to_goal(lua: &Lua, client: &Client, data: Table, options: &Table, kind: u8) -> Result<AnyGoal> {
|
||||||
|
let goal: Box<dyn Goal> = match kind {
|
||||||
|
1 => {
|
||||||
|
let pos = Vec3::from_lua(data.get("position")?, lua)?;
|
||||||
|
Box::new(RadiusGoal {
|
||||||
|
pos: azalea::Vec3::new(pos.x, pos.y, pos.z),
|
||||||
|
radius: data.get("radius")?,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
2 => {
|
||||||
|
let pos = Vec3::from_lua(Value::Table(data), lua)?;
|
||||||
|
Box::new(ReachBlockPosGoal {
|
||||||
|
pos: BlockPos::new(pos.x as i32, pos.y as i32, pos.z as i32),
|
||||||
|
chunk_storage: client.world().read().chunks.clone(),
|
||||||
|
})
|
||||||
|
}
|
||||||
|
3 => Box::new(XZGoal {
|
||||||
|
x: data.get("x")?,
|
||||||
|
z: data.get("z")?,
|
||||||
|
}),
|
||||||
|
4 => Box::new(YGoal { y: data.get("y")? }),
|
||||||
|
_ => {
|
||||||
|
let pos = Vec3::from_lua(Value::Table(data), lua)?;
|
||||||
|
Box::new(BlockPosGoal(BlockPos::new(
|
||||||
|
pos.x as i32,
|
||||||
|
pos.y as i32,
|
||||||
|
pos.z as i32,
|
||||||
|
)))
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
Ok(AnyGoal(if options.get("inverse").unwrap_or_default() {
|
||||||
|
Box::new(InverseGoal(AnyGoal(goal)))
|
||||||
|
} else {
|
||||||
|
goal
|
||||||
|
}))
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn go_to_reached(_lua: &Lua, client: &Client) -> Result<bool> {
|
||||||
|
Ok(client.is_goto_target_reached())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn go_to_wait_until_reached(
|
||||||
|
_lua: Lua,
|
||||||
|
client: UserDataRef<Client>,
|
||||||
|
(): (),
|
||||||
|
) -> Result<()> {
|
||||||
|
client.wait_until_goto_target_reached().await;
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn go_to(
|
||||||
|
lua: Lua,
|
||||||
|
client: UserDataRef<Client>,
|
||||||
|
(data, metadata): (Table, Option<Table>),
|
||||||
|
) -> Result<()> {
|
||||||
|
let metadata = metadata.unwrap_or(lua.create_table()?);
|
||||||
|
let options = metadata.get("options").unwrap_or(lua.create_table()?);
|
||||||
|
let goal = to_goal(
|
||||||
|
&lua,
|
||||||
|
&client,
|
||||||
|
data,
|
||||||
|
&options,
|
||||||
|
metadata.get("type").unwrap_or_default(),
|
||||||
|
)?;
|
||||||
|
if options.get("without_mining").unwrap_or_default() {
|
||||||
|
client.start_goto_without_mining(goal);
|
||||||
|
client.wait_until_goto_target_reached().await;
|
||||||
|
} else {
|
||||||
|
client.goto(goal).await;
|
||||||
|
}
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn start_go_to(
|
||||||
|
lua: Lua,
|
||||||
|
client: UserDataRef<Client>,
|
||||||
|
(data, metadata): (Table, Option<Table>),
|
||||||
|
) -> Result<()> {
|
||||||
|
let metadata = metadata.unwrap_or(lua.create_table()?);
|
||||||
|
let options = metadata.get("options").unwrap_or(lua.create_table()?);
|
||||||
|
let goal = to_goal(
|
||||||
|
&lua,
|
||||||
|
&client,
|
||||||
|
data,
|
||||||
|
&options,
|
||||||
|
metadata.get("type").unwrap_or_default(),
|
||||||
|
)?;
|
||||||
|
if options.get("without_mining").unwrap_or_default() {
|
||||||
|
client.start_goto_without_mining(goal);
|
||||||
|
} else {
|
||||||
|
client.start_goto(goal);
|
||||||
|
}
|
||||||
|
while client.get_tick_broadcaster().recv().await.is_ok() {
|
||||||
|
if client.ecs.lock().get::<GotoEvent>(client.entity).is_none() {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
|
||||||
pub fn direction(_lua: &Lua, client: &Client) -> Result<Direction> {
|
pub fn direction(_lua: &Lua, client: &Client) -> Result<Direction> {
|
||||||
let direction = client.direction();
|
let direction = client.direction();
|
||||||
Ok(Direction {
|
Ok(Direction {
|
||||||
@@ -26,78 +142,7 @@ pub fn eye_position(_lua: &Lua, client: &Client) -> Result<Vec3> {
|
|||||||
Ok(Vec3::from(client.eye_position()))
|
Ok(Vec3::from(client.eye_position()))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub async fn go_to(
|
pub fn jump(_lua: &Lua, client: &Client, (): ()) -> Result<()> {
|
||||||
lua: Lua,
|
|
||||||
client: UserDataRef<Client>,
|
|
||||||
(data, metadata): (Table, Option<Table>),
|
|
||||||
) -> Result<()> {
|
|
||||||
fn goto_with_options<G: Goal + Send + Sync + 'static>(
|
|
||||||
client: &Client,
|
|
||||||
options: &Table,
|
|
||||||
goal: G,
|
|
||||||
) {
|
|
||||||
if options.get("without_mining").unwrap_or_default() {
|
|
||||||
client.goto_without_mining(goal);
|
|
||||||
} else {
|
|
||||||
client.goto(goal);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let table = metadata.unwrap_or(lua.create_table()?);
|
|
||||||
let goal_type = table.get("type").unwrap_or_default();
|
|
||||||
let options = table.get("options").unwrap_or(lua.create_table()?);
|
|
||||||
|
|
||||||
macro_rules! goto {
|
|
||||||
($goal:expr) => {
|
|
||||||
if options.get("inverse").unwrap_or_default() {
|
|
||||||
goto_with_options(&client, &options, InverseGoal($goal));
|
|
||||||
} else {
|
|
||||||
goto_with_options(&client, &options, $goal);
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#[allow(clippy::cast_possible_truncation)]
|
|
||||||
match goal_type {
|
|
||||||
1 => {
|
|
||||||
let p = Vec3::from_lua(data.get("position")?, &lua)?;
|
|
||||||
goto!(RadiusGoal {
|
|
||||||
pos: azalea::Vec3::new(p.x, p.y, p.z),
|
|
||||||
radius: data.get("radius")?,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
2 => {
|
|
||||||
let p = Vec3::from_lua(Value::Table(data), &lua)?;
|
|
||||||
goto!(ReachBlockPosGoal {
|
|
||||||
pos: BlockPos::new(p.x as i32, p.y as i32, p.z as i32),
|
|
||||||
chunk_storage: client.world().read().chunks.clone(),
|
|
||||||
});
|
|
||||||
}
|
|
||||||
3 => {
|
|
||||||
goto!(XZGoal {
|
|
||||||
x: data.get("x")?,
|
|
||||||
z: data.get("z")?,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
4 => goto!(YGoal { y: data.get("y")? }),
|
|
||||||
_ => {
|
|
||||||
let p = Vec3::from_lua(Value::Table(data), &lua)?;
|
|
||||||
goto!(BlockPosGoal(BlockPos::new(
|
|
||||||
p.x as i32, p.y as i32, p.z as i32
|
|
||||||
)));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
while client.get_tick_broadcaster().recv().await.is_ok() {
|
|
||||||
if client.ecs.lock().get::<GotoEvent>(client.entity).is_none() {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn jump(_lua: &Lua, client: &Client, _: ()) -> Result<()> {
|
|
||||||
client.jump();
|
client.jump();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
@@ -193,12 +238,12 @@ pub fn sprint(_lua: &Lua, client: &Client, direction: u8) -> Result<()> {
|
|||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn stop_pathfinding(_lua: &Lua, client: &Client, _: ()) -> Result<()> {
|
pub fn stop_pathfinding(_lua: &Lua, client: &Client, (): ()) -> Result<()> {
|
||||||
client.stop_pathfinding();
|
client.stop_pathfinding();
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn stop_sleeping(_lua: &Lua, client: &Client, _: ()) -> Result<()> {
|
pub fn stop_sleeping(_lua: &Lua, client: &Client, (): ()) -> Result<()> {
|
||||||
if let Err(error) = client.write_packet(ServerboundPlayerCommand {
|
if let Err(error) = client.write_packet(ServerboundPlayerCommand {
|
||||||
id: client.component::<MinecraftEntityId>(),
|
id: client.component::<MinecraftEntityId>(),
|
||||||
action: Action::StopSleeping,
|
action: Action::StopSleeping,
|
||||||
|
@@ -32,14 +32,14 @@ pub fn get_block_state(_lua: &Lua, client: &Client, position: Vec3) -> Result<Op
|
|||||||
.map(|block| block.id))
|
.map(|block| block.id))
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn get_fluid_state(lua: &Lua, client: &Client, position: Vec3) -> Result<Option<Table>> {
|
|
||||||
#[allow(clippy::cast_possible_truncation)]
|
#[allow(clippy::cast_possible_truncation)]
|
||||||
Ok(
|
pub fn get_fluid_state(lua: &Lua, client: &Client, position: Vec3) -> Result<Option<Table>> {
|
||||||
if let Some(state) = client.world().read().get_fluid_state(&BlockPos::new(
|
let fluid_state = client.world().read().get_fluid_state(&BlockPos::new(
|
||||||
position.x as i32,
|
position.x as i32,
|
||||||
position.y as i32,
|
position.y as i32,
|
||||||
position.z as i32,
|
position.z as i32,
|
||||||
)) {
|
));
|
||||||
|
Ok(if let Some(state) = fluid_state {
|
||||||
let table = lua.create_table()?;
|
let table = lua.create_table()?;
|
||||||
table.set("kind", state.kind as u8)?;
|
table.set("kind", state.kind as u8)?;
|
||||||
table.set("amount", state.amount)?;
|
table.set("amount", state.amount)?;
|
||||||
@@ -47,6 +47,5 @@ pub fn get_fluid_state(lua: &Lua, client: &Client, position: Vec3) -> Result<Opt
|
|||||||
Some(table)
|
Some(table)
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
},
|
})
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
@@ -71,9 +71,7 @@ impl UserData for ItemStack {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn add_methods<M: UserDataMethods<Self>>(m: &mut M) {
|
fn add_methods<M: UserDataMethods<Self>>(m: &mut M) {
|
||||||
m.add_method_mut("split", |_, this, count: u32| {
|
m.add_method_mut("split", |_, this, count: u32| Ok(Self(this.0.split(count))));
|
||||||
Ok(ItemStack(this.0.split(count)))
|
|
||||||
});
|
|
||||||
m.add_method_mut("update_empty", |_, this, (): ()| {
|
m.add_method_mut("update_empty", |_, this, (): ()| {
|
||||||
this.0.update_empty();
|
this.0.update_empty();
|
||||||
Ok(())
|
Ok(())
|
||||||
|
@@ -13,13 +13,15 @@ pub fn register_globals(lua: &Lua, globals: &Table, event_listeners: ListenerMap
|
|||||||
move |_, (event_type, callback, optional_id): (String, Function, Option<String>)| {
|
move |_, (event_type, callback, optional_id): (String, Function, Option<String>)| {
|
||||||
let m = m.clone();
|
let m = m.clone();
|
||||||
let id = optional_id.unwrap_or_else(|| {
|
let id = optional_id.unwrap_or_else(|| {
|
||||||
callback.info().name.unwrap_or(format!(
|
callback.info().name.unwrap_or_else(|| {
|
||||||
|
format!(
|
||||||
"anonymous @ {}",
|
"anonymous @ {}",
|
||||||
SystemTime::now()
|
SystemTime::now()
|
||||||
.duration_since(UNIX_EPOCH)
|
.duration_since(UNIX_EPOCH)
|
||||||
.unwrap_or_default()
|
.unwrap_or_default()
|
||||||
.as_millis()
|
.as_millis()
|
||||||
))
|
)
|
||||||
|
})
|
||||||
});
|
});
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
m.write()
|
m.write()
|
||||||
@@ -40,12 +42,10 @@ pub fn register_globals(lua: &Lua, globals: &Table, event_listeners: ListenerMap
|
|||||||
let m = m.clone();
|
let m = m.clone();
|
||||||
tokio::spawn(async move {
|
tokio::spawn(async move {
|
||||||
let mut m = m.write().await;
|
let mut m = m.write().await;
|
||||||
let empty = if let Some(listeners) = m.get_mut(&event_type) {
|
let empty = m.get_mut(&event_type).is_some_and(|listeners| {
|
||||||
listeners.retain(|(id, _)| target_id != *id);
|
listeners.retain(|(id, _)| target_id != *id);
|
||||||
listeners.is_empty()
|
listeners.is_empty()
|
||||||
} else {
|
});
|
||||||
false
|
|
||||||
};
|
|
||||||
if empty {
|
if empty {
|
||||||
m.remove(&event_type);
|
m.remove(&event_type);
|
||||||
}
|
}
|
||||||
|
@@ -37,12 +37,7 @@ impl UserData for Room {
|
|||||||
.members(RoomMemberships::all())
|
.members(RoomMemberships::all())
|
||||||
.await
|
.await
|
||||||
.map_err(Error::external)
|
.map_err(Error::external)
|
||||||
.map(|members| {
|
.map(|members| members.into_iter().map(Member).collect::<Vec<_>>())
|
||||||
members
|
|
||||||
.into_iter()
|
|
||||||
.map(|member| Member(member.clone()))
|
|
||||||
.collect::<Vec<_>>()
|
|
||||||
})
|
|
||||||
});
|
});
|
||||||
m.add_async_method(
|
m.add_async_method(
|
||||||
"kick_user",
|
"kick_user",
|
||||||
|
@@ -38,12 +38,12 @@ impl Display for Error {
|
|||||||
formatter,
|
formatter,
|
||||||
"failed to {}",
|
"failed to {}",
|
||||||
match self {
|
match self {
|
||||||
Error::CreateEnv(error) => format!("create environment: {error}"),
|
Self::CreateEnv(error) => format!("create environment: {error}"),
|
||||||
Error::EvalChunk(error) => format!("evaluate chunk: {error}"),
|
Self::EvalChunk(error) => format!("evaluate chunk: {error}"),
|
||||||
Error::ExecChunk(error) => format!("execute chunk: {error}"),
|
Self::ExecChunk(error) => format!("execute chunk: {error}"),
|
||||||
Error::LoadChunk(error) => format!("load chunk: {error}"),
|
Self::LoadChunk(error) => format!("load chunk: {error}"),
|
||||||
Error::MissingPath(error) => format!("get SCRIPT_PATH global: {error}"),
|
Self::MissingPath(error) => format!("get SCRIPT_PATH global: {error}"),
|
||||||
Error::ReadFile(error) => format!("read script file: {error}"),
|
Self::ReadFile(error) => format!("read script file: {error}"),
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@@ -3,9 +3,8 @@ macro_rules! crypt {
|
|||||||
($op:ident, $options:expr, $text:expr) => {{
|
($op:ident, $options:expr, $text:expr) => {{
|
||||||
macro_rules! crypt_with {
|
macro_rules! crypt_with {
|
||||||
($algo:ident) => {{
|
($algo:ident) => {{
|
||||||
let encoding = $options.get("encoding").unwrap_or_default();
|
|
||||||
let key = &$options.get::<UserDataRef<AesKey>>("key")?.0;
|
let key = &$options.get::<UserDataRef<AesKey>>("key")?.0;
|
||||||
match encoding {
|
match $options.get("encoding").unwrap_or_default() {
|
||||||
1 => $algo::<Base64Encoding>::$op($text, &key),
|
1 => $algo::<Base64Encoding>::$op($text, &key),
|
||||||
2 => $algo::<Base64rEncoding>::$op($text, &key),
|
2 => $algo::<Base64rEncoding>::$op($text, &key),
|
||||||
_ => $algo::<NewBase64rEncoding>::$op($text, &key),
|
_ => $algo::<NewBase64rEncoding>::$op($text, &key),
|
||||||
|
@@ -40,7 +40,7 @@ impl From<&Position> for Vec3 {
|
|||||||
|
|
||||||
impl From<BlockPos> for Vec3 {
|
impl From<BlockPos> for Vec3 {
|
||||||
fn from(p: BlockPos) -> Self {
|
fn from(p: BlockPos) -> Self {
|
||||||
Vec3 {
|
Self {
|
||||||
x: f64::from(p.x),
|
x: f64::from(p.x),
|
||||||
y: f64::from(p.y),
|
y: f64::from(p.y),
|
||||||
z: f64::from(p.z),
|
z: f64::from(p.z),
|
||||||
|
@@ -1,4 +1,6 @@
|
|||||||
#![feature(if_let_guard, let_chains)]
|
#![feature(if_let_guard, let_chains)]
|
||||||
|
#![warn(clippy::pedantic, clippy::nursery)]
|
||||||
|
#![allow(clippy::significant_drop_tightening)]
|
||||||
|
|
||||||
mod arguments;
|
mod arguments;
|
||||||
mod build_info;
|
mod build_info;
|
||||||
|
@@ -1,7 +1,7 @@
|
|||||||
use azalea::{entity::particle::Particle, registry::ParticleKind};
|
use azalea::{entity::particle::Particle, registry::ParticleKind};
|
||||||
|
|
||||||
#[allow(clippy::too_many_lines)]
|
#[allow(clippy::too_many_lines)]
|
||||||
pub fn to_kind(particle: &Particle) -> ParticleKind {
|
pub const fn to_kind(particle: &Particle) -> ParticleKind {
|
||||||
match particle {
|
match particle {
|
||||||
Particle::AngryVillager => ParticleKind::AngryVillager,
|
Particle::AngryVillager => ParticleKind::AngryVillager,
|
||||||
Particle::Block(_) => ParticleKind::Block,
|
Particle::Block(_) => ParticleKind::Block,
|
||||||
|
@@ -12,7 +12,7 @@ use azalea::{
|
|||||||
protocol::packets::login::ClientboundLoginPacket,
|
protocol::packets::login::ClientboundLoginPacket,
|
||||||
raw_connection::RawConnection,
|
raw_connection::RawConnection,
|
||||||
};
|
};
|
||||||
use bevy_app::{First, Plugin};
|
use bevy_app::{App, First, Plugin};
|
||||||
use bevy_ecs::{schedule::IntoSystemConfigs, system::ResMut};
|
use bevy_ecs::{schedule::IntoSystemConfigs, system::ResMut};
|
||||||
use log::error;
|
use log::error;
|
||||||
use parking_lot::Mutex;
|
use parking_lot::Mutex;
|
||||||
@@ -24,8 +24,9 @@ pub struct RecordPlugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Plugin for RecordPlugin {
|
impl Plugin for RecordPlugin {
|
||||||
fn build(&self, app: &mut bevy_app::App) {
|
fn build(&self, app: &mut App) {
|
||||||
if let Some(recorder) = self.recorder.lock().take() {
|
let recorder = self.recorder.lock().take();
|
||||||
|
if let Some(recorder) = recorder {
|
||||||
app.insert_resource(recorder)
|
app.insert_resource(recorder)
|
||||||
.add_systems(First, record_login_packets.before(process_packet_events))
|
.add_systems(First, record_login_packets.before(process_packet_events))
|
||||||
.add_systems(First, record_configuration_packets)
|
.add_systems(First, record_configuration_packets)
|
||||||
|
Reference in New Issue
Block a user