mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-25 14:24:35 +00:00
Update to 1.11.2. Untested, still using outdated MCMP
This commit is contained in:
1 parent
2b02042f4c
commit
6a42eb64e3
666 files changed
+11360
-3713
No files matched your search
@@ -80,19 +80,19 @@ public class StackSearcher
|
||||
if(theInventory.getStackInSlot(i) != null && StackUtils.equalsWildcard(theInventory.getStackInSlot(i), type))
|
||||
{
|
||||
ItemStack stack = theInventory.getStackInSlot(i);
|
||||
int current = ret.getStack() != null ? ret.getStack().stackSize : 0;
|
||||
int current = ret.getStack() != null ? ret.getStack().getCount() : 0;
|
||||
|
||||
if(current+stack.stackSize <= max)
|
||||
if(current+stack.getCount() <= max)
|
||||
{
|
||||
ret.appendStack(i, stack.copy());
|
||||
}
|
||||
else {
|
||||
ItemStack copy = stack.copy();
|
||||
copy.stackSize = max-current;
|
||||
copy.setCount(max-current);
|
||||
ret.appendStack(i, copy);
|
||||
}
|
||||
|
||||
if(ret.getStack() != null && ret.getStack().stackSize == max)
|
||||
if(ret.getStack() != null && ret.getStack().getCount() == max)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
@@ -112,9 +112,9 @@ public class StackSearcher
|
||||
if(sidedInventory.getStackInSlot(slotID) != null && StackUtils.equalsWildcard(theInventory.getStackInSlot(slotID), type))
|
||||
{
|
||||
ItemStack stack = sidedInventory.getStackInSlot(slotID);
|
||||
int current = ret.getStack() != null ? ret.getStack().stackSize : 0;
|
||||
int current = ret.getStack() != null ? ret.getStack().getCount() : 0;
|
||||
|
||||
if(current+stack.stackSize <= max)
|
||||
if(current+stack.getCount() <= max)
|
||||
{
|
||||
ItemStack copy = stack.copy();
|
||||
|
||||
@@ -128,12 +128,12 @@ public class StackSearcher
|
||||
|
||||
if(sidedInventory.canExtractItem(slotID, copy, side.getOpposite()))
|
||||
{
|
||||
copy.stackSize = max-current;
|
||||
copy.setCount(max-current);
|
||||
ret.appendStack(slotID, copy);
|
||||
}
|
||||
}
|
||||
|
||||
if(ret.getStack() != null && ret.getStack().stackSize == max)
|
||||
if(ret.getStack() != null && ret.getStack().getCount() == max)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
@@ -142,7 +142,7 @@ public class StackSearcher
|
||||
}
|
||||
}
|
||||
|
||||
if(ret != null && ret.getStack() != null && ret.getStack().stackSize >= min)
|
||||
if(ret != null && ret.getStack() != null && ret.getStack().getCount() >= min)
|
||||
{
|
||||
return ret;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user