Skip to content

Commit

Permalink
update patches
Browse files Browse the repository at this point in the history
  • Loading branch information
foss-mc committed Nov 6, 2023
1 parent e5474f3 commit 8dfa7c7
Show file tree
Hide file tree
Showing 10 changed files with 70 additions and 69 deletions.
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ group = patina.patina

version = 1.20.2-R0.1-SNAPSHOT
mcVersion = 1.20.2
paperRef = 4b0bc74c90582f2d52d720c795228130545cd103
paperRef = 230682d51bc4078ee676751552cac56864e21b30

org.gradle.parallel = true
org.gradle.caching = true
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: foss-mc <[email protected]>
Date: Mon, 23 Oct 2023 00:18:56 +0800
Date: Mon, 6 Nov 2023 21:40:21 +0800
Subject: [PATCH] pufferfish API Changes commit
0ba7617d7efe39b7e15d5b080e9df2a512144fb0
cba85553019510b279be9be037128b4f892098b8

Add Sentry

Expand Down Expand Up @@ -482,10 +482,10 @@ index eaefbb00e9993d54906cc8cf35cf753c0d6c7707..301e82369603f3dd6e6c1bd380da4bac

if (cloader instanceof PluginClassLoader) {
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 13da387d3b59bc67c0d73e3fbd3a4034b1281527..7572a0bf6614b02be3cbccc7b86e52ee1b8df621 100644
index f9b57b872780aa6b9b959494874b57c7a8ff0c53..90953bfc81168068a281be4d2d3942d5e7dd69ff 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -48,6 +48,8 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
@@ -50,6 +50,8 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
private io.papermc.paper.plugin.provider.classloader.PluginClassLoaderGroup classLoaderGroup; // Paper
public io.papermc.paper.plugin.provider.entrypoint.DependencyContext dependencyContext; // Paper

Expand All @@ -494,15 +494,15 @@ index 13da387d3b59bc67c0d73e3fbd3a4034b1281527..7572a0bf6614b02be3cbccc7b86e52ee
static {
ClassLoader.registerAsParallelCapable();
}
@@ -183,6 +185,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
@@ -197,6 +199,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
throw new ClassNotFoundException(name);
}

+ public boolean _airplane_hasClass(@NotNull String name) { return this.classes.containsKey(name); } // Pufferfish
@Override
protected Class<?> findClass(String name) throws ClassNotFoundException {
if (name.startsWith("org.bukkit.") || name.startsWith("net.minecraft.")) {
@@ -190,7 +193,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
@@ -204,7 +207,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
}
Class<?> result = classes.get(name);

Expand All @@ -511,15 +511,15 @@ index 13da387d3b59bc67c0d73e3fbd3a4034b1281527..7572a0bf6614b02be3cbccc7b86e52ee
String path = name.replace('.', '/').concat(".class");
JarEntry entry = jar.getJarEntry(path);

@@ -237,6 +240,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
@@ -251,6 +254,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
this.setClass(name, result); // Paper
}

+ if (result == null) throw new ClassNotFoundException(name); // Pufferfish
return result;
}

@@ -251,6 +255,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
@@ -265,6 +269,7 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
// Paper end
super.close();
} finally {
Expand Down
6 changes: 3 additions & 3 deletions patches/api/0004-Suspected-plugins-report.patch
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,10 @@ index 301e82369603f3dd6e6c1bd380da4bacacd7ef6c..7573bda5d8a409d82bcd4baf77cff8df
+ // Yatopia end
}
diff --git a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
index 7572a0bf6614b02be3cbccc7b86e52ee1b8df621..222bdd3584e647c49c8dfe92cacc2f37905a82e0 100644
index 90953bfc81168068a281be4d2d3942d5e7dd69ff..74c01f29ac3d0a8fb5c047f1dea54d77425ce0a4 100644
--- a/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
+++ b/src/main/java/org/bukkit/plugin/java/PluginClassLoader.java
@@ -309,4 +309,13 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
@@ -323,4 +323,13 @@ public final class PluginClassLoader extends URLClassLoader implements io.paperm
}

// Paper end
Expand Down Expand Up @@ -239,7 +239,7 @@ index 0000000000000000000000000000000000000000..0aa9bc6ad0a85d469b29201b9da29165
+
+}
diff --git a/src/test/java/org/bukkit/AnnotationTest.java b/src/test/java/org/bukkit/AnnotationTest.java
index 06e96e5c98f1a7a68c8b4b5e527314c1aa774e38..b7da259ab119bcb9e19bdd1a497a49381a4454ef 100644
index 88f1ca89fa640a686231b8eec87e70419b2d73ef..bf20978ae3cbd436464b6db1137cfe195e843aa7 100644
--- a/src/test/java/org/bukkit/AnnotationTest.java
+++ b/src/test/java/org/bukkit/AnnotationTest.java
@@ -57,8 +57,11 @@ public class AnnotationTest {
Expand Down
Loading

0 comments on commit 8dfa7c7

Please sign in to comment.