InteractionCompat
com.jsmacrosce.jsmacros.client.util.InteractionCompat
Calls the entity-interaction overload across Minecraft API versions.
On Minecraft 26.1 and later, constructs an EntityHitResult for the entity;
earlier versions pass the entity directly.
Methods
interact
static interact(MultiPlayerGameMode gameMode, Player player, Entity entity, InteractionHand hand): InteractionResult#Delegates to the supplied game mode's entity-interaction API. On Minecraft 26.1 and later, the hit result is constructed from
entity rather than supplied by the caller.Parameters:
gameMode: the non-null client game-mode controller handling the interactionplayer: the non-null interacting playerentity: the non-null target entityhand: the non-null hand to use
Returns: the interaction result returned by the game mode; this does not indicate server acceptance