From c4448fea149d2638f126813deba6406a7a15d67d Mon Sep 17 00:00:00 2001 From: syeyoung <42869671+cyoung06@users.noreply.github.com> Date: Tue, 15 Dec 2020 01:23:36 +0900 Subject: predicate equals and more edits --- .../dungeonsguide/dungeon/mechanics/predicates/PredicateBat.java | 5 +++++ .../dungeon/mechanics/predicates/PredicateSuperBoom.java | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/predicates') diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/predicates/PredicateBat.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/predicates/PredicateBat.java index 136efd0e..5eb38597 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/predicates/PredicateBat.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/predicates/PredicateBat.java @@ -14,4 +14,9 @@ public class PredicateBat implements Predicate { public boolean apply(@Nullable Entity input) { return input instanceof EntityBat; } + + @Override + public boolean equals(Object o) { + return o == this || o != null && (o.getClass() == this.getClass()); + } } diff --git a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/predicates/PredicateSuperBoom.java b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/predicates/PredicateSuperBoom.java index ccc1b017..6054c268 100644 --- a/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/predicates/PredicateSuperBoom.java +++ b/src/main/java/kr/syeyoung/dungeonsguide/dungeon/mechanics/predicates/PredicateSuperBoom.java @@ -12,4 +12,9 @@ public class PredicateSuperBoom implements Predicate { public boolean apply(@Nullable ItemStack input) { return false; } + + @Override + public boolean equals(Object o) { + return o == this || o != null && (o.getClass() == this.getClass()); + } } -- cgit