Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
At the moment GTNewHorizons/GTNHLib#81 breaks this Mixin because
drawHoveringText()
is no longer called in many cases. By making the mixin a bit more lenient, the mixin in GTNHLib can be converted to an@Overwrite
mixin, with these two requirements:int
variables untilif (textLines.size() > 1)
must be the same as in the vanilla implementation to ensure the correct variables are capturedthis.zLevel = 300.0f;
tothis.drawGradientRect(j2 - 3, k2 - 4, j2 + k + 3, k2 - 3, j1, j1);
k
,k2
,j2
andi1
must not be modified to ensure that the values of the captured variables are correctRemoval of
ObfuscationReflectionHelper.remapFieldNames()
The previous usage was incorrect.
ReflectionHelper.findField()
takes multiple field names and returns the field of the first name it finds.ObfuscationReflectionHelper.remapFieldNames()
remaps all passed in names to the currently used names. In this case it would return an array of three times the same name (the correct one). Even though this works, it is not necessary.Code comparison
Before
After
Diff
https://www.diffchecker.com/qVdFcRxx/