Skip to content

Commit

Permalink
Fix #5847: failed autocrafting simulation with level emitter says mis…
Browse files Browse the repository at this point in the history
…sing items
  • Loading branch information
Technici4n committed Dec 22, 2021
1 parent 51b44a4 commit 658ea34
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,12 @@ public static CraftingPlanSummary fromJob(IGrid grid, IActionSource actionSource
var entries = ImmutableList.<CraftingPlanSummaryEntry>builder();

var storage = grid.getStorageService().getInventory();
var crafting = grid.getCraftingService();

for (var out : plan) {
long missingAmount;
long storedAmount;
if (job.simulation()) {
if (job.simulation() && !crafting.canEmitFor(out.getKey())) {
storedAmount = storage.extract(out.getKey(), out.getValue().stored, Actionable.SIMULATE, actionSource);
missingAmount = out.getValue().stored - storedAmount;
} else {
Expand Down

0 comments on commit 658ea34

Please sign in to comment.