Compare commits
2 Commits
2aa5d6881c
...
55ee91885d
| Author | SHA1 | Date | |
|---|---|---|---|
|
55ee91885d
|
|||
|
1acaa3d88c
|
2
.github/workflows/lint.yaml
vendored
2
.github/workflows/lint.yaml
vendored
@@ -69,7 +69,7 @@ jobs:
|
||||
- name: Install components
|
||||
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()
|
||||
run: cargo fmt --check
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
macro_rules! get_entities {
|
||||
($client:ident) => {{
|
||||
let ecs = $client.ecs.read();
|
||||
if let Some(mut query) = ecs.try_query::<(
|
||||
ecs.try_query::<(
|
||||
&AzaleaPosition,
|
||||
&CustomName,
|
||||
&EntityKindComponent,
|
||||
@@ -11,7 +11,8 @@ macro_rules! get_entities {
|
||||
&MinecraftEntityId,
|
||||
Option<&Owneruuid>,
|
||||
&Pose,
|
||||
)>() {
|
||||
)>()
|
||||
.map(|mut query| {
|
||||
query
|
||||
.iter(&ecs)
|
||||
.map(
|
||||
@@ -29,9 +30,8 @@ macro_rules! get_entities {
|
||||
},
|
||||
)
|
||||
.collect::<Vec<_>>()
|
||||
} else {
|
||||
Vec::new()
|
||||
}
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}};
|
||||
}
|
||||
|
||||
@@ -39,7 +39,7 @@ macro_rules! get_entities {
|
||||
macro_rules! get_players {
|
||||
($client:ident) => {{
|
||||
let ecs = $client.ecs.read();
|
||||
if let Some(mut query) = ecs.try_query_filtered::<(
|
||||
ecs.try_query_filtered::<(
|
||||
&MinecraftEntityId,
|
||||
&EntityUuid,
|
||||
&EntityKindComponent,
|
||||
@@ -47,7 +47,7 @@ macro_rules! get_players {
|
||||
&LookDirection,
|
||||
&Pose,
|
||||
), (With<Player>, Without<Dead>)>()
|
||||
{
|
||||
.map(|mut query| {
|
||||
query
|
||||
.iter(&ecs)
|
||||
.map(|(id, uuid, kind, position, direction, pose)| {
|
||||
@@ -61,8 +61,7 @@ macro_rules! get_players {
|
||||
)
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
} else {
|
||||
Vec::new()
|
||||
}
|
||||
})
|
||||
.unwrap_or_default()
|
||||
}};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user