aboutsummaryrefslogtreecommitdiff
path: root/azalea-client/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-client/src/plugins')
-rw-r--r--azalea-client/src/plugins/attack.rs8
-rw-r--r--azalea-client/src/plugins/chunks.rs4
-rw-r--r--azalea-client/src/plugins/interact/mod.rs20
-rw-r--r--azalea-client/src/plugins/inventory.rs4
-rw-r--r--azalea-client/src/plugins/loading.rs8
-rw-r--r--azalea-client/src/plugins/mining.rs18
-rw-r--r--azalea-client/src/plugins/movement.rs10
-rw-r--r--azalea-client/src/plugins/tick_counter.rs8
-rw-r--r--azalea-client/src/plugins/tick_end.rs8
9 files changed, 46 insertions, 42 deletions
diff --git a/azalea-client/src/plugins/attack.rs b/azalea-client/src/plugins/attack.rs
index 26b5f34d..0e7cfeb8 100644
--- a/azalea-client/src/plugins/attack.rs
+++ b/azalea-client/src/plugins/attack.rs
@@ -3,7 +3,7 @@ use azalea_entity::{
Attributes, Crouching, Physics, indexing::EntityIdIndex, metadata::Sprinting,
update_bounding_box,
};
-use azalea_physics::PhysicsSet;
+use azalea_physics::PhysicsSystems;
use azalea_protocol::packets::game::s_interact::{self, ServerboundInteract};
use bevy_app::{App, Plugin, Update};
use bevy_ecs::prelude::*;
@@ -12,7 +12,7 @@ use tracing::warn;
use super::packet::game::SendGamePacketEvent;
use crate::{
- Client, interact::SwingArmEvent, local_player::LocalGameMode, movement::MoveEventsSet,
+ Client, interact::SwingArmEvent, local_player::LocalGameMode, movement::MoveEventsSystems,
respawn::perform_respawn,
};
@@ -24,14 +24,14 @@ impl Plugin for AttackPlugin {
Update,
handle_attack_event
.before(update_bounding_box)
- .before(MoveEventsSet)
+ .before(MoveEventsSystems)
.after(perform_respawn),
)
.add_systems(
GameTick,
(
increment_ticks_since_last_attack,
- update_attack_strength_scale.after(PhysicsSet),
+ update_attack_strength_scale.after(PhysicsSystems),
handle_attack_queued
.before(super::tick_end::game_tick_packet)
.after(super::movement::send_sprinting_if_needed)
diff --git a/azalea-client/src/plugins/chunks.rs b/azalea-client/src/plugins/chunks.rs
index 6d0877cd..317a36c5 100644
--- a/azalea-client/src/plugins/chunks.rs
+++ b/azalea-client/src/plugins/chunks.rs
@@ -17,7 +17,7 @@ use bevy_ecs::prelude::*;
use tracing::{error, trace};
use crate::{
- inventory::InventorySet, local_player::InstanceHolder, packet::game::SendGamePacketEvent,
+ inventory::InventorySystems, local_player::InstanceHolder, packet::game::SendGamePacketEvent,
respawn::perform_respawn,
};
@@ -32,7 +32,7 @@ impl Plugin for ChunksPlugin {
handle_chunk_batch_finished_event,
)
.chain()
- .before(InventorySet)
+ .before(InventorySystems)
.before(perform_respawn),
)
.add_message::<ReceiveChunkEvent>()
diff --git a/azalea-client/src/plugins/interact/mod.rs b/azalea-client/src/plugins/interact/mod.rs
index 27dba1d4..52862a38 100644
--- a/azalea-client/src/plugins/interact/mod.rs
+++ b/azalea-client/src/plugins/interact/mod.rs
@@ -19,7 +19,8 @@ use azalea_entity::{
};
use azalea_inventory::{ItemStack, ItemStackData, components};
use azalea_physics::{
- PhysicsSet, collision::entity_collisions::update_last_bounding_box, local_player::PhysicsState,
+ PhysicsSystems, collision::entity_collisions::update_last_bounding_box,
+ local_player::PhysicsState,
};
use azalea_protocol::packets::game::{
ServerboundInteract, ServerboundUseItem,
@@ -37,9 +38,9 @@ use crate::{
Client,
attack::handle_attack_event,
interact::pick::{HitResultComponent, update_hit_result_component},
- inventory::{Inventory, InventorySet},
+ inventory::{Inventory, InventorySystems},
local_player::{LocalGameMode, PermissionLevel},
- movement::MoveEventsSet,
+ movement::MoveEventsSystems,
packet::game::SendGamePacketEvent,
respawn::perform_respawn,
};
@@ -56,26 +57,29 @@ impl Plugin for InteractPlugin {
update_attributes_for_held_item,
update_attributes_for_gamemode,
)
- .in_set(UpdateAttributesSet)
+ .in_set(UpdateAttributesSystems)
.chain(),
handle_start_use_item_event,
update_hit_result_component
.after(clamp_look_direction)
.after(update_last_bounding_box),
)
- .after(InventorySet)
- .after(MoveEventsSet)
+ .after(InventorySystems)
+ .after(MoveEventsSystems)
.after(perform_respawn)
.after(handle_attack_event)
.chain(),
)
- .add_systems(GameTick, handle_start_use_item_queued.before(PhysicsSet))
+ .add_systems(
+ GameTick,
+ handle_start_use_item_queued.before(PhysicsSystems),
+ )
.add_observer(handle_swing_arm_trigger);
}
}
#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
-pub struct UpdateAttributesSet;
+pub struct UpdateAttributesSystems;
impl Client {
/// Right-click a block.
diff --git a/azalea-client/src/plugins/inventory.rs b/azalea-client/src/plugins/inventory.rs
index 72df7c89..3c57b3cc 100644
--- a/azalea-client/src/plugins/inventory.rs
+++ b/azalea-client/src/plugins/inventory.rs
@@ -32,7 +32,7 @@ impl Plugin for InventoryPlugin {
.add_systems(
Update,
handle_set_selected_hotbar_slot_event
- .in_set(InventorySet)
+ .in_set(InventorySystems)
.before(perform_respawn),
)
.add_systems(
@@ -48,7 +48,7 @@ impl Plugin for InventoryPlugin {
}
#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
-pub struct InventorySet;
+pub struct InventorySystems;
impl Client {
/// Return the menu that is currently open. If no menu is open, this will
diff --git a/azalea-client/src/plugins/loading.rs b/azalea-client/src/plugins/loading.rs
index 45735f3b..7ade9d9f 100644
--- a/azalea-client/src/plugins/loading.rs
+++ b/azalea-client/src/plugins/loading.rs
@@ -1,11 +1,11 @@
use azalea_core::tick::GameTick;
use azalea_entity::{HasClientLoaded, InLoadedChunk, LocalEntity, update_in_loaded_chunk};
-use azalea_physics::PhysicsSet;
+use azalea_physics::PhysicsSystems;
use azalea_protocol::packets::game::ServerboundPlayerLoaded;
use bevy_app::{App, Plugin};
use bevy_ecs::prelude::*;
-use crate::{mining::MiningSet, packet::game::SendGamePacketEvent};
+use crate::{mining::MiningSystems, packet::game::SendGamePacketEvent};
pub struct PlayerLoadedPlugin;
impl Plugin for PlayerLoadedPlugin {
@@ -15,8 +15,8 @@ impl Plugin for PlayerLoadedPlugin {
// vanilla runs this on gameMode.tick()
player_loaded_packet
.after(update_in_loaded_chunk)
- .before(PhysicsSet)
- .before(MiningSet)
+ .before(PhysicsSystems)
+ .before(MiningSystems)
.before(crate::movement::send_position),
);
}
diff --git a/azalea-client/src/plugins/mining.rs b/azalea-client/src/plugins/mining.rs
index 499ae71f..5fd0aa4a 100644
--- a/azalea-client/src/plugins/mining.rs
+++ b/azalea-client/src/plugins/mining.rs
@@ -2,7 +2,7 @@ use azalea_block::{BlockState, BlockTrait, fluid_state::FluidState};
use azalea_core::{direction::Direction, game_type::GameMode, position::BlockPos, tick::GameTick};
use azalea_entity::{FluidOnEyes, Physics, PlayerAbilities, Position, mining::get_mine_progress};
use azalea_inventory::ItemStack;
-use azalea_physics::{PhysicsSet, collision::BlockWithShape};
+use azalea_physics::{PhysicsSystems, collision::BlockWithShape};
use azalea_protocol::packets::game::s_player_action::{self, ServerboundPlayerAction};
use azalea_world::{InstanceContainer, InstanceName};
use bevy_app::{App, Plugin, Update};
@@ -16,9 +16,9 @@ use crate::{
BlockStatePredictionHandler, SwingArmEvent, can_use_game_master_blocks,
check_is_interaction_restricted, pick::HitResultComponent,
},
- inventory::{Inventory, InventorySet},
+ inventory::{Inventory, InventorySystems},
local_player::{InstanceHolder, LocalGameMode, PermissionLevel},
- movement::MoveEventsSet,
+ movement::MoveEventsSystems,
packet::game::SendGamePacketEvent,
};
@@ -39,10 +39,10 @@ impl Plugin for MiningPlugin {
continue_mining_block,
)
.chain()
- .before(PhysicsSet)
+ .before(PhysicsSystems)
.before(super::movement::send_position)
.before(super::interact::handle_start_use_item_queued)
- .in_set(MiningSet),
+ .in_set(MiningSystems),
)
.add_systems(
Update,
@@ -51,9 +51,9 @@ impl Plugin for MiningPlugin {
handle_stop_mining_block_event,
)
.chain()
- .in_set(MiningSet)
- .after(InventorySet)
- .after(MoveEventsSet)
+ .in_set(MiningSystems)
+ .after(InventorySystems)
+ .after(MoveEventsSystems)
.after(azalea_entity::update_fluid_on_eyes)
.after(crate::interact::pick::update_hit_result_component)
.after(crate::attack::handle_attack_event),
@@ -64,7 +64,7 @@ impl Plugin for MiningPlugin {
/// The Bevy system set for things related to mining.
#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
-pub struct MiningSet;
+pub struct MiningSystems;
impl Client {
pub fn start_mining(&self, position: BlockPos) {
diff --git a/azalea-client/src/plugins/movement.rs b/azalea-client/src/plugins/movement.rs
index 4559be20..2ee5c379 100644
--- a/azalea-client/src/plugins/movement.rs
+++ b/azalea-client/src/plugins/movement.rs
@@ -13,7 +13,7 @@ use azalea_entity::{
update_bounding_box,
};
use azalea_physics::{
- PhysicsSet, ai_step,
+ PhysicsSystems, ai_step,
collision::entity_collisions::{AabbQuery, CollidableEntityQuery, update_last_bounding_box},
local_player::{PhysicsState, SprintDirection, WalkDirection},
travel::{no_collision, travel},
@@ -72,7 +72,7 @@ impl Plugin for MovementPlugin {
Update,
(handle_sprint, handle_walk, handle_knockback)
.chain()
- .in_set(MoveEventsSet)
+ .in_set(MoveEventsSystems)
.after(update_bounding_box)
.after(update_last_bounding_box),
)
@@ -81,14 +81,14 @@ impl Plugin for MovementPlugin {
(
(tick_controls, local_player_ai_step, update_pose)
.chain()
- .in_set(PhysicsSet)
+ .in_set(PhysicsSystems)
.before(ai_step)
.before(azalea_physics::fluids::update_in_water_state_and_do_fluid_pushing),
send_player_input_packet,
send_sprinting_if_needed
.after(azalea_entity::update_in_loaded_chunk)
.after(travel),
- send_position.after(PhysicsSet),
+ send_position.after(PhysicsSystems),
)
.chain(),
);
@@ -96,7 +96,7 @@ impl Plugin for MovementPlugin {
}
#[derive(SystemSet, Debug, Hash, PartialEq, Eq, Clone)]
-pub struct MoveEventsSet;
+pub struct MoveEventsSystems;
impl Client {
/// Set whether we're jumping. This acts as if you held space in
diff --git a/azalea-client/src/plugins/tick_counter.rs b/azalea-client/src/plugins/tick_counter.rs
index dd65ca69..9d07991a 100644
--- a/azalea-client/src/plugins/tick_counter.rs
+++ b/azalea-client/src/plugins/tick_counter.rs
@@ -1,10 +1,10 @@
use azalea_core::tick::GameTick;
-use azalea_physics::PhysicsSet;
+use azalea_physics::PhysicsSystems;
use azalea_world::InstanceName;
use bevy_app::{App, Plugin};
use bevy_ecs::prelude::*;
-use crate::{mining::MiningSet, movement::send_position, tick_broadcast::send_tick_broadcast};
+use crate::{mining::MiningSystems, movement::send_position, tick_broadcast::send_tick_broadcast};
/// Counts the number of game ticks elapsed on the **local client** since the
/// `login` packet was received.
@@ -20,8 +20,8 @@ impl Plugin for TickCounterPlugin {
app.add_systems(
GameTick,
increment_counter
- .before(PhysicsSet)
- .before(MiningSet)
+ .before(PhysicsSystems)
+ .before(MiningSystems)
.before(send_position)
.before(send_tick_broadcast),
);
diff --git a/azalea-client/src/plugins/tick_end.rs b/azalea-client/src/plugins/tick_end.rs
index daa78454..15cd2e59 100644
--- a/azalea-client/src/plugins/tick_end.rs
+++ b/azalea-client/src/plugins/tick_end.rs
@@ -2,13 +2,13 @@
use azalea_core::tick::GameTick;
use azalea_entity::LocalEntity;
-use azalea_physics::PhysicsSet;
+use azalea_physics::PhysicsSystems;
use azalea_protocol::packets::game::ServerboundClientTickEnd;
use azalea_world::InstanceName;
use bevy_app::{App, Plugin};
use bevy_ecs::prelude::*;
-use crate::{mining::MiningSet, packet::game::SendGamePacketEvent};
+use crate::{mining::MiningSystems, packet::game::SendGamePacketEvent};
/// A plugin that makes clients send a [`ServerboundClientTickEnd`] packet every
/// tick.
@@ -19,8 +19,8 @@ impl Plugin for TickEndPlugin {
GameTick,
// this has to happen after every other event that might send packets
game_tick_packet
- .after(PhysicsSet)
- .after(MiningSet)
+ .after(PhysicsSystems)
+ .after(MiningSystems)
.after(crate::movement::send_position),
);
}