Repository: EngineHub/WorldEdit

Issue #1923: //regen not in overworld fails
Created: 2021-10-27T18:05:05Z
WorldEdit Version
7.2.7
Platform Version
All Platforms
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
Non-overworld worlds get different level properties, so our mixins/casts won't work.
Stacktrace
java.lang.IllegalStateException: Regen failed
	at com.sk89q.worldedit.fabric.FabricWorld.regenerate(FabricWorld.java:312) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.sk89q.worldedit.command.RegionCommands.regenerate(RegionCommands.java:431) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.sk89q.worldedit.command.RegionCommandsRegistration.cmd$_regen(RegionCommandsRegistration.java:576) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommand(PlatformCommandManager.java:497) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.sk89q.worldedit.util.eventbus.MethodHandleEventHandler.dispatch(MethodHandleEventHandler.java:51) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.sk89q.worldedit.util.eventbus.EventHandler.handleEvent(EventHandler.java:73) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.sk89q.worldedit.util.eventbus.EventBus.dispatch(EventBus.java:193) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.sk89q.worldedit.util.eventbus.EventBus.post(EventBus.java:181) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.sk89q.worldedit.fabric.CommandWrapper.lambda$register$0(CommandWrapper.java:64) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263) ~[brigadier-1.0.18.jar:?]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:177) ~[brigadier-1.0.18.jar:?]
	at net.minecraft.class_2170.method_9249(class_2170.java:251) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_3244.method_14370(class_3244.java:1222) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_3244.method_31286(class_3244.java:1206) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_3244.method_12048(class_3244.java:1189) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_2797.method_12115(class_2797.java:30) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_2797.method_11054(class_2797.java:7) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_2600.method_11072(class_2600.java:21) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_3738.run(class_3738.java:18) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_1255.method_18859(class_1255.java:151) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_4093.method_18859(class_4093.java:23) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:788) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:164) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_1255.method_16075(class_1255.java:125) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:770) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:764) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.class_1255.method_18857(class_1255.java:134) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:749) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:701) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270) ~[intermediary-fabric-loader-0.11.7-1.17.1.jar:?]
	at java.lang.Thread.run(Thread.java:831) [?:?]
Caused by: java.lang.ClassCastException: class net.minecraft.class_27 cannot be cast to class com.sk89q.worldedit.fabric.mixin.AccessorLevelProperties (net.minecraft.class_27 and com.sk89q.worldedit.fabric.mixin.AccessorLevelProperties are in unnamed module of loader net.fabricmc.loader.launch.knot.KnotClassLoader @141e5bef)
	at com.sk89q.worldedit.fabric.FabricWorld.doRegen(FabricWorld.java:324) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	at com.sk89q.worldedit.fabric.FabricWorld.regenerate(FabricWorld.java:310) ~[worldedit-fabric-mc1.17.1-7.2.8-SNAPSHOT-dist.jar:?]
	... 31 more


Expected Behavior
//regen should work everywhere
Reproduction Steps

Go to not-overworld (nether, end)
//regen

Anything Else?
No response

Duplicate issue #1936: Regen command failed
Created: 2021-11-14T00:08:06Z
WorldEdit Version
Fabric-Official(7.2.7+9f3e795)
Platform Version
fabric 0.11.7-1.17.1
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
I tried to regen a selected region and was told that it failed and told to report it, //regen has worked before using the same version/file
Expected Behavior
It regen
Reproduction Steps
select an area and do //regen in the nether
Anything Else?
An unexpected error while handling a WorldEdit command
java.lang.IllegalStateException: Regen failed
at com.sk89q.worldedit.fabric.FabricWorld.regenerate(FabricWorld.java:312)
at com.sk89q.worldedit.command.RegionCommands.regenerate(RegionCommands.java:431)
at com.sk89q.worldedit.command.RegionCommandsRegistration.cmd$_regen(RegionCommandsRegistration.java:576)
at org.enginehub.piston.CommandManager.execute(CommandManager.java:157)
at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommand(PlatformCommandManager.java:497)
at com.sk89q.worldedit.util.eventbus.MethodHandleEventHandler.dispatch(MethodHandleEventHandler.java:51)
at com.sk89q.worldedit.util.eventbus.EventHandler.handleEvent(EventHandler.java:73)
at com.sk89q.worldedit.util.eventbus.EventBus.dispatch(EventBus.java:193)
at com.sk89q.worldedit.util.eventbus.EventBus.post(EventBus.java:181)
at com.sk89q.worldedit.fabric.CommandWrapper.lambda$register$0(CommandWrapper.java:64)
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263)
at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:177)
at net.minecraft.class_2170.method_9249(class_2170.java:251)
at net.minecraft.class_3244.method_14370(class_3244.java:1222)
at net.minecraft.class_3244.method_31286(class_3244.java:1206)
at net.minecraft.class_3244.method_12048(class_3244.java:1189)
at net.minecraft.class_2797.method_12115(class_2797.java:30)
at net.minecraft.class_2797.method_11054(class_2797.java:7)
at net.minecraft.class_2600.method_11072(class_2600.java:38)
at net.optifine.util.PacketRunnable.run(PacketRunnable.java:28)
at net.minecraft.class_3738.run(class_3738.java:18)
at net.minecraft.class_1255.method_18859(class_1255.java:193)
at net.minecraft.class_4093.method_18859(class_4093.java:23)
at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:788)
at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:164)
at net.minecraft.class_1255.method_16075(class_1255.java:158)
at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:770)
at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:764)
at net.minecraft.class_1255.method_5383(class_1255.java:135)
at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:748)
at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:701)
at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:270)
at java.base/java.lang.Thread.run(Thread.java:831)
Caused by: java.lang.ClassCastException: class net.minecraft.class_27 cannot be cast to class com.sk89q.worldedit.fabric.mixin.AccessorLevelProperties (net.minecraft.class_27 and com.sk89q.worldedit.fabric.mixin.AccessorLevelProperties are in unnamed module of loader net.fabricmc.loader.launch.knot.KnotClassLoader @141e5bef)
at com.sk89q.worldedit.fabric.FabricWorld.doRegen(FabricWorld.java:324)
at com.sk89q.worldedit.fabric.FabricWorld.regenerate(FabricWorld.java:310)
... 32 more
16:03:37.288
net.minecraft.class_338
Render thread
[CHAT] Please report this error: [See console]
16:03:37.289
net.minecraft.class_338
Render thread
[CHAT] java.lang.IllegalStateException: Regen failed

Closing comment (2021-11-14T00:09:26Z): Duplicate of #1923