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