Make Magnifying glass respect addon mods
Vexatos opened this issue ยท 7 comments
Currently, the Magnifying Glass only prints the owner of the block if it's a RailcraftTileEntity. I'd like it to use IOwnable instead. Since you cannot call getName()
on those, I recommend either adding a new interface INameable
to the API or a getName()
to IOwnable. Otherwise, maybe default to the localized block name if INameable
can't be found.
I think here will be two variables: IOwnable tile
and TileEntity t
. So we could use some way to get the localized name on the variable t
? And print the name of the GameProfile
of the tile
.
There is a bigger problem...this is currently utterly broken (#407). The server can't localize things and the client doesn't have the necessary info, so the messages are not properly localized right now.
The only way I can think to fix it is to create a new chat packet.
@CovertJaguar player.addChatMessage(new ChatComponentTranslation("the.chat.key", the, format, parameters))
Done. Will automatically be localized once arrived on the client. Mind that it may have children.
Oh, I had no idea you could nest them. The chat code after Mojang's last rewrite was unintelligible to me. =P
@Vexatos Um...I tested your PR. It doesn't work....
In fact it breaks all my chat messages...probably because my localization strings use a custom format.