Structure generation problems for a dimension (Coding)

Started by mega1134227 on Fri, 03/02/2018 - 04:06

Topic category: Advanced modding

Last seen on 02:13, 8. Dec 2019
Joined Feb 2016
User points:

Statistics:

  • Comments:
  • Forum topics:
  • Modifications:
  • Wiki pages:
Structure generation problems for a dimension (Coding)
Fri, 03/02/2018 - 04:06

I am trying to make a structure bigger than 1600 blocks spawn and figured out the code for a regular Overworld one, but I just can't seem to make it work for a dimension since it seems to work differently. I believe it is a mistake in my code that I need to fix and I can't find it. Can someone help me please?

 

Here is my gradle log for my mistake:

 

Executing gradle command: clean build
Microsoft Windows [version 10.0.16299.248]
(c) 2017 Microsoft Corporation. Tous droits r‚serv‚s.
C:\Pylo\MCreator175(gud(64))>cd forge
C:\Pylo\MCreator175(gud(64))\forge>SET "JAVA_HOME=C:\Pylo\MCreator175(gud(64))\jdk64\"
C:\Pylo\MCreator175(gud(64))\forge>SET JAVA_EXE=%JAVA_HOME%\bin\java.exe
C:\Pylo\MCreator175(gud(64))\forge>SET PATH=%JAVA_HOME%\bin\;%PATH%
C:\Pylo\MCreator175(gud(64))\forge>gradlew -Dorg.gradle.jvmargs="-Xms128m -Xmx3024m" clean build 
This mapping 'snapshot_20161220' was designed for MC 1.11! Use at your own peril.
#################################################
         ForgeGradle 2.2-SNAPSHOT-d13a6c8        
  https://github.com/MinecraftForge/ForgeGradle  
#################################################
               Powered by MCP unknown               
             http://modcoderpack.com             
         by: Searge, ProfMobius, Fesh0r,         
         R4wk, ZeuX, IngisKahn, bspkrs           
#################################################
:clean
:deobfCompileDummyTask
:getVersionJson
:extractUserdev UP-TO-DATE
:downloadClient SKIPPED
:downloadServer SKIPPED
:splitServerJar SKIPPED
:mergeJars SKIPPED
:applyBinaryPatches SKIPPED
:deobfProvidedDummyTask
:extractDependencyATs SKIPPED
:extractMcpData SKIPPED
:extractMcpMappings SKIPPED
:genSrgs SKIPPED
:deobfMcMCP SKIPPED
:sourceApiJava
:compileApiJava UP-TO-DATE
:processApiResources UP-TO-DATE
:apiClasses UP-TO-DATE
:sourceMainJava
C:\Pylo\MCreator175(gud(64))\forge\build\sources\main\java\mod\mcreator\mcreator_hellandimension.java:1255: error: cannot find symbol
               generate2(world, i, k); {
               ^
  symbol:   method generate2(World,int,int)
  location: class WorldGenSchematicNo2
1 error
: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.
BUILD FAILED
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Total time: 1 mins 18.667 secs
C:\Pylo\MCreator175(gud(64))\forge>
Task completed with return code 0 in 80785 milliseconds

 

And here is my code:

 

public static class WorldGenSchematicNo2 extends WorldGenerator {

        public WorldGenSchematicNo2() {

        }

        public boolean generate(World world, Random random, BlockPos pos) {

            int i2 = pos.getX();
            int k2 = pos.getZ();

            int i = i2 + random.nextInt(15);
            int k = k2 + random.nextInt(15);

            int j = world.getChunkFromChunkCoords(i, k).getHeight(new BlockPos(i & 15, 0, k & 15)) + random.nextInt(108) + 20;

            if ((random.nextInt(1000000) + 1) <= 399000) {
                boolean place = true;

                for (int y = 0; y < 26; y++)
                    for (int z = 0; z < 10; z++)
                        for (int x = 0; x < 11; x++)
                            if (world.getBlockState(new BlockPos(i + x, j + y + 1, k + z)).getBlock() != Blocks.AIR)
                                place = false;

                if (place) {
                    world.setBlockState(new BlockPos(i + 5, j + 0, k + 3), Block.getBlockFromName("testenvironmentmod:hellan").getStateFromMeta(0), 3);
                    [...]
                    world.setBlockState(new BlockPos(i + 5, j + 12, k + 8), Block.getBlockFromName("testenvironmentmod:maelstromleaves).getStateFromMeta(0), 3);
                    generate2(world, i, k); {
                
                }
                     boolean generate2; 

             int i3 = pos.getX();
               int k3 = pos.getZ();

               int i4 = i3;
               int k4 = k3;

               int j5 = world.getChunkFromChunkCoords(i4, k4).getHeight(new BlockPos(i4 & 15, 0, k & 15)) + 20;
            
                    world.setBlockState(new BlockPos(i + 5, j + 13, k + 0), Block.getBlockFromName("testenvironmentmod:maelstromleaves).getStateFromMeta(0), 3);

                    [...]
                    world.setBlockState(new BlockPos(i + 4, j + 25, k + 1), Block.getBlockFromName("testenvironmentmod:maelstromleaves).getStateFromMeta(0), 3);
                }
            }

            return true;
        }

    }
 

0Upvote this forum topic