geforkt von Mirrors/FastAsyncWorldEdit
Minor changes for readability
Dieser Commit ist enthalten in:
Ursprung
1b28dcda40
Commit
ca843f1b90
@ -516,7 +516,7 @@ public class BukkitWorld extends AbstractWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendChunk(int X, int Z, int mask) {
|
public void sendChunk(int chunkX, int chunkZ, int bitMask) {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -320,7 +320,7 @@ public class HeightMapMCAGenerator extends MCAWriter implements StreamChange, Dr
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@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
|
throw new UnsupportedOperationException("TODO NOT IMPLEMENTED"); // add method to adapter to send custom chunk
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,34 +80,15 @@ public abstract class MCAWriter implements Extent {
|
|||||||
final ForkJoinPool pool = new ForkJoinPool();
|
final ForkJoinPool pool = new ForkJoinPool();
|
||||||
int tcx = (width - 1) >> 4;
|
int tcx = (width - 1) >> 4;
|
||||||
int tcz = (length - 1) >> 4;
|
int tcz = (length - 1) >> 4;
|
||||||
final ThreadLocal<WritableMCAChunk> chunkStore = new ThreadLocal<WritableMCAChunk>() {
|
final ThreadLocal<WritableMCAChunk> chunkStore = ThreadLocal.withInitial(() -> {
|
||||||
@Override
|
|
||||||
protected WritableMCAChunk initialValue() {
|
|
||||||
WritableMCAChunk chunk = new WritableMCAChunk();
|
WritableMCAChunk chunk = new WritableMCAChunk();
|
||||||
Arrays.fill(chunk.blocks, BlockID.AIR);
|
Arrays.fill(chunk.blocks, BlockID.AIR);
|
||||||
// Arrays.fill(chunk.skyLight, (byte) 255);
|
|
||||||
return chunk;
|
return chunk;
|
||||||
}
|
});
|
||||||
};
|
final ThreadLocal<byte[]> byteStore1 = ThreadLocal.withInitial(() -> new byte[500000]);
|
||||||
final ThreadLocal<byte[]> byteStore1 = new ThreadLocal<byte[]>() {
|
final ThreadLocal<byte[]> byteStore2 = ThreadLocal.withInitial(() -> new byte[500000]);
|
||||||
@Override
|
final ThreadLocal<Deflater> deflateStore = ThreadLocal
|
||||||
protected byte[] initialValue() {
|
.withInitial(() -> new Deflater(Deflater.BEST_SPEED, false));
|
||||||
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;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
byte[] fileBuf = new byte[1 << 16];
|
byte[] fileBuf = new byte[1 << 16];
|
||||||
int mcaXMin = 0;
|
int mcaXMin = 0;
|
||||||
int mcaZMin = 0;
|
int mcaZMin = 0;
|
||||||
|
@ -2,12 +2,9 @@ package com.boydti.fawe.object.extent;
|
|||||||
|
|
||||||
import com.boydti.fawe.FaweCache;
|
import com.boydti.fawe.FaweCache;
|
||||||
import com.boydti.fawe.beta.IBatchProcessor;
|
import com.boydti.fawe.beta.IBatchProcessor;
|
||||||
import com.boydti.fawe.beta.IChunkSet;
|
|
||||||
import com.boydti.fawe.object.FaweLimit;
|
import com.boydti.fawe.object.FaweLimit;
|
||||||
import com.boydti.fawe.object.exception.FaweException;
|
|
||||||
import com.boydti.fawe.util.ExtentTraverser;
|
import com.boydti.fawe.util.ExtentTraverser;
|
||||||
import com.boydti.fawe.util.WEManager;
|
import com.boydti.fawe.util.WEManager;
|
||||||
import com.sk89q.jnbt.CompoundTag;
|
|
||||||
import com.sk89q.worldedit.WorldEditException;
|
import com.sk89q.worldedit.WorldEditException;
|
||||||
import com.sk89q.worldedit.entity.BaseEntity;
|
import com.sk89q.worldedit.entity.BaseEntity;
|
||||||
import com.sk89q.worldedit.entity.Entity;
|
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.BlockStateHolder;
|
||||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Set;
|
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
public abstract class FaweRegionExtent extends ResettableExtent implements IBatchProcessor {
|
public abstract class FaweRegionExtent extends ResettableExtent implements IBatchProcessor {
|
||||||
@ -56,6 +50,7 @@ public abstract class FaweRegionExtent extends ResettableExtent implements IBatc
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
||||||
public Extent construct(Extent child) {
|
public Extent construct(Extent child) {
|
||||||
if (getExtent() != child) {
|
if (getExtent() != child) {
|
||||||
new ExtentTraverser<Extent>(this).setNext(child);
|
new ExtentTraverser<Extent>(this).setNext(child);
|
||||||
|
@ -235,8 +235,8 @@ public class WorldWrapper extends AbstractWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendChunk(int X, int Z, int mask) {
|
public void sendChunk(int chunkX, int chunkZ, int bitMask) {
|
||||||
parent.sendChunk(X, Z, mask);
|
parent.sendChunk(chunkX, chunkZ, bitMask);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -31,8 +31,8 @@ import java.util.List;
|
|||||||
/**
|
/**
|
||||||
* A Kochanek-Bartels interpolation; continuous in the 2nd derivative.
|
* A Kochanek-Bartels interpolation; continuous in the 2nd derivative.
|
||||||
*
|
*
|
||||||
* <p>Supports {@link Node#tension tension}, {@link Node#bias bias} and
|
* <p>Supports {@link Node#getTension() tension}, {@link Node#getBias() bias} and
|
||||||
* {@link Node#continuity continuity} parameters per {@link Node}.</p>
|
* {@link Node#getContinuity() continuity} parameters per {@link Node}.</p>
|
||||||
*/
|
*/
|
||||||
public class KochanekBartelsInterpolation implements Interpolation {
|
public class KochanekBartelsInterpolation implements Interpolation {
|
||||||
|
|
||||||
|
@ -148,7 +148,7 @@ public class NullWorld extends AbstractWorld {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void sendChunk(int X, int Z, int mask) {
|
public void sendChunk(int chunkX, int chunkZ, int bitMask) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -300,7 +300,7 @@ public interface World extends Extent, Keyed, IChunkCache<IChunkGet> {
|
|||||||
* @param chunkZ
|
* @param chunkZ
|
||||||
* @param bitMask
|
* @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
|
@Override
|
||||||
IChunkGet get(int x, int z);
|
IChunkGet get(int x, int z);
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren