Immersive Railroading

Immersive Railroading

3M Downloads

Can't move inside trains [Sponge|Waterfall]

xNccPlay opened this issue ยท 10 comments

commented

Hello team,

we are running a sponge based forge server for MC 1.12.2. First we were running him as standalone server but since a few days we put him in a bungeecord network (fork waterfall used).
After this we noticed, that we can't no longer walk inside trains or waggons of IR. Everything else is working fine. I checked the serverlog and found thousands of those entries at the end. This problem does not exist in singleplayer. If you need more informations, just ask!

greetings
xNccPlay

[Server thread/FATAL] [net.minecraft.server.MinecraftServer]: Error executing task
java.util.concurrent.ExecutionException: java.lang.NullPointerException
at java.util.concurrent.FutureTask.report(FutureTask.java:122) ~[?:1.8.0_201]
at java.util.concurrent.FutureTask.get(FutureTask.java:192) ~[?:1.8.0_201]
at net.minecraft.util.Util.func_181617_a(SourceFile:47) [h.class:?]
at org.spongepowered.common.SpongeImplHooks.onUtilRunTask(SpongeImplHooks.java:301) [SpongeImplHooks.class:1.12.2-2768-7.1.6-RC3641]
at net.minecraft.server.MinecraftServer.redirect$onRun$zke000(MinecraftServer.java:3955) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.func_71190_q(MinecraftServer.java:723) [MinecraftServer.class:?]
at net.minecraft.server.dedicated.DedicatedServer.func_71190_q(DedicatedServer.java:397) [nz.class:?]
at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:668) [MinecraftServer.class:?]
at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_201]
Caused by: java.lang.NullPointerException
at cam72cam.immersiverailroading.entity.EntityRidableRollingStock.handleKeyPress(EntityRidableRollingStock.java:166) ~[EntityRidableRollingStock.class:?]
at cam72cam.immersiverailroading.entity.Locomotive.handleKeyPress(Locomotive.java:129) ~[Locomotive.class:?]
at cam72cam.immersiverailroading.entity.LocomotiveDiesel.handleKeyPress(LocomotiveDiesel.java:120) ~[LocomotiveDiesel.class:?]
at cam72cam.immersiverailroading.net.KeyPressPacket$Handler.handle(KeyPressPacket.java:82) ~[KeyPressPacket$Handler.class:?]
at cam72cam.immersiverailroading.net.KeyPressPacket$Handler.lambda$onMessage$0(KeyPressPacket.java:61) ~[KeyPressPacket$Handler.class:?]
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) ~[?:1.8.0_201]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_201]
at net.minecraft.util.Util.func_181617_a(SourceFile:46) ~[h.class:?]
... 7 more

commented

It must be something with the bungeecord network not forwarding IR packets correctly

commented

Okay is that something for you or do I have to contact the BungeeCord team?

commented

I think you will need to contact the BungeeCord. Here's the info that you should send them:

Immersive Railroading breaks as it it uses it's own keypress logic due to MC bugs out of the box.

The packet is generated here: https://github.com/cam72cam/ImmersiveRailroading/blob/57625ee20d4017eb18748836bf28bfc8e88277b7/src/main/java/cam72cam/immersiverailroading/proxy/ClientProxy.java#L449

The packet is handled here: https://github.com/cam72cam/ImmersiveRailroading/blob/999ef67a68fb1afbb8b441ad0d7250eeb9de95f5/src/main/java/cam72cam/immersiverailroading/net/KeyPressPacket.java#L67

commented

Okay thank you for your help, I hope, they can and will fix it :D

commented

PaperMC/Waterfall#136
Bungee has this mechanism which rewrites entity IDs, vs resetting the clients state, this obviously creates issues with mods because (1) they don't know that the entity ID between the client and the server are different (2) Because these are handled in custom packets, we can't know the format to patch it

Waterfall has a configuration option to disable this mecahnism, it basically resends a join game packet to the client causing it to reset properly, this does create some compatibility issues with mods which don't support this, but overall is the better solution for dealing with forge servers

commented

Thanks @electronicboy, I'll add this to the IR wiki

commented

Thank you too, that fix worked for us :)

commented

Hey guys, unfortunately this problem reappered after one of the new 1.7 updates. I already tried to disable and re-enable the "disable_entity_metadata_rewrite" setting and restarted all servers multiple times, but nothing seems to work. Any ideas?

commented

I've done a sponge update (to 7.1.7) at the same time and tested the last hour. I can confirm, that this problem is comming from the new IR version and not from the sponge update.
We also had the problem from https://github.com/TeamOpenIndustry/ImmersiveRailroading/issues/692, but it wasn't fix with the new sponge update, just with downgrading IR to 1.6.1.

commented

I've experienced this problem aswell but on singleplayer. I can hop inside the train like normal but when the train moves it'll move but I'll be stuck in the same position whilst the train moves away from me. I definitely think this is an issue with the 1.7.2 version of the mod for 1.12.2