Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[1.18.2] MythicMobs 插件加载 RandomSpawner 后的 NoSuchMethodError #888

Open
NattoCB opened this issue Jun 30, 2024 · 1 comment
Open

Comments

@NattoCB
Copy link

NattoCB commented Jun 30, 2024

运行环境

Minecraft版本(1.12.2/1.16.5/1.18.2): 1.18.2
构建版本(从/version指令获取): afe4633
相关模组/插件: MythicMobs 插件

描述这个BUG
在 MM 插件 RandomSpawner 文件夹内新建一个 spawner yml 写入:

test:
  Type: GIANT
  Chance: 100
  Priority: 128
  Action: ADD
  Worlds: world

在服务器 /mm reload,会导致大量的报错提示:NoSuchMethodError: 'org.bukkit.Chunk org.bukkit.World.getChunkAt()

[21:51:11] [Craft Scheduler Thread - 24/ERROR]: [MythicMobs] [SCHEDULER] Exception thrown whilst executing task
[21:51:11] [Craft Scheduler Thread - 24/INFO]: java.lang.NoSuchMethodError: 'org.bukkit.Chunk org.bukkit.World.getChunkAt(int, int, boolean)'
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at io.lumine.mythic.core.spawning.random.PlayerGroup.<init>(PlayerGroup.java:49)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at io.lumine.mythic.core.spawning.random.generators.ClusterGenerator.lambda$getPlayerGroups$3(ClusterGenerator.java:98)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at io.lumine.mythic.core.spawning.random.generators.ClusterGenerator.getPlayerGroups(ClusterGenerator.java:94)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at io.lumine.mythic.core.spawning.random.generators.ClusterGenerator.tick(ClusterGenerator.java:38)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at io.lumine.mythic.core.spawning.random.RandomSpawnGenerator.run(RandomSpawnGenerator.java:29)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at io.lumine.mythic.bukkit.utils.Delegates$RunnableToConsumer.accept(Delegates.java:93)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at io.lumine.mythic.bukkit.utils.Schedulers$LumineTask.run(Schedulers.java:184)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at TRANSFORMER/forge@40.2.14/org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftTask.run(CraftTask.java:81)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at TRANSFORMER/forge@40.2.14/org.bukkit.craftbukkit.v1_18_R2.scheduler.CraftAsyncTask.run(CraftAsyncTask.java:54)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1136)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
[21:51:11] [Craft Scheduler Thread - 24/INFO]:  at java.base/java.lang.Thread.run(Thread.java:833)

导致的问题

RandomSpawner 执行中断

可能的原因
MM 自己有个 WorldAdapter 适配各种框架下的 world,但它 BukkitAdapter 需要的

    public Chunk getChunkAt(int x, int z, boolean flag);

在目前服务端中不包含:

    public Chunk getChunkAt(int x, int z);
    public Chunk getChunkAt(@NotNull Location location);
    public Chunk getChunkAt(@NotNull Block block);

可能是它想一个插件兼容所有版本的 spigot,但使用了一个非 1.18.2 的 API
image
1.12.1:
image

===
更新:如果上述分析无误,感觉这个 issue 可以 close 了,有空我去那边问问

@Kotori0629
Copy link
Collaborator

Kotori0629 commented Jul 1, 2024

浅翻了一下Paper那边并没有 看起来我应该给它加上

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants