Skip to content

Adding a Disc

Auxves edited this page Nov 18, 2022 · 7 revisions

Let's assume that your addon is called disco-example and the id of your new disc is new_disc. Replace these with the actual ones in the following steps.

fabric.mod.json

If this file doesn't already exist, create it at the root of the project with these contents

Add the id to the discs array as shown below:

{
    "schemaVersion": 1,
    "id": "disco-example",
    "version": "1.0.0",
    "name": "Disco Example",
    "description": "Example Disco addon",
    "custom": {
        "disco": {
            "discs": [
+               "new_disc"
            ],
            "tables": []
        }
    }
}

Audio

  1. Convert your audio to a .ogg file with one channel (mono)
  2. Place the file at assets/disco-example/sounds/new_disc.ogg

sounds.json

Add the following lines to assets/disco-example/sounds.json:

{
+   "new_disc": {
+       "category": "record",
+       "sounds": [{ "name": "disco-example:new_disc", "stream": true }]
+   }
}

Texture

Place your 16x16 sprite at assets/disco-example/textures/item/new_disc.png

Model

Create assets/disco-example/models/item/new_disc.json with the following contents:

{
    "parent": "item/generated",
    "textures": {
        "layer0": "disco-example:item/new_disc"
    }
}

Translations

Add the following line to assets/disco-example/lang/en_us.json:

{
+   "item.disco-example.new_disc.desc": "Artist - New Disc"
}

Make sure to add this to any other languages your addon supports

Clone this wiki locally