Golden Apple Fixes (#4130)
* Do not remove food item until player has been fed
* Golden apples now ignore hunger when eating
* Removed EnchantedGoldenApple recipe, as it was removed in 1.9
Reference: https://minecraft.gamepedia.com/1.9#Items_2
* Adjust golden apple effects, as they were changed in 1.9
Reference: https://minecraft.gamepedia.com/1.9#Items_2
This commit is contained in:
committed by
peterbell10
parent
d7de2dccf0
commit
2529a89835
@@ -822,17 +822,8 @@ bool cItemHandler::GetPlacementBlockTypeMeta(
|
||||
|
||||
bool cItemHandler::EatItem(cPlayer * a_Player, cItem * a_Item)
|
||||
{
|
||||
if (!a_Player->IsGameModeCreative())
|
||||
{
|
||||
a_Player->GetInventory().RemoveOneEquippedItem();
|
||||
}
|
||||
|
||||
FoodInfo Info = GetFoodInfo(a_Item);
|
||||
if ((Info.FoodLevel > 0) || (Info.Saturation > 0.f))
|
||||
{
|
||||
return a_Player->Feed(Info.FoodLevel, Info.Saturation);
|
||||
}
|
||||
return false;
|
||||
auto FoodInfo = GetFoodInfo(a_Item);
|
||||
return a_Player->Feed(FoodInfo.FoodLevel, FoodInfo.Saturation);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user