<commit_before>package com.witchworks.common.brew;

import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import javax.annotation.Nullable;

/**
 * This class was created by Arekkuusu on 24/04/2017.
 * It's distributed as part of Witchworks under
 * the MIT license.
 */
public class OzymandiasBrew extends BlockHitBrew {

	@Override
	public void apply(World world, BlockPos pos, EntityLivingBase entity, int amplifier, int tick) {
		//NO-OP
	}

	@Override
	public boolean isBad() {
		return true;
	}

	@Override
	public boolean isInstant() {
		return false;
	}

	@Override
	public int getColor() {
		return 0x16161D;
	}

	@Override
	public String getName() {
		return "ozymandias";
	}

	@SuppressWarnings("deprecation")
	@Override
	public void safeImpact(BlockPos pos, @Nullable EnumFacing side, World world, int amplifier) {
		int box = 1 + (int) ((float) amplifier / 2F);

		BlockPos posI = pos.add(box, box, box);
		BlockPos posF = pos.add(-box, -box, -box);

		Iterable<BlockPos> spots = BlockPos.getAllInBox(posI, posF);
		for (BlockPos spot : spots) {
			IBlockState state = world.getBlockState(spot);
			boolean place = amplifier > 2 || world.rand.nextBoolean();
			if (place && state.getBlock() == Blocks.COBBLESTONE_WALL && world.isAirBlock(spot.up())) {
				world.setBlockState(spot, Blocks.COBBLESTONE_WALL.getStateFromMeta(1), 3);
			} else if (state.getBlock() == Blocks.COBBLESTONE) {
				world.setBlockState(spot, Blocks.MOSSY_COBBLESTONE.getDefaultState(), 3);
			} else if (state.getBlock() == Blocks.TALLGRASS) {
				world.setBlockState(spot, Blocks.DEADBUSH.getDefaultState(), 3);
			} else if (state.getBlock() == Blocks.STONEBRICK) {
				world.setBlockState(spot, Blocks.STONEBRICK.getStateFromMeta(1), 3);
			} else if (state.getBlock() == Blocks.GRASS) {
				world.setBlockState(spot, Blocks.SAND.getDefaultState(), 3);
			} else if (state.getBlock() == Blocks.MYCELIUM) {
				world.setBlockState(spot, Blocks.SAND.getDefaultState(), 3);
			}
		}<commit_msg>And last commit for today<commit_after>package com.witchworks.common.brew;

import net.minecraft.block.state.IBlockState;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.EntityLivingBase;
import net.minecraft.init.Blocks;
import net.minecraft.util.EnumFacing;
import net.minecraft.util.math.BlockPos;
import net.minecraft.world.World;
import net.minecraftforge.fml.relauncher.Side;
import net.minecraftforge.fml.relauncher.SideOnly;

import javax.annotation.Nullable;

/**
 * This class was created by Arekkuusu on 24/04/2017.
 * It's distributed as part of Witchworks under
 * the MIT license.
 */
public class OzymandiasBrew extends BlockHitBrew {

	@Override
	public void apply(World world, BlockPos pos, EntityLivingBase entity, int amplifier, int tick) {
		//NO-OP
	}

	@Override
	public boolean isBad() {
		return true;
	}

	@Override
	public boolean isInstant() {
		return false;
	}

	@Override
	public int getColor() {
		return 0x16161D;
	}

	@Override
	public String getName() {
		return "ozymandias";
	}

	@SuppressWarnings("deprecation")
	@Override
	public void safeImpact(BlockPos pos, @Nullable EnumFacing side, World world, int amplifier) {
		int box = 1 + (int) ((float) amplifier / 2F);

		BlockPos posI = pos.add(box, box, box);
		BlockPos posF = pos.add(-box, -box, -box);

		Iterable<BlockPos> spots = BlockPos.getAllInBox(posI, posF);
		for (BlockPos spot : spots) {
			IBlockState state = world.getBlockState(spot);
			boolean place = amplifier > 2 || world.rand.nextBoolean();
			if (place && state.getBlock() == Blocks.COBBLESTONE_WALL && world.isAirBlock(spot.up())) {
				world.setBlockState(spot, Blocks.COBBLESTONE_WALL.getStateFromMeta(1), 3);
			} else if (state.getBlock() == Blocks.COBBLESTONE) {
				world.setBlockState(spot, Blocks.MOSSY_COBBLESTONE.getDefaultState(), 3);
			} else if (state.getBlock() == Blocks.TALLGRASS) {
				world.setBlockState(spot, Blocks.DEADBUSH.getDefaultState(), 3);
			} else if (state.getBlock() == Blocks.STONEBRICK) {
				world.setBlockState(spot, Blocks.STONEBRICK.getStateFromMeta(1), 3);
			} else if (state.getBlock() == Blocks.GRASS) {
				world.setBlockState(spot, Blocks.SAND.getDefaultState(), 3);
			} else if (state.getBlock() == Blocks.MYCELIUM) {
				world.setBlockState(spot, Blocks.SAND.getDefaultState(), 3);
			} else if (state.getBlock() == Blocks.DIRT) {
				world.setBlockState(spot, Blocks.SAND.getDefaultState(), 3);
			}
		}
{'fraction_non_alphanumeric': 0.13048986486486486, 'fraction_numerical': 0.01076858108108108, 'mean_word_length': 4.540350877192982, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '3631387', 'n_tokens_mistral': 1791, 'n_tokens_neox': 1644, 'n_words': 355}