Mods
Resource Packs
Data Packs
Modpacks
Shaders
Plugins
Mods Resource Packs Data Packs Plugins Shaders Modpacks
Get Modrinth App Upgrade to Modrinth+
Sign in
ModsPluginsData PacksShadersResource PacksModpacks
Sign in
Settings
Attack Range Attribute

Attack Range Attribute

A small API that adds an attack range entity attribute.

124
1
Equipment
Game Mechanics
Library

Compatibility

Minecraft: Java Edition

1.21.1

Platforms

Fabric

Supported environments

Client and server

90% of ad revenue goes to creators

Support creators and Modrinth ad-free with Modrinth+

Links

Report issues View source Join Discord server

Creators

TheRedBrain
TheRedBrain Member

Details

Licensed MIT
Published 3 months ago
Updated 3 months ago
DescriptionChangelogVersions

Attack Range Attribute

A small API that adds the "attackrangeattribute:generic.attack_range" entity attribute. On its own this mod doesn't change gameplay.

Why is this necessary?

Vanilla Minecraft has the "entity_interaction_range" attribute. Why is an "attack_range" attribute necessary?

The entity_interaction_range attribute controls both the range of attacks and the range of right-click interactions (e.g. trading with villagers). This works fine in vanilla, since the entity_interaction_range doesn't change in normal gameplay.

However, in scenarios where different weapons are designed to have different attack ranges, the right-click interactions with entities get inconsistent and in extreme cases, when the attack range is 0, impossible.

API

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

Modrinth is open source.

feat/theseus/tauri-v2@c5403db

© Rinth, Inc.

Company

TermsPrivacyRulesCareers

Resources

SupportBlogDocsStatus

Interact

Discord X (Twitter) Mastodon Crowdin
Get Modrinth App Settings
NOT AN OFFICIAL MINECRAFT SERVICE. NOT APPROVED BY OR ASSOCIATED WITH MOJANG OR MICROSOFT.