Mirror von
https://github.com/IntellectualSites/FastAsyncWorldEdit.git
synchronisiert 2024-11-10 05:20:04 +01:00
Optimized BaseBlock.inIterable a bit.
Dieser Commit ist enthalten in:
Ursprung
06e9a3b175
Commit
ca817e4e11
@ -19,6 +19,8 @@
|
||||
|
||||
package com.sk89q.worldedit.blocks;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import com.sk89q.worldedit.CuboidClipboard.FlipDirection;
|
||||
|
||||
/**
|
||||
@ -162,6 +164,10 @@ public class BaseBlock {
|
||||
}
|
||||
|
||||
public boolean inIterable(Iterable<BaseBlock> iter) {
|
||||
if (iter instanceof Collection) {
|
||||
return ((Collection<?>) iter).contains(this);
|
||||
}
|
||||
|
||||
for (BaseBlock block : iter) {
|
||||
if (block.equals(this)) {
|
||||
return true;
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren