mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 02:46:41 +00:00
Moved report framework to WorldEdit and fixed a few bugs.
This commit is contained in:
@ -34,18 +34,13 @@ import java.util.Objects;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
/**
|
||||
* Represents a mutable "snapshot" of a block.
|
||||
* Represents a "snapshot" of a block with NBT Data.
|
||||
*
|
||||
* <p>An instance of this block contains all the information needed to
|
||||
* accurately reproduce the block, provided that the instance was
|
||||
* made correctly. In some implementations, it may not be possible to get a
|
||||
* snapshot of blocks correctly, so, for example, the NBT data for a block
|
||||
* may be missing.</p>
|
||||
*
|
||||
* <p>A peculiar detail of this class is that it accepts {@code -1} as a
|
||||
* valid data value. This is due to legacy reasons: WorldEdit uses -1
|
||||
* as a "wildcard" block value, even though a {@link Mask} would be
|
||||
* more appropriate.</p>
|
||||
*/
|
||||
public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
|
||||
@ -73,15 +68,6 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
this.nbtData = nbtData;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a clone of another block.
|
||||
*
|
||||
* @param other the other block
|
||||
*/
|
||||
public BaseBlock(BaseBlock other) {
|
||||
this(other.toImmutableState(), other.getNbtData());
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a map of state to statevalue
|
||||
*
|
||||
@ -99,7 +85,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
|
||||
@Override
|
||||
public <V> BaseBlock with(Property<V> property, V value) {
|
||||
return new BaseBlock(this.blockState.with(property, value), getNbtData());
|
||||
return this.blockState.with(property, value).toBaseBlock(getNbtData());
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user