Class KubeFileResourcePack

java.lang.Object
dev.latvian.mods.kubejs.script.data.KubeFileResourcePack
All Implemented Interfaces:
AutoCloseable, net.minecraft.server.packs.PackResources, net.neoforged.neoforge.common.extensions.IPackResourcesExtension

public class KubeFileResourcePack extends Object implements net.minecraft.server.packs.PackResources
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.minecraft.server.packs.PackResources

    net.minecraft.server.packs.PackResources.ResourceOutput
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final net.minecraft.server.packs.PackLocationInfo
     

    Fields inherited from interface net.minecraft.server.packs.PackResources

    METADATA_EXTENSION, PACK_META
  • Constructor Summary

    Constructors
    Constructor
    Description
    KubeFileResourcePack(net.minecraft.server.packs.PackType t)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    static int
    findAfterModsIndex(List<net.minecraft.server.packs.PackResources> packs)
     
    static int
    findBeforeModsIndex(List<net.minecraft.server.packs.PackResources> packs)
     
    void
    generate(Map<net.minecraft.resources.ResourceLocation,GeneratedData> map)
     
    Map<net.minecraft.resources.ResourceLocation,GeneratedData>
     
    <T> T
    getMetadataSection(net.minecraft.server.packs.metadata.MetadataSectionSerializer<T> serializer)
     
    @NotNull Set<String>
    getNamespaces(net.minecraft.server.packs.PackType type)
     
    @Nullable net.minecraft.server.packs.resources.IoSupplier<InputStream>
    getResource(net.minecraft.server.packs.PackType type, net.minecraft.resources.ResourceLocation location)
     
    @Nullable GeneratedData
     
    void
    listResources(net.minecraft.server.packs.PackType type, String namespace, String path, net.minecraft.server.packs.PackResources.ResourceOutput visitor)
     
    net.minecraft.server.packs.PackLocationInfo
     
    @NotNull String
     
    static void
    scanAndLoad(Path path, List<net.minecraft.server.packs.PackResources> packs)
     
    static void
    scanForInvalidFiles(String pathName, Path path)
     
    protected boolean
     
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface net.neoforged.neoforge.common.extensions.IPackResourcesExtension

    isHidden

    Methods inherited from interface net.minecraft.server.packs.PackResources

    knownPackInfo
  • Field Details

    • PACK_LOCATION_INFO

      public static final net.minecraft.server.packs.PackLocationInfo PACK_LOCATION_INFO
  • Constructor Details

    • KubeFileResourcePack

      public KubeFileResourcePack(net.minecraft.server.packs.PackType t)
  • Method Details

    • scanForInvalidFiles

      public static void scanForInvalidFiles(String pathName, Path path) throws IOException
      Throws:
      IOException
    • findBeforeModsIndex

      public static int findBeforeModsIndex(List<net.minecraft.server.packs.PackResources> packs)
    • findAfterModsIndex

      public static int findAfterModsIndex(List<net.minecraft.server.packs.PackResources> packs)
    • scanAndLoad

      public static void scanAndLoad(Path path, List<net.minecraft.server.packs.PackResources> packs)
    • getRootResource

      @Nullable public @Nullable GeneratedData getRootResource(String... path)
      Specified by:
      getRootResource in interface net.minecraft.server.packs.PackResources
    • getGenerated

      public Map<net.minecraft.resources.ResourceLocation,GeneratedData> getGenerated()
    • skipFile

      protected boolean skipFile(GeneratedData data)
    • getResource

      @Nullable public @Nullable net.minecraft.server.packs.resources.IoSupplier<InputStream> getResource(net.minecraft.server.packs.PackType type, net.minecraft.resources.ResourceLocation location)
      Specified by:
      getResource in interface net.minecraft.server.packs.PackResources
    • generate

      public void generate(Map<net.minecraft.resources.ResourceLocation,GeneratedData> map)
    • listResources

      public void listResources(net.minecraft.server.packs.PackType type, String namespace, String path, net.minecraft.server.packs.PackResources.ResourceOutput visitor)
      Specified by:
      listResources in interface net.minecraft.server.packs.PackResources
    • getNamespaces

      @NotNull public @NotNull Set<String> getNamespaces(net.minecraft.server.packs.PackType type)
      Specified by:
      getNamespaces in interface net.minecraft.server.packs.PackResources
    • getMetadataSection

      @Nullable public <T> T getMetadataSection(net.minecraft.server.packs.metadata.MetadataSectionSerializer<T> serializer) throws IOException
      Specified by:
      getMetadataSection in interface net.minecraft.server.packs.PackResources
      Throws:
      IOException
    • packId

      @NotNull public @NotNull String packId()
      Specified by:
      packId in interface net.minecraft.server.packs.PackResources
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface net.minecraft.server.packs.PackResources
    • location

      public net.minecraft.server.packs.PackLocationInfo location()
      Specified by:
      location in interface net.minecraft.server.packs.PackResources
    • toString

      public String toString()
      Overrides:
      toString in class Object