Class DynamicPacks

java.lang.Object
org.moddingx.libx.datapack.DynamicPacks

public class DynamicPacks extends Object
This allows you to have multiple resource and datapacks in your mod file. While the main one is always loaded, you can load the other ones via enablePack(String, String). This should be called in your mods constructor. A dynamic resource pack must be located in libxassets/[name] inside your JAR file where [name] is the name of your dynamic resource pack. Inside this folder you can put the content that normally is in the assets folder. The resource pack is shown in the resource pack selection menu and can be activated based on the users preference. A pack.mcmeta file is not required and if you provide one it'll be ignored. A dynamic datapack must be located in libxdata/[name] inside your JAR file where [name] is the name of your dynamic datapack. Inside this folder you can put the content that normally is in the data folder. The datapack is automatically loaded without the need for the user to select it. A pack.mcmeta file is not required and if you provide one it'll be ignored. A dynamic pack may contain a file named description.txt on the root level to set its description.
  • Field Details

    • RESOURCE_PACKS

      public static final DynamicPacks RESOURCE_PACKS
    • DATA_PACKS

      public static final DynamicPacks DATA_PACKS
  • Method Details

    • enablePack

      public void enablePack(String modId, String packName)
      Enables a dynamic pack.
    • isEnabled

      public boolean isEnabled(String modId, String packName)
      Gets tests whether a dynamic pack is enabled.