-
Bug
-
Resolution: Works As Intended
-
None
-
Minecraft 1.12 Pre-Release 1, Minecraft 1.12 Pre-Release 2
-
Confirmed
The bug
The gameLoopFunction function runs after entities were updated while command blocks run before entities are updated. This makes it difficult to convert command block commands to function commands and vice versa.
How to reproduce
- Place a repeating command block with the following command
/scoreboard players tag @e add hurt {HurtTime:10s}
- Place two always active chain command blocks with the following commands behind it
/say @e[tag=hurt] /scoreboard players tag @e[tag=hurt] remove hurt
- Power the repeating command block and hit a mob
→ The command block says the name of the mob you hit - Place the attached function hurt_test.txt in the following directory of your world folder
data/functions/custom
- Set the function custom:hurt_test as gameLoopFunction
/gamerule gameLoopFunction custom:hurt_test
- Hit a mob
→ The function does not say the name of the mob; changing the NBT test to HurtTime:9s solves this