Skip to content

Commit da1712d

Browse files
authored
Try to fix mixin, bump version to 3.0.10 (#7)
* Try to fix mixin, bump version to 3.0.10 * Revert dumb change
1 parent 38fe072 commit da1712d

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
group = org.leavesmc
2-
version = 3.0.9
2+
version = 3.0.10
33
description = Launcher for the Leaves Minecraft server

java21/src/main/java/org/leavesmc/leavesclip/mixin/MixinURLClassLoader.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@
88
import java.io.InputStream;
99
import java.net.URL;
1010
import java.net.URLClassLoader;
11+
import java.security.CodeSource;
12+
import java.security.ProtectionDomain;
13+
import java.security.cert.Certificate;
1114
import java.util.Objects;
1215

1316
public class MixinURLClassLoader extends URLClassLoader {
17+
1418
private final IMixinTransformer transformer;
19+
private final ProtectionDomain dummyDomain = new ProtectionDomain(new CodeSource(this.getURLs()[0], (Certificate[]) null), null);
1520

1621
public MixinURLClassLoader(URL[] urls, ClassLoader parent) {
1722
super(urls, parent);
@@ -48,7 +53,7 @@ protected Class<?> findClass(@NotNull String name) throws ClassNotFoundException
4853
byte[] mixin = transformer.transformClass(MixinEnvironment.getCurrentEnvironment(), name, original);
4954
byte[] transformed = AccessWidenerManager.applyAccessWidener(mixin);
5055

51-
return defineClass(name, transformed, 0, transformed.length);
56+
return defineClass(name, transformed, 0, transformed.length, dummyDomain);
5257
} catch (Exception e) {
5358
throw new ClassNotFoundException(name, e);
5459
}

0 commit comments

Comments
 (0)