
WASD Detection
Simple WASD Detection Predicates to use in command and Data Pack creations!
- Загрузки
- 660
- Подписчики
- 5
- Обновлён
- 31 августа 2024 г.
- Лицензия
- CC0-1.0
Опубликован 31 августа 2024 г.
WASD Detection
Accurate WASD detection for Minecraft datapacks.
Latest Data Pack version
1.4
Compatible Minecraft Versions
Java Edition 1.20.2 - 1.21 (Versions of the pack for 1.20.1 and 1.19.2 also available in versions)
How to Use the Data pack
(Full video explaination https://www.youtube.com/watch?v=DsjAlwNN2AQ)
The WASD detection works as an in-game predicate that can be accessed through /execute commands, and or player selectors.
/execute as @a if predicate wasd:w run say pressed w
/execute as @a[predicate=wasd:w] run say pressed w
Either of these will result in a message in chat saying "pressed w" when the player walks forward.
List of preciates
(All of these will have a prefix of wasd:)
wasd:w = if the player walks forward
wasd:a = if the player walks left
wasd:s = if the player walks right
wasd:d = if the player walks backward
wasd:moving = if the player pressed any of the four directions
wasd:space = if the player moves upward
wasd:falling = if the player moves downward
wasd:shift = if the player presses SHIFT
Lock the player's movement
If you want to lock the player from moving you will need to run this command:
/execute as @a run function wasd:lock
This will lock all players at their current positions.
If you want to lock the player at a specific location, then run this command:
/execute as @a postitioned <XYZ> rotated <Y ROTATION> <X ROTATION> run function wasd:lock
*Replacing <XYZ> with your desired coordinates, and <Y ROTATION> and <X ROTATION> with your desired rotations.
To unlock the players, run:
/execute as @a run function wasd:unlock
Installation
Method 1 (Pre-made world)
- Locate to your .minecraft/saves/<worldname>/datapacks folder.
- Paste the .zip file you installed into this folder.
- Enter your Minecraft world and type /reload.
- A message should pop up that says "Datapack Installed".
Method 2 (Create new world)
- In the Create new world screen, click the "Datapacks" button
- Drag and drop the .zip file you downloaded into the game window.
- Apply the datapack.~~~~
- Create new world.
Ченджлог
1.4Релиз1.20.6, 1.21, 1.21.1 · 31 августа 2024 г.
1.4 Changelog
Compatible versions: 1.20.2 - 1.21.1
- Pack.mcmeta's updated to 48.
- Changed datapack directories naming conventions from Plural to Singular following 1.21 requirements.
- Readded the resource pack to the zip folder (was missing from the previous version).
1.3Релиз1.20.4, 1.20.5, 1.20.6 · 31 августа 2024 г.
1.3 Changelog
Compatible versions: 1.20.2 - 1.20.6
- Pack.mcmeta's updated to 41.
- Fixed output messages for better multiplayer compatibility.
- Fixed collisions with players who are locked, and affect WASD detection by pushing the player.
1.2Релиз1.20.2, 1.20.3, 1.20.4 · 31 августа 2024 г.
1.2 Changelog
Compatible versions: 1.20.2 - 1.20.4
- Updated ActiveEffects to active_effects for new formatting.
- Pack.mcmeta's updated to 18 and added "supported_packs" field for compatibility of future game versions.
- Updated pack descriptions to be more readable.
- Changed ".hide_msg wasd" to instead be ".wasd hide_msg" so for future multi-pack compatibility.
1.1Релиз1.20, 1.20.1 · 31 августа 2024 г.
1.1 Changelog
Compatible versions: 1.20 - 1.20.1
- Updated "pack.mcmeta" numbers to 15 for 1.20 and 1.20.1 compatibility.
- Renamed "legacy" output to "fancy" (past me didn't know what "legacy" meant :P ).
- Added functions to easily change output method in-game.
- Fixed title command times so the title output isn't flashing.
- Changing output type now resets title times.
- Added "chat" output type for outputting WASD result to chat (hooray, more chat spam!).
- Fixed "sneak" and "shift" scoreboards not being removed when uninstalling datapack.
1.0Релиз1.19.2 · 31 августа 2024 г.
Version v1.0
Compatible with: 1.19.2
Комментарии
Загружаем…