Skip to content

Commit bd7c078

Browse files
committed
修复配方并行消耗的算力可能大于剩余算力上限的问题
1 parent ba37b66 commit bd7c078

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/main/java/github/kasuminova/novaeng/common/crafttweaker/expansion/RecipePrimerHyperNet.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static RecipePrimer requireComputationPoint(final RecipePrimer primer,
4545
);
4646
}
4747

48-
return primer.addPostCheckHandler(event -> {
48+
return primer.addPreCheckHandler(event -> {
4949
TileMultiblockMachineController ctrl = event.getController();
5050
NetNodeImpl node = NetNodeCache.getCache(ctrl, NetNodeImpl.class);
5151
if (node != null) {

src/main/java/github/kasuminova/novaeng/common/hypernet/old/NetNodeImpl.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ public void checkComputationPoint(final RecipeCheckEvent event,
5959
return;
6060
}
6161

62-
int currentParallelism = event.getActiveRecipe().getParallelism();
62+
int currentParallelism = event.getActiveRecipe().getMaxParallelism();
6363
if (currentParallelism > 1) {
6464
int max = (int) Math.min(currentParallelism, generation / pointRequired);
65-
event.setParallelism(max);
65+
event.getActiveRecipe().setMaxParallelism(max);
6666
}
6767
}
6868

0 commit comments

Comments
 (0)