Jump to content

Recommended Posts

Posted

For now my mod is for client. The informations about nearest village player can see in my own gui.

Crash report indicates that with second line of the code below something is wrong.

        BetterWorldHandler handler = new BetterWorldHandler();
        BetterVillageCollection vlgc = handler.villageCollectionObj;

Posted

For now my mod is for client. The informations about nearest village player can see in my own gui.

Crash report indicates that with second line of the code below something is wrong.

        BetterWorldHandler handler = new BetterWorldHandler();
        BetterVillageCollection vlgc = handler.villageCollectionObj;

 

diesieben07 has said before, we need those crash reports to help you...

Posted
at BetterWorld.village.VillageInfo.build(VillageInfo.java:150) ~[VillageInfo.class:?]
at BetterWorld.gui.GuiVillageControler.<init>(GuiVillageControler.java:29) ~[GuiVillageControler.class:?]
at BetterWorld.BetterWorldGuiHandler.getClientGuiElement(BetterWorldGuiHandler.java:26) ~[betterWorldGuiHandler.class:?]
at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263) ~[NetworkRegistry.class:?]
at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93) ~[FMLNetworkHandler.class:?]
at BetterWorld.blocks.BlockVillageControler.onBlockActivated(BlockVillageControler.java:21) ~[blockVillageControler.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:380) ~[PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1497) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2010) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:995) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:910) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]

Posted

from console

[22:12:52] [Client thread/FATAL]: Unreported exception thrown!
java.lang.NullPointerException
at BetterWorld.village.VillageInfo.build(VillageInfo.java:150) ~[VillageInfo.class:?]
at BetterWorld.gui.GuiVillageControler.<init>(GuiVillageControler.java:29) ~[GuiVillageControler.class:?]
at BetterWorld.BetterWorldGuiHandler.getClientGuiElement(BetterWorldGuiHandler.java:26) ~[betterWorldGuiHandler.class:?]
at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263) ~[NetworkRegistry.class:?]
at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93) ~[FMLNetworkHandler.class:?]
at BetterWorld.blocks.BlockVillageControler.onBlockActivated(BlockVillageControler.java:21) ~[blockVillageControler.class:?]
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:380) ~[PlayerControllerMP.class:?]
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1497) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2010) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:995) ~[Minecraft.class:?]
at net.minecraft.client.Minecraft.run(Minecraft.java:910) [Minecraft.class:?]
at net.minecraft.client.main.Main.main(Main.java:112) [Main.class:?]
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.7.0_60]
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.7.0_60]
at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.7.0_60]
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134) [launchwrapper-1.9.jar:?]
at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.9.jar:?]
---- Minecraft Crash Report ----
// This doesn't make any sense!

Time: 20.07.14 22:12
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
at BetterWorld.village.VillageInfo.build(VillageInfo.java:150)
at BetterWorld.gui.GuiVillageControler.<init>(GuiVillageControler.java:29)
at BetterWorld.BetterWorldGuiHandler.getClientGuiElement(BetterWorldGuiHandler.java:26)
at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263)
at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93)
at BetterWorld.blocks.BlockVillageControler.onBlockActivated(BlockVillageControler.java:21)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:380)
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1497)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2010)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:995)
at net.minecraft.client.Minecraft.run(Minecraft.java:910)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Stacktrace:
at BetterWorld.village.VillageInfo.build(VillageInfo.java:150)
at BetterWorld.gui.GuiVillageControler.<init>(GuiVillageControler.java:29)
at BetterWorld.BetterWorldGuiHandler.getClientGuiElement(BetterWorldGuiHandler.java:26)
at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263)
at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93)
at BetterWorld.blocks.BlockVillageControler.onBlockActivated(BlockVillageControler.java:21)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:380)
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1497)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player894'/185, l='MpServer', x=-639,81, y=5,62, z=147,50]]
Chunk stats: MultiplayerChunkCache: 190, 190
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options: 
Level spawn location: World: (76,4,-83), Chunk: (at 12,0,13 in 4,-6; contains blocks 64,0,-96 to 79,255,-81), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
Level time: 41908 game time, 18151 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: 60 total; [EntityItem['item.item.rottenFlesh'/143, l='MpServer', x=-652,13, y=9,13, z=161,88], EntityVillager['Villager'/142, l='MpServer', x=-644,34, y=5,00, z=168,59], EntityVillager['Villager'/152, l='MpServer', x=-634,30, y=7,00, z=173,69], EntityVillager['Villager'/153, l='MpServer', x=-635,00, y=6,50, z=173,70], EntityVillager['Villager'/154, l='MpServer', x=-637,69, y=5,00, z=160,56], EntityVillager['Villager'/155, l='MpServer', x=-635,63, y=6,00, z=173,64], EntityVillager['Villager'/156, l='MpServer', x=-637,31, y=5,00, z=161,50], EntityWarior['entity.ModelWarior.name'/157, l='MpServer', x=-642,55, y=4,00, z=164,97], EntityVillager['Villager'/158, l='MpServer', x=-662,69, y=5,00, z=169,69], EntityVillager['Villager'/159, l='MpServer', x=-661,50, y=5,00, z=168,50], EntityArrow['arrow'/144, l='MpServer', x=-651,56, y=6,05, z=170,50], EntityArrow['arrow'/145, l='MpServer', x=-651,41, y=6,05, z=169,97], EntityArrow['arrow'/146, l='MpServer', x=-651,78, y=6,05, z=169,97], EntityArrow['arrow'/147, l='MpServer', x=-651,78, y=6,05, z=169,97], EntityArrow['arrow'/148, l='MpServer', x=-651,78, y=6,05, z=169,97], EntityXPOrb['Experience Orb'/149, l='MpServer', x=-20917,00, y=158,43, z=5355,00], EntityXPOrb['Experience Orb'/150, l='MpServer', x=-20878,00, y=158,43, z=5418,00], EntityVillager['Villager'/151, l='MpServer', x=-641,38, y=5,00, z=161,69], EntityBat['Bat'/171, l='MpServer', x=-649,19, y=6,10, z=132,75], EntityVillager['Villager'/170, l='MpServer', x=-677,31, y=5,00, z=169,31], EntityItem['item.item.carrots'/169, l='MpServer', x=-675,41, y=5,13, z=172,50], EntityItem['item.item.doorWood'/168, l='MpServer', x=-689,47, y=5,13, z=190,72], EntityBat['Bat'/175, l='MpServer', x=-648,75, y=7,71, z=133,40], EntityBat['Bat'/174, l='MpServer', x=-649,19, y=6,10, z=132,75], EntityVillager['Villager'/173, l='MpServer', x=-648,64, y=5,00, z=132,92], EntityVillager['Villager'/172, l='MpServer', x=-647,49, y=5,00, z=133,42], EntityBat['Bat'/163, l='MpServer', x=-662,75, y=6,10, z=181,25], EntityVillager['Villager'/162, l='MpServer', x=-665,67, y=5,00, z=172,31], EntityVillager['Villager'/161, l='MpServer', x=-661,84, y=5,00, z=172,50], EntityVillager['Villager'/160, l='MpServer', x=-663,03, y=5,00, z=172,50], EntityBat['Bat'/167, l='MpServer', x=-665,81, y=7,10, z=177,69], EntityVillager['Villager'/166, l='MpServer', x=-664,16, y=5,00, z=191,38], EntityVillager['Villager'/165, l='MpServer', x=-662,58, y=5,00, z=184,58], EntityVillager['Villager'/164, l='MpServer', x=-662,50, y=5,00, z=181,34], EntityItem['item.item.potato'/186, l='MpServer', x=-671,03, y=5,13, z=145,19], EntityClientPlayerMP['Player894'/185, l='MpServer', x=-639,81, y=5,62, z=147,50], EntityItem['item.item.rottenFlesh'/184, l='MpServer', x=-654,31, y=4,13, z=152,66], EntityItem['item.item.wheat'/190, l='MpServer', x=-674,38, y=5,13, z=149,25], EntityItem['item.item.potato'/191, l='MpServer', x=-673,13, y=5,13, z=145,84], EntityItem['item.item.seeds'/188, l='MpServer', x=-676,34, y=5,13, z=142,63], EntityItem['item.item.seeds'/189, l='MpServer', x=-673,09, y=5,13, z=131,03], EntityBat['Bat'/178, l='MpServer', x=-625,53, y=7,10, z=139,66], EntityVillager['Villager'/179, l='MpServer', x=-664,12, y=5,00, z=132,42], EntityBolt['entity.Bolt.name'/176, l='MpServer', x=-648,25, y=6,05, z=134,19], EntityBat['Bat'/177, l='MpServer', x=-627,75, y=7,10, z=139,25], EntityVillager['Villager'/180, l='MpServer', x=-663,11, y=5,00, z=132,35], EntityBat['Bat'/205, l='MpServer', x=-581,50, y=4,01, z=135,53], EntityBat['Bat'/204, l='MpServer', x=-608,37, y=6,80, z=220,61], EntityBat['Bat'/206, l='MpServer', x=-571,86, y=8,33, z=159,93], EntityItem['item.item.seeds'/201, l='MpServer', x=-624,72, y=5,13, z=192,91], EntityBat['Bat'/200, l='MpServer', x=-655,81, y=7,10, z=183,47], EntityBat['Bat'/203, l='MpServer', x=-591,38, y=8,40, z=221,72], EntityItem['item.item.wheat'/202, l='MpServer', x=-623,97, y=5,13, z=196,91], EntityVillager['Villager'/197, l='MpServer', x=-683,44, y=5,00, z=176,84], EntityBat['Bat'/196, l='MpServer', x=-683,25, y=7,10, z=176,25], EntityVillager['Villager'/198, l='MpServer', x=-684,44, y=5,00, z=176,31], EntityBat['Bat'/193, l='MpServer', x=-683,25, y=7,10, z=176,59], EntityItem['item.item.potato'/192, l='MpServer', x=-676,88, y=4,13, z=144,47], EntityBat['Bat'/195, l='MpServer', x=-684,25, y=8,10, z=177,69], EntityBat['Bat'/194, l='MpServer', x=-683,25, y=7,10, z=176,25]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2522)
at net.minecraft.client.Minecraft.run(Minecraft.java:939)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

and from crash file

---- Minecraft Crash Report ----
// Daisy, daisy...

Time: 20.07.14 22:12
Description: Unexpected error

java.lang.NullPointerException: Unexpected error
at BetterWorld.village.VillageInfo.build(VillageInfo.java:150)
at BetterWorld.gui.GuiVillageControler.<init>(GuiVillageControler.java:29)
at BetterWorld.BetterWorldGuiHandler.getClientGuiElement(BetterWorldGuiHandler.java:26)
at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263)
at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93)
at BetterWorld.blocks.BlockVillageControler.onBlockActivated(BlockVillageControler.java:21)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:380)
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1497)
at net.minecraft.client.Minecraft.runTick(Minecraft.java:2010)
at net.minecraft.client.Minecraft.runGameLoop(Minecraft.java:995)
at net.minecraft.client.Minecraft.run(Minecraft.java:910)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)


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

-- Head --
Stacktrace:
at BetterWorld.village.VillageInfo.build(VillageInfo.java:150)
at BetterWorld.gui.GuiVillageControler.<init>(GuiVillageControler.java:29)
at BetterWorld.BetterWorldGuiHandler.getClientGuiElement(BetterWorldGuiHandler.java:26)
at cpw.mods.fml.common.network.NetworkRegistry.getLocalGuiContainer(NetworkRegistry.java:263)
at cpw.mods.fml.common.network.internal.FMLNetworkHandler.openGui(FMLNetworkHandler.java:93)
at BetterWorld.blocks.BlockVillageControler.onBlockActivated(BlockVillageControler.java:21)
at net.minecraft.client.multiplayer.PlayerControllerMP.onPlayerRightClick(PlayerControllerMP.java:380)
at net.minecraft.client.Minecraft.func_147121_ag(Minecraft.java:1497)

-- Affected level --
Details:
Level name: MpServer
All players: 1 total; [EntityClientPlayerMP['Player894'/185, l='MpServer', x=-639,81, y=5,62, z=147,50]]
Chunk stats: MultiplayerChunkCache: 190, 190
Level seed: 0
Level generator: ID 01 - flat, ver 0. Features enabled: false
Level generator options: 
Level spawn location: World: (76,4,-83), Chunk: (at 12,0,13 in 4,-6; contains blocks 64,0,-96 to 79,255,-81), Region: (0,-1; contains chunks 0,-32 to 31,-1, blocks 0,0,-512 to 511,255,-1)
Level time: 41908 game time, 18151 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: 60 total; [EntityItem['item.item.rottenFlesh'/143, l='MpServer', x=-652,13, y=9,13, z=161,88], EntityVillager['Villager'/142, l='MpServer', x=-644,34, y=5,00, z=168,59], EntityVillager['Villager'/152, l='MpServer', x=-634,30, y=7,00, z=173,69], EntityVillager['Villager'/153, l='MpServer', x=-635,00, y=6,50, z=173,70], EntityVillager['Villager'/154, l='MpServer', x=-637,69, y=5,00, z=160,56], EntityVillager['Villager'/155, l='MpServer', x=-635,63, y=6,00, z=173,64], EntityVillager['Villager'/156, l='MpServer', x=-637,31, y=5,00, z=161,50], EntityWarior['entity.ModelWarior.name'/157, l='MpServer', x=-642,55, y=4,00, z=164,97], EntityVillager['Villager'/158, l='MpServer', x=-662,69, y=5,00, z=169,69], EntityVillager['Villager'/159, l='MpServer', x=-661,50, y=5,00, z=168,50], EntityArrow['arrow'/144, l='MpServer', x=-651,56, y=6,05, z=170,50], EntityArrow['arrow'/145, l='MpServer', x=-651,41, y=6,05, z=169,97], EntityArrow['arrow'/146, l='MpServer', x=-651,78, y=6,05, z=169,97], EntityArrow['arrow'/147, l='MpServer', x=-651,78, y=6,05, z=169,97], EntityArrow['arrow'/148, l='MpServer', x=-651,78, y=6,05, z=169,97], EntityXPOrb['Experience Orb'/149, l='MpServer', x=-20917,00, y=158,43, z=5355,00], EntityXPOrb['Experience Orb'/150, l='MpServer', x=-20878,00, y=158,43, z=5418,00], EntityVillager['Villager'/151, l='MpServer', x=-641,38, y=5,00, z=161,69], EntityBat['Bat'/171, l='MpServer', x=-649,19, y=6,10, z=132,75], EntityVillager['Villager'/170, l='MpServer', x=-677,31, y=5,00, z=169,31], EntityItem['item.item.carrots'/169, l='MpServer', x=-675,41, y=5,13, z=172,50], EntityItem['item.item.doorWood'/168, l='MpServer', x=-689,47, y=5,13, z=190,72], EntityBat['Bat'/175, l='MpServer', x=-648,75, y=7,71, z=133,40], EntityBat['Bat'/174, l='MpServer', x=-649,19, y=6,10, z=132,75], EntityVillager['Villager'/173, l='MpServer', x=-648,64, y=5,00, z=132,92], EntityVillager['Villager'/172, l='MpServer', x=-647,49, y=5,00, z=133,42], EntityBat['Bat'/163, l='MpServer', x=-662,75, y=6,10, z=181,25], EntityVillager['Villager'/162, l='MpServer', x=-665,67, y=5,00, z=172,31], EntityVillager['Villager'/161, l='MpServer', x=-661,84, y=5,00, z=172,50], EntityVillager['Villager'/160, l='MpServer', x=-663,03, y=5,00, z=172,50], EntityBat['Bat'/167, l='MpServer', x=-665,81, y=7,10, z=177,69], EntityVillager['Villager'/166, l='MpServer', x=-664,16, y=5,00, z=191,38], EntityVillager['Villager'/165, l='MpServer', x=-662,58, y=5,00, z=184,58], EntityVillager['Villager'/164, l='MpServer', x=-662,50, y=5,00, z=181,34], EntityItem['item.item.potato'/186, l='MpServer', x=-671,03, y=5,13, z=145,19], EntityClientPlayerMP['Player894'/185, l='MpServer', x=-639,81, y=5,62, z=147,50], EntityItem['item.item.rottenFlesh'/184, l='MpServer', x=-654,31, y=4,13, z=152,66], EntityItem['item.item.wheat'/190, l='MpServer', x=-674,38, y=5,13, z=149,25], EntityItem['item.item.potato'/191, l='MpServer', x=-673,13, y=5,13, z=145,84], EntityItem['item.item.seeds'/188, l='MpServer', x=-676,34, y=5,13, z=142,63], EntityItem['item.item.seeds'/189, l='MpServer', x=-673,09, y=5,13, z=131,03], EntityBat['Bat'/178, l='MpServer', x=-625,53, y=7,10, z=139,66], EntityVillager['Villager'/179, l='MpServer', x=-664,12, y=5,00, z=132,42], EntityBolt['entity.Bolt.name'/176, l='MpServer', x=-648,25, y=6,05, z=134,19], EntityBat['Bat'/177, l='MpServer', x=-627,75, y=7,10, z=139,25], EntityVillager['Villager'/180, l='MpServer', x=-663,11, y=5,00, z=132,35], EntityBat['Bat'/205, l='MpServer', x=-581,50, y=4,01, z=135,53], EntityBat['Bat'/204, l='MpServer', x=-608,37, y=6,80, z=220,61], EntityBat['Bat'/206, l='MpServer', x=-571,86, y=8,33, z=159,93], EntityItem['item.item.seeds'/201, l='MpServer', x=-624,72, y=5,13, z=192,91], EntityBat['Bat'/200, l='MpServer', x=-655,81, y=7,10, z=183,47], EntityBat['Bat'/203, l='MpServer', x=-591,38, y=8,40, z=221,72], EntityItem['item.item.wheat'/202, l='MpServer', x=-623,97, y=5,13, z=196,91], EntityVillager['Villager'/197, l='MpServer', x=-683,44, y=5,00, z=176,84], EntityBat['Bat'/196, l='MpServer', x=-683,25, y=7,10, z=176,25], EntityVillager['Villager'/198, l='MpServer', x=-684,44, y=5,00, z=176,31], EntityBat['Bat'/193, l='MpServer', x=-683,25, y=7,10, z=176,59], EntityItem['item.item.potato'/192, l='MpServer', x=-676,88, y=4,13, z=144,47], EntityBat['Bat'/195, l='MpServer', x=-684,25, y=8,10, z=177,69], EntityBat['Bat'/194, l='MpServer', x=-683,25, y=7,10, z=176,25]]
Retry entities: 0 total; []
Server brand: fml,forge
Server type: Integrated singleplayer server
Stacktrace:
at net.minecraft.client.multiplayer.WorldClient.addWorldInfoToCrashReport(WorldClient.java:412)
at net.minecraft.client.Minecraft.addGraphicsAndWorldToCrashReport(Minecraft.java:2522)
at net.minecraft.client.Minecraft.run(Minecraft.java:939)
at net.minecraft.client.main.Main.main(Main.java:112)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at net.minecraft.launchwrapper.Launch.launch(Launch.java:134)
at net.minecraft.launchwrapper.Launch.main(Launch.java:28)

 

class which makes informations from villages

public static VillageInfo build() {

    Minecraft mc = FMLClientHandler.instance().getClient();
        if(mc == null || mc.thePlayer == null){         
            return null;
        }

	EntityPlayer player = mc.thePlayer;

        WorldServer worldServer = DimensionManager.getWorld(player.dimension);

        if(worldServer == null)
        {
            return null;
        }

        VillageInfo ret = new VillageInfo();
        BetterWorldHandler handler = new BetterWorldHandler();

        BetterVillageCollection vlgc = handler.villageCollectionObj;
        BetterVillage closestVillage = vlgc.findNearestVillage(
                MathHelper.floor_double(player.posX),
                MathHelper.floor_double(player.posY),
                MathHelper.floor_double(player.posZ), 32);

        if(closestVillage == null){
            ret.villageFound = false;
            return ret;
        }

        ret.numGolems = getNumGolems(worldServer, closestVillage);
        ret.numWariors = getNumWariors(worldServer, closestVillage);
        ChunkCoordinates center = closestVillage.getCenter();
        ret.centerX = center.posX;
        ret.centerY = center.posY;
        ret.centerZ = center.posZ;
        ret.numDoors = closestVillage.getNumVillageDoors();
        ret.numVillagers = closestVillage.getNumVillagers();
        ret.radius = closestVillage.getVillageRadius();
        ret.reputation = closestVillage.getReputationForPlayer(player.getCommandSenderName());
        ret.areBreeding = closestVillage.isMatingSeason();
        ret.id = closestVillage.hashCode();
        ret.villageFound = true;
        return ret;
    }   

 

and code in my gui for getting info. from class up

//int population is showing by the gui

public GuiVillageControler()
{
	VillageInfo tmp = VillageInfo.build();
	this.population = tmp.getNumVillagers();
}

 

 

Posted

at BetterWorld.village.VillageInfo.build(VillageInfo.java:150)

Can you post which line this is in your class?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted

Seems like

handler.[b]villageCollectionObj[/b]

is null. How do you initialize this field?

Don't ask for support per PM! They'll get ignored! | If a post helped you, click the "Thank You" button at the top right corner of said post! |

mah twitter

This thread makes me sad because people just post copy-paste-ready code when it's obvious that the OP has little to no programming experience. This is not how learning works.

Posted
public class BetterWorldHandler
{
public BetterWorldHandler()
{

}

public BetterVillageCollection villageCollectionObj;

@SubscribeEvent
public void someEventMethod(WorldEvent event) 
{	               
        BetterVillageCollection villagecollection = (BetterVillageCollection)event.world.perWorldStorage.loadData(BetterVillageCollection.class, "bettervillages");
        
        if (villagecollection == null)
        {
            this.villageCollectionObj = new BetterVillageCollection(event.world);
            event.world.perWorldStorage.setData("bettervillages", this.villageCollectionObj);
        }
        else
        {
            this.villageCollectionObj = villagecollection;
            this.villageCollectionObj.func_82566_a(event.world);
        }
}

}

Posted

I think you are trying to get the villageCollectionObj before the WorldEvent has been posted, thus it hasn't been initialised and is null, so you get a NPE.

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/

  • 2 weeks later...
Posted

I have fixed the error.

Now I can open my GUI without crash but still sth doesn't work because despite my block is in center of some village, no stats shows in gui.

 

Now I am trying to find the wrong code, probably sth is wrong with searching doors.

 

Searching for a long time I have noticed that Vanilla village has additional code in the WorldServer.class

public void tick()
{
...
        this.theProfiler.endStartSection("village");
        this.villageCollectionObj.tick();
...

I must try to code the second line somehow.

Posted

I made TickHandler and now my village tick() as it should.Now I am sure that sth is wrong with doors. The size of doorslist is 0.

Do you know why my code needs some changes despite it is the same as Vanilla?

Posted

If I think that client doesn't know population of village or number of doors, only server does so you need to get that from server side. You see, gui you open is on client side so if you get village info from gui (not from container for example which is in server side) you won't get correct info.

Posted

My GUI works fine.Doing tests I have noticed that village can't create, that's why in GUI is only 0.

Searching more I have found that villageList = 0 and here is my question. Does enybody know why despite Vanilla code there is so much problems with village?

 

I am stuck with some strange problem with villagerPositionsList, maybe because it's a black hole.

In that stage I need to fine some person who knows about village code everything or very much.

  • 2 weeks later...
Posted

No one wants to help me privately so I am passed on this topic. :(

 

So, to create village nearby doors must be detected.To detect doors chunk coordinates must be gathered from villagerPositionsList

Here are the methods in which coordinates are saved to list.

The problem is that these methods looks like dead end.Does somebody know what must be changed or is it realy the DEAD END?

 

I fink that I don't need any help.I changed method in which doors are detected.Now I can get cords of nearest villages, so my code works :)

Thanks for good help and time spent to help with my project.Today I corect few things and in my GUI I can see info about village.Now my target is to search what makes strange lags and embark on with project.

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.