geforkt von Mirrors/FastAsyncWorldEdit
Renamed ExtentDelegate -> AbstractDelegateExtent.
Dieser Commit ist enthalten in:
Ursprung
1fd1e7aaf8
Commit
d696bf9b03
@ -32,7 +32,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
/**
|
||||
* A base class for {@link Extent}s that merely passes extents onto another.
|
||||
*/
|
||||
public class ExtentDelegate implements Extent {
|
||||
public abstract class AbstractDelegateExtent implements Extent {
|
||||
|
||||
private final Extent extent;
|
||||
|
||||
@ -41,7 +41,7 @@ public class ExtentDelegate implements Extent {
|
||||
*
|
||||
* @param extent the extent
|
||||
*/
|
||||
public ExtentDelegate(Extent extent) {
|
||||
protected AbstractDelegateExtent(Extent extent) {
|
||||
checkNotNull(extent);
|
||||
this.extent = extent;
|
||||
}
|
@ -30,7 +30,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
/**
|
||||
* Stores changes to a {@link ChangeSet}.
|
||||
*/
|
||||
public class ChangeSetExtent extends ExtentDelegate {
|
||||
public class ChangeSetExtent extends AbstractDelegateExtent {
|
||||
|
||||
private final ChangeSet changeSet;
|
||||
|
||||
|
@ -29,7 +29,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
/**
|
||||
* Requires that all mutating methods pass a given {@link Mask}.
|
||||
*/
|
||||
public class MaskingExtent extends ExtentDelegate {
|
||||
public class MaskingExtent extends AbstractDelegateExtent {
|
||||
|
||||
private Mask mask;
|
||||
|
||||
|
@ -24,8 +24,8 @@ import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.blocks.BlockID;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.function.mask.Masks;
|
||||
import com.sk89q.worldedit.function.pattern.Pattern;
|
||||
@ -46,7 +46,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
* This buffer will not attempt to return results from the buffer when
|
||||
* accessor methods (such as {@link #getBlock(Vector)}) are called.
|
||||
*/
|
||||
public class ForgetfulExtentBuffer extends ExtentDelegate implements Pattern {
|
||||
public class ForgetfulExtentBuffer extends AbstractDelegateExtent implements Pattern {
|
||||
|
||||
private static final BaseBlock AIR = new BaseBlock(BlockID.AIR);
|
||||
|
||||
|
@ -22,14 +22,14 @@ package com.sk89q.worldedit.extent.cache;
|
||||
import com.sk89q.worldedit.BlockVector;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
|
||||
/**
|
||||
* Returns the same cached {@link BaseBlock} for repeated calls to
|
||||
* {@link #getLazyBlock(Vector)} with the same position.
|
||||
*/
|
||||
public class LastAccessExtentCache extends ExtentDelegate {
|
||||
public class LastAccessExtentCache extends AbstractDelegateExtent {
|
||||
|
||||
private CachedBlock lastBlock;
|
||||
|
||||
|
@ -22,11 +22,8 @@ package com.sk89q.worldedit.extent.inventory;
|
||||
import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
import com.sk89q.worldedit.extent.inventory.BlockBag;
|
||||
import com.sk89q.worldedit.extent.inventory.BlockBagException;
|
||||
import com.sk89q.worldedit.extent.inventory.UnplaceableBlockException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
@ -38,7 +35,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
/**
|
||||
* Applies a {@link BlockBag} to operations.
|
||||
*/
|
||||
public class BlockBagExtent extends ExtentDelegate {
|
||||
public class BlockBagExtent extends AbstractDelegateExtent {
|
||||
|
||||
private final LocalWorld world;
|
||||
private Map<Integer, Integer> missingBlocks = new HashMap<Integer, Integer>();
|
||||
|
@ -22,13 +22,13 @@ package com.sk89q.worldedit.extent.logging;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
|
||||
/**
|
||||
* An abstract class to implement block loggers and so on with.
|
||||
*/
|
||||
public abstract class AbstractLoggingExtent extends ExtentDelegate {
|
||||
public abstract class AbstractLoggingExtent extends AbstractDelegateExtent {
|
||||
|
||||
/**
|
||||
* Create a new instance.
|
||||
|
@ -27,8 +27,8 @@ import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.blocks.BlockID;
|
||||
import com.sk89q.worldedit.blocks.BlockType;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
import com.sk89q.worldedit.function.operation.BlockMapEntryPlacer;
|
||||
import com.sk89q.worldedit.function.operation.Operation;
|
||||
import com.sk89q.worldedit.function.operation.OperationQueue;
|
||||
@ -40,7 +40,7 @@ import java.util.*;
|
||||
/**
|
||||
* Re-orders blocks into several stages.
|
||||
*/
|
||||
public class MultiStageReorder extends ExtentDelegate implements ReorderingExtent {
|
||||
public class MultiStageReorder extends AbstractDelegateExtent implements ReorderingExtent {
|
||||
|
||||
private TupleArrayList<BlockVector, BaseBlock> stage1 = new TupleArrayList<BlockVector, BaseBlock>();
|
||||
private TupleArrayList<BlockVector, BaseBlock> stage2 = new TupleArrayList<BlockVector, BaseBlock>();
|
||||
|
@ -23,8 +23,8 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkArgument;
|
||||
|
||||
@ -32,7 +32,7 @@ import static com.google.common.base.Preconditions.checkArgument;
|
||||
* Limits the number of blocks that can be changed before a
|
||||
* {@link MaxChangedBlocksException} is thrown.
|
||||
*/
|
||||
public class BlockChangeLimiter extends ExtentDelegate {
|
||||
public class BlockChangeLimiter extends AbstractDelegateExtent {
|
||||
|
||||
private int limit;
|
||||
private int count = 0;
|
||||
|
@ -23,15 +23,15 @@ import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
* Validates set data to prevent creating invalid blocks and such.
|
||||
*/
|
||||
public class DataValidatorExtent extends ExtentDelegate {
|
||||
public class DataValidatorExtent extends AbstractDelegateExtent {
|
||||
|
||||
private final LocalWorld world;
|
||||
|
||||
|
@ -25,8 +25,8 @@ import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.blocks.BlockID;
|
||||
import com.sk89q.worldedit.blocks.BlockType;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
@ -34,7 +34,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
* Handles various quirks when setting blocks, such as ice turning
|
||||
* into water or containers dropping their contents.
|
||||
*/
|
||||
public class BlockQuirkExtent extends ExtentDelegate {
|
||||
public class BlockQuirkExtent extends AbstractDelegateExtent {
|
||||
|
||||
private final LocalWorld world;
|
||||
|
||||
|
@ -23,15 +23,15 @@ import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
|
||||
import static com.google.common.base.Preconditions.checkNotNull;
|
||||
|
||||
/**
|
||||
* Automatically loads chunks when blocks are accessed.
|
||||
*/
|
||||
public class ChunkLoadingExtent extends ExtentDelegate {
|
||||
public class ChunkLoadingExtent extends AbstractDelegateExtent {
|
||||
|
||||
private final LocalWorld world;
|
||||
private boolean enabled;
|
||||
|
@ -24,7 +24,7 @@ import com.sk89q.worldedit.LocalWorld;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.extent.ExtentDelegate;
|
||||
import com.sk89q.worldedit.extent.AbstractDelegateExtent;
|
||||
import com.sk89q.worldedit.function.operation.Operation;
|
||||
import com.sk89q.worldedit.function.operation.RunContext;
|
||||
|
||||
@ -36,7 +36,7 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||
/**
|
||||
* Implements "fast mode" which may skip physics, lighting, etc.
|
||||
*/
|
||||
public class FastModeExtent extends ExtentDelegate {
|
||||
public class FastModeExtent extends AbstractDelegateExtent {
|
||||
|
||||
private final LocalWorld world;
|
||||
private final Set<BlockVector2D> dirtyChunks = new HashSet<BlockVector2D>();
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren