summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemBow.h
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2020-04-21 22:19:22 +0200
committerGitHub <noreply@github.com>2020-04-21 22:19:22 +0200
commit487f9a2aa9b5497495cef1ac3b9c7a603e69f862 (patch)
tree054a846942f414060e29c72f4a717c8a89e70893 /src/Items/ItemBow.h
parentDelet SpawnObject params (diff)
downloadcuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.gz
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.bz2
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.lz
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.xz
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.tar.zst
cuberite-487f9a2aa9b5497495cef1ac3b9c7a603e69f862.zip
Diffstat (limited to 'src/Items/ItemBow.h')
-rw-r--r--src/Items/ItemBow.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/src/Items/ItemBow.h b/src/Items/ItemBow.h
index 81f012c7c..b7a9ef638 100644
--- a/src/Items/ItemBow.h
+++ b/src/Items/ItemBow.h
@@ -22,9 +22,15 @@ public:
+
+
virtual bool OnItemUse(
- cWorld * a_World, cPlayer * a_Player, cBlockPluginInterface & a_PluginInterface, const cItem & a_Item,
- int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace
+ cWorld * a_World,
+ cPlayer * a_Player,
+ cBlockPluginInterface & a_PluginInterface,
+ const cItem & a_HeldItem,
+ const Vector3i a_ClickedBlockPos,
+ eBlockFace a_ClickedBlockFace
) override
{
ASSERT(a_Player != nullptr);
@@ -41,9 +47,10 @@ public:
- virtual void OnItemShoot(cPlayer * a_Player, int a_BlockX, int a_BlockY, int a_BlockZ, eBlockFace a_BlockFace) override
+ virtual void OnItemShoot(cPlayer * a_Player, const Vector3i a_BlockPos, eBlockFace a_BlockFace) override
{
- // Actual shot - produce the arrow with speed based on the ticks that the bow was charged
+ // Actual shot - produce the arrow with speed based on the number of ticks that the bow was charged
+ UNUSED(a_BlockPos);
ASSERT(a_Player != nullptr);
int BowCharge = a_Player->FinishChargingBow();
@@ -88,7 +95,6 @@ public:
a_Player->UseEquippedItem();
}
-
if (a_Player->GetEquippedItem().m_Enchantments.GetLevel(cEnchantments::enchFlame) > 0)
{
ArrowPtr->StartBurning(100);