summaryrefslogtreecommitdiffstats
path: root/source/Items
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-19 20:30:46 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-10-19 20:30:46 +0200
commit1b4b905f75c984c3bd9bc9dc553dbc86a8c5276e (patch)
treeaa91f8673b7ed1c42e0ed6136fbf1b6332aaf4c4 /source/Items
parentConverted some const char*s and std::strings to AStrings (diff)
downloadcuberite-1b4b905f75c984c3bd9bc9dc553dbc86a8c5276e.tar
cuberite-1b4b905f75c984c3bd9bc9dc553dbc86a8c5276e.tar.gz
cuberite-1b4b905f75c984c3bd9bc9dc553dbc86a8c5276e.tar.bz2
cuberite-1b4b905f75c984c3bd9bc9dc553dbc86a8c5276e.tar.lz
cuberite-1b4b905f75c984c3bd9bc9dc553dbc86a8c5276e.tar.xz
cuberite-1b4b905f75c984c3bd9bc9dc553dbc86a8c5276e.tar.zst
cuberite-1b4b905f75c984c3bd9bc9dc553dbc86a8c5276e.zip
Diffstat (limited to 'source/Items')
-rw-r--r--source/Items/ItemSpawnEgg.h119
1 files changed, 117 insertions, 2 deletions
diff --git a/source/Items/ItemSpawnEgg.h b/source/Items/ItemSpawnEgg.h
index fb040c6ea..974129d6f 100644
--- a/source/Items/ItemSpawnEgg.h
+++ b/source/Items/ItemSpawnEgg.h
@@ -22,6 +22,11 @@
#include "../Mobs/Cavespider.h"
#include "../Mobs/Ghast.h"
#include "../Mobs/Zombiepigman.h"
+#include "../Mobs/Villager.h"
+#include "../Mobs/Ocelot.h"
+#include "../Mobs/Mooshroom.h"
+#include "../Mobs/Magmacube.h"
+#include "../Mobs/Blaze.h"
@@ -53,8 +58,118 @@ public:
cMonster * Monster = NULL;
- Monster = new cZombie();
-
+ switch (a_Item->m_ItemDamage)
+ {
+ case E_META_SPAWN_EGG_BLAZE:
+ {
+ Monster = new cBlaze();
+ break;
+ }
+ case E_META_SPAWN_EGG_CAVE_SPIDER:
+ {
+ Monster = new cCavespider();
+ break;
+ }
+ case E_META_SPAWN_EGG_CHICKEN:
+ {
+ Monster = new cChicken();
+ break;
+ }
+ case E_META_SPAWN_EGG_COW:
+ {
+ Monster = new cCow();
+ break;
+ }
+ case E_META_SPAWN_EGG_CREEPER:
+ {
+ Monster = new cCreeper();
+ break;
+ }
+ case E_META_SPAWN_EGG_ENDERMAN:
+ {
+ Monster = new cEnderman();
+ break;
+ }
+ case E_META_SPAWN_EGG_GHAST:
+ {
+ Monster = new cGhast();
+ break;
+ }
+ case E_META_SPAWN_EGG_MAGMA_CUBE:
+ {
+ Monster = new cMagmacube();
+ break;
+ }
+ case E_META_SPAWN_EGG_MOOSHROOM:
+ {
+ Monster = new cMooshroom();
+ break;
+ }
+ case E_META_SPAWN_EGG_OCELOT:
+ {
+ Monster = new cOcelot();
+ break;
+ }
+ case E_META_SPAWN_EGG_PIG:
+ {
+ Monster = new cPig();
+ break;
+ }
+ case E_META_SPAWN_EGG_SHEEP:
+ {
+ Monster = new cSheep();
+ break;
+ }
+ case E_META_SPAWN_EGG_SILVERFISH:
+ {
+ Monster = new cSilverfish();
+ break;
+ }
+ case E_META_SPAWN_EGG_SKELETON:
+ {
+ Monster = new cSkeleton();
+ break;
+ }
+ case E_META_SPAWN_EGG_SLIME:
+ {
+ Monster = new cSlime();
+ break;
+ }
+ case E_META_SPAWN_EGG_SPIDER:
+ {
+ Monster = new cSpider();
+ break;
+ }
+ case E_META_SPAWN_EGG_SQUID:
+ {
+ Monster = new cSquid();
+ break;
+ }
+ case E_META_SPAWN_EGG_VILLAGER:
+ {
+ Monster = new cVillager();
+ break;
+ }
+ case E_META_SPAWN_EGG_WOLF:
+ {
+ Monster = new cWolf();
+ break;
+ }
+ case E_META_SPAWN_EGG_ZOMBIE:
+ {
+ Monster = new cZombie();
+ break;
+ }
+ case E_META_SPAWN_EGG_ZOMBIE_PIGMAN:
+ {
+ Monster = new cZombiepigman();
+ break;
+ }
+ default:
+ {
+ return false;
+ }
+ }
Monster->Initialize(a_World);
Monster->TeleportTo(a_BlockX + 0.5, a_BlockY, a_BlockZ + 0.5);
a_World->BroadcastSpawn(*Monster);