/restore command error
LadyCailinBot opened this issue ยท 4 comments
WORLDEDIT-2212 - Reported by Caio.Cogliatti.Jabulka
When trying to restore areas with custom blocks I get the following error on the console, area is partialy restores(stops when attempting to restore first custom block):
WorldEdit: Using com.sk89q.worldedit.data.FileMcRegionChunkStore for loading snapshot 'backup/world'
java.lang.IllegalArgumentException: Can't have a block ID below 0
at com.sk89q.worldedit.foundation.Block.setId(Block.java:132)
at com.sk89q.worldedit.foundation.Block.(Block.java:90)
at com.sk89q.worldedit.blocks.BaseBlock.(BaseBlock.java:49)
at com.sk89q.worldedit.data.AnvilChunk.getBlock(AnvilChunk.java:209)
at com.sk89q.worldedit.snapshots.SnapshotRestore.restore(SnapshotRestore.java:165)
at com.sk89q.worldedit.commands.SnapshotUtilCommands.restore(SnapshotUtilCommands.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at com.sk89q.minecraft.util.commands.CommandsManager.invokeMethod(CommandsManager.java:522)
at com.sk89q.worldedit.WorldEdit$1.invokeMethod(WorldEdit.java:182)
at com.sk89q.worldedit.WorldEdit$1.invokeMethod(WorldEdit.java:113)
at com.sk89q.minecraft.util.commands.CommandsManager.executeMethod(CommandsManager.java:509)
at com.sk89q.minecraft.util.commands.CommandsManager.execute(CommandsManager.java:425)
at com.sk89q.worldedit.WorldEdit.handleCommand(WorldEdit.java:1263)
at com.sk89q.worldedit.bukkit.WorldEditPlugin.onCommand(WorldEditPlugin.java:197)
at com.sk89q.bukkit.util.DynamicPluginCommand.execute(DynamicPluginCommand.java:52)
at org.bukkit.command.SimpleCommandMap.dispatch(SimpleCommandMap.java:166)
at forge.bukkit.ForgeCommandMap.dispatch(ForgeCommandMap.java:55)
at org.bukkit.craftbukkit.CraftServer.dispatchCommand(CraftServer.java:664)
at net.minecraft.server.NetServerHandler.handleCommand(NetServerHandler.java:862)
at net.minecraft.server.NetServerHandler.chat(NetServerHandler.java:818)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:800)
at net.minecraft.server.Packet3Chat.handle(Packet3Chat.java:34)
at net.minecraft.server.NetworkManager.b(NetworkManager.java:262)
at net.minecraft.server.NetServerHandler.a(NetServerHandler.java:119)
at net.minecraft.server.NetworkListenThread.a(NetworkListenThread.java:97)
at net.minecraft.server.MinecraftServer.w(MinecraftServer.java:651)
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:525)
at net.minecraft.server.ThreadServerApplication.run(SourceFile:492)
someone posted a similar problem on the old tracker, not sure if it helps:
Related to issue 1938 (Snapshots don't support tile entity metadata)
Root cause:
AnvilChunk.java uses a signed byte[][] array to store blocks.
Fix:
com.sk89q.worldedit.data.AnvilChunk.getBlockID():
Replace
return blocks[section][index];
With:
return ((int)blocks[section][index]) & 0xFF;
java.lang.IllegalArgumentException: Can't have a block ID below 0
at com.sk89q.worldedit.foundation.Block.setId(Block.java:132)
at com.sk89q.worldedit.foundation.Block.<init>(Block.java:90)
at com.sk89q.worldedit.blocks.BaseBlock.<init>(BaseBlock.java:49)
at com.sk89q.worldedit.data.AnvilChunk.getBlock(AnvilChunk.java:209)
at com.sk89q.worldedit.snapshots.SnapshotRestore.restore(SnapshotRestore.java:16)
Stack trace truncated.
Reproduction steps:
Restoring from a snapshot, create a block whose ID is >= 129.
The contents of the existing selection do not cause the error; the existence of a 1.3 block in the area of the snapshot being restored causes the bug.
Comment by boss86741
Hi, I know that I am not sk89q but know a LITTLE code and know a lot about minecraft and bukkit.
Please tell me the exact thing you typed when you did the command. It looks to me like the custom block that you used was unrecognized by world edit. This happens whenever world edit is not updated when minecraft updates and it happens when custom blocks are used.
Comment by Dark_Arc
Please try a dev build here http://build.sk89q.com/job/WorldEdit/.