mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-16 03:14:04 +00:00
Use default state a bit more.
This commit is contained in:
@@ -21,6 +21,7 @@ package com.sk89q.worldedit.command.tool;
|
||||
|
||||
import com.sk89q.worldedit.*;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
import com.sk89q.worldedit.blocks.type.BlockState;
|
||||
import com.sk89q.worldedit.blocks.type.BlockType;
|
||||
import com.sk89q.worldedit.blocks.type.BlockTypes;
|
||||
import com.sk89q.worldedit.entity.Player;
|
||||
@@ -37,7 +38,7 @@ import java.util.Set;
|
||||
*/
|
||||
public class RecursivePickaxe implements BlockTool {
|
||||
|
||||
private static final BaseBlock air = new BaseBlock(BlockTypes.AIR);
|
||||
private static final BlockState air = BlockTypes.AIR.getDefaultState();
|
||||
private double range;
|
||||
|
||||
public RecursivePickaxe(double range) {
|
||||
|
@@ -54,7 +54,7 @@ public class SinglePickaxe implements BlockTool {
|
||||
editSession.getSurvivalExtent().setToolUse(config.superPickaxeDrop);
|
||||
|
||||
try {
|
||||
editSession.setBlock(clicked.toVector(), new BaseBlock(BlockTypes.AIR));
|
||||
editSession.setBlock(clicked.toVector(), BlockTypes.AIR.getDefaultState());
|
||||
} catch (MaxChangedBlocksException e) {
|
||||
player.printError("Max blocks change limit reached.");
|
||||
} finally {
|
||||
|
@@ -38,7 +38,7 @@ public class CylinderBrush implements Brush {
|
||||
@Override
|
||||
public void build(EditSession editSession, Vector position, Pattern pattern, double size) throws MaxChangedBlocksException {
|
||||
if (pattern == null) {
|
||||
pattern = new BlockPattern(new BaseBlock(BlockTypes.COBBLESTONE));
|
||||
pattern = new BlockPattern(BlockTypes.COBBLESTONE.getDefaultState());
|
||||
}
|
||||
editSession.makeCylinder(position, pattern, size, size, height, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user