Right click while sneaking detection on a bow
I'm working on a custom weapon that can switch modes between a mace and a bow. The idea is that when the player right clicks while crouching with one of the items, it will be swapped out for the other one.
I've managed to successfully implement switching the mace to a bow, however the same solution doesn't seem to be working the other way round (I assume it has something to do with the fact that bows already have a built-in RMB action???).
use_hammer and use_hammer_ranged are the advancements I use to detect right clicks on either item.
hammer and hammer_ranged are the reward functions that, if the player is sneaking, run an /item replace that swaps the currently held item. the anvil sounds are for debugging (right now they play when switching from mace to bow, but don't when crouching and RMB with the bow)
Continue to help post