summaryrefslogtreecommitdiffstats
path: root/source/Items
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--source/Items/ItemSpawnEgg.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/Items/ItemSpawnEgg.h b/source/Items/ItemSpawnEgg.h
index f3018075b..33a1e1d55 100644
--- a/source/Items/ItemSpawnEgg.h
+++ b/source/Items/ItemSpawnEgg.h
@@ -35,8 +35,11 @@ public:
if (a_World->SpawnMob(a_BlockX + 0.5, a_BlockY, a_BlockZ + 0.5, a_Item->m_ItemDamage) >= 0)
{
- // The mob was spawned, "use" the item:
- a_Player->UseEquippedItem();
+ if(a_Player->GetGameMode() != 1)
+ {
+ // The mob was spawned, "use" the item:
+ a_Player->GetInventory().RemoveItem(a_Player->GetInventory().GetEquippedItem());
+ }
return true;
}