mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
merge
This commit is contained in:
@ -32,6 +32,7 @@ import com.sk89q.worldedit.math.BlockVector2;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.math.Vector3;
|
||||
import com.sk89q.worldedit.regions.Region;
|
||||
import com.sk89q.worldedit.registry.Keyed;
|
||||
import com.sk89q.worldedit.util.Direction;
|
||||
import com.sk89q.worldedit.util.TreeGenerator;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
@ -41,11 +42,12 @@ import com.sk89q.worldedit.world.weather.WeatherType;
|
||||
|
||||
import javax.annotation.Nullable;
|
||||
import java.nio.file.Path;
|
||||
import java.util.Locale;
|
||||
|
||||
/**
|
||||
* Represents a world (dimension).
|
||||
*/
|
||||
public interface World extends Extent {
|
||||
public interface World extends Extent, Keyed {
|
||||
|
||||
/**
|
||||
* Get the name of the world.
|
||||
@ -284,4 +286,8 @@ public interface World extends Extent {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
default String getId() {
|
||||
return getName().replace(" ", "_").toLowerCase(Locale.ROOT);
|
||||
}
|
||||
}
|
||||
|
@ -182,7 +182,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
|
||||
@Override
|
||||
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
|
||||
public final BaseBlock toBaseBlock() {
|
||||
public BaseBlock toBaseBlock() {
|
||||
return this;
|
||||
}
|
||||
|
||||
|
@ -301,6 +301,9 @@ public class BlockState implements BlockStateHolder<BlockState>, FawePattern {
|
||||
|
||||
@Override
|
||||
public boolean equalsFuzzy(BlockStateHolder<?> o) {
|
||||
if (null == o) {
|
||||
return false;
|
||||
}
|
||||
if (this == o) {
|
||||
// Added a reference equality check for speediness
|
||||
return true;
|
||||
@ -308,9 +311,6 @@ public class BlockState implements BlockStateHolder<BlockState>, FawePattern {
|
||||
if (o.getClass() == BlockState.class) {
|
||||
return o.getOrdinal() == this.getOrdinal();
|
||||
}
|
||||
if (null == o) {
|
||||
return false;
|
||||
}
|
||||
return o.equalsFuzzy(this);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user