Jump to content

Fearitude

Forge Modder
  • Posts

    3
  • Joined

  • Last visited

Converted

  • Gender
    Undisclosed
  • Personal Text
    I am new!

Fearitude's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Big respect for finding that one sequituri. Fixed and pull request created, hopefully someone can get this in soon. https://github.com/MinecraftForge/FML/pull/398 Apologies if i cocked something up, i rarely use github.
  2. Yeah i found SimpleNetworkWrapper by just looking through the docs, and it seemed well, simple. I guess i could rewrite it to use the method in that tutorial but it seems unnecessarily complex for me when i just want to send 1 packet to the server and get a response. Hopefully someone else has used this and can suggest a solution, otherwise ill just have to rewrite it.
  3. Im trying to use SimpleNetworkWrapper as it looks like the best way to do the new network stuff, but ive run into a problem. Im fairly sure im using it correctly but get the following error when trying to register the messages. 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) Im creating the wrapper in the init method with the following code. network = new SimpleNetworkWrapper("MyChannel"); network.registerMessage(PacketHandler.class, Request.class, 1, Side.SERVER); And my handler and messages are as below. public class PacketHandler implements IMessageHandler<Request, Response> { @Override public Response onMessage(Request message, MessageContext ctx) { ... } } public class Request implements IMessage { ... } public class Response implements IMessage { ... } Am i missing something?
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.