From 31787f83839afd059050696814fc34b5a788757d Mon Sep 17 00:00:00 2001 From: ORelio Date: Fri, 24 Jul 2020 12:36:21 +0200 Subject: [PATCH] Fix compile errors (see #1145) --- MinecraftClient/ChatBots/AutoCraft.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MinecraftClient/ChatBots/AutoCraft.cs b/MinecraftClient/ChatBots/AutoCraft.cs index 91db3316..f678cf11 100644 --- a/MinecraftClient/ChatBots/AutoCraft.cs +++ b/MinecraftClient/ChatBots/AutoCraft.cs @@ -392,7 +392,8 @@ namespace MinecraftClient.ChatBots { if (recipes.ContainsKey(lastRecipe)) { - if (Enum.TryParse(value, out ItemType itemType)) + ItemType itemType; + if (Enum.TryParse(value, out itemType)) { if (recipes[lastRecipe].Materials != null && recipes[lastRecipe].Materials.Count > 0) { @@ -435,7 +436,8 @@ namespace MinecraftClient.ChatBots case "result": if (recipes.ContainsKey(lastRecipe)) { - if (Enum.TryParse(value, out ItemType itemType)) + ItemType itemType; + if (Enum.TryParse(value, out itemType)) { recipes[lastRecipe].ResultItem = itemType; }