Jump to content

Arnox

Members
  • Posts

    16
  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

Arnox's Achievements

Tree Puncher

Tree Puncher (2/8)

1

Reputation

  1. Arnox

    Documentation

    And those "pretty docs" are what attract people to make content for Forge in the first place. I can't write anything to the github pages myself because obviously I'm not sure what to put down. I like to think I know how to write technical documents, but I also need to know what the hell I'm talking about. I (or someone) need to sit down with at least one dev and go through at least some basics with them. Like, for example, what does Forge always expect a mod to have? What file structure does Forge expect? What are some examples of very simple mods, and how would they all work under the hood basically? Although, of course, you should be able to understand what a function does by looking at it, it doesn't answer other more pressing questions about the Forge API as a whole. Hell, if I just had a week with a dev where we just devoted a few hours to hammering out the documentation, then I'm sure we could make a huge dent, if not entirely complete it. I absolutely get that Forge is a big project and it needs a lot of time, but if these documentation needs aren't met, then many people are just gonna get frustrated and go work on something else. And you don't want that. You obviously want more people to use your API. I also get that documentation isn't exactly a glamorous job. It's a very underappreciated part of making an API. But I think it will absolutely pay off in the end. It would address a lot of threads that are constantly getting made in the Modding Support sub-forum asking things that good documentation could easily answer. It saves your users time and it saves you time as well. Everyone's happy.
  2. I seem to be at a loss for making 1.16.x mods in general since there doesn't seem to be a lot of documentation at all. Now, I do understand that Forge for 1.16.x is still early days, but even for 1.15.x, the official documentation seems content to only go over broad concepts with no examples and what seems like key pieces of information left out. Further, many of the tutorials you find for modding only seem to tell you WHAT to do, but not, most importantly, how things are working under the hood for Forge and Minecraft. Would the main Forge contributors be open to discussion about sitting down and expanding the documentation? I am willing to contribute here in this regard.
  3. I was following along with this guide, but as you can see, it's a bit old. Namely, it's for 1.15.2. Now, it seemed to be working all the way up to the very end: Eclipse says the bolded method is undefined for the type FMLServerStartingEvent.
  4. FINALLYYYYYYYYY The Hell is over. It's done. It works now. Finally... Thank you so much. ❤️ I guess my only question now is... Why is the command different when I run it in the command prompt as opposed to in the IDE?
  5. bin main com arnox exmod2 ExampleMod2$RegistryEvents.class ExampleMod2.class META-INF pack.mcmeta
  6. I think I ran into this before. Try just rebooting your computer. It worked for me last time.
  7. Deleted and reinstalled Eclipse entirely. Deleted the entire project files and redownloaded them (1.16.2 this time). Imported the Gradle Project. Did a test Client run before editing. Works just fine. Edited the package name to "com.arnox.exmod". Edited the modid in the ExampleMod.java file and all the modid's in the mods.toml file. Still errors out in the exact same way. Editing the build.gradle file to remove examplemod and then rerunning genEclipseruns and then another test Client run STILL gives the same error. Guys, I really think this is a bug... EDIT: I tried just deleting the original mod package wholesale and creating it entirely from scratch (com.arnox.exmod2) and copied the contents of the old Java file to the new one. STILL THE SAME ERROR. WHAT THE HELL? It always sees com.example.examplemod. It never goes away! Please tell me other people are getting this error too.
  8. In the src/main/java directory? I'm afraid there's only what is shown in the screenshot. src/main/java/com/arnox/exmod/ExampleMod.java to be exact.
  9. Done. Still erroring out with the same error. Jar still has the same folders and files as listed in the last post. More and more, I'm starting to think this is a gradle bug or something.
  10. Refactored com.Arnox.ExampleMod to com.arnox.exmod. Edited the specified part in the build.gradle file to this: version = '0.0.1' group = 'com.arnox.exmod' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'exmod' Executed the build setup "init" and "wrapper" gradle tasks. Still erroring out with the same error. Assembled jar file (exmod-0.0.1) now looks like this: com Arnox exmod ExampleMod.class examplemod ExampleMod.class example examplemod ExampleMod$RegistryEvents.class ExampleMod.class META-INF MANIFEST.MF mods.toml pack.mcmeta
  11. A small bit of good news. Looking through the console log, I found this: I have no idea where the hell it's finding that though. There's nothing in the above directory besides mods.toml and pack.mcmeta. The plot thickens too when I build the project and then look into the libs folder, open "modid-1.0.jar" and then I get this: com Arnox examplemod ExampleMod.class example examplemod ExampleMod$RegistryEvents.class ExampleMod.class META-INF MANIFEST.MF mods.toml pack.mcmeta
  12. buildscript { repositories { maven { url = 'https://files.minecraftforge.net/maven' } jcenter() mavenCentral() } dependencies { classpath group: 'net.minecraftforge.gradle', name: 'ForgeGradle', version: '3.+', changing: true } } apply plugin: 'net.minecraftforge.gradle' // Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. apply plugin: 'eclipse' apply plugin: 'maven-publish' version = '1.0' group = 'com.yourname.modid' // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = 'modid' sourceCompatibility = targetCompatibility = compileJava.sourceCompatibility = compileJava.targetCompatibility = '1.8' // Need this here so eclipse task generates correctly. println('Java: ' + System.getProperty('java.version') + ' JVM: ' + System.getProperty('java.vm.version') + '(' + System.getProperty('java.vendor') + ') Arch: ' + System.getProperty('os.arch')) 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: '20200514-1.16' // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. // accessTransformer = file('src/main/resources/META-INF/accesstransformer.cfg') // Default run configurations. // These can be tweaked, removed, or duplicated as needed. runs { client { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' mods { exmod { source sourceSets.main } } } server { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' mods { exmod { source sourceSets.main } } } data { workingDirectory project.file('run') // Recommended logging data for a userdev environment property 'forge.logging.markers', 'SCAN,REGISTRIES,REGISTRYDUMP' // Recommended logging level for the console property 'forge.logging.console.level', 'debug' args '--mod', 'exmod', '--all', '--output', file('src/generated/resources/') mods { exmod { source sourceSets.main } } } } } dependencies { // Specify the version of Minecraft to use, If this is any group other then 'net.minecraft' it is assumed // that the dep is a ForgeGradle 'patcher' dependency. And it's patches will be applied. // The userdev artifact is a special name and will get all sorts of transformations applied to it. minecraft 'net.minecraftforge:forge:1.16.1-32.0.106' // You may put jars on which you depend on in ./libs or you may define them like so.. // compile "some.group:artifact:version:classifier" // compile "some.group:artifact:version" // Real examples // compile 'com.mod-buildcraft:buildcraft:6.0.8:dev' // adds buildcraft to the dev env // compile 'com.googlecode.efficient-java-matrix-library:ejml:0.24' // adds ejml to the dev env // The 'provided' configuration is for optional dependencies that exist at compile-time but might not at runtime. // provided 'com.mod-buildcraft:buildcraft:6.0.8:dev' // These dependencies get remapped to your current MCP mappings // deobf 'com.mod-buildcraft:buildcraft:6.0.8:dev' // For more info... // http://www.gradle.org/docs/current/userguide/artifact_dependencies_tutorial.html // http://www.gradle.org/docs/current/userguide/dependency_management.html } // Example for how to get properties into the manifest for reading by the runtime.. jar { manifest { attributes([ "Specification-Title": "ExMod", "Specification-Vendor": "examplemodsareus", "Specification-Version": "1", // We are version 1 of ourselves "Implementation-Title": project.name, "Implementation-Version": "${version}", "Implementation-Vendor" :"examplemodsareus", "Implementation-Timestamp": new Date().format("yyyy-MM-dd'T'HH:mm:ssZ") ]) } } // Example configuration to allow publishing using the maven-publish task // This is the preferred method to reobfuscate your jar file jar.finalizedBy('reobfJar') // However if you are in a multi-project build, dev time needs unobfed jar files, so you can delay the obfuscation until publishing by doing //publish.dependsOn('reobfJar') publishing { publications { mavenJava(MavenPublication) { artifact jar } } repositories { maven { url "file:///${project.projectDir}/mcmodsrepo" } } } I also took the time to replace all instances of "examplemod" (lowercase only) as well with "exmod". Still no difference.
  13. I would recommend restarting and doing the same thing as in the OP except this time, import the project files first. Then import the gradle tasks in Eclipse. This will give a nice list at the bottom window (Gradle Tasks) which you can use to easily access Gradle functions. And then execute the genEclipseRuns option listed in the bottom window.
×
×
  • Create New...

Important Information

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