Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-09-06 08:02:50 +02:00
Minor changes for readability
Dieser Commit ist enthalten in:
Ursprung
1b28dcda40
Commit
ca843f1b90
@ -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
|
||||
|
@ -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
|
||||
}
|
||||
|
||||
|
@ -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() {
|
||||
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<WritableMCAChunk> chunkStore = ThreadLocal.withInitial(() -> {
|
||||
WritableMCAChunk chunk = new WritableMCAChunk();
|
||||
Arrays.fill(chunk.blocks, BlockID.AIR);
|
||||
return chunk;
|
||||
});
|
||||
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;
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
@ -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 {
|
||||
|
||||
|
@ -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) {
|
||||
|
||||
}
|
||||
|
||||
|
@ -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);
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren