mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-04 03:56:41 +00:00
@ -84,7 +84,7 @@ public class BitSetBlocks implements IChunkSet {
|
||||
|
||||
@Override
|
||||
public char[] load(int layer) {
|
||||
char[] arr = FaweCache.INSTANCE.getSectionBitsToChar().get();
|
||||
char[] arr = FaweCache.INSTANCE.getSECTION_BITS_TO_CHAR().get();
|
||||
MemBlockSet.IRow nullRowY = row.getRow(layer);
|
||||
if (nullRowY instanceof MemBlockSet.RowY) {
|
||||
char value = blockState.getOrdinalChar();
|
||||
|
@ -142,7 +142,7 @@ public class FallbackChunkGet implements IChunkGet {
|
||||
|
||||
@Override
|
||||
public char[] load(int layer) {
|
||||
char[] arr = FaweCache.INSTANCE.getSectionBitsToChar().get();
|
||||
char[] arr = FaweCache.INSTANCE.getSECTION_BITS_TO_CHAR().get();
|
||||
int by = layer << 4;
|
||||
for (int y = 0, i = 0; y < 16; y++) {
|
||||
for (int z = 0; z < 16; z++) {
|
||||
|
@ -23,7 +23,6 @@ import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Future;
|
||||
import javax.annotation.Nullable;
|
||||
import org.jetbrains.annotations.Range;
|
||||
|
||||
/**
|
||||
* An abstract {@link IChunk} class that implements basic get/set blocks
|
||||
@ -40,9 +39,7 @@ public class ChunkHolder<T extends Future<T>> implements IQueueChunk<T> {
|
||||
private IChunkSet chunkSet; // The blocks to be set to the chunkExisting
|
||||
private IBlockDelegate delegate; // delegate handles the abstraction of the chunk layers
|
||||
private IQueueExtent extent; // the parent queue extent which has this chunk
|
||||
@Range(from = 0, to = 15)
|
||||
private int chunkX;
|
||||
@Range(from = 0, to = 15)
|
||||
private int chunkZ;
|
||||
|
||||
public ChunkHolder() {
|
||||
|
@ -29,21 +29,22 @@ import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.UUID;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class LimitExtent extends PassthroughExtent {
|
||||
private final FaweLimit limit;
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
*
|
||||
* @param extent the extent
|
||||
*/
|
||||
* Create a new instance.
|
||||
*
|
||||
* @param extent the extent
|
||||
*/
|
||||
public LimitExtent(Extent extent, FaweLimit limit) {
|
||||
super(extent);
|
||||
this.limit = limit;
|
||||
@ -118,7 +119,7 @@ public class LimitExtent extends PassthroughExtent {
|
||||
|
||||
@Override
|
||||
public int getHighestTerrainBlock(int x, int z, int minY, int maxY) {
|
||||
limit.THROW_MAX_CHECKS(FaweCache.worldHeight);
|
||||
limit.THROW_MAX_CHECKS(FaweCache.WORLD_HEIGHT);
|
||||
try {
|
||||
return getExtent().getHighestTerrainBlock(x, z, minY, maxY);
|
||||
} catch (FaweException e) {
|
||||
@ -131,7 +132,7 @@ public class LimitExtent extends PassthroughExtent {
|
||||
|
||||
@Override
|
||||
public int getHighestTerrainBlock(int x, int z, int minY, int maxY, Mask filter) {
|
||||
limit.THROW_MAX_CHECKS(FaweCache.worldHeight);
|
||||
limit.THROW_MAX_CHECKS(FaweCache.WORLD_HEIGHT);
|
||||
try {
|
||||
return getExtent().getHighestTerrainBlock(x, z, minY, maxY, filter);
|
||||
} catch (FaweException e) {
|
||||
@ -144,7 +145,7 @@ public class LimitExtent extends PassthroughExtent {
|
||||
|
||||
@Override
|
||||
public int getNearestSurfaceLayer(int x, int z, int y, int minY, int maxY) {
|
||||
limit.THROW_MAX_CHECKS(FaweCache.worldHeight);
|
||||
limit.THROW_MAX_CHECKS(FaweCache.WORLD_HEIGHT);
|
||||
try {
|
||||
return getExtent().getNearestSurfaceLayer(x, z, y, minY, maxY);
|
||||
} catch (FaweException e) {
|
||||
@ -157,7 +158,7 @@ public class LimitExtent extends PassthroughExtent {
|
||||
|
||||
@Override
|
||||
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY, boolean ignoreAir) {
|
||||
limit.THROW_MAX_CHECKS(FaweCache.worldHeight);
|
||||
limit.THROW_MAX_CHECKS(FaweCache.WORLD_HEIGHT);
|
||||
try {
|
||||
return getExtent().getNearestSurfaceTerrainBlock(x, z, y, minY, maxY, ignoreAir);
|
||||
} catch (FaweException e) {
|
||||
@ -170,7 +171,7 @@ public class LimitExtent extends PassthroughExtent {
|
||||
|
||||
@Override
|
||||
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY) {
|
||||
limit.THROW_MAX_CHECKS(FaweCache.worldHeight);
|
||||
limit.THROW_MAX_CHECKS(FaweCache.WORLD_HEIGHT);
|
||||
try {
|
||||
return getExtent().getNearestSurfaceTerrainBlock(x, z, y, minY, maxY);
|
||||
} catch (FaweException e) {
|
||||
@ -183,7 +184,7 @@ public class LimitExtent extends PassthroughExtent {
|
||||
|
||||
@Override
|
||||
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY, int failedMin, int failedMax) {
|
||||
limit.THROW_MAX_CHECKS(FaweCache.worldHeight);
|
||||
limit.THROW_MAX_CHECKS(FaweCache.WORLD_HEIGHT);
|
||||
try {
|
||||
return getExtent().getNearestSurfaceTerrainBlock(x, z, y, minY, maxY, failedMin, failedMax);
|
||||
} catch (FaweException e) {
|
||||
@ -196,7 +197,7 @@ public class LimitExtent extends PassthroughExtent {
|
||||
|
||||
@Override
|
||||
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY, int failedMin, int failedMax, Mask mask) {
|
||||
limit.THROW_MAX_CHECKS(FaweCache.worldHeight);
|
||||
limit.THROW_MAX_CHECKS(FaweCache.WORLD_HEIGHT);
|
||||
try {
|
||||
return getExtent().getNearestSurfaceTerrainBlock(x, z, y, minY, maxY, failedMin, failedMax, mask);
|
||||
} catch (FaweException e) {
|
||||
@ -209,7 +210,7 @@ public class LimitExtent extends PassthroughExtent {
|
||||
|
||||
@Override
|
||||
public int getNearestSurfaceTerrainBlock(int x, int z, int y, int minY, int maxY, int failedMin, int failedMax, boolean ignoreAir) {
|
||||
limit.THROW_MAX_CHECKS(FaweCache.worldHeight);
|
||||
limit.THROW_MAX_CHECKS(FaweCache.WORLD_HEIGHT);
|
||||
try {
|
||||
return getExtent().getNearestSurfaceTerrainBlock(x, z, y, minY, maxY, failedMin, failedMax, ignoreAir);
|
||||
} catch (FaweException e) {
|
||||
|
@ -58,7 +58,7 @@ public class ParallelQueueExtent extends PassthroughExtent implements IQueueWrap
|
||||
@Override
|
||||
public boolean cancel() {
|
||||
if (super.cancel()) {
|
||||
processor.setProcessor(new NullExtent(this, FaweCache.INSTANCE.getManual()));
|
||||
processor.setProcessor(new NullExtent(this, FaweCache.INSTANCE.getMANUAL()));
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
Reference in New Issue
Block a user