Jump to content

Has forgeSrc been 100% completed for 1.12.2 yet?


EM3R50N

Recommended Posts

Apologies if this is in a FAQ somewhere else - point me there again if so - but how can modders find out if a forgeSrc is 100% finished for a specific Minecraft version yet or not?

 

I ask because as I was trying to update one of my mods yesterday from 1.12 to 1.12.2, I encountered missing methods in the 1.12.2 forgeSrc jars (I tried a few different releases: 2703, 2705, 2759).  If I dug down into the source I could eventually find the methods (but they had obfuscated method names like: func_178086_a(), func_77655_b() and func_77625_d() for example. 

 

Basically I'm trying to confirm if these new missing methods have been deprecated or just haven't been mapped/finished in forgeSrc yet.

 

Thanks and again my apologies if this is in a stickied/FAQ somewhere - I did look a bit first.

Link to comment
Share on other sites

1 hour ago, EM3R50N said:

Apologies if this is in a FAQ somewhere else - point me there again if so - but how can modders find out if a forgeSrc is 100% finished for a specific Minecraft version yet or not?

 

I ask because as I was trying to update one of my mods yesterday from 1.12 to 1.12.2, I encountered missing methods in the 1.12.2 forgeSrc jars (I tried a few different releases: 2703, 2705, 2759).  If I dug down into the source I could eventually find the methods (but they had obfuscated method names like: func_178086_a(), func_77655_b() and func_77625_d() for example. 

 

Basically I'm trying to confirm if these new missing methods have been deprecated or just haven't been mapped/finished in forgeSrc yet.

 

Thanks and again my apologies if this is in a stickied/FAQ somewhere - I did look a bit first.

those are mapping issues. you could simply fix this by updating your mappings. If they are still obfuscated it means they don't have  name for it yet and then you report it to mcp

  • Thanks 1
Link to comment
Share on other sites

Thanks nullsection76 and Oen44. It just seemed odd those methods weren't mapped as I would consider them fairly important ones.  I was thinking maybe they, as you guys said, just weren't mapped yet - but:

  1. I wasn't sure if / how we were to report these to MCP (or fork/pull request ourselves?)
  2. And also I wasn't sure if it was a good idea to ship my mod with those non-mapped/obfuscated methods or if I should wait till they are mapped.

By the way for the record here are the methods before/after (so far):

// 1.12.2: Unmapped methods? --> Item.setMaxStackSize, Item.setUnlocalizedName and ItemModelMesher.register

// BEFORE (in 1.12):		
myItem = (myCustomItem) new myCustomItem(7,1.0F,false,"Custom Item Name",true).setUnlocalizedName("Custom Item Unloco Name").setMaxStackSize(8);
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().register(...);

// AFTER/NOW (non-mapped):  
myItem = (myCustomItem) new myCustomItem(7,1.0F,false,"Custom Item Name",true).func_77655_b("Custom Item Unloco Name").func_77625_d(8);
Minecraft.getMinecraft().getRenderItem().getItemModelMesher().func_178086_a(...);

 

 

Link to comment
Share on other sites

It makes no difference, mapped methods get un-mapped during the build process of your mod so they properly target vanilla methods outside of your development environment.

If you're working with 1.12.X I recommend updating your mappings to stable_39.

  • Thanks 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.

Spoiler

Logs (Most issues require logs to diagnose):

Spoiler

Please post logs using one of the following sites (Thank you Lumber Wizard for the list):

https://gist.github.com/100MB Requires member (Free)

https://pastebin.com/: 512KB as guest, 10MB as Pro ($$$)

https://hastebin.com/: 400KB

Do NOT use sites like Mediafire, Dropbox, OneDrive, Google Drive, or a site that has a countdown before offering downloads.

 

What to provide:

...for Crashes and Runtime issues:

Minecraft 1.14.4 and newer:

Post debug.log

Older versions:

Please update...

 

...for Installer Issues:

Post your installer log, found in the same place you ran the installer

This log will be called either installer.log or named the same as the installer but with .log on the end

Note for Windows users:

Windows hides file extensions by default so the installer may appear without the .jar extension then when the .log is added the log will appear with the .jar extension

 

Where to get it:

Mojang Launcher: When using the Mojang launcher debug.log is found in .minecraft\logs.

 

Curse/Overwolf: If you are using the Curse Launcher, their configurations break Forge's log settings, fortunately there is an easier workaround than I originally thought, this works even with Curse's installation of the Minecraft launcher as long as it is not launched THROUGH Twitch:

Spoiler
  1. Make sure you have the correct version of Forge installed (some packs are heavily dependent on one specific build of Forge)
  2. Make a launcher profile targeting this version of Forge.
  3. Set the launcher profile's GameDir property to the pack's instance folder (not the instances folder, the folder that has the pack's name on it).
  4. Now launch the pack through that profile and follow the "Mojang Launcher" instructions above.

Video:

Spoiler

 

 

 

or alternately, 

 

Fallback ("No logs are generated"):

If you don't see logs generated in the usual place, provide the launcher_log.txt from .minecraft

 

Server Not Starting:

Spoiler

If your server does not start or a command window appears and immediately goes away, run the jar manually and provide the output.

 

Reporting Illegal/Inappropriate Adfocus Ads:

Spoiler

Get a screenshot of the URL bar or copy/paste the whole URL into a thread on the General Discussion board with a description of the Ad.

Lex will need the Ad ID contained in that URL to report it to Adfocus' support team.

 

Posting your mod as a GitHub Repo:

Spoiler

When you have an issue with your mod the most helpful thing you can do when asking for help is to provide your code to those helping you. The most convenient way to do this is via GitHub or another source control hub.

When setting up a GitHub Repo it might seem easy to just upload everything, however this method has the potential for mistakes that could lead to trouble later on, it is recommended to use a Git client or to get comfortable with the Git command line. The following instructions will use the Git Command Line and as such they assume you already have it installed and that you have created a repository.

 

  1. Open a command prompt (CMD, Powershell, Terminal, etc).
  2. Navigate to the folder you extracted Forge’s MDK to (the one that had all the licenses in).
  3. Run the following commands:
    1. git init
    2. git remote add origin [Your Repository's URL]
      • In the case of GitHub it should look like: https://GitHub.com/[Your Username]/[Repo Name].git
    3. git fetch
    4. git checkout --track origin/master
    5. git stage *
    6. git commit -m "[Your commit message]"
    7. git push
  4. Navigate to GitHub and you should now see most of the files.
    • note that it is intentional that some are not synced with GitHub and this is done with the (hidden) .gitignore file that Forge’s MDK has provided (hence the strictness on which folder git init is run from)
  5. Now you can share your GitHub link with those who you are asking for help.

[Workaround line, please ignore]

 

Link to comment
Share on other sites

Just want to clarify the concept a bit. The vanilla source is "obfuscated" meaning that it is valid Java code but isn't really human-readable, mostly because all the fields and methods have names that don't mean anything (to humans). So as part of MCP there is a system of mapping human-friendly names to the actual names. This mapping is basically crowd-sourced -- up to the community to submit suggestions. Note that sometimes the suggestions aren't exactly right (I've seen cases of misnamed methods), and also sometimes the methods get adjusted over time based on trying to improve naming consistency

 

Since the mapping is often getting updated, it is important for your build.gradle to point to a fairly recent version. I recommend updating every week, especially in the early days of a new version when it is probably changing frequently.

 

In terms of whether it is "safe" to build a mod using an outdated mapping, it is because the friendly mappings are just to aid developers and the actual names are the correct ones for associating with vanilla.

 

Note that if you use Java reflection, you need to use a class called ReflectionHelper because of the mapping. In ReflectionHelper methods you need to specify both the mapped and original names. 

 

The mappings are maintained by MCPBot which you can use to find mappings, download CSV spreadsheets with latest listings, and submit suggestions for new ones. 

 

For 1.12.2 I would say that the mapping process is essentially "finished". When 1.13.x comes around though you'll get to observe a period where there are lots of unmapped ones that get better.

 

Each time you update the mappings there is a chance that your code will start throwing errors due to the change. You simply need to figure out what the new name is and correct your code -- a bit of a pain sometimes but unavoidable.

  • Thanks 1

Check out my tutorials here: http://jabelarminecraft.blogspot.com/

Link to comment
Share on other sites

1 hour ago, jabelar said:

So as part of MCP there is a system of mapping human-friendly names to the actual names.

There's two steps here. One's a machine step, and one's the human step.

The part you talk about is the human step. The machine step organizes the classes into packages and renames the classes so that instead of a, ab, bz, and cf you have Minecraft, Block, ItemStack, and GuiContainer (these names, I believe, also come from MCP, but I'm not sure where in the process  it occurs). It also renames all methods, fields, and parameters called SRG names. These look like func_12893_f, field_90237_c or paramWorldIn1.  MCP then is a remap from those to human readable names, which are supplied via interacting with the MCPbot on IRC.

Edited by Draco18s
  • Like 1
  • Thanks 1

Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable.  If you think this is the case, JUST REPORT ME.  Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice.

 

Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked.

 

DO NOT PM ME WITH PROBLEMS. No help will be given.

Link to comment
Share on other sites

Thanks everyone again - I learned a lot here. If there is a FAQ or sticky that sums up some of this please do point me there so I can reference that next time. Again my thanks to all.

 

19 hours ago, DaemonUmbra said:

It makes no difference, mapped methods get un-mapped during the build process of your mod so they properly target vanilla methods outside of your development environment.

If you're working with 1.12.X I recommend updating your mappings to stable_39.

This is very helpful to know - knowing this I can build and ship my mod file w/out worrying if it will break with forge mapping changes. Thank you!

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
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.