1
0
cuberite-2a/src/Items/ItemMilk.h

36 lines
511 B
C
Raw Normal View History

#pragma once
class cItemMilkHandler:
public cItemHandler
{
typedef cItemHandler super;
public:
cItemMilkHandler():
super(E_ITEM_MILK)
{
}
2016-02-05 16:45:45 -05:00
virtual bool IsDrinkable(short a_ItemDamage) override
{
UNUSED(a_ItemDamage);
return true;
}
2016-02-05 16:45:45 -05:00
virtual bool EatItem(cPlayer * a_Player, cItem * a_Item) override
{
UNUSED(a_Item);
a_Player->ClearEntityEffects();
if (!a_Player->IsGameModeCreative())
{
a_Player->ReplaceOneEquippedItemTossRest(cItem(E_ITEM_BUCKET));
}
return true;
}
};