mirror of
https://github.com/Thorfusion/Mekanism-Community-Edition.git
synced 2026-11-26 14:52:58 +00:00
Ignore amounts for inputItemMatches (#5532)
This commit is contained in:
1 parent
5d17d706c0
commit
d217a545ca
1 file changed
+4
-1
@@ -41,6 +41,9 @@ public abstract class MachineInput<INPUT extends MachineInput<INPUT>> {
|
||||
*/
|
||||
public abstract boolean testEquality(INPUT other);
|
||||
|
||||
/**
|
||||
* Checks if the two item stacks match (IGNORES AMOUNTS)
|
||||
*/
|
||||
public static boolean inputItemMatches(ItemStack container, ItemStack contained) {
|
||||
return ITEM_MATCHER_OVERRIDES.getOrDefault(container.getItem().getClass(), DEFAULT_MATCHER).test(container, contained);
|
||||
}
|
||||
@@ -49,7 +52,7 @@ public abstract class MachineInput<INPUT extends MachineInput<INPUT>> {
|
||||
if (OreDictCache.getOreDictName(container).contains("treeSapling")) {
|
||||
return StackUtils.equalsWildcard(container, contained);
|
||||
}
|
||||
return StackUtils.equalsWildcardWithNBT(container, contained) && container.getCount() >= contained.getCount();
|
||||
return StackUtils.equalsWildcardWithNBT(container, contained);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user