mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-12 16:27:47 +00:00
Fix small logging issues with loading pack.png for mods (#7265)
This commit is contained in:
1 parent
c2de232703
commit
797791c2af
2 files changed
+4
-1
No files matched your search
@@ -19,6 +19,7 @@
|
||||
|
||||
package net.minecraftforge.fml.packs;
|
||||
|
||||
import net.minecraft.resources.ResourcePackFileNotFoundException;
|
||||
import net.minecraft.resources.ResourcePackInfo;
|
||||
import net.minecraft.resources.ResourcePackType;
|
||||
import net.minecraft.util.ResourceLocation;
|
||||
@@ -63,6 +64,8 @@ public class ModFileResourcePack extends DelegatableResourcePack
|
||||
public InputStream getInputStream(String name) throws IOException
|
||||
{
|
||||
final Path path = modFile.getLocator().findPath(modFile, name);
|
||||
if(!Files.exists(path))
|
||||
throw new ResourcePackFileNotFoundException(path.toFile(), name);
|
||||
return Files.newInputStream(path, StandardOpenOption.READ);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user