Make compacting crafting check of the amount of items on the output and return similar items when there arent any from the same mod id, closes #49
This commit is contained in:
parent
5c41c5bb62
commit
11ec70620d
|
@ -58,6 +58,7 @@ public class CompactingUtil {
|
||||||
while (results.size() < 3){
|
while (results.size() < 3){
|
||||||
results.add(0, new Result(ItemStack.EMPTY, 1));
|
results.add(0, new Result(ItemStack.EMPTY, 1));
|
||||||
}
|
}
|
||||||
|
results.stream().filter(result1 -> result1.getResult().getCount() > 0).forEach(result1 -> result1.setNeeded(result1.getNeeded() / result1.getResult().getCount()));
|
||||||
}
|
}
|
||||||
|
|
||||||
public List<Result> getResults() {
|
public List<Result> getResults() {
|
||||||
|
@ -158,7 +159,7 @@ public class CompactingUtil {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return ItemStack.EMPTY;
|
return candidates.size() > 0 ? candidates.get(0) : ItemStack.EMPTY;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user