@@ -28,6 +28,9 @@ public abstract class MixinCraftingCPUCluster {
2828 @ Unique
2929 private IAEItemStack r$waitInput ;
3030
31+ @ Unique
32+ private boolean r$canIgnoredInput = false ;
33+
3134 @ Shadow
3235 protected abstract void completeJob ();
3336
@@ -36,7 +39,7 @@ public abstract class MixinCraftingCPUCluster {
3639
3740 @ WrapOperation (method = "injectItems" , at = @ At (value = "INVOKE" , target = "Ljava/lang/Object;equals(Ljava/lang/Object;)Z" ))
3841 public boolean injectItems (Object instance , Object o , Operation <Boolean > original , @ Local (name = "type" ) Actionable type ) {
39- if (r$waitInput != null && r$waitInput .equals (o )) {
42+ if (r$canIgnoredInput && r$ waitInput != null && r$waitInput .equals (o )) {
4043 if (type == Actionable .MODULATE ) {
4144 var size = ((IAEItemStack ) o ).getStackSize ();
4245 if (r$waitInput .getStackSize () <= size ) {
@@ -53,7 +56,7 @@ public boolean injectItems(Object instance, Object o, Operation<Boolean> origina
5356
5457 @ Inject (method = "injectItems" , at = @ At ("RETURN" ))
5558 public void onStop (IAEItemStack input , Actionable type , IActionSource src , CallbackInfoReturnable <IAEItemStack > cir ) {
56- if (r$waitInput != null && this .finalOutput != null && this .finalOutput .getStackSize () <= 0 ) {
59+ if (r$canIgnoredInput && r$ waitInput != null && this .finalOutput != null && this .finalOutput .getStackSize () <= 0 ) {
5760 this .completeJob ();
5861 this .updateCPU ();
5962 }
@@ -62,7 +65,7 @@ public void onStop(IAEItemStack input, Actionable type, IActionSource src, Callb
6265 @ Inject (method = "submitJob" , at = @ At (value = "INVOKE" , target = "Lappeng/crafting/CraftingTreeNode;setJob(Lappeng/crafting/MECraftingInventory;Lappeng/me/cluster/implementations/CraftingCPUCluster;Lappeng/api/networking/security/IActionSource;)V" ))
6366 public void submitJob (IGrid g , ICraftingJob job , IActionSource src , ICraftingRequester requestingMachine , CallbackInfoReturnable <ICraftingLink > cir ) {
6467 var j = (RCCraftingJob ) job ;
65- if (!j .canIgnoredInput ()) return ;
68+ if (!( r$canIgnoredInput = j .canIgnoredInput () )) return ;
6669 var s = j .getWaitingItem ();
6770 if (s != null && s .getStackSize () > 0 ) {
6871 r$waitInput = s .copy ();
0 commit comments