Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

How do I submit method names for the deobfuscator?


MacTso
 Share

Recommended Posts

Okay - so as of 1.16.1, some methods which were known are currently obfuscated again.  

How do I submit the methods we are identifying while upgrading our mods to 1.16.1?

 

Thanks!

MacTso

 

Mactso & Lupicus

(Beekeeper, Harder Branch Mining, Nasty Mobs, Regrowth, Enameled Armor, Easy Redstone Extras, Vending Machine)

 

Link to comment
Share on other sites

Thanks for the information!

 

FYI- the player.getPosition() and entity.getPosition() are pretty significant.  if you fix them, you'll save people a lot of coding.

This wrapper made changing the code easier.  Any entity.getPosition() call getBlockPos( entity) until it's deobfuscated.

Quote

    private BlockPos getBlockPos (Entity e) {
        return e.func_233580_cy_();
    }

Note quite as important but some folks might have been using entity.onground  . 
 

Quote

    private boolean isOnGround (Entity e) {
        return e.func_233570_aj_();
    }

The Dimension Number was key to two of my mods..

Quote

        DimensionType dimensionType = p.world.func_230315_m_();
        int dimensionNumber = dimensionType.func_241513_m_();

 

Finally the player chat code looks really noisy with obfuscated code.  You can drop in these "sendChat ()" methods to smooth the noise.

Quote

 

   // This chat method has dark green text by default.

    public static void sendChat(PlayerEntity p, String chatMessage) {
        StringTextComponent component = new StringTextComponent (chatMessage);
        // set to Dark Green 
        Style chatStyle = Style.field_240709_b_.func_240712_a_(TextFormatting.DARK_GREEN);
        p.sendMessage(component.func_230530_a_(chatStyle) , p.getUniqueID());
    }

    // this chat method support for any color 
    public static void sendChat(PlayerEntity p, String chatMessage, TextFormatting textColor) {
        StringTextComponent component = new StringTextComponent (chatMessage);
        Style chatStyle = Style.field_240709_b_.func_240712_a_(textColor);
        p.sendMessage(component.func_230530_a_(chatStyle) , p.getUniqueID());
    }
    
    // this chat method supports any color, optionally bold text.
    public static void sendChat(PlayerEntity p, String chatMessage, TextFormatting textColor, boolean boldText) {
        StringTextComponent component = new StringTextComponent (chatMessage);
        // set to Dark Green Bold
        Style chatStyle = Style.field_240709_b_.func_240712_a_(textColor).func_240713_a_(boldText);
        p.sendMessage(component.func_230530_a_(chatStyle) , p.getUniqueID());
    }

 

 

Thanks for your quick response!  Hope these methods help some other folks.  And maybe someone can get these obfuscated methods implemented soon too.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share



×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.