Class FallbackResourceManager
java.lang.Object
net.minecraft.server.packs.resources.FallbackResourceManager
- All Implemented Interfaces:
ResourceManager
,ResourceProvider
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static final record
(package private) static class
(package private) static final record
(package private) static final record
Nested classes/interfaces inherited from interface net.minecraft.server.packs.resources.ResourceManager
ResourceManager.Empty
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprivate static void
applyPackFiltersToExistingResources
(FallbackResourceManager.PackEntry p_215393_, Map<ResourceLocation, FallbackResourceManager.EntryStack> p_215394_) private static IoSupplier<ResourceMetadata>
convertToMetadata
(IoSupplier<InputStream> p_250827_) private static Resource
createResource
(PackResources p_249946_, ResourceLocation p_250632_, IoSupplier<InputStream> p_250514_, IoSupplier<ResourceMetadata> p_251676_) private IoSupplier<ResourceMetadata>
createStackMetadataFinder
(ResourceLocation p_215369_, int p_215370_) (package private) static ResourceLocation
getMetadataLocation
(ResourceLocation p_10625_) getResource
(ResourceLocation p_215419_) private static ResourceLocation
getResourceLocationFromMetadata
(ResourceLocation p_249669_) getResourceStack
(ResourceLocation p_215367_) private static boolean
isMetadata
(ResourceLocation p_249381_) private void
listPackResources
(FallbackResourceManager.PackEntry p_215388_, String p_215389_, Predicate<ResourceLocation> p_215390_, Map<ResourceLocation, FallbackResourceManager.EntryStack> p_215391_) listResources
(String p_215413_, Predicate<ResourceLocation> p_215414_) listResourceStacks
(String p_215416_, Predicate<ResourceLocation> p_215417_) private static ResourceMetadata
parseMetadata
(IoSupplier<InputStream> p_250103_) void
push
(PackResources p_215378_) void
push
(PackResources p_215383_, Predicate<ResourceLocation> p_215384_) void
pushFilterOnly
(String p_215400_, Predicate<ResourceLocation> p_215401_) private void
pushInternal
(String p_215396_, PackResources p_215397_, Predicate<ResourceLocation> p_215398_) private static IoSupplier<InputStream>
wrapForDebug
(ResourceLocation p_248639_, PackResources p_251740_, IoSupplier<InputStream> p_249116_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.server.packs.resources.ResourceProvider
getResourceOrThrow, open, openAsReader
-
Field Details
-
LOGGER
static final org.slf4j.Logger LOGGER -
fallbacks
-
type
-
namespace
-
-
Constructor Details
-
FallbackResourceManager
-
-
Method Details
-
push
-
push
-
pushFilterOnly
-
pushInternal
private void pushInternal(String p_215396_, @Nullable PackResources p_215397_, @Nullable Predicate<ResourceLocation> p_215398_) -
getNamespaces
- Specified by:
getNamespaces
in interfaceResourceManager
-
getResource
- Specified by:
getResource
in interfaceResourceProvider
-
createResource
private static Resource createResource(PackResources p_249946_, ResourceLocation p_250632_, IoSupplier<InputStream> p_250514_, IoSupplier<ResourceMetadata> p_251676_) -
wrapForDebug
private static IoSupplier<InputStream> wrapForDebug(ResourceLocation p_248639_, PackResources p_251740_, IoSupplier<InputStream> p_249116_) -
getResourceStack
- Specified by:
getResourceStack
in interfaceResourceManager
-
isMetadata
-
getResourceLocationFromMetadata
-
getMetadataLocation
-
listResources
public Map<ResourceLocation,Resource> listResources(String p_215413_, Predicate<ResourceLocation> p_215414_) - Specified by:
listResources
in interfaceResourceManager
-
createStackMetadataFinder
private IoSupplier<ResourceMetadata> createStackMetadataFinder(ResourceLocation p_215369_, int p_215370_) -
convertToMetadata
-
parseMetadata
- Throws:
IOException
-
applyPackFiltersToExistingResources
private static void applyPackFiltersToExistingResources(FallbackResourceManager.PackEntry p_215393_, Map<ResourceLocation, FallbackResourceManager.EntryStack> p_215394_) -
listPackResources
private void listPackResources(FallbackResourceManager.PackEntry p_215388_, String p_215389_, Predicate<ResourceLocation> p_215390_, Map<ResourceLocation, FallbackResourceManager.EntryStack> p_215391_) -
listResourceStacks
public Map<ResourceLocation,List<Resource>> listResourceStacks(String p_215416_, Predicate<ResourceLocation> p_215417_) - Specified by:
listResourceStacks
in interfaceResourceManager
-
listPacks
- Specified by:
listPacks
in interfaceResourceManager
-