Vanilla moved almost all relevant render methods into RenderContext.
The previous ScreenMixin.convertTooltipComponents was moved into the new RenderContextMixin.
The logic for detecting the hovered over item also changed.
DrawContext has a drawItemTooltip method taking an ItemStack, but that one isn't actually used for mouse hover tooltips for some reason. The latter code is instead found in HandledScreen.drawMouseoverTooltip, which is now where the enchantedItemStack is set.
Looking at it a bit further, DrawContext.drawItemTooltip is apparently used in the MerchantScreen and StonecutterScreen - I'll see if I can add logic to that as well as it seems handy having the tooltip icons all features for merchants as well.
Based on the previous PR, so merge that first.
Vanilla moved almost all relevant render methods into
RenderContext
. The previousScreenMixin.convertTooltipComponents
was moved into the newRenderContextMixin
.The logic for detecting the hovered over item also changed.
DrawContext
has adrawItemTooltip
method taking an ItemStack, but that one isn't actually used for mouse hover tooltips for some reason. The latter code is instead found inHandledScreen.drawMouseoverTooltip
, which is now where theenchantedItemStack
is set.Looking at it a bit further,
DrawContext.drawItemTooltip
is apparently used in theMerchantScreen
andStonecutterScreen
- I'll see if I can add logic to that as well as it seems handy havingthe tooltip iconsall features for merchants as well.