Jump to content

Recommended Posts

Posted (edited)

I have been modding with the latest MCF version for MC 1.14.2 [1.14.2 - 26.0.63] and finding the level of Obfuscation almost unbearable (It seems to have been getting steadily worse since 1.12).  Are there any tools/workarounds out there to help deal with this (or any notions if/when this will get better)? Or should I just go back to modding 1.12?

 

I keep older versions around to use as reference, but as some of the structure has changed sufficiently that the classes don't always line up without going through long sessions of stare-and-compare.

 

/P

 

bonus question: Is Forge still relying in MCP for code deobfuscation?

Edited by PhilipChonacky
add question
Posted (edited)

Update to 1.14.3 and use the latest mcp snapshot to get up to date mappings. Also, it takes time until all the fields and methods get named, 1.14 is relatively new.

 

Edit: And yes, Forge still uses MCP internally to provide names in development environment.

Edited by m00nl1ght
Posted
  On 7/4/2019 at 4:22 PM, m00nl1ght said:

use the latest mcp snapshot to get up to date mappings.

Expand  

Thank you  - I just figured out how to update the mappings by editing the 'build.gradle' file and rerunning the gradle scripts.  I had been updating Forge, but neglected the mappings.

 

  Quote

minecraft {
    // The mappings can be changed at any time, and must be in the following format.
    // snapshot_YYYYMMDD   Snapshot are built nightly.
    // stable_#            Stables are built at the discretion of the MCP team.
    // Use non-default mappings at your own risk. they may not always work.
    // Simply re-run your setup task after changing the mappings to update your workspace.
    mappings channel: 'snapshot', version: '20190624-1.14.2'

Expand  

 

Posted
  On 7/4/2019 at 7:26 PM, m00nl1ght said:

What do you mean by "compiled" code? The java bytecode? Why?

Expand  

 

i will try an explain better, im trying to figure out how the crossbow works but then i open the compiled .class file all i see inside the method is stuff like this : 

 

    public static int getMiningSpeedup(LivingEntity p_205134_0_) {
        // <editor-fold defaultstate="collapsed" desc="Compiled Code">
        /* 0: iconst_0
         * 1: istore_1
         * 2: iconst_0
         * 3: istore_2
         * 4: aload_0
         * 5: getstatic     net/minecraft/potion/Effects.HASTE:Lnet/minecraft/potion/Effect;
         * 8: invokevirtual net/minecraft/entity/LivingEntity.isPotionActive:(Lnet/minecraft/potion/Effect;)Z
         * 11: ifeq          25
         * 14: aload_0
         * 15: getstatic     net/minecraft/potion/Effects.HASTE:Lnet/minecraft/potion/Effect;
         * 18: invokevirtual net/minecraft/entity/LivingEntity.getActivePotionEffect:(Lnet/minecraft/potion/Effect;)Lnet/minecraft/potion/EffectInstance;
         * 21: invokevirtual net/minecraft/potion/EffectInstance.getAmplifier:()I
         * 24: istore_1
         * 25: aload_0
         * 26: getstatic     net/minecraft/potion/Effects.CONDUIT_POWER:Lnet/minecraft/potion/Effect;
         * 29: invokevirtual net/minecraft/entity/LivingEntity.isPotionActive:(Lnet/minecraft/potion/Effect;)Z
         * 32: ifeq          46
         * 35: aload_0
         * 36: getstatic     net/minecraft/potion/Effects.CONDUIT_POWER:Lnet/minecraft/potion/Effect;
         * 39: invokevirtual net/minecraft/entity/LivingEntity.getActivePotionEffect:(Lnet/minecraft/potion/Effect;)Lnet/minecraft/potion/EffectInstance;
         * 42: invokevirtual net/minecraft/potion/EffectInstance.getAmplifier:()I
         * 45: istore_2
         * 46: iload_1
         * 47: iload_2
         * 48: invokestatic  java/lang/Math.max:(II)I
         * 51: ireturn
         *  */
        // </editor-fold>
    }

[ just a random class from the forge libary. ] 

will that be deoft too at some point is my question. i saw a tutorial for version1.13 where the guy was able to look past it somehow :)

hope this helps

Posted
  On 7/4/2019 at 7:42 PM, m00nl1ght said:

1. Normally you should never need to open a .class file, only .java files.

2. How did you setup your workspace, what IDE are you using?

 

Expand  

1. cant find those. still new to this. i tryed the forge-version-mappedsnapshot.jar (do you need the exact version numbers ?) as that was what a kind youtuber showed. 
2. running it though netbeans with console gradlew commands

Posted (edited)

I have never used NetBeans before, so no idea how source attachments work there.

However, there should be some way to specify the location of the sources.

The file is called something like

forge-1.14.2-26.0.13_mapped_snapshot_20190609-1.14.2-sources.jar

 

Anyway, I recommend using an IDE with gradle integration (for example IntelliJ), because it can automatically attach the sources.

Edited by m00nl1ght
fix typo
Posted
  On 7/4/2019 at 8:47 PM, m00nl1ght said:

I have never used NetBeans before, so no idea how source attachments work there.

However, there should be some way to specify the location of the sources.

The file is called something like

forge-1.14.2-26.0.13_mapped_snapshot_20190609-1.14.2-sources.jar

 

Anyway, I recommend using an IDE with gradle integration (for example IntelliJ), because it can automatically attach the sources.

Expand  

it has gradle support? 

ohh ill check that, thanks :D

 

Posted

hmmm looked around for the file you mentioned under my gradle cache. (whire i found the forge-1.14.3-27.0.23_mapped_snapshot_20190704-1.14.3) assumed it whould be there as well with out any luck. ill try fire up eclipse as that is most people seams too be using (just hate working with it) and i will work my way from there. 

thank you soo much for trying Moon ❤️ 

Posted

If you are using an IDE you should NEVER need to root around in the gradle cache manually, both Eclipse and Intellij link it as a dependency so you can browse it as such

  • Like 1

This is my Forum Signature, I am currently attempting to transform it into a small guide for fixing easier issues using spoiler blocks to keep things tidy.

 

As the most common issue I feel I should put this outside the main bulk:

The only official source for Forge is https://files.minecraftforge.net, and the only site I trust for getting mods is CurseForge.

If you use any site other than these, please take a look at the StopModReposts project and install their browser extension, I would also advise running a virus scan.

 

For players asking for assistance with Forge please expand the spoiler below and read the appropriate section(s) in its/their entirety.

  Reveal hidden contents

 

Posted (edited)

Hmm okay just ran the gradlew eclipse command, opened eclipse and now i can see some source files. all good, opened the same file back in netbeans and that is linked perfect as well. 
 

Name	forge-1.14.3-27.0.20_mapped_snapshot_20190704-1.14.3



file : GLX from pacage package com.mojang.blaze3d.platform; 
[Removed]

 

that is all good and pretty, however 

some other files under package net.minecraft.state for example is still  the compiled jiberish. 

[Removed]


im calling it a nigth and concluding that the mapper and forge it self is still in beta and i should properly wait untill a stable release, thank a lot guys i learned some new thing here that hopefully will make the error fixing easyer in the future.

 

Edited by DaemonUmbra
Removed Mojang Code
Posted

I've noticed that on 1.13+ the sources don't always get attached properly for every file (or IntelliJ is doing its indexes wrong).
IntelliJ comes with a built-in decompiler so this isn't really an issue for me though. Eclipse also has a decompiler plugin that you can install.

About Me

  Reveal hidden contents

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted

Just wanted to add this one last item:

 

MCP mapping lists can be found here: http://export.mcpbot.bspk.rs/snapshot/

Modify the "Mappings Channel" line to match the datecode part of the snapshot name

(This applies to MC 1.13 and newer)

 

Example:

if the line reads:  mappings channel: 'snapshot', version: '20190704-1.14.3'

and the snapshot export name is: mcp_snapshot-20190706-1.14.3.zip,

then modify the line to read:  mappings channel: 'snapshot', version: '20190706-1.14.3

 

  • 3 weeks later...
Posted

HAHA finally figured out something that reliably works for not eclipse users. 

if using VS Code add in the "Java extension pack." that gives amoung other thing the ability to bind the forge code and deofuscate the whole thing. :D

hope this can help others

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.