Block generation

Discussion in 'Plugin Development' started by XgXXSnipz, May 15, 2014.

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

    XgXXSnipz

    Hello, I am coding a minigame for one of my friends, Im sure this is a simple question with a simple answer, I was wondering how would you use block generation to generate a cannon at the player location when the command is activated thanks :)
     
  2. If you know how the world edit app, you can import schematics. Else just use these lines of code to set the block.
    Code:
    world.getBlockatLocation(new Location(world,x,y,z)).setType(material);
    world.getBlockatLocation(new Location(world,x,y,z)).setData(datavalue);
    
     
  3. Offline

    Epixpenguin

    Bram0101
    But wouldn't setting a block take a lot of code that wouldn't be humanly possible to make if it was a bigger structure?
     
  4. It's not that bad as it sounds, I made a class that write words in blocks on the same way (it was about 2000+ code), and you can use for loops, or create a class that saves blocks that you have selected in minecraft and then add them to a hashmap and then save the hashmap. Just like the schematics from mcedit and worldedit.
     
  5. Offline

    XgXXSnipz

    Ok thank you so much! :)
     
  6. Offline

    Hellborn5456

    XgXXSnipz you could also use schematics and when there are given a block of ur choose they can set it down and it will build it right there
     
  7. Offline

    XgXXSnipz

    Via command?
     
  8. Offline

    Hellborn5456

    XgXXSnipz or a command. what ever u want...
     
  9. Offline

    XgXXSnipz

    How would u load a schematic in a command ?
     
  10. Offline

    AstramG

Thread Status:
Not open for further replies.

Share This Page