Class PackTarget

java.lang.Object
org.moddingx.libx.datagen.PackTarget

public class PackTarget extends Object
A pack target contains output paths for the different pack types. It also maintains a set of registries that can be populated during the matching stages. A pack target does not need to support output on all pack types. A pack target can have other pack targets as parents, which makes it inherit their registry values.
  • Method Details

    • name

      public String name()
      The name of the pack target.
    • system

      public DatagenSystem system()
      The DatagenSystem associated with this pack target.
    • registries

      public RegistrySet registries()
      Provides access to the pack targets registries.
    • outputMap

      public Map<net.minecraft.server.packs.PackType,Path> outputMap()
    • path

      public Path path(net.minecraft.server.packs.PackType type)
      Gets the output path for this pack target.
    • find

      public PackTarget.Resource find(net.minecraft.server.packs.PackType type, net.minecraft.resources.ResourceLocation resourceId) throws FileNotFoundException
      Finds an existing resource in this pack target. Resources can only be located in pack types, where this pack target supports output.
      Throws:
      FileNotFoundException
    • packOutput

      public net.minecraft.data.PackOutput packOutput()
      Wraps the pack target as a vanilla PackOutput.