2024-12-15 02:57:06|Myriagame |source:minecraft skins
Overview
This module is the Fabric transplant version of the NoteBlock API plug -in, which can play the sound of the .nbs file in the notes box.Due to some restrictions, this module cannot fully realize the function of the original plug -in.Here is the Spigot website of the NoteBlock API.This module can only be used on the server or single -person world.
Use
Add to module
Use this API in other modules, you need to add the Modrinth repository to the module front of the module file in the module.For example, the following code needs to replace Version_tag to the latest version such as 0.1.0+1.19.
repositories {maven {url "https://api.modrinth.com/maven" content {infludegroup "maven.modrinth"}}} dependencies {Modimplemen TATION Include ("Maven.modrinth: Nota: Version_tag")}
Get .nbs file
You need to convert the .midi file of the song to the. NBS file. The method recommended by the author is the editor of the Note Block Studio.
Play songs
You must first load songs in the. NBS format in the module before playing it in the game. The loading method is as follows, and these songs are defined in the module.
song song = nbsdecoder.parse (new file ("path 1.nbs"); song song2 = nbsdecoder.parse (new file ("path 2.nbs")); ...… Playlist playlist = New PlayList (Song, Song2, ...);
It can make the song playback event divided into three types, divided into broadcast, position range playback, and physical range playback.
The music radio will play music for all players in the whole service. No matter where they are, the way of use is as follows.
song song; // Load the song Radiosongplayer RSP = New Radiosongplayer (Song); // Create a music radio event RSP.Setid (New Identifier ("Example: radio "); //Set the identifier, not the necessary RSP.addplayer (player); // Add the player to the song to listen to RSP.SetPlaying (true); // Play
Position playback will play songs to all players within a certain specified range.
song song; Positionsongplayer PSP = New Positionsongplayer (Song); // Create a radio event PSP.Setid (New Identifier ("Example: position "); PSP.SetBlockpos (POS); // Set the position of music playback PSP.SetDistance (16); // Set up music to be heard by the player's maximum distance psp.addplayer (player); psp.setplaying (true);A certain range of players in a certain range of players play music.
song song; EntitySongplayer ESP = New EntitySongPlayer (Song); // Create a physical range broadcast event ESP.Setid (New Identifier ("Example: E ntity ");); // Set the physical ESP.SetDistance (16); // Set the maximum distance of ESP.Addplayer (player) that can be heard by the player;
National Service DNF Dark Ni
2025-01-28 09:19:27The new screenshot of the be
2025-01-28 09:18:57The 15th anniversary wallpap
2025-01-28 09:18:273DM Xuanyuan Sinicization Gr
2025-01-28 09:17:57French magazine is the first
2025-01-28 09:17:27The sneak game "Republic" wi
2025-01-28 09:16:57
The story between humans and
2025-01-28 09:16:27
Capture "Trinity 3: Artifact
2025-01-28 09:15:27
Wind direction change "Myste
2025-01-28 09:14:57DICE's new project "Dream" w
2025-01-28 09:14:27
Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:27
Pirate Minecraft Skins
Minecraft Skins
2024-12-10 04:11:26
Master Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25
King Minecraft Skins
Minecraft Skins
2024-12-10 04:11:25
Guide Minecraft Skins
Minecraft Skins
2024-12-10 04:11:24
Dark Knight Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23
Sparta Minecraft Skins
Minecraft Skins
2024-12-10 04:11:23
Moncraft Skins of the War
Minecraft Skins
2024-12-10 04:11:22
Red Witch Minecraft Skins
Minecraft Skins
2024-12-10 04:11:22
Golden Cavaliers Minecraft S
Minecraft Skins
2024-12-10 04:11:22