Posted August 9, 201411 yr Hello, my custom seed crashes the game when I try to place it on farmland. Server Crash ---- Minecraft Crash Report ---- // Sorry Time: 8/9/14 11:00 AM Description: Ticking memory connection java.lang.NullPointerException: Ticking memory connection at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:96) at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:667) at net.minecraft.world.World.setBlock(World.java:515) at net.minecraft.world.World.setBlock(World.java:663) at net.minecraft.item.ItemSeeds.onItemUse(ItemSeeds.java:41) at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:145) at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:422) at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:591) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247) at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:736) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:624) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:495) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:762) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:96) at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:667) at net.minecraft.world.World.setBlock(World.java:515) at net.minecraft.world.World.setBlock(World.java:663) at net.minecraft.item.ItemSeeds.onItemUse(ItemSeeds.java:41) at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:145) at net.minecraft.server.management.ItemInWorldManager.activateBlockOrUseItem(ItemInWorldManager.java:422) at net.minecraft.network.NetHandlerPlayServer.processPlayerBlockPlacement(NetHandlerPlayServer.java:591) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:74) at net.minecraft.network.play.client.C08PacketPlayerBlockPlacement.processPacket(C08PacketPlayerBlockPlacement.java:122) at net.minecraft.network.NetworkManager.processReceivedPackets(NetworkManager.java:247) -- Ticking connection -- Details: Connection: net.minecraft.network.NetworkManager@370e1549 Stacktrace: at net.minecraft.network.NetworkSystem.networkTick(NetworkSystem.java:182) at net.minecraft.server.MinecraftServer.updateTimeLightAndEntities(MinecraftServer.java:736) at net.minecraft.server.MinecraftServer.tick(MinecraftServer.java:624) at net.minecraft.server.integrated.IntegratedServer.tick(IntegratedServer.java:118) at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:495) at net.minecraft.server.MinecraftServer$2.run(MinecraftServer.java:762) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.7.0_55, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 845370712 bytes (806 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.18.1180 Minecraft Forge 10.13.0.1180 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.18.1180} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.0.1180} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available herbology{1.7.10-1.0} [Herbology] (Herbology) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Player Count: 1 / 8; [EntityPlayerMP['ForgeDevName'/186, l='New World', x=-27.64, y=62.61, z=189.70]] Type: Integrated Server (map_client.txt) Is Modded: Definitely; Client brand changed to 'fml,forge' Client Crash ---- Minecraft Crash Report ---- // There are four lights! Time: 8/9/14 11:00 AM Description: Unexpected error java.lang.NullPointerException: Unexpected error at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:96) at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:667) at net.minecraft.world.World.setBlock(World.java:515) at net.minecraft.world.World.setBlock(World.java:663) at net.minecraft.item.ItemSeeds.onItemUse(ItemSeeds.java:41) at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:145) at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:407) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1528) at net.minecraft.client.Minecraft.runTick(Minecraft.java:2043) at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:1038) at net.minecraft.client.Minecraft.run(Minecraft.java:961) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at GradleStart.bounce(GradleStart.java:108) at GradleStart.startClient(GradleStart.java:101) at GradleStart.main(GradleStart.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) A detailed walkthrough of the error, its code path and all known details is as follows: --------------------------------------------------------------------------------------- -- Head -- Stacktrace: at net.minecraft.world.chunk.storage.ExtendedBlockStorage.func_150818_a(ExtendedBlockStorage.java:96) at net.minecraft.world.chunk.Chunk.func_150807_a(Chunk.java:667) at net.minecraft.world.World.setBlock(World.java:515) at net.minecraft.world.World.setBlock(World.java:663) at net.minecraft.item.ItemSeeds.onItemUse(ItemSeeds.java:41) at net.minecraft.item.ItemStack.tryPlaceItemIntoWorld(ItemStack.java:145) at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:407) at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1528) -- Affected level -- Details: Level name: MpServer All players: 1 total; [EntityClientPlayerMP['ForgeDevName'/186, l='MpServer', x=-27.62, y=64.23, z=189.70]] Chunk stats: MultiplayerChunkCache: 81, 81 Level seed: 0 Level generator: ID 00 - default, ver 1. Features enabled: false Level generator options: Level spawn location: World: (-76,64,200), Chunk: (at 4,4,8 in -5,12; contains blocks -80,0,192 to -65,255,207), Region: (-1,0; contains chunks -32,0 to -1,31, blocks -512,0,0 to -1,255,511) Level time: 6136 game time, 6136 day time Level dimension: 0 Level storage version: 0x00000 - Unknown? Level weather: Rain time: 0 (now: false), thunder time: 0 (now: false) Level game mode: Game mode: creative (ID 1). Hardcore: false. Cheats: false Forced entities: 56 total; [EntitySpider['Spider'/137, l='MpServer', x=9.72, y=26.62, z=223.09], EntityZombie['Zombie'/136, l='MpServer', x=2.16, y=27.00, z=220.28], EntityBat['Bat'/139, l='MpServer', x=11.28, y=28.10, z=224.50], EntitySpider['Spider'/138, l='MpServer', x=12.28, y=26.14, z=221.70], EntitySquid['Squid'/141, l='MpServer', x=7.06, y=45.34, z=233.72], EntityBat['Bat'/140, l='MpServer', x=5.84, y=31.07, z=233.31], EntityCreeper['Creeper'/142, l='MpServer', x=1.50, y=32.00, z=240.50], EntityCreeper['Creeper'/129, l='MpServer', x=3.50, y=24.00, z=196.50], EntityZombie['Zombie'/128, l='MpServer', x=1.13, y=24.00, z=198.50], EntityCreeper['Creeper'/131, l='MpServer', x=5.41, y=17.00, z=200.00], EntitySkeleton['Skeleton'/130, l='MpServer', x=0.56, y=19.00, z=205.00], EntitySquid['Squid'/133, l='MpServer', x=1.31, y=37.19, z=202.22], EntityBat['Bat'/132, l='MpServer', x=16.91, y=24.70, z=199.09], EntityCreeper['Creeper'/135, l='MpServer', x=5.50, y=18.00, z=215.06], EntityCreeper['Creeper'/134, l='MpServer', x=-5.56, y=16.00, z=213.00], EntityCreeper['Creeper'/153, l='MpServer', x=30.47, y=12.00, z=153.97], EntitySkeleton['Skeleton'/154, l='MpServer', x=26.50, y=23.00, z=150.50], EntitySkeleton['Skeleton'/155, l='MpServer', x=27.66, y=25.00, z=149.75], EntitySkeleton['Skeleton'/156, l='MpServer', x=23.50, y=27.00, z=193.78], EntityZombie['Zombie'/166, l='MpServer', x=47.94, y=27.00, z=198.50], EntityCreeper['Creeper'/165, l='MpServer', x=37.00, y=30.00, z=115.47], EntityClientPlayerMP['ForgeDevName'/186, l='MpServer', x=-27.62, y=64.23, z=189.70], EntityZombie['Zombie'/71, l='MpServer', x=-95.97, y=31.00, z=240.47], EntityItem['item.tile.grass'/76, l='MpServer', x=-68.16, y=72.13, z=198.56], EntitySquid['Squid'/77, l='MpServer', x=-70.91, y=56.72, z=242.03], EntityBat['Bat'/78, l='MpServer', x=-75.84, y=18.45, z=249.31], EntitySkeleton['Skeleton'/84, l='MpServer', x=-55.16, y=28.00, z=167.75], EntityCreeper['Creeper'/81, l='MpServer', x=-48.50, y=28.00, z=170.00], EntitySkeleton['Skeleton'/83, l='MpServer', x=-50.44, y=29.00, z=170.47], EntitySkeleton['Skeleton'/82, l='MpServer', x=-59.41, y=29.00, z=167.94], EntityCreeper['Creeper'/95, l='MpServer', x=-34.38, y=15.00, z=206.09], EntityCreeper['Creeper'/102, l='MpServer', x=-28.50, y=12.00, z=162.50], EntityCreeper['Creeper'/103, l='MpServer', x=-29.50, y=12.00, z=165.50], EntityCreeper['Creeper'/100, l='MpServer', x=-20.38, y=14.00, z=163.97], EntityCreeper['Creeper'/101, l='MpServer', x=-29.09, y=16.00, z=158.78], EntityZombie['Zombie'/99, l='MpServer', x=-17.53, y=17.00, z=119.16], EntitySkeleton['Skeleton'/110, l='MpServer', x=-12.13, y=18.00, z=150.63], EntitySkeleton['Skeleton'/111, l='MpServer', x=-14.34, y=19.00, z=159.28], EntityCreeper['Creeper'/108, l='MpServer', x=-4.69, y=18.00, z=146.06], EntitySkeleton['Skeleton'/109, l='MpServer', x=-14.06, y=19.00, z=158.44], EntityZombie['Zombie'/106, l='MpServer', x=-20.03, y=18.00, z=228.38], EntityZombie['Zombie'/107, l='MpServer', x=-2.75, y=22.00, z=120.53], EntitySkeleton['Skeleton'/104, l='MpServer', x=-28.38, y=12.00, z=163.84], EntitySpider['Spider'/105, l='MpServer', x=-19.84, y=16.00, z=212.03], EntityZombie['Zombie'/116, l='MpServer', x=-15.50, y=18.00, z=203.50], EntitySkeleton['Skeleton'/115, l='MpServer', x=-9.38, y=17.00, z=203.88], EntityCreeper['Creeper'/114, l='MpServer', x=-0.63, y=18.00, z=202.94], EntityBat['Bat'/113, l='MpServer', x=-2.34, y=25.82, z=197.34], EntityCreeper['Creeper'/112, l='MpServer', x=-4.72, y=15.00, z=191.06], EntityZombie['Zombie'/127, l='MpServer', x=0.31, y=24.00, z=198.50], EntityCreeper['Creeper'/126, l='MpServer', x=2.50, y=19.00, z=197.50], EntityCreeper['Creeper'/125, l='MpServer', x=5.00, y=19.00, z=210.44], EntitySquid['Squid'/124, l='MpServer', x=12.19, y=54.38, z=166.50], EntitySpider['Spider'/123, l='MpServer', x=9.28, y=31.39, z=150.28], EntityBat['Bat'/122, l='MpServer', x=11.75, y=21.10, z=156.75], EntitySkeleton['Skeleton'/120, l='MpServer', x=6.13, y=16.00, z=112.44]] Retry entities: 0 total; [] Server brand: fml,forge Server type: Integrated singleplayer server Stacktrace: at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:417) at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2567) at net.minecraft.client.Minecraft.run(Minecraft.java:990) at net.minecraft.client.main.Main.main(Main.java:164) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) at net.minecraft.launchwrapper.Launch.main(Launch.java:28) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at GradleStart.bounce(GradleStart.java:108) at GradleStart.startClient(GradleStart.java:101) at GradleStart.main(GradleStart.java:56) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) -- System Details -- Details: Minecraft Version: 1.7.10 Operating System: Windows 8.1 (amd64) version 6.3 Java Version: 1.7.0_55, Oracle Corporation Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation Memory: 847169648 bytes (807 MB) / 1056309248 bytes (1007 MB) up to 1056309248 bytes (1007 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 13, tallocated: 95 FML: MCP v9.05 FML v7.10.18.1180 Minecraft Forge 10.13.0.1180 4 mods loaded, 4 mods active mcp{9.05} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available FML{7.10.18.1180} [Forge Mod Loader] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Forge{10.13.0.1180} [Minecraft Forge] (forgeSrc-1.7.10-10.13.0.1180.jar) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available herbology{1.7.10-1.0} [Herbology] (Herbology) Unloaded->Constructed->Pre-initialized->Initialized->Post-initialized->Available->Available->Available->Available Launched Version: 1.7.10 LWJGL: 2.9.1 OpenGL: Intel(R) HD Graphics GL version 4.0.0 - Build 10.18.10.3621, Intel GL Caps: Using GL 1.3 multitexturing. Using framebuffer objects because OpenGL 3.0 is supported and separate blending is supported. Anisotropic filtering is supported and maximum anisotropy is 16. Shaders are available because OpenGL 2.1 is supported. Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used Anisotropic Filtering: Off (1) Main Class https://github.com/LogicTechCorp/Herbology/blob/master/src/main/java/herbology/Herbology.java Mod Registry Classes https://github.com/LogicTechCorp/Herbology/blob/master/src/main/java/herbology/init/ModBlocks.java https://github.com/LogicTechCorp/Herbology/blob/master/src/main/java/herbology/init/ModItems.java Crop Classes https://github.com/LogicTechCorp/Herbology/blob/master/src/main/java/herbology/block/Herb.java https://github.com/LogicTechCorp/Herbology/blob/master/src/main/java/herbology/block/Herb2.java https://github.com/LogicTechCorp/Herbology/blob/master/src/main/java/herbology/block/Vine.java
August 10, 201411 yr Hi I think that your static Item intialisers are probably running before your static Blocks are initialised, so that the blocks are still null. How I got there: NPE at ExtendedBlockStorage:96 if (p_150818_4_.getTickRandomly()) p_150818_4 is the Block passed to the method, and it is null. Looking back up the call stack, it comes from ItemSeeds.onItemUse par3World.setBlock(par4, par5 + 1, par6, this.field_150925_a); field_150925_a is initialised in the constructor public ItemSeeds(Block p_i45352_1_, Block p_i45352_2_) { this.field_150925_a = p_i45352_1_; Which tells me that your ItemSeeds being initialised with a null block, eg public static final Item ginsengSeeds = new ItemSeeds(ModBlocks.ginHerb, Blocks.farmland).setCreativeTab(CreativeTab.tabHerbology).setTextureName(Reference.RESOURCE_PREFIX + "ginSeeds").setUnlocalizedName("ginSeeds").setPotionEffect("+4"); Which suggests to me that ModBlocks.ginHerb is null. -TGG
August 10, 201411 yr Author That is what I thought as well but my items are initialized after my blocks. @Mod.EventHandler public void preInit(FMLPreInitializationEvent event) { ModBlocks.init(); ModItems.init(); }
August 10, 201411 yr This kind of error though is common when, like TGG mentions, you pass null to the seed constructor. I notice that your Blocks tomato plant actually references the item (in the set info), so maybe that is mucking things up (since that would be uninitialized at that point). Otherwise, maybe put in some System.out.println() statement to confirm whether the block in your seed is actually null and work backwards until you understand why. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
August 10, 201411 yr Hi Your .init() methods don't control when your static Item initialisers are running. They execute when the class is loaded, not when you call .init(). If Forge loads your ModItems class before ModBlocks class, your static Item initialisers will run before the static Block initialisers. I would suggest you move the initialisers to the init() method. eg public static Item ginsengSeeds; public void init() { ginsengSeeds = new ItemSeeds(ModBlocks.ginHerb, Blocks.farmland).setCreativeTab(CreativeTab.tabHerbology).setTextureName(Reference.RESOURCE_PREFIX + "ginSeeds").setUnlocalizedName("ginSeeds").setPotionEffect("+4"); } -TGG
August 10, 201411 yr Author Hi Your .init() methods don't control when your static Item initialisers are running. They execute when the class is loaded, not when you call .init(). If Forge loads your ModItems class before ModBlocks class, your static Item initialisers will run before the static Block initialisers. I would suggest you move the initialisers to the init() method. eg public static Item ginsengSeeds; public void init() { ginsengSeeds = new ItemSeeds(ModBlocks.ginHerb, Blocks.farmland).setCreativeTab(CreativeTab.tabHerbology).setTextureName(Reference.RESOURCE_PREFIX + "ginSeeds").setUnlocalizedName("ginSeeds").setPotionEffect("+4"); } -TGG This has fixed the problem and I would like to thank you.
August 10, 201411 yr This has fixed the problem and I would like to thank you. No worries, you're welcome, glad we fixed it -TGG
August 15, 201411 yr Hi You need to initialise the Block before the Item. So the order of this is the wrong way: TD_Items.init(); TD_Blocks.init(); -TGG
August 15, 201411 yr in your items init() use console statement System.out.println() to print out a test of whether the block is null just before you register it to the seed item. If it is null, then it means you still have issue with order of initialization. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
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.