mirror of
http://git.eaglercraft.rip/eaglercraft/eaglercraft-1.8.git
synced 2025-04-30 02:01:59 -05:00
55 lines
1.3 KiB
Java
55 lines
1.3 KiB
Java
package net.optifine.util;
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.List;
|
|
|
|
import net.minecraft.client.resources.IResourcePack;
|
|
|
|
public class ResUtils {
|
|
|
|
public static List<String> collectPropertyFiles(IResourcePack rp, String prefix) {
|
|
List<String> ret = new ArrayList<>();
|
|
for (String str : rp.getEaglerFileIndex().getPropertiesFiles()) {
|
|
if (str.startsWith(prefix)) {
|
|
ret.add(str);
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
public static List<String> collectPropertyFiles(IResourcePack rp, String... prefixes) {
|
|
List<String> ret = new ArrayList<>();
|
|
for (String str : rp.getEaglerFileIndex().getPropertiesFiles()) {
|
|
for (int i = 0; i < prefixes.length; ++i) {
|
|
if (str.startsWith(prefixes[i])) {
|
|
ret.add(str);
|
|
}
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
public static List<String> collectPotionFiles(IResourcePack rp, String prefix) {
|
|
List<String> ret = new ArrayList<>();
|
|
for (String str : rp.getEaglerFileIndex().getCITPotionsFiles()) {
|
|
if (str.startsWith(prefix)) {
|
|
ret.add(str);
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
public static List<String> collectPotionFiles(IResourcePack rp, String... prefixes) {
|
|
List<String> ret = new ArrayList<>();
|
|
for (String str : rp.getEaglerFileIndex().getCITPotionsFiles()) {
|
|
for (int i = 0; i < prefixes.length; ++i) {
|
|
if (str.startsWith(prefixes[i])) {
|
|
ret.add(str);
|
|
}
|
|
}
|
|
}
|
|
return ret;
|
|
}
|
|
|
|
}
|