12
0

Fix Missle Info

Dieser Commit ist enthalten in:
jojo 2020-09-18 21:56:17 +02:00
Ursprung d6e6a6f3fe
Commit 4a07281f12

Datei anzeigen

@ -133,22 +133,10 @@ public class Missile extends SpecialItem {
return st.toString();
}
private static boolean logged = false;
private int count() {
int tntCount = 0;
BlockArrayClipboard arrayClipboard = (BlockArrayClipboard)clipboard;
BlockVector3 dimensions = arrayClipboard.getDimensions();
for (int x = 0; x < dimensions.getX(); x++) {
for (int y = 0; y < dimensions.getY(); y++) {
for (int z = 0; z < dimensions.getZ(); z++) {
if (arrayClipboard.getBlock(BlockVector3.at(x, y, z)).getBlockType() == TNT) {
tntCount++;
}
}
}
}
return tntCount;
EditSession e = WorldEdit.getInstance().getEditSessionFactory().getEditSession(world, -1);
BlockTypeMask blockTypeMask = new BlockTypeMask(clipboard, TNT);
return e.countBlocks(clipboard.getRegion(), blockTypeMask);
}
@Override