This commit is contained in:
Jesse Boyd 2017-10-16 14:44:56 +11:00
parent 4dab4d118a
commit 2001992519
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 0 additions and 56 deletions

View File

@ -716,11 +716,6 @@ public class EditSession extends AbstractWorld implements HasFaweQueue, Lighting
return null;
}
private void initTransform(Vector pos) {
ResettableExtent tfx = getTransform();
if (tfx != null) tfx.init(pos);
}
/**
* Set a mask.
*
@ -1490,7 +1485,6 @@ public class EditSession extends AbstractWorld implements HasFaweQueue, Lighting
checkNotNull(pattern);
checkArgument(radius >= 0, "radius >= 0");
checkArgument(depth >= 1, "depth >= 1");
initTransform(origin);
if (direction.equals(new Vector(0, -1, 0))) {
return fillXZ(origin, pattern, radius, depth, false);
}
@ -1543,7 +1537,6 @@ public class EditSession extends AbstractWorld implements HasFaweQueue, Lighting
checkNotNull(pattern);
checkArgument(radius >= 0, "radius >= 0");
checkArgument(depth >= 1, "depth >= 1");
initTransform(origin);
final MaskIntersection mask = new MaskIntersection(new RegionMask(new EllipsoidRegion(null, origin, new Vector(radius, radius, radius))), new BoundedHeightMask(Math.max(
(origin.getBlockY() - depth) + 1, getMinimumPoint().getBlockY()), Math.min(getMaximumPoint().getBlockY(), origin.getBlockY())), Masks.negate(new ExistingBlockMask(EditSession.this)));

View File

@ -19,7 +19,6 @@ import com.boydti.fawe.util.ReflectionUtils;
import com.boydti.fawe.util.StringMan;
import com.github.luben.zstd.ZstdInputStream;
import com.github.luben.zstd.ZstdOutputStream;
import com.google.common.primitives.UnsignedBytes;
import com.sk89q.jnbt.ByteTag;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.jnbt.FloatTag;
@ -60,7 +59,6 @@ import java.util.concurrent.ConcurrentLinkedQueue;
import java.util.concurrent.ForkJoinPool;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.LongAdder;
import java.util.function.Consumer;
import java.util.zip.GZIPInputStream;
import net.jpountz.lz4.LZ4BlockInputStream;
import net.jpountz.lz4.LZ4BlockOutputStream;
@ -412,53 +410,6 @@ public class MCAFile2LevelDB extends MapConverter {
}
}
public static void main(String[] args) throws IOException {
byte[] data = new byte[9];
Tag[] tags = Tag.values().clone();
Arrays.sort(tags, new Comparator<Tag>() {
@Override
public int compare(Tag left, Tag right) {
return left.value - right.value;
}
});
MainUtil.deleteDirectory(new File("db"));
DB db = Iq80DBFactory.factory.open(new File("db"),
new Options().createIfMissing(true)
);
for (Tag tag : tags) {
System.out.println(tag.name() + " | " + tag.value);
db.put(tag.fill(0, 0, new byte[9]), new byte[] { 1 });
}
db.put(getSectionKey(0, -1, 0, 0), new byte[] { 5 });
db.put(getSectionKey(0, -2, 0, 0), new byte[] { 5 });
db.put(getSectionKey(0, -256, 0, 0), new byte[] { 7 });
db.put(getSectionKey(0, 0, 0, 0), new byte[] { 2 });
db.put(getSectionKey(0, 1, 0, 0), new byte[] { 2 });
System.out.println("=========");
List<byte[]> bytes = new ArrayList<>();
db.forEach(new Consumer<Map.Entry<byte[], byte[]>>() {
@Override
public void accept(Map.Entry<byte[], byte[]> entry) {
byte[] key = entry.getKey();
Tag tag;
if (key.length < 13) {
tag = Tag.valueOf(entry.getKey()[8]);
} else {
tag = Tag.valueOf(entry.getKey()[12]);
}
System.out.println(tag.name() + " | " + tag.value + " | " + entry.getValue()[0] + " | " + StringMan.getString(key));
bytes.add(key);
}
});
System.out.println("==========");
Collections.sort(bytes, UnsignedBytes.lexicographicalComparator());
for (byte[] b : bytes) {
System.out.println(StringMan.getString(b));
}
}
public void write(MCAChunk chunk, boolean remap, int dim) throws IOException {
submittedChunks.add(1);
long numChunks = submittedChunks.longValue();