From ccb4c8f637226b17c80eba99e9b72735212cb8cc Mon Sep 17 00:00:00 2001 From: hhhzzzsss Date: Sat, 3 Aug 2024 23:35:01 -0500 Subject: [PATCH] Updated command descriptions --- README.md | 49 ++++++++++++++++--- .../songplayer/CommandProcessor.java | 12 ++--- 2 files changed, 47 insertions(+), 14 deletions(-) diff --git a/README.md b/README.md index 68c482f..ce444ac 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # SongPlayer A Fabric mod for Minecraft that plays songs with noteblocks. -The current version is for Minecraft 1.20.5 - 1.20.6. +The current version is for Minecraft 1.21 # How to install You can grab the mod jar from releases section. @@ -25,6 +25,11 @@ All the commands are case insensitive. If no arguments are given, lists all SongPlayer commands. Otherwise, explains the specified command and shows its syntax. +### $setPrefix \ +*aliases: `$prefix`* + +Sets the prefix used for all SongPlayer commands (by default: `$`) + ### $play \ Plays a particular midi from the .minecraft/songs folder, or, if a url is specified, downloads the song at that url and tries to play it. @@ -52,6 +57,12 @@ Gets the status of the current song that is playing. Shows all the songs in the queue. +### $songs +### $songs \ +*aliases: `$list`* + +If no arguments are given, lists songs in the `songs` folder. Otherwise, lists songs in the specified subdirectory. + ### $playlist play \ ### $playlist create \ ### $playlist list \[\] @@ -64,12 +75,6 @@ Shows all the songs in the queue. Create, edit, delete, or play playlists. You can also toggle looping or shuffling. -### $songs -### $songs \ -*aliases: `$list`* - -If no arguments are given, lists songs in the `songs` folder. Otherwise, lists songs in the specified subdirectory. - ### $setCreativeCommand \ *aliases: `$sc`* @@ -86,7 +91,7 @@ However, /gms does not work on all servers. If the survival command is different, set it with this command. For example, if the server uses vanilla commands, do `$setSurvivalCommand /gamemode survival`. -### $useVanillaCommands +### $useEssentialsCommands *aliases: `$essentials`, `$useEssentials`, `$essentialsCommands`* Switch to using Essentials gamemode commands. @@ -118,6 +123,25 @@ Sets the type of noteblock stage to build. Thanks Sk8kman and Lizard16 for the s Toggles whether you swing your arm when hitting a noteblock and rotate to look at the noteblocks you are hitting. +### $setVelocityThreshold +*aliases: `$velocityThreshold` `$threshold`* + +Sets the minimum velocity below which notes won't be played (applies to midi and nbs). This must be a number from 0 to 100. For song items, the threshold is baked in upon item creation. + +### $toggleAutoCleanup +*aliases: `$autoCleanup`* + +Toggles whether you automatically clean up your stage and restore the original blocks after playing. + +### $cleanupLastStage + +Cleans up the most recent stage that you made and does its best to restore the blocks to their original state. + +If you stop playing and start playing again, the recorded modifications gets reset. + +Will not replace fluids or double blocks such as doors, and does not replace tile entity data. +May not properly handle blocks that rest on other blocks such as torches, either. + ### $announcement \ ### $announcement setMessage @@ -134,6 +158,15 @@ Encodes song data into an item. When you right click on such an item, SongPlayer It will automatically generate custom item names and lore, but these can be modified or deleted without affecting the song data, so feel free to edit the items as you wish. SongPlayer only looks at the `SongItemData` tag. +### $toggleSurvivalOnly +*aliases: `$survivalOnly`* + +Enables or disables survival-only mode, in which automatic noteblock placement is disabled and automatic tuning is done by right-clicking. + +In this mode, you must place the necessary instruments yourself. + +If you try to play a song and the requirements are not met, it will tell you how many instruments of each type you need. + ### $testSong A command I used for testing during development. It plays all 400 possible noteblock sounds in order. diff --git a/src/main/java/com/github/hhhzzzsss/songplayer/CommandProcessor.java b/src/main/java/com/github/hhhzzzsss/songplayer/CommandProcessor.java index d744738..ea140a5 100644 --- a/src/main/java/com/github/hhhzzzsss/songplayer/CommandProcessor.java +++ b/src/main/java/com/github/hhhzzzsss/songplayer/CommandProcessor.java @@ -55,11 +55,11 @@ public class CommandProcessor { commands.add(new setStageTypeCommand()); commands.add(new toggleMovementCommand()); commands.add(new setVelocityThresholdCommand()); - commands.add(new toggleAutoCleanup()); + commands.add(new toggleAutoCleanupCommand()); commands.add(new cleanupLastStageCommand()); commands.add(new announcementCommand()); commands.add(new songItemCommand()); - commands.add(new toggleSurvivalOnly()); + commands.add(new toggleSurvivalOnlyCommand()); commands.add(new testSongCommand()); for (Command command : commands) { @@ -959,7 +959,7 @@ public class CommandProcessor { return new String[]{"velocityThreshold", "threshold"}; } public String[] getSyntax() { - return new String[] {""}; + return new String[] {""}; } public String getDescription() { return "Sets the minimum velocity below which notes won't be played (applies to midi and nbs). This must be a number from 0 to 100. For song items, the threshold is baked in upon item creation."; @@ -985,7 +985,7 @@ public class CommandProcessor { } } - private static class toggleAutoCleanup extends Command { + private static class toggleAutoCleanupCommand extends Command { public String getName() { return "toggleAutoCleanup"; } @@ -1202,7 +1202,7 @@ public class CommandProcessor { } } - private static class toggleSurvivalOnly extends Command { + private static class toggleSurvivalOnlyCommand extends Command { public String getName() { return "toggleSurvivalOnly"; } @@ -1213,7 +1213,7 @@ public class CommandProcessor { return new String[0]; } public String getDescription() { - return "Enables or disables survival-only mode, in which automatic noteblock placement is disabled and automatic tuning is done by right-clicking.."; + return "Enables or disables survival-only mode, in which automatic noteblock placement is disabled and automatic tuning is done by right-clicking."; } public boolean processCommand(String args) { if (args.length() == 0) {