diff options
Diffstat (limited to 'azalea-entity/src')
| -rw-r--r-- | azalea-entity/src/mining.rs | 4 | ||||
| -rw-r--r-- | azalea-entity/src/plugin/mod.rs | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/azalea-entity/src/mining.rs b/azalea-entity/src/mining.rs index bc2e6c46..19346ba9 100644 --- a/azalea-entity/src/mining.rs +++ b/azalea-entity/src/mining.rs @@ -35,7 +35,7 @@ pub fn get_mine_progress( }; let base_destroy_speed = destroy_speed( - block.as_registry_block(), + block.as_block_kind(), held_item, fluid_on_eyes, physics, @@ -52,7 +52,7 @@ fn has_correct_tool_for_drops(block: &dyn BlockTrait, item: &ItemStack) -> bool let Some(tool) = item.get_component::<Tool>() else { return false; }; - let registry_block = block.as_registry_block(); + let registry_block = block.as_block_kind(); for rule in &tool.rules { if let Some(correct) = rule.correct_for_drops && rule.blocks.contains(registry_block) diff --git a/azalea-entity/src/plugin/mod.rs b/azalea-entity/src/plugin/mod.rs index bedb03b0..6035f674 100644 --- a/azalea-entity/src/plugin/mod.rs +++ b/azalea-entity/src/plugin/mod.rs @@ -144,7 +144,7 @@ pub fn update_on_climbable( let block_pos = BlockPos::from(position); let block_state_at_feet = world.get_block_state(block_pos).unwrap_or_default(); let block_at_feet = Box::<dyn BlockTrait>::from(block_state_at_feet); - let registry_block_at_feet = block_at_feet.as_registry_block(); + let registry_block_at_feet = block_at_feet.as_block_kind(); **on_climbable = tags::blocks::CLIMBABLE.contains(®istry_block_at_feet) || (tags::blocks::TRAPDOORS.contains(®istry_block_at_feet) @@ -167,7 +167,7 @@ fn is_trapdoor_usable_as_ladder( // block below must be a ladder let block_below = world.get_block_state(block_pos.down(1)).unwrap_or_default(); - let registry_block_below = Box::<dyn BlockTrait>::from(block_below).as_registry_block(); + let registry_block_below = block_below.as_block_kind(); if registry_block_below != BlockKind::Ladder { return false; } |
