mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-11-28 07:55:41 +00:00
Transceiver item buffers would allow multiple non-stackable items of the same type
This commit is contained in:
1 parent
ac8b7c3493
commit
e425a8e370
4 files changed
+28
-11
No files matched your search
@@ -164,14 +164,30 @@ public class ItemUtil {
|
||||
return inv;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if items, damage and NBT are equal and the items are stackable.
|
||||
* @param s1
|
||||
* @param s2
|
||||
* @return
|
||||
*/
|
||||
public static boolean areStackMergable(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);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if items, damage and NBT are equal.
|
||||
* @param s1
|
||||
* @param s2
|
||||
* @return
|
||||
*/
|
||||
public static boolean areStackTypesEqual(ItemStack s1, ItemStack s2) {
|
||||
if(s1 == null || s2 == null || !s1.isStackable() || !s2.isStackable()) {
|
||||
public static boolean areStacksEqual(ItemStack s1, ItemStack s2) {
|
||||
if(s1 == null || s2 == null) {
|
||||
return false;
|
||||
}
|
||||
if(!s1.isItemEqual(s2)) {
|
||||
|
||||
Reference in new issue
Block a user