mirror of
https://github.com/GTNewHorizons/TinkersConstruct.git
synced 2026-11-25 06:24:37 +00:00
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:
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;
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user