From 136ed17c0bfec35df7ba1c622b21195a6806ccd2 Mon Sep 17 00:00:00 2001 From: TheMode Date: Fri, 23 Apr 2021 12:25:23 +0200 Subject: [PATCH] No thread refresh for perchunk-instance thread provider --- .../net/minestom/server/thread/PerChunkThreadProvider.java | 5 +++++ .../minestom/server/thread/PerInstanceThreadProvider.java | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/src/main/java/net/minestom/server/thread/PerChunkThreadProvider.java b/src/main/java/net/minestom/server/thread/PerChunkThreadProvider.java index 2365e42a6..ccd4365b8 100644 --- a/src/main/java/net/minestom/server/thread/PerChunkThreadProvider.java +++ b/src/main/java/net/minestom/server/thread/PerChunkThreadProvider.java @@ -20,4 +20,9 @@ public class PerChunkThreadProvider extends ThreadProvider { public long findThread(@NotNull Chunk chunk) { return chunk.hashCode(); } + + @Override + public @NotNull RefreshType getChunkRefreshType() { + return RefreshType.NEVER; + } } diff --git a/src/main/java/net/minestom/server/thread/PerInstanceThreadProvider.java b/src/main/java/net/minestom/server/thread/PerInstanceThreadProvider.java index ea0b3755a..baba20527 100644 --- a/src/main/java/net/minestom/server/thread/PerInstanceThreadProvider.java +++ b/src/main/java/net/minestom/server/thread/PerInstanceThreadProvider.java @@ -21,4 +21,9 @@ public class PerInstanceThreadProvider extends ThreadProvider { public long findThread(@NotNull Chunk chunk) { return chunk.getInstance().hashCode(); } + + @Override + public @NotNull RefreshType getChunkRefreshType() { + return RefreshType.NEVER; + } }