mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 07:55:41 +00:00
First cut of items working.
This commit is contained in:
1 parent
f76961ad43
commit
ae89cd4af8
3 files changed
+105
-14
No files matched your search
@@ -164,4 +164,20 @@ public class ItemUtil {
|
||||
return inv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if items, damage and NBT are equal.
|
||||
* @param s1
|
||||
* @param s2
|
||||
* @return
|
||||
*/
|
||||
public static boolean canMergeStacks(ItemStack s1, ItemStack s2) {
|
||||
if(s1 == null || s2 == null || !s1.isStackable() || !s2.isStackable()) {
|
||||
return false;
|
||||
}
|
||||
if(!s1.isItemEqual(s2)) {
|
||||
return false;
|
||||
}
|
||||
return ItemStack.areItemStackTagsEqual(s1, s2);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in new issue
Block a user