mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-12 08:38:34 +00:00
Another selective merge
This commit is contained in:
@ -26,16 +26,9 @@ import com.sk89q.jnbt.StringTag;
|
||||
import com.sk89q.jnbt.Tag;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.world.block.BlockState;
|
||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||
import com.sk89q.worldedit.world.block.BlockType;
|
||||
import com.sk89q.worldedit.world.block.BlockTypes;
|
||||
import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
import com.sk89q.worldedit.world.registry.LegacyMapper;
|
||||
import com.sk89q.worldedit.blocks.TileEntityBlock;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.function.mask.SingleBlockStateMask;
|
||||
import com.sk89q.worldedit.function.mask.SingleBlockTypeMask;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
import com.sk89q.worldedit.registry.state.PropertyKey;
|
||||
@ -271,12 +264,7 @@ public class BaseBlock implements BlockStateHolder<BaseBlock>, TileEntityBlock {
|
||||
return toImmutableState().getInternalPropertiesId();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mask toMask(Extent extent) {
|
||||
return new SingleBlockStateMask(extent, toImmutableState());
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
public <V> BaseBlock with(Property<V> property, V value) {
|
||||
return toImmutableState().with(property, value).toBaseBlock(getNbtData());
|
||||
}
|
||||
|
@ -27,8 +27,6 @@ import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.extension.input.InputParseException;
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.function.mask.SingleBlockStateMask;
|
||||
import com.sk89q.worldedit.math.BlockVector3;
|
||||
import com.sk89q.worldedit.registry.state.AbstractProperty;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
@ -225,11 +223,6 @@ public class BlockState implements BlockStateHolder<BlockState> {
|
||||
return getBlockType().withPropertyId(propertyId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Mask toMask(Extent extent) {
|
||||
return new SingleBlockStateMask(extent, this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean apply(Extent extent, BlockVector3 get, BlockVector3 set) throws WorldEditException {
|
||||
return extent.setBlock(set, this);
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
package com.sk89q.worldedit.world.block;
|
||||
|
||||
import com.sk89q.worldedit.extent.Extent;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
import com.sk89q.worldedit.function.pattern.FawePattern;
|
||||
import com.sk89q.jnbt.CompoundTag;
|
||||
import com.sk89q.worldedit.registry.state.Property;
|
||||
@ -30,7 +28,7 @@ import com.sk89q.worldedit.world.registry.BlockMaterial;
|
||||
import java.util.Map;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
public interface BlockStateHolder<T extends BlockStateHolder<T>> extends FawePattern {
|
||||
public interface BlockStateHolder<B extends BlockStateHolder<B>> extends FawePattern {
|
||||
|
||||
/**
|
||||
* Get the block type
|
||||
@ -45,7 +43,7 @@ public interface BlockStateHolder<T extends BlockStateHolder<T>> extends FawePat
|
||||
* @return
|
||||
*/
|
||||
@Deprecated
|
||||
T withPropertyId(int propertyId);
|
||||
B withPropertyId(int propertyId);
|
||||
|
||||
/**
|
||||
* Get combined id (legacy uses)
|
||||
@ -72,16 +70,14 @@ public interface BlockStateHolder<T extends BlockStateHolder<T>> extends FawePat
|
||||
@Deprecated
|
||||
int getInternalPropertiesId();
|
||||
|
||||
Mask toMask(Extent extent);
|
||||
|
||||
/**
|
||||
* Returns a BlockStateHolder with the given state and value applied.
|
||||
* Returns a BlockState with the given state and value applied.
|
||||
*
|
||||
* @param property The state
|
||||
* @param value The value
|
||||
* @return The modified state, or same if could not be applied
|
||||
*/
|
||||
<V> T with(final Property<V> property, final V value);
|
||||
<V> B with(final Property<V> property, final V value);
|
||||
|
||||
/**
|
||||
* Returns a BlockStateHolder with the given state and value applied.
|
||||
@ -90,7 +86,7 @@ public interface BlockStateHolder<T extends BlockStateHolder<T>> extends FawePat
|
||||
* @param value The value
|
||||
* @return The modified state, or same if could not be applied
|
||||
*/
|
||||
<V> T with(final PropertyKey property, final V value);
|
||||
<V> B with(final PropertyKey property, final V value);
|
||||
|
||||
/**
|
||||
* Gets the value at the given state
|
||||
|
Reference in New Issue
Block a user