Download Attack Range Attribute — Minecraft Mods — MetaMods

Attack Range Attribute

Active

Downloads

0

Last update

1 month ago

Versions

1.21.1
Client and server
Fabric
Adventure
Weapons and armor
Game mechanics
Libraries

Attack Range Attribute

A small API library that introduces a new entity attribute "attackrangeattribute:generic.attack_range". By itself, this modification does not affect gameplay.

Why is a separate attack attribute needed?

In the original Minecraft version, there is an "entity_interaction_range" attribute. The question arises - why is a separate attack distance attribute required?

The entity interaction attribute is responsible for both attack range and right-click interaction distance (for example, trading with villagers). In the standard game this works fine because the interaction distance does not change during normal gameplay.

However, in situations where different weapon types are designed with varying attack ranges, right-click interaction with entities becomes unpredictable, and in extreme cases - when attack distance is zero - completely impossible.

Working with API

Casting a "LivingEntity" object to the "AttackRangeUsingEntity" interface provides access to all relevant methods.

Project members
TheRedBrain

TheRedBrain

Developer

Created: 30 Sep 2025

ID: 267376