Jump to content

Recommended Posts

Posted (edited)

Hi everybody,


I started to build a Guild-Mod with networking. The Client-To-Server Connections works properly and i already can create a Guild, but when i am trying to Check, if 
i am in a Guild, i either Receive no answer from the return or i get an Exception, when i directly send the Answer back to the Client.

 

I need a check, if a player is in a Guild in the PlayerLoggedInEvent and when opening a Gui.

Both lead to the same Exception and when i comment the line "ModMain.NETWORK.sendTo(nwm, serverPlayer);" the program don´t throw the Exception, but simpy dont work.

 

How can in "answer" to a NetworkMessage?

 

NetworkMessage:

package mods.network;

import io.netty.buffer.ByteBuf;
import net.minecraftforge.fml.common.network.ByteBufUtils;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;

public class NetworkMessage  implements IMessage {
	  public NetworkMessage(){
		  System.out.println("Networkmessage Recognized");
	  }

	  public String json = "";
	  
	  
	  public NetworkMessage(String toSend) {
	    this.json = toSend;
	  }

  @Override
  public void fromBytes(ByteBuf buf) {
	  json = ByteBufUtils.readUTF8String(buf);
  }

  @Override
  public void toBytes(ByteBuf buf) {
      ByteBufUtils.writeUTF8String(buf, json);
  }
 }

 

NetworkMessageHandler:

package mods.network;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import mods.ModMain;
import net.minecraft.client.Minecraft;
import net.minecraft.entity.player.EntityPlayerMP;
import net.minecraftforge.fml.common.network.simpleimpl.IMessage;
import net.minecraftforge.fml.common.network.simpleimpl.IMessageHandler;
import net.minecraftforge.fml.common.network.simpleimpl.MessageContext;

public class NetworkMessageHandler implements IMessageHandler<NetworkMessage, IMessage> {
	  @Override public IMessage onMessage(NetworkMessage message, MessageContext ctx) {
	    EntityPlayerMP serverPlayer = ctx.getServerHandler().player;
	    	    
	    NetworkObject na = (new Gson()).fromJson(message.json,new TypeToken<NetworkObject>() {}.getType());
		NetworkObject answer = new NetworkObject();
		NetworkMessage nwm = null;
		    switch(na.action)
		    {
		    	case NetworkActions.GuildCheck:
		    		answer.action = NetworkActions.GuildCheckAnswer;
		    		answer.values = "Testgilde";
		    		
		    		System.out.println("[Server] CURRENT GUILD: "+na.values);
		    		nwm = new NetworkMessage((new Gson()).toJson(answer));
		    		ModMain.NETWORK.sendTo(nwm, serverPlayer); 
		    		break;
		    	case NetworkActions.GuildCheckAnswer:
		    		System.out.println("[Client] CURRENT GUILD: "+na.values);
		    		break;
		    	default:
		    }
	    
	    return nwm;
	  }
	}

 

NetworkObject:

public class NetworkObject {
	public int action = -1;
	public String values = "";
}

 

Initiating Call:

NetworkObject answer = new NetworkObject();
answer.action = NetworkActions.GuildCheck;			
ModMain.NETWORK.sendToServer(new NetworkMessage((new Gson()).toJson(answer)));

 

Register:

@Mod.EventHandler
public void preInit(FMLPreInitializationEvent event) {
	System.out.println(name + " is loading!");

	// Networkpackets
	NETWORK.registerMessage(NetworkMessageHandler.class, NetworkMessage.class, 0, Side.SERVER);
	NETWORK.registerMessage(NetworkMessageHandler.class, NetworkMessage.class, 0, Side.CLIENT);
}

 

Logs:

2019-05-23 10:48:00,517 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2019-05-23 10:48:00,520 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[10:48:00] [main/INFO] [GradleStart]: Extra: []
[10:48:00] [main/INFO] [GradleStart]: Running with arguments: [--userProperties, {}, --assetsDir, C:/Users/username_/.gradle/caches/minecraft/assets, --assetIndex, 1.12, --accessToken{REDACTED}, --version, 1.12, --tweakClass, net.minecraftforge.fml.common.launcher.FMLTweaker, --tweakClass, net.minecraftforge.gradle.tweakers.CoremodTweaker]
[10:48:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[10:48:00] [main/INFO] [LaunchWrapper]: Using primary tweak class name net.minecraftforge.fml.common.launcher.FMLTweaker
[10:48:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.CoremodTweaker
[10:48:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLTweaker
[10:48:00] [main/INFO] [FML]: Forge Mod Loader version 14.21.1.2443 for Minecraft 1.12 loading
[10:48:00] [main/INFO] [FML]: Java is Java HotSpot(TM) 64-Bit Server VM, version 1.8.0_212, running on Windows 10:amd64:10.0, installed at C:\Program Files\Java\jre1.8.0_212
[10:48:00] [main/INFO] [FML]: Managed to load a deobfuscated Minecraft name- we are in a deobfuscated environment. Skipping runtime deobfuscation
[10:48:00] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLCorePlugin (net.minecraftforge.fml.relauncher.FMLCorePlugin), we are in deobf and it's a forge core plugin
[10:48:00] [main/INFO] [FML]: Ignoring missing certificate for coremod FMLForgePlugin (net.minecraftforge.classloading.FMLForgePlugin), we are in deobf and it's a forge core plugin
[10:48:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.CoremodTweaker
[10:48:00] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.fml.relauncher.FMLCorePlugin
[10:48:00] [main/INFO] [GradleStart]: Injecting location in coremod net.minecraftforge.classloading.FMLForgePlugin
[10:48:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:48:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[10:48:00] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[10:48:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:48:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLInjectionAndSortingTweaker
[10:48:00] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
2019-05-23 10:48:01,234 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2019-05-23 10:48:01,582 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
2019-05-23 10:48:01,588 main WARN Unable to instantiate org.fusesource.jansi.WindowsAnsiOutputStream
[10:48:03] [main/ERROR] [FML]: FML appears to be missing any signature data. This is not a good thing
[10:48:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.relauncher.CoreModManager$FMLPluginWrapper
[10:48:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.FMLDeobfTweaker
[10:48:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.gradle.tweakers.AccessTransformerTweaker
[10:48:03] [main/INFO] [LaunchWrapper]: Loading tweak class name net.minecraftforge.fml.common.launcher.TerminalTweaker
[10:48:03] [main/INFO] [LaunchWrapper]: Calling tweak class net.minecraftforge.fml.common.launcher.TerminalTweaker
[10:48:03] [main/INFO] [LaunchWrapper]: Launching wrapped minecraft {net.minecraft.client.main.Main}
[10:48:04] [main/INFO]: Setting user: Player207
[10:48:09] [main/WARN]: Skipping bad option: lastServer:
[10:48:09] [main/INFO]: LWJGL Version: 2.9.4
[10:48:10] [main/INFO] [FML]: -- System Details --
Details:
	Minecraft Version: 1.12
	Operating System: Windows 10 (amd64) version 10.0
	Java Version: 1.8.0_212, Oracle Corporation
	Java VM Version: Java HotSpot(TM) 64-Bit Server VM (mixed mode), Oracle Corporation
	Memory: 296937528 bytes (283 MB) / 584056832 bytes (557 MB) up to 1877475328 bytes (1790 MB)
	JVM Flags: 0 total; 
	IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0
	FML: 
	Loaded coremods (and transformers): 
	GL info: ' Vendor: 'Intel' Version: '4.5.0 - Build 22.20.16.4749' Renderer: 'Intel(R) HD Graphics 630'
[10:48:10] [main/INFO] [FML]: MinecraftForge v14.21.1.2443 Initialized
[10:48:10] [main/INFO] [FML]: Replaced 921 ore ingredients
[10:48:11] [main/INFO] [FML]: Found 0 mods from the command line. Injecting into mod discoverer
[10:48:11] [main/INFO] [FML]: Searching C:\Users\username_\Desktop\mods\run\mods for mods
[10:48:12] [main/INFO] [FML]: Forge Mod Loader has identified 5 mods to load
[10:48:13] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, dt] at CLIENT
[10:48:13] [main/INFO] [FML]: Attempting connection with missing mods [minecraft, mcp, FML, forge, dt] at SERVER
[10:48:13] [Thread-3/INFO] [FML]: Using sync timing. 200 frames of Display.update took 138557900 nanos
[10:48:14] [main/INFO]: Reloading ResourceManager: Default, FMLFileResourcePack:Forge Mod Loader, FMLFileResourcePack:Minecraft Forge, FMLFileResourcePack:datatrend Mod
[10:48:14] [main/INFO] [FML]: Processing ObjectHolder annotations
[10:48:14] [main/INFO] [FML]: Found 1168 ObjectHolder annotations
[10:48:14] [main/INFO] [FML]: Identifying ItemStackHolder annotations
[10:48:14] [main/INFO] [FML]: Found 0 ItemStackHolder annotations
[10:48:14] [main/INFO] [FML]: Configured a dormant chunk cache size of 0
[10:48:14] [main/INFO] [STDOUT]: [mods.ModMain:preInit:44]: datatrend Mod is loading!
[10:48:14] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Starting version check at http://files.minecraftforge.net/maven/net/minecraftforge/forge/promotions_slim.json
[10:48:14] [main/INFO] [FML]: Applying holder lookups
[10:48:14] [main/INFO] [FML]: Holder lookups applied
[10:48:14] [main/INFO] [FML]: Applying holder lookups
[10:48:14] [main/INFO] [FML]: Holder lookups applied
[10:48:14] [main/INFO] [FML]: Applying holder lookups
[10:48:14] [main/INFO] [FML]: Holder lookups applied
[10:48:14] [main/INFO] [FML]: Applying holder lookups
[10:48:14] [main/INFO] [FML]: Holder lookups applied
[10:48:14] [main/INFO] [FML]: Injecting itemstacks
[10:48:14] [main/INFO] [FML]: Itemstack injection complete
[10:48:15] [Forge Version Check/INFO] [ForgeVersionCheck]: [forge] Found status: AHEAD Target: null
[10:48:24] [Sound Library Loader/INFO]: Starting up SoundSystem...
[10:48:24] [Thread-5/INFO]: Initializing LWJGL OpenAL
[10:48:24] [Thread-5/INFO]: (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
[10:48:25] [Thread-5/INFO]: OpenAL initialized.
[10:48:25] [Sound Library Loader/INFO]: Sound engine started
[10:48:31] [main/INFO] [FML]: Max texture size: 16384
[10:48:31] [main/INFO]: Created: 512x512 textures-atlas
[10:48:33] [main/INFO] [FML]: Applying holder lookups
[10:48:33] [main/INFO] [FML]: Holder lookups applied
[10:48:33] [main/INFO] [FML]: Injecting itemstacks
[10:48:33] [main/INFO] [FML]: Itemstack injection complete
[10:48:33] [main/INFO] [FML]: Forge Mod Loader has successfully loaded 5 mods
[10:48:33] [main/WARN]: Skipping bad option: lastServer:
[10:48:34] [main/INFO]: Narrator library for x64 successfully loaded
[10:48:35] [Realms Notification Availability checker #1/INFO]: Could not authorize you against Realms server: Invalid session id
[10:48:40] [Server thread/INFO]: Starting integrated minecraft server version 1.12
[10:48:40] [Server thread/INFO]: Generating keypair
[10:48:41] [Server thread/INFO] [FML]: Injecting existing registry data into this server instance
[10:48:41] [Server thread/INFO] [FML]: Applying holder lookups
[10:48:41] [Server thread/INFO] [FML]: Holder lookups applied
[10:48:41] [Server thread/INFO] [FML]: Loading dimension 0 (New World) (net.minecraft.server.integrated.IntegratedServer@2cb24932)
[10:48:42] [Server thread/INFO]: Loaded 488 advancements
[10:48:42] [Server thread/INFO] [FML]: Loading dimension 1 (New World) (net.minecraft.server.integrated.IntegratedServer@2cb24932)
[10:48:42] [Server thread/INFO] [FML]: Loading dimension -1 (New World) (net.minecraft.server.integrated.IntegratedServer@2cb24932)
[10:48:42] [Server thread/INFO]: Preparing start region for level 0
[10:48:43] [Server thread/INFO]: Preparing spawn area: 32%
[10:48:43] [Server thread/WARN]: Keeping entity minecraft:squid that already exists with UUID 9065d676-102a-4b19-9b32-e8b6ad2b9d56
[10:48:45] [Server thread/INFO]: Changing view distance to 12, from 10
[10:48:47] [Netty Local Client IO #0/INFO] [FML]: Server protocol version 2
[10:48:47] [Netty Server IO #1/INFO] [FML]: Client protocol version 2
[10:48:47] [Netty Server IO #1/INFO] [FML]: Client attempting to join with 5 mods : [email protected],[email protected],[email protected],[email protected],[email protected]
[10:48:47] [Netty Local Client IO #0/INFO] [FML]: [Netty Local Client IO #0] Client side modded connection established
[10:48:47] [Server thread/INFO] [FML]: [Server thread] Server side modded connection established
[10:48:47] [Server thread/INFO]: Player207[local:E:cc934bd0] logged in with entity id 211 at (100.17228138474853, 66.0, 174.6387132712136)
[10:48:47] [Server thread/INFO]: Player207 hat das Spiel betreten
[10:48:47] [Server thread/INFO]: Player207 hat den Fortschritt [Diamanten!] erreicht
[10:48:48] [Server thread/INFO]: Saving and pausing game...
[10:48:48] [Server thread/INFO]: Saving chunks for level 'New World'/overworld
[10:48:49] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether
[10:48:49] [Server thread/INFO]: Saving chunks for level 'New World'/the_end
[10:48:49] [main/INFO]: [CHAT] Player207 hat den Fortschritt [Diamanten!] erreicht
[10:48:49] [main/INFO]: [CHAT] Login ... are you in a Guild?
[10:48:49] [pool-2-thread-1/WARN]: Couldn't look up profile properties for com.mojang.authlib.GameProfile@146d18d9[id=c5f2027d-c05b-3ad0-bbf1-20e3f4a553c8,name=Player207,properties={},legacy=false]
com.mojang.authlib.exceptions.AuthenticationException: The client has sent too many requests within a certain amount of time
	at com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService.makeRequest(YggdrasilAuthenticationService.java:79) ~[YggdrasilAuthenticationService.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillGameProfile(YggdrasilMinecraftSessionService.java:180) [YggdrasilMinecraftSessionService.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:60) [YggdrasilMinecraftSessionService$1.class:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService$1.load(YggdrasilMinecraftSessionService.java:57) [YggdrasilMinecraftSessionService$1.class:?]
	at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3716) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2424) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2298) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2211) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache.get(LocalCache.java:4154) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:4158) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:5147) [guava-21.0.jar:?]
	at com.google.common.cache.LocalCache$LocalLoadingCache.getUnchecked(LocalCache.java:5153) [guava-21.0.jar:?]
	at com.mojang.authlib.yggdrasil.YggdrasilMinecraftSessionService.fillProfileProperties(YggdrasilMinecraftSessionService.java:170) [YggdrasilMinecraftSessionService.class:?]
	at net.minecraft.client.Minecraft.getProfileProperties(Minecraft.java:3170) [Minecraft.class:?]
	at net.minecraft.client.resources.SkinManager$3.run(SkinManager.java:138) [SkinManager$3.class:?]
	at java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source) [?:1.8.0_212]
	at java.util.concurrent.FutureTask.run(Unknown Source) [?:1.8.0_212]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) [?:1.8.0_212]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) [?:1.8.0_212]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_212]
[10:48:49] [main/INFO]: Loaded 21 advancements
[10:48:51] [Netty Server IO #1/INFO] [STDOUT]: [mods.network.NetworkMessage:<init>:10]: Networkmessage Recognized
[10:48:51] [Netty Server IO #1/INFO] [STDOUT]: [mods.network.NetworkMessageHandler:onMessage:39]: [Server] CURRENT GUILD: 
[10:48:51] [Netty Local Client IO #0/INFO] [STDOUT]: [mods.network.NetworkMessage:<init>:10]: Networkmessage Recognized
[10:48:51] [Netty Local Client IO #0/ERROR] [FML]: SimpleChannelHandlerWrapper exception
java.lang.ClassCastException: net.minecraft.client.network.NetHandlerPlayClient cannot be cast to net.minecraft.network.NetHandlerPlayServer
	at net.minecraftforge.fml.common.network.simpleimpl.MessageContext.getServerHandler(MessageContext.java:55) ~[MessageContext.class:?]
	at mods.network.NetworkMessageHandler.onMessage(NetworkMessageHandler.java:18) ~[NetworkMessageHandler.class:?]
	at mods.network.NetworkMessageHandler.onMessage(NetworkMessageHandler.java:1) ~[NetworkMessageHandler.class:?]
	at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:56) ~[SimpleChannelHandlerWrapper.class:?]
	at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:36) ~[SimpleChannelHandlerWrapper.class:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) [MessageToMessageDecoder.class:4.1.9.Final]
	at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) [MessageToMessageCodec.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [DefaultChannelPipeline$HeadContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [DefaultChannelPipeline.class:4.1.9.Final]
	at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:274) [EmbeddedChannel.class:4.1.9.Final]
	at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:108) [FMLProxyPacket.class:?]
	at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:155) [NetworkManager.class:?]
	at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:49) [NetworkManager.class:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:409) [NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:274) [NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:74) [NetworkDispatcher.class:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [DefaultChannelPipeline$HeadContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [DefaultChannelPipeline.class:4.1.9.Final]
	at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:443) [LocalChannel.class:4.1.9.Final]
	at io.netty.channel.local.LocalChannel.access$500(LocalChannel.java:49) [LocalChannel.class:4.1.9.Final]
	at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:397) [LocalChannel$5.class:4.1.9.Final]
	at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54) [DefaultEventLoop.class:4.1.9.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_212]
[10:48:51] [Netty Local Client IO #0/ERROR] [FML]: There was a critical exception handling a packet on channel dt
java.lang.ClassCastException: net.minecraft.client.network.NetHandlerPlayClient cannot be cast to net.minecraft.network.NetHandlerPlayServer
	at net.minecraftforge.fml.common.network.simpleimpl.MessageContext.getServerHandler(MessageContext.java:55) ~[MessageContext.class:?]
	at mods.network.NetworkMessageHandler.onMessage(NetworkMessageHandler.java:18) ~[NetworkMessageHandler.class:?]
	at mods.network.NetworkMessageHandler.onMessage(NetworkMessageHandler.java:1) ~[NetworkMessageHandler.class:?]
	at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:56) ~[SimpleChannelHandlerWrapper.class:?]
	at net.minecraftforge.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.channelRead0(SimpleChannelHandlerWrapper.java:36) ~[SimpleChannelHandlerWrapper.class:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) ~[SimpleChannelInboundHandler.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.handler.codec.MessageToMessageDecoder.channelRead(MessageToMessageDecoder.java:102) ~[MessageToMessageDecoder.class:4.1.9.Final]
	at io.netty.handler.codec.MessageToMessageCodec.channelRead(MessageToMessageCodec.java:111) ~[MessageToMessageCodec.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) ~[DefaultChannelPipeline$HeadContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) ~[AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) ~[DefaultChannelPipeline.class:4.1.9.Final]
	at io.netty.channel.embedded.EmbeddedChannel.writeInbound(EmbeddedChannel.java:274) ~[EmbeddedChannel.class:4.1.9.Final]
	at net.minecraftforge.fml.common.network.internal.FMLProxyPacket.processPacket(FMLProxyPacket.java:108) [FMLProxyPacket.class:?]
	at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:155) [NetworkManager.class:?]
	at net.minecraft.network.NetworkManager.channelRead0(NetworkManager.java:49) [NetworkManager.class:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.handleClientSideCustomPacket(NetworkDispatcher.java:409) [NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:274) [NetworkDispatcher.class:?]
	at net.minecraftforge.fml.common.network.handshake.NetworkDispatcher.channelRead0(NetworkDispatcher.java:74) [NetworkDispatcher.class:?]
	at io.netty.channel.SimpleChannelInboundHandler.channelRead(SimpleChannelInboundHandler.java:105) [SimpleChannelInboundHandler.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1334) [DefaultChannelPipeline$HeadContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348) [AbstractChannelHandlerContext.class:4.1.9.Final]
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:926) [DefaultChannelPipeline.class:4.1.9.Final]
	at io.netty.channel.local.LocalChannel.finishPeerRead0(LocalChannel.java:443) [LocalChannel.class:4.1.9.Final]
	at io.netty.channel.local.LocalChannel.access$500(LocalChannel.java:49) [LocalChannel.class:4.1.9.Final]
	at io.netty.channel.local.LocalChannel$5.run(LocalChannel.java:397) [LocalChannel$5.class:4.1.9.Final]
	at io.netty.channel.DefaultEventLoop.run(DefaultEventLoop.java:54) [DefaultEventLoop.class:4.1.9.Final]
	at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:858) [SingleThreadEventExecutor$5.class:4.1.9.Final]
	at java.lang.Thread.run(Unknown Source) [?:1.8.0_212]
[10:48:51] [Netty Local Client IO #0/ERROR] [FML]: Network Disconnect: A fatal error has occurred, this connection is terminated
[10:48:51] [Server thread/INFO]: Saving and pausing game...
[10:48:51] [Server thread/INFO]: Saving chunks for level 'New World'/overworld
[10:48:51] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether
[10:48:51] [Server thread/INFO]: Saving chunks for level 'New World'/the_end
[10:48:55] [Server thread/INFO]: Player207 lost connection: Verbindung getrennt
[10:48:55] [Server thread/INFO]: Player207 hat das Spiel verlassen
[10:48:55] [Server thread/INFO]: Stopping singleplayer server as player logged out
[10:48:55] [Server thread/INFO]: Stopping server
[10:48:55] [Server thread/INFO]: Saving players
[10:48:55] [Server thread/INFO]: Saving worlds
[10:48:55] [Server thread/INFO]: Saving chunks for level 'New World'/overworld
[10:48:55] [Server thread/INFO]: Saving chunks for level 'New World'/the_nether
[10:48:55] [Server thread/INFO]: Saving chunks for level 'New World'/the_end
[10:48:56] [Server thread/INFO] [FML]: Unloading dimension 0
[10:48:56] [Server thread/INFO] [FML]: Unloading dimension -1
[10:48:56] [Server thread/INFO] [FML]: Unloading dimension 1
[10:48:56] [Server thread/INFO] [FML]: Applying holder lookups
[10:48:56] [Server thread/INFO] [FML]: Holder lookups applied

 

Edited by ChiroxT
Posted

What are you trying to do, from a player’s perspective?

About Me

Spoiler

My Discord - Cadiboo#8887

My WebsiteCadiboo.github.io

My ModsCadiboo.github.io/projects

My TutorialsCadiboo.github.io/tutorials

Versions below 1.14.4 are no longer supported on this forum. Use the latest version to receive support.

When asking support remember to include all relevant log files (logs are found in .minecraft/logs/), code if applicable and screenshots if possible.

Only download mods from trusted sites like CurseForge (minecraft.curseforge.com). A list of bad sites can be found here, with more information available at stopmodreposts.org

Edit your own signature at www.minecraftforge.net/forum/settings/signature/ (Make sure to check its compatibility with the Dark Theme)

Posted (edited)
11 minutes ago, Cadiboo said:

What are you trying to do, from a player’s perspective?

Anything that needs an information from the Server, e.g. "Am i in a guild?" or "Did a Guild invite me?"

Edited by ChiroxT
typo

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.