Package org.getspout.spoutapi.block.design

Examples of org.getspout.spoutapi.block.design.BlockDesign


      int i0 = 0;
      for (CustomBlock block : blocks) {
        byte i = -128;
        do {
          if (block.getBlockDesign(i) != null) {
            BlockDesign design = block.getBlockDesign(i);
            long beforeCRC = -1;
            File target = new File(getPluginCacheFolder(plugin), String.valueOf(i0) + ".sbd");

            if (!target.getParentFile().exists()) {
              target.getParentFile().mkdirs();
            }

            if (target.exists()) {
              beforeCRC = FileUtil.getCRC(target,  new byte[(int) target.length()]);
              target.delete();
            }

            try {
              DataOutputStream out = new DataOutputStream(new BufferedOutputStream(new FileOutputStream(target)));

              out.writeShort((short)block.getCustomId());
              out.writeByte(i);
              design.write(out);
              out.flush();
              out.close();

            } catch (IOException e) {
              e.printStackTrace();
View Full Code Here

TOP

Related Classes of org.getspout.spoutapi.block.design.BlockDesign

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.