Skip to content

Commit

Permalink
fixed invalid crushed ore disassembling
Browse files Browse the repository at this point in the history
  • Loading branch information
Taskeren committed Feb 7, 2025
1 parent 31ebf5d commit 690e7b3
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ public static boolean canDisassemble(ItemStack[] itemsToDisassemble) {

if(item.getItem() instanceof MetaGeneratedTool) return false;
if(isCircuit(item)) return false;
if(isCrushedOre(item)) return false;
if(INPUT_BLACKLIST.stream().anyMatch(b -> GTUtility.areStacksEqual(b.toStack(), item, true))) return false;
if(isUnpackerRecipe(item)) return false;

Expand Down Expand Up @@ -182,6 +183,16 @@ private static boolean isUnpackerRecipe(ItemStack stack) {
return unpackerRecipe != null;
}

private static boolean isCrushedOre(ItemStack stack) {
var data = GTOreDictUnificator.getAssociation(stack);
if(data != null) {
return data.mPrefix == OrePrefixes.crushed ||
data.mPrefix == OrePrefixes.crushedCentrifuged ||
data.mPrefix == OrePrefixes.crushedPurified;
}
return false;
}

/**
* Register a reversed recipe.
* <p>
Expand Down

0 comments on commit 690e7b3

Please sign in to comment.