if (pos != null) {
Block block = p.worldObj.getBlock(pos.blockX, pos.blockY, pos.blockZ);
int meta = p.worldObj.getBlockMetadata(pos.blockX, pos.blockY, pos.blockZ);
ItemStack blockStack = new ItemStack(block, 1, meta);
ItemStack result = FurnaceRecipes.smelting().getSmeltingResult(blockStack);
if (result != null && result.getItem() instanceof ItemBlock) {
boolean decremented = false;
if (playerData.containsKey(p.getGameProfile().getName())) {
SmeltData data = playerData.get(p.getGameProfile().getName());
if (data.equalPos(pos)) {
data.progress--;
decremented = true;
if (data.progress <= 0) {
if (!p.worldObj.isRemote) {
p.worldObj.setBlock(pos.blockX, pos.blockY, pos.blockZ, Block.getBlockFromItem(result.getItem()), result.getItemDamage(), 1 | 2);
p.worldObj.playSoundAtEntity(p, "fire.ignite", 0.6F, 1F);
p.worldObj.playSoundAtEntity(p, "fire.fire", 1F, 1F);
wand.consumeAllVis(stack, p, visUsage, true, false);
playerData.remove(p.getGameProfile().getName());