package net.glowstone.block.itemtype;

import net.glowstone.block.GlowBlock;
import net.glowstone.entity.GlowPlayer;
import net.glowstone.entity.passive.GlowPig;
import org.bukkit.block.BlockFace;
import org.bukkit.inventory.ItemStack;
import org.bukkit.util.Vector;

public class ItemSpawn extends ItemType {
    @Override
    public void rightClickBlock(GlowPlayer player, GlowBlock against, BlockFace face, ItemStack holding, Vector clickedLoc) {
        GlowBlock target = against.getRelative(face);

        GlowPig pig = new GlowPig(target.getLocation());

        pig.createSpawnMessage();
    }
}

@@ -102,22 +102,101 @@
 ity.Glow
-Player
+Entity;%0Aimport net.glowstone.entity.GlowPlayer;%0Aimport net.glowstone.entity.monster.*
 ;%0Aimport
@@ -225,23 +225,17 @@
 passive.
-GlowPig
+*
 ;%0Aimport
@@ -574,78 +574,2197 @@
 e);%0A
-%0A        GlowPig pig = new GlowPig(target.getLocation());%0A%0A        pig
+        GlowEntity entity = null;%0A%0A        switch (holding.getDurability()) %7B%0A            case 50:%0A                entity = new GlowCreeper(target.getLocation());%0A                break;%0A            case 51:%0A                entity = new GlowSkeleton(target.getLocation());%0A                break;%0A            case 52:%0A                entity = new GlowSpider(target.getLocation());%0A                break;%0A            //TODO: 53 Giant%0A            case 54:%0A                entity = new GlowZombie(target.getLocation());%0A                break;%0A            //TODO: 55 Slime%0A            case 56:%0A                entity = new GlowGhast(target.getLocation());%0A                break;%0A            //TODO: 57 Pig Zombie%0A            case 58:%0A                entity = new GlowEnderman(target.getLocation());%0A                break;%0A            //TODO: 59 Cave Spider%0A            case 60:%0A                entity = new GlowSilverfish(target.getLocation());%0A                break;%0A            case 61:%0A                entity = new GlowBlaze(target.getLocation());%0A                break;%0A            //TODO: 62 Magma Cube%0A            case 66:%0A                entity = new GlowWitch(target.getLocation());%0A                break;%0A            //TODO: 67 Endermite%0A            //TODO: 68 Guardian%0A%0A%0A            case 65:%0A                entity = new GlowBat(target.getLocation());%0A                break;%0A            case 90:%0A                entity = new GlowPig(target.getLocation());%0A                break;%0A            case 91:%0A                entity = new GlowSheep(target.getLocation());%0A                break;%0A            //TODO: 92 Cow%0A            case 93:%0A                entity = new GlowChicken(target.getLocation());%0A                break;%0A            //TODO: 94 Squid%0A            //TODO: 95 Wolf%0A            //TODO: 96 Mooshroom%0A            //TODO 98 Ocelot%0A            case 100:%0A                entity = new GlowHorse(target.getLocation());%0A                break;%0A            case 101:%0A                entity = new GlowRabbit(target.getLocation());%0A                break;%0A            //TODO: 120 Villager%0A        %7D%0A%0A        if (entity == null) entity = new GlowPig(target.getLocation());%0A%0A        entity
 .cre
@@ -2782,16 +2782,17 @@
 sage();%0A
+%0A
     %7D%0A%7D%0A

Implement spawn egg entity types