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 Link icon

    • name Link icon

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

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

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

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

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

      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 Link icon

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