summaryrefslogtreecommitdiffstats
path: root/src/Items/ItemPotion.h
diff options
context:
space:
mode:
authorarchshift <admin@archshift.com>2014-06-09 02:06:15 +0200
committerarchshift <admin@archshift.com>2014-06-17 20:39:20 +0200
commit3766ac96d77329c679d01d1ab1a846384acab42f (patch)
tree0c60ce53163377434dd7de63f1f456ba2475743b /src/Items/ItemPotion.h
parentSplash potion: Adjusted speed, fixed spawn position (diff)
downloadcuberite-3766ac96d77329c679d01d1ab1a846384acab42f.tar
cuberite-3766ac96d77329c679d01d1ab1a846384acab42f.tar.gz
cuberite-3766ac96d77329c679d01d1ab1a846384acab42f.tar.bz2
cuberite-3766ac96d77329c679d01d1ab1a846384acab42f.tar.lz
cuberite-3766ac96d77329c679d01d1ab1a846384acab42f.tar.xz
cuberite-3766ac96d77329c679d01d1ab1a846384acab42f.tar.zst
cuberite-3766ac96d77329c679d01d1ab1a846384acab42f.zip
Diffstat (limited to 'src/Items/ItemPotion.h')
-rw-r--r--src/Items/ItemPotion.h13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/Items/ItemPotion.h b/src/Items/ItemPotion.h
index 029bb52cd..c2441fa48 100644
--- a/src/Items/ItemPotion.h
+++ b/src/Items/ItemPotion.h
@@ -104,22 +104,17 @@ class cItemPotionHandler:
return base * tier_multi * ext_multi * splash_multi;
}
- bool IsDrinkable(short a_ItemDamage)
- {
- // Drinkable potion if 13th bit is set
- // For reference: http://minecraft.gamepedia.com/Potions#Data_value_table
- return a_ItemDamage & 8192;
- }
-
public:
cItemPotionHandler():
super(E_ITEM_POTIONS)
{
}
- virtual bool IsDrinkable(const cItem * a_Item) override
+ virtual bool IsDrinkable(short a_ItemDamage) override
{
- return IsDrinkable(a_Item->m_ItemDamage);
+ // Drinkable potion if 13th bit is set
+ // For reference: http://minecraft.gamepedia.com/Potions#Data_value_table
+ return a_ItemDamage & 8192;
}
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