mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-20 20:22:12 +00:00
Small Cleanup (#195)
This commit is contained in:
1 parent
eb88b1cfe0
commit
1f05312ded
158 files changed
+242
-369
No files matched your search
@@ -221,15 +221,12 @@ public abstract class AbstractPoweredTaskEntity extends AbstractPowerConsumerEnt
|
||||
|
||||
protected int mergeItemResult(ItemStack item, List<ItemStack> outputStacks) {
|
||||
|
||||
int res = 0;
|
||||
|
||||
ItemStack copy = item.copy();
|
||||
// try to add it to existing stacks first
|
||||
for (ItemStack outStack : outputStacks) {
|
||||
if (outStack != null && copy != null) {
|
||||
int num = getNumCanMerge(outStack, copy);
|
||||
outStack.stackSize += num;
|
||||
res += num;
|
||||
copy.stackSize -= num;
|
||||
if (copy.stackSize <= 0) {
|
||||
return item.stackSize;
|
||||
|
||||
Reference in new issue
Block a user