Jump to content

Recommended Posts

Posted

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.

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

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(...);

 

 

Posted

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]

 

Posted

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/

Posted (edited)
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.

Posted

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!

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



  • Recently Browsing

    • No registered users viewing this page.
  • Posts

    • that happens every time I enter a new dimension.
    • This is the last line before the crash: [ebwizardry]: Synchronising spell emitters for PixelTraveler But I have no idea what this means
    • What in particular? I barely used that mod this time around, and it's never been a problem in the past.
    • Im trying to build my mod using shade since i use the luaj library however i keep getting this error Reason: Task ':reobfJar' uses this output of task ':shadowJar' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed. So i try adding reobfJar.dependsOn shadowJar  Could not get unknown property 'reobfJar' for object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler. my gradle file plugins { id 'eclipse' id 'idea' id 'maven-publish' id 'net.minecraftforge.gradle' version '[6.0,6.2)' id 'com.github.johnrengelman.shadow' version '7.1.2' id 'org.spongepowered.mixin' version '0.7.+' } apply plugin: 'net.minecraftforge.gradle' apply plugin: 'org.spongepowered.mixin' apply plugin: 'com.github.johnrengelman.shadow' version = mod_version group = mod_group_id base { archivesName = mod_id } // Mojang ships Java 17 to end users in 1.18+, so your mod should target Java 17. java.toolchain.languageVersion = JavaLanguageVersion.of(17) //jarJar.enable() println "Java: ${System.getProperty 'java.version'}, JVM: ${System.getProperty 'java.vm.version'} (${System.getProperty 'java.vendor'}), Arch: ${System.getProperty 'os.arch'}" minecraft { mappings channel: mapping_channel, version: mapping_version copyIdeResources = true runs { configureEach { workingDirectory project.file('run') property 'forge.logging.markers', 'REGISTRIES' property 'forge.logging.console.level', 'debug' arg "-mixin.config=derp.mixin.json" mods { "${mod_id}" { source sourceSets.main } } } client { // Comma-separated list of namespaces to load gametests from. Empty = all namespaces. property 'forge.enabledGameTestNamespaces', mod_id } server { property 'forge.enabledGameTestNamespaces', mod_id args '--nogui' } gameTestServer { property 'forge.enabledGameTestNamespaces', mod_id } data { workingDirectory project.file('run-data') args '--mod', mod_id, '--all', '--output', file('src/generated/resources/'), '--existing', file('src/main/resources/') } } } sourceSets.main.resources { srcDir 'src/generated/resources' } repositories { flatDir { dirs './libs' } maven { url = "https://jitpack.io" } } configurations { shade implementation.extendsFrom shade } dependencies { minecraft "net.minecraftforge:forge:${minecraft_version}-${forge_version}" implementation 'org.luaj:luaj-jse-3.0.2' implementation fg.deobf("com.github.Virtuoel:Pehkui:${pehkui_version}") annotationProcessor 'org.spongepowered:mixin:0.8.5:processor' minecraftLibrary 'luaj:luaj-jse:3.0.2' shade 'luaj:luaj-jse:3.0.2' } // Example for how to get properties into the manifest for reading at runtime. tasks.named('jar', Jar).configure { manifest { attributes([ 'Specification-Title' : mod_id, 'Specification-Vendor' : mod_authors, 'Specification-Version' : '1', // We are version 1 of ourselves 'Implementation-Title' : project.name, 'Implementation-Version' : project.jar.archiveVersion, 'Implementation-Vendor' : mod_authors, 'Implementation-Timestamp': new Date().format("yyyy-MM-dd'T'HH:mm:ssZ"), "TweakClass" : "org.spongepowered.asm.launch.MixinTweaker", "TweakOrder" : 0, "MixinConfigs" : "derp.mixin.json" ]) } rename 'mixin.refmap.json', 'derp.mixin-refmap.json' } shadowJar { archiveClassifier = '' configurations = [project.configurations.shade] finalizedBy 'reobfShadowJar' } assemble.dependsOn shadowJar reobf { re shadowJar {} } publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file://${project.projectDir}/mcmodsrepo" } } } my entire project:https://github.com/kevin051606/DERP-Mod/tree/Derp-1.0-1.20
  • Topics

×
×
  • Create New...

Important Information

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