From fd9bf168716f195e7e6225b93dfb099aa01b1fde Mon Sep 17 00:00:00 2001 From: mat Date: Tue, 17 Jun 2025 09:30:09 +1200 Subject: implement EntityHitResult --- azalea-entity/src/attributes.rs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'azalea-entity/src/attributes.rs') diff --git a/azalea-entity/src/attributes.rs b/azalea-entity/src/attributes.rs index 12c9b908..7af845f8 100644 --- a/azalea-entity/src/attributes.rs +++ b/azalea-entity/src/attributes.rs @@ -12,6 +12,9 @@ pub struct Attributes { pub speed: AttributeInstance, pub attack_speed: AttributeInstance, pub water_movement_efficiency: AttributeInstance, + + pub block_interaction_range: AttributeInstance, + pub entity_interaction_range: AttributeInstance, } #[derive(Clone, Debug)] @@ -93,7 +96,6 @@ pub fn sprinting_modifier() -> AttributeModifier { operation: AttributeModifierOperation::MultiplyTotal, } } - pub fn base_attack_speed_modifier(amount: f64) -> AttributeModifier { AttributeModifier { id: ResourceLocation::new("base_attack_speed"), @@ -101,3 +103,18 @@ pub fn base_attack_speed_modifier(amount: f64) -> AttributeModifier { operation: AttributeModifierOperation::Addition, } } +pub fn creative_block_interaction_range_modifier() -> AttributeModifier { + AttributeModifier { + id: ResourceLocation::new("creative_mode_block_range"), + amount: 0.5, + operation: AttributeModifierOperation::Addition, + } +} + +pub fn creative_entity_interaction_range_modifier() -> AttributeModifier { + AttributeModifier { + id: ResourceLocation::new("creative_mode_entity_range"), + amount: 2.0, + operation: AttributeModifierOperation::Addition, + } +} -- cgit v1.2.3