3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-11-08 04:20:06 +01:00
Dieser Commit ist enthalten in:
MattBDev 2019-07-29 11:19:38 -04:00
Ursprung 7f51791d6c
Commit 12114ec987
4 geänderte Dateien mit 18 neuen und 16 gelöschten Zeilen

Datei anzeigen

@ -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.
@ -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;
} }

Datei anzeigen

@ -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);
} }

Datei anzeigen

@ -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;
} }

Datei anzeigen

@ -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);
} }