matches(String regex) {
+ return (name) -> name.matches(regex);
+ }
+ }
+}
diff --git a/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/LICENSE b/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/LICENSE
new file mode 100644
index 0000000..f9a78b9
--- /dev/null
+++ b/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/LICENSE
@@ -0,0 +1,19 @@
+FalsePatternLib
+
+Copyright (C) 2022-2025 FalsePattern
+All Rights Reserved
+
+The above copyright notice and this permission notice
+shall be included in all copies or substantial portions of the Software.
+
+This program is free software: you can redistribute it and/or modify
+it under the terms of the GNU Lesser General Public License as published by
+the Free Software Foundation, only version 3 of the License.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU Lesser General Public License
+along with this program. If not, see .
\ No newline at end of file
diff --git a/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/MinecraftURLClassPath.java b/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/MinecraftURLClassPath.java
new file mode 100644
index 0000000..a249f72
--- /dev/null
+++ b/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/MinecraftURLClassPath.java
@@ -0,0 +1,41 @@
+/*
+ * This file is part of FalsePatternLib.
+ *
+ * Copyright (C) 2022-2025 FalsePattern
+ * All Rights Reserved
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * FalsePatternLib is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, only version 3 of the License.
+ *
+ * FalsePatternLib is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with FalsePatternLib. If not, see .
+ */
+package com.falsepattern.chunk.internal.mixin.plugin.fplib;
+
+import lombok.AccessLevel;
+import lombok.NoArgsConstructor;
+
+import java.io.File;
+
+/**
+ * Backport from spongemixins 1.3 for compat with the curseforge 1.2.0 version.
+ *
+ * Also added Grimoire protection.
+ *
+ * @since 0.10.0
+ */
+@NoArgsConstructor(access = AccessLevel.PRIVATE)
+public final class MinecraftURLClassPath {
+ public static void addJar(File pathToJar) throws Exception {
+ UCPImpl.addJar(pathToJar);
+ }
+}
diff --git a/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/README b/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/README
new file mode 100644
index 0000000..d1745be
--- /dev/null
+++ b/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/README
@@ -0,0 +1 @@
+Shadowed from FalsePatternLib 1.7.0
\ No newline at end of file
diff --git a/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/UCPImpl.java b/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/UCPImpl.java
new file mode 100644
index 0000000..8dc9b2d
--- /dev/null
+++ b/src/main/java/com/falsepattern/chunk/internal/mixin/plugin/fplib/UCPImpl.java
@@ -0,0 +1,61 @@
+/*
+ * This file is part of FalsePatternLib.
+ *
+ * Copyright (C) 2022-2025 FalsePattern
+ * All Rights Reserved
+ *
+ * The above copyright notice and this permission notice shall be included
+ * in all copies or substantial portions of the Software.
+ *
+ * FalsePatternLib is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as published by
+ * the Free Software Foundation, only version 3 of the License.
+ *
+ * FalsePatternLib is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with FalsePatternLib. If not, see .
+ */
+
+package com.falsepattern.chunk.internal.mixin.plugin.fplib;
+
+import lombok.val;
+
+import net.minecraft.launchwrapper.Launch;
+import net.minecraft.launchwrapper.LaunchClassLoader;
+
+import java.io.File;
+import java.io.IOException;
+
+public final class UCPImpl {
+ private static final boolean GRIMOIRE;
+
+ static {
+ boolean grimoire = false;
+ String[] knownGrimoireClassNames =
+ new String[]{"io.github.crucible.grimoire.Grimoire", "io.github.crucible.grimoire.common.GrimoireCore"};
+ for (val className : knownGrimoireClassNames) {
+ try {
+ if (Launch.classLoader.getClassBytes(className) != null) {
+ grimoire = true;
+ break;
+ }
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+ GRIMOIRE = grimoire;
+ }
+
+ public static void addJar(File pathToJar) throws Exception {
+ if (!GRIMOIRE) {
+ final LaunchClassLoader loader = Launch.classLoader;
+ loader.addURL(pathToJar.toURI().toURL());
+ // Act as-if we only added the mod to ucp
+ loader.getSources().remove(loader.getSources().size() - 1);
+ }
+ }
+}