Logistics Pipes

Logistics Pipes

13M Downloads

Missing WAILA tooltip

thedoo opened this issue ยท 12 comments

commented

Not sure which dev this has to go to so I put it on both WAILA's and here.

WAILA does not show which mod the Logistics Pipes items come from, just shows the name of the item.

commented

What do you mean by that?

commented

If you are using NEI with WAILA installed, it shows you where each block in the game comes from in the tooltip when you hover over the item in NEI. When I look at the LogisticsPipes items, it only displays the name of the item, not what mod it comes from.

I'll be able to add a screenshot later if need be. EDIT: Added

screen1
This is what WAILA normally shows for every mod I've used so far, you can see the mod name in the tooltip.

screen2
This is what the LogisticsPipes items show, notice that no mod name shows up.

commented

how does NEI know where the item comes from, does it reads that from a mod provided file?

commented

@AEnterprise I get that you are trying to help, but you aren't helping at all.

commented

@GUIpsp sorry, i just don't know sure how it works so i'm asking it

commented

From what I could tell:

public List<String> getWailaTail(ItemStack itemStack, List<String> currenttip, IWailaDataAccessor accessor, IWailaConfigHandler config) {
        String modName = ModIdentification.nameFromStack(itemStack);
        if (modName != null && !modName.equals(""))
            currenttip.add(BLUE + ITALIC + modName);

        return currenttip;
    }

That is the code in WAILA that adds the mod name to the tooltip.

Here is the code that actually retrieves the name:

public static String nameFromStack(ItemStack itemstack){
        try{
            String modID = itemMap.get(itemstack.itemID);
            ModContainer mod = CommonUtils.findModContainer(modID);
            String modname = mod == null ? modID : mod.getName();       
            return modname;
        } catch (NullPointerException e){
            //System.out.printf("NPE : %s\n",itemstack.toString());
            return "";
        }
    }

He uses ChickenBones CodeChickenCore CommonUtils:

public static ModContainer findModContainer(String modID)
    {
        for(ModContainer mc : Loader.instance().getModList())
            if(modID.equals(mc.getModId()))
                return mc;

        return null;
    }

Which in turn just uses Forge's built in functions of retrieving the ModContainer from the modID. The ModContainer contains a function for getting the name with getName().

Seeing as this is the only mod from the 200+ I've tried, I don't think it is an NEI issue. It seems to be that either the name that gets returned from the modID for LogisticsPipes is either null or empty for some reason, so WAILA does not add the mod name to the end of the tooltip and just passes the item name.

commented

Well.. Forge keeps track of which item is from which modID, so I imagine it wouldn't be too hard to track which item is from which mod...

commented

so my question is: does NEI asks forge who registered that ID or does it gets that info from a seperate file the mod author has to provide? if it is a seperate file, where can you find the explanation/format to make one? then i'll make one. Otherwise report this to NEI

commented

Ok, looks like it was an Item ID conflict which made the mod name not show up. Sorry for the report.

commented

While I still will consider this closed for now, I found that it wasn't an item ID conflict, but some kind of mod conflict interaction between Logistics Pipes and JABBA which was causing the mod name to disappear from the tooltip in WAILA. Not sure what the issue could be, but I've put a report in to ProfMobius to see what he says.

commented

i don't understand how/why JABBA would mess with the modID of logistic pipes

commented

I don't know either but it is easy to reproduce. All you need is WAILA, JABBA, and Logistics Pipes + their dependencies. I've seen this in FTB Monster and Resonant Rise on the ATLauncher.

Here's my report to ProfMobius: https://bitbucket.org/ProfMobius/waila/issue/8/no-tooltip-logistics-pipes