Skip to content

block.setData() and block.getData and etc. bug #159

@Alienn-Know

Description

@Alienn-Know

Stack trace

[13:37:55 ERROR]: Thread Region Scheduler Thread #0 failed main thread check: Cannot read world asynchronously
java.lang.Throwable: null
at io.papermc.paper.util.TickThread.ensureTickThread(TickThread.java:57) ~[folia-1.20.1.jar:git-Folia-"edafbce"]
at org.bukkit.craftbukkit.v1_20_R1.block.CraftBlock.getNMS(CraftBlock.java:84) ~[folia-1.20.1.jar:git-Folia-"edafbce"]
at org.bukkit.craftbukkit.v1_20_R1.block.CraftBlock.getBlockData(CraftBlock.java:179) ~[folia-1.20.1.jar:git-Folia-"edafbce"]
at org.example.heroesmy.untitled.skill.skills.active.Light.lambda$useSkill$1(Light.java:114) ~[untitled-1.0-SNAPSHOT.jar:?]
at org.example.heroesmy.untitled.sheduler.impl.FoliaTaskScheduler.lambda$runRepeating$8(FoliaTaskScheduler.java:99) ~[untitled-1.0-SNAPSHOT.jar:?]
at io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler$LocationScheduledTask.run(FoliaRegionScheduler.java:329) ~[folia-1.20.1.jar:?]
at io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler$Scheduler.tick(FoliaRegionScheduler.java:270) ~[folia-1.20.1.jar:?]
at io.papermc.paper.threadedregions.scheduler.FoliaRegionScheduler.tick(FoliaRegionScheduler.java:143) ~[folia-1.20.1.jar:?]
at net.minecraft.server.MinecraftServer.tickServer(MinecraftServer.java:1514) ~[folia-1.20.1.jar:git-Folia-"edafbce"]
at io.papermc.paper.threadedregions.TickRegions$ConcreteRegionTickHandle.tickRegion(TickRegions.java:360) ~[folia-1.20.1.jar:git-Folia-"edafbce"]
at io.papermc.paper.threadedregions.TickRegionScheduler$RegionScheduleHandle.runTick(TickRegionScheduler.java:385) ~[folia-1.20.1.jar:git-Folia-"edafbce"]
at ca.spottedleaf.concurrentutil.scheduler.SchedulerThreadPool$TickThreadRunner.run(SchedulerThreadPool.java:525) ~[folia-1.20.1.jar:git-Folia-"edafbce"]
at java.lang.Thread.run(Thread.java:833) ~[?:?]

Plugin and Datapack List

[11:37:45 INFO]: Bukkit Plugins:
[11:37:45 INFO]: - ChestShop, Chunky, HealthBarFolia, LootChest, spark, SternalBoard, TeleportFolia, Towny, TownyChat, untitled
[11:37:45 INFO]: Vault, ViaBackwards, ViaRewind, ViaVersion

Actions to reproduce (if known)

My plugin is supposed to replace certain blocks stored in the HashMap every 5 ticks, the blocks are replaced normally, but as soon as I teleport to another location I get this error. As I understand it, the Thread that can manipulate blocks in that area is missing, but how to solve this problem??

  1. I didn't get an answer in the previous thread, so I created a new one
  2. I change version to 1.20.1
  3. How to doing this? I use regionSheduler
  4. I use RegionSheduler, but when I teleport, the old region (owning the blocks) is deleted and a new one is created in the place where I teleported, and I get this error
  5. EntitySheduler attached to the player also does not help (the old region is deleted and an error occurs), GlobalRegionSheduler and AsyncSheduler also do not have access to blocks
  6. please answer me nicely

Folia version

1.20.1

Other

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions