Skip to content

Commit 21540ac

Browse files
author
Circulate233
committed
修复bug
1 parent 2091397 commit 21540ac

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

src/main/java/github/kasuminova/novaeng/mixin/ae2/MixinCraftingCPUClusterTwo.java

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -119,16 +119,14 @@ public abstract class MixinCraftingCPUClusterTwo {
119119
double sum = 0;
120120
for (IAEItemStack anInput : input) {
121121
if (anInput != null) {
122-
if (anInput.getDefinition() != null && !anInput.getDefinition().isEmpty()) {
123-
if (anInput.getItem() == FCItems.FLUID_DROP) {
124-
sum += Math.max((double) anInput.getStackSize() / (double) 1000.0F, (double) 1.0F);
125-
continue;
126-
}
122+
if (anInput.getItem() == FCItems.FLUID_DROP) {
123+
sum += Math.max((double) anInput.getStackSize() / (double) 1000.0F, (double) 1.0F);
124+
continue;
125+
}
127126

128-
if (ModAndClassUtil.GAS && anInput.getItem() == FCGasItems.GAS_DROP) {
129-
sum += Math.max((double) anInput.getStackSize() / (double) 4000.0F, (double) 1.0F);
130-
continue;
131-
}
127+
if (ModAndClassUtil.GAS && anInput.getItem() == FCGasItems.GAS_DROP) {
128+
sum += Math.max((double) anInput.getStackSize() / (double) 4000.0F, (double) 1.0F);
129+
continue;
132130
}
133131
sum += anInput.getStackSize();
134132
}
@@ -226,7 +224,7 @@ private void executeCrafting(IEnergyGrid eg, CraftingGridCache cc) {
226224
IAEItemStack item = this.inventory.getItemList().findPrecise(input[x]);
227225
if (item != null) {
228226
itemList = ObjectLists.singleton(item);
229-
} else if (input[x].getDefinition().getItem().isDamageable()) {
227+
} else if (input[x].getItem().isDamageable()) {
230228
itemList = this.inventory.getItemList().findFuzzy(input[x], FuzzyMode.IGNORE_ALL);
231229
} else {
232230
itemList = ObjectLists.emptyList();
@@ -238,7 +236,7 @@ private void executeCrafting(IEnergyGrid eg, CraftingGridCache cc) {
238236
fuzz.setStackSize(input[x].getStackSize());
239237
if (key.isValidItemForSlot(x, fuzz.createItemStack(), this.getWorld())) {
240238
IAEItemStack ais = this.r$extractItemsR(this.inventory, fuzz, Actionable.MODULATE, this.machineSrc, mediumType);
241-
ItemStack is = ais == null ? ItemStack.EMPTY : ais.getDefinition();
239+
ItemStack is = ais == null ? ItemStack.EMPTY : ais.createItemStack();
242240
if (!is.isEmpty()) {
243241
IAEItemStack receiver = ais.copy();
244242
this.postChange(receiver, this.machineSrc);

0 commit comments

Comments
 (0)