ModTweaker

ModTweaker

88M Downloads

[Feature Request] Set Tagline when adding Lexicon Entry

lucidobservor opened this issue ยท 0 comments

commented

Issue Description:

Currently, any entries added to the Botania Lexicon using Lexicon.addEntry have a blank tagline (the mouseover text of the entry), and there doesn't exist a way to set this through ModTweaker.

At a glance, it looks like you can extend LexiconEntry and override getTagline() similarly to how BasicLexiconEntry does it, but without all the other stuff that class overrides.

What happens:

When Lexicon.addEntry is called, an instance of LexiconEntry is instantiated. This class has the method getTagline() which always returns an empty String.

What you would like to happen:

ModTweaker should define a class that extends LexiconEntry, similarly to how Botania itself uses BasicLexiconEntry for its own entries. This class should override getTagline() to return a non-empty String. You may just want to copy the way BasicLexiconEntry does it:

@Override
public String getTagline() {
    return "botania.tagline." + super.getUnlocalizedName();
}

If it's done this way, there will be no breaking changes to Lexicon.setEntry, but users will be able to set taglines for their custom entries using a .lang file.


Affected Versions (Do not use "latest"):

Minecraft: 1.12.2
Forge: 14.23.4.2709
Crafttweaker: 4.1.9
ModTweaker: 4.0.12
MTLib: 3.0.5