Chicken-Bones / NotEnoughItems

MIT License
130 stars 129 forks source link

Assistance with screen capture? #353

Closed andrewminer closed 8 years ago

andrewminer commented 8 years ago

I'm the author of the Crafting Guide website, and I'm trying to make a mod to dump out all the data which I need for the site. For a long while now, I've used NEI's item dumper to get the images I need for the site, so when I started creating my mod, I figured I'd use the code from NEI to do the same for my mod (with proper attribution, of course).

However, I'm running into a problem that while everything seems to render, items—or portions of items—with a glint effect simply don't show up in the saved image files. Here's an example:

screenshot-4

What I do notice is that when I'm in the game and run my command, the drawn items show up on the screen and look correct (i.e., all the potions are properly filled in). So, I'm fairly convinced the problem is in my transcription of your code to actually capture the screenshot itself.

Unfortunately, I'm at my wit's end as to how to solve the problem. I've compared my code with yours line by line quite a few times, and dug around in the RenderItem, Framebuffer code, and everywhere else I can think of. I'd be most grateful if you could take a few minutes to offer any advice on where I'm going wrong.

Thanks!

andrewminer commented 8 years ago

For some reason, this change seems to fix things. I'm not sure why replacing the call to renderItemAndEffectIntoGUI with just renderItemIntoGUI should fix this problem, but my guess would be that it has something to do with which graphics buffers are used behind the scenes. Perhaps the former draws into a buffer which isn't accessible to the screenshot code? Anyway, if you could offer any insight, it will still be much appreciated, even though the problem itself is solved!