[Bug] Waila tooltips for javelins
moonfather1 opened this issue ยท 6 comments
Observed behaviour
Throw a javelin at a block. Get close enough to activate Waila info, but not close enough to pick up.
Info says entity.tetra.thrown_modular_item
Expected behaviour
Not a big deal but it should say the correct name.
Steps to reproduce
- Throw a javelin at a block. 2) Get close enough to activate Waila info, but not close enough to pick up. 3) Look at the javelin.
Crashlog
No response
Tetra version
1.20.1-6.1.0
mutil/mGui version
mutil-1.20.1-6.1.1.jar
Forge version
1.20.1 - 47.1.43
Other mods
Jade 11.6.3
What is the correct name?
the name of the item stack (while in inventory).
trident-based entities have an ItemStack field inside. get that item's hover text.
...then maybe make a plugin for the one probe. those are registered via IMC. otherwise similar.
if (ModList.get().isLoaded("theoneprobe"))
{
InterModComms.sendTo("theoneprobe", "getTheOneProbe", TOPRegistration::instance);
}
make a jade plugin (@WailaPlugin annotation, implements IWailaPlugin), override registerClient, call registerEntityComponent.
in provider class (IEntityComponentProvider) override appendTooltip, add(tooltip.getElementHelper().text(spear.storedItemStack.getHoverName())) and add(tooltip.getElementHelper().item(spear.storedItemStack))
.. then make wthit plugin (no annotation, implements IWailaPlugin but from a different namespace). to register it make waila_plugins.json in resources dir. in the plugin, similarly override register and add an inner class.