diff options
author | x12xx12x <44411062+12xx12@users.noreply.github.com> | 2021-12-02 00:31:10 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-12-02 00:31:10 +0100 |
commit | 3ff57559e36d3254c64e334fbe3bdd47398fe16f (patch) | |
tree | 30a73d405640285863bfa9932afbee482f36b50c /src/Items/ItemFishingRod.h | |
parent | Added ExperienceAmount variable to HOOK_PLAYER_FISHING and HOOK_PLAYER_FISHED (#5345) (diff) | |
download | cuberite-3ff57559e36d3254c64e334fbe3bdd47398fe16f.tar cuberite-3ff57559e36d3254c64e334fbe3bdd47398fe16f.tar.gz cuberite-3ff57559e36d3254c64e334fbe3bdd47398fe16f.tar.bz2 cuberite-3ff57559e36d3254c64e334fbe3bdd47398fe16f.tar.lz cuberite-3ff57559e36d3254c64e334fbe3bdd47398fe16f.tar.xz cuberite-3ff57559e36d3254c64e334fbe3bdd47398fe16f.tar.zst cuberite-3ff57559e36d3254c64e334fbe3bdd47398fe16f.zip |
Diffstat (limited to '')
-rw-r--r-- | src/Items/ItemFishingRod.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/Items/ItemFishingRod.h b/src/Items/ItemFishingRod.h index 909f892c3..840ff7d5c 100644 --- a/src/Items/ItemFishingRod.h +++ b/src/Items/ItemFishingRod.h @@ -49,17 +49,14 @@ protected: -class cItemFishingRodHandler: +class cItemFishingRodHandler final: public cItemHandler { using Super = cItemHandler; public: - cItemFishingRodHandler(int a_ItemType): - Super(a_ItemType) - { - } + using Super::Super; @@ -72,7 +69,7 @@ public: const cItem & a_HeldItem, const Vector3i a_ClickedBlockPos, eBlockFace a_ClickedBlockFace - ) override + ) const override { if (a_ClickedBlockFace != BLOCK_FACE_NONE) { @@ -108,7 +105,7 @@ public: /** Reels back the fishing line, reeling any attached mob, or creating fished loot, or just breaking the fishing rod. */ - void ReelIn(cWorld & a_World, cPlayer & a_Player) + void ReelIn(cWorld & a_World, cPlayer & a_Player) const { cFloaterCallback FloaterInfo; a_World.DoWithEntityByID(a_Player.GetFloaterID(), FloaterInfo); @@ -140,7 +137,7 @@ public: /** Reels back the entity, specified by the ID, and damages the fishing rod accordingly. */ - void ReelInEntity(cWorld & a_World, cPlayer & a_Player, UInt32 a_EntityID) + void ReelInEntity(cWorld & a_World, cPlayer & a_Player, UInt32 a_EntityID) const { auto PlayerPos = a_Player.GetPosition(); a_World.DoWithEntityByID(a_EntityID, [=](cEntity & a_Entity) @@ -157,7 +154,7 @@ public: - void ReelInLoot(cWorld & a_World, cPlayer & a_Player, const Vector3d a_FloaterBitePos) + void ReelInLoot(cWorld & a_World, cPlayer & a_Player, const Vector3d a_FloaterBitePos) const { auto LotSLevel = std::min(a_Player.GetEquippedItem().m_Enchantments.GetLevel(cEnchantments::enchLuckOfTheSea), 3u); |