diff options
author | Alexander Harkness <me@bearbin.net> | 2020-04-02 14:42:15 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-02 14:42:15 +0200 |
commit | cdc452916e3ec7e61f4a1ad822666192593b4b08 (patch) | |
tree | fcf35adfb6f907b7c2cd4388facc551cfe6c684a /src/Items/ItemBottle.h | |
parent | Tweak attack ranges (diff) | |
download | cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.gz cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.bz2 cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.lz cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.xz cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.tar.zst cuberite-cdc452916e3ec7e61f4a1ad822666192593b4b08.zip |
Diffstat (limited to 'src/Items/ItemBottle.h')
-rw-r--r-- | src/Items/ItemBottle.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Items/ItemBottle.h b/src/Items/ItemBottle.h index b261937e5..18767dcde 100644 --- a/src/Items/ItemBottle.h +++ b/src/Items/ItemBottle.h @@ -83,8 +83,11 @@ public: return false; // Nothing in range. } - a_Player->GetInventory().RemoveOneEquippedItem(); - a_Player->GetInventory().AddItem(cItem(E_ITEM_POTION)); + // Give back a filled water bottle if gamemode is not creative: + if (!a_Player->IsGameModeCreative()) + { + a_Player->ReplaceOneEquippedItemTossRest(cItem(E_ITEM_POTION)); + } return true; } } ; |