Jump to content

[Solved] [1.7.2] odd multiplayer bug (sync issue?)


wesserboy

Recommended Posts

Hello everybody,

lately i've been working on a mod which can control pvp per chunk and it's coming along very nice.

 

but a few days ago i've encountered a bug and i just can't find the cause, this is what happens:

 

i run two clients from eclipse, one will host a lan world and another one will join that lan world.

the host is player1 and the one that joins is player2.

first pvp is turned off and when one of the players attacks the other one it works fine and tells me that pvp is not enabled in the chunk.

then i toggle pvp so it is enabled in the chunk.

when player1 then hits player2 it just damages him like it is supposed to.

but when player2 hits player1 it still says pvp is not enabled in this chunk and it doesn't cause any damage.

 

this is the code i use:

 

eventhandler:

https://gist.github.com/3a757d716d72e54b4731

 

worlddata:

https://gist.github.com/ac072ba4a046ee0379f7

 

pvp toggle command:

https://gist.github.com/d24fd087d4c34dd68f90

 

pvp read command:

https://gist.github.com/e52ba8561b5a03738dec

 

does anyone know what could possibly cause this and how i would fix it?

-wesserboy

I made the Mob Particles mod, you can check it out here: http://www.minecraftforum.net/topic/2709242-172-forge-mob-particles/

Link to comment
Share on other sites

if i would use coordinates i would need two sets, one for Xcoords and one for Zcoords, right? but a set only adds an element if it doesn't already contain that element, which would be a problem if two chunk have the same coordinate. or did i misinterpret what you meant?

I made the Mob Particles mod, you can check it out here: http://www.minecraftforum.net/topic/2709242-172-forge-mob-particles/

Link to comment
Share on other sites

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.