Issue #117 still present for the 1.17 branch for Fabric.
Ynaught opened this issue ยท 8 comments
Both in versions 2.0.0 as well as 2.1.0.
Only differences from the #117 report are:
- "The space for it, however, is there." does not apply here. The space for it does not show either.
- This is referring to MC 1.17/1.17.1 (not mc 1.16.5).
- This is referring to Fabric (not Forge).
Examples (Apologies for the resource pack):
- REI Menu: https://i.ibb.co/yYPGD9q/image.png
- Vanilla Inventory Menu: https://i.ibb.co/0my9xmP/image.png
Versions used in Screenshots:
- RoughlyEnoughItems-6.0.264-alpha-fabric (This is the latest "Ready" build currently of writing this.)
- appleskin-fabric-mc1.17-2.1.0
- cloth-config-5.0.34-fabric
- architectury-2.2.21-fabric
- fabric-api-0.37.0+1.17 (a single version behind at the time of writing this, it was updated 3 days ago as of writing this. Updating it to that newer version of fabric-api-0.37.1+1.17 does not solve the issue nor seem to effect it any differently.)
- fabric-loader-0.11.6-1.17.1
Side note:
I don't use github that often so I'm not entirely sure what all information I am supposed to provide here to aid this thread further.
REI has changed ItemStack.getTooltip
to ItemStack.getTooltipLines
, so we hook is failed
In REI 6.x, REF using architectury as the compatible platform. It will be compatible with Fabric/Forge at the same time, but its code is very different from Fabric/Forge.
For example:
in fabric: net.minecraft.ItemStack.getTooltip
in architectury: net.minecraft.world.ItemStack.getTooltipLines
If want to solve this problem, maybe need to provide a special version of architectury.
The problem doesn't seem to be with getTooltip
--net.minecraft.world.ItemStack.getTooltipLines
is just a different mapped name for the same function. TooltipOverlayHandler.onItemTooltip
gets called and AppleSkin adds its FoodOverlayTextComponent
successfully, but then REI does its own conversion to TooltipComponent
s here. This bypasses AppleSkin's injection of its own conversion in the ScreenMixin:
AppleSkin/java/squeek/appleskin/mixin/ScreenMixin.java
Lines 22 to 40 in 0831fd8
The best fix here would be to mixin TooltipComponent::of
instead which should be possible as of FabricMC/Mixin#51. I'll try that out (need to figure out what version of Fabric its included in first though).
EDIT: Nevermind, looks like Fabric's Mixin with that PR included hasn't been released/included in any Fabric release yet, so we'll have to go with another fix. The simplest might be to mixin REI's render tooltip method in the same way we mixin Screen.renderTooltip
.
So, if I'm reading this right, the issue is that the GUI is being replaced or something like that and that replacement is not something you can manipulate, correct?
Would it not be possible to replace the replacement? Say just have your own version of it pop-up over top of all of it as an above layer? Might look a bit messy and be a bit sloppy of a solution, but is this a possibility?
Found a solution: da1a149
Will try to release a fixed version soon.
I'll give it a test within the next 24hrs and report back on how it goes just to make sure everything's square.