From b9a3c2849a7388b3f7c425077186cb21fb92076d Mon Sep 17 00:00:00 2001 From: nlog Date: Sun, 26 Feb 2023 05:59:04 +0900 Subject: [PATCH] Modify setFrozen behavior (#395) --- .../bluecolored/bluemap/common/api/BlueMapMapImpl.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapMapImpl.java b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapMapImpl.java index 8bffeb17..f6edd7a9 100644 --- a/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapMapImpl.java +++ b/BlueMapCommon/src/main/java/de/bluecolored/bluemap/common/api/BlueMapMapImpl.java @@ -109,8 +109,13 @@ public Predicate getTileFilter() { @Override public synchronized void setFrozen(boolean frozen) { - if (isFrozen()) unfreeze(); - else freeze(); + if (frozen != isFrozen()) { + if (frozen) { + freeze(); + } else { + unfreeze(); + } + } } private synchronized void unfreeze() {