Fixed issue with crossbow not being able to attack an enemy the player was too close to when in the battlegear slot.

This commit is contained in:
Kortako committed 2018-03-06 12:09:10 -08:00
1 parent a15044c435
commit 0708d8054a
1 file changed
+4
@@ -179,6 +179,9 @@ public abstract class AmmoItem extends ToolCore implements IBattlegearWeapon, IA
@Override
@Optional.Method(modid = "battlegear2")
public boolean offhandAttackEntity(PlayerEventChild.OffhandAttackEvent event, ItemStack mainhandItem, ItemStack offhandItem) {
event.cancelParent = false;
event.swingOffhand = false;
event.shouldAttack = false;
return false;
}
@@ -192,6 +195,7 @@ public abstract class AmmoItem extends ToolCore implements IBattlegearWeapon, IA
@Override
@Optional.Method(modid = "battlegear2")
public boolean offhandClickBlock(PlayerInteractEvent event, ItemStack mainhandItem, ItemStack offhandItem) {
event.setCanceled(false);
return false;
}