Fixed bound sword stuttering
This commit is contained in:
parent
0855c61943
commit
1936e2d251
2 changed files with 10 additions and 9 deletions
|
@ -55,15 +55,15 @@ public class ItemBoundSword extends ItemSword implements IBindable, IActivatable
|
|||
if (player.isSneaking())
|
||||
setActivatedState(stack, !getActivated(stack));
|
||||
|
||||
if (!player.isSneaking() && getActivated(stack))
|
||||
{
|
||||
BoundToolEvent.Charge event = new BoundToolEvent.Charge(player, stack);
|
||||
if (MinecraftForge.EVENT_BUS.post(event))
|
||||
return new ActionResult<ItemStack>(EnumActionResult.FAIL, event.result);
|
||||
|
||||
player.setActiveHand(hand);
|
||||
return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||
}
|
||||
// if (!player.isSneaking() && getActivated(stack))
|
||||
// {
|
||||
// BoundToolEvent.Charge event = new BoundToolEvent.Charge(player, stack);
|
||||
// if (MinecraftForge.EVENT_BUS.post(event))
|
||||
// return new ActionResult<ItemStack>(EnumActionResult.FAIL, event.result);
|
||||
//
|
||||
// player.setActiveHand(hand);
|
||||
// return new ActionResult<ItemStack>(EnumActionResult.SUCCESS, stack);
|
||||
// }
|
||||
|
||||
return super.onItemRightClick(stack, world, player, hand);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue