diff options
author | archshift <admin@archshift.com> | 2014-04-27 19:24:39 +0200 |
---|---|---|
committer | archshift <admin@archshift.com> | 2014-04-27 19:24:39 +0200 |
commit | cd38e792b7aac453549d1e9fea21ad94b8ea655a (patch) | |
tree | 9a8ebfcbddfae9fc68e40fad566695f0291751a3 /src/Items/ItemThrowable.h | |
parent | Creative players cannot throw ender pearls. (diff) | |
download | cuberite-cd38e792b7aac453549d1e9fea21ad94b8ea655a.tar cuberite-cd38e792b7aac453549d1e9fea21ad94b8ea655a.tar.gz cuberite-cd38e792b7aac453549d1e9fea21ad94b8ea655a.tar.bz2 cuberite-cd38e792b7aac453549d1e9fea21ad94b8ea655a.tar.lz cuberite-cd38e792b7aac453549d1e9fea21ad94b8ea655a.tar.xz cuberite-cd38e792b7aac453549d1e9fea21ad94b8ea655a.tar.zst cuberite-cd38e792b7aac453549d1e9fea21ad94b8ea655a.zip |
Diffstat (limited to 'src/Items/ItemThrowable.h')
-rw-r--r-- | src/Items/ItemThrowable.h | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/src/Items/ItemThrowable.h b/src/Items/ItemThrowable.h index f1ebb4508..c6a4e714e 100644 --- a/src/Items/ItemThrowable.h +++ b/src/Items/ItemThrowable.h @@ -89,22 +89,6 @@ public: super(E_ITEM_ENDER_PEARL, cProjectileEntity::pkEnderPearl, 30) { } - - virtual bool OnItemUse(cWorld * a_World, cPlayer * a_Player, const cItem & a_Item, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_Dir) override - { - // Creative players cannot throw ender pearls. - if (a_Player->IsGameModeCreative()) - { - return false; - } - - a_Player->GetInventory().RemoveOneEquippedItem(); - Vector3d Pos = a_Player->GetThrowStartPos(); - Vector3d Speed = a_Player->GetLookVector() * m_SpeedCoeff; - a_World->CreateProjectile(Pos.x, Pos.y, Pos.z, m_ProjectileKind, a_Player, a_Player->GetEquippedItem(), &Speed); - - return true; - } } ; |