mirror of
https://github.com/Creators-of-Create/Create.git
synced 2025-01-10 06:16:31 +01:00
82be76d893
- Refactor JEI category building - Fix placard item requirement not checking NBT - Use AddPackFindersEvent instead of ShippedResourcePacks - Remove unused config values - Provide separate resource and data formats in pack.mcmeta - Compress all images - Update to latest Flywheel - Disable jarJar inclusion of Flywheel - Use ${file.jarVersion} instead of ${version} - Add workaround for SpongePowered/MixinGradle#38
25 lines
739 B
Java
25 lines
739 B
Java
package com.simibubi.create.foundation;
|
|
|
|
import java.nio.file.Path;
|
|
|
|
import net.minecraftforge.forgespi.locating.IModFile;
|
|
import net.minecraftforge.resource.PathResourcePack;
|
|
|
|
public class ModFilePackResources extends PathResourcePack {
|
|
protected final IModFile modFile;
|
|
protected final String sourcePath;
|
|
|
|
public ModFilePackResources(String name, IModFile modFile, String sourcePath) {
|
|
super(name, modFile.findResource(sourcePath));
|
|
this.modFile = modFile;
|
|
this.sourcePath = sourcePath;
|
|
}
|
|
|
|
@Override
|
|
protected Path resolve(String... paths) {
|
|
String[] allPaths = new String[paths.length + 1];
|
|
allPaths[0] = sourcePath;
|
|
System.arraycopy(paths, 0, allPaths, 1, paths.length);
|
|
return modFile.findResource(allPaths);
|
|
}
|
|
}
|