summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemMinecart.h
diff options
context:
space:
mode:
authorworktycho <work.tycho@gmail.com>2014-03-30 16:17:35 +0200
committerworktycho <work.tycho@gmail.com>2014-03-30 16:17:35 +0200
commit5260146f3c5d26c5583a8034eb8b342218a836d7 (patch)
treedf19e59ec8716ac98d0926826c3207348809d750 /src/Items/ItemMinecart.h
parentcPrefab now uses a struct for block type definition in CharMap. (diff)
parentAnother curly (diff)
downloadcuberite-5260146f3c5d26c5583a8034eb8b342218a836d7.tar
cuberite-5260146f3c5d26c5583a8034eb8b342218a836d7.tar.gz
cuberite-5260146f3c5d26c5583a8034eb8b342218a836d7.tar.bz2
cuberite-5260146f3c5d26c5583a8034eb8b342218a836d7.tar.lz
cuberite-5260146f3c5d26c5583a8034eb8b342218a836d7.tar.xz
cuberite-5260146f3c5d26c5583a8034eb8b342218a836d7.tar.zst
cuberite-5260146f3c5d26c5583a8034eb8b342218a836d7.zip
Diffstat (limited to 'src/Items/ItemMinecart.h')
-rw-r--r--src/Items/ItemMinecart.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Items/ItemMinecart.h b/src/Items/ItemMinecart.h
index bcaa5635a..25500aeb9 100644
--- a/src/Items/ItemMinecart.h
+++ b/src/Items/ItemMinecart.h
@@ -1,4 +1,3 @@
-
// ItemMinecart.h
// Declares the various minecart ItemHandlers
@@ -72,6 +71,11 @@ public:
}
} // switch (m_ItemType)
Minecart->Initialize(a_World);
+
+ if (!a_Player->IsGameModeCreative())
+ {
+ a_Player->GetInventory().RemoveOneEquippedItem();
+ }
return true;
}