Attempt to fix CME
This commit is contained in:
parent
5362344151
commit
94d4a0e4af
@ -4,7 +4,7 @@ repositories {
|
||||
maven { url = "https://maven.terraformersmc.com/releases/"; name = "ModMenu" }
|
||||
maven { url = "https://maven.shedaniel.me/"; name = "Cloth Config" }
|
||||
maven { url = "https://maven.dblsaiko.net/"; name = "Canvas" }
|
||||
maven { url = 'https://server.bbkr.space/artifactory/libs-release'; name = "Required for canvas" }
|
||||
//maven { url = 'https://server.bbkr.space/artifactory/libs-release'; name = "Required for canvas" }
|
||||
maven { url = "https://minecraft.curseforge.com/api/maven"; name = "CurseForge (for canvas)" }
|
||||
maven { url = "https://jitpack.io"; name = "jitpack (for StarScript)" }
|
||||
maven {
|
||||
|
@ -6,12 +6,12 @@ minecraft_version=1.17.1
|
||||
yarn_mappings=build.61
|
||||
loader_version=0.12.1
|
||||
# Mod Properties
|
||||
mod_version=2.8.0
|
||||
mod_version=2.8.1
|
||||
maven_group=io.gitlab.jfronny
|
||||
archives_base_name=respackopts
|
||||
# Dependencies
|
||||
fabric_version=0.40.1+1.17
|
||||
jfapi_version=2.0+385445857
|
||||
jfapi_version=2.0.1
|
||||
|
||||
modrinth_id=TiF5QWZY
|
||||
modrinth_required_dependencies=3CD6YUw1
|
||||
|
@ -10,6 +10,8 @@ import net.minecraft.resource.ResourcePack;
|
||||
import net.minecraft.util.Identifier;
|
||||
|
||||
import java.io.*;
|
||||
import java.util.Collection;
|
||||
import java.util.LinkedHashSet;
|
||||
|
||||
public class DirFilterEventImpl {
|
||||
public static void init() {
|
||||
@ -31,6 +33,7 @@ public class DirFilterEventImpl {
|
||||
// Therefore, it needs to be added when calling a method that generates a ResourcePath!
|
||||
if (!Respackopts.hasCapability(pack, PackCapability.DirFilter))
|
||||
return previous;
|
||||
Collection<Identifier> nextRes = new LinkedHashSet<>(previous);
|
||||
boolean dirFilterAdditive = Respackopts.hasCapability(pack, PackCapability.DirFilterAdditive);
|
||||
for (Identifier identifier : previous) {
|
||||
String path = type.getDirectory() + "/" + identifier.getNamespace() + "/" + identifier.getPath();
|
||||
@ -39,7 +42,7 @@ public class DirFilterEventImpl {
|
||||
if (dirHidden(rpo, Respackopts.getId(pack))) {
|
||||
path = findReplacementDir(path, rpo);
|
||||
if (path == null)
|
||||
previous.remove(identifier);
|
||||
nextRes.remove(identifier);
|
||||
else if (dirFilterAdditive) {
|
||||
String[] s = path.split("/", 3);
|
||||
if (s.length == 3) {
|
||||
@ -50,14 +53,14 @@ public class DirFilterEventImpl {
|
||||
p = p.replace(rpo.fallback, rpo.path + "/");
|
||||
rp = new ResourcePath(p);
|
||||
if (pathFilter.test(p))
|
||||
previous.add(rp.getId());
|
||||
nextRes.add(rp.getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return previous;
|
||||
return nextRes;
|
||||
});
|
||||
UserResourceEvents.CONTAINS.register((type, id, previous, pack) -> {
|
||||
if (!Respackopts.hasCapability(pack, PackCapability.DirFilter))
|
||||
|
Loading…
Reference in New Issue
Block a user