Remove calculation threads causing concurrency issues (#3002)
This commit is contained in:
@@ -99,7 +99,6 @@ public class FluidGridHandler implements IFluidGridHandler {
|
|||||||
FluidStack stack = network.getFluidStorageCache().getCraftablesList().get(id);
|
FluidStack stack = network.getFluidStorageCache().getCraftablesList().get(id);
|
||||||
|
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
Thread calculationThread = new Thread(() -> {
|
|
||||||
ICalculationResult result = network.getCraftingManager().create(stack, quantity);
|
ICalculationResult result = network.getCraftingManager().create(stack, quantity);
|
||||||
if (result == null) {
|
if (result == null) {
|
||||||
return;
|
return;
|
||||||
@@ -130,9 +129,6 @@ public class FluidGridHandler implements IFluidGridHandler {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, "RS crafting preview calculation");
|
|
||||||
|
|
||||||
calculationThread.start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -190,7 +190,6 @@ public class ItemGridHandler implements IItemGridHandler {
|
|||||||
ItemStack stack = network.getItemStorageCache().getCraftablesList().get(id);
|
ItemStack stack = network.getItemStorageCache().getCraftablesList().get(id);
|
||||||
|
|
||||||
if (stack != null) {
|
if (stack != null) {
|
||||||
Thread calculationThread = new Thread(() -> {
|
|
||||||
ICalculationResult result = network.getCraftingManager().create(stack, quantity);
|
ICalculationResult result = network.getCraftingManager().create(stack, quantity);
|
||||||
|
|
||||||
if (!result.isOk() && result.getType() != CalculationResultType.MISSING) {
|
if (!result.isOk() && result.getType() != CalculationResultType.MISSING) {
|
||||||
@@ -218,9 +217,6 @@ public class ItemGridHandler implements IItemGridHandler {
|
|||||||
)
|
)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}, "RS crafting preview calculation");
|
|
||||||
|
|
||||||
calculationThread.start();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user