aboutsummaryrefslogtreecommitdiff
path: root/azalea/src
diff options
context:
space:
mode:
authormat <git@matdoes.dev>2023-10-01 15:19:13 -0500
committermat <git@matdoes.dev>2023-10-01 15:19:13 -0500
commitbefa33a87950b6d0f3364cb4fe603f6d84bf4b8f (patch)
treeb46f2b76d4f7c66aef05759d33de68d88904c45b /azalea/src
parent33e823d6fab990efaa735c05e4b0c42636003b76 (diff)
downloadazalea-drasl-befa33a87950b6d0f3364cb4fe603f6d84bf4b8f.tar.xz
organize azalea_core and re-export it from azalea
Diffstat (limited to 'azalea/src')
-rw-r--r--azalea/src/bot.rs2
-rw-r--r--azalea/src/container.rs2
-rw-r--r--azalea/src/lib.rs7
-rw-r--r--azalea/src/pathfinder/goals.rs2
-rw-r--r--azalea/src/pathfinder/mod.rs4
-rw-r--r--azalea/src/pathfinder/moves/basic.rs2
-rw-r--r--azalea/src/pathfinder/moves/mod.rs4
-rw-r--r--azalea/src/pathfinder/moves/parkour.rs2
-rw-r--r--azalea/src/pathfinder/simulation.rs2
9 files changed, 16 insertions, 11 deletions
diff --git a/azalea/src/bot.rs b/azalea/src/bot.rs
index 3b9e7e52..352eda59 100644
--- a/azalea/src/bot.rs
+++ b/azalea/src/bot.rs
@@ -12,7 +12,7 @@ use crate::ecs::{
use azalea_client::interact::SwingArmEvent;
use azalea_client::mining::Mining;
use azalea_client::TickBroadcast;
-use azalea_core::{BlockPos, Vec3};
+use azalea_core::position::{BlockPos, Vec3};
use azalea_entity::{
clamp_look_direction, metadata::Player, EyeHeight, Jumping, LocalEntity, LookDirection,
Position,
diff --git a/azalea/src/container.rs b/azalea/src/container.rs
index 56770524..ef6fdcf6 100644
--- a/azalea/src/container.rs
+++ b/azalea/src/container.rs
@@ -5,7 +5,7 @@ use azalea_client::{
packet_handling::game::PacketEvent,
Client,
};
-use azalea_core::BlockPos;
+use azalea_core::position::BlockPos;
use azalea_inventory::{operations::ClickOperation, ItemSlot, Menu};
use azalea_protocol::packets::game::ClientboundGamePacket;
use bevy_app::{App, Plugin, Update};
diff --git a/azalea/src/lib.rs b/azalea/src/lib.rs
index b6cd4e9d..5c1edf77 100644
--- a/azalea/src/lib.rs
+++ b/azalea/src/lib.rs
@@ -20,7 +20,12 @@ pub use azalea_block as blocks;
pub use azalea_brigadier as brigadier;
pub use azalea_chat::FormattedText;
pub use azalea_client::*;
-pub use azalea_core::{BlockPos, ChunkPos, ResourceLocation, Vec3};
+pub use azalea_core as core;
+// these are re-exported on this level because they're very common
+pub use azalea_core::{
+ position::{BlockPos, Vec3},
+ resource_location::ResourceLocation,
+};
pub use azalea_entity as entity;
pub use azalea_protocol as protocol;
pub use azalea_registry as registry;
diff --git a/azalea/src/pathfinder/goals.rs b/azalea/src/pathfinder/goals.rs
index 29c97ff0..4e278c74 100644
--- a/azalea/src/pathfinder/goals.rs
+++ b/azalea/src/pathfinder/goals.rs
@@ -1,4 +1,4 @@
-use azalea_core::{BlockPos, Vec3};
+use azalea_core::position::{BlockPos, Vec3};
use super::Goal;
diff --git a/azalea/src/pathfinder/mod.rs b/azalea/src/pathfinder/mod.rs
index b8a02798..1b35718e 100644
--- a/azalea/src/pathfinder/mod.rs
+++ b/azalea/src/pathfinder/mod.rs
@@ -21,7 +21,7 @@ use crate::ecs::{
};
use azalea_client::movement::walk_listener;
use azalea_client::{StartSprintEvent, StartWalkEvent};
-use azalea_core::BlockPos;
+use azalea_core::position::BlockPos;
use azalea_entity::metadata::Player;
use azalea_entity::LocalEntity;
use azalea_entity::{Physics, Position};
@@ -546,7 +546,7 @@ where
mod tests {
use std::{collections::HashSet, sync::Arc};
- use azalea_core::{BlockPos, ChunkPos, Vec3};
+ use azalea_core::position::{BlockPos, ChunkPos, Vec3};
use azalea_world::{Chunk, ChunkStorage, PartialChunkStorage};
use log::info;
diff --git a/azalea/src/pathfinder/moves/basic.rs b/azalea/src/pathfinder/moves/basic.rs
index b8cbbbb7..abd750b3 100644
--- a/azalea/src/pathfinder/moves/basic.rs
+++ b/azalea/src/pathfinder/moves/basic.rs
@@ -1,7 +1,7 @@
use std::f32::consts::SQRT_2;
use azalea_client::{SprintDirection, StartSprintEvent, StartWalkEvent, WalkDirection};
-use azalea_core::{BlockPos, CardinalDirection};
+use azalea_core::{direction::CardinalDirection, position::BlockPos};
use azalea_world::Instance;
use crate::{
diff --git a/azalea/src/pathfinder/moves/mod.rs b/azalea/src/pathfinder/moves/mod.rs
index f3ed7dff..d631ac8a 100644
--- a/azalea/src/pathfinder/moves/mod.rs
+++ b/azalea/src/pathfinder/moves/mod.rs
@@ -7,7 +7,7 @@ use crate::{JumpEvent, LookAtEvent};
use super::astar;
use azalea_client::{StartSprintEvent, StartWalkEvent};
-use azalea_core::{BlockPos, Vec3};
+use azalea_core::position::{BlockPos, Vec3};
use azalea_physics::collision::{self, BlockWithShape};
use azalea_world::Instance;
use bevy_ecs::{entity::Entity, event::EventWriter};
@@ -137,7 +137,7 @@ pub fn default_is_reached(
mod tests {
use super::*;
use azalea_block::BlockState;
- use azalea_core::ChunkPos;
+ use azalea_core::position::ChunkPos;
use azalea_world::{Chunk, ChunkStorage, PartialInstance};
#[test]
diff --git a/azalea/src/pathfinder/moves/parkour.rs b/azalea/src/pathfinder/moves/parkour.rs
index 5f81149b..ab9c509c 100644
--- a/azalea/src/pathfinder/moves/parkour.rs
+++ b/azalea/src/pathfinder/moves/parkour.rs
@@ -1,5 +1,5 @@
use azalea_client::{SprintDirection, StartSprintEvent, StartWalkEvent, WalkDirection};
-use azalea_core::{BlockPos, CardinalDirection};
+use azalea_core::{direction::CardinalDirection, position::BlockPos};
use azalea_world::Instance;
use crate::{
diff --git a/azalea/src/pathfinder/simulation.rs b/azalea/src/pathfinder/simulation.rs
index e0f82433..565e3e92 100644
--- a/azalea/src/pathfinder/simulation.rs
+++ b/azalea/src/pathfinder/simulation.rs
@@ -3,7 +3,7 @@
use std::{sync::Arc, time::Duration};
use azalea_client::PhysicsState;
-use azalea_core::{ResourceLocation, Vec3};
+use azalea_core::{position::Vec3, resource_location::ResourceLocation};
use azalea_entity::{
attributes::AttributeInstance, metadata::Sprinting, Attributes, EntityDimensions, Physics,
Position,