Jump to content

Recommended Posts

Posted

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

 

 

 

 

 

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

    • It is a rendering issue with embeddium/oculus
    • So, I have a minecraft world hosted with essential on forge 1.20.1, there's 149 mods, and the forge version is 47.3.0, and it's been like that for a good 2-3 weeks, and all of a sudden, it stopped loading, and I have 0 clue as to why, and this world means A LOT to me, so if anyone out there is able to help, I would GLADLY appreciate it. here's the link if ya wanna help:   [04Dec2024 22:42:24.552] [Worker-ResourceReload-3/ERROR][net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener/]: Couldn't parse data file slabsexpanded:snow_blockblocktoslab from slabsexpanded:recipes/snow_blockblocktoslab.json com.google.gson.JsonParseException: com.google.gson.stream.MalformedJsonException: Expected name at line 16 column 4 path $.result.item at net.minecraft.util.GsonHelper.m_13780_(GsonHelper.java:526) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.util.GsonHelper.m_263475_(GsonHelper.java:531) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.util.GsonHelper.m_13776_(GsonHelper.java:581) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_278771_(SimpleJsonResourceReloadListener.java:41) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_5944_(SimpleJsonResourceReloadListener.java:29) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener.m_5944_(SimpleJsonResourceReloadListener.java:17) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at net.minecraft.server.packs.resources.SimplePreparableReloadListener.m_10786_(SimplePreparableReloadListener.java:11) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?] at java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1768) ~[?:?] at java.util.concurrent.CompletableFuture$AsyncSupply.exec(CompletableFuture.java:1760) ~[?:?] at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373) ~[?:?] at java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182) ~[?:?] at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655) ~[?:?] at java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622) ~[?:?] at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165) ~[?:?] Caused by: com.google.gson.stream.MalformedJsonException: Expected name at line 16 column 4 path $.result.item at com.google.gson.stream.JsonReader.syntaxError(JsonReader.java:1657) ~[gson-2.10.jar%23107!/:?] at com.google.gson.stream.JsonReader.doPeek(JsonReader.java:514) ~[gson-2.10.jar%23107!/:?] at com.google.gson.stream.JsonReader.hasNext(JsonReader.java:422) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:779) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$28.read(TypeAdapters.java:725) ~[gson-2.10.jar%23107!/:?] at com.google.gson.internal.bind.TypeAdapters$34$1.read(TypeAdapters.java:1007) ~[gson-2.10.jar%23107!/:?] at net.minecraft.util.GsonHelper.m_13780_(GsonHelper.java:524) ~[client-1.20.1-20230612.114412-srg.jar%23490!/:?]
    • Hello! I have been having a problem with Forgematica, Embeddium, Oculus, and create. I wanted to download litematica so I could see which blocks are in my creative mode build, so that I could collect them all in survival. However, litematica is a fabric mod. I found a port called forgematica, which I added (along with it's dependency) to my mods folder. I loaded into a new world, and built a structure. Then, I added a part from the create mod, and the game crashed instantly, with exit code -1. Thanks for any help! Crash Report and mods list: https://pastebin.com/rtzh6LAi
  • Topics

  • Who's Online (See full list)

    • There are no registered users currently online
×
×
  • Create New...

Important Information

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