Jump to content

Error when creating Javadoc - Industrial Craft error


CJMinecraft

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

    • They were already updated, and just to double check I even did a cleanup and fresh update from that same page. I'm quite sure drivers are not the problem here. 
    • i tried downloading the drivers but it says no AMD graphics hardware has been detected    
    • Update your AMD/ATI drivers - get the drivers from their website - do not update via system  
    • As the title says i keep on crashing on forge 1.20.1 even without any mods downloaded, i have the latest drivers (nvidia) and vanilla minecraft works perfectly fine for me logs: https://pastebin.com/5UR01yG9
    • Hello everyone, I'm making this post to seek help for my modded block, It's a special block called FrozenBlock supposed to take the place of an old block, then after a set amount of ticks, it's supposed to revert its Block State, Entity, data... to the old block like this :  The problem I have is that the system breaks when handling multi blocks (I tried some fix but none of them worked) :  The bug I have identified is that the function "setOldBlockFields" in the item's "setFrozenBlock" function gets called once for the 1st block of multiblock getting frozen (as it should), but gets called a second time BEFORE creating the first FrozenBlock with the data of the 1st block, hence giving the same data to the two FrozenBlock :   Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=head] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@73681674 BlockEntityData : id:"minecraft:bed",x:3,y:-60,z:-6} Old Block Fields set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=3, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} Frozen Block Entity set BlockState : Block{minecraft:black_bed}[facing=east,occupied=false,part=foot] BlockPos{x=2, y=-60, z=-6} BlockEntity : net.minecraft.world.level.block.entity.BedBlockEntity@6d1aa3da BlockEntityData : {id:"minecraft:bed",x:2,y:-60,z:-6} here is the code inside my custom "freeze" item :    @Override     public @NotNull InteractionResult useOn(@NotNull UseOnContext pContext) {         if (!pContext.getLevel().isClientSide() && pContext.getHand() == InteractionHand.MAIN_HAND) {             BlockPos blockPos = pContext.getClickedPos();             BlockPos secondBlockPos = getMultiblockPos(blockPos, pContext.getLevel().getBlockState(blockPos));             if (secondBlockPos != null) {                 createFrozenBlock(pContext, secondBlockPos);             }             createFrozenBlock(pContext, blockPos);             return InteractionResult.SUCCESS;         }         return super.useOn(pContext);     }     public static void createFrozenBlock(UseOnContext pContext, BlockPos blockPos) {         BlockState oldState = pContext.getLevel().getBlockState(blockPos);         BlockEntity oldBlockEntity = oldState.hasBlockEntity() ? pContext.getLevel().getBlockEntity(blockPos) : null;         CompoundTag oldBlockEntityData = oldState.hasBlockEntity() ? oldBlockEntity.serializeNBT() : null;         if (oldBlockEntity != null) {             pContext.getLevel().removeBlockEntity(blockPos);         }         BlockState FrozenBlock = setFrozenBlock(oldState, oldBlockEntity, oldBlockEntityData);         pContext.getLevel().setBlockAndUpdate(blockPos, FrozenBlock);     }     public static BlockState setFrozenBlock(BlockState blockState, @Nullable BlockEntity blockEntity, @Nullable CompoundTag blockEntityData) {         BlockState FrozenBlock = BlockRegister.FROZEN_BLOCK.get().defaultBlockState();         ((FrozenBlock) FrozenBlock.getBlock()).setOldBlockFields(blockState, blockEntity, blockEntityData);         return FrozenBlock;     }  
  • Topics

×
×
  • Create New...

Important Information

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