Package net.minecraft.resources
Class SimpleReloadableResourceManager
- java.lang.Object
-
- net.minecraft.resources.SimpleReloadableResourceManager
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IReloadableResourceManager
,IResourceManager
public class SimpleReloadableResourceManager extends java.lang.Object implements IReloadableResourceManager
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SimpleReloadableResourceManager.FailedPackException
(package private) static class
SimpleReloadableResourceManager.FailedPackReloader
-
Nested classes/interfaces inherited from interface net.minecraft.resources.IResourceManager
IResourceManager.Instance
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.List<IFutureReloadListener>
listeners
private static org.apache.logging.log4j.Logger
LOGGER
private java.util.Map<java.lang.String,FallbackResourceManager>
namespacedPacks
private java.util.Set<java.lang.String>
namespaces
private java.util.List<IResourcePack>
packs
private java.util.List<IFutureReloadListener>
recentlyRegistered
private ResourcePackType
type
-
Constructor Summary
Constructors Constructor Description SimpleReloadableResourceManager(ResourcePackType p_i47905_1_)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
add(IResourcePack p_199021_1_)
private void
clear()
void
close()
IAsyncReloader
createFullReload(java.util.concurrent.Executor p_219537_1_, java.util.concurrent.Executor p_219537_2_, java.util.concurrent.CompletableFuture<Unit> p_219537_3_, java.util.List<IResourcePack> p_219537_4_)
protected IAsyncReloader
createReload(java.util.concurrent.Executor p_219538_1_, java.util.concurrent.Executor p_219538_2_, java.util.List<IFutureReloadListener> p_219538_3_, java.util.concurrent.CompletableFuture<Unit> p_219538_4_)
java.util.Set<java.lang.String>
getNamespaces()
IResource
getResource(ResourceLocation p_199002_1_)
java.util.List<IResource>
getResources(ResourceLocation p_199004_1_)
boolean
hasResource(ResourceLocation p_219533_1_)
java.util.stream.Stream<IResourcePack>
listPacks()
java.util.Collection<ResourceLocation>
listResources(java.lang.String p_199003_1_, java.util.function.Predicate<java.lang.String> p_199003_2_)
void
registerReloadListener(IFutureReloadListener p_219534_1_)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.minecraft.resources.IReloadableResourceManager
reload
-
-
-
-
Field Detail
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER
-
namespacedPacks
private final java.util.Map<java.lang.String,FallbackResourceManager> namespacedPacks
-
listeners
private final java.util.List<IFutureReloadListener> listeners
-
recentlyRegistered
private final java.util.List<IFutureReloadListener> recentlyRegistered
-
namespaces
private final java.util.Set<java.lang.String> namespaces
-
packs
private final java.util.List<IResourcePack> packs
-
type
private final ResourcePackType type
-
-
Constructor Detail
-
SimpleReloadableResourceManager
public SimpleReloadableResourceManager(ResourcePackType p_i47905_1_)
-
-
Method Detail
-
add
public void add(IResourcePack p_199021_1_)
-
getNamespaces
public java.util.Set<java.lang.String> getNamespaces()
- Specified by:
getNamespaces
in interfaceIResourceManager
-
getResource
public IResource getResource(ResourceLocation p_199002_1_) throws java.io.IOException
- Specified by:
getResource
in interfaceIResourceManager
- Throws:
java.io.IOException
-
hasResource
public boolean hasResource(ResourceLocation p_219533_1_)
- Specified by:
hasResource
in interfaceIResourceManager
-
getResources
public java.util.List<IResource> getResources(ResourceLocation p_199004_1_) throws java.io.IOException
- Specified by:
getResources
in interfaceIResourceManager
- Throws:
java.io.IOException
-
listResources
public java.util.Collection<ResourceLocation> listResources(java.lang.String p_199003_1_, java.util.function.Predicate<java.lang.String> p_199003_2_)
- Specified by:
listResources
in interfaceIResourceManager
-
clear
private void clear()
-
close
public void close()
- Specified by:
close
in interfacejava.lang.AutoCloseable
- Specified by:
close
in interfaceIReloadableResourceManager
-
registerReloadListener
public void registerReloadListener(IFutureReloadListener p_219534_1_)
- Specified by:
registerReloadListener
in interfaceIReloadableResourceManager
-
createReload
protected IAsyncReloader createReload(java.util.concurrent.Executor p_219538_1_, java.util.concurrent.Executor p_219538_2_, java.util.List<IFutureReloadListener> p_219538_3_, java.util.concurrent.CompletableFuture<Unit> p_219538_4_)
-
createFullReload
public IAsyncReloader createFullReload(java.util.concurrent.Executor p_219537_1_, java.util.concurrent.Executor p_219537_2_, java.util.concurrent.CompletableFuture<Unit> p_219537_3_, java.util.List<IResourcePack> p_219537_4_)
- Specified by:
createFullReload
in interfaceIReloadableResourceManager
-
listPacks
public java.util.stream.Stream<IResourcePack> listPacks()
- Specified by:
listPacks
in interfaceIResourceManager
-
-