misc changes.

This commit is contained in:
MattBDev
2019-11-11 16:02:28 -05:00
parent 7aa0d9c122
commit a23a4e5496
71 changed files with 676 additions and 673 deletions

View File

@ -18,9 +18,12 @@ import java.util.List;
import java.util.UUID;
import java.util.concurrent.atomic.AtomicInteger;
import java.util.zip.GZIPInputStream;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class CorruptSchematicStreamer {
private final Logger log = LoggerFactory.getLogger(CorruptSchematicStreamer.class);
private final InputStream stream;
private final UUID uuid;
private LinearClipboard fc;
@ -65,10 +68,9 @@ public class CorruptSchematicStreamer {
matchIndex = 0;
}
}
Fawe.debug(" - Recover " + matchTag + " = success");
log.debug(" - Recover " + matchTag + " = success");
} catch (Throwable e) {
Fawe.debug(" - Recover " + matchTag + " = partial failure");
e.printStackTrace();
log.error(" - Recover " + matchTag + " = partial failure", e);
}
}
@ -78,7 +80,7 @@ public class CorruptSchematicStreamer {
}
BlockVector3 dimensions = guessDimensions(volume.get(), width.get(), height.get(), length.get());
if (width.get() == 0 || height.get() == 0 || length.get() == 0) {
Fawe.debug("No dimensions found! Estimating based on factors:" + dimensions);
log.debug("No dimensions found! Estimating based on factors:" + dimensions);
}
if (Settings.IMP.CLIPBOARD.USE_DISK) {
fc = new DiskOptimizedClipboard(dimensions, uuid);

View File

@ -173,10 +173,12 @@ public class MCAChunk implements IChunk {
return root;
}
@Override
public int getX() {
return chunkX;
}
@Override
public int getZ() {
return chunkZ;
}
@ -435,6 +437,7 @@ public class MCAChunk implements IChunk {
return true;
}
@Override
public void setEntity(CompoundTag entityTag) {
setModified();
long least = entityTag.getLong("UUIDLeast");
@ -464,6 +467,7 @@ public class MCAChunk implements IChunk {
return true;
}
@Override
public Set<CompoundTag> getEntities() {
return new HashSet<>(entities.values());
}
@ -505,6 +509,7 @@ public class MCAChunk implements IChunk {
return null;
}
@Override
public Set<UUID> getEntityRemoves() {
return new HashSet<>();
}
@ -542,6 +547,7 @@ public class MCAChunk implements IChunk {
Arrays.fill(this.biomes, biome);
}
@Override
public void removeEntity(UUID uuid) {
entities.remove(uuid);
}

View File

@ -1,6 +1,7 @@
package com.boydti.fawe.jnbt.anvil;
import com.boydti.fawe.Fawe;
import static org.slf4j.LoggerFactory.getLogger;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.beta.Trimable;
import com.boydti.fawe.beta.implementation.IChunkExtent;
@ -18,7 +19,6 @@ import com.sk89q.worldedit.world.World;
import it.unimi.dsi.fastutil.ints.Int2ObjectMap;
import it.unimi.dsi.fastutil.ints.Int2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.io.FastByteArrayOutputStream;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileNotFoundException;
@ -40,7 +40,7 @@ import java.util.zip.InflaterInputStream;
/**
* Chunk format: http://minecraft.gamepedia.com/Chunk_format#Entity_format
* e.g.: `.Level.Entities.#` (Starts with a . as the root tag is unnamed)
* e.g., `.Level.Entities.#` (Starts with a . as the root tag is unnamed)
* Note: This class isn't thread safe. You can use it in an async thread, but not multiple at the same time
*/
public class MCAFile extends ExtentBatchProcessorHolder implements Trimable, IChunkExtent {
@ -291,7 +291,7 @@ public class MCAFile extends ExtentBatchProcessorHolder implements Trimable, ICh
if (offset < offsets.length) {
offsets[offset] = i;
} else {
Fawe.debug("Ignoring invalid offset " + offset);
getLogger(MCAFile.class).debug("Ignoring invalid offset " + offset);
}
}
}
@ -707,4 +707,4 @@ public class MCAFile extends ExtentBatchProcessorHolder implements Trimable, ICh
}
}
}
}
}