Fixed muskets and lutes casting on left click

This commit is contained in:
Jules 2024-04-06 09:54:13 -07:00
parent 6c26a8f815
commit d3f802c3fa

View File

@ -67,7 +67,7 @@ public class Weapon extends UseItem {
/** /**
* @return If instantaneous weapon costs are met. * @return If instantaneous weapon costs are met.
* @see {@link #applyWeaponCosts(Double)} * @see #applyWeaponCosts(Double)
*/ */
public boolean checkWeaponCosts(boolean cooldowns) { public boolean checkWeaponCosts(boolean cooldowns) {
if (cooldowns && getPlayerData().getMMOPlayerData().getCooldownMap().isOnCooldown(mmoitem.getType())) if (cooldowns && getPlayerData().getMMOPlayerData().getCooldownMap().isOnCooldown(mmoitem.getType()))
@ -96,7 +96,7 @@ public class Weapon extends UseItem {
* Other weapon costs are inherent to the item type and are * Other weapon costs are inherent to the item type and are
* fully configurable inside of the types config file. * fully configurable inside of the types config file.
* *
* @see {@link #checkWeaponCosts(boolean)} * @see #checkWeaponCosts(boolean)
*/ */
public void applyWeaponCosts(@Nullable Double attackDelay) { public void applyWeaponCosts(@Nullable Double attackDelay) {
@ -204,7 +204,7 @@ public class Weapon extends UseItem {
private WeaponAttackResult legacyHandleUntargetedAttack(boolean rightClick, @NotNull EquipmentSlot actionHand) { private WeaponAttackResult legacyHandleUntargetedAttack(boolean rightClick, @NotNull EquipmentSlot actionHand) {
// Check for attack effect conditions // Check for attack effect conditions
if (((LegacyWeapon) this).canAttack(rightClick, actionHand)) return WeaponAttackResult.NO_ATTACK; if (!((LegacyWeapon) this).canAttack(rightClick, actionHand)) return WeaponAttackResult.NO_ATTACK;
// Check for durability // Check for durability
UntargetedDurabilityItem durItem = new UntargetedDurabilityItem(getPlayer(), getNBTItem(), actionHand); UntargetedDurabilityItem durItem = new UntargetedDurabilityItem(getPlayer(), getNBTItem(), actionHand);