Posted October 21, 20177 yr So I am getting an error every time I build my mod. I am generating a javadoc, deobf, sources and the regular mod jar. The error I get is shown here: :javadoc USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/item/IElectricItem.java):16: warning: no @param for stack boolean canProvideEnergy(ItemStack stack); ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/item/IElectricItem.java):23: warning: no @param for stack double getMaxCharge(ItemStack stack); ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/item/IElectricItem.java):33: warning: no @param for stack int getTier(ItemStack stack); ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/item/IElectricItem.java):40: warning: no @param for stack double getTransferLimit(ItemStack stack); ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/energy/tile/IEnergyAcceptor.java):23: warning: no @return boolean acceptsEnergyFrom(IEnergyEmitter emitter, EnumFacing side); ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/energy/tile/IEnergySink.java):14: error: bad use of '>' * Make sure that injectEnergy() does accepts energy if demandsEnergy() returns anything > 0. ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/energy/tile/IEnergySink.java):16: error: unknown tag: note * @note Modifying the energy net from this method is disallowed. ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/energy/tile/IEnergySink.java):26: error: unknown tag: note * @note Modifying the energy net from this method is disallowed. ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/energy/tile/IEnergySink.java):27: error: unknown tag: note * @note Return Integer.MAX_VALUE to allow any voltage. ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/energy/tile/IEnergySink.java):43: warning: no @param for voltage double injectEnergy(EnumFacing directionFrom, double amount, double voltage); ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/energy/tile/IEnergySource.java):13: error: unknown tag: note * @note Modifying the energy net from this method is disallowed. ^ USERPATH\.gradle\caches\modules-2\files-2.1\net.industrial-craft\industrialcraft-2\2.7.9-ex111\3c815f473c4c1cf619cd1e042ebd3ef8f9ba5b5d\industrialcraft-2-2.7.9-ex111-api.jar(ic2/api/energy/tile/IEnergySource.java):32: error: unknown tag: note * @note Modifying the energy net from this method is disallowed. ^ PATH\src\main\java\cofh\api\energy\IEnergyStorage.java:41: warning: no @return int getEnergyStored(); ^ PATH\src\main\java\cofh\api\energy\IEnergyStorage.java:46: warning: no @return int getMaxEnergyStored(); ^ 6 errors 8 warnings :javadoc FAILED Where PATH represents the path to the mod and USERPATH represents the path to the user i.e. C:/Users/USERNAME My build.gradle is below: buildscript { repositories { jcenter() maven { url = "http://files.minecraftforge.net/maven" } } dependencies { classpath 'net.minecraftforge.gradle:ForgeGradle:2.2-SNAPSHOT' } } apply plugin: 'net.minecraftforge.gradle.forge' //Only edit below this line, the above code adds and enables the necessary things for Forge to be setup. version = "0.0.2.4" group = "cjminecraft.core" // http://maven.apache.org/guides/mini/guide-naming-conventions.html archivesBaseName = "cjcore-1.11" sourceCompatibility = targetCompatibility = "1.8" // Need this here so eclipse task generates correctly. compileJava { sourceCompatibility = targetCompatibility = "1.8" } task javadocJar(type: Jar, dependsOn: 'javadoc') { from "build/docs/javadoc" classifier "javadoc" } task deobfJar(type: Jar) { from sourceSets.main.output classifier = 'deobf' } task srcJar(type: Jar, dependsOn: "sourceMainJava") { from sourceSets.main.allSource classifier = 'sources' } artifacts { archives srcJar archives deobfJar archives javadocJar } minecraft { version = "1.11.2-13.20.1.2454" runDir = "run" // 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 = "snapshot_20161220" // makeObfSourceJar = false // an Srg named sources jar is made by default. uncomment this to disable. } repositories { maven { name "Tesla" url 'http://maven.epoxide.xyz' } maven { name = "ic2" url = "http://maven.ic2.player.to/" } ivy { name "BuildCraft" artifactPattern "http://www.mod-buildcraft.com/releases/BuildCraft/[revision]/[module]-[revision](-[classifier]).[ext]" } } dependencies { compile "net.darkhax.tesla:Tesla:1.11-1.3.0.52" deobfCompile name: "buildcraft", version: "7.99.7" compile 'net.industrial-craft:industrialcraft-2:2.7.9-ex111:api' } processResources { // this will ensure that this task is redone when the versions change. inputs.property "version", project.version inputs.property "mcversion", project.minecraft.version // replace stuff in mcmod.info, nothing else from(sourceSets.main.resources.srcDirs) { include 'mcmod.info' // replace version and mcversion expand 'version':project.version, 'mcversion':project.minecraft.version } // copy everything else except the mcmod.info from(sourceSets.main.resources.srcDirs) { exclude 'mcmod.info' } } I've been trying to fix this over the past two months. If you need the code (which I highly doubt it), it is found here https://github.com/CJMinecraft01/CJCore Edited October 23, 20177 yr by CJMinecraft
October 22, 20177 yr Try to update jdk and/or gradle. On gradle 4.2.1 and jdk 1.8.0u131 there are only two warnings that do not abrupt build: Spoiler gradle javadocJar > Configure project : This mapping 'snapshot_20161220' was designed for MC 1.11! Use at your own peril. > Task :compileJava Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. > Task :javadoc /tmp/CJCore/src/main/java/cofh/api/energy/IEnergyStorage.java:41: warning: no @return int getEnergyStored(); ^ /tmp/CJCore/src/main/java/cofh/api/energy/IEnergyStorage.java:46: warning: no @return int getMaxEnergyStored(); ^ 2 warnings BUILD SUCCESSFUL in 9s 10 actionable tasks: 9 executed, 1 up-to-date Spoiler gradle -version ------------------------------------------------------------ Gradle 4.2.1 ------------------------------------------------------------ Build time: 2017-10-02 15:36:21 UTC Revision: a88ebd6be7840c2e59ae4782eb0f27fbe3405ddf Groovy: 2.4.12 Ant: Apache Ant(TM) version 1.9.6 compiled on June 29 2015 JVM: 1.8.0_131 (Oracle Corporation 25.131-b11) OS: Linux 4.4.0-96-generic amd64
October 23, 20177 yr Author It's ok, I figured it out after I sent it. I'm updating the mappings but unfortunately, I have to use ForgeGradle-2.2-SNAPSHOT and not ForgeGradle-2.0.2 because that does not support 1.11.2 any more. I just realised, this still doesn't work, I haven't updated github so when you ran it, it still was not the latest version Edited October 23, 20177 yr by CJMinecraft
October 24, 20177 yr Now your project fails to build due to compilation errors. Correct them first and I try one more time.
October 24, 20177 yr Author The compilation errors come from the Industrial Craft 2 API and I cannot resolve these
October 25, 20177 yr Author I have managed to fix this by telling gradle to ignore the error I added this to my build.gradle allprojects { tasks.withType(Javadoc) { options.addStringOption('Xdoclint:none', '-quiet') } }
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.