Search in sources :

Example 11 with NBTOutputStream

use of com.sk89q.jnbt.NBTOutputStream in project FastAsyncWorldEdit by IntellectualSites.

the class FaweStreamChangeSet method addTileRemove.

@Override
public void addTileRemove(CompoundTag tag) {
    if (tag == null) {
        return;
    }
    blockSize++;
    try {
        NBTOutputStream nbtos = getTileRemoveOS();
        nbtos.writeTag(tag);
    } catch (IOException e) {
        e.printStackTrace();
    }
}
Also used : IOException(java.io.IOException) NBTOutputStream(com.sk89q.jnbt.NBTOutputStream)

Example 12 with NBTOutputStream

use of com.sk89q.jnbt.NBTOutputStream in project FastAsyncWorldEdit by IntellectualSites.

the class DiskStorageHistory method getTileCreateOS.

@Override
public NBTOutputStream getTileCreateOS() throws IOException {
    if (osNBTT != null) {
        return osNBTT;
    }
    nbttFile.getParentFile().mkdirs();
    nbttFile.createNewFile();
    osNBTT = new NBTOutputStream(getCompressedOS(new FileOutputStream(nbttFile)));
    return osNBTT;
}
Also used : FileOutputStream(java.io.FileOutputStream) NBTOutputStream(com.sk89q.jnbt.NBTOutputStream)

Aggregations

NBTOutputStream (com.sk89q.jnbt.NBTOutputStream)12 IOException (java.io.IOException)7 FileOutputStream (java.io.FileOutputStream)6 CompoundTag (com.sk89q.jnbt.CompoundTag)3 Clipboard (com.sk89q.worldedit.extent.clipboard.Clipboard)3 LZ4BlockInputStream (net.jpountz.lz4.LZ4BlockInputStream)3 FastSchematicWriter (com.fastasyncworldedit.core.extent.clipboard.io.FastSchematicWriter)2 CompressedCompoundTag (com.fastasyncworldedit.core.jnbt.CompressedCompoundTag)2 CompressedSchematicTag (com.fastasyncworldedit.core.jnbt.CompressedSchematicTag)2 Tag (com.sk89q.jnbt.Tag)2 BufferedOutputStream (java.io.BufferedOutputStream)2 OutputStream (java.io.OutputStream)2 LZ4BlockOutputStream (net.jpountz.lz4.LZ4BlockOutputStream)2 ParallelGZIPOutputStream (org.anarres.parallelgzip.ParallelGZIPOutputStream)2 FastByteArrayOutputStream (com.fastasyncworldedit.core.internal.io.FastByteArrayOutputStream)1 FastByteArraysInputStream (com.fastasyncworldedit.core.internal.io.FastByteArraysInputStream)1 FaweOutputStream (com.fastasyncworldedit.core.internal.io.FaweOutputStream)1 MutableBlockVector3 (com.fastasyncworldedit.core.math.MutableBlockVector3)1 IntArrayTag (com.sk89q.jnbt.IntArrayTag)1 ListTag (com.sk89q.jnbt.ListTag)1