diff --git a/features/craft/src/main/java/net/okocraft/box/feature/craft/gui/SelectableIngredients.java b/features/craft/src/main/java/net/okocraft/box/feature/craft/gui/SelectableIngredients.java index 1301f05064..aac380caa5 100644 --- a/features/craft/src/main/java/net/okocraft/box/feature/craft/gui/SelectableIngredients.java +++ b/features/craft/src/main/java/net/okocraft/box/feature/craft/gui/SelectableIngredients.java @@ -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 sorter) { @@ -112,7 +112,7 @@ public void sortPatterns(@Nullable Comparator 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