Blocks and locations

Discussion in 'Plugin Development' started by NoLiver92, Jun 10, 2013.

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

    NoLiver92

    I know you gen get a location from a block but how do you define a block and add a location to it?
     
  2. dafuq? You might want to explain it a bit more o.0
     
  3. Offline

    NoLiver92

    you can do block.getLocation();

    but how can i do block.setLocation();
     
  4. Offline

    desht

    You don't. A Block object represents a fixed point (voxel) in the world. You can't change its location.

    What is it that you're trying to achieve here?

    (If you just want to get the block at a given point in the world, then world.getBlockAt(x, y, z) or world.getBlockAt(loc) is probably what you want)
     
  5. If I am rights, is that you are meaning to move a block from one location, to another?
     
  6. Offline

    Wingzzz

    He pretty much wants to set blocks. IE: change 17, 45, -66 from a stone block to a glass block (well... of the sort)... This will involve using -> Block, BlockFace, and Material. (Might post a quick snippet on how later on if I've got some time).
     
  7. Offline

    coobro123

    World world = p.getWorld();
    world.getBlockat(); should set a block in that would then set the position
     
Thread Status:
Not open for further replies.

Share This Page