Buildinggadgets: Allow drawing items from player storage

Created on 14 Jan 2019  路  5Comments  路  Source: Direwolf20-MC/BuildingGadgets

https://github.com/MrRiegel/PlayerStorage

I am not sure how you would do it but it would be nice if you @Direwolf20-MC and @MrRiegel could work something out that would be awesome! Truly you guys are modding gods.

bug incompatibility third party issue

Most helpful comment

So this isn't on my end, right @Phylogeny -- closing :)

All 5 comments

This is either a bug in Player Storage or in Lime Lib, on which it relies. The tooltips for items in the player storage GUI are being rendered with empty stacks. You'll find that getStack in RenderTooltipEvent.PostText returns an empty one for both vanilla and modded items -- for every item in an extended storage slot, in fact.

Please report this bug on one or both of the repos for those mods.

Um - what?! XD I am confused maybe you should break it down for them @Phylogeny

No problem.

For each extended storage slot, mrriegel.playerstorage.gui.GuiExI#drawscreen is calling mrriegel.limelib.gui.element.AbstractSlot#drawTooltip, which is in-turn calling GuiUtils#preItemToolTip to set the cached stack, then GuiUtils#drawHoveringText to draw it. It appears the problem is that an empty stack is being passed to GuiUtils#preItemToolTip, rather than the actual stack that the tooltip is being rendered for. Since the stack's ITemplate item is used to retrieve the items to be rendered in RenderTooltipEvent.PostText, nothing is found to render.

What's certain is that RenderTooltipEvent.PostText#getStack returns an empty stack for all AbstractSlots in GuiExI.

So this isn't on my end, right @Phylogeny -- closing :)

That's right, it's not at all on your end. :)

Was this page helpful?
0 / 5 - 0 ratings

Related issues

wain99 picture wain99  路  3Comments

sonolumin picture sonolumin  路  5Comments

matsaa93 picture matsaa93  路  7Comments

WenXin20 picture WenXin20  路  4Comments

MichaelHillcox picture MichaelHillcox  路  7Comments