Class DatapackHelper

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

public class DatapackHelper extends Object
Adds some utilities for creating custom dynamic datapacks.
  • Field Details

    • GSON

      public static final Gson GSON
  • Constructor Details

    • DatapackHelper

      public DatapackHelper()
  • Method Details

    • registryPath

      public static String registryPath(net.minecraft.resources.ResourceKey<?> key)
      Gets the path for a registry element inside a datapack. For example for the key minecraft:worldgen/biome libx:some_biome, this would be libx/worldgen/biome/some_biome.json
    • generatePackMeta

      public static net.minecraft.server.packs.resources.IoSupplier<InputStream> generatePackMeta(String description, net.minecraft.server.packs.PackType packType)
      Creates a supplier that can be repeatedly called to create new InputStreams for a dynamically generated pack.mcmeta.