Skip to content

Support for getDeclaredField and Class#forName in reobfJar #207

@PlayerSchark

Description

@PlayerSchark

Due to some nested classes in NMS are package-private it should be possible that Class#forName and Class#getDeclaredField are supported by the reobfJar task.

Example:

Class.forName("net.minecraft.network.ConnectionProtocol$PacketSet").getDeclaredField("classToId")
should be reobfuscated to:
Class.forName("net.minecraft.network.EnumProtocol$a").getDeclaredField("b")

or:

Entity.class.getDeclaredField("tickCount")
should be reobfuscated to:
Entity.class.getDeclaredField("ag")

It seems that SpecialSource already supports it in its RemapperProcessor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions