[Forge] Item names are being used where block names would be expected
muzikbike opened this issue ยท 6 comments
Currently, when aiming at a block which does not have a direct item equivalent, a closely related item will be shown instead. This works well for the image, since there isn't an associated item model present in the game to be rendered here, however the text string used is that of the related item, rather than the actual block, which is wrong - the name of the block should be used instead.
The names of blocks are indeed present within the files, which can be tested by using the following command
/give @p minecraft:stick{CanDestroy:["minecraft:potted_cactus"]}
and reading the resulting item's summary, revealing that it can indeed break Potted Cactus, instead of just Cactus.
The expected behaviour here would be that in the first picture, the cactus item model would be shown as it is currently, but the name shown next to it would be Potted Cactus, rather than just Cactus.
The edge cases of this misnaming in vanilla are few and far between. It'd be better to just special case objects such as flower pots. Hwyla already provides an API for mods to override the shown item.
It is definitely possible from a technical standpoint but will require rewriting some of Hwyla's internals I think. I will look into it for a secondary pull request.
That should be sufficient, as the name is the only thing really at fault here.
Somewhat unrelated, but for blocks that don't have any associated items at all like end gateway blocks and (when made targetable in 1.16) fire, can they still be made to display the box, but without the icon, only the block's name and the mod it's from?
Just checked the latest fabric build for 1.16.1, and it looks like this bug is completely gone, and everything uses the block name instead of the item name in basically all cases (so redstone displays as Redstone Wire, placed tripwire as Tripwire, all crop types as their crop names instead of seeds, and so on). The only issue is that there seem to be some minor inconsistencies with wall variants, as wall coral fans still include the word Wall whereas wall variants of heads, signs and the like use their normal block names (is there a config somewhere for this where we can blacklist certain blocks from using their true name and force them to use the item name instead?)
So basically the only thing remaining is the other issue I mentioned above, which to the best of my knowledge affects the nether portal block, end portal block, end gateway block, fire, soul fire and frosted ice.
I don't know if the forge and fabric builds are fundamentally different from the bottom up though, so basically what I'm saying is the current 1.16.1 fabric build has the expected behaviour for such blocks, whereas forge 1.15 does not.