SongPlayer/README.md

155 lines
6.4 KiB
Markdown
Raw Normal View History

2020-08-09 22:24:16 -04:00
# SongPlayer
2022-07-04 22:31:17 -04:00
A Fabric mod for Minecraft that plays songs with noteblocks.
2023-06-18 23:04:11 -04:00
The current version is for Minecraft 1.20-1.20.1
2021-06-23 01:28:38 -04:00
2022-07-04 22:31:17 -04:00
# How to install
You can grab the mod jar from releases section.
2021-06-23 01:28:38 -04:00
This mod requires fabric api.
2020-08-09 23:42:08 -04:00
2020-08-09 23:42:18 -04:00
# Adding songs
2022-07-04 22:31:17 -04:00
You can put midis or NoteBlockStudio files in the `.minecraft/songs` folder.
SongPlayer supports any valid midi and all versions of NBS files.
2020-08-16 23:25:24 -04:00
# Using the client
2022-07-04 22:31:17 -04:00
To get started, add some midis or nbs files to your songs folder, and use `$play <filename>` in an open area.
2023-06-18 23:04:11 -04:00
Spaces are not supported in filenames or filepaths.
2022-07-04 22:31:17 -04:00
If you have provided it a valid midi or nbs file, it will try to set your gamemode to creative, place the required noteblocks for the song, try to switch you to survival, then start playing.
2023-06-18 23:04:11 -04:00
You can also organize songs into subdirectories in your songs folder. Tab completion will make it easy to navigate. Symlinked directories are supported too.
2022-07-04 22:31:17 -04:00
# Commands
2021-06-23 01:28:38 -04:00
All the commands are case insensitive.
2022-07-04 22:31:17 -04:00
### $help
### $help \<command>
2023-06-18 23:04:11 -04:00
If no arguments are given, lists all SongPlayer commands.
Otherwise, explains the specified command and shows its syntax.
2021-06-23 01:28:38 -04:00
2022-07-04 22:31:17 -04:00
### $play \<filename or url>
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.
If there is a song already playing, the new song will be added to the queue.
2021-06-23 01:28:38 -04:00
2022-07-04 22:31:17 -04:00
### $stop
Stops playing/building and clears the queue.
2021-06-23 01:28:38 -04:00
2022-07-04 22:31:17 -04:00
### $skip
2023-06-18 23:04:11 -04:00
Skips the current song and goes to the next one.
2021-06-23 01:28:38 -04:00
2022-07-04 22:31:17 -04:00
### $goto \<mm:ss>
2021-06-23 01:28:38 -04:00
Goes to a specific time in the song.
2022-07-04 22:31:17 -04:00
### $loop
2021-06-23 01:28:38 -04:00
Toggles song looping.
2022-07-04 22:31:17 -04:00
### $status
*aliases: `$current`*
Gets the status of the current song that is playing.
### $queue
*aliases: `$showqueue`*
Shows all the songs in the queue.
2023-06-18 23:04:11 -04:00
### $playlist play \<playlist>
### $playlist create \<playlist>
### $playlist list \[\<playlist>]
### $playlist delete \<playlist> \<song>
### $playlist addSong \<playlist> \<song>
### $playlist removeSong \<playlist> \<song>
### $playlist renameSong \<playlist> \<old name> \<new name>
### $playlist loop
### $playlist shuffle
Create, edit, delete, or play playlists. You can also toggle looping or shuffling.
2022-07-04 22:31:17 -04:00
### $songs
2023-06-18 23:04:11 -04:00
### $songs \<subdirectory>
2022-07-04 22:31:17 -04:00
*aliases: `$list`*
2021-06-23 01:28:38 -04:00
2023-06-18 23:04:11 -04:00
If no arguments are given, lists songs in the `songs` folder. Otherwise, lists songs in the specified subdirectory.
2021-06-23 01:28:38 -04:00
2022-07-04 22:31:17 -04:00
### $setCreativeCommand \<command>
*aliases: `$sc`*
By default, the client uses /gmc to go into creative mode.
However, /gmc does not work on all servers.
If the creative command is different, set it with this command.
For example, if the server uses vanilla commands, do `$setCreativeCommand /gamemode creative`.
### $setSurvivalCommand \<command>
*aliases: `$ss`*
2021-06-23 01:28:38 -04:00
2022-07-04 22:31:17 -04:00
By default, the client uses /gms to go into survival mode.
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
*aliases: `$essentials`, `$useEssentials`, `$essentialsCommands`*
Switch to using Essentials gamemode commands.
Equivalent to `$setCreativeCommand /gmc` and `$setSurvivalCommand /gms`
### $useVanillaCommands
*$aliases: `$vanilla`, `$useVanilla`, `$vanillaCommands`*
Switch to using vanilla gamemode commands.
Equivalent to `$setCreativeCommand /gamemode creative` and `$setSurvivalCommand /gamemode survival`
### $toggleFakePlayer
*aliases: `$fakePlayer`, `$fp`*
2021-06-23 01:28:38 -04:00
2021-07-01 19:58:52 -04:00
Toggles whether a fake player will show up to represent your true position while playing a song. When playing a song, since it automatically enables freecam, your true position will be different from your apparent position. The fake player will show where you actually are. By default, this is disabled.
2021-06-23 01:28:38 -04:00
2023-06-18 23:04:11 -04:00
### $setStageType \<DEFAULT | WIDE | SPHERICAL>
*aliases: `$setStage`, `$stageType`*
Sets the type of noteblock stage to build. Thanks Sk8kman and Lizard16 for the spherical stage design!
- Default: A square shaped stage with a maximum of 300 noteblocks
- Wide: A cylindrical stage with a maximum of 360 noteblocks
- Spherical: A densely packed spherical stage that can contain all 400 possible noteblocks
2023-06-22 02:12:56 -04:00
### $toggleMovement \<swing | rotate>
2023-06-18 23:04:11 -04:00
*aliases: `$movement`*
Toggles whether you swing your arm when hitting a noteblock and rotate to look at the noteblocks you are hitting.
2023-06-22 02:12:56 -04:00
### $announcement \<enable | disable | getMessage>
### $announcement setMessage
Set an announcement message that is sent when you start playing a song.
With setMessage, write `[name]` where the song name should go.
Example: `$announcement setMessage &6Now playing: &3[name]`
2023-06-18 23:04:11 -04:00
### $songItem create \<song or url>
### $songItem setSongName \<name>
*aliases: `$item`*
Encodes song data into an item. When you right click on such an item, SongPlayer will automatically detect that it is a song item and ask if you want to play it. These items, once created, can be used by anyone that is using the necessary version of 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.
2022-07-04 22:31:17 -04:00
### $testSong
2023-06-18 23:33:50 -04:00
A command I used for testing during development.
2023-06-18 23:04:11 -04:00
It plays all 400 possible noteblock sounds in order.
2022-07-04 22:31:17 -04:00
2021-06-23 01:28:38 -04:00
# Mechanism
2023-06-18 23:04:11 -04:00
SongPlayer places noteblocks with nbt and instrument data already in them, so the noteblocks do not need to be individually tuned.
2021-06-23 01:28:38 -04:00
2023-06-18 23:04:11 -04:00
The client will automatically detect what noteblocks are needed and place them automatically before each song is played, which makes playing songs quite easy. The only drawback is that you need to be able to switch between creative and survival mode, which my client will attempt to do automatically.
2020-08-16 23:27:40 -04:00
2021-06-23 01:28:38 -04:00
When playing a song, freecam is enabled. You will be able to move around freely, but in reality you are only moving your camera while your player stays at the center of the noteblocks. This is because noteblocks can only be played if you're within reach distance of them, so you have to stand at the center of the noteblocks to play them, but it's still nice to be able to move around while your song is playing.
2023-06-18 23:04:11 -04:00
## Acknowledgements
**Ayunami2000**: Came up with the concept of directly placing noteblocks with nbt data instead of manually tuning them.
**Sk8kman**: Several of Songplayer 3.0's changes were inspired by their fork of SongPlayer. Most notably was their alternate stage designs, but it also motivated me to implement playlists and togglable movements.
**Lizard16**: Cited by Sk8kman as the person who made the spherical stage design.