mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
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:
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();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user