• 11/29/21 11:20 am
- 8.1k views • 0 today
- save_alt 397 downloads
- Compatibility
- Minecraft 1.17
- to version
- Minecraft 1.18
- Changes include
- Functions
- Predicates
123
WASD Detection
This pack allows you to detect the WASD input keys from the player!
How to use:
Mounted WASD:
(for datapacks where @s is a player)
execute if predicate wasd:is_mounted run function wasd:mounted
execute if score .w wasd matches 1 run say w
(for command blocks or datapacks where @s is not yet the player)
execute as @a if predicate wasd:is_mounted run function wasd:mounted
execute as @a[tag=wasd.w] run say w
Walking WASD:
(for datapacks where @s is a player)
function wasd:walking
execute if score .w wasd matches 1 run say w
(for command blocks or datapacks where @s is not yet the player)
execute as @a run function wasd:walking
execute as @a[tag=wasd.w] run say w
Benefits:
- Detect WASD inputs either via tags or fake player scores (<- this one is more efficient)
- Very low command count and very very efficient / optimized
Drawback:
- Rarely, there is miss input
- First tick of input is usually going to be wrong
(but all subsequent key detections are more accurate than competitors)
For more info watch the video
Installation:
1) Download the .zip
2) Unpack the zip
3) drag the folder into your .minecraft/saves/(world_name)/datapacks folder
This pack allows you to detect the WASD input keys from the player!
How to use:
Mounted WASD:
(for datapacks where @s is a player)
execute if predicate wasd:is_mounted run function wasd:mounted
execute if score .w wasd matches 1 run say w
(for command blocks or datapacks where @s is not yet the player)
execute as @a if predicate wasd:is_mounted run function wasd:mounted
execute as @a[tag=wasd.w] run say w
Walking WASD:
(for datapacks where @s is a player)
function wasd:walking
execute if score .w wasd matches 1 run say w
(for command blocks or datapacks where @s is not yet the player)
execute as @a run function wasd:walking
execute as @a[tag=wasd.w] run say w
Benefits:
- Detect WASD inputs either via tags or fake player scores (<- this one is more efficient)
- Very low command count and very very efficient / optimized
Drawback:
- Rarely, there is miss input
- First tick of input is usually going to be wrong
(but all subsequent key detections are more accurate than competitors)
For more info watch the video
Installation:
1) Download the .zip
2) Unpack the zip
3) drag the folder into your .minecraft/saves/(world_name)/datapacks folder
More like this
5391199
119


Have something to say?