mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 01:37:37 +00:00
Enable experimental //walls for non-cuboid regions.
This commit is contained in:
parent
fdc3cd56f7
commit
8bfbc55c71
@ -847,7 +847,7 @@ public class EditSession implements Extent {
|
|||||||
* @return number of blocks affected
|
* @return number of blocks affected
|
||||||
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
||||||
*/
|
*/
|
||||||
public int makeCuboidFaces(Region region, BaseBlock block) throws MaxChangedBlocksException {
|
public int makeCuboidFaces(Region region, BlockStateHolder block) throws MaxChangedBlocksException {
|
||||||
return makeCuboidFaces(region, new BlockPattern(block));
|
return makeCuboidFaces(region, new BlockPattern(block));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -899,7 +899,7 @@ public class EditSession implements Extent {
|
|||||||
* @return number of blocks affected
|
* @return number of blocks affected
|
||||||
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
||||||
*/
|
*/
|
||||||
public int makeCuboidWalls(Region region, BaseBlock block) throws MaxChangedBlocksException {
|
public int makeCuboidWalls(Region region, BlockStateHolder block) throws MaxChangedBlocksException {
|
||||||
return makeCuboidWalls(region, new BlockPattern(block));
|
return makeCuboidWalls(region, new BlockPattern(block));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -964,7 +964,7 @@ public class EditSession implements Extent {
|
|||||||
* @return number of blocks affected
|
* @return number of blocks affected
|
||||||
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
* @throws MaxChangedBlocksException thrown if too many blocks are changed
|
||||||
*/
|
*/
|
||||||
public int overlayCuboidBlocks(Region region, BaseBlock block) throws MaxChangedBlocksException {
|
public int overlayCuboidBlocks(Region region, BlockStateHolder block) throws MaxChangedBlocksException {
|
||||||
checkNotNull(block);
|
checkNotNull(block);
|
||||||
|
|
||||||
return overlayCuboidBlocks(region, new BlockPattern(block));
|
return overlayCuboidBlocks(region, new BlockPattern(block));
|
||||||
@ -1091,7 +1091,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 moveCuboidRegion(Region region, Vector dir, int distance, boolean copyAir, BaseBlock replacement) throws MaxChangedBlocksException {
|
public int moveCuboidRegion(Region region, Vector dir, int distance, boolean copyAir, BlockStateHolder replacement) throws MaxChangedBlocksException {
|
||||||
return moveRegion(region, dir, distance, copyAir, replacement);
|
return moveRegion(region, dir, distance, copyAir, replacement);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -24,7 +24,6 @@ import static com.sk89q.worldedit.event.platform.Interaction.OPEN;
|
|||||||
|
|
||||||
import com.google.common.collect.ImmutableList;
|
import com.google.common.collect.ImmutableList;
|
||||||
import com.google.common.collect.Lists;
|
import com.google.common.collect.Lists;
|
||||||
import com.sk89q.worldedit.world.block.BaseBlock;
|
|
||||||
import com.sk89q.worldedit.blocks.BaseItem;
|
import com.sk89q.worldedit.blocks.BaseItem;
|
||||||
import com.sk89q.worldedit.entity.Player;
|
import com.sk89q.worldedit.entity.Player;
|
||||||
import com.sk89q.worldedit.event.platform.BlockInteractEvent;
|
import com.sk89q.worldedit.event.platform.BlockInteractEvent;
|
||||||
@ -51,6 +50,7 @@ import com.sk89q.worldedit.util.io.file.FilenameException;
|
|||||||
import com.sk89q.worldedit.util.io.file.FilenameResolutionException;
|
import com.sk89q.worldedit.util.io.file.FilenameResolutionException;
|
||||||
import com.sk89q.worldedit.util.io.file.InvalidFilenameException;
|
import com.sk89q.worldedit.util.io.file.InvalidFilenameException;
|
||||||
import com.sk89q.worldedit.util.logging.WorldEditPrefixHandler;
|
import com.sk89q.worldedit.util.logging.WorldEditPrefixHandler;
|
||||||
|
import com.sk89q.worldedit.world.block.BlockStateHolder;
|
||||||
import com.sk89q.worldedit.world.block.BlockType;
|
import com.sk89q.worldedit.world.block.BlockType;
|
||||||
import com.sk89q.worldedit.world.registry.BundledBlockData;
|
import com.sk89q.worldedit.world.registry.BundledBlockData;
|
||||||
import com.sk89q.worldedit.world.registry.BundledItemData;
|
import com.sk89q.worldedit.world.registry.BundledItemData;
|
||||||
@ -144,7 +144,7 @@ public class WorldEdit {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the block factory from which new {@link BaseBlock}s can be
|
* Get the block factory from which new {@link BlockStateHolder}s can be
|
||||||
* constructed.
|
* constructed.
|
||||||
*
|
*
|
||||||
* @return the block factory
|
* @return the block factory
|
||||||
|
@ -220,7 +220,7 @@ public class RegionCommands {
|
|||||||
@CommandPermissions("worldedit.region.walls")
|
@CommandPermissions("worldedit.region.walls")
|
||||||
@Logging(REGION)
|
@Logging(REGION)
|
||||||
public void walls(Player player, EditSession editSession, @Selection Region region, Pattern pattern) throws WorldEditException {
|
public void walls(Player player, EditSession editSession, @Selection Region region, Pattern pattern) throws WorldEditException {
|
||||||
int affected = editSession.makeCuboidWalls(region, pattern);
|
int affected = editSession.makeWalls(region, pattern);
|
||||||
player.print(affected + " block(s) have been changed.");
|
player.print(affected + " block(s) have been changed.");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user