pop4959 / ChunkyBorder

An add-on for Chunky which lets you create and manage world borders.
GNU General Public License v3.0
47 stars 11 forks source link

Folia: Cannot retrieve chunk asynchronously #66

Closed Anon8281 closed 11 months ago

Anon8281 commented 1 year ago
[02:44:38 ERROR]: Thread Region Scheduler Thread #0 failed main thread check: Cannot retrieve chunk asynchronously
java.lang.Throwable: null
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:71) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at org.bukkit.craftbukkit.v1_20_R1.CraftWorld.getHighestBlockYAt(CraftWorld.java:995) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at org.bukkit.craftbukkit.v1_20_R1.CraftRegionAccessor.getHighestBlockYAt(CraftRegionAccessor.java:304) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at org.popcraft.chunky.platform.BukkitWorld.getElevation(BukkitWorld.java:107) ~[Chunky-1.3.95.jar:?]
        at org.popcraft.chunkyborder.BorderCheckTask.wrap(BorderCheckTask.java:72) ~[ChunkyBorder-1.1.62.jar:?]
        at org.popcraft.chunkyborder.BorderCheckTask.lambda$run$0(BorderCheckTask.java:37) ~[ChunkyBorder-1.1.62.jar:?]
        at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
        at org.popcraft.chunkyborder.BorderCheckTask.run(BorderCheckTask.java:29) ~[ChunkyBorder-1.1.62.jar:?]
        at org.popcraft.chunky.platform.Folia.lambda$scheduleFixedGlobal$1(Folia.java:29) ~[Chunky-1.3.95.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler$GlobalScheduledTask.run(FoliaGlobalRegionScheduler.java:179) ~[folia-1.20.1.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.tick(FoliaGlobalRegionScheduler.java:37) ~[folia-1.20.1.jar:?]
        at io.papermc.paper.threadedregions.RegionizedServer.globalTick(RegionizedServer.java:294) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at io.papermc.paper.threadedregions.RegionizedServer$GlobalTickTickHandle.tickRegion(RegionizedServer.java:149) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:385) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:525) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]
[02:44:38 WARN]: [ChunkyBorder] Global task for ChunkyBorder v1.1.62 generated an exception
java.lang.IllegalStateException: Cannot retrieve chunk asynchronously
        at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:72) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at org.bukkit.craftbukkit.v1_20_R1.CraftWorld.getHighestBlockYAt(CraftWorld.java:995) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at org.bukkit.craftbukkit.v1_20_R1.CraftRegionAccessor.getHighestBlockYAt(CraftRegionAccessor.java:304) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at org.popcraft.chunky.platform.BukkitWorld.getElevation(BukkitWorld.java:107) ~[Chunky-1.3.95.jar:?]
        at org.popcraft.chunkyborder.BorderCheckTask.wrap(BorderCheckTask.java:72) ~[ChunkyBorder-1.1.62.jar:?]
        at org.popcraft.chunkyborder.BorderCheckTask.lambda$run$0(BorderCheckTask.java:37) ~[ChunkyBorder-1.1.62.jar:?]
        at java.util.Optional.ifPresent(Optional.java:178) ~[?:?]
        at org.popcraft.chunkyborder.BorderCheckTask.run(BorderCheckTask.java:29) ~[ChunkyBorder-1.1.62.jar:?]
        at org.popcraft.chunky.platform.Folia.lambda$scheduleFixedGlobal$1(Folia.java:29) ~[Chunky-1.3.95.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler$GlobalScheduledTask.run(FoliaGlobalRegionScheduler.java:179) ~[folia-1.20.1.jar:?]
        at io.papermc.paper.threadedregions.scheduler.FoliaGlobalRegionScheduler.tick(FoliaGlobalRegionScheduler.java:37) ~[folia-1.20.1.jar:?]
        at io.papermc.paper.threadedregions.RegionizedServer.globalTick(RegionizedServer.java:294) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at io.papermc.paper.threadedregions.RegionizedServer$GlobalTickTickHandle.tickRegion(RegionizedServer.java:149) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:385) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:525) ~[folia-1.20.1.jar:git-Folia-"ed4529a"]
        at java.lang.Thread.run(Thread.java:833) ~[?:?]

Using: ChunkyBorder v1.1.62 (latest from master branch) Chunky v1.3.95 (latest from master branch) Folia 1.20.1

Border config:

{
  "world": {
    "world": "world",
    "centerX": 15360.0,
    "centerZ": 7936.0,
    "radiusX": 15355.0,
    "radiusZ": 7931.0,
    "shape": "rectangle",
    "wrap": "earth"
  }
}
Anon8281 commented 1 year ago

Steps to reproduce:

  1. Set border config from first message
  2. Try to cross the border of the world
pop4959 commented 11 months ago

Thanks for the bug report, this should be fixed by https://github.com/pop4959/Chunky/commit/f609ab4a346663dd4062e950de558e63dfaeefa1. Simply download the latest development build of Chunky from Actions or CodeMC.