fix(chunkloader): use setChunkForceLoaded for full block/entity/redstone ticking
This commit is contained in:
@@ -227,6 +227,7 @@ final class ChunkLoaders {
|
|||||||
try {
|
try {
|
||||||
World w = Bukkit.getWorld(loader.world());
|
World w = Bukkit.getWorld(loader.world());
|
||||||
if (w != null) {
|
if (w != null) {
|
||||||
|
w.setChunkForceLoaded(loader.chunkX(), loader.chunkZ(), true);
|
||||||
w.addPluginChunkTicket(loader.chunkX(), loader.chunkZ(), plugin);
|
w.addPluginChunkTicket(loader.chunkX(), loader.chunkZ(), plugin);
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
@@ -241,6 +242,7 @@ final class ChunkLoaders {
|
|||||||
World w = Bukkit.getWorld(loader.world());
|
World w = Bukkit.getWorld(loader.world());
|
||||||
if (w != null) {
|
if (w != null) {
|
||||||
w.removePluginChunkTicket(loader.chunkX(), loader.chunkZ(), plugin);
|
w.removePluginChunkTicket(loader.chunkX(), loader.chunkZ(), plugin);
|
||||||
|
w.setChunkForceLoaded(loader.chunkX(), loader.chunkZ(), false);
|
||||||
}
|
}
|
||||||
} catch (Exception ignored) {
|
} catch (Exception ignored) {
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user