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; }