Hwyla

Hwyla

86M Downloads

[1.14.1Fabric] (Mod support) How do you get the name of the block?

matjojo opened this issue ยท 1 comments

commented

I'm trying to get support for HWYLA into my mod (Desire Paths) I currently have the block set to drop their 'base' block, and that seems to be the name that HWYLA gives my blocks.

The blocks in my mods are states 'between' grass(or Mycelium/podzol) and dirt. They are not supposed to drop themselves. But they are supposed to 'be' Grass(...) until they move along to dirt completely.
I don't have that much time on my hands, so I did take a quick look through the code here on the repo but couldn't find where you get the name of my blocks. Knowing where that is will probably help me figure out how I can give you the correct name.

commented

Names are added to the tooltip here
https://github.com/TehNut/HWYLA/blob/9fb3bc44d821a9254e54c21c478f9d2acf65859e/src/main/java/mcp/mobius/waila/addons/core/HUDHandlerBlocks.java#L28

If you want to override that, you can register your own IComponentProvider to TooltipPosition.HEAD, apply it to your block class, and replace the waila:object_name tagged line the same way Hwyla adds it above.