Skip to content

Commit

Permalink
[1.4.2]兼容1.20.2
Browse files Browse the repository at this point in the history
  • Loading branch information
YufiriaMazenta committed Nov 12, 2023
1 parent d75eaf6 commit 617b5ef
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ private static Map<Character, RecipeChoice> getShapedRecipeChoiceMap(Configurati
for (String key : section.getKeys(false)) {
char keyWord = key.toCharArray()[0];
String itemStr = section.getString(key, "");
if (itemStr.length() < 1) {
if (itemStr.isEmpty()) {
throw new IllegalArgumentException("Empty recipe ingredient: " + key);
}
recipeChoiceMap.put(keyWord, getRecipeChoice(itemStr));
Expand All @@ -301,7 +301,7 @@ private static ItemStack getResultItem(YamlConfiguration config) {
resultStr = config.getString("result", "");
}

if (resultStr.length() < 1) {
if (resultStr.isEmpty()) {
throw new IllegalArgumentException("Empty recipe result");
}
return ItemManager.matchCraftorithmItem(resultStr);
Expand Down

0 comments on commit 617b5ef

Please sign in to comment.