}
return (ItemNBTHelper.getBoolean(focus, TAG_AVAILABLE, false)) ? getPickedBlockStack(stack) : null;
}
public ItemStack getPickedBlockStack(ItemStack stack) {
ItemStack focus;
if (stack.getItem() instanceof ItemWandCasting) {
ItemWandCasting wand = (ItemWandCasting) stack.getItem();
focus = wand.getFocusItem(stack);
} else {
focus = stack;
}
String name = ItemNBTHelper.getString(focus, TAG_BLOCK_NAME, "");
Block block = Block.getBlockFromName(name);
if (block == Blocks.air) {
int id = ItemNBTHelper.getInt(focus, TAG_BLOCK_ID, 0);
block = Block.getBlockById(id);
}
int meta = ItemNBTHelper.getInt(focus, TAG_BLOCK_META, 0);
ItemStack stck;
//if(block instanceof BlockReed)
//{
// stck=new ItemStack(Items.reeds,1,meta);
//}
stck = new ItemStack(new ItemBlock(block), 1, meta);
return stck;
}