Tech Reborn

Tech Reborn

30M Downloads

No icon on the Scrapbox REI tab

BernardoGrigiastro opened this issue ยท 14 comments

commented

No icon on the Scrapbox REI tab

Fabric 1.18-rc4
TR 5.1.0 b2

same thing on earlier 1.18 versions of both ^^

commented

image

commented

I see why. But think its beyond my capability to fix it (tried looking in the mod files & folders, but I'm guessing its declared in one of the class files somewhere.
image
โœ”
image
โŒ

commented

Ah, I was in construction of Scrap-inator, not use of Scrap. Symbol is displayed, problem does not occur on head of Github version I think.

excerpt

commented

... explain?
excerpt
Why do you have these weird (old?) metal plate textures?

I'm using latest mod snapshot and already changed it a bit, but that doesn't explain the different textures.

Or did I already fix by accident? I doubt it,

commented

ha, they are MI textures :)
think you broke it completely now, there is no tab at all!
removed MI to check, see this image.
image

commented

image
Still occurring for me on a version i just build from 1.18 master.
๐Ÿคทโ€โ™‚๏ธ

commented

same here

2021-12-19_20 50 24

commented

Can't reproduce in dev.

image

commented

I have this issue as well

commented

this is so strange.. must be some other mod interfering..
build latest in dev as of commit 347117b it works fine,
if i launch on beta5 release, its not fine ๐Ÿคทโ€โ™‚๏ธ

commented

Funnily enough, the error has maybe nothing to do with the scrapbox/scrap_box inaccurancy I think. I changed all occurances to scrap_box and the error persists. I think I mostly tracked it down though (just ignore wrong _ in the following, as I debugged in my corrected code):

In line 117 of TR's ReiPlugin the icon is registered via TRContent.SCRAP_BOX. This is done during MC Startup.

What interests us is the renderer field of REI's TabWidget class. One can check that by breaking at TabWidget#render(...), which is called continuously when a recipe is viewed via REI.

The renderer field is not set at construction, but lazily when needed. Two classes make use of TabWidget#setRenderer(...), the one that breaks when trying to render the scrap box in the tab is REI's CompositeDisplayViewingScreen#init(). There we call TR's AbstractMachineCategory#getIcon().

That method then uses the initially set-up, static iconMap field in TR's ReiPlugin and feeds the corresponding entry to REI's EntryStacks.of(...).

And now I have the icon. Wait, what? Yeah, the tab icon is definitely here... Let's test in Run. No icon, aha. Let's test in debug again. No icon. Cool.

Have fun with this. I swear the icon was there once. Will commit my stuff as "fixes sometimes"

commented

On the other hand, I am convinced this is happening either because Scrap Box is not a block or because SCRAP_BOX is only a static field in TRContent instead of an enum entry like all the machines, because these are the only differences to the other tabs. 100% convinced this would work if we used the Scrapinator instead of Scrap Box as icon.

commented

Do you have MI alongside with TR?

commented

No, my mods folder in run is empty