Skip to content

Commit

Permalink
Enhanced OptionalStack matching.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dragonoidzero committed Mar 15, 2021
1 parent 7b5dbb3 commit bbd0528
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ org.gradle.jvmargs=-Xmx1G
loader_version=0.11.2

# Mod Properties
mod_version = 1.1.1
mod_version = 1.1.2
maven_group = azzy.fabric
archives_base_name = incubus-core

Expand Down
10 changes: 10 additions & 0 deletions src/main/java/azzy/fabric/incubus_core/recipe/OptionalStack.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,16 @@ public int getCount() {
return cachedStacks.get(0);
}

public boolean itemMatch(ItemStack stack) {
if(cachedStacks == null)
getStacks();
if(cachedStacks.isEmpty()) {
return false;
}
else
return cachedStacks.stream().anyMatch(testStack -> testStack.isItemEqual(stack));
}

public boolean contains(ItemStack stack) {
if(cachedStacks == null)
getStacks();
Expand Down

0 comments on commit bbd0528

Please sign in to comment.