Add Item type extension

This commit is contained in:
ReinforceZwei 2020-04-08 18:42:37 +08:00 committed by ORelio
parent 31d45b0950
commit b1121e91e3
3 changed files with 54 additions and 1 deletions

View file

@ -50,7 +50,7 @@ namespace MinecraftClient.ChatBots
Container inventory = GetPlayerInventory();
bool found = false;
LastSlot = CurrentSlot;
if (inventory.Items.ContainsKey(CurrentSlot + 36) && inventory.Items[CurrentSlot + 36].IsFood())
if (inventory.Items.ContainsKey(CurrentSlot + 36) && ItemTypeExtensions.IsFood(inventory.Items[CurrentSlot + 36].Type))
{
// no need to change slot
found = true;