Solved Playing effect in center of block

Discussion in 'Plugin Development' started by RizzelDazz, Feb 7, 2014.

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

    RizzelDazz

    Any ideas on how one would play a effect in the center of a block instead of at the corner with getClickedBlock()?
     
  2. Offline

    Maurdekye

  3. Offline

    RizzelDazz

    Maurdekye
    Thanks, I will try that out. Seems that things that are hard to figure out are really super simple.
     
  4. Offline

    Desle

    RizzelDazz
    Use;
    Code:java
    1. e.getClickedBlock().getLocation().add(0.5, 0.5, 0.5)
    2.  
     
  5. Offline

    RizzelDazz

    I actually did not know you could easily do that, I just got the variables and re defined loc as the new location:

    Code:java
    1. Location loc = new Location(block.getWorld(),block.getX()+.5,block.getY()+.5,block.getZ()+.5);
     
    Desle likes this.
Thread Status:
Not open for further replies.

Share This Page