Class ResourceManager
- java.lang.Object
-
- net.minecraft.modding.api.game.client.resources.ResourcePack
-
- net.minecraft.modding.api.game.client.resources.MultiResourcePack
-
- net.minecraft.modding.api.game.client.resources.ResourceManager
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
public class ResourceManager extends MultiResourcePack
-
-
Constructor Summary
Constructors Constructor Description ResourceManager(java.nio.file.Path assetsDir, java.lang.String assetsIndex, java.nio.file.Path resourcePacksDir)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addReloadListener(ResourceReloadListener listener)
AssetsResourcePack
getAssetsPack()
java.lang.String
getName()
ResourceReloadListener
getReloadListener(ResourceLocation id)
java.util.Map<ResourceLocation,ResourceReloadListener>
getReloadListeners()
java.nio.file.Path
getResourcePacksDir()
ResourcePack
getSelectedPack()
java.util.Collection<ResourceLocation>
getSortedListeners()
protected java.util.stream.Stream<ResourcePack>
getSubPacks()
ResourcePack
getVanillaPack()
void
reload()
void
reload(ReloadProgressListener progressListener)
boolean
removeReloadListener(ResourceReloadListener listener)
boolean
removeReloadListener(ResourceLocation listener)
void
setAssetsPack(AssetsResourcePack assetsPack)
void
setSelectedPack(ResourcePack selectedPack)
-
Methods inherited from class net.minecraft.modding.api.game.client.resources.MultiResourcePack
findResources, getResource, getResources, getResources
-
Methods inherited from class net.minecraft.modding.api.game.client.resources.ResourcePack
close, getDescription, getThumbnail, isLegacyTexturePack
-
-
-
-
Method Detail
-
getAssetsPack
public AssetsResourcePack getAssetsPack()
-
setAssetsPack
public void setAssetsPack(AssetsResourcePack assetsPack)
-
getVanillaPack
public ResourcePack getVanillaPack()
-
getResourcePacksDir
public java.nio.file.Path getResourcePacksDir()
-
getReloadListeners
public java.util.Map<ResourceLocation,ResourceReloadListener> getReloadListeners()
-
getSortedListeners
public java.util.Collection<ResourceLocation> getSortedListeners()
-
addReloadListener
public void addReloadListener(ResourceReloadListener listener)
-
removeReloadListener
public boolean removeReloadListener(ResourceLocation listener)
-
removeReloadListener
public boolean removeReloadListener(ResourceReloadListener listener)
-
getReloadListener
public ResourceReloadListener getReloadListener(ResourceLocation id)
-
getSelectedPack
public ResourcePack getSelectedPack()
-
setSelectedPack
public void setSelectedPack(ResourcePack selectedPack)
-
reload
public void reload(ReloadProgressListener progressListener) throws ReportedException
- Throws:
ReportedException
-
reload
public void reload() throws ReportedException
- Throws:
ReportedException
-
getSubPacks
protected java.util.stream.Stream<ResourcePack> getSubPacks()
- Specified by:
getSubPacks
in classMultiResourcePack
-
getName
public java.lang.String getName()
- Specified by:
getName
in classResourcePack
-
-