Posted June 15, 201411 yr I'm having a few issues with the 1.7 packet handler. I've read up on some tutoirlas on how to do it and I'm doing it in an extrememly similar way, but I keep getting an IllegalStateException on startup. Here's the source code: https://github.com/Democretes/Fluxian-Expansion/blob/master/src/democretes/utils/network/PacketMatrix.java https://github.com/Democretes/Fluxian-Expansion/blob/master/src/democretes/utils/network/PacketHandler.java https://github.com/Democretes/Fluxian-Expansion/blob/master/src/democretes/FluxianExpansion.java Here's the crash log. ---- Minecraft Crash Report ---- // Ouch. That hurt Time: 6/14/14 10:43 PM Description: Initializing game java.lang.IllegalStateException: cannot determine the type of the type parameter 'REQ': class cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper at io.netty.util.internal.TypeParameterMatcher.fail(TypeParameterMatcher.java:171) at io.netty.util.internal.TypeParameterMatcher.find0(TypeParameterMatcher.java:165) at io.netty.util.internal.TypeParameterMatcher.find(TypeParameterMatcher.java:93) at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:60) at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:50) at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.<init>(SimpleChannelHandlerWrapper.java:17) at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.getHandlerWrapper(SimpleNetworkWrapper.java:85) at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.addServerHandlerAfter(SimpleNetworkWrapper.java:73) at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:63) at democretes.utils.network.PacketHandler.init(PacketHandler.java:18) at democretes.FluxianExpansion.penetration(FluxianExpansion.java:45) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:677) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:268) at net.minecraft.client.Minecraft.startGame(Minecraft.java:583) at net.minecraft.client.Minecraft.run(Minecraft.java:890) 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 io.netty.util.internal.TypeParameterMatcher.fail(TypeParameterMatcher.java:171) at io.netty.util.internal.TypeParameterMatcher.find0(TypeParameterMatcher.java:165) at io.netty.util.internal.TypeParameterMatcher.find(TypeParameterMatcher.java:93) at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:60) at io.netty.channel.SimpleChannelInboundHandler.<init>(SimpleChannelInboundHandler.java:50) at cpw.mods.fml.common.network.simpleimpl.SimpleChannelHandlerWrapper.<init>(SimpleChannelHandlerWrapper.java:17) at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.getHandlerWrapper(SimpleNetworkWrapper.java:85) at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.addServerHandlerAfter(SimpleNetworkWrapper.java:73) at cpw.mods.fml.common.network.simpleimpl.SimpleNetworkWrapper.registerMessage(SimpleNetworkWrapper.java:63) at democretes.utils.network.PacketHandler.init(PacketHandler.java:18) at democretes.FluxianExpansion.penetration(FluxianExpansion.java:45) 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 cpw.mods.fml.common.FMLModContainer.handleModStateEvent(FMLModContainer.java:513) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.sendEventToModContainer(LoadController.java:209) at cpw.mods.fml.common.LoadController.propogateStateMessage(LoadController.java:188) 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 com.google.common.eventbus.EventHandler.handleEvent(EventHandler.java:74) at com.google.common.eventbus.SynchronizedEventHandler.handleEvent(SynchronizedEventHandler.java:47) at com.google.common.eventbus.EventBus.dispatch(EventBus.java:314) at com.google.common.eventbus.EventBus.dispatchQueuedEvents(EventBus.java:296) at com.google.common.eventbus.EventBus.post(EventBus.java:267) at cpw.mods.fml.common.LoadController.distributeStateMessage(LoadController.java:119) at cpw.mods.fml.common.Loader.initializeMods(Loader.java:677) at cpw.mods.fml.client.FMLClientHandler.finishMinecraftLoading(FMLClientHandler.java:268) at net.minecraft.client.Minecraft.startGame(Minecraft.java:583) -- Initialization -- Details: Stacktrace: at net.minecraft.client.Minecraft.run(Minecraft.java:890) 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) -- System Details -- Details: Minecraft Version: 1.7.2 Operating System: Windows 7 (x86) version 6.1 Java Version: 1.7.0_25, Oracle Corporation Java VM Version: Java HotSpot Client VM (mixed mode), Oracle Corporation Memory: 942891528 bytes (899 MB) / 1060372480 bytes (1011 MB) up to 1060372480 bytes (1011 MB) JVM Flags: 3 total; -Xincgc -Xmx1024M -Xms1024M AABB Pool Size: 0 (0 bytes; 0 MB) allocated, 0 (0 bytes; 0 MB) used IntCache: cache: 0, tcache: 0, allocated: 0, tallocated: 0 FML: MCP v9.01-pre FML v7.2.156.1060 Minecraft Forge 10.12.1.1060 5 mods loaded, 5 mods active mcp{8.09} [Minecraft Coder Pack] (minecraft.jar) Unloaded->Constructed->Pre-initialized->Initialized FML{7.2.156.1060} [Forge Mod Loader] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized->Initialized Forge{10.12.1.1060} [Minecraft Forge] (forgeSrc-1.7.2-10.12.1.1060.jar) Unloaded->Constructed->Pre-initialized->Initialized FE{0.0.1} [Fluxian Expansion] (bin) Unloaded->Constructed->Pre-initialized->Errored examplemod{1.0} [Example Mod] (bin) Unloaded->Constructed->Pre-initialized->Initialized Launched Version: 1.6 LWJGL: 2.9.0 OpenGL: Intel® G45/G43 Express Chipset GL version 2.1.0 - Build 8.15.10.2869, Intel Is Modded: Definitely; Client brand changed to 'fml,forge' Type: Client (map_client.txt) Resource Packs: [] Current Language: English (US) Profiler Position: N/A (disabled) Vec3 Pool Size: ~~ERROR~~ NullPointerException: null Anisotropic Filtering: Off (1)
June 15, 201411 yr Go to the tutorials sub forums of modder support (at the top of the page). Click on either of the SimpleNetworkWrapper tutorials. Read. We all stuff up sometimes... But I seem to be at the bottom of that pot.
June 15, 201411 yr I had a similar crash when I didn't put in a constructor that took no parameters. It was required, even if it seemingly didn't do anything. PacketMatrix.Handler doesn't have one. Try something like this: public Handler() { }
July 2, 201411 yr Author Go to the tutorials sub forums of modder support (at the top of the page). Click on either of the SimpleNetworkWrapper tutorials. Read. That doesn't help me at all. I know how to write the packet handler, and clearly I've done it, it's just not working for some reason.
July 2, 201411 yr Interesting, I got the same exception while trying to make an abstract version of a Message and was told it's because Netty doesn't like abstractions, but you're getting the same thing with a straight implementation :\ Sorry I don't know the answer, but this makes me wonder if the IMessage system is still somewhat broken? When Forge 1.7.2 first came out, it was totally broken, which is why various other network solutions came out (which apparently have memory leaks), but now it still seems to be a bit funky. I guess we just don't know how to use it... Btw, I like what you did with your PacketHandler for methods and the discriminator - I did pretty much the exact same thing http://i.imgur.com/NdrFdld.png[/img]
July 2, 201411 yr Author Interesting, I got the same exception while trying to make an abstract version of a Message and was told it's because Netty doesn't like abstractions, but you're getting the same thing with a straight implementation :\ Sorry I don't know the answer, but this makes me wonder if the IMessage system is still somewhat broken? When Forge 1.7.2 first came out, it was totally broken, which is why various other network solutions came out (which apparently have memory leaks), but now it still seems to be a bit funky. I guess we just don't know how to use it... Btw, I like what you did with your PacketHandler for methods and the discriminator - I did pretty much the exact same thing It's simple and clean. Just the way it should be
July 3, 201411 yr That bug is from Forge. Your version is simply too old. Too old to be a Jedi, mmm? Update you shall I might just have to try my crazy abstractification attempt again. http://i.imgur.com/NdrFdld.png[/img]
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.