<commit_before>package com.Mrbysco.miab.handlers;

import java.util.Random;

import org.apache.logging.log4j.Logger;

import com.Mrbysco.miab.MemeInABottle;
import com.Mrbysco.miab.entities.passive.EntityClippy;
import com.Mrbysco.miab.entities.passive.EntityRoflCopter;
import com.Mrbysco.miab.init.MemeItems;
import com.Mrbysco.miab.init.MemeSounds;
import com.Mrbysco.miab.memes.MemeHelper;
import com.Mrbysco.miab.memes.MemeLists;

import net.minecraft.block.Block;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityAreaEffectCloud;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Biomes;
import net.minecraft.init.Blocks;
import net.minecraft.init.Items;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemBow;
import net.minecraft.item.ItemElytra;
import net.minecraft.item.ItemFishingRod;
import net.minecraft.item.ItemShears;
import net.minecraft.item.ItemShield;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.util.EntitySelectors;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.storage.loot.LootEntryItem;
import net.minecraft.world.storage.loot.LootPool;
import net.minecraft.world.storage.loot.LootTableList;
import net.minecraft.world.storage.loot.conditions.LootCondition;
import net.minecraft.world.storage.loot.functions.LootFunction;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.LootTableLoadEvent;
import net.minecraftforge.event.entity.living.LivingSpawnEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteract;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Optional.Method;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
import net.minecraftforge.fml.relauncher.Side;

public class MemeEventHandlers {

	private static final Logger logger = MemeInABottle.logger;
	
	@SubscribeEvent
	public void OnBlockInteraction(PlayerInteractEvent.RightClickBlock event) {
		ItemStack itemStack = event.getItemStack();
		BlockPos pos = event.getPos();
		World world = event.getWorld();
		EntityPlayer player = event.getEntityPlayer();
		Block block = world.getBlockState(pos).getBlock();
		
		if(!world.isRemote)
		{
			if (world.getBiome(pos) == Biomes.BEACH)
			{
				if(block == Blocks.SAND)
				{
					if(itemStack == ItemStack.EMPTY)
					{
						int random = world.rand.nextInt(1000);
	
						if(random < 10)
						{
							world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), MemeLists.getRandomMemeBottle()));
						}
					}
					if(itemStack.getItem() instanceof ItemSpade)
					{
						ItemTool item = (ItemTool)itemStack.getItem();
						int itemDamage = itemStack.getItemDamage();
						
						int random = world.rand.nextInt(1000);
	
						if(random < 30) {
							world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), MemeLists.getRandomMemeBottle()));
							itemStack.setItemDamage(itemDamage + 1);
						}
					}
				}
			}
			
			if(itemStack.getItem() == MemeItems.clippy)
			{
				EntityClippy clippy = new EntityClippy(world);
				clippy.setPositionAndUpdate(pos.getX(), pos.getY() + 1, pos.getZ());
				world.spawnEntity(clippy);
				<commit_msg>Change the biome specific section<commit_after>package com.Mrbysco.miab.handlers;

import java.util.Random;

import org.apache.logging.log4j.Logger;

import com.Mrbysco.miab.MemeInABottle;
import com.Mrbysco.miab.entities.passive.EntityClippy;
import com.Mrbysco.miab.entities.passive.EntityRoflCopter;
import com.Mrbysco.miab.init.MemeItems;
import com.Mrbysco.miab.init.MemeSounds;
import com.Mrbysco.miab.memes.MemeHelper;
import com.Mrbysco.miab.memes.MemeLists;

import net.minecraft.block.Block;
import net.minecraft.block.BlockSand;
import net.minecraft.entity.Entity;
import net.minecraft.entity.EntityAreaEffectCloud;
import net.minecraft.entity.item.EntityItem;
import net.minecraft.entity.monster.EntitySkeleton;
import net.minecraft.entity.player.EntityPlayer;
import net.minecraft.init.Items;
import net.minecraft.inventory.EntityEquipmentSlot;
import net.minecraft.item.ItemArmor;
import net.minecraft.item.ItemBow;
import net.minecraft.item.ItemElytra;
import net.minecraft.item.ItemFishingRod;
import net.minecraft.item.ItemShears;
import net.minecraft.item.ItemShield;
import net.minecraft.item.ItemSpade;
import net.minecraft.item.ItemStack;
import net.minecraft.item.ItemSword;
import net.minecraft.item.ItemTool;
import net.minecraft.util.EntitySelectors;
import net.minecraft.util.EnumHand;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraft.world.storage.loot.LootEntryItem;
import net.minecraft.world.storage.loot.LootPool;
import net.minecraft.world.storage.loot.LootTableList;
import net.minecraft.world.storage.loot.conditions.LootCondition;
import net.minecraft.world.storage.loot.functions.LootFunction;
import net.minecraftforge.common.BiomeDictionary;
import net.minecraftforge.event.AnvilUpdateEvent;
import net.minecraftforge.event.LootTableLoadEvent;
import net.minecraftforge.event.entity.living.LivingSpawnEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent;
import net.minecraftforge.event.entity.player.PlayerInteractEvent.EntityInteract;
import net.minecraftforge.fml.common.Loader;
import net.minecraftforge.fml.common.Optional.Method;
import net.minecraftforge.fml.common.eventhandler.SubscribeEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent;
import net.minecraftforge.fml.common.gameevent.TickEvent.Phase;
import net.minecraftforge.fml.relauncher.Side;

public class MemeEventHandlers {

	private static final Logger logger = MemeInABottle.logger;
	
	@SubscribeEvent
	public void OnBlockInteraction(PlayerInteractEvent.RightClickBlock event) {
		ItemStack itemStack = event.getItemStack();
		BlockPos pos = event.getPos();
		World world = event.getWorld();
		EntityPlayer player = event.getEntityPlayer();
		Block block = world.getBlockState(pos).getBlock();
		
		if(!world.isRemote)
		{
			if(BiomeDictionary.hasType(world.getBiome(pos), BiomeDictionary.Type.BEACH))
			{
				if(block instanceof BlockSand)
				{
					if(itemStack.isEmpty())
					{
						int random = world.rand.nextInt(1000);
	
						if(random < 10)
						{
							world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), MemeLists.getRandomMemeBottle()));
						}
					}
					else if(itemStack.getItem() instanceof ItemSpade)
					{
						ItemTool item = (ItemTool)itemStack.getItem();
						int itemDamage = itemStack.getItemDamage();
						
						int random = world.rand.nextInt(1000);
	
						if(random < 30) {
							world.spawnEntity(new EntityItem(world, pos.getX(), pos.getY(), pos.getZ(), MemeLists.getRandomMemeBottle()));
							itemStack.setItemDamage(itemDamage + 1);
						}
					}
				}
			}
			
			if(itemStack.getItem() == MemeItems.clippy)
			{
				EntityClippy clippy = new EntityClippy(world);
				clippy.setPositionAndUpdate(pos.getX(), pos.getY() + 1, pos.getZ());
				world.spawnEntity(clippy);
				
{'fraction_non_alphanumeric': 0.11439114391143912, 'fraction_numerical': 0.003953610964681075, 'mean_word_length': 4.94283476898982, 'pattern_counts': {'":': 0, '<': 7, '<?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': '2275195', 'n_tokens_mistral': 2807, 'n_tokens_neox': 2524, 'n_words': 366}