In response to op:
Have an item ItemSpawner.class
When ItemSpawner.class is right clicked set a mob spawner and the mob type.
Decrease ItemSpawner stack size.
Because I'm a nice guy, here's some code
ItemSpawner.class
public class ItemSpawner extends Item{
public ItemSpawner(int par1) {
super(par1);
maxStackSize = 64;
setIconIndex(0);
this.setTextureFile(MainProxy.ITEMS_PNG);
}
public boolean onItemUse(ItemStack par1ItemStack, EntityPlayer par2EntityPlayer, World par3World, int par4, int par5, int par6, int par7, float par8, float par9, float par10){
par3World.setBlockWithNotify(par4, par5, par6, Block.mobSpawner.blockID);
TileEntityMobSpawner spawner = (TileEntityMobSpawner)par1World.getBlockTileEntity(par3, par4, par5);
if(spawner != null) {
spawner.setMobID( *** String goes here (mobType) ***);
}
if (!par2EntityPlayer.capabilities.isCreativeMode) {
--par1ItemStack.stackSize;
}
return false;
}
}