aboutsummaryrefslogtreecommitdiffhomepage
path: root/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
diff options
context:
space:
mode:
Diffstat (limited to 'patches/server/0021-Hook-into-CB-plugin-rewrites.patch')
-rw-r--r--patches/server/0021-Hook-into-CB-plugin-rewrites.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
index 2652791358..1bdec9b9e9 100644
--- a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
+++ b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch
@@ -8,7 +8,7 @@ our own relocation. Also lets us rewrite NMS calls for when we're
debugging in an IDE pre-relocate.
diff --git a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
-index 6500c1dad7a48256b8a58b0655f4972c0e7a5dd0..c8c40052d0bb7791297a215ba18fb093fbfda7b6 100644
+index 3526ece6c12f76eca93c995018e0f262360e1ba9..51452d8a8969a303be1be5851b251243a5944be3 100644
--- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -8,6 +8,7 @@ import java.util.ArrayList;
@@ -27,7 +27,7 @@ index 6500c1dad7a48256b8a58b0655f4972c0e7a5dd0..c8c40052d0bb7791297a215ba18fb093
import joptsimple.OptionParser;
import joptsimple.OptionSet;
import joptsimple.OptionSpec;
-@@ -79,6 +81,40 @@ public class Commodore {
+@@ -83,6 +85,40 @@ public class Commodore {
private static final Map<String, RerouteMethodData> MATERIAL_METHOD_REROUTE = Commodore.createReroutes(MaterialRerouting.class);
private static final Map<String, RerouteMethodData> METHOD_REROUTE = Commodore.createReroutes(MethodRerouting.class);
@@ -68,7 +68,7 @@ index 6500c1dad7a48256b8a58b0655f4972c0e7a5dd0..c8c40052d0bb7791297a215ba18fb093
public static void main(String[] args) {
OptionParser parser = new OptionParser();
OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required();
-@@ -205,9 +241,49 @@ public class Commodore {
+@@ -209,9 +245,49 @@ public class Commodore {
@Override
public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions) {
return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
@@ -118,7 +118,7 @@ index 6500c1dad7a48256b8a58b0655f4972c0e7a5dd0..c8c40052d0bb7791297a215ba18fb093
name = FieldRename.rename(pluginVersion, owner, name);
if (modern) {
-@@ -306,6 +382,13 @@ public class Commodore {
+@@ -321,6 +397,13 @@ public class Commodore {
return;
}
@@ -132,7 +132,7 @@ index 6500c1dad7a48256b8a58b0655f4972c0e7a5dd0..c8c40052d0bb7791297a215ba18fb093
if (modern) {
if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) {
switch (name) {
-@@ -402,6 +485,13 @@ public class Commodore {
+@@ -417,6 +500,13 @@ public class Commodore {
@Override
public void visitLdcInsn(Object value) {
@@ -146,7 +146,7 @@ index 6500c1dad7a48256b8a58b0655f4972c0e7a5dd0..c8c40052d0bb7791297a215ba18fb093
if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) {
super.visitLdcInsn("com.mysql.cj.jdbc.Driver");
return;
-@@ -412,6 +502,14 @@ public class Commodore {
+@@ -427,6 +517,14 @@ public class Commodore {
@Override
public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) {
@@ -161,7 +161,7 @@ index 6500c1dad7a48256b8a58b0655f4972c0e7a5dd0..c8c40052d0bb7791297a215ba18fb093
if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory")
&& bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) {
Type samMethodType = (Type) bootstrapMethodArguments[0];
-@@ -428,7 +526,7 @@ public class Commodore {
+@@ -443,7 +541,7 @@ public class Commodore {
methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf));
methodArgs.add(newInstantiated);
@@ -170,7 +170,7 @@ index 6500c1dad7a48256b8a58b0655f4972c0e7a5dd0..c8c40052d0bb7791297a215ba18fb093
}, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType);
return;
}
-@@ -479,6 +577,12 @@ public class Commodore {
+@@ -494,6 +592,12 @@ public class Commodore {
@Override
public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {