@SubscribeEvent
public void onPlayerUpdate(ArrowLooseEvent event) {
ItemStack stackBow = event.getBow();
int level = this.getCurrentLevelTool(stackBow);
if (level <= 0) {
return;
}
EntityPlayer player = event.getEntityPlayer();
World worldIn = player.world;
if (worldIn.isRemote == false) {
float charge = ItemBow.getArrowVelocity(stackBow.getMaxItemUseDuration() - event.getCharge());
Vec3d playerDirection = UtilEntity.lookVector(player.rotationYaw, player.rotationPitch);
Vec3d left = playerDirection.crossProduct(new Vec3d(0, 1, 0));
Vec3d right = playerDirection.crossProduct(new Vec3d(0, -1, 0));
spawnArrow(worldIn, player, stackBow, charge, left.normalize());
spawnArrow(worldIn, player, stackBow, charge, right.normalize());
}
}