Simple Voice Chat

Simple Voice Chat

36M Downloads

Forge 1.12.2 fails to change port to integrated server port

Johni0702 opened this issue ยท 1 comments

commented

Bug description

[12:32:28] [Server thread/ERROR] [voicechat]: Failed to get integrated server port
net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToAccessFieldException: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: serverPort
	at net.minecraftforge.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:210) ~[forge-1.12.2-14.23.5.2859-universal.jar:?]
	at net.minecraftforge.fml.common.ObfuscationReflectionHelper.getPrivateValue(ObfuscationReflectionHelper.java:106) ~[ObfuscationReflectionHelper.class:?]
	at de.maxhenkel.voicechat.intercompatibility.ForgeClientCompatibilityManager.onServer(ForgeClientCompatibilityManager.java:126) [ForgeClientCompatibilityManager.class:1.12.2-2.3.27]
	at net.minecraftforge.fml.common.eventhandler.ASMEventHandler_15_ForgeClientCompatibilityManager_onServer_ServerTickEvent.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.minecraftforge.fml.common.FMLCommonHandler.onPostServerTick(FMLCommonHandler.java:266) [FMLCommonHandler.class:?]
	at net.minecraft.server.MinecraftServer.func_71217_p(MinecraftServer.java:712) [MinecraftServer.class:?]
	at net.minecraft.server.integrated.IntegratedServer.func_71217_p(IntegratedServer.java:185) [chd.class:?]
	at net.minecraft.server.MinecraftServer.run(MinecraftServer.java:526) [MinecraftServer.class:?]
	at java.lang.Thread.run(Thread.java:750) [?:1.8.0_352]
Caused by: net.minecraftforge.fml.relauncher.ReflectionHelper$UnableToFindFieldException: java.lang.NoSuchFieldException: serverPort
	at net.minecraftforge.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:166) ~[forge-1.12.2-14.23.5.2859-universal.jar:?]
	at net.minecraftforge.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:206) ~[forge-1.12.2-14.23.5.2859-universal.jar:?]
	... 10 more
Caused by: java.lang.NoSuchFieldException: serverPort
	at java.lang.Class.getDeclaredField(Class.java:2070) ~[?:1.8.0_352]
	at net.minecraftforge.fml.relauncher.ReflectionHelper.findField(ReflectionHelper.java:160) ~[forge-1.12.2-14.23.5.2859-universal.jar:?]
	at net.minecraftforge.fml.relauncher.ReflectionHelper.getPrivateValue(ReflectionHelper.java:206) ~[forge-1.12.2-14.23.5.2859-universal.jar:?]
	... 10 more

I'm not actually sure if it has any negative effects by itself.
But it does cause issues in combination with third-party mods like Essential which allow users to join LAN worlds over the Internet and only forward specific ports.

Steps to reproduce the issue

  1. Start Singleplayer
  2. Open to LAN
  3. See error

Expected behavior
Simple Voice Chat should change the UDP port it is listening on to match the integrated server's TCP port, such that it can be forwarded by e.g. Essential (this already works on modern versions).

Log files
https://mclo.gs/1TEXXRk

Versions

  • Minecraft 1.12.2
  • Forge 14.23.5.2859 (latest Recommended build at time of writing)
  • Mod 1.12.2-2.3.27
commented

Thanks for reporting this!