Create a Block Object by Location

Discussion in 'Plugin Development' started by instipod, Jul 1, 2011.

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

    instipod

    Is there a way to create a Block object by knowing it's location? (i.e. got location before by block.getLocation())
     
  2. How about location.getBlock()?
    ;)
     
  3. Offline

    lilkoopa

    Or more completely, location.getBlock().setType(mat);
    If there is no block in the location that's fine, it will still work.
     
  4. @lilkoopa I think by "creating a block object" the op meant getting an instance of the Block-class from the location. You don't actually create an object, but you get one.
     
  5. Offline

    instipod

    @Bone008
    That was exactly what I needed. Thanks!
     
  6. Offline

    lilkoopa

Thread Status:
Not open for further replies.

Share This Page