Skip to content

Obfuscated names of constructors for classes where there are multiple matching names are incorrect #373

Closed

Description

@Pokechu22

That title's a bit of a word spaghetti, so here's a sample (emphasis mine):

02:44:59     pokechu22 | findallm I18n
02:44:59 MCPBot_Reborn | +++ METHODS +++
02:45:01 MCPBot_Reborn | cae.dp => I18n.I18n()V [ I18n()V ]
02:45:01 MCPBot_Reborn | dp.dp => I18n.I18n()V [ I18n()V ]

There are 2 classes named I18n:

02:52:54     pokechu22 | gc I18n
02:52:55 MCPBot_Reborn | === MC 1.11: I18n ===
02:52:55 MCPBot_Reborn | Notch        : dp
02:52:55 MCPBot_Reborn | Name         : net/minecraft/util/text/translation/I18n
02:52:55 MCPBot_Reborn |
02:52:55 MCPBot_Reborn | === MC 1.11: I18n ===
02:52:55 MCPBot_Reborn | Notch        : cae
02:52:55 MCPBot_Reborn | Name         : net/minecraft/client/resources/I18n

It seems that the obfuscated name is using the wrong class name. This only affects the display in MCPBot, since constructors aren't remapped (in fact, they're named <init> in the bytecode), so there is no name to remap. However, it's definitely a bug.

Activity

  1. bspkrs commented on Mar 28, 2017

    @bspkrs
    Contributor

    Fixing this properly would require a data model change due to the way that the MCP data is represented in the bot database. I can, however, most likely fix this in the bot output. Just have to make sure I find all the places that it can happen.

  2. bspkrs commented on Mar 28, 2017

    @bspkrs
    Contributor

    Oh... or I can fix it in the view that everything reads from! That will be much easier to fix.

  3. bspkrs commented on Mar 28, 2017

    @bspkrs
    Contributor

    Fixed and live. Please take a look at obf method names in the bot output, though, to make sure the fix did not screw anything up. Basically I just changed the db view to return the class obf name instead of the method obf name only for constructors.

  4. Pokechu22 commented on Mar 28, 2017

    @Pokechu22
    Author

    Looks good to me. Can you push that commit to profmobius/MCPBot?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions