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

[1.7.2] IWorldGenerator Crash


ScrawnyBeast
 Share

Recommended Posts

When I try to register and run a class implementing IWorldGenerator minecraft crashes when loading any new chuncks.

 

Here is how I handle the Generator code in my main mod file

 

public static EventManager eventManager;

...

@EventHandler
    public void preInit(FMLPreInitializationEvent event)
    {

...

GameRegistry.registerWorldGenerator(eventManager, 0);
        

    }

 

 

Here is the EventManager class I made implementing IWorldGenerator

 


public class EventManager implements IWorldGenerator{


public void generate(Random random, int chunkX, int chunkZ, World world, IChunkProvider chunkGenerator, IChunkProvider chunkProvider)
    {
        switch (world.provider.dimensionId)
        {
        case -1:
            generateNether(world, random, chunkX * 16, chunkZ * 16);
        case 0:
            generateSurface(world, random, chunkX * 16, chunkZ * 16);
        case 1:
            generateEnd(world, random, chunkX * 16, chunkZ * 16);
        }
    }

    private void generateEnd(World world, Random random, int x, int z)
    {

    }

    private void generateSurface(World world, Random random, int x, int z)
    {
        
    }

    private void generateNether(World world, Random random, int chunk_X, int chunk_Z)
    {
    	


    }

}

 

 

The stack trace starts with this.

 

 

 

 

[13:57:43] [server thread/INFO]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@63376b5e)

[13:57:43] [server thread/INFO]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@63376b5e)

[13:57:43] [server thread/INFO]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@63376b5e)

[13:57:43] [server thread/INFO]: Preparing start region for level 0

[13:57:44] [server thread/ERROR]: Encountered an unexpected exception

java.lang.NullPointerException: at index 0

at com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:240) ~[guava-15.0.jar:?]

at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:231) ~[guava-15.0.jar:?]

at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:226) ~[guava-15.0.jar:?]

at com.google.common.collect.ImmutableList.construct(ImmutableList.java:303) ~[guava-15.0.jar:?]

at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:258) ~[guava-15.0.jar:?]

at cpw.mods.fml.common.registry.GameRegistry.computeSortedGeneratorList(GameRegistry.java:116) ~[GameRegistry.class:?]

at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:91) ~[GameRegistry.class:?]

at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:256) ~[ChunkProviderServer.class:?]

at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1177) ~[Chunk.class:?]

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:150) ~[ChunkProviderServer.class:?]

at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:353) ~[MinecraftServer.class:?]

at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:81) ~[integratedServer.class:?]

at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:98) ~[integratedServer.class:?]

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:488) [MinecraftServer.class:?]

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:787) [MinecraftServer$2.class:?]

[13:57:44] [server thread/ERROR]: This crash report has been saved to: C:\Users\Chris\Desktop\Java Workspace\minecraft\1.7.2\Forge\.\crash-reports\crash-2014-02-09_13.57.44-server.txt

[13:57:44] [server thread/INFO]: Stopping server

[13:57:44] [server thread/INFO]: Saving players

[13:57:44] [server thread/INFO]: Saving worlds

[13:57:44] [server thread/INFO]: Saving chunks for level 'New World'/Overworld

[13:57:44] [server thread/INFO]: Saving chunks for level 'New World'/Nether

[13:57:44] [server thread/INFO]: Saving chunks for level 'New World'/The End

[13:57:44] [server thread/INFO]: Unloading dimension 0

[13:57:44] [server thread/INFO]: Unloading dimension -1

[13:57:44] [server thread/INFO]: Unloading dimension 1

[13:57:44] [server thread/INFO]: The state engine was in incorrect state SERVER_STARTING and forced into state SERVER_STOPPED. Errors may have been discarded.

---- Minecraft Crash Report ----

// You're mean.

 

Time: 2/9/14 1:57 PM

Description: Exception in server tick loop

 

java.lang.NullPointerException: at index 0

at com.google.common.collect.ObjectArrays.checkElementNotNull(ObjectArrays.java:240)

at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:231)

at com.google.common.collect.ObjectArrays.checkElementsNotNull(ObjectArrays.java:226)

at com.google.common.collect.ImmutableList.construct(ImmutableList.java:303)

at com.google.common.collect.ImmutableList.copyOf(ImmutableList.java:258)

at cpw.mods.fml.common.registry.GameRegistry.computeSortedGeneratorList(GameRegistry.java:116)

at cpw.mods.fml.common.registry.GameRegistry.generateWorld(GameRegistry.java:91)

at net.minecraft.world.gen.ChunkProviderServer.populate(ChunkProviderServer.java:256)

at net.minecraft.world.chunk.Chunk.populateChunk(Chunk.java:1177)

at net.minecraft.world.gen.ChunkProviderServer.loadChunk(ChunkProviderServer.java:150)

at net.minecraft.server.MinecraftServer.initialWorldChunkLoad(MinecraftServer.java:353)

at net.minecraft.server.integrated.IntegratedServer.loadAllWorlds(IntegratedServer.java:81)

at net.minecraft.server.integrated.IntegratedServer.startServer(IntegratedServer.java:98)

at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:488)

at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:787)

 

 

A detailed walkthrough of the error, its code path and all known details is as follows:

---------------------------------------------------------------------------------------

 

-- System Details --

Details:

Minecraft Version: 1.7.2

Operating System: Windows 7 (amd64) version 6.1

Java Version: 1.7.0_45, Oracle Corporation

Java VM Version: Java HotSpot 64-Bit Server VM (mixed mode), Oracle Corporation

Memory: 576316904 bytes (549 MB) / 727187456 bytes (693 MB) up to 1897922560 bytes (1810 MB)

JVM Flags: 0 total;

AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

IntCache: cache: 1, tcache: 1, allocated: 12, tallocated: 94

FML: MCP v9.01-pre FML v7.2.48.997 Minecraft Forge 10.12.0.997 5 mods loaded, 5 mods active

mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available

FML{7.2.48.997} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.0.997.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available

Forge{10.12.0.997} [Minecraft Forge] (forgeSrc-1.7.2-10.12.0.997.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available

examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available

tutorial{1.0} [tutorial] (bin) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available

Profiler Position: N/A (disabled)

Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used

Player Count: 0 / 8; []

Type: Integrated Server (map_client.txt)

Is Modded: Definitely; Client brand changed to 'fml,forge'

#@!@# Game crashed! Crash report saved to: #@!@# .\crash-reports\crash-2014-02-09_13.57.44-server.txt

[13:57:44] [Client Shutdown Thread/INFO]: Stopping server

AL lib: (EE) alc_cleanup: 1 device not closed

 

 

 

 

 

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



×
×
  • Create New...

Important Information

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