Skip to content

Commit

Permalink
Added ore matcher to GT_NEI_DefaultHandler (#1748)
Browse files Browse the repository at this point in the history
* Added matcher that will search for all ore variants, if an ore block is clicked
  • Loading branch information
minecraft7771 authored Feb 16, 2023
1 parent 421407e commit 365d17b
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/main/java/gregtech/nei/GT_NEI_DefaultHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,11 @@ public void loadCraftingRecipes(ItemStack aResult) {
tResults.add(GT_OreDictUnificator.get(tPrefix, tPrefixMaterial.mMaterial.mMaterial, 1L));
}
}
if (aResult.getUnlocalizedName().startsWith("gt.blockores")) {
for (int i = 0; i < 8; i++) {
tResults.add(new ItemStack(aResult.getItem(), 1, aResult.getItemDamage() % 1000 + i * 1000));
}
}
addFluidStacks(aResult, tResults);
for (CachedDefaultRecipe recipe : getCache()) {
if (tResults.stream().anyMatch(stack -> recipe.contains(recipe.mOutputs, stack))) arecipes.add(recipe);
Expand Down

0 comments on commit 365d17b

Please sign in to comment.