Skip to content

Commit 504521a

Browse files
committed
删除JEI下单中一个多余的按键检测防止一些错误
1 parent 454a624 commit 504521a

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

src/main/java/com/circulation/random_complement/mixin/ae2/jei/MixinInputHandler.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ public void onInit(JeiRuntime runtime, IngredientRegistry ingredientRegistry, In
111111
}
112112
for (KeyBindings kb : KeyBindings.values()) {
113113
var k = kb.getKeyBinding();
114-
if (k.isActiveAndMatches(eventKey)
115-
&& k.getKeyModifier().isActive(k.getKeyConflictContext())) {
114+
if (k.isActiveAndMatches(eventKey)) {
116115
if (kb.isNeedItem()) {
117116
var ing = leftAreaDispatcher.getIngredientUnderMouse(MouseHelper.getX(), MouseHelper.getY());
118117
if (ing == null) return false;

src/main/java/com/circulation/random_complement/mixin/ae2/miss_craft/MixinCraftingJob.java

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ public void supplementaryOutput(CallbackInfo ci, @Share("rcOutput") LocalLongRef
8989

9090
if (repeatInput.getStackSize() > 0) {
9191
var size = Math.min(out, repeatInput.getStackSize());
92-
tree.getUsed().add(this.output.copy().setStackSize(size));
93-
r$wait = this.output.copy().setStackSize(repeatInput.getStackSize() - size);
92+
tree.getUsed().add(repeatOutput.setStackSize(size));
93+
repeatInput.decStackSize(size);
94+
r$wait = repeatInput;
9495
}
9596
break;
9697
}
@@ -102,8 +103,7 @@ public void supplementaryOutput(CallbackInfo ci, @Share("rcOutput") LocalLongRef
102103
repeatInput.incStackSize(input.getStackSize());
103104
}
104105
}
105-
final var inputSize = repeatInput.getStackSize();
106-
if (inputSize == 0) return;
106+
if (repeatInput.getStackSize() == 0) return;
107107

108108
IAEItemStack repeatOutput = this.output.copy().setStackSize(0);
109109
for (var input : details.getCondensedOutputs()) {
@@ -115,10 +115,9 @@ public void supplementaryOutput(CallbackInfo ci, @Share("rcOutput") LocalLongRef
115115

116116
long outputQuantity = this.output.getStackSize() / repeatOutput.getStackSize();
117117
if (this.output.getStackSize() % repeatOutput.getStackSize() != 0) ++outputQuantity;
118-
repeatInput.setStackSize(repeatInput.getStackSize() * outputQuantity + inputSize);
119118

120-
tree.setHowManyEmitted(inputSize);
121-
r$wait = this.output.copy().setStackSize(repeatInput.getStackSize());
119+
tree.setHowManyEmitted(repeatInput.getStackSize());
120+
r$wait = repeatInput.setStackSize(repeatInput.getStackSize() * ++outputQuantity);
122121
setSpecialDeficiency(true);
123122
}
124123
}

0 commit comments

Comments
 (0)