API Surface (0) No public/protected methods detected (fields or constants only).
Fields & Constants (2) METADATA_EXTENSION
PACK_META
Code Graph: Dependencies (5) Edges (calls / imports / inherits / references) resolved by graphify from the AST. Every chip opens the class source.
Full Source
PackResources.java 39 lines · Minecraft 26.3 · verbatim Copy
1 package net.minecraft.server.packs;
2
3 import java.io.InputStream;
4 import java.util.Optional;
5 import java.util.Set;
6 import java.util.function.BiConsumer;
7 import net.minecraft.resources.Identifier;
8 import net.minecraft.server.packs.repository.KnownPack;
9 import net.minecraft.server.packs.resources.IoSupplier;
10 import org.jspecify.annotations.Nullable;
11
12 public interface PackResources extends PackMetadataResources {
13 String METADATA_EXTENSION = ".mcmeta";
14 String PACK_META = "pack.mcmeta";
15
16 @Nullable IoSupplier<InputStream> getResource(PackType type, Identifier location);
17
18 void listResources(PackType type, String namespace, String directory, PackResources.ResourceOutput output);
19
20 Set<String> getNamespaces(PackType type);
21
22 default String packId() {
23 return this.location().id();
24 }
25
26 default Optional<KnownPack> knownPackInfo() {
27 return this.location().knownPackInfo();
28 }
29
30 @FunctionalInterface
31 interface Filter {
32 boolean isFiltered(Identifier resourceId);
33 }
34
35 @FunctionalInterface
36 interface ResourceOutput extends BiConsumer<Identifier, IoSupplier<InputStream>> {
37 }
38 }
39
Decompiled Minecraft 26.3 source of PackResources (net/minecraft/server/packs/PackResources.java) with Mojang official mappings, stored verbatim on the site.