Skip to content

Commit

Permalink
fix(craft): SelectableIngredients#isSameIngredient
Browse files Browse the repository at this point in the history
  • Loading branch information
Siroshun09 committed Apr 16, 2024
1 parent 2cc6358 commit b739eb5
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public int size() {
* @return {@code true} if two {@link SelectableIngredients} are same, otherwise {@code false}
*/
public boolean isSameIngredient(@NotNull SelectableIngredients other) {
return this.ingredientHolder.equals(other.ingredientHolder);
return this.ingredientHolder.patterns().equals(other.ingredientHolder.patterns());
}

public void sortPatterns(@Nullable Comparator<BoxIngredientItem> sorter) {
Expand All @@ -112,7 +112,7 @@ public void sortPatterns(@Nullable Comparator<BoxIngredientItem> sorter) {
public boolean equals(Object o) {
if (this == o) return true;
if (!(o instanceof SelectableIngredients that)) return false;
return this.isSameIngredient(that);
return this.ingredientHolder.equals(that.ingredientHolder);
}

@Override
Expand Down

0 comments on commit b739eb5

Please sign in to comment.