WorldEdit

WorldEdit

44M Downloads

//g parser results in error "java.lang.IllegalArgumentException: return types do not match: (ExecutionData)double, (ExecutionData)Double"

KingCreator11 opened this issue ยท 2 comments

commented

WorldEdit Version

Fabric-Official(7.2.13+46576cc)

Platform Version

Fabric 0.14.17

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

MC Version - 1.19.3
Fabric Version - 0.14.17
Fabric API Version - 0.73.0
Worldedit Version - Fabric-Official(7.2.13+46576cc)

(Note - I do have many other mods installed but I do doubt any of those other mods are causing this, if necessary I can provide a full list of my mods.)

When I select any area and run the following command: //g cyan_terracotta 1/200*round(sqrt(1/0.9*(x-0.1))/(1/200)) == y, I receive a console error and an error in chat indicating I should report it. Please close this if my expression above somehow caused the issue by being invalid, and this is intended behavior.

I've pasted the error log below:

[20:29:12] [Server thread/ERROR]: An unexpected error while handling a WorldEdit command
java.lang.IllegalArgumentException: return types do not match: (ExecutionData)double, (ExecutionData)Double
	at java.lang.invoke.MethodHandleStatics.newIllegalArgumentException(MethodHandleStatics.java:175) ~[?:?]
	at java.lang.invoke.MethodHandles.permuteArgumentChecks(MethodHandles.java:4975) ~[?:?]
	at java.lang.invoke.MethodHandles.permuteArguments(MethodHandles.java:4855) ~[?:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitFunctionCall(CompilingVisitor.java:597) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitFunctionCall(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$FunctionCallContext.accept(ExpressionParser.java:3129) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitFunctionCallExpr(ExpressionBaseVisitor.java:349) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$FunctionCallExprContext.accept(ExpressionParser.java:2937) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitPoFallthrough(ExpressionBaseVisitor.java:335) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$PoFallthroughContext.accept(ExpressionParser.java:2798) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitUaFallthrough(ExpressionBaseVisitor.java:307) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$UaFallthroughContext.accept(ExpressionParser.java:2652) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitPwFallthrough(ExpressionBaseVisitor.java:286) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$PwFallthroughContext.accept(ExpressionParser.java:2473) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluate(CompilingVisitor.java:105) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluateForNamedValue(CompilingVisitor.java:129) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluateForValue(CompilingVisitor.java:134) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluateBinary(CompilingVisitor.java:378) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluateBinary(CompilingVisitor.java:390) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitMultiplicativeExpr(CompilingVisitor.java:400) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitMultiplicativeExpr(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$MultiplicativeExprContext.accept(ExpressionParser.java:2326) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitAdFallthrough(ExpressionBaseVisitor.java:258) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$AdFallthroughContext.accept(ExpressionParser.java:2214) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitShFallthrough(ExpressionBaseVisitor.java:237) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$ShFallthroughContext.accept(ExpressionParser.java:2057) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitReFallthrough(ExpressionBaseVisitor.java:223) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$ReFallthroughContext.accept(ExpressionParser.java:1925) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitEqFallthrough(ExpressionBaseVisitor.java:216) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$EqFallthroughContext.accept(ExpressionParser.java:1822) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluate(CompilingVisitor.java:105) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluateForNamedValue(CompilingVisitor.java:129) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluateForValue(CompilingVisitor.java:134) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluateBinary(CompilingVisitor.java:377) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluateBinary(CompilingVisitor.java:390) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitEqualityExpr(CompilingVisitor.java:462) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitEqualityExpr(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$EqualityExprContext.accept(ExpressionParser.java:1803) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitCAFallthrough(ExpressionBaseVisitor.java:195) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$CAFallthroughContext.accept(ExpressionParser.java:1676) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitCOFallthrough(ExpressionBaseVisitor.java:181) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$COFallthroughContext.accept(ExpressionParser.java:1558) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitCEFallthrough(ExpressionBaseVisitor.java:167) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$CEFallthroughContext.accept(ExpressionParser.java:1453) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitAssignmentExpression(ExpressionBaseVisitor.java:146) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$AssignmentExpressionContext.accept(ExpressionParser.java:1277) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitExpression(ExpressionBaseVisitor.java:139) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$ExpressionContext.accept(ExpressionParser.java:1230) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.evaluate(CompilingVisitor.java:105) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitExpressionStatement(CompilingVisitor.java:262) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitExpressionStatement(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$ExpressionStatementContext.accept(ExpressionParser.java:1144) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitStatement(ExpressionBaseVisitor.java:34) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$StatementContext.accept(ExpressionParser.java:290) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitStatements(ExpressionBaseVisitor.java:27) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$StatementsContext.accept(ExpressionParser.java:199) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:657) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.CompilingVisitor.visitChildren(CompilingVisitor.java:81) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionBaseVisitor.visitAllStatements(ExpressionBaseVisitor.java:20) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.antlr.ExpressionParser$AllStatementsContext.accept(ExpressionParser.java:150) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.invoke.ExpressionCompiler.compileExpression(ExpressionCompiler.java:68) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.Expression.<init>(Expression.java:110) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.internal.expression.Expression.compile(Expression.java:76) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.EditSession.makeShape(EditSession.java:2180) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.command.GenerationCommands.generate(GenerationCommands.java:332) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.command.GenerationCommandsRegistration.cmd$_generate(GenerationCommandsRegistration.java:419) ~[worldedit-mod-7.2.13.jar:?]
	at org.enginehub.piston.CommandManager.execute(CommandManager.java:157) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.extension.platform.PlatformCommandManager.handleCommand(PlatformCommandManager.java:497) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.util.eventbus.MethodHandleEventHandler.dispatch(MethodHandleEventHandler.java:51) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.util.eventbus.EventHandler.handleEvent(EventHandler.java:73) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.util.eventbus.EventBus.dispatch(EventBus.java:193) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.util.eventbus.EventBus.post(EventBus.java:181) ~[worldedit-mod-7.2.13.jar:?]
	at com.sk89q.worldedit.fabric.CommandWrapper.lambda$register$0(CommandWrapper.java:64) ~[worldedit-mod-7.2.13.jar:?]
	at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:263) ~[brigadier-1.0.18.jar:?]
	at net.minecraft.class_2170.redirect$zzo000$architectury$performCommand(class_2170.java:545) ~[client-intermediary.jar:?]
	at net.minecraft.class_2170.method_9249(class_2170.java:279) ~[client-intermediary.jar:?]
	at net.minecraft.class_3244.method_45010(class_3244.java:1347) ~[client-intermediary.jar:?]
	at net.minecraft.class_3244.method_44356(class_3244.java:1327) ~[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:787) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:166) ~[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:769) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:763) ~[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:748) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.handler$zge000$carpet$modifiedRunLoop(MinecraftServer.java:3417) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_29741(MinecraftServer.java:655) ~[client-intermediary.jar:?]
	at net.minecraft.server.MinecraftServer.method_29739(MinecraftServer.java:264) ~[client-intermediary.jar:?]
	at java.lang.Thread.run(Thread.java:833) ~[?:?]
[20:29:12] [Render thread/INFO]: [CHAT] Please report this error: [See console]
[20:29:12] [Render thread/INFO]: [CHAT] java.lang.IllegalArgumentException: return types do not match: (ExecutionData)double, (ExecutionData)Double

Expected Behavior

To be able to run the command and have blocks generated when my expression is true without error.

Reproduction Steps

  1. Create a singleplayer world/open an existing world
  2. Select an area (using //pos1, //pos2 or wand, etc)
  3. Run the following command: //g cyan_terracotta 1/200*round(sqrt(1/0.9*(x-0.1))/(1/200)) == y

Anything Else?

Thank you so much for any help provided!

commented

Fixed in 237ebc1

commented

The specific part of your expression that was triggering this was the round call FYI, if you wanted to try working around it in the version you're currently using