theishiopian / Parrying

A mod about deflecting blows (and inflicting your own)
6 stars 5 forks source link

Avoid throwing the spear if sneaking #16

Closed k1r0s closed 2 years ago

k1r0s commented 2 years ago

This allows for shield usage while having a spear. Maybe we have to specifically check for the shield in the offhand I dunno. Or check the opposite way, only throw the spear while sneaking..

Give me some feedback plz

thx

related: https://github.com/theishiopian/Parrying/issues/13

theishiopian commented 2 years ago

Another solution is to disable throwing with a shield, unless you are sneaking, in which case you throw normally. I think this would be more natural shield wise.

Edit: Oh you suggested that already, I need more sleep...

k1r0s commented 2 years ago

Another solution is to disable throwing with a shield, unless you are sneaking, in which case you throw normally. I think this would be more natural shield wise.

Edit: Oh you suggested that already, I need more sleep...

yup, I find it more intuitive. Let me handle it

k1r0s commented 2 years ago

just to make it clear, to me, having a weapon (spear) in the main hand while holding something in the off hand, the intuitive behavior to use the offhand item by default. So in the code first we have to check whether offhand is empty or not before checking if the user is sneaking

k1r0s commented 2 years ago

Please @theishiopian check this behavior

theishiopian commented 2 years ago

Thank you, I will review this soon

theishiopian commented 2 years ago

This has been implemented in the 1.18 branch, and applied to daggers