Skip to content

Commit

Permalink
Merge pull request #5429 from ZZZank/simple_decription_fix
Browse files Browse the repository at this point in the history
use `try-catch` to handle `with` in JEI Description
  • Loading branch information
NielsPilgaard committed Nov 30, 2023
2 parents 996dfae + 83c9efc commit 041446f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kubejs/client_scripts/item_modifiers/jei_descriptions.js
Original file line number Diff line number Diff line change
Expand Up @@ -491,7 +491,7 @@ onEvent('jei.information', (event) => {

recipes.forEach((recipe) => {
for (let i = 0; i < recipe.text.length; i++) {
if (recipe.with[i]) {
if (recipe.with && recipe.with.length > i) {
recipe.text[i] = Text.translate(recipe.text[i], recipe.with[i]);
} else {
recipe.text[i] = Text.translate(recipe.text[i]);
Expand Down

0 comments on commit 041446f

Please sign in to comment.