Not sure why there are 2 checks. From the code comments, it was explicitly done in REA.
I'll need to handle compatibility with both of these checks as it seems from https://github.com/JamiesWhiteShirt/reach-entity-attributes/issues/15, there's already some examples from Pehkui where compatibility is done and easier for me to do it myself than wait for an update on the reach-entity-attributes repo + waiting for Bewitchment or other mods to also update the library version reference.
JamiesWhiteShirt/reach-entity-attributes produces a library (ReachEntityAttributes) that mods such as Bewitchment consume.
SpoornBountyMobs modifies entity sizes, which in turn requires modifying the allowed player's attack range on the entity as vanilla minecraft has some limitations on the attack range using a squared distance from the player to entity. This was done in https://github.com/spoorn/SpoornBountyMobs/commit/841bc07d0e669e989c7f4ab3c4a4e8d602ad5d9e.
However, ReachEntityAttributes also tries to modify the same code from vanilla minecraft: https://github.com/JamiesWhiteShirt/reach-entity-attributes/blob/1.18.2/src/main/java/com/jamieswhiteshirt/reachentityattributes/mixin/ServerPlayNetworkHandlerMixin.java#L22-L27
And it also adds another limitation to whether a player can attack the entity or not: https://github.com/JamiesWhiteShirt/reach-entity-attributes/blob/1.18.2/src/main/java/com/jamieswhiteshirt/reachentityattributes/ReachEntityAttributes.java#L66-L68
Not sure why there are 2 checks. From the code comments, it was explicitly done in REA.
I'll need to handle compatibility with both of these checks as it seems from https://github.com/JamiesWhiteShirt/reach-entity-attributes/issues/15, there's already some examples from Pehkui where compatibility is done and easier for me to do it myself than wait for an update on the reach-entity-attributes repo + waiting for Bewitchment or other mods to also update the library version reference.