mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-01 10:56:42 +00:00
Moved containsFuzzy from EditSession to BaseBlock.
This commit is contained in:
@ -22,6 +22,8 @@ package com.sk89q.worldedit.blocks;
|
||||
import com.sk89q.worldedit.CuboidClipboard.FlipDirection;
|
||||
import com.sk89q.worldedit.foundation.Block;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* Represents a block.
|
||||
*
|
||||
@ -161,7 +163,7 @@ public class BaseBlock extends Block {
|
||||
/**
|
||||
* @param iter
|
||||
* @return
|
||||
* @deprecated This method is silly
|
||||
* @deprecated This method is silly, use {@link #containsFuzzy(java.util.Collection, BaseBlock)} instead.
|
||||
*/
|
||||
@Deprecated
|
||||
public boolean inIterable(Iterable<BaseBlock> iter) {
|
||||
@ -172,4 +174,14 @@ public class BaseBlock extends Block {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static boolean containsFuzzy(Collection<BaseBlock> collection, BaseBlock o) {
|
||||
// allow masked data in the searchBlocks to match various types
|
||||
for (BaseBlock b : collection) {
|
||||
if (b.equalsFuzzy(o)) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user