Jump to content

Recommended Posts

Posted

Hi so I'm new to java and forge modding, but I have past knowledge in c# and lua. I'm having a issue that I can't seem to fix.

 

I get this error when attempting to compile:

 

 

>Executing gradle command: build

>Microsoft Windows [Version 6.3.9600]

>© 2013 Microsoft Corporation. All rights reserved.

>C:\Pylo\MCreator155>cd forge

>C:\Pylo\MCreator155\forge>SET "JAVA_HOME=C:\Pylo\MCreator155\jdk\"

>C:\Pylo\MCreator155\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe

>C:\Pylo\MCreator155\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%

>C:\Pylo\MCreator155\forge>gradlew build

>****************************

> Powered By MCP:           

> http://mcp.ocean-labs.de/ 

> Searge, ProfMobius, Fesh0r,

> R4wk, ZeuX, IngisKahn, bspkrs

> MCP Data version : unknown

>****************************

>:downloadClient SKIPPED

>:downloadServer SKIPPED

>:getVersionJson

>:extractUserDev UP-TO-DATE

>:mergeJars SKIPPED

>:applyBinPatches SKIPPED

>:downloadMcpTools SKIPPED

>:extractMcpData UP-TO-DATE

>:genSrgs SKIPPED

>:deobfBinJar SKIPPED

>:compileApiJava UP-TO-DATE

>:processApiResources UP-TO-DATE

>:apiClasses UP-TO-DATE

>:sourceMainJava

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:400: error: cannot find symbol

>        int l = (int)(p_150573_7_ / 3.0D + 3.0D + p_150560_2_.nextDouble() * 0.25D);

>                      ^

>  symbol:  variable p_150573_7_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:400: error: cannot find symbol

>        int l = (int)(p_150573_7_ / 3.0D + 3.0D + p_150560_2_.nextDouble() * 0.25D);

>                                                  ^

>  symbol:  variable p_150560_2_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:401: error: cannot find symbol

>        int i1 = p_150560_5_ & 15;

>                ^

>  symbol:  variable p_150560_5_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:402: error: cannot find symbol

>        int j1 = p_150560_6_ & 15;

>                ^

>  symbol:  variable p_150560_6_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:403: error: cannot find symbol

>        int k1 = p_150560_3_.length / 256;

>                ^

>  symbol:  variable p_150560_3_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:409: error: cannot find symbol

>            if (l1 <= 0 + p_150560_2_.nextInt(5))

>                          ^

>  symbol:  variable p_150560_2_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:411: error: cannot find symbol

>                p_150560_3_[i2] = Blocks.bedrock;

>                ^

>  symbol:  variable p_150560_3_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:415: error: cannot find symbol

>                Block block2 = p_150560_3_[i2];

>                              ^

>  symbol:  variable p_150560_3_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:438: error: cannot find symbol

>                                if (this.getFloatTemperature(p_150560_5_, l1, p_150560_6_) < 0.15F)

>                                                            ^

>  symbol:  variable p_150560_5_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:438: error: cannot find symbol

>                                if (this.getFloatTemperature(p_150560_5_, l1, p_150560_6_) < 0.15F)

>                                                                              ^

>  symbol:  variable p_150560_6_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:454: error: cannot find symbol

>                                p_150560_3_[i2] = block;

>                                ^

>  symbol:  variable p_150560_3_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:455: error: cannot find symbol

>                                p_150560_4_[i2] = b0;

>                                ^

>  symbol:  variable p_150560_4_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:461: error: cannot find symbol

>                                p_150560_3_[i2] = mcreator_essenceStone.block;

>                                ^

>  symbol:  variable p_150560_3_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:465: error: cannot find symbol

>                                p_150560_3_[i2] = block1;

>                                ^

>  symbol:  variable p_150560_3_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:471: error: cannot find symbol

>                            p_150560_3_[i2] = block1;

>                            ^

>  symbol:  variable p_150560_3_

>  location: class BiomeGenetherealForest

>C:\Pylo\MCreator155\forge\build\sources\java\mod\mcreator\mcreator_etherealForest.java:475: error: cannot find symbol

>                                k = p_150560_2_.nextInt(4) + Math.max(0, l1 - 63);

>                                    ^

>  symbol:  variable p_150560_2_

>  location: class BiomeGenetherealForest

>16 errors

>:compileJava FAILED

>FAILURE: Build failed with an exception.

>* What went wrong:

>Execution failed for task ':compileJava'.

>> Compilation failed; see the compiler error output for details.

>* Try:

>Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

>BUILD FAILED

>Total time: 24.098 secs

>C:\Pylo\MCreator155\forge>

>Task completed with return code 0 in 24746 milliseconds

 

 

This is the code that it is pointing to:

 

package mod.mcreator;//based on master condiguration

 

import cpw.mods.fml.client.*;

import cpw.mods.fml.client.registry.*;

import cpw.mods.fml.common.*;

import cpw.mods.fml.common.asm.*;

import cpw.mods.fml.common.asm.transformers.*;

import cpw.mods.fml.common.discovery.*;

import cpw.mods.fml.common.discovery.asm.*;

import cpw.mods.fml.common.event.*;

import cpw.mods.fml.common.functions.*;

import cpw.mods.fml.common.network.*;

import cpw.mods.fml.common.registry.*;

import cpw.mods.fml.common.toposort.*;

import cpw.mods.fml.common.versioning.*;

import cpw.mods.fml.relauncher.*;

import cpw.mods.fml.server.*;

import net.minecraft.block.*;

import net.minecraft.block.material.*;

import net.minecraft.client.*;

import net.minecraft.client.audio.*;

import net.minecraft.client.entity.*;

import net.minecraft.client.gui.*;

import net.minecraft.client.gui.achievement.*;

import net.minecraft.client.gui.inventory.*;

import net.minecraft.client.model.*;

import net.minecraft.client.multiplayer.*;

import net.minecraft.client.particle.*;

import net.minecraft.client.renderer.*;

import net.minecraft.client.renderer.culling.*;

import net.minecraft.client.renderer.entity.*;

import net.minecraft.client.renderer.tileentity.*;

import net.minecraft.client.settings.*;

import net.minecraft.command.*;

import net.minecraft.crash.*;

import net.minecraft.creativetab.*;

import net.minecraft.dispenser.*;

import net.minecraft.enchantment.*;

import net.minecraft.entity.*;

import net.minecraft.entity.ai.*;

import net.minecraft.entity.boss.*;

import net.minecraft.entity.effect.*;

import net.minecraft.entity.item.*;

import net.minecraft.entity.monster.*;

import net.minecraft.entity.passive.*;

import net.minecraft.entity.player.*;

import net.minecraft.entity.projectile.*;

import net.minecraft.inventory.*;

import net.minecraft.item.*;

import net.minecraft.item.crafting.*;

import net.minecraft.nbt.*;

import net.minecraft.network.*;

import net.minecraft.network.rcon.*;

import net.minecraft.pathfinding.*;

import net.minecraft.potion.*;

import net.minecraft.profiler.*;

import net.minecraft.server.*;

import net.minecraft.server.dedicated.*;

import net.minecraft.server.gui.*;

import net.minecraft.server.integrated.*;

import net.minecraft.server.management.*;

import net.minecraft.src.*;

import net.minecraft.stats.*;

import net.minecraft.tileentity.*;

import net.minecraft.util.*;

import net.minecraft.village.*;

import net.minecraft.world.*;

import net.minecraft.world.biome.*;

import net.minecraft.world.chunk.*;

import net.minecraft.world.chunk.storage.*;

import net.minecraft.world.demo.*;

import net.minecraft.world.gen.*;

import net.minecraft.world.gen.feature.*;

import net.minecraft.world.gen.layer.*;

import net.minecraft.world.gen.structure.*;

import net.minecraft.world.storage.*;

import net.minecraftforge.classloading.*;

import net.minecraftforge.client.*;

import net.minecraftforge.client.event.*;

import net.minecraftforge.client.event.sound.*;

import net.minecraftforge.common.*;

import net.minecraftforge.event.*;

import net.minecraftforge.event.entity.*;

import net.minecraftforge.event.entity.item.*;

import net.minecraftforge.event.entity.living.*;

import net.minecraftforge.event.entity.minecart.*;

import net.minecraftforge.event.entity.player.*;

import net.minecraftforge.event.terraingen.*;

import net.minecraftforge.event.world.*;

import net.minecraftforge.oredict.*;

import net.minecraftforge.transformers.*;

import net.minecraft.world.biome.BiomeGenBase.*;

import net.minecraft.init.*;

import java.util.Random;

 

public class mcreator_etherealForest {

 

public static BiomeGenetherealForest biome = new BiomeGenetherealForest();

 

public Object instance;

 

public mcreator_etherealForest(){}

 

public void load(){

BiomeDictionary.registerBiomeType(biome, BiomeDictionary.Type.FOREST);

BiomeManager.addSpawnBiome(biome);

BiomeManager.coolBiomes.add(new BiomeManager.BiomeEntry(biome, 10));

}

 

public void generateNether(World world, Random random, int chunkX, int chunkZ){}

public void generateSurface(World world, Random random, int chunkX, int chunkZ){}

public void registerRenderers(){}

public int addFuel(ItemStack fuel){

return 0;

}

public void serverLoad(FMLServerStartingEvent event){}

public void preInit(FMLPreInitializationEvent event){}

 

static class BiomeGenetherealForest extends BiomeGenBase

{

@SuppressWarnings("unchecked")

    public BiomeGenetherealForest()

    {

        super(40);

        setBiomeName("etherealForest");

        topBlock = mcreator_etherealGrass.block;

        fillerBlock = mcreator_etherealSoil.block;

        theBiomeDecorator.generateLakes = true;

theBiomeDecorator.treesPerChunk = 20;

theBiomeDecorator.flowersPerChunk = 10;

theBiomeDecorator.grassPerChunk = 43;

theBiomeDecorator.deadBushPerChunk = 10;

theBiomeDecorator.mushroomsPerChunk = 10;

theBiomeDecorator.reedsPerChunk = 10;

theBiomeDecorator.cactiPerChunk = 10;

  theBiomeDecorator.sandPerChunk = 10;

  rainfall = 0.7999999999999999F;

  setHeight(new BiomeGenBase.Height(0.37F, 0.39999999999999997F));

  waterColorMultiplier = 0x99ffff;

 

 

this.spawnableMonsterList.clear();

this.spawnableCreatureList.clear();

this.spawnableWaterCreatureList.clear();

this.spawnableCaveCreatureList.clear();

 

    }

 

 

    public WorldGenerator getRandomWorldGenForTrees(Random par1Random){

return new Tree();

}

class Tree extends WorldGenerator

{

    /** The minimum height of a generated tree. */

    private final int minTreeHeight;

 

    /** True if this tree should grow Vines. */

    private final boolean vinesGrow;

 

    /** The metadata value of the wood to use in tree generation. */

    private final int metaWood;

 

    /** The metadata value of the leaves to use in tree generation. */

    private final int metaLeaves;

 

    public Tree()

    {

        super(false);

        this.minTreeHeight = 30;

        this.metaWood = 0;

        this.metaLeaves = 0;

        this.vinesGrow = true;

    }

 

    public boolean generate(World par1World, Random par2Random, int par3, int par4, int par5)

    {

        int var6 = par2Random.nextInt(3) + this.minTreeHeight;

        boolean var7 = true;

 

        if (par4 >= 1 && par4 + var6 + 1 <= 256)

        {

            int var8;

            byte var9;

            int var11;

            int var12;

 

            for (var8 = par4; var8 <= par4 + 1 + var6; ++var8)

            {

                var9 = 1;

 

                if (var8 == par4)

                {

                    var9 = 0;

                }

 

                if (var8 >= par4 + 1 + var6 - 2)

                {

                    var9 = 2;

                }

 

                for (int var10 = par3 - var9; var10 <= par3 + var9 && var7; ++var10)

                {

                    for (var11 = par5 - var9; var11 <= par5 + var9 && var7; ++var11)

                    {

                        if (var8 >= 0 && var8 < 256)

                        {

                            Block var12s = par1World.getBlock(var10, var8, var11);

                            var12 = Block.getIdFromBlock(var12s);

 

                            if (var12 != 0 && var12s != mcreator_etherealVines.block && var12s != Blocks.grass && var12s != Blocks.dirt && var12s != mcreator_etherealWood.block)

                            {

                                var7 = false;

                            }

                        }

                        else

                        {

                            var7 = false;

                        }

                    }

                }

            }

 

            if (!var7)

            {

                return false;

            }

            else

            {

Block var8s = par1World.getBlock(par3, par4 - 1, par5);

                var8 = Block.getIdFromBlock(var8s);

 

                if ((var8s == Blocks.grass || var8s == Blocks.dirt) && par4 < 256 - var6 - 1)

                {

                    par1World.setBlock(par3, par4 - 1, par5, Blocks.dirt, 0, 2);

                    var9 = 3;

                    byte var18 = 0;

                    int var13;

                    int var14;

                    int var15;

 

                    for (var11 = par4 - var9 + var6; var11 <= par4 + var6; ++var11)

                    {

                        var12 = var11 - (par4 + var6);

                        var13 = var18 + 1 - var12 / 2;

 

                        for (var14 = par3 - var13; var14 <= par3 + var13; ++var14)

                        {

                            var15 = var14 - par3;

 

                            for (int var16 = par5 - var13; var16 <= par5 + var13; ++var16)

                            {

                                int var17 = var16 - par5;

 

                                if ((Math.abs(var15) != var13 || Math.abs(var17) != var13 || par2Random.nextInt(2) != 0 && var12 != 0))

                                {

                                    par1World.setBlock(var14, var11, var16, mcreator_etherealLeaves.block, this.metaLeaves, 2);

                                }

                            }

                        }

                    }

 

                    for (var11 = 0; var11 < var6; ++var11)

                    {

Block var12s = par1World.getBlock(par3, par4 + var11, par5);

                        var12 = Block.getIdFromBlock(var12s);

 

                        if (var12 == 0 || var12s == mcreator_etherealLeaves.block)

                        {

                            par1World.setBlock(par3, par4 + var11, par5, mcreator_etherealWood.block, this.metaWood, 2);

 

                            if (this.vinesGrow && var11 > 0)

                            {

                                if (par2Random.nextInt(3) > 0 && par1World.isAirBlock(par3 - 1, par4 + var11, par5))

                                {

                                    par1World.setBlock(par3 - 1, par4 + var11, par5, mcreator_etherealVines.block, 8, 2);

                                }

 

                                if (par2Random.nextInt(3) > 0 && par1World.isAirBlock(par3 + 1, par4 + var11, par5))

                                {

                                    par1World.setBlock(par3 + 1, par4 + var11, par5, mcreator_etherealVines.block, 2, 2);

                                }

 

                                if (par2Random.nextInt(3) > 0 && par1World.isAirBlock(par3, par4 + var11, par5 - 1))

                                {

                                    par1World.setBlock(par3, par4 + var11, par5 - 1, mcreator_etherealVines.block, 1, 2);

                                }

 

                                if (par2Random.nextInt(3) > 0 && par1World.isAirBlock(par3, par4 + var11, par5 + 1))

                                {

                                    par1World.setBlock(par3, par4 + var11, par5 + 1, mcreator_etherealVines.block, 4, 2);

                                }

                            }

                        }

                    }

 

                    if (this.vinesGrow)

                    {

                        for (var11 = par4 - 3 + var6; var11 <= par4 + var6; ++var11)

                        {

                            var12 = var11 - (par4 + var6);

                            var13 = 2 - var12 / 2;

 

                            for (var14 = par3 - var13; var14 <= par3 + var13; ++var14)

                            {

                                for (var15 = par5 - var13; var15 <= par5 + var13; ++var15)

                                {

                                    if (par1World.getBlock(var14, var11, var15) == mcreator_etherealLeaves.block)

                                    {

                                        if (par2Random.nextInt(4) == 0 && Block.getIdFromBlock(par1World.getBlock(var14 - 1, var11, var15)) == 0)

                                        {

                                            this.growVines(par1World, var14 - 1, var11, var15, 8);

                                        }

 

                                        if (par2Random.nextInt(4) == 0 && Block.getIdFromBlock(par1World.getBlock(var14 + 1, var11, var15)) == 0)

                                        {

                                            this.growVines(par1World, var14 + 1, var11, var15, 2);

                                        }

 

                                        if (par2Random.nextInt(4) == 0 && Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 - 1)) == 0)

                                        {

                                            this.growVines(par1World, var14, var11, var15 - 1, 1);

                                        }

 

                                        if (par2Random.nextInt(4) == 0 && Block.getIdFromBlock(par1World.getBlock(var14, var11, var15 + 1)) == 0)

                                        {

                                            this.growVines(par1World, var14, var11, var15 + 1, 4);

                                        }

                                    }

                                }

                            }

                        }

 

                        if (par2Random.nextInt(5) == 0 && var6 > 5)

                        {

                            for (var11 = 0; var11 < 2; ++var11)

                            {

                                for (var12 = 0; var12 < 4; ++var12)

                                {

                                    if (par2Random.nextInt(4 - var11) == 0)

                                    {

                                        var13 = par2Random.nextInt(3);

                                        par1World.setBlock(par3 + Direction.offsetX[Direction.rotateOpposite[var12]], par4 + var6 - 5 + var11, par5 + Direction.offsetZ[Direction.rotateOpposite[var12]], Blocks.air, var13 << 2 | var12, 2);

                                    }

                                }

                            }

                        }

                    }

 

                    return true;

                }

                else

                {

                    return false;

                }

            }

        }

        else

        {

            return false;

        }

    }

 

    /**

    * Grows vines downward from the given block for a given length. Args: World, x, starty, z, vine-length

    */

    private void growVines(World par1World, int par2, int par3, int par4, int par5)

    {

        par1World.setBlock(par2, par3, par4, Blocks.vine, par5, 2);

        int var6 = 4;

 

        while (true)

        {

            --par3;

 

            if (Block.getIdFromBlock(par1World.getBlock(par2, par3, par4)) != 0 || var6 <= 0)

            {

                return;

            }

 

            par1World.setBlock(par2, par3, par4, mcreator_etherealVines.block, par5, 2);

            --var6;

        }

    }

}

 

    @SideOnly(Side.CLIENT)

public int getBiomeGrassColor(){return 0xccffcc;}

@SideOnly(Side.CLIENT)

public int getBiomeFoliageColor(){return 0xccffcc;}

@SideOnly(Side.CLIENT)

public int getSkyColorByTemp(float par1){return 0x009999;}

@Override

public void genTerrainBlocks(World world, Random random, Block[] blocks, byte[] bytes, int int1, int int2, double d) {

        boolean flag = true;

        Block block = this.topBlock;

        byte b0 = (byte)(this.field_150604_aj & 255);

        Block block1 = this.fillerBlock;

        int k = -1;

        int l = (int)(p_150573_7_ / 3.0D + 3.0D + p_150560_2_.nextDouble() * 0.25D);

        int i1 = p_150560_5_ & 15;

        int j1 = p_150560_6_ & 15;

        int k1 = p_150560_3_.length / 256;

 

        for (int l1 = 255; l1 >= 0; --l1)

        {

            int i2 = (j1 * 16 + i1) * k1 + l1;

 

            if (l1 <= 0 + p_150560_2_.nextInt(5))

            {

                p_150560_3_[i2] = Blocks.bedrock;

            }

            else

            {

                Block block2 = p_150560_3_[i2];

 

                if (block2 != null && block2.getMaterial() != Material.air)

                {

                    if (block2 == mcreator_essenceStone.block)

                    {

                        if (k == -1)

                        {

                            if (l <= 0)

                            {

                                block = null;

                                b0 = 0;

                                block1 = mcreator_essenceStone.block;

                            }

                            else if (l1 >= 59 && l1 <= 64)

                            {

                                block = this.topBlock;

                                b0 = (byte)(this.field_150604_aj & 255);

                                block1 = this.fillerBlock;

                            }

 

                            if (l1 < 63 && (block == null || block.getMaterial() == Material.air))

                            {

                                if (this.getFloatTemperature(p_150560_5_, l1, p_150560_6_) < 0.15F)

                                {

                                    block = mcreator_etherealWater.block;

                                    b0 = 0;

                                }

                                else

                                {

                                    block = mcreator_etherealWater.block;

                                    b0 = 0;

                                }

                            }

 

                            k = l;

 

                            if (l1 >= 62)

                            {

                                p_150560_3_[i2] = block;

                                p_150560_4_[i2] = b0;

                            }

                            else if (l1 < 56 - l)

                            {

                                block = null;

                                block1 = mcreator_essenceStone.block;

                                p_150560_3_[i2] = mcreator_essenceStone.block;

                            }

                            else

                            {

                                p_150560_3_[i2] = block1;

                            }

                        }

                        else if (k > 0)

                        {

                            --k;

                            p_150560_3_[i2] = block1;

 

                            if (k == 0 && block1 == mcreator_essenceStone.block)

                            {

                                k = p_150560_2_.nextInt(4) + Math.max(0, l1 - 63);

                                block1 = mcreator_essenceStone.block;

                            }

                        }

                    }

                }

                else

                {

                    k = -1;

                }

            }

        }

}

}

 

}

 

 

 

If anybody can tell me what I'm doing wrong that would be great.

Posted

Then why does the minecraft forge wiki specifically say that beginner modders should try using MCreator?

Besides part of this code I wrote myself. I'm trying to ask for what I did wrong. If I was not so new to Java I would probably be writing the whole thing myself.

Posted

Where does it say that? Please link it, so we can remove it, as using MCreator is not supported here.

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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



×
×
  • Create New...

Important Information

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