WorldEdit for Bukkit

WorldEdit for Bukkit

21M Downloads

Java error when pasting a schematic with biomes

morceaudebois opened this issue ยท 5 comments

commented

WorldEdit Version

7.2.17

Platform Version

Fabric 0.14

Confirmations

  • I am using the most recent Minecraft release.
  • I am using a version of WorldEdit compatible with my Minecraft version.
  • I am using the latest or recommended version of my platform software.
  • I am NOT using a hybrid server, e.g. a server that combines Bukkit and Forge. Examples include Arclight, Mohist, and Cardboard.
  • I am NOT using a fork of WorldEdit, such as FastAsyncWorldEdit (FAWE) or AsyncWorldEdit (AWE)

Bug Description

When trying to paste this schematic with //paste -e -b -a, I get a Java error.

[15:16:35] [Render thread/INFO]: [System] [CHAT] java.lang.ArrayIndexOutOfBoundsException: Index 24 out of bounds for length 24
[15:16:35] [Server thread/ERROR]: An unexpected error while handling a WorldEdit command
java.lang.ArrayIndexOutOfBoundsException: Index 24 out of bounds for length 24
	at net.minecraft.class_2791.method_38259(class_2791.java:162) ~[client-intermediary.jar:?]
	at com.sk89q.worldedit.fabric.FabricWorld.setBiome(FabricWorld.java:236) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.world.BiomeQuirkExtent.setBiome(BiomeQuirkExtent.java:48) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.world.ChunkLoadingExtent.setBiome(ChunkLoadingExtent.java:77) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.ChangeSetExtent.setBiome(ChangeSetExtent.java:73) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extent.AbstractDelegateExtent.setBiome(AbstractDelegateExtent.java:109) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.EditSession.setBiome(EditSession.java:676) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.function.biome.ExtentBiomeCopy.apply(ExtentBiomeCopy.java:98) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.function.visitor.RegionVisitor.resume(RegionVisitor.java:60) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.function.operation.OperationQueue.resume(OperationQueue.java:92) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.function.operation.DelegateOperation.resume(DelegateOperation.java:52) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.function.operation.Operations.completeLegacy(Operations.java:55) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.command.ClipboardCommands.paste(ClipboardCommands.java:184) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.command.ClipboardCommandsRegistration.cmd$_paste(ClipboardCommandsRegistration.java:260) ~[worldedit-mod-7.2.17.jar:?]
	at org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommand(PlatformCommandManager.java:497) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.util.eventbus.MethodHandleEventHandler.dispatch(MethodHandleEventHandler.java:51) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.util.eventbus.EventHandler.handleEvent(EventHandler.java:73) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.util.eventbus.EventBus.dispatch(EventBus.java:193) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.util.eventbus.EventBus.post(EventBus.java:181) ~[worldedit-mod-7.2.17.jar:?]
	at com.sk89q.worldedit.fabric.CommandWrapper.lambda$register$0(CommandWrapper.java:62) ~[worldedit-mod-7.2.17.jar:?]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:264) ~[brigadier-1.1.8.jar:?]
	at net.minecraft.class_2170.method_9249(class_2170.java:294) ~[client-intermediary.jar:?]
	at net.minecraft.class_3244.method_45010(class_3244.java:1288) ~[client-intermediary.jar:?]
	at net.minecraft.class_3244.method_44356(class_3244.java:1268) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_5386(class_1255.java:67) ~[client-intermediary.jar:?]
	at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?]
	at net.minecraft.class_3738.run(class_3738.java:18) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_18859(class_1255.java:156) ~[client-intermediary.jar:?]
	at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:778) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:163) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:130) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:760) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:754) ~[client-intermediary.jar:?]
	at net.minecraft.class_1255.method_18857(class_1255.java:139) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:739) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:671) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:263) ~[client-intermediary.jar:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]

Expected Behavior

It should paste the schematic with its entities and biomes.

Reproduction Steps

paste the schematic with with //paste -e -b -a

Anything Else?

It seems to be related to biomes as if i do //paste -e -a, it works normally. Tried it in many different situations and it never worked, like remaking the schematic from scratch, divide it in smaller parts and making a new Minecraft instance with only WorldEdit.

commented

Discord_fKtyUBsqAn
not sure why you neglected to mention this in the report

edit: looks like that mod is closed source too. not even gonna bother. report it to them if they're breaking other mods.

commented

I can't reproduce this issue with the provided schematic.

In the past, errors like this have usually been caused by mods that are either modifying internal MC registries to contain invalid data, or mods not correctly registering their biomes

commented

@wizjany Thanks for the reply! That Discord message was actually a false positive during my testings. As I said I tried pasting the schematic in a fully new Minecraft instance with only WorldEdit installed and it doesn't work. I'm not sure what else I could try at this point

commented

From looking into it, this error doesn't appear to be possible with purely WorldEdit. I've put up a PR to add further validation to API usages of WorldEdit (so cases where other mods / plugins provide invalid data), but as I cannot actually reproduce this error I cannot test if it fixes it.

If you'd be able to test with builds from https://builds.enginehub.org/job/worldedit?branch=chore/attempt-fix-for-unreproducable-biome-error that'd be appreciated

commented

No reply after a month so I'm assuming this is fixed by the above, given I cannot reproduce the issue.