Check ItemStack NBT for comparison in more places (#5491)

* Check NBT in a bunch more item comparision checks
* Fix Gas conversion checking stack size when comparing itemstacks
This commit is contained in:
Richard Freimer authored and Xander committed 2019-05-27 12:08:09 +08:00
1 parent 7438ad4d9e
commit eb2de11b72
20 files changed
+105 -81

No files matched your search

@@ -3,6 +3,7 @@ package mekanism.api.infuse;
import java.util.HashMap;
import java.util.Map;
import net.minecraft.item.ItemStack;
import net.minecraftforge.items.ItemHandlerHelper;
/**
* Use this class to add a new object that registers as an infuse object.
@@ -82,7 +83,7 @@ public class InfuseRegistry {
*/
public static InfuseObject getObject(ItemStack itemStack) {
for (Map.Entry<ItemStack, InfuseObject> obj : infuseObjects.entrySet()) {
if (itemStack.isItemEqual(obj.getKey())) {
if (ItemHandlerHelper.canItemStacksStack(obj.getKey(), itemStack)) {
return obj.getValue();
}
}