Checks to see if the two input stacks are equal in all but stack size. Note that this doesn't check anything todo with stack size, so if you pass in two stacks of 64 cobblestone this will return true. If you pass in null (at all) then this will only return true if both are null.
(ItemStack a, ItemStack b)
| 17 | * todo with stack size, so if you pass in two stacks of 64 cobblestone this will return true. If you pass in null |
| 18 | * (at all) then this will only return true if both are null. */ |
| 19 | public static boolean canMerge(ItemStack a, ItemStack b) { |
| 20 | // Checks item, damage |
| 21 | if (!ItemStack.areItemsEqual(a, b)) { |
| 22 | return false; |
| 23 | } |
| 24 | // checks tags and caps |
| 25 | return ItemStack.areItemStackTagsEqual(a, b); |
| 26 | } |
| 27 | |
| 28 | /** Attempts to get an item stack that might place down the given blockstate. Obviously this isn't perfect, and so |
| 29 | * cannot be relied on for anything more than simple blocks. */ |
no test coverage detected