mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-22 04:52:25 +00:00
Improve Itemstack equality checks (#5451)
* fix bad stacking check for Digital Miner. #5449 * map to forge's stack stackability check so caps are accounted for * check nbt when taking a defined item * fix bad reference equality check for empty * Switch sorting to using our stackable method * Fix bad stack check for robit #5454 * Improve stack compare for robit smelting
This commit is contained in:
1 parent
82d62ef96f
commit
4c4e88dca5
6 files changed
+50
-38
No files matched your search
@@ -67,7 +67,6 @@ import net.minecraft.util.NonNullList;
|
||||
import net.minecraft.util.text.translation.I18n;
|
||||
import net.minecraftforge.common.capabilities.Capability;
|
||||
import net.minecraftforge.fml.common.FMLCommonHandler;
|
||||
import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
public class TileEntityFactory extends TileEntityMachine implements IComputerIntegration, ISideConfiguration,
|
||||
IGasHandler, ISpecialConfigData, ITierUpgradeable, ISustainedData {
|
||||
@@ -406,11 +405,8 @@ public class TileEntityFactory extends TileEntityMachine implements IComputerInt
|
||||
for (int j = i + 1; j < inputSlots.length; j++) {
|
||||
int checkSlotID = inputSlots[j];
|
||||
ItemStack checkStack = inventory.get(checkSlotID);
|
||||
if (Math.abs(count - checkStack.getCount()) < 2) {
|
||||
continue;
|
||||
}
|
||||
if (!stack.isEmpty() && !checkStack.isEmpty() && !ItemHandlerHelper
|
||||
.canItemStacksStack(stack, checkStack)) {
|
||||
if (Math.abs(count - checkStack.getCount()) < 2 ||
|
||||
!InventoryUtils.areItemsStackable(stack, checkStack)) {
|
||||
continue;
|
||||
}
|
||||
//Output/Input will not match
|
||||
|
||||
Reference in new issue
Block a user