Package org.moddingx.libx.datapack
Class DatapackHelper
java.lang.Object
org.moddingx.libx.datapack.DatapackHelper
Adds some utilities for creating custom dynamic datapacks.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic net.minecraft.server.packs.resources.IoSupplier<InputStream>
generatePackMeta
(net.minecraftforge.forgespi.locating.IModFile file, String description, net.minecraft.server.packs.PackType packType) Creates a supplier that can be repeatedly called to create newInputStream
s for a dynamically generatedpack.mcmeta
based on the given mod file.static String
registryPath
(net.minecraft.resources.ResourceKey<?> key) Gets the path for a registry element inside a datapack.
-
Field Details
-
GSON
-
-
Constructor Details
-
DatapackHelper
public DatapackHelper()
-
-
Method Details
-
registryPath
Gets the path for a registry element inside a datapack. For example for the keyminecraft:worldgen/biome libx:some_biome
, this would belibx/worldgen/biome/some_biome.json
-
generatePackMeta
public static net.minecraft.server.packs.resources.IoSupplier<InputStream> generatePackMeta(net.minecraftforge.forgespi.locating.IModFile file, String description, net.minecraft.server.packs.PackType packType) Creates a supplier that can be repeatedly called to create newInputStream
s for a dynamically generatedpack.mcmeta
based on the given mod file.
-