Jump to content

Recommended Posts

Posted

Hello, I have a storage class attached to the chunks in the world, all values do work and sync correctly, except one boolean, which always for whatever reason seems to default to false, even when constructively set to true. I send a packet to sync all the data from the server to the client, however, as stated, this value always defaults to false. The client actually handles this value well (as in set to true when I want it too), but the way I'm accessing it must be done through the server side, so I need these values to be synced. I just cannot understand why the server is insisting on this value being false when there is no way for it to be set to false (other than the default value of a boolean). I've spent hours trying to debug and see where things are going wrong: during packet sending, in the event itself, etc. One possible pointer is when I call this function through both client and server, it does work, as the client value is what is true which executes the task I want.

 

Here is where I'm setting this boolean:

  Reveal hidden contents
 

type.hasPossibleNaturalNode does properly set this variable, it can be replaced with true and the same issue still exists.

 

[all of these classes are viewable in my github (see signature), as well as the gradlew scripts for decompilation]

 

Here is the VoidStorage class, which is stored to the chunks [located in capability/voidchunk/VoidStorage] [interface can be found in api/capablity/voidchunk/IVoidChunk]:

  Reveal hidden contents
 

 

Here is the Capability Class [CapabilityVoidChunk located in capability/voidchunk/CapabilityVoidChunk]:

  Reveal hidden contents
 

 

And here is the event class [CommonEvents, located in events/CommonEvents]:

  Reveal hidden contents
 

 

Lastly the packet class [PacketVoidChunk located in network/packets/PacketVoidChunk]:

  Reveal hidden contents
 

Here are a few more pointers:

- I know the issue is some kind of desync between the server and client during the creation of the Capability, I just can't figure out what.

- When I go to send the packet, I'm often left with results that look like:

Sending hasNaturalNodePacket, currently set before packet: true \ setting to(packet is carrying): false

- Without sending the packet, I'm usually left with:

Server Side Response: hasNaturalNode: false \ Client Side Response: hasNaturalNode: true

- This value is used in VoidChunk#onChunkLoad, where I set a block at specific block coordinates, depending on hasNaturalNode.

-  As all values are being synced between the server TO the client (ex. the integer voidValue, or the integer voidTypeID), why would this one act like this need to be synced from the client TO the server?

 

Thank you and sorry for the spew of text.

  • Thanks 1

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.