<commit_before>package snowballmadness;

import org.bukkit.*;
import org.bukkit.entity.*;
import org.bukkit.inventory.*;
import org.bukkit.util.*;

/**
 *
 * @author DanJ
 */
public class ArrowSnowballLogic extends SnowballLogic {

    private final int arrowCount;

    public ArrowSnowballLogic(ItemStack arrow) {
        this.arrowCount = Math.max(1, arrow.getAmount() / 8);
    }

    @Override
    public void launch(Snowball snowball, SnowballInfo info) {
        super.launch(snowball, info);
        World world = snowball.getWorld();

        Vector velocity = snowball.getVelocity();
        float speed = (float) (2.5 * info.speed);

        if (info.power > 1.0) {
            for (int i = 0; i < arrowCount; ++i) {
                float spread = (float) ((arrowCount * 8) / info.power);
                Arrow arrow = world.spawnArrow(snowball.getLocation(), velocity, speed, spread);
                arrow.setShooter(snowball.getShooter());
                arrow.setFireTicks((int) (info.power * 50));
            }
        } else {
            Arrow arrow = world.spawnArrow(snowball.getLocation(), velocity, speed, 0);
            arrow.setShooter(snowball.getShooter());
        }

        snowball.remove();
    }
}<commit_msg>Scaling back velocity of all snowballs, as they are uniformly death rays as soon as you speed them in any way<commit_after>package snowballmadness;

import org.bukkit.*;
import org.bukkit.entity.*;
import org.bukkit.inventory.*;
import org.bukkit.util.*;

/**
 *
 * @author DanJ
 */
public class ArrowSnowballLogic extends SnowballLogic {

    private final int arrowCount;

    public ArrowSnowballLogic(ItemStack arrow) {
        this.arrowCount = Math.max(1, arrow.getAmount() / 8);
    }

    @Override
    public void launch(Snowball snowball, SnowballInfo info) {
        super.launch(snowball, info);
        World world = snowball.getWorld();

        Vector velocity = snowball.getVelocity();
        float speed = (float) (info.speed);

        if (info.power > 1.0) {
            for (int i = 0; i < arrowCount; ++i) {
                float spread = (float) ((arrowCount * 8) / info.power);
                Arrow arrow = world.spawnArrow(snowball.getLocation(), velocity, speed, spread);
                arrow.setShooter(snowball.getShooter());
                arrow.setFireTicks((int) (info.power * 50));
            }
        } else {
            Arrow arrow = world.spawnArrow(snowball.getLocation(), velocity, speed, 0);
            arrow.setShooter(snowball.getShooter());
        }
        snowball.remove();
    }
}
{'fraction_non_alphanumeric': 0.12301125339542103, 'fraction_numerical': 0.007760962359332557, 'mean_word_length': 2.414569536423841, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7587524', 'n_tokens_mistral': 822, 'n_tokens_neox': 762, 'n_words': 185}