August 2, 201312 yr Author All nice in the single player No fake items or nothing like that But in multiplayer it acts like it doesnt get the packet... http://r1306.hizliresim.com/1b/1/np1mm.png[/img]
August 2, 201312 yr are you usign 2 different packet handlers ? (1 server, 1 client) and can you debug a little, try to see where its failing, can you register correctly server side ? can you send the packet successfully ? is the server receiving the packet ?, is the server passing all the condition to spawn the item ? is the item being spawned ? see my debug guide in my sig how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 2, 201312 yr Author Actually I am using 1 packet handler I dont know how to create sided handlers http://r1306.hizliresim.com/1b/1/np1mm.png[/img]
August 2, 201312 yr you create 2 class that implements IPacketHandler one with the server code and one with the client code and register them like this: IPacketHandler phs = new ServerPacketHandler(); IPacketHandler phc = new ClientPacketHandler(); NetworkRegistry.instance().registerChannel(phs, "FRG", Side.SERVER); NetworkRegistry.instance().registerChannel(phc, "FRG", Side.CLIENT); also remove every related thing in your @NetworkMod , aka @NetworkMod(clientSideRequired = true, serverSideRequired = true, clientPacketHandlerSpec = @SidedPacketHandler(channels = { "FRG" }, packetHandler = ForgeRevClientPacketHandler.class)) leave only @NetworkMod(clientSideRequired = true, serverSideRequired = true) because if you have it in your @NetworkMod and a code version (describe above) it will resgister it twice. use only the code version because its easier to understand what its doing. i understand why they use annotation but i think its more confusing then anything else :\, specially for newbie (not saying you're a newbie, just saying in general it's not a really used concept in java even though it exists) how to debug 101:http://www.minecraftforge.net/wiki/Debug_101 -hydroflame, author of the forge revolution-
August 2, 201312 yr Author you create 2 class that implements IPacketHandler one with the server code and one with the client code and register them like this: IPacketHandler phs = new ServerPacketHandler(); IPacketHandler phc = new ClientPacketHandler(); NetworkRegistry.instance().registerChannel(phs, "FRG", Side.SERVER); NetworkRegistry.instance().registerChannel(phc, "FRG", Side.CLIENT); also remove every related thing in your @NetworkMod , aka @NetworkMod(clientSideRequired = true, serverSideRequired = true, clientPacketHandlerSpec = @SidedPacketHandler(channels = { "FRG" }, packetHandler = ForgeRevClientPacketHandler.class)) leave only @NetworkMod(clientSideRequired = true, serverSideRequired = true) because if you have it in your @NetworkMod and a code version (describe above) it will resgister it twice. use only the code version because its easier to understand what its doing. i understand why they use annotation but i think its more confusing then anything else :\, specially for newbie (not saying you're a newbie, just saying in general it's not a really used concept in java even though it exists) Hey dude! Thank you for your help I successfully defined the server and the client proxy but here is the deal : With an item I am sending a packet to server with int(1001) When packet handler gets the int(1001) prints a "Done!" It works on singleplayer still but doesnt work on the multiplayer And I am okey with you saying me I am newbie! Because I am a newbie http://r1306.hizliresim.com/1b/1/np1mm.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.