This commit is contained in:
TomyLobo
2011-11-23 02:29:48 +01:00
parent 1a57f6e95d
commit 7e13b60a51
161 changed files with 1433 additions and 1412 deletions

View File

@ -31,24 +31,24 @@ import com.sk89q.worldedit.Vector;
*/
public class BlockTypeMask implements Mask {
protected Set<Integer> types;
public BlockTypeMask() {
types = new HashSet<Integer>();
}
public BlockTypeMask(Set<Integer> types) {
this.types = types;
}
public BlockTypeMask(int type) {
this();
add(type);
}
public void add(int type) {
types.add(type);
}
public boolean matches(EditSession editSession, Vector pos) {
return types.contains(editSession.getBlockType(pos));
}

View File

@ -24,9 +24,9 @@ import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.regions.Region;
public class RegionMask implements Mask {
private Region region;
public RegionMask(Region region) {
this.region = region;
}

View File

@ -40,7 +40,7 @@ public class UnderOverlayMask implements Mask {
this.overlay = overlay;
}
public void addAll(Set<Integer> ids){
public void addAll(Set<Integer> ids) {
this.ids.addAll(ids);
}
@ -50,4 +50,3 @@ public class UnderOverlayMask implements Mask {
}
}