Effects playing at the corner of a block?

Discussion in 'Plugin Development' started by XvBaseballkidvX, Dec 6, 2013.

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

    XvBaseballkidvX

    Hello everyone!

    So I am trying to make a scheduler that plays an effect at a certain blocks location. The problem that I am having is that the effect is playing at the corner of the block!!! (Which just bugs me :p )

    Is here any way to fix this?

    Code to get the location:
    Code:java
    1. block.getLocation(); // lol you probably knew that :P


    Thanks for reading!
    All help is much appreciated!
     
  2. Offline

    jebbo

    Try to add/remove 0.5 to the locations (x, z) to set it to the middle
     
  3. Offline

    Luke_Lax

    I recently encountered this issue, all you need to do is add 0.5 to the x and z axis (not y since that's the 'up' axis) :)
     
  4. Offline

    XvBaseballkidvX

    jebbo Will do! Lets see if it works :D
     
  5. Offline

    Wantsome909

    XvBaseballkidvX Just add .50 at the end of x coord and z coord. Not y coord.
    Code:java
    1. new Location(p.getWorld(), 10.50, 5, 10.50));
     
Thread Status:
Not open for further replies.

Share This Page