diff options
| author | mat <git@matdoes.dev> | 2025-06-02 19:23:59 -0330 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-03 06:11:26 +0700 |
| commit | 7517a207db658c98d5b97b3b3f44df6725c025a2 (patch) | |
| tree | 5daabe20be53705acd1fee93134421dc23b4d6c6 /azalea-entity | |
| parent | abf995a70245028f9cc860ee231dc671f14adfcc (diff) | |
| download | azalea-drasl-7517a207db658c98d5b97b3b3f44df6725c025a2.tar.xz | |
rename the Block trait to BlockTrait to disambiguate with azalea_registry::Block
Diffstat (limited to 'azalea-entity')
| -rw-r--r-- | azalea-entity/src/mining.rs | 6 | ||||
| -rw-r--r-- | azalea-entity/src/plugin/mod.rs | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/azalea-entity/src/mining.rs b/azalea-entity/src/mining.rs index 370478ee..fbe7f525 100644 --- a/azalea-entity/src/mining.rs +++ b/azalea-entity/src/mining.rs @@ -1,4 +1,4 @@ -use azalea_block::{Block, BlockBehavior}; +use azalea_block::{BlockTrait, BlockBehavior}; use azalea_core::tier::get_item_tier; use azalea_registry as registry; @@ -13,7 +13,7 @@ use crate::{FluidOnEyes, Physics, effects}; /// The player inventory is needed to check your armor and offhand for modifiers /// to your mining speed. pub fn get_mine_progress( - block: &dyn Block, + block: &dyn BlockTrait, held_item: registry::Item, player_inventory: &azalea_inventory::Menu, fluid_on_eyes: &FluidOnEyes, @@ -41,7 +41,7 @@ pub fn get_mine_progress( / divider as f32 } -fn has_correct_tool_for_drops(block: &dyn Block, tool: registry::Item) -> bool { +fn has_correct_tool_for_drops(block: &dyn BlockTrait, tool: registry::Item) -> bool { if !block.behavior().requires_correct_tool_for_drops { return true; } diff --git a/azalea-entity/src/plugin/mod.rs b/azalea-entity/src/plugin/mod.rs index 6e716d15..03afe7cd 100644 --- a/azalea-entity/src/plugin/mod.rs +++ b/azalea-entity/src/plugin/mod.rs @@ -135,7 +135,7 @@ pub fn update_on_climbable( let block_pos = BlockPos::from(position); let block_state_at_feet = instance.get_block_state(&block_pos).unwrap_or_default(); - let block_at_feet = Box::<dyn azalea_block::Block>::from(block_state_at_feet); + let block_at_feet = Box::<dyn azalea_block::BlockTrait>::from(block_state_at_feet); let registry_block_at_feet = block_at_feet.as_registry_block(); **on_climbable = azalea_registry::tags::blocks::CLIMBABLE.contains(®istry_block_at_feet) @@ -162,7 +162,7 @@ fn is_trapdoor_useable_as_ladder( .get_block_state(&block_pos.down(1)) .unwrap_or_default(); let registry_block_below = - Box::<dyn azalea_block::Block>::from(block_below).as_registry_block(); + Box::<dyn azalea_block::BlockTrait>::from(block_below).as_registry_block(); if registry_block_below != azalea_registry::Block::Ladder { return false; } |
