mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 17:57:38 +00:00
Renamed Brush to BrushTool, and BrushShape to Brush.
This commit is contained in:
parent
498f3d9ef1
commit
7f25262572
@ -23,7 +23,7 @@ import java.util.HashMap;
|
||||
import java.util.LinkedList;
|
||||
import java.util.Map;
|
||||
import com.sk89q.worldedit.snapshots.Snapshot;
|
||||
import com.sk89q.worldedit.tools.Brush;
|
||||
import com.sk89q.worldedit.tools.BrushTool;
|
||||
import com.sk89q.worldedit.tools.SinglePickaxe;
|
||||
import com.sk89q.worldedit.tools.BlockTool;
|
||||
import com.sk89q.worldedit.tools.Tool;
|
||||
@ -433,15 +433,15 @@ public class LocalSession {
|
||||
* @return the tool
|
||||
* @throws InvalidToolBindException
|
||||
*/
|
||||
public Brush getBrushTool(int item) throws InvalidToolBindException {
|
||||
public BrushTool getBrushTool(int item) throws InvalidToolBindException {
|
||||
Tool tool = getTool(item);
|
||||
|
||||
if (tool == null || !(tool instanceof Brush)) {
|
||||
tool = new Brush();
|
||||
if (tool == null || !(tool instanceof BrushTool)) {
|
||||
tool = new BrushTool();
|
||||
setTool(item, tool);
|
||||
}
|
||||
|
||||
return (Brush)tool;
|
||||
return (BrushTool)tool;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -31,7 +31,7 @@ import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.WorldEdit;
|
||||
import com.sk89q.worldedit.WorldEditException;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
import com.sk89q.worldedit.tools.Brush;
|
||||
import com.sk89q.worldedit.tools.BrushTool;
|
||||
import com.sk89q.worldedit.tools.brushes.ClipboardBrush;
|
||||
import com.sk89q.worldedit.tools.brushes.CylinderBrush;
|
||||
import com.sk89q.worldedit.tools.brushes.HollowCylinderBrush;
|
||||
@ -66,7 +66,7 @@ public class BrushCommands {
|
||||
return;
|
||||
}
|
||||
|
||||
Brush tool = session.getBrushTool(player.getItemInHand());
|
||||
BrushTool tool = session.getBrushTool(player.getItemInHand());
|
||||
Pattern fill = we.getBlockPattern(player, args.getString(0));
|
||||
tool.setFill(fill);
|
||||
tool.setSize(radius);
|
||||
@ -110,7 +110,7 @@ public class BrushCommands {
|
||||
return;
|
||||
}
|
||||
|
||||
Brush tool = session.getBrushTool(player.getItemInHand());
|
||||
BrushTool tool = session.getBrushTool(player.getItemInHand());
|
||||
Pattern fill = we.getBlockPattern(player, args.getString(0));
|
||||
tool.setFill(fill);
|
||||
tool.setSize(radius);
|
||||
@ -157,7 +157,7 @@ public class BrushCommands {
|
||||
return;
|
||||
}
|
||||
|
||||
Brush tool = session.getBrushTool(player.getItemInHand());
|
||||
BrushTool tool = session.getBrushTool(player.getItemInHand());
|
||||
tool.setBrush(new ClipboardBrush(clipboard, args.hasFlag('a')));
|
||||
|
||||
player.print("Clipboard brush shape equipped.");
|
||||
|
@ -26,7 +26,7 @@ import com.sk89q.worldedit.blocks.BlockID;
|
||||
import com.sk89q.worldedit.masks.Mask;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
import com.sk89q.worldedit.patterns.SingleBlockPattern;
|
||||
import com.sk89q.worldedit.tools.brushes.BrushShape;
|
||||
import com.sk89q.worldedit.tools.brushes.Brush;
|
||||
import com.sk89q.worldedit.tools.brushes.SphereBrush;
|
||||
|
||||
/**
|
||||
@ -34,9 +34,9 @@ import com.sk89q.worldedit.tools.brushes.SphereBrush;
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public class Brush implements TraceTool {
|
||||
public class BrushTool implements TraceTool {
|
||||
private Mask mask = null;
|
||||
private BrushShape brush = new SphereBrush();
|
||||
private Brush brush = new SphereBrush();
|
||||
private Pattern material = new SingleBlockPattern(new BaseBlock(BlockID.COBBLESTONE));
|
||||
private int size = 1;
|
||||
|
||||
@ -63,7 +63,7 @@ public class Brush implements TraceTool {
|
||||
*
|
||||
* @param brush
|
||||
*/
|
||||
public void setBrush(BrushShape brush) {
|
||||
public void setBrush(Brush brush) {
|
||||
this.brush = brush;
|
||||
}
|
||||
|
||||
@ -72,7 +72,7 @@ public class Brush implements TraceTool {
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
public BrushShape getBrush() {
|
||||
public Brush getBrush() {
|
||||
return brush;
|
||||
}
|
||||
|
@ -25,11 +25,11 @@ import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
|
||||
/**
|
||||
* Represents a shape.
|
||||
* Represents a brush.
|
||||
*
|
||||
* @author sk89q
|
||||
*/
|
||||
public interface BrushShape {
|
||||
public interface Brush {
|
||||
/**
|
||||
* Build the object.
|
||||
*
|
@ -25,7 +25,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
|
||||
public class ClipboardBrush implements BrushShape {
|
||||
public class ClipboardBrush implements Brush {
|
||||
private CuboidClipboard clipboard;
|
||||
private boolean noAir;
|
||||
|
||||
|
@ -24,7 +24,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
|
||||
public class CylinderBrush implements BrushShape {
|
||||
public class CylinderBrush implements Brush {
|
||||
private int height;
|
||||
|
||||
public CylinderBrush(int height) {
|
||||
|
@ -24,7 +24,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
|
||||
public class HollowCylinderBrush implements BrushShape {
|
||||
public class HollowCylinderBrush implements Brush {
|
||||
private int height;
|
||||
|
||||
public HollowCylinderBrush(int height) {
|
||||
|
@ -24,7 +24,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
|
||||
public class HollowSphereBrush implements BrushShape {
|
||||
public class HollowSphereBrush implements Brush {
|
||||
public HollowSphereBrush() {
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.patterns.Pattern;
|
||||
|
||||
public class SphereBrush implements BrushShape {
|
||||
public class SphereBrush implements Brush {
|
||||
public SphereBrush() {
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user