Minor changes for readability

This commit is contained in:
MattBDev 2019-10-23 22:33:51 -04:00
parent 1b28dcda40
commit ca843f1b90
8 changed files with 18 additions and 42 deletions

View File

@ -516,7 +516,7 @@ public class BukkitWorld extends AbstractWorld {
}
@Override
public void sendChunk(int X, int Z, int mask) {
public void sendChunk(int chunkX, int chunkZ, int bitMask) {
}
@Override

View File

@ -320,7 +320,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
}
@Override
public void sendChunk(int X, int Z, int mask) {
public void sendChunk(int chunkX, int chunkZ, int bitMask) {
throw new UnsupportedOperationException("TODO NOT IMPLEMENTED"); // add method to adapter to send custom chunk
}

View File

@ -80,34 +80,15 @@ public abstract class MCAWriter implements Extent {
final ForkJoinPool pool = new ForkJoinPool();
int tcx = (width - 1) >> 4;
int tcz = (length - 1) >> 4;
final ThreadLocal<WritableMCAChunk> chunkStore = new ThreadLocal<WritableMCAChunk>() {
@Override
protected WritableMCAChunk initialValue() {
final ThreadLocal<WritableMCAChunk> chunkStore = ThreadLocal.withInitial(() -> {
WritableMCAChunk chunk = new WritableMCAChunk();
Arrays.fill(chunk.blocks, BlockID.AIR);
// Arrays.fill(chunk.skyLight, (byte) 255);
return chunk;
}
};
final ThreadLocal<byte[]> byteStore1 = new ThreadLocal<byte[]>() {
@Override
protected byte[] initialValue() {
return new byte[500000];
}
};
final ThreadLocal<byte[]> byteStore2 = new ThreadLocal<byte[]>() {
@Override
protected byte[] initialValue() {
return new byte[500000];
}
};
final ThreadLocal<Deflater> deflateStore = new ThreadLocal<Deflater>() {
@Override
protected Deflater initialValue() {
Deflater deflater = new Deflater(Deflater.BEST_SPEED, false);
return deflater;
}
};
});
final ThreadLocal<byte[]> byteStore1 = ThreadLocal.withInitial(() -> new byte[500000]);
final ThreadLocal<byte[]> byteStore2 = ThreadLocal.withInitial(() -> new byte[500000]);
final ThreadLocal<Deflater> deflateStore = ThreadLocal
.withInitial(() -> new Deflater(Deflater.BEST_SPEED, false));
byte[] fileBuf = new byte[1 << 16];
int mcaXMin = 0;
int mcaZMin = 0;

View File

@ -2,12 +2,9 @@ package com.boydti.fawe.object.extent;
import com.boydti.fawe.FaweCache;
import com.boydti.fawe.beta.IBatchProcessor;
import com.boydti.fawe.beta.IChunkSet;
import com.boydti.fawe.object.FaweLimit;
import com.boydti.fawe.object.exception.FaweException;
import com.boydti.fawe.util.ExtentTraverser;
import com.boydti.fawe.util.WEManager;
import com.sk89q.jnbt.CompoundTag;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.entity.BaseEntity;
import com.sk89q.worldedit.entity.Entity;
@ -22,9 +19,6 @@ import com.sk89q.worldedit.world.block.BlockState;
import com.sk89q.worldedit.world.block.BlockStateHolder;
import com.sk89q.worldedit.world.block.BlockTypes;
import java.util.Collection;
import java.util.Iterator;
import java.util.Map;
import java.util.Set;
import javax.annotation.Nullable;
public abstract class FaweRegionExtent extends ResettableExtent implements IBatchProcessor {
@ -56,6 +50,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
}
@Override
public Extent construct(Extent child) {
if (getExtent() != child) {
new ExtentTraverser<Extent>(this).setNext(child);

View File

@ -235,8 +235,8 @@ public class WorldWrapper extends AbstractWorld {
}
@Override
public void sendChunk(int X, int Z, int mask) {
parent.sendChunk(X, Z, mask);
public void sendChunk(int chunkX, int chunkZ, int bitMask) {
parent.sendChunk(chunkX, chunkZ, bitMask);
}
@Override

View File

@ -31,8 +31,8 @@ import java.util.List;
/**
* A Kochanek-Bartels interpolation; continuous in the 2nd derivative.
*
* <p>Supports {@link Node#tension tension}, {@link Node#bias bias} and
* {@link Node#continuity continuity} parameters per {@link Node}.</p>
* <p>Supports {@link Node#getTension() tension}, {@link Node#getBias() bias} and
* {@link Node#getContinuity() continuity} parameters per {@link Node}.</p>
*/
public class KochanekBartelsInterpolation implements Interpolation {

View File

@ -148,7 +148,7 @@ public class NullWorld extends AbstractWorld {
}
@Override
public void sendChunk(int X, int Z, int mask) {
public void sendChunk(int chunkX, int chunkZ, int bitMask) {
}

View File

@ -300,7 +300,7 @@ public interface World extends Extent, Keyed, IChunkCache<IChunkGet> {
* @param chunkZ
* @param bitMask
*/
void sendChunk(final int X, final int Z, final int mask);
void sendChunk(final int chunkX, final int chunkZ, final int bitMask);
@Override
IChunkGet get(int x, int z);