CraftWorld change

Discussion in 'Plugin Development' started by Ne0nx3r0, Mar 15, 2013.

Thread Status:
Not open for further replies.
  1. Offline

    Ne0nx3r0

    So, regarding org.bukkit.craftbukkit.v1_5_R1.CraftWorld, since the update there is a new argument for the setData method... Can anyone help me out in trying to figure out what it is/does?

    I refactored a bit just to clean things up:
    Code:java
    1.  
    2. public boolean setData(int x, int y, int z, int type, int mysteryVariable)
    3. {
    4. if (x >= -30000000 && z >= -30000000 && x < 30000000 && z < 30000000) {
    5. if (y < 0) {
    6. return false;
    7. } else if (y >= 256) {
    8. return false;
    9. } else {
    10. Chunk chunk = this.getChunkAt(x >> 4, z >> 4);
    11. int j1 = x & 15;
    12. int k1 = z & 15;
    13. boolean flag = chunk.b(j1, y, k1, type);
    14.  
    15. if (flag) {
    16. int l1 = chunk.getTypeId(j1, y, k1);
    17.  
    18. if ((mysteryVariable & 2) != 0 && (!this.isStatic || (mysteryVariable & 4) == 0)) {
    19. this.notify(x, y, z);
    20. }
    21.  
    22. if (!this.isStatic && (mysteryVariable & 1) != 0) {
    23. this.update(x, y, z, l1);
    24. Block block = Block.byId[l1];
    25.  
    26. if (block != null && block.q_()) {
    27. this.m(x, y, z, l1);
    28. }
    29. }
    30. }
    31.  
    32. return flag;
    33. }
    34. } else {
    35. return false;
    36. }
    37. }
     
  2. I think its a variable that looks if physics events are thrown, play with it to see
     
Thread Status:
Not open for further replies.

Share This Page