-
-
Notifications
You must be signed in to change notification settings - Fork 257
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix Java 15 #1025
Fix Java 15 #1025
Commits on Nov 20, 2020
-
Implement proof of concept Java 15 fix
- Implemented a proof of concept fix for the incompatibility with Java 15. This incompatibility was caused by the fact that the lambda generated in the NMS.NetworkManager is a hidden class in J15. Starting in Java 15, final fields in hidden classes can no longer be modified regardless of the 'accessible' flag. (see https://openjdk.java.net/jeps/371 "Using a hidden class", point 3). To circumvent this issue, this proof of concept fix retrieves the data from the existing fields in the hidden class (a runnable or a callable) other than the packet. It then retrieves the constructor of the hidden class and instantiates it using the previously-retrieved data and the modified packet instance (this code is only used if the packet instance changed).
Configuration menu - View commit details
-
Copy full SHA for ab46e57 - Browse repository at this point
Copy the full SHA ab46e57View commit details
Commits on Nov 28, 2020
-
- Fixed the patch breaking on Tuinity (and maybe Paper?) because its generated Runnable had a different number of variables, causing an exception when trying to instantiate a new instance with an incorrect number of variables. This update changes it so that it can use any number / order of variables. The variable of the same type as the packet will be replaced by the changed packet (this applies to all variables of this type, but there's only ever 1).
Configuration menu - View commit details
-
Copy full SHA for ee2567d - Browse repository at this point
Copy the full SHA ee2567dView commit details
Commits on Nov 30, 2020
-
Reduce reflection lookups to improve performance
- Introduced a new ObjectReconstructor class that does all the fields/constructor discovering/accessing etc. The Runnable and Callable methods each get one instance of this class so that we can avoid having to get the fields/constructors and set them accessible every time we want to replace a packet.
Configuration menu - View commit details
-
Copy full SHA for e7b5d98 - Browse repository at this point
Copy the full SHA e7b5d98View commit details -
Configuration menu - View commit details
-
Copy full SHA for bd6426e - Browse repository at this point
Copy the full SHA bd6426eView commit details
Commits on Dec 4, 2020
-
Add hardcoded support for LazyRunnable
- Added hardcoded support for Netty's LazyRunnable as used by Tuinity by adding a specific ObjectReconstructor field for it.
Configuration menu - View commit details
-
Copy full SHA for 7b977d3 - Browse repository at this point
Copy the full SHA 7b977d3View commit details -
Do not use ObjectReconstructor on Java < 15
- The new ObjectReconstructor method for changing the packet in a schedule packet message is now only used on java 15+. All older versions of Java will use the old method of modifying the packet using reflection, as that is simpler. Inspired by @mikroskeem's efforts towards this PR.
Configuration menu - View commit details
-
Copy full SHA for 2db7b2d - Browse repository at this point
Copy the full SHA 2db7b2dView commit details -
Configuration menu - View commit details
-
Copy full SHA for e644503 - Browse repository at this point
Copy the full SHA e644503View commit details
Commits on Dec 5, 2020
-
Use map to store ObjectReconstructors
- Switched to using a ConcurrentHashmap for storing the different ObjectReconstructors instead of hardcoding the supported classes.
Configuration menu - View commit details
-
Copy full SHA for 867dd0a - Browse repository at this point
Copy the full SHA 867dd0aView commit details
Commits on Dec 7, 2020
-
Use Class#isHidden to determine method to update packet
This fixes the assumption that target class is always a lambda, while it might not be, thus causing ObjectReconstructor to fail.
Configuration menu - View commit details
-
Copy full SHA for 11d7fb6 - Browse repository at this point
Copy the full SHA 11d7fb6View commit details