execute as @e[type=axolotl,tag=tf2.new,tag=tf2.no_respawn] expand {
tf2.batch_number:@s = execute on passengers
run tf2.batch_number:@s
= index::i * 1.0;
team join player_motion.no_collide;
tag @s remove tf2.new;
}
Expected behavior [A clear and concise description of what you expected to happen.]
I expected it to compile to
execute as @e[type=axolotl,tag=tf2.new,tag=tf2.no_respawn] store result score @s tf2.batch_number on passengers store result score @s tf2.batch_number run data get storage tf2:index i 1.0
execute as @e[type=axolotl,tag=tf2.new,tag=tf2.no_respawn] run team join player_motion.no_collide
execute as @e[type=axolotl,tag=tf2.new,tag=tf2.no_respawn] run tag @s remove tf2.new
Actual behavior
Instead, it compiles to
execute as @e[type=axolotl,tag=tf2.new,tag=tf2.no_respawn] run execute store result score @s tf2.batch_number on passengers store result score @s tf2.batch_number run data get storage tf2:index i 1.0
execute as @e[type=axolotl,tag=tf2.new,tag=tf2.no_respawn] run team join player_motion.no_collide
execute as @e[type=axolotl,tag=tf2.new,tag=tf2.no_respawn] run tag @s remove tf2.new
Note how the first line contains a useless run execute.
Describe the bug
The following code segment will have a
run execute
in the compiled output, which should be optimized out.To Reproduce [Steps to reproduce the behavior]
Compile the following code in JMC or on try-out
Expected behavior [A clear and concise description of what you expected to happen.]
I expected it to compile to
Actual behavior
Instead, it compiles to
Note how the first line contains a useless
run execute
.Screenshots
Desktop