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/src/auto_tool.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/src/auto_tool.rs')
| -rw-r--r-- | azalea/src/auto_tool.rs | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/azalea/src/auto_tool.rs b/azalea/src/auto_tool.rs index b71fb0b0..06103976 100644 --- a/azalea/src/auto_tool.rs +++ b/azalea/src/auto_tool.rs @@ -3,7 +3,7 @@ use azalea_client::Client; use azalea_core::position::BlockPos; use azalea_entity::{ActiveEffects, Attributes, FluidOnEyes, Physics, inventory::Inventory}; use azalea_inventory::{ItemStack, Menu, components}; -use azalea_registry::EntityKind; +use azalea_registry::builtin::{BlockKind, EntityKind, ItemKind}; use crate::bot::BotClientExt; @@ -89,10 +89,7 @@ pub fn accurate_best_tool_in_hotbar_for_block( let block = Box::<dyn BlockTrait>::from(block); let registry_block = block.as_registry_block(); - if matches!( - registry_block, - azalea_registry::Block::Water | azalea_registry::Block::Lava - ) { + if matches!(registry_block, BlockKind::Water | BlockKind::Lava) { // can't mine fluids return BestToolResult { index: 0, @@ -107,7 +104,7 @@ pub fn accurate_best_tool_in_hotbar_for_block( ItemStack::Empty => { this_item_speed = Some(azalea_entity::mining::get_mine_progress( block.as_ref(), - azalea_registry::Item::Air, + ItemKind::Air, fluid_on_eyes, physics, attributes, |
