# Add songlist for internet speaker

Version 1.2.1 and above added function for internet speaker, you can use NetEase Music playlist API, to show the corresponding playlist ingame, to play the corresponding songs.

Recently NetEase Music changed songlist API, so by default each playlist can only read 10 songs, take note when using it.


# Note when adding playlist

  • This description applies to Touhou Little Maid mod version 1.2.1 and above;
  • Adding playlist requires certain understanding of vanilla resource pack structure;
  • Requires basic understanding of JSON format;
  • after loading the resource pack with the playlist, you need to restart the game to apply the playlist!

# Playlist creation

  1. First, create vanilla resource pack with the following structure
Resource pack folder   (Name as you like, best named in English)
├─pack.mcmeta   (Vanilla resource pack description file, fixed name and location)
└─assets    (Resource folder, fixed name and location)
    └─touhou_little_maid  (Must be named as such)
        └─music.json   (Playlist description file, fixed name and location)
  1. Write the music.json file as follow
    "site": "netease",          // Must be this name
    "creator": "tartaric_acid", // Playlist creator
    "version": "1.0.0",         // Playlist version, put any value
    "date": "",                 // Playlist creation date, put any value
    "desc": "",                 // Playlist description, put any value
    "content": {
      "play_list": [
        697893402,  // Playlist id, obtain it through the web version url
        5023067663  // You can add multiple playlist, no restriction
  1. Put the completed resource into the game's resource pack folder, load it ingame. After loading is complete, restart the game.


# Why do you want to add a playlist through resource pack?

We want to give some convenience to the maid model resource pack authors, they can add playlist while creating the resource packs for maid models, and share it to players who download said resource pack, think of it as a bonus for them.

# Why would you need to restart the game after loading the playlist?

Restart the game to load the playlist is to reduce the frequency to get NetEase Music playlist API, NetEase Music playlist API put a hard limit to request frequency, if you request it too often, it will cause your IP to be banned.
If we design it to request the playlist during resource pack reload, then everytime the player switch language or rendering options it will try to request again for the playlist, which increase the request frequency, which is dangerous.

# Wait, I saw your playlist is using files of the same path and the same name, won't that override other playlist in another resource packs?

Don't worry, as long as the resource pack is loaded, all the playlist will be recorded, there is no concern of overriding. This is different to vanilla Minecraft's texture reload mechanism!