Closed CyberFlameGO closed 1 day ago
I do not think reflection is the way to go here, especially considering that some of this code could run multiple times per tick. (And if we did we did go the reflection route I'd want to use cached MethodHandles).
I think the best route here is using a provider, I will open a PR with this shortly. Thanks for looking into this anyway.
Information
This PR fixes #5851.
Details
Proposed fix:
Get the top inventory via reflection, and get the bottom inventory via getting clicked inventory rather than via view.
Environments tested:
Will test later on and populate these fields - just drafting the PR for review
OS:
Java version:
Demonstration:
N/A - if this PR will work then there is nothing to screenshot other than lack of exceptions in logs