3
0
Mirror von https://github.com/IntellectualSites/FastAsyncWorldEdit.git synchronisiert 2024-12-25 02:20:07 +01:00

Removed references to the deprecated BlockTypeMask class from UnderOverlayMask.

Dieser Commit ist enthalten in:
TomyLobo 2013-10-29 08:03:37 +01:00
Ursprung 6beba674cb
Commit ae6e59e8d0

Datei anzeigen

@ -25,6 +25,7 @@ import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.LocalPlayer;
import com.sk89q.worldedit.LocalSession;
import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.blocks.BaseBlock;
/**
*
@ -32,7 +33,7 @@ import com.sk89q.worldedit.Vector;
*/
public class UnderOverlayMask implements Mask {
private final int yMod;
private Mask mask; // TODO: Make this final and remove the deprecated classes
private Mask mask;
@Deprecated
public UnderOverlayMask(Set<Integer> ids, boolean overlay) {
@ -46,13 +47,17 @@ public class UnderOverlayMask implements Mask {
@Deprecated
public void addAll(Set<Integer> ids) {
if (mask instanceof BlockTypeMask) {
BlockTypeMask blockTypeMask = (BlockTypeMask) mask;
if (mask instanceof BlockMask) {
final BlockMask blockTypeMask = (BlockMask) mask;
for (Integer id : ids) {
blockTypeMask.add(id);
blockTypeMask.add(new BaseBlock(id));
}
} else if (mask instanceof ExistingBlockMask) {
mask = new BlockTypeMask(ids);
final BlockMask blockMask = new BlockMask();
for (int type : ids) {
blockMask.add(new BaseBlock(type));
}
mask = blockMask;
}
}