Tetra

Tetra

12M Downloads

[Bug] Waila tooltips for javelins

moonfather1 opened this issue ยท 6 comments

commented

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

  1. 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

commented

Not a big deal but it should say the correct name.

What is the correct name?

commented

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.

commented

...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);
        }
commented

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))

commented

.. 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.

commented

the name of the item stack (while in inventory).

That doesn't add up for me? The name of the itemstack is dynamic based on its modules, but waila displays a static value taken from a localization file (entity.tetra.thrown_modular_item).