mirror of
https://github.com/GTNewHorizons/CodeChickenCore.git
synced 2026-11-12 00:07:33 +00:00
Fixed click counter doing reference comparison
This commit is contained in:
1 parent
3fdb34245d
commit
3e8dd8817d
1 file changed
+3
-1
@@ -1,5 +1,7 @@
|
||||
package codechicken.core.gui;
|
||||
|
||||
import com.google.common.base.Objects;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.TreeMap;
|
||||
|
||||
@@ -12,7 +14,7 @@ public class ClickCounter<T>
|
||||
public int count;
|
||||
|
||||
public boolean update(T clicked) {
|
||||
if(this.clicked != clicked) {
|
||||
if(Objects.equal(this.clicked, clicked)) {
|
||||
this.clicked = clicked;
|
||||
count = 0;
|
||||
time = Long.MIN_VALUE;
|
||||
|
||||
Reference in new issue
Block a user