Simple way to create a building

Discussion in 'Plugin Development' started by goodstuff20, Jun 12, 2013.

Thread Status:
Not open for further replies.
  1. Hi guys,

    I wanted to know if there were a simpler way to generate buildings than to do it only with locations and add blocks to these. I know schematics does this but I wanted to know if its also possible without having to install world edit.
    Maybe create a txt file with all the data and add this.

    Thx guys,

    Cheers
     
  2. Offline

    Wingzzz

    You may want to be using the .sch (schematic) files.

    EDIT: A schematic is a file in which to store sections of a world. So, here you may load a .sch file that you've made of a house or a mountain, a lake, or a block. You can either use existing APIs such as the world edit (I think it's API supports ease of .sch use), or simply have your plugin be able to read/load/save etc .sch files.
     
  3. THX but i said i know schematic and would like to know a differrent way - THX though (schematic is in world Edith :D)
     
  4. Offline

    Wingzzz

    goodstuff20
    Read my edit. Also there is no real more efficient way. Dealing with individual blocks for large structures or areas is impractical and bad design. It would only be proper if you were doing dynamic things such as skills that move / create blocks etc...
     
  5. Sry chrome didnt load all the Text - my fault - OK thx but cant you just create a string or text file with all of the data like levels in a video game?
     
  6. Offline

    Lecrayen

    You could even make a yml holding all of the data. It isn't that difficult, just inefficient
     
  7. OK THX
     
  8. Offline

    Wingzzz

    goodstuff20
    You're more than welcome to! You must then read the file loading those into Block objects etc... Then placing those properly in the world according to yaw/pitch/z/y/x etc... It wouldn't be bad if you turn it into a library which could be used over again, just imho I find it impractical.

    EDIT: Every block you're putting within your structure/terrain yaml file that contains the data must each contain a lot of information such as the Material and others I said above (not all accurate btw, I'm making an educated guess on most of the metadata there) but It's a lot and say you're having an area with 1000's of blocks, you're going to create that file? It's up to you, it'd be interesting to see it done.
     
  9. THX :D but why do you find it impractical?
     
  10. Offline

    Wingzzz

    Schematic files are built for exactly what you want, I don't see many outstanding reasons to not want to use it considering it covers most (if not all) of the information of the section stored. So to have to then create a new system for this and have it read off of a flat-file... It is a lot of work, and you will need to cover a lot of information about each individual block. Also, if you choose to support this format, you will then be able to use it in many third-party programs and use the thousands of existing schematics on from various websites.
     
  11. OK THX - always though it was part of world edit :D
     
  12. Offline

    Wingzzz

  13. Offline

    Lecrayen

    I personally use .ser files for saving most info that even Admin's shouldn't be touching. Look up how to 'implements Serializable' it may interest you.
     
Thread Status:
Not open for further replies.

Share This Page