From 7517a207db658c98d5b97b3b3f44df6725c025a2 Mon Sep 17 00:00:00 2001 From: mat Date: Mon, 2 Jun 2025 19:23:59 -0330 Subject: rename the Block trait to BlockTrait to disambiguate with azalea_registry::Block --- azalea-entity/src/mining.rs | 6 +++--- azalea-entity/src/plugin/mod.rs | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'azalea-entity/src') 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::::from(block_state_at_feet); + let block_at_feet = Box::::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::::from(block_below).as_registry_block(); + Box::::from(block_below).as_registry_block(); if registry_block_below != azalea_registry::Block::Ladder { return false; } -- cgit v1.2.3