Skip to content
This repository has been archived by the owner on Mar 8, 2024. It is now read-only.

Commit

Permalink
Add a way to bypass osmirium replacement (#119)
Browse files Browse the repository at this point in the history
Former-commit-id: edcfb4eb29e0ef13515fb095a1e7fff8a3b77d19
  • Loading branch information
miozune authored Apr 16, 2022
1 parent cd9b2aa commit 3a0df70
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,12 @@
@SuppressWarnings("ALL")
public class LuVTierEnhancer implements Runnable {

private static List<ItemStack> blackListForOsmiridium = new ArrayList<>();

static {
addToBlackListForOsmiridiumReplacement(ItemList.Casing_MiningOsmiridium.get(1));
}

public void run() {

List<IRecipe> bufferedRecipeList = null;
Expand Down Expand Up @@ -91,6 +97,10 @@ public void run() {
AfterLuVTierEnhacement.run();
}

public static void addToBlackListForOsmiridiumReplacement(ItemStack stack) {
blackListForOsmiridium.add(stack);
}

private static void replaceAllRecipes(Collection<ItemStack> LuVMachines, OrePrefixes[] LuVMaterialsGenerated, List<IRecipe> bufferedRecipeList){
LuVTierEnhancer.replaceOsmiridiumInLuVRecipes();

Expand Down Expand Up @@ -211,7 +221,7 @@ private static void replaceOsmiridiumInLuVRecipes() {
}

private static boolean isOutputBlackListed(ItemStack output) {
if (output.isItemEqual(ItemList.Casing_MiningOsmiridium.get(1))) return true;
if (blackListForOsmiridium.stream().anyMatch(s -> s.isItemEqual(output))) return true;
return false;
}

Expand Down

0 comments on commit 3a0df70

Please sign in to comment.