Solved Why does it do this? (sendBlockChange problem)

Discussion in 'Plugin Development' started by TheWolfBadger, Jan 14, 2018.

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

    TheWolfBadger

    So basically I'm making an xray plugin for a client of mine and this has me completely stumped. The xray circle is made fine when there is no glass box made around the player. However, no matter how I've implemented the glass box, the xray sphere is then broken.

    Without glass box implementation:
    [​IMG]
    https://i.gyazo.com/fdb155e29fcb63138aa5b1c55f823bc4.gif

    With glass box implementation:
    [​IMG]
    https://i.gyazo.com/4fb6ea1fd583891c72470ba3cfcdf87a.gif

    Here is the code:
    https://hastebin.com/adosadenet.cpp


    Found the fix with some messing around. Seems that the sendBlockChange blocks basically get messed up when new blocks are being set. Using a delayed scheduler fixes the problem :)

    Code fix:
    https://hastebin.com/ezozosajiz.cpp


    EDIT by Moderator: merged posts, please use the edit button instead of double posting.
     
    Last edited by a moderator: Jan 14, 2018
Thread Status:
Not open for further replies.

Share This Page