diff options
| author | mat <git@matdoes.dev> | 2025-06-17 09:30:09 +1200 |
|---|---|---|
| committer | mat <git@matdoes.dev> | 2025-06-16 21:31:04 +0000 |
| commit | fd9bf168716f195e7e6225b93dfb099aa01b1fde (patch) | |
| tree | e617f464e2df32cbc8678b56c5c1df8cae1c4dcb /azalea-entity/src/attributes.rs | |
| parent | 713dae7110ad4119469323b87fd95a7f2a544ed0 (diff) | |
| download | azalea-drasl-fd9bf168716f195e7e6225b93dfb099aa01b1fde.tar.xz | |
implement EntityHitResult
Diffstat (limited to 'azalea-entity/src/attributes.rs')
| -rw-r--r-- | azalea-entity/src/attributes.rs | 19 |
1 files changed, 18 insertions, 1 deletions
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, + } +} |
