diff options
Diffstat (limited to 'patches/server/0021-Hook-into-CB-plugin-rewrites.patch')
-rw-r--r-- | patches/server/0021-Hook-into-CB-plugin-rewrites.patch | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/patches/server/0021-Hook-into-CB-plugin-rewrites.patch b/patches/server/0021-Hook-into-CB-plugin-rewrites.patch index 1bdec9b9e9..26965088ba 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 3526ece6c12f76eca93c995018e0f262360e1ba9..51452d8a8969a303be1be5851b251243a5944be3 100644 +index acfb0269e15aba638b87b1e2f483ef96c9552693..8e29fae1be2b4d0b04e7788de7a3802aacae4588 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; @@ -68,7 +68,7 @@ index 3526ece6c12f76eca93c995018e0f262360e1ba9..51452d8a8969a303be1be5851b251243 public static void main(String[] args) { OptionParser parser = new OptionParser(); OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required(); -@@ -209,9 +245,49 @@ public class Commodore { +@@ -213,9 +249,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 3526ece6c12f76eca93c995018e0f262360e1ba9..51452d8a8969a303be1be5851b251243 name = FieldRename.rename(pluginVersion, owner, name); if (modern) { -@@ -321,6 +397,13 @@ public class Commodore { +@@ -331,6 +407,13 @@ public class Commodore { return; } @@ -132,7 +132,7 @@ index 3526ece6c12f76eca93c995018e0f262360e1ba9..51452d8a8969a303be1be5851b251243 if (modern) { if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) { switch (name) { -@@ -417,6 +500,13 @@ public class Commodore { +@@ -427,6 +510,13 @@ public class Commodore { @Override public void visitLdcInsn(Object value) { @@ -146,7 +146,7 @@ index 3526ece6c12f76eca93c995018e0f262360e1ba9..51452d8a8969a303be1be5851b251243 if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) { super.visitLdcInsn("com.mysql.cj.jdbc.Driver"); return; -@@ -427,6 +517,14 @@ public class Commodore { +@@ -437,6 +527,14 @@ public class Commodore { @Override public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) { @@ -161,7 +161,7 @@ index 3526ece6c12f76eca93c995018e0f262360e1ba9..51452d8a8969a303be1be5851b251243 if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory") && bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) { Type samMethodType = (Type) bootstrapMethodArguments[0]; -@@ -443,7 +541,7 @@ public class Commodore { +@@ -453,7 +551,7 @@ public class Commodore { methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf)); methodArgs.add(newInstantiated); @@ -170,7 +170,7 @@ index 3526ece6c12f76eca93c995018e0f262360e1ba9..51452d8a8969a303be1be5851b251243 }, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType); return; } -@@ -494,6 +592,12 @@ public class Commodore { +@@ -504,6 +602,12 @@ public class Commodore { @Override public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) { |