Fix recipe constants being overridden by a blank map. Closes #5380
This commit is contained in:
parent
60524f0f3e
commit
2bee5f7ac6
1 changed files with 3 additions and 3 deletions
|
@ -325,12 +325,12 @@ public class CraftingHelper
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!items.isEmpty())
|
if (!items.isEmpty())
|
||||||
constants.put(new ResourceLocation(JsonUtils.getString(json, "name")), new StackList(items));
|
ret.put(new ResourceLocation(JsonUtils.getString(json, "name")), new StackList(items));
|
||||||
}
|
}
|
||||||
else if (json.has("tag"))
|
else if (json.has("tag"))
|
||||||
constants.put(new ResourceLocation(JsonUtils.getString(json, "name")), Ingredient.deserializeItemList(json));
|
ret.put(new ResourceLocation(JsonUtils.getString(json, "name")), Ingredient.deserializeItemList(json));
|
||||||
else if (json.has("item"))
|
else if (json.has("item"))
|
||||||
constants.put(new ResourceLocation(JsonUtils.getString(json, "name")), new StackList(Lists.newArrayList(getItemStack(JsonUtils.getJsonObject(json, "item"), true))));
|
ret.put(new ResourceLocation(JsonUtils.getString(json, "name")), new StackList(Lists.newArrayList(getItemStack(JsonUtils.getJsonObject(json, "item"), true))));
|
||||||
else
|
else
|
||||||
LOGGER.error(CRAFTHELPER, "Couldn't load constant #{} from {} as it's missing `item` or `items` element", x, key);
|
LOGGER.error(CRAFTHELPER, "Couldn't load constant #{} from {} as it's missing `item` or `items` element", x, key);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue