Mojang / slicer

Resource pack migration tool for Minecraft 1.14
MIT License
174 stars 7 forks source link

Leftover files seemingly unclear as to what regions are unused #9

Open muzikbike opened 7 months ago

muzikbike commented 7 months ago

Here's a 1.20.1 inventory.png over which I have artisanally scribbled: inventory

The output files are pretty much as expected - the normal vanilla files, plus whatever the scribble changed. Notably, nothing outside of the inventory window is carried over into the new copy of inventory.png. inventory effect_background_large effect_background_small effect_background effect_background_ambient

My issue is with the leftovers files, which indicate which parts of a file were split into other files. In the case of inventroy.png and quite a few others, the entire file has a red tint, which is unexpected since, as mentioned previously, all of the empty transparent space in the outer reaches of inventory.png isn't used anywhere in game and isn't carried over into the newly split version of inventory.png. inventory

For comparison, here are copies of icons.png and widgets.png's remainder files, as they appear when you use slicer on default vanilla assets. In this case, none of that unused outer blank area is tinted red, because none of it is actually used. This is what I'd expect for the blank area outside of inventory.png as well, but that isn't the case. Am I misunderstanding what the red shading is supposed to mean, or is this indeed incorrect behaviour? icons widgets

satanicantichrist commented 7 months ago

This happens because of double creation of the leftover file. In this version of the tool, it firstly generates the new files (except of the container texture it self). Then it makes almost correct leftover file. But then it clips the container texture to new file and creates wrong leftover file as you mentioned.

I fixed it here in my fork. It should correctly show the leftover file.

muzikbike commented 7 months ago

Would it at all be possible to fix this in the main slicer via pull request?

satanicantichrist commented 7 months ago

It would, but i dont think they will merge it. Now There is opened pull request for Bug that prevents you using the tool at all, and still its not merged.

muzikbike commented 6 months ago

@satanicantichrist It just got accepted in, so there's no time as good as the present to be making such a request I'd say