Modern Modpacks
Hellish Mods
Hellish Mods
  • 👋Welcome!
  • 🧊KesseractJS
    • Creating fake mods
  • 💿Modern Custom Discs
    • Adding discs
  • ⌨️Digitality API
    • Introduction
    • Installing and initializing
    • Resource packs
      • Textures
      • Models
      • Sounds
      • Lang files
    • Data packs
      • Recipes
      • Tags
    • Custom assets
  • 🌐Website
  • 🍧Modern Modpacks Docs
Powered by GitBook
On this page
  1. Digitality API
  2. Resource packs

Sounds

PreviousModelsNextLang files

Last updated 2 years ago

There also exists different types of sounds but they're so similiar that they are all made with one method (similar to how work)

resources.sound(<Path/File object pointing to your .ogg sound file>, "<sound type (record/neutral/entity/etc.)>", "<internal resource name (optional)>");
// This code registers the "test.ogg" file in the game instance directory as a music disc sound 
VirtualResourcePack resources = new VirtualResourcePack("some_mod_id");
resources.sound(FMLPaths.GAMEDIR.get().resolve("test.ogg"), "record");

Note: Don't forget to also register your sound with <sound event register>.register("<some name>", () -> new SoundEvent(new ResourceLocation("<mod id>", "<file name without the .ogg>")));

⌨️
textures