Loading Schematics

Discussion in 'Plugin Development' started by malikdbuseck, Jan 7, 2017.

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

    malikdbuseck

    Hello,
    Currently I am looking for a way to load and paste schematics into my server. I have looked for days now for code and documentation that helps but so far their is jack. So anyone that would like to help me that would be great. This is what I have rn for loading the schematic.

    Code:
    GZIPInputStream fis = (GZIPInputStream) getClass().getResourceAsStream("medievalhouse.schematic");
                NBTTagCompound nbtdata = NBTCompressedStreamTools.a(fis);
    
                short width = nbtdata.getShort("Width");
                short height = nbtdata.getShort("Height");
                short length = nbtdata.getShort("Length");
    
                byte[] blocks = nbtdata.getByteArray("Blocks");
                byte[] data = nbtdata.getByteArray("Data");
                byte[] material = nbtdata.getByteArray("Materials");
    
                NBTTagList entities = nbtdata.getList("Entities", length);
                NBTTagList tileentities = nbtdata.getList("TileEntities", length);
     
  2. Offline

    mythbusterma

  3. Offline

    malikdbuseck

    I actually I have found a much much easy way. Simply just just moved the two methods that I need from the worldedit code into my class.
     
  4. Offline

    mythbusterma

  5. Offline

    malikdbuseck

    Ended up working exactly how I want it to
     
Thread Status:
Not open for further replies.

Share This Page