Skip to content

Commit

Permalink
Fix if statements removing the next instruction if the condition fails
Browse files Browse the repository at this point in the history
  • Loading branch information
GearsDatapacks committed Jan 30, 2023
1 parent add80b1 commit 7939426
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion data/bot/functions/golem/execution/if.mcfunction
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function bot:golem/evaluate
execute store result score .condition bot.execution.variables run data get storage bot:io Out.value

#codeBlock
execute on passengers as @s[type=marker,tag=bot.golem.brain] run data remove entity @s data.RunRootStack[-1].value[0]
execute unless score .condition bot.execution.variables matches 0 on passengers as @s[type=marker,tag=bot.golem.brain] run data remove entity @s data.RunRootStack[-1].value[0]
execute unless score .condition bot.execution.variables matches 0 on passengers as @s[type=marker,tag=bot.golem.brain] run data modify entity @s data.RunRootStack append from storage bot:program Current.args[1]
# This gets removed immediately
execute unless score .condition bot.execution.variables matches 0 on passengers as @s[type=marker,tag=bot.golem.brain] run data modify entity @s data.RunRootStack[-1].value prepend value {}

0 comments on commit 7939426

Please sign in to comment.