modify(e, 'home', x, y, z, distance) errors out with java.lang.IndexOutOfBoundsException
James103 opened this issue ยท 1 comments
Currently (Carpet Mod 1.3.20 and 1.3.22 in Minecraft 1.15), running the command modify(e, 'home', x, y, z, distance)
pretty much always fails with the following error:
[22:06:21] [Server thread/INFO]: [STDERR]: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4
[22:06:21] [Server thread/INFO]: [STDERR]: at java.util.ArrayList.rangeCheck(Unknown Source)
[22:06:21] [Server thread/INFO]: [STDERR]: at java.util.ArrayList.get(Unknown Source)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.value.EntityValue$4.lambda$new$27(EntityValue.java:807)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.value.EntityValue.set(EntityValue.java:496)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.CarpetExpression.lambda$API_EntityManipulation$206(CarpetExpression.java:1998)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.Expression$11.lazyEval(Expression.java:386)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.Expression.lambda$getAST$239(Expression.java:2288)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.Expression.lambda$UserDefinedFunctionsAndControlFlow$11(Expression.java:497)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.Expression$5.lazyEval(Expression.java:269)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.Expression.lambda$getAST$236(Expression.java:2253)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.Expression.evalValue(Expression.java:2210)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.Expression.eval(Expression.java:2203)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.Expression.eval(Expression.java:2195)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.script.CarpetExpression.scriptRunCommand(CarpetExpression.java:3172)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.commands.ScriptCommand.lambda$compute$59(ScriptCommand.java:443)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.commands.ScriptCommand.handleCall(ScriptCommand.java:386)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.commands.ScriptCommand.compute(ScriptCommand.java:441)
[22:06:21] [Server thread/INFO]: [STDERR]: at carpet.commands.ScriptCommand.lambda$register$14(ScriptCommand.java:104)
[22:06:21] [Server thread/INFO]: [STDERR]: at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:262)
[22:06:21] [Server thread/INFO]: [STDERR]: at com.mojang.brigadier.CommandDispatcher.execute(CommandDispatcher.java:176)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_2170.method_9249(class_2170.java:235)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3244.method_14370(class_3244.java:1083)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3244.method_12048(class_3244.java:1070)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_2797.method_12115(class_2797.java:36)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_2797.method_11054(class_2797.java:9)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_2600.method_11072(class_2600.java:21)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_3738.run(class_3738.java:18)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_18859(class_1255.java:144)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_4093.method_18859(class_4093.java:23)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_24306(MinecraftServer.java:743)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_18859(MinecraftServer.java:138)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_16075(class_1255.java:118)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_20415(MinecraftServer.java:725)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_16075(MinecraftServer.java:719)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.class_1255.method_18857(class_1255.java:127)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.method_16208(MinecraftServer.java:704)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.handler$zzm000$modifiedRunLoop(MinecraftServer.java:2406)
[22:06:21] [Server thread/INFO]: [STDERR]: at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:634)
[22:06:21] [Server thread/INFO]: [STDERR]: at java.lang.Thread.run(Unknown Source)
[22:06:21] [Server thread/INFO]: [Player: Error while evaluating expression: java.lang.IndexOutOfBoundsException: Index: 4, Size: 4 in system chat at pos 44]
[22:06:21] [Server thread/INFO]: [Player: aa = entity_selector('@e[type=zombie]'):0; HERE>> modify(aa, 'home', 0,64,0,8)]
[22:06:21] [Server thread/INFO]: [Player: Error while evaluating expression]
Workaround
Use modify(e, 'home', block(x, y, z), distance)
instead (wrap the x, y, z
in a block(...)
).
fixed in a4750f7