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 | 16 |
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 4b98c18cbf..213edbe281 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 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b89f56a10 100644 +index 40fbbff1df7e65ca01bb82e213eeefbb38c85a7a..7d2d5c4ee244e7118a4c38628e2e69c79b11b98d 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/Commodore.java +++ b/src/main/java/org/bukkit/craftbukkit/util/Commodore.java @@ -12,6 +12,7 @@ import java.util.Arrays; @@ -27,7 +27,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b import joptsimple.OptionParser; import joptsimple.OptionSet; import joptsimple.OptionSpec; -@@ -126,6 +128,40 @@ public class Commodore { +@@ -128,6 +130,40 @@ public class Commodore { return this.reroutes; } @@ -68,7 +68,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b public static void main(String[] args) { OptionParser parser = new OptionParser(); OptionSpec<File> inputFlag = parser.acceptsAll(Arrays.asList("i", "input")).withRequiredArg().ofType(File.class).required(); -@@ -281,9 +317,49 @@ public class Commodore { +@@ -283,9 +319,49 @@ public class Commodore { } return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) { @@ -118,7 +118,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b name = FieldRename.rename(pluginVersion, owner, name); if (modern) { -@@ -396,6 +472,13 @@ public class Commodore { +@@ -398,6 +474,13 @@ public class Commodore { return; } @@ -132,7 +132,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b if (modern) { if (owner.equals("org/bukkit/Material") || (instantiatedMethodType != null && instantiatedMethodType.getDescriptor().startsWith("(Lorg/bukkit/Material;)"))) { switch (name) { -@@ -492,6 +575,13 @@ public class Commodore { +@@ -494,6 +577,13 @@ public class Commodore { @Override public void visitLdcInsn(Object value) { @@ -146,7 +146,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b if (value instanceof String && ((String) value).equals("com.mysql.jdbc.Driver")) { super.visitLdcInsn("com.mysql.cj.jdbc.Driver"); return; -@@ -502,6 +592,14 @@ public class Commodore { +@@ -504,6 +594,14 @@ public class Commodore { @Override public void visitInvokeDynamicInsn(String name, String descriptor, Handle bootstrapMethodHandle, Object... bootstrapMethodArguments) { @@ -161,7 +161,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b if (bootstrapMethodHandle.getOwner().equals("java/lang/invoke/LambdaMetafactory") && bootstrapMethodHandle.getName().equals("metafactory") && bootstrapMethodArguments.length == 3) { Type samMethodType = (Type) bootstrapMethodArguments[0]; -@@ -518,7 +616,7 @@ public class Commodore { +@@ -520,7 +618,7 @@ public class Commodore { methodArgs.add(new Handle(newOpcode, newOwner, newName, newDescription, newItf)); methodArgs.add(newInstantiated); @@ -170,7 +170,7 @@ index 79b386af9eb2450b0a8abe3342bc53d3f0b86fd9..58df23162aed12f3058b5e0921a9e30b }, implMethod.getTag(), implMethod.getOwner(), implMethod.getName(), implMethod.getDesc(), implMethod.isInterface(), samMethodType, instantiatedMethodType); return; } -@@ -569,6 +667,12 @@ public class Commodore { +@@ -571,6 +669,12 @@ public class Commodore { @Override public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) { |