Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-08 04:20:06 +01:00
Fixed //move
Dieser Commit ist enthalten in:
Ursprung
7773ef6f9a
Commit
2f3bc59e1b
@ -1046,7 +1046,7 @@ public class EditSession implements Extent {
|
|||||||
* @return number of blocks moved
|
* @return number of blocks moved
|
||||||
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
||||||
*/
|
*/
|
||||||
public int moveRegion(Region region, Vector dir, int distance, boolean copyAir, BaseBlock replacement) throws MaxChangedBlocksException {
|
public int moveRegion(Region region, Vector dir, int distance, boolean copyAir, BlockStateHolder replacement) throws MaxChangedBlocksException {
|
||||||
checkNotNull(region);
|
checkNotNull(region);
|
||||||
checkNotNull(dir);
|
checkNotNull(dir);
|
||||||
checkArgument(distance >= 1, "distance >= 1 required");
|
checkArgument(distance >= 1, "distance >= 1 required");
|
||||||
|
@ -62,6 +62,7 @@ import com.sk89q.worldedit.util.command.binding.Range;
|
|||||||
import com.sk89q.worldedit.util.command.binding.Switch;
|
import com.sk89q.worldedit.util.command.binding.Switch;
|
||||||
import com.sk89q.worldedit.util.command.binding.Text;
|
import com.sk89q.worldedit.util.command.binding.Text;
|
||||||
import com.sk89q.worldedit.util.command.parametric.Optional;
|
import com.sk89q.worldedit.util.command.parametric.Optional;
|
||||||
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@ -275,7 +276,7 @@ public class RegionCommands {
|
|||||||
@Selection Region region,
|
@Selection Region region,
|
||||||
@Optional("1") @Range(min = 1) int count,
|
@Optional("1") @Range(min = 1) int count,
|
||||||
@Optional(Direction.AIM) @Direction Vector direction,
|
@Optional(Direction.AIM) @Direction Vector direction,
|
||||||
@Optional("air") BaseBlock replace,
|
@Optional("air") BlockStateHolder replace,
|
||||||
@Switch('s') boolean moveSelection) throws WorldEditException {
|
@Switch('s') boolean moveSelection) throws WorldEditException {
|
||||||
|
|
||||||
int affected = editSession.moveRegion(region, direction, count, true, replace);
|
int affected = editSession.moveRegion(region, direction, count, true, replace);
|
||||||
|
@ -49,6 +49,7 @@ import com.sk89q.worldedit.util.command.parametric.ParameterException;
|
|||||||
import com.sk89q.worldedit.world.World;
|
import com.sk89q.worldedit.world.World;
|
||||||
import com.sk89q.worldedit.world.biome.BaseBiome;
|
import com.sk89q.worldedit.world.biome.BaseBiome;
|
||||||
import com.sk89q.worldedit.world.biome.Biomes;
|
import com.sk89q.worldedit.world.biome.Biomes;
|
||||||
|
import com.sk89q.worldedit.world.block.BlockState;
|
||||||
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
import com.sk89q.worldedit.world.registry.BiomeRegistry;
|
import com.sk89q.worldedit.world.registry.BiomeRegistry;
|
||||||
|
|
||||||
@ -168,7 +169,7 @@ public class WorldEditBinding extends BindingHelper {
|
|||||||
* @throws ParameterException on error
|
* @throws ParameterException on error
|
||||||
* @throws WorldEditException on error
|
* @throws WorldEditException on error
|
||||||
*/
|
*/
|
||||||
@BindingMatch(type = BaseBlock.class,
|
@BindingMatch(type = {BaseBlock.class, BlockState.class, BlockStateHolder.class},
|
||||||
behavior = BindingBehavior.CONSUMES,
|
behavior = BindingBehavior.CONSUMES,
|
||||||
consumedCount = 1)
|
consumedCount = 1)
|
||||||
public BlockStateHolder getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
|
public BlockStateHolder getBaseBlock(ArgumentStack context) throws ParameterException, WorldEditException {
|
||||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren