<commit_before>package mcjty.rftools.items.devdelight;

import mcjty.rftools.RFTools;
import mcjty.rftools.blocks.RFToolsTools;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import org.apache.commons.lang3.StringUtils;

import java.util.Set;

public class DevelopersDelightItem extends Item {

    public DevelopersDelightItem() {
        setMaxStackSize(1);
    }

//    @Override
//    public boolean itemInteractionForEntity(ItemStack p_111207_1_, EntityPlayer p_111207_2_, EntityLivingBase p_111207_3_) {
//        return super.itemInteractionForEntity(p_111207_1_, p_111207_2_, p_111207_3_);
//    }

    @Override
    public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float sx, float sy, float sz) {
        if (world.isRemote) {
            if (player.isSneaking()) {
                dumpInfo(world, x, y, z);
            } else {
                GuiDevelopersDelight.setSelected(x, y, z);
                player.openGui(RFTools.instance, RFTools.GUI_DEVELOPERS_DELIGHT, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ);
            }
            return true;
        }
        return true;
    }

    private void dumpInfo(World world, int x, int y, int z) {
        Block block = world.getBlock(x, y, z);
        if (block == null || block.getMaterial() == Material.air) {
            return;
        }<commit_msg>Fixed the developers delight item so that it no longer uses sneak to dump in log because that prevented normal usage on some machines that have a GUI. Instead it just always dumps to the log<commit_after>package mcjty.rftools.items.devdelight;

import mcjty.rftools.RFTools;
import mcjty.rftools.blocks.RFToolsTools;
import net.minecraft.block.Block;
import net.minecraft.block.material.Material;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.nbt.NBTBase;
import net.minecraft.nbt.NBTTagCompound;
import net.minecraft.tileentity.TileEntity;
import net.minecraft.world.World;
import org.apache.commons.lang3.StringUtils;
import org.lwjgl.input.Keyboard;

import java.util.Set;

public class DevelopersDelightItem extends Item {

    public DevelopersDelightItem() {
        setMaxStackSize(1);
    }

//    @Override
//    public boolean itemInteractionForEntity(ItemStack p_111207_1_, EntityPlayer p_111207_2_, EntityLivingBase p_111207_3_) {
//        return super.itemInteractionForEntity(p_111207_1_, p_111207_2_, p_111207_3_);
//    }


    @Override
    public boolean onItemUse(ItemStack stack, EntityPlayer player, World world, int x, int y, int z, int side, float sx, float sy, float sz) {
        if (world.isRemote) {
            dumpInfo(world, x, y, z);
            GuiDevelopersDelight.setSelected(x, y, z);
            player.openGui(RFTools.instance, RFTools.GUI_DEVELOPERS_DELIGHT, player.worldObj, (int) player.posX, (int) player.posY, (int) player.posZ);
            return true;
        }
        return true;
    }

    private void dumpInfo(World world, int x, int y, int z) {
        Block block = world.getBlock(x, y, z);
        if (block == null || block.getMaterial() == Material.air) {
            return;
        }
{'fraction_non_alphanumeric': 0.1004231311706629, 'fraction_numerical': 0.024823695345557124, 'mean_word_length': 3.3191230207064555, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6962492', 'n_tokens_mistral': 1185, 'n_tokens_neox': 1142, 'n_words': 270}