Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-05 11:00:05 +01:00
Added FuzzyBlockMask(BaseBlock... block) constructor.
Dieser Commit ist enthalten in:
Ursprung
b21f944570
Commit
8c3912b5e7
@ -23,6 +23,7 @@ import com.sk89q.worldedit.EditSession;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.blocks.BaseBlock;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
@ -42,6 +43,19 @@ public class FuzzyBlockMask extends AbstractMask {
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new fuzzy block mask.
|
||||
*
|
||||
* @param block a list of block types to match
|
||||
*/
|
||||
public FuzzyBlockMask(BaseBlock... block) {
|
||||
Set<BaseBlock> filter = new HashSet<BaseBlock>();
|
||||
for (BaseBlock b : block) {
|
||||
filter.add(b);
|
||||
}
|
||||
this.filter = filter;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean matches(EditSession editSession, Vector pos) {
|
||||
BaseBlock compare = new BaseBlock(editSession.getBlockType(pos), editSession.getBlockData(pos));
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren