<commit_before>package convenientadditions.item;

import java.util.List;
import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.client.audio.SoundRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import convenientadditions.ConvenientAdditionsMod;
import convenientadditions.init.ModBlocks;
import convenientadditions.init.Reference;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class ItemCompost extends Item {
	public ItemCompost(){
		super();
		this.setHasSubtypes(true).setUnlocalizedName(ConvenientAdditionsMod.MODID+":"+Reference.compostItemName).setTextureName(ConvenientAdditionsMod.MODID+":"+Reference.compostItemName).setCreativeTab(ConvenientAdditionsMod.CREATIVETAB);
	}
	
	@Override
    public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int no_idea, float no_clue, float what, float are_these)
    {
		Block b=world.getBlock(x, y, z);
		if(!(b==Blocks.dirt||b==Blocks.farmland||b==Blocks.grass))
    		return false;
		if(!world.isRemote){
			if(b==Blocks.dirt)
				world.setBlock(x, y, z, ModBlocks.compostSoilBlock, 0, 3);
			else if(b==Blocks.farmland)
				world.setBlock(x, y, z, ModBlocks.compostSoilTilledBlock, 0, 3);
			else if(b==Blocks.grass){
				if(itemStack.getItemDamage()==1&&new Random().nextInt(14)==0)
					world.setBlock(x, y, z, Blocks.mycelium, 0, 3);
				else
					world.setBlock(x, y, z, ModBlocks.compostSoilBlock, 0, 3);
			}
			itemStack.stackSize--;
		}
		world.playSoundEffect((double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), Blocks.grass.stepSound.getStepResourcePath(), (Blocks.grass.stepSound.getVolume() + 1.0F) / 2.0F, Blocks.grass.stepSound.getPitch() * 0.8F);
		return true;
    }
    
	@Override
	public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
	{
		list.add(StatCollector.translateToLocal("tooltip."+ConvenientAdditionsMod.MODID+":"+Reference.compostItemName));
		if(stack.getItemDamage()==1)
			list.add(StatCollector.translateToLocal("tooltip."+ConvenientAdditionsMod.MODID+":"+Reference.compostItemName+"Spores"));
	}
	
	@Override
    @SideOnly(Side.CLIENT)
    public void getSubItems(Item i, CreativeTabs c, List l)
    {
        l.add(new ItemStack(i, 1, 0));
        l.add(new ItemStack(i, 1, 1));
    }
}<commit_msg>lowered mycelium chance<commit_after>package convenientadditions.item;

import java.util.List;
import java.util.Random;

import net.minecraft.block.Block;
import net.minecraft.client.audio.SoundRegistry;
import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Blocks;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import net.minecraft.util.StatCollector;
import net.minecraft.world.World;
import convenientadditions.ConvenientAdditionsMod;
import convenientadditions.init.ModBlocks;
import convenientadditions.init.Reference;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;

public class ItemCompost extends Item {
	public ItemCompost(){
		super();
		this.setHasSubtypes(true).setUnlocalizedName(ConvenientAdditionsMod.MODID+":"+Reference.compostItemName).setTextureName(ConvenientAdditionsMod.MODID+":"+Reference.compostItemName).setCreativeTab(ConvenientAdditionsMod.CREATIVETAB);
	}
	
	@Override
    public boolean onItemUse(ItemStack itemStack, EntityPlayer player, World world, int x, int y, int z, int no_idea, float no_clue, float what, float are_these)
    {
		Block b=world.getBlock(x, y, z);
		if(!(b==Blocks.dirt||b==Blocks.farmland||b==Blocks.grass))
    		return false;
		if(!world.isRemote){
			if(b==Blocks.dirt)
				world.setBlock(x, y, z, ModBlocks.compostSoilBlock, 0, 3);
			else if(b==Blocks.farmland)
				world.setBlock(x, y, z, ModBlocks.compostSoilTilledBlock, 0, 3);
			else if(b==Blocks.grass){
				if(itemStack.getItemDamage()==1&&new Random().nextInt(22)==0)
					world.setBlock(x, y, z, Blocks.mycelium, 0, 3);
				else
					world.setBlock(x, y, z, ModBlocks.compostSoilBlock, 0, 3);
			}
			itemStack.stackSize--;
		}
		world.playSoundEffect((double)((float)x + 0.5F), (double)((float)y + 0.5F), (double)((float)z + 0.5F), Blocks.grass.stepSound.getStepResourcePath(), (Blocks.grass.stepSound.getVolume() + 1.0F) / 2.0F, Blocks.grass.stepSound.getPitch() * 0.8F);
		return true;
    }
    
	@Override
	public void addInformation(ItemStack stack, EntityPlayer player, List list, boolean par4)
	{
		list.add(StatCollector.translateToLocal("tooltip."+ConvenientAdditionsMod.MODID+":"+Reference.compostItemName));
		if(stack.getItemDamage()==1)
			list.add(StatCollector.translateToLocal("tooltip."+ConvenientAdditionsMod.MODID+":"+Reference.compostItemName+"Spores"));
	}
	
	@Override
    @SideOnly(Side.CLIENT)
    public void getSubItems(Item i, CreativeTabs c, List l)
    {
        l.add(new ItemStack(i, 1, 0));
        l.add(new ItemStack(i, 1, 1));
    }
}
{'fraction_non_alphanumeric': 0.14022281982328083, 'fraction_numerical': 0.01152516327314637, 'mean_word_length': 5.3115151515151515, 'pattern_counts': {'":': 8, '<': 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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4150033', 'n_tokens_mistral': 1958, 'n_tokens_neox': 1838, 'n_words': 308}