Posted July 2, 201411 yr 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/
July 2, 201411 yr Author 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/
July 3, 201411 yr Author Thank you very much, it works like a charm now yesterday i watched some tutorials about bit operators since i had never used them, my apologies for forgetting to thank you i've just changed my code and now it works! I made the Mob Particles mod, you can check it out here: http://www.minecraftforum.net/topic/2709242-172-forge-mob-particles/
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.