WorldEdit 5.4 has trouble with //schem load and //paste involving blocks with IDs >127, which occurs quite often with mods. The paste will fail with:
19:01:33 [SEVERE] java.lang.ArrayIndexOutOfBoundsException: -28
19:01:33 [SEVERE] at org.bukkit.Material.getMaterial(Material.java:438)
19:01:33 [SEVERE] at com.sk89q.worldedit.bukkit.BukkitWorld.isValidBlockType(BukkitWorld.java:844)
19:01:33 [SEVERE] at com.sk89q.worldedit.EditSession.rawSetBlock(EditSession.java:178)
19:01:33 [SEVERE] at com.sk89q.worldedit.EditSession.flushQueue(EditSession.java:731)
19:01:33 [SEVERE] at com.sk89q.worldedit.WorldEdit.handleCommand(WorldEdit.java:1265)
19:01:33 [SEVERE] at com.sk89q.worldedit.bukkit.WorldEditPlugin.onCommand(WorldEditPlugin.java:204)
19:01:33 [SEVERE] at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:44)
19:01:33 [SEVERE] at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
19:01:33 [SEVERE] at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:469)
19:01:33 [SEVERE] at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:914)
19:01:33 [SEVERE] at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:874)
19:01:33 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:857)
19:01:33 [SEVERE] at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:33)
19:01:33 [SEVERE] at net.minecraft.server.NetworkManager.b(NetworkManager.java:234)
19:01:33 [SEVERE] at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:118)
19:01:33 [SEVERE] at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:78)
19:01:33 [SEVERE] at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:557)
19:01:33 [SEVERE] at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:455)
19:01:33 [SEVERE] at net.minecraft.server.ThreadServerApplication.run(SourceFile:490)
This occurs because the block ID is stored as a "byte", with range -128 to 127. It wraps around and causes the negative bounds error. For details see
https://github.com/sk89q/worldedit/pull/192 .
Until this is properly fixed, I have a workaround available at:
https://github.com/mushroomhostage/worldedit/downloadsDisclaimer: not necessarily a complete fix. See pull request discussion for possible caveats. Also note, this does
not add compatibility with 4096 block IDs. Someone else I hear is working on another patch for that. This simple fix worked well for my purposes (copying schematics of abandoned factories and such for my server), and there was interest in this patched build from other server owners, so I figured I'd post about it here in case anyone else is looking for it as well.