Jump to content

Recommended Posts

Posted

I'm with dieSieben, can't see anything wrong.

 

Time for a couple of breakpoints in the forge code I think.  Been there myself trying to debug network code and it was moderately painful.

 

You might try first putting a breakpoint in FMLProxyPacket.processPacket, or NetworkManager.processReceivedPackets to see if your packet arrives but just isn't handled correctly .  A lot of packets go through there so I'd suggest you add a precondition to it, i.e. put a second breakpoint in your command send method and then "Disabled until selected breakpoint is hit" (IntelliJ) for your FMLProxyPacket breakpoint.  Hopefully yours won't be too far down the queue then.

 

-TGG

 

 

Posted

Well after break pointing both of those methods and none of them being tripped.

Could this be a forge/mc bug? Lucas1998 has reported that he is unable to send packets from client to the server as well.

Also the constructor and toBytes method is being when I am expecting it to :|

Posted

You need to break a block to bring it up (temporary solution) . What I was doing was selecting one of the non null buttons from the list and press go. For the sake of consistency

here are the configs I have been using

Posted

Hi

 

Well I've wrestled with it a bit with no luck.  It just seems to disappear into the void and never pop out the other side.  I tried tracing through to see why but it will take a more powerful brain than mine to understand what's going on in all those channels and listeners and contexts.

 

It does appear to have something to do with the fact you're sending it from a GUI .  When I move the send command to a client-side event eg

 

    @SubscribeEvent
    public void onKey(InputEvent.KeyInputEvent event)
    {
      Main.snw.sendToServer(new Request("test"));
    }

 

then it works fine.

 

I'm at the limits of my knowledge here, sorry.  Perhaps folks who have used GUI before might be more help...

 

-TGG

Posted

I know its a mess and I have learned a lot whilst making this.

The issue is that your GUI pauses the game (override

doesGuiPauseGame

). That freezes the client ticking, so no new packets are being sent. When you close the GUI you can see that the packet is then send.

Your packet crashes the server though, I have not looked into that.

 

A couple of things:

  • Your .gitignore is broken. Your .project file should not be in the repo and the gradlew.bat is excluded, which should not be.
  • Why do you handle the player data saving yourself? What is wrong with IExtendedEntityProperties?
  • Please use Generics! In e.g. the DataSave class you just throw around raw HashMaps and ArrayLists

That's just on a first glance. Overall your code is, sorry to say, a big mess.

  • Good to know, after I have the GUI sorted I was planning to go through and redo a ton of code anyway
  • I originally was using it without really understanding how it worked. Became frustrated with it and decided to handle it myself so I knew how it worked
  • Will keep that it mind when I go back over that code

Looks like a simple enough fix thanks for your help diesieben07 and TheGreyGhost

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.