-
Bug
-
Resolution: Invalid
-
None
-
Minecraft 1.12.2
-
None
-
Windows 7 x64
Java 8.91 (build 1.8.0_91-b14)
Minecraft Server v1.12.2 (origin)
Minecraft v1.12.2 (no mod, no plugin)
-
Unconfirmed
Hello,
since you've added the functions the game is more attractive when it comes to creating an adventure or creating invisible mechanisms of reduced size. However, i realize that the TestFor command is extremely lacking in functions.
Physically (it works):
(displays mob detected if there is a mob)
repeating_command_block > testfor @a[type=!Player,r=3]
unpowered_comparator
say Mob Detected !
With a function (it does not work):
(displays mob detected even if there is no mob)
testfor @a[type=!Player,r=3]
say Mob Detected !
Look at this link, it's a system that I have to physically create somewhere on the map while the rest of the scenario is invisible function to create a mechanism
An example of what will save the physical creation of thirty orders...
Command TestFor in a function file "testfor.mcfunction" on 1.13 :
# New system for store and read variables !!! set msg "MobDetected" testfor @a[type=!Player,r=3] { say %msg% within a radius of 3 ! }
Open & execute in loop all the 20 ticks (1sec): functionloop testfor 20
Stop loop & Close: functionloop testfor -1
You can add a parameter to set the tick of the flow within a function. Or else, integrate the TestFor command with the same Tick as a repeating_command_block.....