Skip to content

Commit

Permalink
fix: 🐛 Fix storage tier upgrade recipes JEI integration to not crash …
Browse files Browse the repository at this point in the history
…when additional alternatives to upgrade materials exist and by extension stop this from breaking the whole Storage JEI integration
  • Loading branch information
P3pp3rF1y committed Jul 27, 2023
1 parent 1d539bd commit 3d36881
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
1 change: 0 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,6 @@ dependencies {
compileOnly fg.deobf("curse.maven:rubidium-574856:${rubidium_cf_file_id}")
compileOnly fg.deobf("curse.maven:jade-324717:${jade_cf_file_id}")

//runtimeOnly fg.deobf("curse.maven:rubidium-574856:${rubidium_cf_file_id}")
/*
compileOnly fg.deobf("curse.maven:quark-243121:${quark_cf_file_id}")
compileOnly fg.deobf("curse.maven:autoreglib-250363:${autoreglib_cf_file_id}")
Expand Down
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
minecraft_version=1.20.1
forge_version=47.0.16
mod_version=0.8.43
mod_version=0.8.44
jei_mc_version=1.20.1-forge
jei_version=15.1.0.19
rubidium_cf_file_id=4573226
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,12 @@ public boolean stillValid(Player playerIn) {
int i = 0;
for (Ingredient ingredient : ingredients) {
ItemStack[] ingredientItems = ingredient.getItems();
if (ingredientItems.length == 1) {
if (storageItem.getItem() == ingredientItems[0].getItem()) {
ingredientsCopy.add(i, Ingredient.of(storageItem));
craftinginventory.setItem(i, storageItem.copy());
} else {
ingredientsCopy.add(i, ingredient);
craftinginventory.setItem(i, ingredientItems[0]);
}
if (ingredientItems.length == 1 && storageItem.getItem() == ingredientItems[0].getItem()) {
ingredientsCopy.add(i, Ingredient.of(storageItem));
craftinginventory.setItem(i, storageItem.copy());
} else {
ingredientsCopy.add(i, ingredient);
craftinginventory.setItem(i, ingredientItems[0]);
}
i++;
}
Expand Down

0 comments on commit 3d36881

Please sign in to comment.