Wasteland Reborn

Wasteland Reborn

611k Downloads

Multiplayer issues

OmegaRogue opened this issue ยท 3 comments

commented

the mod doesnt work on servers because it looks for "/World/data/wasteland_cache.dat" in the location "/saves/World/data/wasteland_cache.dat

commented

The problem is here:

this.worldFileCache = new WastelandWorldData("saves/" + FMLCommonHandler.instance().getMinecraftServerInstance().getFolderName() + "/data/wasteland_cache.dat");

It should check if it's running on a server or a client and only prefix the path with saves/ if it is a physical client.

There's also an error in the client log when connecting which prevents the connection completing:

[23:39:29] [Client thread/ERROR]: Exception caught during firing event net.minecraftforge.event.world.WorldEvent$Load@3e5d6f5e:
java.lang.NullPointerException: null
	at com.legacy.wasteland.WastelandEventHandler.loadData(WastelandEventHandler.java:32) ~[WastelandEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_456_WastelandEventHandler_loadData_Load.invoke(.dynamic) ~[?:?]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler.invoke(ASMEventHandler.java:90) ~[ASMEventHandler.class:?]
	at net.minecraftforge.fml.common.eventhandler.EventBus.post(EventBus.java:182) [EventBus.class:?]
	at net.minecraft.client.multiplayer.WorldClient.<init>(WorldClient.java:75) [bsb.class:?]
	at net.minecraft.client.network.NetHandlerPlayClient.func_147282_a(NetHandlerPlayClient.java:298) [brz.class:?]
	at net.minecraft.network.play.server.SPacketJoinGame.func_148833_a(SourceFile:76) [jh.class:?]
	at net.minecraft.network.play.server.SPacketJoinGame.func_148833_a(SourceFile:13) [jh.class:?]
	at net.minecraft.network.PacketThreadUtil$1.run(SourceFile:13) [hv$1.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_241]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_241]
	at net.minecraft.util.Util.func_181617_a(SourceFile:46) [h.class:?]
	at net.minecraft.client.Minecraft.func_71411_J(Minecraft.java:1088) [bib.class:?]
	at net.minecraft.client.Minecraft.func_99999_d(Minecraft.java:398) [bib.class:?]
	at net.minecraft.client.main.Main.main(SourceFile:123) [Main.class:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_241]
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[?:1.8.0_241]
	at java.lang.reflect.Method.invoke(Unknown Source) ~[?:1.8.0_241]
	at net.minecraft.launchwrapper.Launch.launch(Launch.java:135) [launchwrapper-1.12.jar:?]
	at net.minecraft.launchwrapper.Launch.main(Launch.java:28) [launchwrapper-1.12.jar:?]
[23:39:29] [Client thread/ERROR]: Index: 6 Listeners:
[23:39:29] [Client thread/ERROR]: 0: HIGHEST
[23:39:29] [Client thread/ERROR]: 1: ASM: net.minecraftforge.common.ForgeInternalHandler@78ad04ea onDimensionLoad(Lnet/minecraftforge/event/world/WorldEvent$Load;)V
[23:39:29] [Client thread/ERROR]: 2: NORMAL
[23:39:29] [Client thread/ERROR]: 3: ASM: class icbm.classic.content.entity.missile.MissileTrackerHandler onWorldLoad(Lnet/minecraftforge/event/world/WorldEvent$Load;)V
[23:39:29] [Client thread/ERROR]: 4: ASM: INSTANCE onWorldLoad(Lnet/minecraftforge/event/world/WorldEvent$Load;)V
[23:39:29] [Client thread/ERROR]: 5: ASM: erebus.world.teleporter.TeleporterHandler@5da0698f onWorldLoad(Lnet/minecraftforge/event/world/WorldEvent$Load;)V
[23:39:29] [Client thread/ERROR]: 6: ASM: com.legacy.wasteland.WastelandEventHandler@241657c2 loadData(Lnet/minecraftforge/event/world/WorldEvent$Load;)V
[23:39:29] [Client thread/ERROR]: 7: ASM: cr0s.warpdrive.event.ChunkHandler@1762b577 onLoadWorld(Lnet/minecraftforge/event/world/WorldEvent$Load;)V
[23:39:29] [Client thread/ERROR]: 8: ASM: com.flansmod.common.teams.TeamsManagerRanked@6350648a worldData(Lnet/minecraftforge/event/world/WorldEvent;)V
[23:39:29] [Client thread/ERROR]: 9: ASM: com.flansmod.apocalypse.common.ApocalypseData@5ede10e8 worldData(Lnet/minecraftforge/event/world/WorldEvent;)V
[23:39:29] [Client thread/FATAL]: Error executing task
commented

I have created a PR to solve this: #24

commented

Closing this as the aforementioned PR fixes the issue. I might be able to get a new version released as well.