mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2024-12-23 09:47:38 +00:00
Optimized BaseBlock.inIterable a bit.
This commit is contained in:
parent
06e9a3b175
commit
ca817e4e11
@ -19,6 +19,8 @@
|
|||||||
|
|
||||||
package com.sk89q.worldedit.blocks;
|
package com.sk89q.worldedit.blocks;
|
||||||
|
|
||||||
|
import java.util.Collection;
|
||||||
|
|
||||||
import com.sk89q.worldedit.CuboidClipboard.FlipDirection;
|
import com.sk89q.worldedit.CuboidClipboard.FlipDirection;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -162,6 +164,10 @@ public class BaseBlock {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean inIterable(Iterable<BaseBlock> iter) {
|
public boolean inIterable(Iterable<BaseBlock> iter) {
|
||||||
|
if (iter instanceof Collection) {
|
||||||
|
return ((Collection<?>) iter).contains(this);
|
||||||
|
}
|
||||||
|
|
||||||
for (BaseBlock block : iter) {
|
for (BaseBlock block : iter) {
|
||||||
if (block.equals(this)) {
|
if (block.equals(this)) {
|
||||||
return true;
|
return true;
|
||||||
|
Loading…
Reference in New Issue
Block a user