diff options
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, + } +} |
