Compare commits
10 Commits
2aa5d6881c
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
b2ed65519e
|
|||
|
dea30ceec9
|
|||
| 2c83072427 | |||
| 91aafa3853 | |||
| c5ccb494ba | |||
|
|
1d6ef9a63f | ||
|
|
8acbc84242 | ||
|
|
cde6bebb50 | ||
|
55ee91885d
|
|||
|
1acaa3d88c
|
6
.github/workflows/build.yaml
vendored
6
.github/workflows/build.yaml
vendored
@@ -24,13 +24,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: sudo apt install -y libluajit-5.1-dev mold
|
run: sudo apt install -y libluajit-5.1-dev mold
|
||||||
|
|
||||||
- name: Set up build cache
|
- name: Set up build cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
@@ -46,7 +46,7 @@ jobs:
|
|||||||
- run: cargo build --release ${{ matrix.feature.flags }}
|
- run: cargo build --release ${{ matrix.feature.flags }}
|
||||||
|
|
||||||
- name: Upload build artifacts
|
- name: Upload build artifacts
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v7
|
||||||
with:
|
with:
|
||||||
name: errornowatcher_${{ matrix.feature.name }}_${{ matrix.os }}
|
name: errornowatcher_${{ matrix.feature.name }}_${{ matrix.os }}
|
||||||
path: target/release/errornowatcher
|
path: target/release/errornowatcher
|
||||||
|
|||||||
8
.github/workflows/lint.yaml
vendored
8
.github/workflows/lint.yaml
vendored
@@ -15,7 +15,7 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install taplo
|
- name: Install taplo
|
||||||
uses: uncenter/setup-taplo@v1
|
uses: uncenter/setup-taplo@v1
|
||||||
@@ -47,13 +47,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone repository
|
- name: Clone repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Install build dependencies
|
- name: Install build dependencies
|
||||||
run: sudo apt install -y libluajit-5.1-dev mold
|
run: sudo apt install -y libluajit-5.1-dev mold
|
||||||
|
|
||||||
- name: Set up build cache
|
- name: Set up build cache
|
||||||
uses: actions/cache@v4
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.cargo/bin/
|
~/.cargo/bin/
|
||||||
@@ -69,7 +69,7 @@ jobs:
|
|||||||
- name: Install components
|
- name: Install components
|
||||||
run: rustup component add clippy rustfmt
|
run: rustup component add clippy rustfmt
|
||||||
|
|
||||||
- run: cargo clippy ${{ matrix.feature.flags }} -- -D warnings -D clippy::pedantic
|
- run: cargo clippy ${{ matrix.feature.flags }} -- -D clippy::pedantic
|
||||||
|
|
||||||
- if: always()
|
- if: always()
|
||||||
run: cargo fmt --check
|
run: cargo fmt --check
|
||||||
|
|||||||
@@ -15,6 +15,14 @@ codegen-units = 1
|
|||||||
lto = true
|
lto = true
|
||||||
strip = true
|
strip = true
|
||||||
|
|
||||||
|
[profile.release-no-lto]
|
||||||
|
inherits = "release"
|
||||||
|
lto = false
|
||||||
|
|
||||||
|
[profile.small]
|
||||||
|
inherits = "release"
|
||||||
|
opt-level = "z"
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
built = { version = "0", features = ["git2"] }
|
built = { version = "0", features = ["git2"] }
|
||||||
|
|
||||||
|
|||||||
@@ -92,7 +92,8 @@ pub async fn go_to(
|
|||||||
client
|
client
|
||||||
.goto_with_opts(
|
.goto_with_opts(
|
||||||
goal,
|
goal,
|
||||||
PathfinderOpts::new().allow_mining(options.get("without_mining").unwrap_or_default()),
|
PathfinderOpts::new()
|
||||||
|
.allow_mining(!options.get::<bool>("without_mining").unwrap_or_default()),
|
||||||
)
|
)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
@@ -116,7 +117,8 @@ pub async fn start_go_to(
|
|||||||
)?;
|
)?;
|
||||||
client.start_goto_with_opts(
|
client.start_goto_with_opts(
|
||||||
goal,
|
goal,
|
||||||
PathfinderOpts::new().allow_mining(options.get("without_mining").unwrap_or_default()),
|
PathfinderOpts::new()
|
||||||
|
.allow_mining(!options.get::<bool>("without_mining").unwrap_or_default()),
|
||||||
);
|
);
|
||||||
let _ = client.get_tick_broadcaster().recv().await;
|
let _ = client.get_tick_broadcaster().recv().await;
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
macro_rules! get_entities {
|
macro_rules! get_entities {
|
||||||
($client:ident) => {{
|
($client:ident) => {{
|
||||||
let ecs = $client.ecs.read();
|
let ecs = $client.ecs.read();
|
||||||
if let Some(mut query) = ecs.try_query::<(
|
ecs.try_query::<(
|
||||||
&AzaleaPosition,
|
&AzaleaPosition,
|
||||||
&CustomName,
|
&CustomName,
|
||||||
&EntityKindComponent,
|
&EntityKindComponent,
|
||||||
@@ -11,7 +11,8 @@ macro_rules! get_entities {
|
|||||||
&MinecraftEntityId,
|
&MinecraftEntityId,
|
||||||
Option<&Owneruuid>,
|
Option<&Owneruuid>,
|
||||||
&Pose,
|
&Pose,
|
||||||
)>() {
|
)>()
|
||||||
|
.map(|mut query| {
|
||||||
query
|
query
|
||||||
.iter(&ecs)
|
.iter(&ecs)
|
||||||
.map(
|
.map(
|
||||||
@@ -29,9 +30,8 @@ macro_rules! get_entities {
|
|||||||
},
|
},
|
||||||
)
|
)
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
} else {
|
})
|
||||||
Vec::new()
|
.unwrap_or_default()
|
||||||
}
|
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -39,7 +39,7 @@ macro_rules! get_entities {
|
|||||||
macro_rules! get_players {
|
macro_rules! get_players {
|
||||||
($client:ident) => {{
|
($client:ident) => {{
|
||||||
let ecs = $client.ecs.read();
|
let ecs = $client.ecs.read();
|
||||||
if let Some(mut query) = ecs.try_query_filtered::<(
|
ecs.try_query_filtered::<(
|
||||||
&MinecraftEntityId,
|
&MinecraftEntityId,
|
||||||
&EntityUuid,
|
&EntityUuid,
|
||||||
&EntityKindComponent,
|
&EntityKindComponent,
|
||||||
@@ -47,22 +47,21 @@ macro_rules! get_players {
|
|||||||
&LookDirection,
|
&LookDirection,
|
||||||
&Pose,
|
&Pose,
|
||||||
), (With<Player>, Without<Dead>)>()
|
), (With<Player>, Without<Dead>)>()
|
||||||
{
|
.map(|mut query| {
|
||||||
query
|
query
|
||||||
.iter(&ecs)
|
.iter(&ecs)
|
||||||
.map(|(id, uuid, kind, position, direction, pose)| {
|
.map(|(id, uuid, kind, position, direction, pose)| {
|
||||||
(
|
(
|
||||||
id.0,
|
id.0,
|
||||||
uuid.to_string(),
|
uuid.to_string(),
|
||||||
kind.to_string(),
|
kind.to_string(),
|
||||||
Vec3::from(*position),
|
Vec3::from(*position),
|
||||||
Direction::from(direction),
|
Direction::from(direction),
|
||||||
*pose as u8,
|
*pose as u8,
|
||||||
)
|
)
|
||||||
})
|
})
|
||||||
.collect::<Vec<_>>()
|
.collect::<Vec<_>>()
|
||||||
} else {
|
})
|
||||||
Vec::new()
|
.unwrap_or_default()
|
||||||
}
|
|
||||||
}};
|
}};
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user