Jump to content
Search In
  • More options...
Find results that contain...
Find results in...

Error when creating Javadoc - Industrial Craft error


CJMinecraft
 Share

Recommended Posts

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 by CJMinecraft
Link to comment
Share on other sites

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
 

 

Link to comment
Share on other sites

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

 Share



  • Recently Browsing

    No registered users viewing this page.

  • Posts

    • When i launch forge-1.16.5-36.2.23.jar eula.txt doesnt come but in older version like 1.12.2 it comes idk why. do you guys know how i can fix this ?
    • MegaMiner is just my playground mod. Here's the entire MegaMinerEvents class. It's just a static event receiver.   package nu.rydin.explodingarrows.common.events; import net.minecraft.core.BlockPos; import net.minecraft.nbt.CompoundTag; import net.minecraft.nbt.Tag; import net.minecraft.world.entity.player.Player; import net.minecraft.world.level.Level; import net.minecraft.world.level.LevelAccessor; import net.minecraft.world.level.block.Block; import net.minecraft.world.level.block.state.BlockState; import net.minecraftforge.event.TickEvent; import net.minecraftforge.event.world.BlockEvent; import net.minecraftforge.eventbus.api.SubscribeEvent; import net.minecraftforge.fml.common.Mod; import nu.rydin.explodingarrows.common.Main; import nu.rydin.explodingarrows.common.enchantments.ModEnchantments; import java.util.LinkedList; @Mod.EventBusSubscriber(modid = Main.MOD_ID, bus = Mod.EventBusSubscriber.Bus.FORGE) public class MegaMinerEvents { private static final class BlockToBreak { private final BlockPos pos; private final Player player; public BlockToBreak(final BlockPos pos, final Player player) { this.pos = pos; this.player = player; } } private static final LinkedList<BlockToBreak> queue = new LinkedList<>(); @SubscribeEvent public static void onBreakBlock(final BlockEvent.BreakEvent e) { final LevelAccessor world = e.getWorld(); if (world.isClientSide()) { return; } for (final Tag t : e.getPlayer().getMainHandItem().getEnchantmentTags()) { final CompoundTag ct = (CompoundTag) t; if (ct.getString("id") .equals(ModEnchantments.MEGA_MINER.get().getRegistryName().toString())) { MegaMinerEvents.mineNeighborhood(e.getPos(), e.getPlayer(), e.getState().getBlock()); } } } @SubscribeEvent public static void onTick(final TickEvent.ServerTickEvent e) { if (MegaMinerEvents.queue.isEmpty()) { return; } final BlockToBreak b = MegaMinerEvents.queue.removeFirst(); final Level world = b.player.level; final BlockState bs = world.getBlockState(b.pos); bs.getBlock().playerDestroy(world, b.player, b.pos, bs, null, b.player.getMainHandItem()); world.removeBlock(b.pos, true); // MegaMinerEvents.mineNeighborhood(b.pos, b.player, bs.getBlock()); System.out.println(MegaMinerEvents.queue.size()); } private static void mineNeighborhood( final BlockPos pos, final Player player, final Block blockType) { final float x0 = pos.getX(); final float y0 = pos.getY(); final float z0 = pos.getZ(); for (float z = z0 - 1.0F; z <= z0 + 1; z += 1.0) { for (float y = y0 - 1.0F; y <= y0 + 1; y += 1.0) { for (float x = x0 - 1.0F; x <= x0 + 1; x += 1.0) { final BlockState b = player.getLevel().getBlockState(pos); if (b.is(blockType)) { MegaMinerEvents.queue.addLast(new BlockToBreak(pos, player)); } } } } } }  
    • i am playing modded and NOT ON A SERVER but everytime i join a world my game crashes and the error message is: Exception in server tick loop  
  • Topics

  • Who's Online (See full list)

×
×
  • Create New...

Important Information

By using this site, you agree to our Privacy Policy.