mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Minor changes
This commit is contained in:
parent
7f51791d6c
commit
12114ec987
@ -150,13 +150,9 @@ import java.util.UUID;
|
|||||||
import java.util.concurrent.ThreadLocalRandom;
|
import java.util.concurrent.ThreadLocalRandom;
|
||||||
import javax.annotation.Nonnull;
|
import javax.annotation.Nonnull;
|
||||||
import javax.annotation.Nullable;
|
import javax.annotation.Nullable;
|
||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkArgument;
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* An {@link Extent} that handles history, {@link BlockBag}s, change limits,
|
* An {@link Extent} that handles history, {@link BlockBag}s, change limits,
|
||||||
* block re-ordering, and much more. Most operations in WorldEdit use this class.
|
* block re-ordering, and much more. Most operations in WorldEdit use this class.
|
||||||
@ -170,6 +166,12 @@ public class EditSession extends AbstractDelegateExtent implements SimpleWorld,
|
|||||||
|
|
||||||
private static final Logger log = LoggerFactory.getLogger(EditSession.class);
|
private static final Logger log = LoggerFactory.getLogger(EditSession.class);
|
||||||
|
|
||||||
|
//TODO
|
||||||
|
@Override
|
||||||
|
public String getId() {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used by {@link EditSession#setBlock(BlockVector3, BlockStateHolder, Stage)} to
|
* Used by {@link EditSession#setBlock(BlockVector3, BlockStateHolder, Stage)} to
|
||||||
* determine which {@link Extent}s should be bypassed.
|
* determine which {@link Extent}s should be bypassed.
|
||||||
@ -1193,10 +1195,10 @@ public class EditSession extends AbstractDelegateExtent implements SimpleWorld,
|
|||||||
/**
|
/**
|
||||||
* Fills an area recursively in the X/Z directions.
|
* Fills an area recursively in the X/Z directions.
|
||||||
*
|
*
|
||||||
* @param origin the location to start from
|
* @param origin the location to start from
|
||||||
* @param pattern the block to fill with
|
* @param pattern the block to fill with
|
||||||
* @param radius the radius of the spherical area to fill
|
* @param radius the radius of the spherical area to fill
|
||||||
* @param depth the maximum depth, starting from the origin
|
* @param depth the maximum depth, starting from the origin
|
||||||
* @param direction the direction to fill
|
* @param direction the direction to fill
|
||||||
* @return number of blocks affected
|
* @return number of blocks affected
|
||||||
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
||||||
@ -2971,7 +2973,7 @@ public class EditSession extends AbstractDelegateExtent implements SimpleWorld,
|
|||||||
double scaledZ = (z - zero2D.getZ()) / unit2D.getZ();
|
double scaledZ = (z - zero2D.getZ()) / unit2D.getZ();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if (expression.evaluateTimeout(timeout, scaledX, scaledZ, timeout) <= 0) {
|
if (expression.evaluate(new double[]{scaledX, scaledZ}, timeout) <= 0) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,13 +21,14 @@ package com.sk89q.worldedit.function.pattern;
|
|||||||
|
|
||||||
import static com.google.common.base.Preconditions.checkNotNull;
|
import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
|
|
||||||
import com.boydti.fawe.beta.FilterBlock;
|
|
||||||
import com.sk89q.worldedit.math.BlockVector3;
|
import com.sk89q.worldedit.math.BlockVector3;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
import com.sk89q.worldedit.world.block.BaseBlock;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A pattern that returns the same {@link BaseBlock} each time.
|
* A pattern that returns the same {@link BaseBlock} each time.
|
||||||
|
*
|
||||||
|
* @deprecated all BlockStateHolders can be used directly as a pattern
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public class BlockPattern extends AbstractPattern {
|
public class BlockPattern extends AbstractPattern {
|
||||||
@ -39,7 +40,6 @@ public class BlockPattern extends AbstractPattern {
|
|||||||
*
|
*
|
||||||
* @param block the block
|
* @param block the block
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
|
||||||
public BlockPattern(BlockStateHolder<?> block) {
|
public BlockPattern(BlockStateHolder<?> block) {
|
||||||
setBlock(block);
|
setBlock(block);
|
||||||
}
|
}
|
||||||
|
@ -182,7 +182,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void setNbtData(@Nullable CompoundTag nbtData) {
|
public void setNbtData(@Nullable CompoundTag nbtData) {
|
||||||
throw new UnsupportedOperationException("Immutable");
|
throw new UnsupportedOperationException("This class is immutable.");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -239,7 +239,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final BaseBlock toBaseBlock() {
|
public BaseBlock toBaseBlock() {
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,6 +301,9 @@ public class BlockState implements BlockStateHolder<BlockState>, FawePattern {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean equalsFuzzy(BlockStateHolder<?> o) {
|
public boolean equalsFuzzy(BlockStateHolder<?> o) {
|
||||||
|
if (null == o) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
if (this == o) {
|
if (this == o) {
|
||||||
// Added a reference equality check for speediness
|
// Added a reference equality check for speediness
|
||||||
return true;
|
return true;
|
||||||
@ -308,9 +311,6 @@ public class BlockState implements BlockStateHolder<BlockState>, FawePattern {
|
|||||||
if (o.getClass() == BlockState.class) {
|
if (o.getClass() == BlockState.class) {
|
||||||
return o.getOrdinal() == this.getOrdinal();
|
return o.getOrdinal() == this.getOrdinal();
|
||||||
}
|
}
|
||||||
if (null == o) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return o.equalsFuzzy(this);
|
return o.equalsFuzzy(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user