1
0

Potion changes (#4601)

* Correct protocol translation for potions

* Update brewing recipes
This commit is contained in:
Mat
2020-04-04 17:16:36 +03:00
committed by GitHub
parent 60bcc06f43
commit 3eaab73540
2 changed files with 21 additions and 101 deletions

View File

@@ -3265,19 +3265,13 @@ void cProtocol_1_9_0::ParseItemMetadata(cItem & a_Item, const AString & a_Metada
continue;
}
if (PotionEffect.find("water") != AString::npos)
{
a_Item.m_ItemDamage = 0;
// Water bottles shouldn't have other bits set on them; exit early.
continue;
}
if (PotionEffect.find("empty") != AString::npos)
{
a_Item.m_ItemDamage = 0;
}
else if (PotionEffect.find("mundane") != AString::npos)
{
a_Item.m_ItemDamage = 0;
a_Item.m_ItemDamage = 64;
}
else if (PotionEffect.find("thick") != AString::npos)
{
@@ -3339,6 +3333,12 @@ void cProtocol_1_9_0::ParseItemMetadata(cItem & a_Item, const AString & a_Metada
{
a_Item.m_ItemDamage = 14;
}
else if (PotionEffect.find("water") != AString::npos)
{
a_Item.m_ItemDamage = 0;
// Water bottles shouldn't have other bits set on them; exit early.
continue;
}
else
{
// Note: luck potions are not handled and will reach this location