Mojira Archive
MCPE-170091

"if block" and "unless block" don't work properly when using /execute in mcfunction files

Hi Mojang

I'm making an addon and I would like to run a command when the player walks on certain blocks. I'm using the /execute command with the new syntax, but it seems that "if" and "unless" don't work as intended : when using "if/unless block" the command will either ignore it and always run or stop working even when the conditions are matched.

It works fine with "if score" though, and i don't understand why.

My addon min engine is above 1.19.50 so the new syntax is the one to use.

I ran some tests you can find below :

1- The command should run when I'm standing in water but doesn't

2- The command should run only if i'm standig in an air block, but still works when I'm in a block of stone

 

I tried these commands directly in the game an they worked so i guess it's not the syntax...

 

I hope you will be able to help me soon, thanks !

Cannot Reproduce

Jean Hubert Gazon

2023-04-29, 02:31 PM

2023-05-16, 12:34 PM

2023-05-16, 12:34 PM

0

0

Plausible

1.19.81 Hotfix

-