IntellectualSites / IntellectualSites/FastAsyncWorldEdit

NoSuchMethodException on server loading

Open
#3,433 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Approved Bug Low Priority
Dominant language
Java
Stars
806
Forks
394
Avg merge
22h 19m
Merged PRs (30d)
14

Description

Server Implementation

Spigot

Server Version

1.21.11

Describe the bug

Hello, just tried to update my server to 1.21.11, and even with a fresh install, the issue stays the same, I'm getting a "NoSuchMethodException". I'm using https://ci.athion.net/job/FastAsyncWorldEdit/1264/ as FAWE version.

To Reproduce
  1. Create a server with 1.21.11 Spigot.
  2. Install FAWE Snapshot v1264 (also tried the latest 2.15.0 release same issue).
  3. The plugin loading has that log error about NoSuchMethodException: net.minecraft.world.level.chunk.Chunk.k(net.minecraft.core.BlockPosition)
Expected behaviour

The plugin should load without that error message. This also affect the functioning of the plugin itself.

Screenshots / Videos

No response

Error log (if applicable)
[21:35:34] [Server thread/INFO]: Using com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_21_11.PaperweightFaweAdapter as the Bukkit adapter
[21:35:34] [Server thread/WARN]: java.lang.ExceptionInInitializerError
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_21_11.PaperweightFaweAdapter.lambda$blockEntityToCompoundTag$0(PaperweightFaweAdapter.java:162)
[21:35:34] [Server thread/WARN]: 	at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:201)
[21:35:34] [Server thread/WARN]: 	at com.fastasyncworldedit.core.nbt.LazyFaweCompoundTag.linTag(LazyFaweCompoundTag.java:11)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.registry.BlockMaterial.getDefaultTile(BlockMaterial.java:194)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.block.BlockTypesCache$Settings.<init>(BlockTypesCache.java:111)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.block.BlockType.<init>(BlockType.java:80)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.block.BlockTypesCache.register(BlockTypesCache.java:288)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.block.BlockTypesCache.<clinit>(BlockTypesCache.java:263)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.block.BlockTypes.init(BlockTypes.java:2406)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.block.BlockTypes.<clinit>(BlockTypes.java:48)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.block.BlockState.get(BlockState.java:156)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.block.BlockState.get(BlockState.java:132)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.registry.LegacyMapper.loadFromResource(LegacyMapper.java:124)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.registry.LegacyMapper.<init>(LegacyMapper.java:84)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.world.registry.LegacyMapper.getInstance(LegacyMapper.java:329)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.WorldEdit.loadMappings(WorldEdit.java:428)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.bukkit.WorldEditPlugin.setupPreWorldData(WorldEditPlugin.java:294)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.bukkit.WorldEditPlugin.onEnable(WorldEditPlugin.java:264)
[21:35:34] [Server thread/WARN]: 	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:267)
[21:35:34] [Server thread/WARN]: 	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342)
[21:35:34] [Server thread/WARN]: 	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:492)
[21:35:34] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_21_R7.CraftServer.enablePlugin(CraftServer.java:581)
[21:35:34] [Server thread/WARN]: 	at org.bukkit.craftbukkit.v1_21_R7.CraftServer.enablePlugins(CraftServer.java:495)
[21:35:34] [Server thread/WARN]: 	at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:335)
[21:35:34] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.A(MinecraftServer.java:1065)
[21:35:34] [Server thread/WARN]: 	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:340)
[21:35:34] [Server thread/WARN]: 	at java.base/java.lang.Thread.run(Thread.java:1583)
[21:35:34] [Server thread/WARN]: Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: net.minecraft.world.level.chunk.Chunk.k(net.minecraft.core.BlockPosition)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_21_11.PaperweightPlatformAdapter.<clinit>(PaperweightPlatformAdapter.java:201)
[21:35:34] [Server thread/WARN]: 	... 27 more
[21:35:34] [Server thread/WARN]: Caused by: java.lang.NoSuchMethodException: net.minecraft.world.level.chunk.Chunk.k(net.minecraft.core.BlockPosition)
[21:35:34] [Server thread/WARN]: 	at java.base/java.lang.Class.getDeclaredMethod(Class.java:2848)
[21:35:34] [Server thread/WARN]: 	at com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_21_11.PaperweightPlatformAdapter.<clinit>(PaperweightPlatformAdapter.java:180)
[21:35:34] [Server thread/WARN]: 	... 27 more
[21:35:34] [Server thread/WARN]: Failed to load the built-in legacy id registry
java.lang.ExceptionInInitializerError
	at com.sk89q.worldedit.world.block.BlockTypes.init(BlockTypes.java:2406)
	at com.sk89q.worldedit.world.block.BlockTypes.<clinit>(BlockTypes.java:48)
	at com.sk89q.worldedit.world.block.BlockState.get(BlockState.java:156)
	at com.sk89q.worldedit.world.block.BlockState.get(BlockState.java:132)
	at com.sk89q.worldedit.world.registry.LegacyMapper.loadFromResource(LegacyMapper.java:124)
	at com.sk89q.worldedit.world.registry.LegacyMapper.<init>(LegacyMapper.java:84)
	at com.sk89q.worldedit.world.registry.LegacyMapper.getInstance(LegacyMapper.java:329)
	at com.sk89q.worldedit.WorldEdit.loadMappings(WorldEdit.java:428)
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.setupPreWorldData(WorldEditPlugin.java:294)
	at com.sk89q.worldedit.bukkit.WorldEditPlugin.onEnable(WorldEditPlugin.java:264)
	at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:267)
	at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:342)
	at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:492)
	at org.bukkit.craftbukkit.v1_21_R7.CraftServer.enablePlugin(CraftServer.java:581)
	at org.bukkit.craftbukkit.v1_21_R7.CraftServer.enablePlugins(CraftServer.java:495)
	at net.minecraft.server.dedicated.DedicatedServer.e(DedicatedServer.java:335)
	at net.minecraft.server.MinecraftServer.A(MinecraftServer.java:1065)
	at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:340)
	at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: java.lang.RuntimeException: java.lang.ExceptionInInitializerError
	at com.sk89q.worldedit.world.block.BlockTypesCache.<clinit>(BlockTypesCache.java:278)
	... 19 more
Caused by: java.lang.ExceptionInInitializerError
	at com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_21_11.PaperweightFaweAdapter.lambda$blockEntityToCompoundTag$0(PaperweightFaweAdapter.java:162)
	at com.google.common.base.Suppliers$NonSerializableMemoizingSupplier.get(Suppliers.java:201)
	at com.fastasyncworldedit.core.nbt.LazyFaweCompoundTag.linTag(LazyFaweCompoundTag.java:11)
	at com.sk89q.worldedit.world.registry.BlockMaterial.getDefaultTile(BlockMaterial.java:194)
	at com.sk89q.worldedit.world.block.BlockTypesCache$Settings.<init>(BlockTypesCache.java:111)
	at com.sk89q.worldedit.world.block.BlockType.<init>(BlockType.java:80)
	at com.sk89q.worldedit.world.block.BlockTypesCache.register(BlockTypesCache.java:288)
	at com.sk89q.worldedit.world.block.BlockTypesCache.<clinit>(BlockTypesCache.java:263)
	... 19 more
Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodException: net.minecraft.world.level.chunk.Chunk.k(net.minecraft.core.BlockPosition)
	at com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_21_11.PaperweightPlatformAdapter.<clinit>(PaperweightPlatformAdapter.java:201)
	... 27 more
Caused by: java.lang.NoSuchMethodException: net.minecraft.world.level.chunk.Chunk.k(net.minecraft.core.BlockPosition)
	at java.base/java.lang.Class.getDeclaredMethod(Class.java:2848)
	at com.sk89q.worldedit.bukkit.adapter.impl.fawe.v1_21_11.PaperweightPlatformAdapter.<clinit>(PaperweightPlatformAdapter.java:180)
	... 27 more
Fawe Debugpaste

https://athion.net/ISPaster/paste/view/f6709bb44afe4050bf3143a5404a5fe0

Are you interested in contributing a fix?

No

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the v1_21_11 adapter, especially PaperweightPlatformAdapter and PaperweightFaweAdapter, at the stack-trace locations around lines 162, 180, and 201. Reproduce the failure on Spigot 1.21.11 and inspect the reflected Chunk method lookup. Done means the plugin loads without the NoSuchMethodException and the built-in legacy ID registry initializes successfully.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
game-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.