[Request][Mod Interaction] Method/Interface/API Hook to make WAILAPlugins ignore certain block or TileEntity types
ReikaKalseki opened this issue ยท 20 comments
For some reason, WAILA plugins breaks the tooltips on all of my TileEntities. Repeated attempts to find the cause have failed, and in light of the fact that I handle everything on my end - including any data, like a fluid info tag, that WPlugins might offer - I think it would be better to just make it not do anything with my blocks.
Ideally, it would be an instanceof check on the block or the TileEntity (and thus I only need to make their ultimate parent implement the interface). Registering each block individually also works, but will mean about 50 blocks being registered between six mods. Registering TileEntities individually also works, but then you are looking at 400+ entries.
I think I found the real cause. I have had some issues with WAILA adding my data multiple times per tooltip (calling getBody() multiple times per cycle) and I fixed it (after several other fixes stopped working) by not adding the data if there was already that data there. If you add a mod that adds extra data (which is apparently tricking it), it assumes it already added my data and stops. I will just clear the tooltip (since I handle all the relevant data anyways).
Why would you clear out all the data? Many waila plugins add stuff that you do not handle. If you want to remove specific things used the tagged list.
Again, tagged list does not exist in the WAILA version I am forced to build against, and no, I do not know of anything that is not handled on my end that is given by any of the plugins I know of.
ITaggedList is just an interface added later. You can just cast to TipList. What you are doing is BAD, there are tons of addons that add things to all blocks in the game (WAILA Harvestability, WAWLA, this mod) and you are breaking them.
You can just cast to TipList
That requires internal WAILA code accessible in my dev environment. I do not want WAILA source as a compile-time dependency.
What you are doing is BAD
Yes, but it is my only option (short of just allowing 4x tooltip duplication again).
there are tons of addons that add things to all blocks in the game (WAILA Harvestability, WAWLA, this mod)
The latter two add nothing that I do not handle, and harvestability returns the wrong data because of my harvesting mechanics. So...nothing of value.
It's not your only option. Your only option is to then stop registering your blocks multiple times...
You must be. Multiple registrations to different supertypes of a block will cause it to run multiple times.
That it would, but I do not do that. The closest I do is using a class more than once (since multiple blocks share a class).
That's what I mean. If you register a handler for, say, IFluidHandler
, and MyTileEntity
, and your TE class both extends MyTileEntity
and implements IFluidHandler
it will run twice.
No, what I mean is like registering blocks A and B, both of whose classes extend C.
However you haven't given me any details so I can't really help.
What details would be useful? Aside from Forge version (1291, by the way), and which I tried changing with no effect, I do not see anything that could cause it.
We are not getting anywhere here. The way I see it, this issue should be trivial to debug on your end. Simply break point inside your WAILA handler and see why X isn't being added. If it is caused by my mod, I'll fix it, but as of right now I see no way it could be.
I don't see how WAILA Plugins could be "erasing" data from your blocks. The only thing it removes is the tank plugin for TE that WAILA adds. If you are getting duplicated fluid handler data you can remove mine with the tag "IFluidHandler"
I don't see how WAILA Plugins could be "erasing" data from your blocks.
Neither do I, but multiple players have independently reported that removing the mod fixes it.
If you are getting duplicated fluid handler data you can remove mine with the tag "IFluidHandler"
The WAILA version I build against is not that new (the new one refuses to load in the dev environment).
The WAILA version I build against is not that new (the new one refuses to load in the dev environment).
What? ITaggedList is part of WAILA since a LONG time ago. Also, 1.5.10 works fine.
Why?!? It should be yes...but why are you so outdated? How can you possibly reliably test anything?
As I said, anything newer refuses to load in the dev environment. More specifically, it throws an error saying it needs a newer NEI version (despite the newer versions allegedly being NEI independent) and that newer NEI version itself crashes the dev environment, something to do with its ASM.
If you are loading with 1.5.3 you cannot expect WP to work properly. It is built to run on 1.5.10. Please repeat this issue on 1.5.10 then maybe you can debug it properly.
I run NEI/CCC/WAILA all latest in my dev environment, so there must be something specific to yours that is causing a problem. However you haven't given me any details so I can't really help.