Two Handed bows do not prioritize offhand-held arrows (possibly due to Better Combat?)
muon-rw opened this issue ยท 3 comments
In vanilla, the ammunition held in your offhand is always used first. This is useful when holding multiple types of arrows to specify which you would like to use.
This mechanic does not work with longbows or heavy crossbows - it will eventually access your offhand arrows, but they are not used first.
Another problematic scenario which no longer works as expected: A heavy crossbow user holds explosive fireworks in their offhand, but keeps non explosive fireworks in their inventory for elytra flight.
I have not tested with Better Combat disabled.
Archers 1.0.3+1.20.1
Public note: entity.getStackInHand(Hand.OFF_HAND))
needs to be wrapped
// RangedWeaponItem.java
public static ItemStack getHeldProjectile(LivingEntity entity, Predicate<ItemStack> predicate) {
if (predicate.test(entity.getStackInHand(Hand.OFF_HAND))) {
return entity.getStackInHand(Hand.OFF_HAND);
} else {
return predicate.test(entity.getStackInHand(Hand.MAIN_HAND)) ? entity.getStackInHand(Hand.MAIN_HAND) : ItemStack.EMPTY;
}
}
To be fixed in Better Combat for sure.