From 253da93b3e36d990e3802355a26e7843760badb6 Mon Sep 17 00:00:00 2001 From: Nicholas Ignoffo Date: Fri, 20 May 2016 22:39:54 -0700 Subject: [PATCH] Make it clearer when arrow is not able to fire (#744) - Now does not fire an arrow (seems kinda obvious) - Plays the "fire extinguish" sound as further indication. --- .../WayofTime/bloodmagic/item/soul/ItemSentientBow.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java index 9201cbb5..ee0bd7e5 100644 --- a/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java +++ b/src/main/java/WayofTime/bloodmagic/item/soul/ItemSentientBow.java @@ -246,8 +246,15 @@ public class ItemSentientBow extends ItemBow implements IMultiWillTool//, IMeshP //Need to do some stuffs // ItemArrow itemarrow = ((ItemArrow) (itemstack.getItem() instanceof ItemArrow ? itemstack.getItem() : Items.arrow)); // EntityArrow entityArrow = itemarrow.createArrow(world, itemstack, player); + float newArrowVelocity = arrowVelocity * getVelocityOfArrow(stack); EntityArrow entityArrow = new EntitySentientArrow(world, entityLiving, type); - entityArrow.setAim(player, player.rotationPitch, player.rotationYaw, 0.0F, arrowVelocity * getVelocityOfArrow(stack), 1.0F); + entityArrow.setAim(player, player.rotationPitch, player.rotationYaw, 0.0F, newArrowVelocity, 1.0F); + + if (newArrowVelocity == 0) + { + world.playSound(null, player.getPosition(), SoundEvents.BLOCK_FIRE_EXTINGUISH, SoundCategory.NEUTRAL, 0.4F, 1.0F); + return; + } if (arrowVelocity == 1.0F) {