Source:
<code>public boolean applyEffectBlock(ItemStack stack, World world, BlockPos pos, EnumFacing facing, double impactX, double impactY, double impactZ, EntityLivingBase caster) { if (!(caster instanceof EntityPlayer)) return false; EntityPlayer player = (EntityPlayer)caster; ItemStack spellStack = player.getCurrentEquippedItem(); if (spellStack == null || spellStack.getItem() != ItemsCommonProxy.spell || !SpellUtils.instance.componentIsPresent(spellStack, PlaceBlock.class, SpellUtils.instance.numStages(spellStack) - 1)) return false; BlockDec bd = getPlaceBlock(spellStack); if (bd != null && !caster.isSneaking()){ if (world.isAirBlock(pos) || !world.getBlockState(pos).getBlock().getMaterial().isSolid()) facing = null; if (facing != null){ switch (facing){ case DOWN: pos = pos.down(); break; case UP: pos = pos.up(); break; case NORTH: pos = pos.north(); break; case SOUTH: pos = pos.south(); break; case WEST: pos = pos.west(); break; case EAST: pos = pos.east(); break; <START> } <END> } if (world.isAirBlock(pos) || !world.getBlockState(pos).getBlock().getMaterial().isSolid()){ ItemStack searchStack = new ItemStack(bd.getBlock(), 1, bd.getMeta()); if (!world.isRemote && (player.capabilities.isCreativeMode || InventoryUtilities.inventoryHasItem(player.inventory, searchStack, 1))){ world.setBlock(blockx, blocky, blockz, bd.getBlock(), bd.getMeta(), 3); if (!player.capabilities.isCreativeMode) InventoryUtilities.deductFromInventory(player.inventory, searchStack, 1); } return true; } }else if (caster.isSneaking()){ if (!world.isRemote && !world.isAirBlock(pos)){ setPlaceBlock(spellStack, world.getBlockState(pos).getBlock(), world.getBlockState(pos).getBlock().getMetaFromState(world.getBlockState(pos))); } return true; } return false; }</code><technical_language>P</technical_language>

Target:
public boolean applyEffectBlock(ItemStack stack, World world, BlockPos pos, EnumFacing facing, double impactX, double impactY, double impactZ, EntityLivingBase caster) { if (!(caster instanceof EntityPlayer)) return false; EntityPlayer player = (EntityPlayer)caster; ItemStack spellStack = player.getCurrentEquippedItem(); if (spellStack == null || spellStack.getItem() != ItemsCommonProxy.spell || !SpellUtils.instance.componentIsPresent(spellStack, PlaceBlock.class, SpellUtils.instance.numStages(spellStack) - 1)) return false; BlockDec bd = getPlaceBlock(spellStack); if (bd != null && !caster.isSneaking()){ if (world.isAirBlock(pos) || !world.getBlockState(pos).getBlock().getMaterial().isSolid()) facing = null; if (facing != null){ pos = pos.offset(facing); } if (world.isAirBlock(pos) || !world.getBlockState(pos).getBlock().getMaterial().isSolid()){ ItemStack searchStack = new ItemStack(bd.getBlock(), 1, bd.getMeta()); if (!world.isRemote && (player.capabilities.isCreativeMode || InventoryUtilities.inventoryHasItem(player.inventory, searchStack, 1))){ world.setBlock(blockx, blocky, blockz, bd.getBlock(), bd.getMeta(), 3); if (!player.capabilities.isCreativeMode) InventoryUtilities.deductFromInventory(player.inventory, searchStack, 1); } return true; } }else if (caster.isSneaking()){ if (!world.isRemote && !world.isAirBlock(pos)){ setPlaceBlock(spellStack, world.getBlockState(pos).getBlock(), world.getBlockState(pos).getBlock().getMetaFromState(world.getBlockState(pos))); } return true; } return false; }