mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-17 02:55:17 +00:00
[1.19.x] Apply general renames, A SRG is provided for modders. (#8840)
See https://gist.github.com/SizableShrimp/882a671ff74256d150776da08c89ef72
This commit is contained in:
1 parent
5e8c786406
commit
b8b40e1f54
140 files changed
+1138
-1149
No files matched your search
@@ -30,19 +30,19 @@ import net.minecraftforge.forgespi.locating.IModFile;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
public class ResourcePackLoader {
|
||||
private static Map<IModFile, PathResourcePack> modResourcePacks;
|
||||
private static Map<IModFile, PathPackResources> modResourcePacks;
|
||||
|
||||
public static Optional<PathResourcePack> getPackFor(String modId) {
|
||||
public static Optional<PathPackResources> getPackFor(String modId) {
|
||||
return Optional.ofNullable(ModList.get().getModFileById(modId)).
|
||||
map(IModFileInfo::getFile).map(mf->modResourcePacks.get(mf));
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public static void loadResourcePacks(PackRepository resourcePacks, BiFunction<Map<IModFile, ? extends PathResourcePack>, BiConsumer<? super PathResourcePack, Pack>, ? extends RepositorySource> packFinder) {
|
||||
public static void loadResourcePacks(PackRepository resourcePacks, BiFunction<Map<IModFile, ? extends PathPackResources>, BiConsumer<? super PathPackResources, Pack>, ? extends RepositorySource> packFinder) {
|
||||
loadResourcePacks(resourcePacks, (map) -> packFinder.apply(map, (rp,p) -> {}));
|
||||
}
|
||||
|
||||
public static void loadResourcePacks(PackRepository resourcePacks, Function<Map<IModFile, ? extends PathResourcePack>, ? extends RepositorySource> packFinder) {
|
||||
public static void loadResourcePacks(PackRepository resourcePacks, Function<Map<IModFile, ? extends PathPackResources>, ? extends RepositorySource> packFinder) {
|
||||
modResourcePacks = ModList.get().getModFiles().stream()
|
||||
.filter(mf->mf.requiredLanguageLoaders().stream().noneMatch(ls->ls.languageName().equals("minecraft")))
|
||||
.map(mf -> Pair.of(mf, createPackForMod(mf)))
|
||||
@@ -51,9 +51,9 @@ public class ResourcePackLoader {
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public static PathResourcePack createPackForMod(IModFileInfo mf)
|
||||
public static PathPackResources createPackForMod(IModFileInfo mf)
|
||||
{
|
||||
return new PathResourcePack(mf.getFile().getFileName(), mf.getFile().getFilePath()){
|
||||
return new PathPackResources(mf.getFile().getFileName(), mf.getFile().getFilePath()){
|
||||
final IModFile modFile = mf.getFile();
|
||||
@NotNull
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user