ThexXTURBOXx / BlockHelper

Basically WAILA for b1.2_02-1.5.2
https://modrinth.com/mod/block-helper
MIT License
8 stars 3 forks source link

Thaumcraft - Nitor texture incorrect #17

Closed octanervoc closed 3 months ago

octanervoc commented 8 months ago

Hello. It seems that, for the Nitor texture, BlockHelper uses the "Unnamed" Thaumcraft 3.0.3 texture. NEI's Waila-like function (Highlight tips shown) shows the item sprite instead. See screenshots. As always, keep up the good work.

2024-01-27_19 33 03 2024-01-27_20 00 28

ThexXTURBOXx commented 8 months ago

Hello, sorry, I am still a bit sick, so I cannot really work on this yet. I found a major difference between Block Helper and NEI: Block Helper tries to show the exact ID and name of the block that is being looked at. This is necessary in order to retrieve extra information such as stored energy, maturity state (for crops) etc. NEI will only show the block or item name you obtain when middle-clicking the block (creative mode block picking). Implementing this in Block Helper will have a major caveat: If this block differs (which it will for many), extra information cannot be shown anymore. A workaround could be to just render the block and keep everything else as-is. However, then for some blocks, there might be wrong names and it will basically be the same bug fix - but this time for the name. Eventually, we have two entirely different systems for determining names and icons and another one for the extra information. I am not sure what to think of this for now...

Maybe, there is some better way?

octanervoc commented 8 months ago

No problem, good recovery.

Maybe, for very specific edge cases like this, there could be a config file option for the user to override the displayed texture via item/block IDs. For instance, in a ID:meta (block looked at); ID:meta (wanted block/item) format:

BlockHelper.cfg:

[snip]
# Manual overrides for displayed textures:
{
475:8; 999:1
}

That way, specific IDs don't need to be hardcoded into the mod itself and the user may change the displayed texture to whatever they want.

ThexXTURBOXx commented 3 months ago

I followed your suggestion and added a config option similar to yours. It looks a bit different, though: 6:4-5,5-7,7:*-4:4 maps ID 6:4 to 5:0, 5:0 to 7:0, and all ItemStacks with ID 7 and any metadata to 4:4 Thanks for your suggestion :)