mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-13 14:58:35 +00:00
@ -129,7 +129,12 @@ public class AbstractDelegateExtent implements Extent, LightingExtent {
|
||||
new ExtentTraverser<>(this).setNext(new HistoryExtent(extent, changeSet));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public int getMaxY() {
|
||||
return extent.getMaxY();
|
||||
}
|
||||
|
||||
@Override
|
||||
public BlockState getBlock(int x, int y, int z) {
|
||||
return extent.getBlock(x, y, z);
|
||||
@ -172,12 +177,14 @@ public class AbstractDelegateExtent implements Extent, LightingExtent {
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(BlockVector3 position, T block) throws WorldEditException {
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(BlockVector3 position, T block)
|
||||
throws WorldEditException {
|
||||
return extent.setBlock(position.getX(), position.getY(), position.getZ(), block);
|
||||
}
|
||||
|
||||
@Override
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(int x, int y, int z, T block) throws WorldEditException {
|
||||
public <T extends BlockStateHolder<T>> boolean setBlock(int x, int y, int z, T block)
|
||||
throws WorldEditException {
|
||||
return extent.setBlock(x, y, z, block);
|
||||
}
|
||||
|
||||
|
@ -457,7 +457,7 @@ public interface Extent extends InputExtent, OutputExtent {
|
||||
default boolean cancel() {
|
||||
ExtentTraverser<Extent> traverser = new ExtentTraverser<>(this);
|
||||
|
||||
NullExtent nullExtent = new NullExtent(this, FaweCache.INSTANCE.getManual());
|
||||
NullExtent nullExtent = new NullExtent(this, FaweCache.INSTANCE.getMANUAL());
|
||||
|
||||
ExtentTraverser<Extent> next = traverser.next();
|
||||
if (next != null) {
|
||||
|
@ -54,7 +54,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
*/
|
||||
public class BlockArrayClipboard extends DelegateClipboard implements Clipboard, Closeable {
|
||||
|
||||
@NotNull
|
||||
private Region region;
|
||||
private BlockVector3 offset;
|
||||
|
||||
@ -86,7 +85,6 @@ public class BlockArrayClipboard extends DelegateClipboard implements Clipboard,
|
||||
setRegion(region);
|
||||
}
|
||||
|
||||
@NotNull
|
||||
@Override
|
||||
public Region getRegion() {
|
||||
return region;
|
||||
|
@ -77,17 +77,12 @@ public interface Clipboard extends Extent, Iterable<BlockVector3>, Closeable {
|
||||
|
||||
static Clipboard create(BlockVector3 size, UUID uuid) {
|
||||
if (Settings.IMP.CLIPBOARD.USE_DISK) {
|
||||
try {
|
||||
return new DiskOptimizedClipboard(size, uuid);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return new DiskOptimizedClipboard(size, uuid);
|
||||
} else if (Settings.IMP.CLIPBOARD.COMPRESSION_LEVEL == 0) {
|
||||
return new CPUOptimizedClipboard(size);
|
||||
} else {
|
||||
return new MemoryOptimizedClipboard(size);
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -121,10 +116,11 @@ public interface Clipboard extends Extent, Iterable<BlockVector3>, Closeable {
|
||||
void setOrigin(BlockVector3 origin);
|
||||
|
||||
/**
|
||||
* Returns true if the clipboard has biome data. This can be checked since {@link Extent#getBiome(BlockVector2)}
|
||||
* strongly suggests returning {@link com.sk89q.worldedit.world.biome.BiomeTypes#OCEAN} instead of {@code null}
|
||||
* if biomes aren't present. However, it might not be desired to set areas to ocean if the clipboard is defaulting
|
||||
* to ocean, instead of having biomes explicitly set.
|
||||
* Returns true if the clipboard has biome data. This can be checked since {@link
|
||||
* Extent#getBiome(BlockVector2)} strongly suggests returning {@link
|
||||
* com.sk89q.worldedit.world.biome.BiomeTypes#OCEAN} instead of {@code null} if biomes aren't
|
||||
* present. However, it might not be desired to set areas to ocean if the clipboard is
|
||||
* defaulting to ocean, instead of having biomes explicitly set.
|
||||
*
|
||||
* @return true if the clipboard has biome data set
|
||||
*/
|
||||
|
@ -20,6 +20,7 @@
|
||||
package com.sk89q.worldedit.extent.inventory;
|
||||
|
||||
import com.boydti.fawe.FaweCache;
|
||||
import com.boydti.fawe.object.exception.FaweException;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
@ -106,10 +107,10 @@ public class BlockBagExtent extends AbstractDelegateExtent {
|
||||
try {
|
||||
blockBag.fetchPlacedBlock(block.toImmutableState());
|
||||
} catch (UnplaceableBlockException e) {
|
||||
throw FaweCache.INSTANCE.getBlockBag();
|
||||
throw FaweCache.INSTANCE.getBLOCK_BAG();
|
||||
} catch (BlockBagException e) {
|
||||
missingBlocks[block.getBlockType().getInternalId()]++;
|
||||
throw FaweCache.INSTANCE.getBlockBag();
|
||||
throw FaweCache.INSTANCE.getBLOCK_BAG();
|
||||
}
|
||||
}
|
||||
if (mine) {
|
||||
|
Reference in New Issue
Block a user