When using an item with the attack_range item component on it, it does not apply the component’s effects in creative mode.
Steps to Reproduce:
/give @s netherite_spear[attack_range={min_reach:0,max_reach:50,hitbox_margin:1}]
Expected Result:
The spear will be able to hit targets from a long range without having the crosshair directly on the target, no matter the gamemode.
Actual Result:
The spear works as expected, except while in the creative gamemode, in which case it behaves as though the player were using their fist and not the spear, in terms of range.
Creative mode reach is controlled by
min_creative_reachandmax_creative_reachfields, which by default are0.0and5.0respectively.Reference: https://www.minecraft.net/en-us/article/minecraft-1-21-11-pre-release-4