diff options
| author | mat <27899617+mat-1@users.noreply.github.com> | 2025-12-12 00:56:02 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-12-12 00:56:02 -0600 |
| commit | f9c25665c203d6377ace62f1e95381d037d8fd9e (patch) | |
| tree | 8b4131d20fe661d3cc1175ec27f801fe61df41ea /azalea-entity/src/lib.rs | |
| parent | 82ad975242292d5875780b4398b62637674bf50a (diff) | |
| download | azalea-drasl-f9c25665c203d6377ace62f1e95381d037d8fd9e.tar.xz | |
Refactor azalea-registry (#294)
* move registries in azalea-registry into separate modules
* rename Item and Block to ItemKind and BlockKind
* remove 'extra' registries from azalea-registry
* hide deprecated items from docs
* use DamageKindKey instead of Identifier when parsing registries
* store tag entries as a Vec instead of a HashSet
* sort tag values by protocol id
* update changelog
Diffstat (limited to 'azalea-entity/src/lib.rs')
| -rw-r--r-- | azalea-entity/src/lib.rs | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/azalea-entity/src/lib.rs b/azalea-entity/src/lib.rs index 84e1c9f7..d95a2f20 100644 --- a/azalea-entity/src/lib.rs +++ b/azalea-entity/src/lib.rs @@ -22,11 +22,10 @@ use azalea_block::{BlockState, fluid_state::FluidKind}; use azalea_buf::AzBuf; use azalea_core::{ aabb::Aabb, - identifier::Identifier, math, position::{BlockPos, ChunkPos, Vec3}, }; -use azalea_registry::EntityKind; +use azalea_registry::{builtin::EntityKind, identifier::Identifier}; use azalea_world::{ChunkStorage, InstanceName}; use bevy_ecs::{bundle::Bundle, component::Component}; pub use data::*; @@ -460,12 +459,12 @@ impl Physics { #[derive(Component, Copy, Clone, Default)] pub struct Dead; -/// A component NewType for [`azalea_registry::EntityKind`]. +/// A component NewType for [`EntityKind`]. /// /// Most of the time, you should be using `azalea_registry::EntityKind` /// directly instead. #[derive(Component, Clone, Copy, Debug, PartialEq, Deref)] -pub struct EntityKindComponent(pub azalea_registry::EntityKind); +pub struct EntityKindComponent(pub EntityKind); /// A bundle of components that every entity has. /// @@ -492,12 +491,7 @@ pub struct EntityBundle { } impl EntityBundle { - pub fn new( - uuid: Uuid, - pos: Vec3, - kind: azalea_registry::EntityKind, - world_name: Identifier, - ) -> Self { + pub fn new(uuid: Uuid, pos: Vec3, kind: EntityKind, world_name: Identifier) -> Self { let dimensions = EntityDimensions::from(kind); Self { |
