<commit_before>package ljfa.tntutils.command;

import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;

public class CommandExplosion extends CommandBase {
    @Override
    public String getCommandName() {
        return "explosion";
    }
    
    @Override
    public int getRequiredPermissionLevel() {
        return 2;
    }

    @Override
    public String getCommandUsage(ICommandSender sender) {
        return "explosion <x> <y> <z> [strength] [damage blocks] [set fires]\n"
                + "Default strength: 4.0 (same as TNT)";
    }

    @Override
    public void processCommand(ICommandSender sender, String[] args) {
        if(args.length < 3)
            throw new WrongUsageException("Too few arguments", new Object[0]);
        
        World world = sender.getEntityWorld();
        double x = (double)sender.getPlayerCoordinates().posX + 0.5;
        double y = (double)sender.getPlayerCoordinates().posY;
        double z = (double)sender.getPlayerCoordinates().posZ + 0.5;
        
        x = func_110666_a(sender, x, args[0]);
        y = func_110666_a(sender, y, args[1]);
        z = func_110666_a(sender, z, args[2]);
        
        float strength = args.length >= 4 ? (float)parseDouble(sender, args[3]) : 4.0f;
        boolean blockDmg = args.length >= 5 ? parseBoolean(sender, args[4]) : true;
        boolean fire = args.length >= 6 ? parseBoolean(sender, args[5]) : false;

        Entity source = (sender instanceof Entity) ? (Entity)sender : null;
        <commit_msg>A bit prettier formatting<commit_after>package ljfa.tntutils.command;

import net.minecraft.command.CommandBase;
import net.minecraft.command.ICommandSender;
import net.minecraft.command.WrongUsageException;
import net.minecraft.entity.Entity;
import net.minecraft.world.World;

public class CommandExplosion extends CommandBase {
    @Override
    public String getCommandName() {
        return "explosion";
    }
    
    @Override
    public int getRequiredPermissionLevel() {
        return 2;
    }

    @Override
    public String getCommandUsage(ICommandSender sender) {
        return "explosion <x> <y> <z> [strength] [damage blocks] [set fires]\n"
                + "Default strength: 4.0 (same as TNT)";
    }

    @Override
    public void processCommand(ICommandSender sender, String[] args) {
        if(args.length < 3)
            throw new WrongUsageException("Too few arguments", new Object[0]);
        
        World world = sender.getEntityWorld();
        double x = (double)sender.getPlayerCoordinates().posX + 0.5;
        double y = (double)sender.getPlayerCoordinates().posY;
        double z = (double)sender.getPlayerCoordinates().posZ + 0.5;
        
        x = func_110666_a(sender, x, args[0]);
        y = func_110666_a(sender, y, args[1]);
        z = func_110666_a(sender, z, args[2]);
        
        float strength   = args.length >= 4 ? (float)parseDouble(sender, args[3]) : 4.0f;
        boolean blockDmg = args.length >= 5 ? parseBoolean(sender, args[4])       : true;
        boolean fire     = args.length >= 6 ? parseBoolean(sender, args[5])       : false;

        Entity source = (sender instanceof Entity) ? (Entity)sender : null;
        
{'fraction_non_alphanumeric': 0.11483253588516747, 'fraction_numerical': 0.022727272727272728, 'mean_word_length': 2.8448275862068964, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '825079', 'n_tokens_mistral': 1037, 'n_tokens_neox': 989, 'n_words': 243}